/*
 * Local overrides for the vendored digit-ui CSS bundle. Loaded AFTER
 * /digit-ui/vendor/digit-ui-css.css in public/index.html so rules here
 * win by cascade without !important. Keep this file small — anything
 * structural should go upstream to @egovernments/digit-ui-css.
 */

/* Pre-MDMS pages (login screen, splash) render BEFORE the tenant theme
 * loads — they always pick up vendor :root defaults regardless of which
 * tenant this build is deployed to. Don't try to themed them per-tenant
 * here; let them stay tenant-neutral and good-looking on DIGIT defaults.
 * The CSS-var-driven polish blocks below still apply, but their var
 * references resolve to DIGIT defaults pre-MDMS — which is the intent. */

/* Citizen home: align ServicesSection top padding with the 15px side
 * padding so the gap above the cards matches the gap on the sides
 * (closes egovernments/CCRS#421). Upstream digit-ui-css 1.8.37 sets
 * top padding to 40px, which looks off on tenants whose banner image
 * isn't tall enough to absorb the gap.
 */
.HomePageWrapper .ServicesSection {
  padding: 15px 15px 0;
}

@media (min-width: 780px) {
  .HomePageWrapper .ServicesSection {
    padding: 15px 15px 0;
    width: 100%;
  }
}

/* Employee landing logos — upstream sizes the banner logo at 50px which
 * crops the NCCG coat-of-arms badly. Constrain by max-width and let
 * the image scale, keeping object-fit so the SVG isn't squashed
 * (closes egovernments/CCRS#443 sub-7).
 */
.bannerCard .bannerHeader .bannerLogo,
.languageSelection .bannerHeader .bannerLogo {
  max-width: 96px;
  max-height: 96px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Employee language-selection card — vendor wraps each language button
 * in `.language-button-container` and applies `margin: 0 4.65% 0 0` to the
 * `.customBtn` itself, so per-row gap is calculated against the parent
 * card width and the wrapped 4th button (German) ends up alone on a
 * second row, ragged against the wide gaps on row 1 (Subhashini flagged
 * "alignment of the buttons is off" — egovernments/CCRS#500). The JSX
 * inline-style now sets `justify-content: center; gap: 12px` so the rows
 * align centered with consistent spacing; zero the per-button margin
 * here so `gap` is the sole spacing source. */
.bannerCard.languageSelection .language-selector .customBtn,
.bannerCard.languageSelection .language-selector .customBtn-selected {
  margin: 0 !important;
}

/* Radio button layout — vendor's `.digit-radio-options-wrap .digit-radio-btn`
 * declares `position:absolute; height:1.5rem; width:1.5rem` but the cascade
 * loses to a generic `input` rule somewhere upstream, so the input ends up
 * `position:relative; 16x16` IN-flow. That pushes the visible
 * `.digit-radio-btn-checkmark` down — circle and selected-dot end up beside
 * each other (Subhashini flagged "Assigned to All / Assigned to Me"). Restate
 * the absolute-overlay positioning at higher specificity + !important so the
 * input sits invisibly on top of the checkmark and the dot lands inside the
 * ring. */
.digit-radio-options-wrap .digit-radio-btn-wrap,
.radio-wrap .radio-btn-wrap {
  width: 1.5rem;
  height: 1.5rem;
}
.digit-radio-options-wrap .digit-radio-btn-wrap .digit-radio-btn,
.radio-wrap .radio-btn-wrap .radio-btn {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 1.5rem !important;
  height: 1.5rem !important;
  margin: 0 !important;
}
/* Older react-components Radio variant uses `.radio-wrap` /
 * `.radio-btn-wrap` / `.radio-btn-checkmark` (no `digit-` prefix). The
 * checkmark span ships statically positioned, so when the input above
 * it is in flow rather than absolutely overlapped, the ring renders
 * BELOW the label text and the selected dot lands beside the ring. Make
 * the wrap relative + position the checkmark absolutely on top of the
 * input rect. Also lay out each radio option (`.radio-wrap > div`) as
 * a flex row so the ring + label sit on the same baseline. */
.radio-wrap > div {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 8px !important;
}
.radio-wrap > div > label {
  margin: 0 !important;
}
.radio-wrap .radio-btn-wrap {
  position: relative !important;
  display: inline-block !important;
  flex: 0 0 auto !important;
}
.radio-wrap .radio-btn-wrap .radio-btn-checkmark {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 1.5rem !important;
  height: 1.5rem !important;
  /* Both the input and the checkmark span are absolute-positioned over
   * the same 24x24 area; the checkmark sits later in DOM and would
   * otherwise paint above the input and intercept clicks. Disable
   * pointer events on the visual ring so the click goes through to the
   * input. */
  pointer-events: none !important;
}
.radio-wrap .radio-btn-wrap .radio-btn-checkmark:after {
  pointer-events: none !important;
}
/* Ensure the input itself stays above the checkmark in the stacking
 * order and accepts pointer events. */
.radio-wrap .radio-btn-wrap .radio-btn {
  z-index: 1 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}
/* Selected-dot pseudo for the unprefixed radio: vendor sets dot to
 * 1.25rem with `top: 10px; left: 10px` which (combined with our 24px
 * ring) places the dot's top-left at (10,10) and overflows the ring
 * down-right. Shrink to 0.75rem and center on the ring. */
.radio-wrap .radio-btn-wrap input:checked ~ .radio-btn-checkmark:after {
  width: 0.75rem !important;
  height: 0.75rem !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
}

/* Privacy-checkbox row breathing room. Vendor stacks the row with
 * `.digit-privacy-checkbox { margin-top: -1.5rem; margin-bottom: -2.5rem }`
 * + `.digit-privacy-checkbox-align { margin-top: -1.5rem !important }`,
 * which yanks the "I agree" line up underneath the field above it (Subhashini
 * flagged this on the employee login). Reset to a small positive gap so the
 * row reads as its own block. The ::#65 click-eat fix moved the submit button
 * into its own stacking layer, so the negative margin no longer protects
 * the button hit-area — safe to drop. */
.digit-privacy-checkbox,
.digit-privacy-checkbox-align {
  margin-top: 0.75rem !important;
  margin-bottom: 0 !important;
}

/* Login submit button hit-area (closes egovernments/CCRS#443 sub-9).
 *
 * The PrivacyComponent sibling rendered just above the submit button has
 * `.digit-privacy-checkbox { margin-bottom: -2.5rem }` — exactly the
 * button height — combined with `.digit-privacy-checkbox-align
 * { position: relative !important }`. Because the privacy row is
 * positioned and the button is static, CSS paints the positioned
 * sibling above the static one regardless of DOM order, so the lower
 * ~2.5rem of the privacy row overlays the upper portion of the button
 * and intercepts pointer events. Promote the button into its own
 * stacking layer so it sits above the privacy row across the whole
 * rendered area.
 */
.loginCardClassName button[type="submit"],
.login-form-container button[type="submit"],
.bannerCard button[type="submit"] {
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.loginCardClassName button[type="submit"] *,
.login-form-container button[type="submit"] *,
.bannerCard button[type="submit"] * {
  pointer-events: none;
}

/* ─── v3 designer-1:1 surgical overrides ──────────────────────────────────
 *
 * These rules wire CSS vars introduced for the v3 schema (designer's New
 * System spreadsheet) to elements whose upstream rules either hard-coded
 * a hex or collapsed two distinct semantic roles onto one var. Each block
 * cites the designer's role from the spreadsheet so the rationale is
 * traceable. Loaded after the vendored CSS, so wins by cascade — !important
 * is reserved for selectors where upstream rules have higher specificity
 * (e.g. ".citizen .sidebar .sidebar-link.active" is .2.0 specificity).
 */

/* Sidebar selected pill — designer's "Sidebar / Selected Background"
 * (Nairobi: #FEC931 yellow). Upstream uses --color-primary-main directly;
 * promotes to a dedicated var so a tenant whose brand color isn't yellow
 * can have a non-brand selected pill. */
.citizen .sidebar .sidebar-link.active,
.citizen .sidebar .dropdown-link.active,
.citizen .sidebar .dropdown-link.active.level-1,
.citizen .sidebar .dropdown-link.active.level-2,
.employee .sidebar .sidebar-link.active,
.digit-side-nav-active,
.digit-side-nav-item.selected,
.digit-side-nav-item.active {
  background-color: var(--color-sidebar-selected-bg, #c84c0e) !important;
  color: var(--color-sidebar-selected-text, #FFFFFF) !important;
}
.citizen .sidebar .sidebar-link.active svg,
.citizen .sidebar .sidebar-link.active svg path,
.employee .sidebar .sidebar-link.active svg,
.employee .sidebar .sidebar-link.active svg path,
.digit-side-nav-item.active svg,
.digit-side-nav-item.active svg path {
  fill: var(--color-sidebar-selected-text, #FFFFFF) !important;
}

/* Sidebar default (non-active) text — designer's "Sidebar / Text Default"
 * (Nairobi: #D1D5DB). Upstream uses #FFF for everything; differentiates
 * active vs idle items. */
.citizen .sidebar .sidebar-link,
.employee .sidebar .sidebar-link,
.digit-side-nav-item:not(.active):not(.selected) {
  color: var(--color-sidebar-text-default, #D1D5DB);
}

/* Primary button hover — designer's "Primary Button / Background Hover"
 * (Nairobi: #E6B800). Upstream often uses theme(colors.primary.dark)
 * which compiles to a literal; this lets a tenant set a distinct hover
 * color (typically a darker shade of brand-default). */
.digit-btn.primary:hover,
.digit-button.primary:hover,
.digit-button-primary:hover,
button.digit-submit-bar:hover,
button[class*="submit-bar"]:hover {
  background-color: var(--color-button-primary-bg-hover, #B8420C) !important;
  color: var(--color-button-primary-text, #FFFFFF) !important;
}

/* Primary button pressed — designer's "Primary Button / Background Pressed"
 * (Nairobi: #CC9F00). Active state during click. */
.digit-btn.primary:active,
.digit-button.primary:active,
.digit-button-primary:active,
button.digit-submit-bar:active,
button[class*="submit-bar"]:active {
  background-color: var(--color-button-primary-bg-pressed, #A03A0A) !important;
}

/* Foreground (text + svg) on primary-2 surfaces. Vendor hardcodes
 * `color: rgba(255,255,255,…)` inside `.digit-button-primary h2` /
 * `.digit-submit-bar h2`, which fails WCAG once MDMS swaps the primary
 * surface to a light brand colour (Nairobi yellow #FEC931).
 *
 * #2038: --color-text-primary was the stand-in for "whatever reads on the
 * brand colour", which only held while the brand was light. Bomet's blue
 * (#2563EB) needs white. Prefer the dedicated --color-button-primary-text
 * (already in the ThemeConfig schema, and already #FFFFFF on the live
 * record) and keep the old body-text value as the fallback, so a theme
 * that never set it behaves exactly as before. */
.digit-button-primary,
.digit-button-primary h2,
.digit-button.primary,
.digit-btn.primary,
button.digit-submit-bar,
button[class*="submit-bar"],
.digit-submit-bar h2 {
  color: var(--color-button-primary-text, var(--color-text-primary, #0B0C0C)) !important;
}
.digit-button-primary svg,
.digit-button-primary svg path,
.digit-submit-bar svg,
.digit-submit-bar svg path,
button.digit-submit-bar svg,
button.digit-submit-bar svg path,
button[class*="submit-bar"] svg,
button[class*="submit-bar"] svg path {
  fill: var(--color-button-primary-text, var(--color-text-primary, #0B0C0C)) !important;
  color: var(--color-button-primary-text, var(--color-text-primary, #0B0C0C)) !important;
}

/* Input focus border — designer's "Inputs / Border Focus" (Nairobi: #204F37,
 * primary-1). Upstream typically uses outline:black; this gives focus a
 * brand-aware ring. */
.digit-text-input input:focus,
.digit-form-input:focus,
input.digit-input-text:focus,
input[type="text"].digit-input:focus,
input[type="email"]:focus,
input[type="password"]:focus,
.digit-employee-form-field input:focus,
.digit-textarea:focus,
textarea.digit-textarea:focus {
  border-color: var(--color-input-border-focus, #c84c0e) !important;
  outline: 2px solid var(--color-input-border-focus, #c84c0e) !important;
  outline-offset: 0 !important;
}

/* Input error border — designer's "Inputs / Border Error" (Nairobi: #C62828,
 * status-error-border). When a field has a validation error class, its
 * border picks up the dedicated error border var. */
.digit-text-input.digit-error input,
.digit-text-input input.error,
.digit-form-error input,
input.digit-input-error,
input[aria-invalid="true"] {
  border-color: var(--color-input-border-error, #D4351C) !important;
}

/* Input placeholder — designer's "Inputs / Placeholder" (Nairobi: #9CA3AF,
 * matches text-disabled). */
.digit-text-input input::placeholder,
.digit-form-input::placeholder,
input.digit-input::placeholder,
textarea.digit-textarea::placeholder {
  color: var(--color-input-placeholder, #9CA3AF);
  opacity: 1;
}

/* Input label — designer's "Inputs / Label" (Nairobi: #4B5563). Upstream
 * uses --color-text-secondary which is too light per designer. */
.digit-text-input label,
.digit-form-field label,
.digit-card-label,
label.digit-form-field-label {
  color: var(--color-input-label, #4B5563);
}

/* Input helper text — designer's "Inputs / Helper" (Nairobi: #6B7280). */
.digit-form-helper-text,
.digit-form-field-helper,
.digit-helper-text,
.digit-input-helper {
  color: var(--color-input-helper, #6B7280);
}

/* Tables hover row — designer's "Tables / Hover" (Nairobi: #FFF4D7,
 * primary-1-bg tint). Replaces upstream rules that use grey-mid or
 * grey-lighter for hover, which doesn't carry brand identity. */
.digit-table tbody tr:hover,
.digit-data-table tbody tr:hover,
table.digit-table-main tbody tr:hover,
.digit-table-row:hover {
  background-color: var(--color-table-hover, #FBEEE8) !important;
  color: var(--color-table-hover-text, var(--color-text-primary, #0B0C0C)) !important;
}

/* Tables selected row — designer's "Tables / Selected" (Nairobi: #FFF4D7). */
.digit-table tbody tr.selected,
.digit-table tbody tr.active,
.digit-data-table tbody tr.selected,
.digit-table-row.selected,
.digit-table-row.active {
  background-color: var(--color-table-selected, #FBEEE8) !important;
  color: var(--color-table-selected-text, var(--color-primary-1, #c84c0e)) !important;
}

/* Tables header — designer's "Tables / Header Background" (Nairobi:
 * #F3F4F6) and "Header Text" (#204F37, primary-1). */
.digit-table thead,
.digit-table thead th,
.digit-data-table thead,
.digit-data-table thead th,
table.digit-table-main thead {
  background-color: var(--color-table-header-bg, #F3F4F6);
}
.digit-table thead th,
.digit-data-table thead th,
table.digit-table-main thead th {
  color: var(--color-table-header-text, var(--color-primary-1, #c84c0e));
}

/* Tables alternate row stripe — designer's "Tables / Alternate Row"
 * (Nairobi: #FAFAFA, page-secondary-bg). */
.digit-table tbody tr:nth-child(even):not(:hover):not(.selected):not(.active),
.digit-data-table tbody tr:nth-child(even):not(:hover):not(.selected):not(.active) {
  background-color: var(--color-table-alt-row, #FAFAFA);
}

/* Tooltip — designer's "Misc / Tooltip Background" (Nairobi: #204F37,
 * primary-1) + "Tooltip Text" (#FFFFFF). Upstream tooltip rules vary
 * across components; this catches the common selectors. */
.digit-tooltip,
.digit-tooltip-content,
[role="tooltip"],
.tippy-box,
.tippy-content {
  background-color: var(--color-tooltip-bg, #22394D) !important;
  color: var(--color-tooltip-text, #FFFFFF) !important;
}

/* Leaflet's own tooltip ships white-on-#222 with a white callout arrow.
 * The box itself is already recolored by the `[role="tooltip"]` rule above
 * (react-leaflet sets that role), but the border and the arrow are drawn by
 * leaflet's own rules and stayed white, leaving a white notch under a navy
 * box. Route all three through the same tokens. */
.leaflet-tooltip {
  background-color: var(--color-tooltip-bg, #22394D) !important;
  border-color: var(--color-tooltip-bg, #22394D) !important;
  color: var(--color-tooltip-text, #FFFFFF) !important;
}
.leaflet-tooltip-top:before {
  border-top-color: var(--color-tooltip-bg, #22394D) !important;
}
.leaflet-tooltip-bottom:before {
  border-bottom-color: var(--color-tooltip-bg, #22394D) !important;
}
.leaflet-tooltip-left:before {
  border-left-color: var(--color-tooltip-bg, #22394D) !important;
}
.leaflet-tooltip-right:before {
  border-right-color: var(--color-tooltip-bg, #22394D) !important;
}

/* Dashboard Add-KPI hover card is not a DIGIT tooltip — keep surface styling. */
.dashboard-add-kpi-preview,
.dashboard-add-kpi-preview.dashboard-root {
  background-color: #ffffff !important;
  color: #1a1917 !important;
}

/* Loader / progress — designer's "Misc / Loader" + "Progress" (both
 * Nairobi: #204F37, primary-1). */
.digit-loader,
.digit-loader-spinner,
.digit-progress-bar-fill,
.digit-progress-fill {
  border-color: var(--color-loader, #c84c0e);
  background-color: var(--color-progress, #c84c0e);
}

/* Status alerts — designer splits Text / Border / Background into three
 * distinct roles (was 2 vars: text+border collapsed into --color-error,
 * --color-success etc.). v3 lets a tenant tint borders darker than text
 * or vice-versa. */
.digit-alert-success .digit-alert-text,
.digit-alert.digit-success-alert,
.digit-toast-success .digit-toast-text {
  color: var(--color-status-success-text, #00703C);
  border-left-color: var(--color-status-success-border, #00703C);
  background-color: var(--color-status-success-bg, #BAD6C9);
}
.digit-alert-error .digit-alert-text,
.digit-alert.digit-error-alert,
.digit-toast-error .digit-toast-text {
  color: var(--color-status-error-text, #D4351C);
  border-left-color: var(--color-status-error-border, #D4351C);
  background-color: var(--color-status-error-bg, #EFC7C1);
}
.digit-alert-warning .digit-alert-text,
.digit-alert.digit-warning-alert,
.digit-toast-warning .digit-toast-text {
  color: var(--color-status-warning-text, #9E5F00);
  border-left-color: var(--color-status-warning-border, #9E5F00);
  background-color: var(--color-status-warning-bg, #FFF4D6);
}
.digit-alert-info .digit-alert-text,
.digit-alert.digit-info-alert,
.digit-toast-info .digit-toast-text {
  color: var(--color-status-info-text, #0057BD);
  border-left-color: var(--color-status-info-border, #0057BD);
  background-color: var(--color-status-info-bg, #C7E0F1);
}

/* Header bar — designer's "Header / Background" (Nairobi: #204F37, primary-1)
 * + "Header / Text" (#FFFFFF). v2 used --color-secondary for navbar bg
 * (which is fine — primary-1 writes there too); this also explicitly sets
 * header text/icon vars so a tenant can theme them without inheriting
 * from header-sidenav. */
.navbar,
.digit-employee-header,
.digit-topbar.light {
  /* bg already inherited from --color-secondary via primary-1 fan-out;
     these overrides apply when the header uses its own bg var instead. */
  background-color: var(--color-header-bg, var(--color-secondary, #22394D));
}
.navbar,
.digit-topbar.light,
.digit-employee-header {
  color: var(--color-header-text, #FFFFFF);
}
.navbar svg,
.navbar svg path,
.digit-topbar.light svg,
.digit-topbar.light svg path,
.digit-employee-header svg,
.digit-employee-header svg path {
  fill: var(--color-header-icon, var(--color-header-text, #FFFFFF));
}

/* Page surfaces — designer's "Page / Background" (#FFFFFF) +
 * "Page / Secondary Background" (#FAFAFA). Set on the root document so
 * nothing requires bg overrides per-page. */
html, body {
  background-color: var(--color-page-bg, #FFFFFF);
  color: var(--color-text-primary, #0B0C0C);
}

/* ─── SVG fill / stroke override ──────────────────────────────────────────
 *
 * Upstream SVG icon components (packages/svg-components and inline JSX
 * paths) hard-code DIGIT-brand hex values as `fill="#c84c0e"` on <path>
 * / <circle> / <rect> elements. That's a presentation attribute with
 * specificity 0,0,0 — any CSS rule that matches the element overrides it.
 *
 * Mapping the canonical DIGIT defaults to their v3 CSS vars makes those
 * SVG icons themable without editing a single SVG file. Tenants whose
 * v3 record sets a non-orange brand color get themed icons automatically.
 *
 * Case-insensitive attribute match (`i` flag, CSS Selectors Level 4 —
 * supported in all modern browsers since 2018) handles both #c84c0e
 * and #C84C0E. Only canonical 6-digit hex matches; alpha-suffixed
 * variants like `#c84c0e80` are deliberately untouched (they signal an
 * intentional partial-opacity tint, not a primary fill).
 *
 * Each rule covers fill AND stroke so icons that use stroke for their
 * outline (line icons rather than filled glyphs) follow theme too.
 */

/* DIGIT primary-main (#c84c0e) → v3 primary-2 / button-primary */
[fill="#c84c0e" i],
[fill="#C84C0E" i] {
  fill: var(--color-primary-2, var(--color-primary-main, #c84c0e));
}
[stroke="#c84c0e" i],
[stroke="#C84C0E" i] {
  stroke: var(--color-primary-2, var(--color-primary-main, #c84c0e));
}

/* DIGIT primary-dark (#C8602B) → v3 primary-1 (the dominant brand) */
[fill="#C8602B" i] {
  fill: var(--color-primary-1, var(--color-primary-dark, #C8602B));
}
[stroke="#C8602B" i] {
  stroke: var(--color-primary-1, var(--color-primary-dark, #C8602B));
}

/* DIGIT primary-accent (#F47738) — orange-ish accent, often the
 * notification bell, status alert glyphs, info chevrons. Maps to v3
 * primary-2 since the designer collapsed accent into the secondary brand. */
[fill="#F47738" i],
[fill="#f47738" i] {
  fill: var(--color-primary-2, var(--color-primary-accent, #F47738));
}
[stroke="#F47738" i],
[stroke="#f47738" i] {
  stroke: var(--color-primary-2, var(--color-primary-accent, #F47738));
}

/* DIGIT primary-light (#F18F5E) — lighter accent variant. */
[fill="#F18F5E" i] {
  fill: var(--color-primary-2, var(--color-primary-light, #F18F5E));
}

/* DIGIT secondary (#22394D) → v3 header-bg path / primary-1 */
[fill="#22394D" i],
[fill="#22394d" i] {
  fill: var(--color-primary-1, var(--color-secondary, #22394D));
}
[stroke="#22394D" i],
[stroke="#22394d" i] {
  stroke: var(--color-primary-1, var(--color-secondary, #22394D));
}

/* DIGIT digitv2 header-sidenav (#0B4B66) — same role as secondary in v3. */
[fill="#0B4B66" i],
[fill="#0b4b66" i] {
  fill: var(--color-primary-1, var(--color-digitv2-header-sidenav, #0B4B66));
}

/* DIGIT text-primary (#0B0C0C) → v3 text-primary */
[fill="#0B0C0C" i],
[fill="#0b0c0c" i] {
  fill: var(--color-text-primary, #0B0C0C);
}
[stroke="#0B0C0C" i],
[stroke="#0b0c0c" i] {
  stroke: var(--color-text-primary, #0B0C0C);
}

/* DIGIT text-secondary (#505A5F) */
[fill="#505A5F" i],
[fill="#505a5f" i] {
  fill: var(--color-text-secondary, #505A5F);
}

/* DIGIT error (#D4351C) → v3 status-error */
[fill="#D4351C" i],
[fill="#d4351c" i] {
  fill: var(--color-status-error-text, var(--color-error, #D4351C));
}
[stroke="#D4351C" i],
[stroke="#d4351c" i] {
  stroke: var(--color-status-error-border, var(--color-error, #D4351C));
}

/* DIGIT error-dark (#B91900) — same role as error in v3. */
[fill="#B91900" i],
[fill="#b91900" i] {
  fill: var(--color-status-error-text, var(--color-error-dark, #B91900));
}

/* DIGIT success (#00703C) → v3 status-success */
[fill="#00703C" i],
[fill="#00703c" i] {
  fill: var(--color-status-success-text, var(--color-success, #00703C));
}
[stroke="#00703C" i],
[stroke="#00703c" i] {
  stroke: var(--color-status-success-border, var(--color-success, #00703C));
}

/* DIGIT link-normal (#1D70B8) → v3 button-tertiary-text / link */
[fill="#1D70B8" i],
[fill="#1d70b8" i] {
  fill: var(--color-button-tertiary-text, var(--color-link-normal, #1D70B8));
}
[stroke="#1D70B8" i],
[stroke="#1d70b8" i] {
  stroke: var(--color-button-tertiary-text, var(--color-link-normal, #1D70B8));
}

/* DIGIT link-hover (#003078) */
[fill="#003078" i] {
  fill: var(--color-link-hover, #003078);
}

/* ─── v3 polish layer — ports Figma's design rules ────────────────────────
 *
 * Goal: make the deployed UI feel as restrained and intentional as the
 * designer's Figma — clean typography, generous whitespace (already present
 * upstream — preserved), soft shadows, smooth interaction transitions,
 * brand-aware focus rings, and unified employee + citizen design language.
 *
 * Strict scope: pure CSS, targeted selectors, no architecture change. No
 * layout-altering rules (padding/margin/width) so existing component
 * widths and grids stay intact. Only color, typography weight/spacing,
 * shadow, transition.
 *
 * Each rule cites the Figma decision it implements.
 */

/* 1. Default anchor color — Figma: links are dark-green primary-1, never
 *    browser-blue and never primary-2 yellow. The navbar/sidebar override
 *    below pulls them back to white where the bg is dark. */
a:not(.digit-button):not(.button) {
  color: var(--color-button-tertiary-text, var(--color-link-normal, #204F37));
  text-decoration: none;
  transition: color 0.15s ease-out, opacity 0.15s ease-out;
}
a:not(.digit-button):not(.button):hover {
  color: var(--color-link-hover, var(--color-button-tertiary-text, #204F37));
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 2. Navbar / employee header — Figma: dark-green bg, WHITE everything
 *    inside (logo, links, icons, dropdown chevrons). Upstream uses
 *    --color-text-primary which becomes invisible on dark green. */
.navbar,
.navbar a, .navbar span, .navbar div,
.digit-employee-header,
.digit-employee-header a, .digit-employee-header span, .digit-employee-header div,
.digit-topbar.light, .digit-topbar.light *,
.digit-topbar:not(.dark) {
  color: var(--color-header-text, #FFFFFF);
}
.navbar svg, .navbar svg path, .navbar svg circle, .navbar svg rect,
.digit-employee-header svg, .digit-employee-header svg path,
.digit-employee-header svg circle, .digit-employee-header svg rect,
.digit-topbar.light svg, .digit-topbar.light svg path {
  fill: var(--color-header-icon, var(--color-header-text, #FFFFFF));
}

/* Navbar layout — citizen `.navbar` is `display:block` and its single child
 * `.center-container.back-wrapper` is `inline-flex` (width:fit-content), so
 * the logo + language-dropdown cluster on the left and the entire right
 * side of the navbar shows as empty dark green. Make navbar a flex row and
 * stretch its children to full width so `justify-content:space-between`
 * actually pushes the language picker to the far right. */
.navbar {
  display: flex;
  align-items: center;
}
.navbar > .center-container,
.navbar > .back-wrapper,
.navbar > .center-container.back-wrapper {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Navbar language dropdown — upstream ships the trigger with bg:white,
 * which inside the dark-green navbar paints a white pill that clashes
 * with the brand. The text inside is also white (per .navbar color rule
 * above), so the trigger reads as a blank white box. Make it transparent
 * with a thin border-bottom so it still reads as a control, and ensure
 * the open menu has dark text on white. */
.navbar .language-dropdown,
.navbar .digit-dropdown-select-wrap.language-dropdown,
.navbar .digit-dropdown-select-wrap.language-dropdown .digit-dropdown-select {
  background-color: transparent !important;
  color: var(--color-header-text, #FFFFFF) !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4) !important;
  border-radius: 0;
}
.navbar .language-dropdown .header-dropdown-label,
.navbar .language-dropdown .header-dropdown-arrow,
.navbar .language-dropdown svg, .navbar .language-dropdown svg path {
  color: var(--color-header-text, #FFFFFF) !important;
  fill: var(--color-header-text, #FFFFFF) !important;
}
/* Open dropdown menu — dark text on white so options are legible.
 * Citizen language picker uses .header-dropdown-options / .header-dropdown-option
 * (not .digit-dropdown-options-card). Cover both, since the navbar's
 * `.navbar * { color: white }` rule above otherwise leaks into the menu
 * and renders the option labels white-on-white. */
.navbar .header-dropdown-options,
.navbar .digit-dropdown-options-card,
.navbar .language-dropdown + .digit-dropdown-options-card {
  background-color: #FFFFFF !important;
  border: 1px solid var(--color-card-border, #E5E7EB) !important;
  border-radius: 4px;
  box-shadow: 0 4px 12px -2px rgba(16, 24, 40, 0.10),
              0 2px 4px -2px rgba(16, 24, 40, 0.06) !important;
  overflow: hidden;
  z-index: 1000;
}
.navbar .header-dropdown-options,
.navbar .header-dropdown-option,
.navbar .header-dropdown-option *,
.navbar .digit-dropdown-options-card .digit-dropdown-options-item,
.navbar .digit-dropdown-options-card p {
  color: var(--color-text-primary, #363636) !important;
  background-color: #FFFFFF !important;
}
.navbar .header-dropdown-option:hover,
.navbar .header-dropdown-option:hover * {
  background-color: var(--color-primary-1-bg, #FFF4D7) !important;
  color: var(--color-primary-1, #204F37) !important;
  cursor: pointer;
}

/* The popup container `.header-dropdown-menu` is `position:fixed` with
 * `left: <trigger-x>px` set by vendor JS, anchoring it under its
 * trigger. That overflows the viewport when the trigger sits near the
 * right edge (citizen language picker, employee user-menu, etc.).
 *
 * Position clamping is handled in index.html — a MutationObserver
 * adjusts `left` after vendor sets it, keeping the popup's right edge
 * 16px inside the viewport. That works dynamically for any future
 * header layout (e.g. if the configurator removes a trigger), unlike
 * a static `right: 16px` that would overlap multiple triggers.
 *
 * CSS here only handles cosmetics. */
html .header-dropdown-menu {
  background-color: #FFFFFF !important;
  border: 1px solid var(--color-card-border, #E5E7EB);
  border-radius: 4px;
  box-shadow: 0 4px 12px -2px rgba(16, 24, 40, 0.10),
              0 2px 4px -2px rgba(16, 24, 40, 0.06);
  overflow: hidden;
  /* Size to content with sensible bounds — vendor's fixed 248px width
   * overshoots short option lists like "English / SWAHILI" or
   * "Edit Profile / Logout". */
  width: max-content !important;
  min-width: 160px !important;
  max-width: 280px !important;
}
/* Hide the search input — these popups are tiny option lists (2-3
 * items), search is noise. */
html .header-dropdown-menu input[type="text"],
html .header-dropdown-menu .digit-search-wrapper,
html .header-dropdown-menu .header-dropdown-search-container {
  display: none !important;
}

/* 3. Card surfaces — Figma: white card, soft 1px border, subtle dual-layer
 *    shadow for elevation, smooth hover lift. Box-shadow only — does NOT
 *    touch padding/margin/width to avoid layout regressions. */
.digit-card, .employeeCard, .card,
.citizen-home-card, .CitizenHomeCard,
.digit-card-container,
[class*="home-card"]:not([class*="card-text"]) {
  border: 1px solid var(--color-card-border, #E5E7EB);
  border-radius: 6px;
  box-shadow: 0 1px 2px 0 rgba(16, 24, 40, 0.04),
              0 1px 1px 0 rgba(16, 24, 40, 0.02);
  transition: box-shadow 0.18s ease-out, transform 0.18s ease-out;
}
/* Hover lift only on cards that are actually CTAs (clickable cards
 * like CitizenHomeCard tile). Form-cards / dashboard tiles have
 * interactive children (links, buttons) and the parent-card lift
 * fires when you hover those children, making the whole card bob up
 * — tonally jumpy. Keep lift only for cards that wrap a top-level
 * action (.CitizenHomeCard, [class*="home-card"]) and skip the
 * generic .digit-card / .employeeCard. */
.CitizenHomeCard:hover,
[class*="home-card"]:not([class*="card-text"]):hover {
  box-shadow: 0 4px 6px -1px rgba(16, 24, 40, 0.06),
              0 2px 4px -2px rgba(16, 24, 40, 0.04);
}

/* Sidebar item readability — vendor renders .menu-label at rgb(95,92,98)
 * gray on white background (~3.8:1 contrast — fails WCAG AA). Bump to
 * text-primary and add font-weight 500. Also unify hover behavior so
 * the entire row gets a tint + underline regardless of whether the row
 * is wrapped in an <a> (Home, Citizen Complaint Resolution System) or
 * sits as a bare <span class="menu-item"> (Edit Profile, Logout, HELPLINE).
 *
 * Implementation note: vendor's .menu-item is `display:inline` so a
 * background on it only paints around the SVG icon line — leaves a
 * "colored square" around the icon and the label sticking out un-tinted.
 * Force display:flex so the hover bg covers the full 187x48 row. */
.SideBarStatic .menu-label,
.sidebar-list .menu-label,
[class*="SideBar"] .menu-label {
  color: var(--color-text-primary, #363636);
  font-weight: 500;
  transition: color 0.15s ease-out;
}
.SideBarStatic .menu-item,
.sidebar-list .menu-item {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.15s ease-out;
}
/* Vendor ships icons at varying sizes (Home is a 24x24 svg, Citizen
 * Complaint Resolution is 35x39 viewBox squashed to ~10x21, Edit Profile
 * is 18x18 …). Force a fixed 20x20 box so all rows have the same
 * icon footprint and labels start at the same X. */
.SideBarStatic .menu-item > svg,
.SideBarStatic .menu-item > img.icon,
.sidebar-list .menu-item > svg,
.sidebar-list .menu-item > img.icon {
  width: 20px !important;
  height: 20px !important;
  flex: 0 0 20px;
  object-fit: contain;
  /* Vendor adds margin-top:12px on the icon for inline flow alignment.
   * With flex parent + align-items:center, that extra margin offsets
   * the icon below the label's text-center. Zero it out. */
  margin: 0 !important;
}
/* Vendor sets `.menu-label { margin-left: 36px; line-height: 48px }`.
 * The 36px gap is too wide and the 48px line-height makes the label
 * box 48px tall which throws off vertical alignment with the 20px icon
 * even though the flex parent has align-items:center. Reset to natural
 * line-height so flex centering actually centers visually. */
.SideBarStatic .menu-item .menu-label,
.sidebar-list .menu-item .menu-label {
  margin-left: 12px !important;
  line-height: 1.5 !important;
  height: auto !important;
}

/* Status pill polish — vendor renders `.status-highlight` with no
 * horizontal padding (the tinted bg crowds the label) and font-weight
 * 400 so OPEN/CLOSED don't have the weight a status indicator needs.
 * Add 8px horizontal padding so the bg has breathing room around the
 * label, bump weight to 600, and tighten letter-spacing slightly so
 * the all-caps text reads cleanly. */
.status-highlight,
.status-highlight.success {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.status-highlight p,
.status-highlight.success p {
  padding: 0 !important;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Header dropdown menus (.header-dropdown-menu) — both citizen and
 * employee surfaces. Vendor renders option text as white because the
 * containing topbar (.navbar / .digit-employee-header) sets `color:
 * white` on all descendants. Once the popup opens with white bg, the
 * white option labels become invisible. Force dark text inside the
 * menu regardless of which app or topbar opened it. */
html .header-dropdown-menu,
html .header-dropdown-menu *,
html .header-dropdown-options,
html .header-dropdown-options *,
html .header-dropdown-option,
html .header-dropdown-option * {
  color: var(--color-text-primary, #363636) !important;
}
html .header-dropdown-menu input,
html .header-dropdown-menu input::placeholder {
  color: var(--color-text-primary, #363636) !important;
}
html .header-dropdown-option:hover,
html .header-dropdown-option:hover * {
  background-color: var(--color-primary-1-bg, #FFF4D7) !important;
  color: var(--color-primary-1, #204F37) !important;
  cursor: pointer;
}

/* Employee surface vertical rhythm —
 *
 * Vendor stacks `.main.digit-home-main { padding-top:80px; margin-top:16px }`
 * + `.employee-app-wrapper { margin-top:70px }` for a total of ~166px of
 * empty space above the content, even though the fixed topbar is only
 * 72px tall. That shoves every page below a big top gap and pushes the
 * footer down to where it overlaps the fixed `.digit-action-bar` at the
 * bottom of the viewport.
 *
 * Tighten the top gap to the header height plus one gap unit, and add bottom
 * padding equal to the action bar's typical 72px height so the page can
 * scroll past the action bar without the footer hiding behind it.
 *
 * Derived from --employee-header-h rather than restated: the literal 88px
 * here was computed from the vendor's 72px bar, but the employee block later
 * in this file pins the bar to its own height, so the two had already drifted
 * apart by 16px. */
.main.digit-home-main {
  padding-top: calc(var(--employee-header-h, 56px) + var(--employee-header-gap, 16px)) !important;
  margin-top: 0 !important;
}
.employee-app-wrapper.digit-home-app-wrapper {
  margin-top: 0 !important;
  padding-bottom: 16px;
}
/* The fixed `.digit-action-bar-wrap` (h:72px, position:fixed, bottom:0)
 * sits at the viewport bottom and covers anything in the bottom 72px.
 * The footer is below the form in the document flow, so when the user
 * scrolls all the way down, the footer ends up under the action bar.
 *
 * Add a 72px bottom margin on the footer so the body's scroll length
 * extends 72px past the footer — at scroll-bottom the footer sits ABOVE
 * the fixed action bar, fully visible. The 16px form padding-bottom
 * (above) keeps the form's tail close to the footer. */
.employee-home-footer,
.citizen-home-footer {
  margin-bottom: 72px;
}

/* Employee sidebar item icon fallback — vendor's React component
 * leaves `<span class="icon">` empty when the menu item's MDMS config
 * doesn't declare an iconUrl/iconName. Without an icon, the selected
 * yellow indicator bar reads as a blank colored rectangle.
 *
 * The employee dashboard only mounts ONE sidebar item by default
 * (Home), so paint a home icon as a CSS mask on any empty `.icon`
 * inside a sidebar item. mask-image lets the glyph pick up
 * sidebar-icon white via background-color, so it works on the yellow
 * selected indicator and the dark green non-selected items alike. */
.digit-sidebar-item .icon:empty {
  background-color: var(--color-sidebar-selected-text, #FFFFFF);
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/></svg>");
  -webkit-mask-size: 20px 20px;
  mask-size: 20px 20px;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.digit-sidebar-item.selected .icon:empty {
  background-color: var(--color-sidebar-selected-text, #FFFFFF);
}

/* Tertiary button label — vendor renders `.digit-button-teritiary
 * .digit-button-label` (note vendor's typo) at primary-main yellow,
 * but per the v3 designer spec a tertiary button reads as a TEXT
 * action and should use --color-button-tertiary-text (primary-1
 * green). Affects employee card-link CTAs like "Create Complaint",
 * "Search Complaint", "Manage Master Data", etc. */
html .digit-button-teritiary .digit-button-label,
html [class*="teritiary"] .digit-button-label,
html [class*="tertiary"] .digit-button-label {
  color: var(--color-button-tertiary-text, var(--color-primary-1, #204F37)) !important;
}
html .digit-button-teritiary svg path:not([fill="none"]),
html [class*="teritiary"] svg path:not([fill="none"]),
html [class*="tertiary"] svg path:not([fill="none"]) {
  fill: var(--color-button-tertiary-text, var(--color-primary-1, #204F37)) !important;
}

/* Suppress duplicate `.digit-topbar` header on /pgr/create-complaint/*
 * surfaces. Vendor mounts `.digit-topbar` (white bg, position:fixed,
 * z-index:9999999) on top of the existing dark-green `.navbar` so the
 * file-complaint flow suddenly shows a white "Powered by DIGIT" bar
 * instead of the green navbar that every other citizen surface uses.
 * Hide the second header so the consistent navbar shows through.
 *
 * IMPORTANT: scope to citizen-only via `:not(.digit-employee-header)`
 * — the employee surfaces use `.digit-topbar.digit-employee-header.light`
 * as their PRIMARY (and only) header, hiding it leaves them with no
 * topbar at all. */
html .digit-topbar:not(.digit-employee-header) {
  display: none !important;
}
/* When wrapped in an <a>, kill the anchor's underline so the row reads
 * as a button. The :hover label rule below adds underline back. */
.sidebar-list a {
  text-decoration: none !important;
}
.SideBarStatic .menu-item:hover,
.sidebar-list .menu-item:hover,
.sidebar-list a:hover .menu-item {
  background-color: var(--color-page-secondary-bg, #FAFAFA);
}
.SideBarStatic .menu-item:hover .menu-label,
.sidebar-list .menu-item:hover .menu-label,
.sidebar-list a:hover .menu-item .menu-label {
  color: var(--color-primary-1, #204F37);
  text-decoration: underline;
  text-underline-offset: 2px;
}
/* Sidebar SVGs ship with a transparent backing rect (path d="M0 0h24v24H0z"
 * fill="none") that defines the viewBox padding. Filling all paths makes
 * the rect render as a solid square covering the actual icon glyph behind
 * it. Skip paths whose fill is explicitly "none". */
.SideBarStatic .menu-item:hover svg path:not([fill="none"]),
.sidebar-list .menu-item:hover svg path:not([fill="none"]),
.sidebar-list a:hover .menu-item svg path:not([fill="none"]) {
  fill: var(--color-primary-1, #204F37) !important;
}
.SideBarStatic .menu-item:hover svg,
.sidebar-list .menu-item:hover svg,
.sidebar-list a:hover .menu-item svg {
  fill: var(--color-primary-1, #204F37);
}

/* ----------------------------------------------------------------------
 * Layout tokens (2026-05-06) — single source of truth for the topbar /
 * page-footer heights so v2 components subtracting them have one knob to
 * adjust. Used by the v2 ScreenContainer (form column height) and
 * CitizenSidebar (sidebar height = viewport − topbar − page-footer).
 *
 * Topbar = 82px (vendor `.citizen .main { padding-top: 82px }`, so
 * everything below the topbar starts 82px down from the viewport top).
 * Footer = 38px (10px top padding + 1.25em logo + 1px border ≈ 38px on
 * the .citizen-home-footer rule below).
 *
 * The .citizen .main override that follows pins the container's
 * available content area to exactly `100vh - topbar - footer`, so the
 * v2 sidebar (height: 100vh - topbar - footer) and the v2 ScreenContainer
 * (same calc) align flush — sidebar bottom and FormFooter (Cancel/Next)
 * land on the same y-line, just above "Powered by DIGIT".
 * -------------------------------------------------------------------- */
:root {
  /* The footer renders 40px tall (see the `.citizen-home-footer` rules); at
   * 38 every page sized from this overran the window by 2px and grew a
   * scrollbar for nothing. */
  --v2-page-footer-height: 40px;
  /* The citizen layout's own name for the top bar height. Citizens now get
   * the shared bar (#2038 review), so this follows --employee-header-h
   * rather than restating a number that drifted twice before (82px, 56px). */
  --v2-topbar-height: var(--employee-header-h, 76px);
}

/* Vendor sets `.citizen .main { padding-top: 82px; min-height: calc(100vh - 90px) }`.
 * The `100vh - 90` content min-height plus the 82px padding makes the
 * .main border-box span `100vh - 8px` — way more than the actual room
 * between topbar and page footer (100vh - 82 - 38 = 100vh - 120). That
 * extra ~30+ pixels is dead space *inside* .main below our v2 children,
 * which then forces the page footer past the viewport (global scroll).
 *
 * Override: shrink .main's content min-height so its content-area height
 * matches the v2 child height calc exactly. Sidebar bottom and FormFooter
 * both land on the page-footer top with zero gap and no scroll.
 *
 * !important is needed because vendor's `.citizen .main` rule sets
 * min-height with the same specificity — last-rule-wins isn't reliable
 * across CSS load order, and this is a pure layout correction. */
.citizen .main.center-container.citizen-home-container,
.main.center-container.citizen-home-container:has(> aside.v2-scope) {
  min-height: calc(
    100vh - var(--v2-topbar-height, 82px) - var(--v2-page-footer-height, 38px)
  ) !important;
}

/* "Powered by DIGIT" centres on the content column, as it does on employee
 * pages, whose footer sits inside the rail-inset `.main`. The citizen footer
 * is a full-width sibling of the page that runs under the fixed rail, so it
 * is inset by the rail's width (the page's own left and right gutters are
 * equal, so this is the column's centre) and travels with the rail. Only
 * where a rail is mounted: the signed-out pages have none. */
@media (min-width: 48rem) {
  html[data-sidebar-pinned] .citizen > .citizen-home-footer {
    padding-left: calc(var(--app-rail-w) + 16px) !important;
    transition: padding-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

/* Sidebar modernization moved out of CSS — see
 * `packages/digit-ui-components-v2/src/components/layout/citizen-sidebar.tsx`.
 * The legacy `<StaticCitizenSideBar>` wrapper is no longer mounted on the
 * citizen routes (replaced by `<CitizenSidebar>`); pre-existing
 * `.SideBarStatic` rules above are retained because the employee surface
 * still mounts that component. */

/* ----------------------------------------------------------------------
 * Citizen footer modernization (2026-05-06)
 *
 * Vendor footer is just a centered "Powered by DIGIT" with no
 * separator and inconsistent padding. Add a soft top divider, balance
 * vertical rhythm, and constrain the logo to a sensible size on desktop.
 * -------------------------------------------------------------------- */
.citizen-home-footer {
  /* Theme-aware: borders use --color-border, surface uses
   * --color-page-bg (both already defined in vendor digit-ui-css). */
  border-top: 1px solid var(--color-border, #d6d5d4);
  background-color: var(--color-page-bg, #fafafa);
  /* Zero bottom padding (was 14px) — the logo line itself is the floor of
   * the page; any further space below it just pushed the citizen page
   * past the viewport. Top padding stays so the logo gets some breathing
   * room from the divider. */
  padding: 10px 16px 0 16px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--color-text-secondary, #505a5f);
}
.citizen-home-footer img {
  height: 1.25em !important;
  width: auto !important;
  display: block;
  opacity: 0.85;
  transition: opacity 0.15s ease-out;
}
.citizen-home-footer img:hover {
  opacity: 1;
}
/* `.citizen-home-container` ships with `mb-25` (margin-bottom: 25px),
 * which left a 25px void between the form area and the page footer —
 * pushed the footer below the viewport on otherwise short pages. Zero it
 * out so the footer sits flush against the form column. */
.citizen-home-container.mb-25 {
  margin-bottom: 0 !important;
}

/* The citizen page footer ships with `margin-bottom: 72px` (rule above —
 * legacy reservation for the fixed `.digit-action-bar-wrap`). On v2
 * citizen surfaces there's no action bar; the 72px just inflates the
 * page past the viewport and forces a global scroll. Zero it out on
 * citizen routes so total = topbar(82) + main(100vh-120) + footer(38) =
 * exactly 100vh, no scroll, page footer flush at viewport bottom. */
.citizen .citizen-home-footer {
  margin-bottom: 0 !important;
}

/* Yellow-CTA text colour — vendor renders the label inside primary
 * buttons via varied tags depending on the atom: `<h2 class="digit-
 * button-label">`, `<header>` (in the InboxSearchComposer's Search
 * atom), or a bare `<span>`. Each carries its own hardcoded
 * `color: #fff` and reads white-on-yellow on Search / Submit / Save
 * buttons. Force every yellow-bg CTA AND every descendant element to
 * honour `--color-text-primary` so the label reads as the tenant's
 * configured body text colour (#363636 on naipepea). */
.digit-button-primary,
.digit-button-primary *,
button.submit-bar,
button.submit-bar *,
button.digit-submit-bar,
button.digit-submit-bar *,
button[class*="submit-bar"],
button[class*="submit-bar"] *,
.digit-formcomposer-submitbar,
.digit-formcomposer-submitbar * {
  /* #2038: same swap as the block above — the label on a primary button
   * follows --color-button-primary-text, not the page's body-text colour. */
  color: var(--color-button-primary-text, var(--color-text-primary, #0B0C0C)) !important;
}

/* Sidebar rows in the v2 CitizenSidebar (Edit Profile / Logout / Helpline
 * are rendered as <button class="v2-sidebar-row">) inherit the global
 * "any non-tertiary button gets a card-like shadow on hover + a 0.5px
 * press translate" rule from a few hundred lines above. That makes the
 * three action rows lift on hover while the <Link>-rendered Home / module
 * rows above don't, breaking visual parity. Both effects are zeroed
 * unconditionally on the row class so nav rows stay flat regardless of
 * element type. */
.v2-sidebar-row,
.v2-sidebar-row:hover,
.v2-sidebar-row:active,
.v2-sidebar-row:focus,
.v2-sidebar-row:focus-visible {
  box-shadow: none !important;
  transform: none !important;
}

/* `.pgr-citizen-wrapper` — fills the available content width via
 * `flex: 1 1 auto` (citizen-home-container gives it 100vw - sidebar)
 * but takes its natural height. Page scrolls if content runs long.
 * The form card / dropdown popouts must NOT be clipped — see the
 * overflow:visible rules just below. */
.citizen .pgr-citizen-wrapper {
  margin-top: 0 !important;
  min-width: 0;
  flex: 1 1 auto;
  /* No `min-height` — the form card stays at content height. Dropdown
   * listboxes can extend past the card / footer / wrapper boundary
   * because nothing in the chain clips them. */
}
/* Defensive overflow: visible chain so a long dropdown listbox can
 * spill out past the form boundary instead of triggering an internal
 * scrollbar inside the wrapper. */
.citizen .pgr-citizen-wrapper,
.citizen .pgr-citizen-wrapper > .v2-scope,
.citizen .pgr-citizen-wrapper .digit-card-component {
  overflow: visible !important;
}

/* File-complaint location step — disabled boundary dropdowns + pincode
 * input show auto-filled values from the map. The default v2 disabled
 * styling drops the trigger opacity to 50%, which makes a populated
 * County / Sub-County / Ward read as if it were *empty*. Override:
 * keep full opacity so the resolved values stay legible, and use a
 * subtle off-white surface + muted border + not-allowed cursor as the
 * "this is read-only" cue instead. */
.citizen .pgr-citizen-wrapper button[role="combobox"]:disabled,
.citizen .pgr-citizen-wrapper input:disabled {
  opacity: 1 !important;
  background-color: rgba(0, 0, 0, 0.025) !important;
  border-color: var(--color-border, #d6d5d4) !important;
  color: var(--color-text-primary, #0B0C0C) !important;
  cursor: not-allowed !important;
}
.citizen .pgr-citizen-wrapper button[role="combobox"]:disabled span {
  color: var(--color-text-primary, #0B0C0C) !important;
}

/* Placeholder text on v2 inputs / textareas across the citizen flow
 * was reading too dark on first glance — a half-typed-looking gray.
 * Drop it to a soft 35% black so it's clearly hint text vs entered
 * value. Scoped to .v2-scope so it doesn't leak to legacy inputs. */
.v2-scope input::placeholder,
.v2-scope textarea::placeholder {
  color: rgba(0, 0, 0, 0.35) !important;
  opacity: 1 !important;
}

/* Employee login password wrapper — drive the focus border on the
 * outer wrapper (which contains the input + eye-toggle button) via
 * `:focus-within`, so focusing the input lights up the whole frame
 * uniformly. The previous behaviour saw a partial focus border
 * stopping at the eye SVG because the unified focus rule was
 * targeting the input element directly. */
.v2-password-input-wrap:focus-within {
  border-color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
}
.v2-password-input-wrap.is-invalid:focus-within {
  border-color: var(--color-error, #d4351c) !important;
}
/* The inner password input + the eye-toggle button must never paint
 * their own focus ring or border — only the wrapper does. Higher-
 * specificity wrapper-scoped selectors so the global vendor `:focus`
 * rule (which paints `outline: 2px solid <brand>`) doesn't peek
 * through and draw a green vertical line where the input meets the
 * eye SVG. */
.v2-password-input-wrap .v2-login-password-input,
.v2-password-input-wrap .v2-login-password-input:focus,
.v2-password-input-wrap .v2-login-password-input:focus-visible,
.v2-password-input-wrap .v2-login-password-input:focus-within,
.v2-password-input-wrap .v2-password-toggle,
.v2-password-input-wrap .v2-password-toggle:focus,
.v2-password-input-wrap .v2-password-toggle:focus-visible {
  outline: 0 !important;
  outline-width: 0 !important;
  outline-style: none !important;
  outline-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* react-data-table-component pagination footer — its native
 * `<select>` (rows per page) was inheriting the unified 44px /
 * 12px-padded chrome and ending up as a tall 42×46 box with the
 * native chevron stuck at the top and the value floated underneath.
 * Reset to compact: ~28px tall, minimal padding, auto width — back
 * to the native dropdown look the data-table expects. */
.rdt_Pagination select {
  height: auto !important;
  min-height: 0 !important;
  /* Native `<select>` chevrons render inside the right-padding zone,
   * so padding-right must be wide enough (≈22px) to clear the value
   * text. Earlier 6px was tight and the chevron sat on top of "10". */
  padding: 2px 22px 2px 8px !important;
  font-size: 0.875rem !important;
  line-height: 1.25 !important;
  background-color: var(--v2-surface-color, var(--color-surface, #ffffff)) !important;
  border: 1px solid var(--color-border, #d6d5d4) !important;
  border-radius: 4px !important;
  /* Let the browser draw the native chevron in the right-padding gap. */
}

/* ======================================================================
 * Toast styling — unified across `.toast-*` (legacy
 * digit-ui-react-components) and `.digit-toast-*` (newer
 * digit-ui-components). Tester (CCRS#498) flagged:
 *   - close icon invisible on the right
 *   - outer red box / inner green box (severity mismatch)
 *   - complaint-create warning toast inconsistent with the rest
 *
 * Single source of severity colour: solid bg per severity, white
 * label + white icons (status + close), single 4px radius, no inner
 * outlined chips.
 * ==================================================================== */
.toast-success,
.digit-toast-success,
[class*="toast-error"],
[class*="toast-warning"],
[class*="toast-info"],
.digit-toast-success.digit-error,
.digit-toast-success.digit-warning,
.digit-toast-success.digit-info {
  border: 0 !important;
  border-radius: 6px !important;
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.18) !important;
  color: #ffffff !important;
}
/* Severity-driven backgrounds — consistent across both component
 * generations. */
.toast-success,
.digit-toast-success:not(.digit-error):not(.digit-warning):not(.digit-info) {
  background-color: var(--color-success, #00703C) !important;
}
.digit-toast-success.digit-error,
.toast-error,
[class*="toast-error"]:not([class*="toast-error-icon"]) {
  background-color: var(--color-error-dark, var(--color-error, #B91900)) !important;
}
.digit-toast-success.digit-warning,
.toast-warning,
[class*="toast-warning"]:not([class*="toast-warning-icon"]) {
  background-color: var(--color-warning-dark, var(--color-warning, #9E5F00)) !important;
}
.digit-toast-success.digit-info,
.toast-info,
[class*="toast-info"]:not([class*="toast-info-icon"]) {
  background-color: var(--color-info-dark, var(--color-info, #0057BD)) !important;
}

/* All SVG icons inside any toast — status icon + close button —
 * read white on the colour band. The legacy "inner box outlined
 * green" the tester saw was the success-icon chip retaining its
 * own background; reset every nested element to transparent so the
 * toast surface is one solid colour band. */
.toast-success svg,
.toast-success svg path,
.toast-success svg circle,
.toast-success svg rect,
.digit-toast-success svg,
.digit-toast-success svg path,
.digit-toast-success svg circle,
.digit-toast-success svg rect,
[class*="toast-error"] svg,
[class*="toast-error"] svg path,
[class*="toast-warning"] svg,
[class*="toast-warning"] svg path,
[class*="toast-info"] svg,
[class*="toast-info"] svg path {
  fill: #ffffff !important;
  color: #ffffff !important;
}
/* ...but paths explicitly marked fill="none" (e.g. the (x) close button and
 * viewbox-padding shapes) must STAY transparent — otherwise the white fill
 * above turns them into solid white boxes (#883/#923). */
.toast-success svg path[fill="none"],
.digit-toast-success svg path[fill="none"],
[class*="toast-error"] svg path[fill="none"],
[class*="toast-warning"] svg path[fill="none"],
[class*="toast-info"] svg path[fill="none"] {
  fill: none !important;
}
/* Inner chips / boxes inside the toast (the source of the
 * outline mismatch) — make them transparent. */
.toast-success > div,
.digit-toast-success > div,
.toast-success .toast-message,
.digit-toast-success .digit-toast-sub-container {
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #ffffff !important;
}
/* Close button — bigger hit area + visible icon. The vendor close
 * was white-on-white in some variants because the close-button
 * background ate the icon colour. Force everything visible and
 * give the button a 32×32 hit area with a subtle hover overlay. */
.toast-close-btn,
.digit-toast-close-btn,
button[class*="toast-close"],
[class*="toast"] button[aria-label*="close" i],
[class*="toast"] button[aria-label*="dismiss" i] {
  background: transparent !important;
  border: 0 !important;
  padding: 6px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 4px !important;
  width: 32px !important;
  height: 32px !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
  color: #ffffff !important;
  opacity: 1 !important;
  transition: background-color 0.15s ease-out !important;
}
.toast-close-btn:hover,
.digit-toast-close-btn:hover,
button[class*="toast-close"]:hover,
[class*="toast"] button[aria-label*="close" i]:hover {
  background-color: rgba(255, 255, 255, 0.18) !important;
}
.toast-close-btn svg,
.digit-toast-close-btn svg,
button[class*="toast-close"] svg,
[class*="toast"] button[aria-label*="close" i] svg {
  width: 18px !important;
  height: 18px !important;
  fill: #ffffff !important;
  color: #ffffff !important;
}
/* Toast label / heading text always white, never dark on the
 * colour band. */
.toast-success h2,
.digit-toast-success h2,
.toast-success .toast-label,
.digit-toast-success .toast-label,
[class*="toast-error"] h2,
[class*="toast-error"] .toast-label,
[class*="toast-warning"] h2,
[class*="toast-warning"] .toast-label,
[class*="toast-info"] h2,
[class*="toast-info"] .toast-label {
  color: #ffffff !important;
  margin: 0 !important;
}

/* Topbar profile dropdown menu (Edit Profile + Logout) — vendor
 * `.navbar svg { fill: white }` paints every SVG inside the navbar,
 * which leaks into the popped-open dropdown menu where the
 * background is white and white-on-white renders the icons
 * invisible. Re-tint icons inside the menu to the same colour the
 * menu text uses. */
.header-dropdown-menu svg,
.header-dropdown-menu svg path,
.header-dropdown-menu svg circle,
.header-dropdown-menu svg rect,
.header-dropdown-options svg,
.header-dropdown-options svg path,
.header-dropdown-options svg circle,
.header-dropdown-options svg rect {
  fill: var(--color-text-primary, #363636) !important;
  color: var(--color-text-primary, #363636) !important;
}

/* Rating-star buttons on /citizen/pgr/rate — strip every vendor button
 * affordance (box-shadow on hover, focus ring, default bg). Only the
 * star icon's color/fill should react to hover; the button frame
 * stays invisible. */
.v2-rating-star,
.v2-rating-star:hover,
.v2-rating-star:active,
.v2-rating-star:focus,
.v2-rating-star:focus-visible {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  transform: none !important;
}

/* `.back-btn2` ships with `margin-bottom: 16px` from vendor; we used to
 * zero it because the wrapper was a flex column. With global scroll back
 * the 16px is fine — restore vendor default by leaving this block empty
 * (kept for documentation; the rule itself is removed). */

/* ----------------------------------------------------------------------
 * v2 Citizen complaint timeline.
 *
 * The legacy <ConnectingCheckPoints>/<CheckPoint> markup is preserved so
 * status-specific subcomponents (Resolved, Rejected, PendingAtLME, etc.)
 * keep wiring up their action buttons (Reopen / Rate / call-LME). We
 * just re-skin the existing `.checkpoint`, `.checkpoint-done`,
 * `.checkpoint-connect`, and `.checkpoint-comments-wrap` classes when
 * they appear inside a `.v2-timeline` wrapper to match the rest of the
 * modernized citizen surface — smaller dots, theme-aware fill, tidy
 * comment/photo card, brighter typography, no 18px override.
 * -------------------------------------------------------------------- */
.v2-timeline {
  position: relative;
  padding: 4px 0 0 0;
}
.v2-timeline .checkpoint-connect-wrap {
  padding-bottom: 24px !important;
}
.v2-timeline .checkpoint,
.v2-timeline .checkpoint-done {
  align-items: flex-start;
  gap: 16px;
}
/* Dots — smaller (12px), pixel-aligned with the connector line. The
 * latest event (`.checkpoint-done`) gets the tenant primary fill;
 * historical events keep a calmer secondary tint so the eye lands on
 * the most recent status first. */
.v2-timeline .checkpoint-done h2,
.v2-timeline .checkpoint h2 {
  width: 14px !important;
  height: 14px !important;
  margin-top: 6px !important;
  border-width: 2px !important;
  border-style: solid !important;
  border-radius: 9999px !important;
  flex-shrink: 0 !important;
  box-shadow: 0 0 0 3px var(--v2-surface-color, var(--color-surface, #ffffff));
}
.v2-timeline .checkpoint-done h2 {
  background-color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
  border-color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
}
.v2-timeline .checkpoint h2 {
  background-color: var(--color-surface, #ffffff) !important;
  border-color: var(--color-border, #d6d5d4) !important;
}
/* Connector line — thinner, in border color, aligned to dot center. */
.v2-timeline .checkpoint-connect {
  margin-left: 6px !important;
  margin-top: 18px !important;
  border-left-width: 2px !important;
  border-left-color: var(--color-border, #e5e7eb) !important;
}
/* Header text inside each event — undo the legacy 18px blanket sizing,
 * give the latest event a heavier weight. */
.v2-timeline .checkpoint-done header,
.v2-timeline .checkpoint header {
  margin-left: 0 !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  flex: 1;
  min-width: 0;
}
.v2-timeline .checkpoint-done header > :first-child {
  font-weight: 600;
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e));
  font-size: 0.95rem;
}
.v2-timeline .checkpoint header > :first-child {
  font-weight: 500;
  color: var(--color-text-heading, #363636);
}
.v2-timeline header p {
  font-size: 0.8125rem !important;
  color: var(--color-text-secondary, #6B7280) !important;
  margin: 4px 0 0 0 !important;
  line-height: 1.4 !important;
}
/* Comment / attachment box — soft v2 surface instead of the legacy grey
 * block. Sits as a calm card under the status header. */
.v2-timeline .checkpoint-comments-wrap,
.v2-timeline .TLComments {
  background-color: var(--v2-surface-color, var(--color-surface, #ffffff)) !important;
  border: 1px solid var(--color-border, #e5e7eb) !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  margin-top: 8px !important;
  max-width: 640px;
}
.v2-timeline .checkpoint-comments-wrap h4,
.v2-timeline .TLComments h3,
.v2-timeline .TLComments h4 {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: var(--color-text-secondary, #6B7280) !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 4px 0 !important;
  line-height: 1.4 !important;
}
.v2-timeline .checkpoint-comments-wrap p,
.v2-timeline .TLComments p {
  font-size: 0.875rem !important;
  color: var(--color-text-heading, #363636) !important;
  margin: 0 !important;
  line-height: 1.5 !important;
}

/* Logout popup sizing — vendor `.digit-popup-wrapper` only caps width
 * (`max-width: 51%`) inside `@media (min-width: 48rem)`. On mobile no
 * cap applies → the wrapper fills the entire viewport (looks like a
 * page takeover, not a yes/no question). Above 48rem the 51% cap is
 * also tuned for full-page admin popups, so for the small logout
 * confirm it reads way too narrow vs. its natural content height.
 *
 * Re-cap by media query so the modal looks like a calm centred card
 * on every viewport. Scoped to the LogoutDialog's stable
 * `digit-logout-popup-wrapper` class so other digit popups (employee
 * admin forms etc.) keep their existing sizing. */
/* Width is pinned (min/max equal) so vendor rules — `.digit-logout-
 * popup-wrapper { width: 31.25rem }`, `.digit-popup-wrapper { width: 100% }`,
 * the small-screen `width: 100%` clamp at 600px — can't pull the
 * card to a different size mid-render. Height stays content-driven. */
@media (max-width: 47.99rem) {
  .digit-popup-overlay .digit-popup-wrapper.digit-logout-popup-wrapper {
    width: min(420px, calc(100vw - 32px)) !important;
    min-width: min(420px, calc(100vw - 32px)) !important;
    max-width: min(420px, calc(100vw - 32px)) !important;
    max-height: none !important;
    height: auto !important;
    border-radius: 10px !important;
    margin: 0 !important;
  }
}
@media (min-width: 48rem) {
  .digit-popup-overlay .digit-popup-wrapper.digit-logout-popup-wrapper {
    width: 520px !important;
    min-width: 520px !important;
    max-width: 520px !important;
    max-height: none !important;
    height: auto !important;
    border-radius: 10px !important;
  }
}

/* Vendor's PopUp ships with very generous internal padding (header
 * ~48px, body ~212px just for one sentence, footer ~128px). For the
 * yes/no logout confirm that's overkill — the modal ends up looking
 * "too long". Tighten each section's height/padding so the card hugs
 * its actual content. */
.digit-popup-wrapper.digit-logout-popup-wrapper .digit-popup-header {
  padding: 18px 20px 8px 20px !important;
  min-height: 0 !important;
  height: auto !important;
}
.digit-popup-wrapper.digit-logout-popup-wrapper .digit-popup-children-wrap {
  padding: 4px 20px 16px 20px !important;
  min-height: 0 !important;
  height: auto !important;
  font-size: 0.9375rem !important;
  line-height: 1.5 !important;
}
.digit-popup-wrapper.digit-logout-popup-wrapper .digit-popup-footer {
  padding: 8px 20px 18px 20px !important;
  min-height: 0 !important;
  height: auto !important;
  gap: 8px !important;
}

/* v2 employee login card — make the top tenant + DIGIT-secondary logos
 * read at a confident size (legacy was ~50% wide / ~18-22px tall — too
 * small inside the modernised card). Scoped to the v2 wrapper so other
 * surfaces (legacy login, language-selection, banners) keep their
 * existing sizing. */
.v2-employee-login-top-logos .bannerHeader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 !important;
}
.v2-employee-login-top-logos .bannerHeader .bannerLogo {
  width: auto !important;
  height: 56px !important;
  max-height: 56px !important;
  object-fit: contain;
}
.v2-employee-login-top-logos .bannerHeader .svgHeaderLogo {
  height: 40px !important;
  width: auto !important;
  max-height: 40px !important;
  object-fit: contain;
}
.v2-employee-login-top-logos .bannerHeader > span {
  color: var(--color-border, #d6d5d4) !important;
  font-weight: 300 !important;
  font-size: 2rem !important;
  line-height: 1 !important;
}

/* PrivacyComponent inside the v2 login card — vendor's
 * `.digit-privacy-checkbox` ships with negative margins
 * (`margin-top: -1.5rem; margin-bottom: -2.5rem`) tuned for the legacy
 * FormComposerV2 spacing. Inside our v2 card they collide with
 * surrounding fields. Reset them, tighten typography, and align the
 * checkbox + "Privacy Policy" link button on one line. */
.v2-scope .digit-privacy-checkbox,
.v2-scope .digit-privacy-checkbox-align {
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.v2-scope .digit-privacy-checkbox label,
.v2-scope .digit-privacy-checkbox .digit-checkbox-container,
.v2-scope .digit-privacy-checkbox .label {
  /* Same 0.875rem as the field labels and "Forgot password?" (#2038). */
  font-size: 0.875rem !important;
  color: var(--color-text-secondary, #6B7280) !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  align-items: center;
}
.v2-scope .digit-privacy-checkbox .digit-checkbox-container {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
}
/* The real <input> is opacity:0 but still in flow, so it reserves a ~16px
 * slot ahead of the drawn box and the checkbox lands 16px right of the
 * field column. Take it out of flow (still on top of the box, so it stays
 * the click target) and the box starts on the same left edge as every
 * input, the submit button and "Forgot password?" (#2038). */
.v2-scope .digit-privacy-checkbox .digit-checkbox-container > input[type="checkbox"],
.v2-scope .digit-privacy-checkbox .digit-checkbox-container .input-emp[type="checkbox"] {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  vertical-align: middle;
}
/* 24px is a tick the size of the sentence next to it. 18px sits with the
 * 0.875rem label instead of shouting over it. */
.v2-scope .digit-privacy-checkbox .digit-custom-checkbox,
.v2-scope .digit-privacy-checkbox .digit-custom-checkbox-emp {
  margin-left: 0 !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  flex: 0 0 18px !important;
}
.v2-scope .digit-privacy-checkbox .digit-custom-checkbox svg,
.v2-scope .digit-privacy-checkbox .digit-custom-checkbox-emp svg {
  width: 18px !important;
  height: 18px !important;
}
.v2-scope .digit-privacy-checkbox button.digit-button-link,
.v2-scope .digit-privacy-checkbox .digit-button-link,
.v2-scope .digit-privacy-checkbox button[class*="link"] {
  margin: 0 !important;
  padding: 0 !important;
  /* #2038: one size for every piece of text on this row, and the link wears
   * the clickable colour rather than primary-1 (which is now the navy the
   * top bar uses, and must never be a text colour). */
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: var(--color-button-tertiary-text, var(--color-link-normal, #2563EB)) !important;
  background: transparent !important;
  box-shadow: none !important;
  height: auto !important;
  min-height: 0 !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.v2-scope .digit-privacy-checkbox button.digit-button-link:hover,
.v2-scope .digit-privacy-checkbox .digit-button-link:hover,
.v2-scope .digit-privacy-checkbox button[class*="link"]:hover {
  box-shadow: none !important;
  transform: none !important;
  background: transparent !important;
}

/* "Forgot password" — same `:not([class*="link"])` guard the global
 * button hover-shadow rule uses doesn't catch our `.v2-forgot-pw`,
 * so the link picks up a card-like shadow on hover. Strip it. */
.v2-forgot-pw,
.v2-forgot-pw:hover,
.v2-forgot-pw:active,
.v2-forgot-pw:focus,
.v2-forgot-pw:focus-visible {
  box-shadow: none !important;
  transform: none !important;
  background: transparent !important;
}
.v2-forgot-pw:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ----------------------------------------------------------------------
 * Mobile-friendly tweaks for every modernised v2 surface (≤768px).
 *
 * Goals:
 *   - Form columns shouldn't pin a fixed `100vh - X - Y` height — that
 *     calc was tuned for a desktop topbar+breadcrumb stack and on a
 *     mobile keyboard breaks the layout (form too short, fields hidden
 *     under the soft keyboard). Switch to `min-height: auto` so the
 *     form flows naturally and the page scroll handles overflow.
 *   - Cards / dropdowns / inputs go full-width (max-width: 100%).
 *   - Page-header padding tightens.
 *   - Action bars (`Cancel` / `Submit` row) stack vertically with
 *     full-width buttons so each tap target stays comfortable.
 *   - The fixed `.digit-action-bar-wrap` clears the page footer.
 * -------------------------------------------------------------------- */
@media (max-width: 47.99rem) {
  /* Drop fixed-height calcs — let content flow */
  .v2-employee-create-complaint,
  .v2-workbench-manage-master {
    height: auto !important;
    overflow: visible !important;
  }
  .v2-employee-create-complaint .digit-card-component {
    overflow-y: visible !important;
  }

  /* Tighten page-level padding */
  .v2-employee-page-header,
  .v2-employee-landing-header {
    padding: 0.75rem 1rem 0.5rem 1rem !important;
  }
  .v2-employee-landing-header h1,
  .v2-employee-page-header h1 {
    font-size: 1.25rem !important;
  }

  /* Workbench search + grid full-width */
  .v2-workbench-manage-master .mdms-search-bar-container,
  .v2-workbench-manage-master .mdms-search-bar-container .digit-text-input-field,
  .v2-workbench-manage-master .mdms-search-input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    padding-left: 12px !important;
    padding-right: 12px !important;
    margin: 0 !important;
  }
  /* Back-to-modules button — stop stretching the label, restore a
   * compact pill-sized button. */
  .v2-workbench-manage-master .master-details-container > button:first-child {
    width: auto !important;
    align-self: flex-start;
    padding: 8px 16px !important;
    font-size: 0.875rem !important;
    height: 36px !important;
    margin-bottom: 12px !important;
  }
  /* Section heading "<MODULE> - WBH_MASTERS" — vendor's
   * `.digit-card-header` defaults are oversized on mobile. */
  .v2-workbench-manage-master .module-cards-header .digit-card-header,
  .v2-workbench-manage-master .master-details-header .digit-card-header,
  .v2-workbench-manage-master .module-cards-header h2,
  .v2-workbench-manage-master .master-details-header h2 {
    font-size: 0.95rem !important;
    line-height: 1.35 !important;
    word-break: break-word;
    text-transform: none;
  }
  .v2-workbench-manage-master .module-cards-header,
  .v2-workbench-manage-master .master-details-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  /* Center the single-column grid on mobile so the card sits with
   * symmetric padding on both sides instead of overflowing the right
   * edge / hugging the left. */
  .v2-workbench-manage-master .module-cards-container,
  .v2-workbench-manage-master .master-details-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .v2-workbench-manage-master .module-cards-grid,
  .v2-workbench-manage-master .master-cards-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: calc(100vw - 32px);
    margin: 0 auto !important;
    justify-items: stretch;
  }
  .v2-workbench-manage-master .module-card,
  .v2-workbench-manage-master .master-card {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Employee landing — single full-width column on mobile.
   * Specificity bumped via the `.digit-home-ground` ancestor so this
   * rule wins over the desktop `.employee .digit-landing-page-wrapper`
   * rule lower in the file (cascade tie-breaks by source order
   * otherwise; the desktop rule was thus stealing 360px columns on
   * mobile and overflowing the viewport). */
  .employee .digit-home-ground .digit-landing-page-wrapper,
  .employee .digit-home-employee-app .digit-landing-page-wrapper,
  .employee .digit-landing-page-wrapper {
    grid-template-columns: 1fr !important;
    padding: 12px !important;
  }
  .employee .digit-landing-page-card {
    padding: 16px !important;
  }

  /* Employee create-complaint — form fields full-width */
  .v2-employee-create-complaint button[role="combobox"],
  .v2-employee-create-complaint .digit-dropdown-employee-select-wrap,
  .v2-employee-create-complaint .digit-dropdown-master,
  .v2-employee-create-complaint .digit-dropdown-master-active,
  .v2-employee-create-complaint .digit-card-component .relative,
  .v2-employee-create-complaint ul[role="listbox"] {
    max-width: 100% !important;
  }
  .v2-employee-create-complaint .digit-card-component {
    padding: 16px !important;
    margin: 0 !important;
  }
  /* Action bar stacks the buttons full-width but stays content-tall.
   * Earlier `flex: 1 1 100%` on children made the submit button grow
   * vertically too (the action bar is `flex-direction: column`, so
   * flex-grow stretches on the cross-axis), giving a 103px-tall
   * SUBMIT. Use `width: 100%` + `flex: 0 0 auto` so the button keeps
   * its 40px height. */
  .v2-employee-create-complaint .digit-action-bar-wrap {
    flex-direction: column !important;
    flex-wrap: wrap;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: 8px;
    padding: 12px !important;
    height: auto !important;
    min-height: 0 !important;
  }
  .v2-employee-create-complaint .digit-action-bar-wrap > * {
    flex: 0 0 auto !important;
    width: 100% !important;
  }
  .v2-employee-create-complaint .digit-submit-bar,
  .v2-employee-create-complaint button[class*="submit-bar"] {
    width: 100% !important;
    max-width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    flex: 0 0 auto !important;
  }
  /* Page header — align the heading to the same x as the form card
   * (16px viewport gutter, no extra inner padding). */
  .v2-employee-create-complaint .v2-employee-page-header {
    padding: 0.75rem 16px 0.5rem 16px !important;
  }
  .v2-employee-create-complaint .digit-card-component {
    margin-left: 16px !important;
    margin-right: 16px !important;
    padding: 16px !important;
  }

  /* Citizen sidebar already hides via Tailwind `md:flex` — ensure the
   * citizen-home-container collapses gracefully when sidebar is gone. */
  .citizen-home-container > .v2-scope:not(aside) {
    width: 100% !important;
    flex: 1 1 100% !important;
  }
  /* Citizen v2 surfaces — relax fixed heights so keyboards don't
   * truncate the form column. */
  .pgr-citizen-wrapper,
  .citizen .pgr-citizen-wrapper {
    height: auto !important;
    min-height: calc(
      100vh - var(--v2-topbar-height, 82px) - var(--v2-page-footer-height, 38px)
    );
  }

  /* Employee chrome — lower padding on the breadcrumb and cards */
  .employee .digit-bread-crumb {
    padding: 0 12px !important;
  }
}

/* The Hamburger drawer (`.digit-msb-sidebar`) ships with `min-width:
 * 17.5rem` and no `max-width`. When the user expands a parent item
 * with children (e.g. "Modules"), the wider child labels push the
 * sidebar past 17.5rem — making the drawer balloon mid-interaction.
 * Cap the width so submenu reveal stays in place. `min(17.5rem, 90vw)`
 * keeps it usable on very narrow screens too. Inner items take
 * `max-width: 100%` and `word-break` so long module names wrap inside
 * the locked column instead of stretching it. */
.digit-msb-sidebar {
  min-width: min(17.5rem, 90vw) !important;
  max-width: min(17.5rem, 90vw) !important;
  width: min(17.5rem, 90vw) !important;
}
.digit-msb-sidebar .digit-msb-item-label,
.digit-msb-sidebar .digit-inner-level-child,
.digit-msb-sidebar .digit-msb-item-child-wrapper {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ----------------------------------------------------------------------
 * Citizen mobile sidebar (drawer) — re-skinned to match the v2 desktop
 * sidebar. Vendor ships `.citizen .sidebar` with a dark-green
 * (`--color-digitv2-header-sidenav` = #0B4B66) bg and white text/svg.
 * On mobile that creates a jarring switch from the white v2 desktop
 * sidebar to a green legacy drawer. Override the surface, text, and
 * active-state colours so the mobile drawer reads as v2 too.
 *
 * Scoped to `.citizen .sidebar` so the employee (admin) chrome is
 * unaffected — that surface still uses the legacy dark theme.
 * -------------------------------------------------------------------- */
.citizen .sidebar {
  background: var(--v2-surface-color, var(--color-surface, #ffffff)) !important;
  color: var(--color-text-heading, #363636) !important;
  border-right: 1px solid var(--color-border, #d6d5d4) !important;
}
.citizen .sidebar svg,
.citizen .sidebar .sidebar-link svg,
.citizen .sidebar .sidebar-link svg path {
  fill: var(--color-text-secondary, #6B7280) !important;
}
.citizen .sidebar .sidebar-link {
  color: var(--color-text-heading, #363636) !important;
}
.citizen .sidebar .sidebar-link:hover {
  background-color: var(--color-primary-selected-bg, #FFF4D7) !important;
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
}
.citizen .sidebar .sidebar-link:hover svg,
.citizen .sidebar .sidebar-link:hover svg path {
  fill: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
}
.citizen .sidebar .sidebar-link.active {
  background-color: var(--color-primary-selected-bg, #FFF4D7) !important;
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
}
.citizen .sidebar .sidebar-link.active svg,
.citizen .sidebar .sidebar-link.active svg path {
  fill: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
}
.citizen .sidebar .search-icon-wrapper,
.citizen .sidebar .sidebar-link .search-icon-wrapper {
  border-color: var(--color-border, #d6d5d4) !important;
}
.citizen .sidebar .search-icon-wrapper svg,
.citizen .sidebar .search-icon-wrapper svg path {
  fill: var(--color-text-secondary, #6B7280) !important;
}
/* Hamburger / drawer overlay backdrop — keep neutral dim instead of green tint. */
.citizen .sidebar .actions,
.citizen .sidebar .actions .tooltip {
  color: inherit !important;
}

/* ----------------------------------------------------------------------
 * Employee chrome — re-skinned to match the modernized citizen surface
 * (v2 desktop), so an admin moving between citizen + employee tabs sees
 * the same calm white-on-brand language. Scoped to `.employee` so the
 * citizen surfaces aren't double-affected.
 *
 *  - Topbar: pin to 56px (was 72), bigger logos.
 *  - Sidebar (`.digit-sidebar`): legacy ships dark-green / dark-primary;
 *    swap to white surface, brand-tinted hover/active rows + icons,
 *    keep the collapsed 48px / expanded 240px width behaviour.
 *  - Footer (`.employee-home-footer`): zero the legacy 72px reservation,
 *    soft top divider, theme-aligned text colour.
 * -------------------------------------------------------------------- */

/* Topbar height + larger logos.
 *
 * 76px, up from 56px (#2038 review: "make top navbar 1.3-1.5 times taller").
 * That is 1.36x, and the number is not only about presence: the logo below is
 * 44px, so a 56px bar left it 6px of air top and bottom and the lockup read as
 * jammed against both edges. At 76px it gets 16px, which is the same rhythm
 * the rest of the employee chrome uses.
 *
 * Declared once as a custom property because three rules have to agree: this
 * height, and the content offset further down. They did not agree before —
 * the offset was computed from the vendor's 72px bar that this very block had
 * already overridden to 56px, so every employee page carried 32px of dead
 * space above its content instead of the 16px the comment claimed. */
:root {
  /* 64px, as in the design; it was 76px while the crest sat in a full-height
   * rail's head, which had to share the bar's height. */
  --employee-header-h: 64px;
  /* Breathing room between the fixed bar and the first content. */
  --employee-header-gap: 16px;
}
@media (max-width: 30rem) {
  /* Vendor drops to 3.5rem here and vertical space is scarcer than presence
   * on a phone, so this takes a smaller lift than the desktop bar. */
  :root { --employee-header-h: 64px; }
}
:is(.employee, .citizen) .digit-topbar,
:is(.employee, .citizen) .digit-topbar.digit-employee-header {
  height: var(--employee-header-h) !important;
  min-height: var(--employee-header-h) !important;
  align-items: center !important;
  /* Vertical padding is symmetric so `align-items: center` actually centres;
   * the bar is a fixed height, so these only bound the children. */
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  /* Vendor asks for 2.5rem (40px) of side gutter, which was set against a
   * short bar with small logos and now reads as the brand floating in the
   * middle of the strip rather than anchored to the edge. 24px lines the
   * lockup up closer to the 48px nav rail below it and gives the action
   * cluster on the right the same margin. */
  padding-left: 24px !important;
  padding-right: 24px !important;
}
@media (max-width: 47.99rem) {
  :is(.employee, .citizen) .digit-topbar,
  :is(.employee, .citizen) .digit-topbar.digit-employee-header {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}
/* Topbar logos — sized per CCRS#562 ("logos are the wrong size and hard to
 * read"), then corrected in the #2038 review.
 *
 * 44px was compensating for a defect rather than being a real size. The eGov
 * asset was an 800x800 canvas holding a 800x200 wordmark on transparency, so
 * a 44px box rendered 11px of actual wordmark and three quarters of nothing.
 * Both lockups are cropped to their wordmark now (see TopBar.js), which means
 * the declared height is finally the height you see. 28px, because the mark
 * it sits beside is often a small square badge — Bomet ships a 2251x2251
 * crest rendered at 38px — and a 4:1 wordmark at any greater height reads as
 * the primary brand on someone else's deployment. Still two and a half times
 * the wordmark that was actually visible before the crop.
 *
 * The wrapper has to stop constraining it. Vendor pins
 * `.digit-logo-ulb-wrapper` to a fixed 2rem, which was sized for the old
 * short bar; an image taller than that overflowed an inline box and sat 11px
 * off centre. Letting both wrapper and slot size to their content is what
 * actually centres the lockup, rather than nudging it with margins. */
:is(.employee, .citizen) .digit-topbar .digit-logo-ulb-wrapper,
:is(.employee, .citizen) .digit-topbar .digit-logo-ulb-wrapper .digit-topbar-logo {
  height: auto !important;
  max-height: none !important;
  display: flex !important;
  align-items: center !important;
}
:is(.employee, .citizen) .digit-topbar .digit-header-logo-img {
  height: 28px !important;
  width: auto !important;
  max-height: 28px !important;
  max-width: 180px !important;
  display: block !important;
}
/* The tenant mark sat 4.7px low for the same reason the eGov one did, by a
 * different route: it is an `display:inline` image on a text baseline, so its
 * block reserved descender space underneath it — a 38px image in a 41.7px
 * box. Taking it out of inline flow removes the phantom descender, which is
 * what actually centres it; nudging it with a margin would only have hidden
 * the gap at this one font size. */
:is(.employee, .citizen) .digit-topbar img.state,
:is(.employee, .citizen) .digit-topbar .digit-topbar-ulb img,
:is(.employee, .citizen) .digit-topbar .digit-logo-ulb-wrapper img.state {
  height: 38px !important;
  max-height: 38px !important;
  width: auto !important;
  display: block !important;
}
:is(.employee, .citizen) .digit-topbar .digit-logo-ulb-wrapper .digit-topbar-ulb {
  display: flex !important;
  align-items: center !important;
}
/* Right-side action icons (language switcher, ULB picker, profile,
 * notifications, etc.) — vendor renders 24×24 SVGs that read tiny
 * vs the bumped left-hand logos. Lift to 28px so the topbar feels
 * balanced left-to-right. */
:is(.employee, .citizen) .digit-topbar [class*="header-action"] svg,
:is(.employee, .citizen) .digit-topbar [class*="topbar-action"] svg,
:is(.employee, .citizen) .digit-topbar [class*="topbar-icon"] svg,
:is(.employee, .citizen) .digit-topbar [class*="header-right"] svg,
:is(.employee, .citizen) .digit-topbar [class*="profile"] svg,
:is(.employee, .citizen) .digit-topbar [class*="notification"] svg,
:is(.employee, .citizen) .digit-topbar > div > svg,
:is(.employee, .citizen) .digit-topbar > div > div > svg {
  width: 28px !important;
  height: 28px !important;
}
/* Right-side branding image (`.digit-header-img` — tenant secondary
 * wordmark on naipepea). Same uplift as the left-hand state logo. */
:is(.employee, .citizen) .digit-topbar img.digit-header-img,
:is(.employee, .citizen) .digit-topbar .digit-header-img {
  height: 28px !important;
  max-height: 28px !important;
  width: auto !important;
}

/* Top-right user-initial avatar (`.user-img-txt`) — vendor ships
 * `padding: 10px 15px; border-radius: 50%` which produces an ellipse
 * with the letter resting at the baseline, looking off-center vs the
 * surrounding round shape. Fix: explicit square box + flex centring so
 * the initial sits at the optical centre regardless of letter width.
 * Closes the avatar-centering point on egovernments/CCRS#505. */
.employee .topbar .right .user-img-txt,
:is(.employee, .citizen) .digit-topbar .user-img-txt,
.user-img-txt {
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

/* Topbar profile dropdown — the existing override at L1414 targeted
 * `.header-dropdown-options` (plural), but the vendor emits
 * `.header-dropdown-option` (singular). The plural selector never
 * matched so the white-icon-on-white-menu regression survived. Add
 * the singular form alongside `.header-dropdown-container` and
 * `.header-dropdown-menu` to cover every dropdown surface the
 * vendor renders. Closes the white-icon point on egovernments/CCRS#505. */
.header-dropdown-option svg,
.header-dropdown-option svg path,
.header-dropdown-option svg circle,
.header-dropdown-option svg rect,
.header-dropdown-container svg,
.header-dropdown-container svg path,
.header-dropdown-container svg circle,
.header-dropdown-container svg rect {
  fill: var(--color-text-primary, #363636) !important;
  color: var(--color-text-primary, #363636) !important;
}

/* Employee sidebar — themed surface (matches top navbar / Nairobi theme
 * green) + brand-tinted active state. Uses the legacy `--color-sidebar-*`
 * tokens so a tenant's MDMS theme drives every shade. Falls back to the
 * Nairobi green when a tenant ships nothing. */
:is(.employee, .citizen) .digit-sidebar,
:is(.employee, .citizen) .digit-sidebar.dark {
  background: var(--color-sidebar-bg, var(--color-header-bg, var(--color-primary-1, #204F37))) !important;
  color: var(--color-sidebar-text-default, #D1D5DB) !important;
  border-right: 1px solid var(--color-sidebar-bg, var(--color-border, #d6d5d4)) !important;
}
:is(.employee, .citizen) .digit-sidebar svg,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item svg,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item svg path {
  fill: var(--color-sidebar-icon-default, var(--color-sidebar-text-default, #D1D5DB)) !important;
}
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item .digit-sidebar-link,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item-label {
  color: var(--color-sidebar-text-default, #D1D5DB) !important;
}
/* Sidebar item hover — every state-class combination the vendor
 * emits. Without enumerating `selected` / `parentLevel` /
 * `collapsed` (the classes the live employee sidebar actually
 * carries — verified on https://naipepea.digit.org/digit-ui/employee),
 * a vendor `.digit-sidebar-item.selected:hover { background: white }`
 * rule won the cascade and painted the Home row white-on-white on
 * hover (egov/CCRS#562).
 *
 * Hover bg → yellow-tinted; hover label → dark contrast. The
 * fallback chain `hover-text → primary-1 → sidebar-bg` lands the
 * text at the sidebar's own dark green on naipepea (#204F37) and
 * a sensible brand-toned dark on other tenants. */
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item:hover,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item.selected:hover,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item.parentLevel:hover,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item.parentLevel.selected:hover,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item.collapsed:hover,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item.parentLevel.collapsed:hover {
  background-color: var(--color-sidebar-hover-bg, var(--color-primary-selected-bg, #FFF4D6)) !important;
  color: var(--color-sidebar-hover-text, var(--color-primary-1, var(--color-sidebar-bg, #204F37))) !important;
}
/* Vendor renders the row label as a separate `.item-label` element
 * (NOT `.digit-sidebar-item-label`, despite the surrounding class
 * naming) and gives the `.selected` variant an explicit
 * `color: #ffffff` so the parent's `color` doesn't cascade to it.
 * Force the label to the dark hover colour on hover so the row
 * reads dark-on-yellow instead of white-on-yellow
 * (egov/CCRS#562 follow-up). Both `.item-label` and the legacy
 * `.digit-sidebar-item-label` are covered for defensive parity. */
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item:hover .item-label,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item.selected:hover .item-label,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item.parentLevel:hover .item-label,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item.parentLevel.selected:hover .item-label,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item:active:hover .item-label,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item:hover .digit-sidebar-item-label,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item.selected:hover .digit-sidebar-item-label,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item:hover .digit-sidebar-link,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item.selected:hover .digit-sidebar-link {
  color: var(--color-sidebar-hover-text, var(--color-primary-1, var(--color-sidebar-bg, #204F37))) !important;
}
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item.active,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item-active,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item.selected {
  background-color: var(--color-sidebar-selected-bg, var(--color-primary-1, #c84c0e)) !important;
  color: var(--color-sidebar-selected-text, #FFFFFF) !important;
}
/* SVG icon colours follow the row's foreground via the fallback
 * chain. Hover state matches the dark hover text; idle/selected
 * matches the white selected text. */
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item:hover svg,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item:hover svg path,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item.selected:hover svg,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item.selected:hover svg path,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item.parentLevel.selected:hover svg,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item.parentLevel.selected:hover svg path {
  fill: var(--color-sidebar-hover-text, var(--color-primary-1, var(--color-sidebar-bg, #204F37))) !important;
}
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item.active svg,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item.active svg path,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item-active svg,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item-active svg path,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item.selected svg,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item.selected svg path {
  fill: var(--color-sidebar-selected-text, #FFFFFF) !important;
}
/* Search input inside the expanded sidebar — translucent on dark surface */
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-search-container,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-search-container input {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--color-sidebar-selected-text, #FFFFFF) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-search-container ::placeholder {
  color: var(--color-sidebar-text-default, rgba(255, 255, 255, 0.55)) !important;
}
/* CCRS#1469: typed text was invisible in the sidebar's nav filter.
 *
 * The rules above colour the *input* white for the dark sidebar, but the
 * generic input-standardisation block below (which lists
 * `.digit-text-input-field`) paints TextInput's wrapper solid white. The input
 * itself is transparent, so the painted stack ended up white text on a white
 * wrapper — the filtering worked, you just could not see what you had typed.
 *
 * Keep the wrapper and its inner container transparent so the translucent
 * container behind them shows through and the white text stays legible. */
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-search-container .digit-text-input-field,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-search-container .input-container {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Sidebar position — vendor ships `top: 0`, which parks the rail behind the
 * fixed header. It has to start exactly where the header ends.
 *
 * Derived from --employee-header-h, not restated. It was pinned to a literal
 * 56px, so raising the bar to 76px hid the rail's top 20px behind it and left
 * the column 20px too tall. The literal is why the breakage existed at all. */
:is(.employee, .citizen) .digit-sidebar {
  top: var(--employee-header-h, 56px) !important;
  height: calc(100vh - var(--employee-header-h, 56px)) !important;
  margin-top: 0 !important;
}

/* Employee page footer normalized — `--color-page-bg` resolves to
 * #FFFFFF on naipepea, so a `background: var(--color-page-bg)` rule
 * just made the footer white-on-white. Use an explicit subtle off-white
 * (or pull from the body bg if a tenant overrides it) and leave the
 * border to do the lift. */
.employee .employee-home-footer {
  margin-bottom: 0 !important;
  border-top: 1px solid var(--color-border, #d6d5d4) !important;
  /* Transparent — let the body's #eee tint show through so the footer
   * reads as part of the page bg, not a separate white band hovering
   * over a grey body. Citizen surfaces converge on the same look once
   * a tenant uses the standard light-grey body bg. */
  background-color: transparent !important;
  color: var(--color-text-secondary, #6B7280);
  padding: 10px 16px 0 16px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
}
/* Page bg: match the citizen-page canvas (#eee body-container the
 * legacy stack already sits on). The earlier override forced the
 * employee surface to white which made it look "lighter" than the
 * citizen all-services page; reverting to transparent so the body's
 * #eee tint shows through. */
.employee {
  background-color: transparent !important;
}
.employee .employee-home-footer img {
  height: 1.25em !important;
  width: auto !important;
  display: block;
  opacity: 0.85;
  transition: opacity 0.15s ease-out;
}
.employee .employee-home-footer img:hover {
  opacity: 1;
}

/* ----------------------------------------------------------------------
 * Employee landing page — re-skin `.digit-landing-page-wrapper` +
 * `.digit-landing-page-card` so the module-card grid reads at the same
 * v2 visual cadence as the citizen all-services / module-home grids:
 * white card surface, soft border, brand-tinted module title, light
 * yellow hover tint on the link rows, calmer divider.
 * -------------------------------------------------------------------- */
.employee .digit-landing-page-wrapper {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)) !important;
  gap: 20px !important;
  padding: 16px !important;
}
.employee .digit-landing-page-card,
.employee .digit-card-component.digit-landing-page-card {
  /* White surface. Vendor pins `min-height: 260px` and `padding: 24px` —
   * release both so the card hugs its actual content (icon + title + 2-3
   * link rows, ~140px) rather than reserving space for a banner that
   * doesn't exist on this surface.
   *
   * #2038: the 1px near-black outline and square corners were matched to
   * the old citizen ModuleCard and read as a table cell. A hairline in the
   * card-border token plus a soft lift gives the same separation without
   * drawing a box around everything, and matches the login card. */
  background-color: var(--v2-surface-color, var(--color-surface, #ffffff)) !important;
  border: 1px solid var(--color-card-border, #E5E7EB) !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(8, 20, 40, 0.04), 0 4px 16px rgba(8, 20, 40, 0.06) !important;
  transition: none !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 20px !important;
  gap: 8px !important;
}
/* No hover on the outer card — the row-level affordance below carries
 * the interaction signal. */
.employee .digit-landing-page-card:hover,
.employee .digit-card-component.digit-landing-page-card:hover {
  border-color: var(--color-card-border, #E5E7EB) !important;
  box-shadow: 0 1px 2px rgba(8, 20, 40, 0.04), 0 4px 16px rgba(8, 20, 40, 0.06) !important;
}
.employee .digit-landing-page-card .digit-landingpagecard-icon,
.employee .digit-card-component.digit-landing-page-card .digit-landingpagecard-icon {
  /* Match the citizen ModuleCard icon: yellow glyph on a transparent
   * background. Drop the light-yellow bg circle so the icon reads as
   * a standalone shape (same look as the citizen exclamation icon). */
  background-color: transparent !important;
  color: var(--color-button-primary-bg-default, var(--color-primary-2, #FEC931)) !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.employee .digit-landing-page-card .digit-landingpagecard-icon svg,
.employee .digit-landing-page-card .digit-landingpagecard-icon svg path {
  fill: var(--color-button-primary-bg-default, var(--color-primary-2, #FEC931)) !important;
  height: 36px !important;
  width: 36px !important;
}
.employee .digit-landing-page-card [class*="card-header"],
.employee .digit-landing-page-card .digit-landingpagecard-modulename,
.employee .digit-landing-page-card .ladingcard-moduleName,
.employee .digit-landing-page-card .digit-landingpagecard-headersection h2,
.employee .digit-landing-page-card h2 {
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  line-height: 1.3 !important;
}
/* Hide the light-grey hairline between the module title and the
 * link rows — citizen ModuleCard doesn't render one and the row
 * affordance carries enough visual separation on its own. */
.employee .digit-landingpage-divider,
.employee .digit-landing-page-card .digit-divider {
  display: none !important;
}
/* Link rows inside the card — vendor renders these as
 * `.digit-button-teritiary` (note the typo) tertiary buttons. Reset
 * their chrome to a flat row, give the row light-yellow tint on hover
 * and brand-color text + svg fill — same affordance as the citizen
 * sidebar / dropdown options / module-link rows. */
.employee .digit-landing-page-card a,
.employee .digit-landing-page-card .digit-button-link,
.employee .digit-landing-page-card button[class*="link"],
.employee .digit-landing-page-card button.digit-button-teritiary,
.employee .digit-landing-page-card button[class*="teritiary"],
.employee .digit-landing-page-card button[class*="tertiary"] {
  color: var(--color-text-heading, #363636) !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  transition: background-color 0.15s ease-out, color 0.15s ease-out;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  text-align: left !important;
  justify-content: flex-start !important;
  /* Normal weight, matching the citizen module-card link rows. */
  font-weight: 400 !important;
  font-size: 0.875rem !important;
}
.employee .digit-landing-page-card .icon-label-container,
.employee .digit-landing-page-card .icon-label-container * {
  font-weight: 400 !important;
}
.employee .digit-landing-page-card a:hover,
.employee .digit-landing-page-card .digit-button-link:hover,
.employee .digit-landing-page-card button[class*="link"]:hover,
.employee .digit-landing-page-card button.digit-button-teritiary:hover,
.employee .digit-landing-page-card button[class*="teritiary"]:hover,
.employee .digit-landing-page-card button[class*="tertiary"]:hover {
  background-color: var(--color-primary-selected-bg, #FFF4D7) !important;
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
  box-shadow: none !important;
  transform: none !important;
}
.employee .digit-landing-page-card button.digit-button-teritiary:hover svg,
.employee .digit-landing-page-card button.digit-button-teritiary:hover svg path,
.employee .digit-landing-page-card button[class*="teritiary"]:hover svg,
.employee .digit-landing-page-card button[class*="teritiary"]:hover svg path {
  fill: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
}

/* Match the citizen ModuleCard affordance: hide the legacy leading
 * arrow svg and stamp a trailing chevron-right via ::after so the
 * row reads "Create Complaint  ›" — same shape as citizen's
 * "File a Complaint  ›". */
.employee .digit-landing-page-card button.digit-button-teritiary,
.employee .digit-landing-page-card button[class*="teritiary"] {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  gap: 12px;
}
/* Hide the leading arrow SVG. Vendor wraps it inside
 * `.icon-label-container > svg:first-child`, not as a direct button
 * child — earlier selector missed it and produced two arrows (the
 * leading legacy arrow + my trailing chevron `::after`). */
.employee .digit-landing-page-card button.digit-button-teritiary .icon-label-container > svg,
.employee .digit-landing-page-card button[class*="teritiary"] .icon-label-container > svg,
.employee .digit-landing-page-card button.digit-button-teritiary .icon-label-container svg:first-child,
.employee .digit-landing-page-card button[class*="teritiary"] .icon-label-container svg:first-child {
  display: none !important;
}
.employee .digit-landing-page-card button.digit-button-teritiary::after,
.employee .digit-landing-page-card button[class*="teritiary"]::after {
  content: "\203A"; /* › single right-pointing angle quote */
  font-size: 1.25rem;
  line-height: 1;
  color: var(--color-text-secondary, #6B7280);
  transition: color 0.15s ease-out;
  margin-left: auto;
}
.employee .digit-landing-page-card button.digit-button-teritiary:hover::after,
.employee .digit-landing-page-card button[class*="teritiary"]:hover::after {
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e));
}

/* Page header above the landing grid — matches citizen "All Services"
 * h1. RoleBasedEmployeeHome.js renders `.v2-employee-landing-header`
 * just above the grid; this drives its typography. */
.v2-employee-landing-header,
.v2-employee-page-header {
  padding: 0.75rem 0 0.5rem 0;
}
.v2-employee-landing-header h1,
.v2-employee-page-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  /* Heading ink, not the brand colour. `primary-1` is navy in this palette,
   * and a navy page title is indistinguishable from the blue that means
   * "clickable" — the rest of the employee UI reserves brand for controls
   * and paints every other title with `text-heading` (#2038). */
  color: var(--color-text-heading, #363636);
  line-height: 1.25;
}

/* ----------------------------------------------------------------------
 * Workbench Manage Master Data — re-skin the legacy module/master grid
 * (`.module-cards-grid` / `.master-cards-grid`) so it reads at the same
 * v2 cadence as the citizen all-services / module-home grids: white
 * card surface with dark 1px border + 0 radius + subtle shadow,
 * brand-tinted module names, light-yellow hover tint.
 * -------------------------------------------------------------------- */
.v2-workbench-manage-master .jk-header-btn-wrapper {
  /* Vendor sets this to `display: flex; row nowrap`, which makes the
   * inner module-cards-container shrink to its content width (~500px)
   * regardless of the page width. Switch to block so the container
   * spans the full page width and the auto-fill grid below can pack
   * multiple cards per row. */
  display: block !important;
  width: 100% !important;
  padding: 0 !important;
}
.v2-workbench-manage-master .module-cards-container,
.v2-workbench-manage-master .master-details-container {
  padding: 0;
  width: 100% !important;
  max-width: none !important;
}
.v2-workbench-manage-master .module-cards-header,
.v2-workbench-manage-master .master-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 8px 0 16px 0;
}
.v2-workbench-manage-master .module-cards-header .digit-card-header,
.v2-workbench-manage-master .master-details-header .digit-card-header,
.v2-workbench-manage-master .module-cards-header h2,
.v2-workbench-manage-master .master-details-header h2 {
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
  margin: 0 !important;
}
/* Search input — v2 chrome */
.v2-workbench-manage-master .mdms-search-bar-container,
.v2-workbench-manage-master .mdms-search-bar-container .digit-text-input-field {
  margin: 0 !important;
  width: 320px;
  max-width: 100%;
}
.v2-workbench-manage-master .mdms-search-input,
.v2-workbench-manage-master .mdms-search-bar-container input[type="text"] {
  height: 44px !important;
  border: 1px solid var(--color-border, #d6d5d4) !important;
  border-radius: 6px !important;
  padding: 0 12px !important;
  font-size: 0.9375rem !important;
  background: var(--v2-surface-color, var(--color-surface, #ffffff)) !important;
  margin: 0 !important;
  width: 100% !important;
  outline: none;
}
.v2-workbench-manage-master .mdms-search-input:focus,
.v2-workbench-manage-master .mdms-search-bar-container input[type="text"]:focus {
  border-color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
}
/* Module / master cards grid */
.v2-workbench-manage-master .module-cards-grid,
.v2-workbench-manage-master .master-cards-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 16px !important;
}
.v2-workbench-manage-master .module-card,
.v2-workbench-manage-master .master-card {
  background-color: var(--v2-surface-color, var(--color-surface, #ffffff)) !important;
  border: 1px solid var(--color-text-heading, #363636) !important;
  border-radius: 0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  padding: 18px 20px !important;
  cursor: pointer;
  transition: background-color 0.15s ease-out, color 0.15s ease-out;
  min-height: 0 !important;
  margin: 0 !important;
}
.v2-workbench-manage-master .module-card:hover,
.v2-workbench-manage-master .master-card:hover {
  background-color: var(--color-primary-selected-bg, #FFF4D7) !important;
}
.v2-workbench-manage-master .module-card:hover .digit-card-sub-header,
.v2-workbench-manage-master .master-card:hover .digit-card-sub-header,
.v2-workbench-manage-master .module-card:hover .employee-card-sub-header,
.v2-workbench-manage-master .master-card:hover .employee-card-sub-header,
.v2-workbench-manage-master .module-card:hover h2,
.v2-workbench-manage-master .master-card:hover h2 {
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
}
.v2-workbench-manage-master .module-card .digit-card-sub-header,
.v2-workbench-manage-master .master-card .digit-card-sub-header,
.v2-workbench-manage-master .module-card .employee-card-sub-header,
.v2-workbench-manage-master .master-card .employee-card-sub-header,
.v2-workbench-manage-master .module-card h2,
.v2-workbench-manage-master .master-card h2 {
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
  margin: 0 0 6px 0 !important;
}
.v2-workbench-manage-master .module-card .digit-card-text,
.v2-workbench-manage-master .master-card .digit-card-text,
.v2-workbench-manage-master .module-card .card-text,
.v2-workbench-manage-master .master-card .card-text {
  color: var(--color-text-secondary, #6B7280) !important;
  font-size: 0.8125rem !important;
  margin: 0 !important;
  line-height: 1.4 !important;
}
.v2-workbench-manage-master .no-results-message {
  grid-column: 1 / -1;
  padding: 24px;
  text-align: center;
  border: 1px dashed var(--color-border, #d6d5d4);
  background-color: var(--v2-surface-color, var(--color-surface, #ffffff));
}
/* Back-to-modules button */
.v2-workbench-manage-master .master-details-container > button:first-child {
  margin-bottom: 16px !important;
  background: transparent !important;
  border: 1px solid var(--color-border, #d6d5d4) !important;
  color: var(--color-text-heading, #363636) !important;
  border-radius: 6px !important;
  padding: 8px 16px !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  box-shadow: none !important;
  height: auto !important;
}
.v2-workbench-manage-master .master-details-container > button:first-child:hover {
  background-color: var(--color-primary-selected-bg, #FFF4D7) !important;
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
  border-color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
  box-shadow: none !important;
}

/* ----------------------------------------------------------------------
 * Workbench MDMS Search v2 (`/workbench/mdms-search-v2`) — re-skin
 * the InboxSearchComposer-driven search page so it matches the rest of
 * the modernised employee chrome: brand-tinted page header with bulk-
 * download CTA on the right, soft AlertCard banner, search filters
 * card, results table card, and a v2-styled ActionBar at the bottom.
 * -------------------------------------------------------------------- */
.v2-workbench-search-header {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 0.75rem 0 0.75rem 0 !important;
}
.v2-workbench-search-header h1 {
  flex: 1 1 auto;
}
.v2-workbench-search-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Employee language-selection page — the four lang buttons live in
 * `.language-selector` (flex, gap 12, justify center) with each button
 * wrapped in its own `.language-button-container`. On mobile the
 * flex-wrap pack-2-then-2 rendering ends up with the second row
 * aligned ~5px right of the first because the per-button container's
 * intrinsic width drifts. Switch the parent to a 2-column grid so
 * both rows share the same column tracks and the buttons align
 * pixel-perfect under each other. */
@media (max-width: 47.99rem) {
  .loginContainer .language-selector {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px !important;
    justify-content: center;
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
  }
  .loginContainer .language-button-container {
    width: 100% !important;
    display: flex !important;
    justify-content: stretch;
    /* Vendor sets `margin-left: 10px` on every container after the
     * first (the legacy flex layout used it as the inter-button gap).
     * Inside the grid that 10px stacks on the first child of row 2
     * and produces a 10px misalignment with row 1. Zero it; the
     * `gap: 12px` on the grid handles spacing instead. */
    margin: 0 !important;
  }
  .loginContainer .language-button-container > button.customBtn,
  .loginContainer .language-button-container > button.customBtn-selected {
    width: 100% !important;
  }
}

/* AlertCard / info banner horizontal margin — vendor ships
 * `margin: 12px 16px` which stacks on top of the page wrapper's
 * gutter and pushes the banner inward. Zero the horizontal margin
 * (keep vertical) so it sits flush with the surrounding cards. */
.v2-workbench-search .digit-infobanner-wrap,
.v2-workbench-search .digit-infobanner-wrap.default,
.v2-workbench-search [class*="infobanner"] {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100% !important;
}

/* InboxSearchComposer — the search filter card + results table. Match
 * the v2 form-card chrome (white surface, dark 1px border, square
 * corners, soft shadow). */
/* Card containers only — earlier the `[class*="card"]` selector also
 * matched `<h2 class="card-label">` (the Field / Value / Active filter
 * labels) and stamped a 1px border around them. Restrict to the
 * actual filter wrapper + the digit-card-component. */
.v2-workbench-search .inbox-search-wrapper > div:first-child,
.v2-workbench-search .digit-card-component {
  background-color: var(--v2-surface-color, var(--color-surface, #ffffff)) !important;
  border: 1px solid var(--color-text-heading, #363636) !important;
  border-radius: 0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}
/* Filter form labels + inputs */
.v2-workbench-search .digit-card-component label,
.v2-workbench-search label {
  font-size: 0.875rem !important;
  color: var(--color-text-heading, #363636) !important;
  font-weight: 500 !important;
}
/* Filter section heading (`<h2 class="card-label">` for Field / Value /
 * Active) — drop any border the previous greedy selector applied. */
.v2-workbench-search .card-label,
.v2-workbench-search h2.card-label {
  border: 0 !important;
  background: transparent !important;
  margin: 0 0 6px 0 !important;
  padding: 0 !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: var(--color-text-heading, #363636) !important;
}
.v2-workbench-search .digit-text-input-field input[type="text"],
.v2-workbench-search .digit-text-input-field input[type="number"],
.v2-workbench-search .digit-card-component input[type="text"]:not(.mdms-search-input):not([readonly]),
.v2-workbench-search .digit-card-component input[type="number"]:not([readonly]) {
  height: 44px !important;
  border: 1px solid var(--color-border, #d6d5d4) !important;
  border-radius: 6px !important;
  font-size: 0.9375rem !important;
}
/* Filter dropdowns — same chrome as create-complaint */
.v2-workbench-search .digit-dropdown-employee-select-wrap,
.v2-workbench-search .digit-dropdown-master,
.v2-workbench-search .digit-dropdown-master-active,
.v2-workbench-search button[role="combobox"] {
  height: 44px !important;
  border: 1px solid var(--color-border, #d6d5d4) !important;
  border-radius: 6px !important;
  background-color: var(--v2-surface-color, var(--color-surface, #ffffff)) !important;
}
.v2-workbench-search .digit-dropdown-select {
  border: 0 !important;
}
/* Results table */
.v2-workbench-search table {
  border-collapse: collapse;
  width: 100%;
}
.v2-workbench-search thead th,
.v2-workbench-search [class*="table-header"] {
  background-color: var(--color-primary-selected-bg, #FFF4D7) !important;
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem !important;
  padding: 12px 14px !important;
  /* No header borders — Field / Value / Active read as a clean tinted
   * band, not a bordered cell. */
  border: 0 !important;
}
.v2-workbench-search tbody td {
  padding: 12px 14px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--color-border, #e5e7eb) !important;
  font-size: 0.875rem !important;
  color: var(--color-text-heading, #363636) !important;
}
.v2-workbench-search tbody tr {
  cursor: pointer;
  transition: background-color 0.15s ease-out;
}
.v2-workbench-search tbody tr:hover {
  background-color: var(--color-primary-selected-bg, #FFF4D7) !important;
}
.v2-workbench-search tbody tr:hover td {
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
}

/* Pagination footer (`Rows per page` + page nav) — vendor sets
 * `padding: 20px 40px 20px 0` on `.pagination`. Tighten the bottom
 * padding so the footer doesn't reserve a chunky 20px gap below the
 * controls. */
.v2-workbench-search .pagination,
.v2-pgr-inbox .pagination {
  padding: 12px 16px 0 16px !important;
}

/* ----------------------------------------------------------------------
 * PGR Employee Complaint Details (`/employee/pgr/complaint-details/<id>`)
 * — wrap is `.v2-pgr-details`. Re-skin the SummaryCard sections so the
 * details page reads at the same v2 chrome as the inbox + create-
 * complaint surfaces (white card, dark border, square corners, brand-
 * tinted section headers, calm field rows). Action footer parks above
 * the page footer.
 * -------------------------------------------------------------------- */
.v2-pgr-details .digit-summary-card,
.v2-pgr-details [class*="summary-card"],
.v2-pgr-details .digit-card-component {
  background-color: var(--v2-surface-color, var(--color-surface, #ffffff)) !important;
  /* Was a 1px `text-heading` outline with square corners, from before the
   * inbox and create-complaint surfaces settled on a 12px card with a light
   * `card-border` hairline. A border is not text, and this page was the odd
   * one out in the corner-radius audit (#2038 review round 2). */
  border: 1px solid var(--color-card-border, #E5E7EB) !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  margin: 0 0 16px 0 !important;
  padding: 20px 24px !important;
}
.v2-pgr-details .digit-summary-card-header,
.v2-pgr-details [class*="summary-card-header"],
.v2-pgr-details .digit-card-header,
.v2-pgr-details .digit-view-card-header,
.v2-pgr-details .digit-card-component h2 {
  /* Section titles take heading ink for the same reason the page title
   * does — brand is reserved for things you can click (#2038). */
  color: var(--color-text-heading, #363636) !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  line-height: 1.3 !important;
  margin: 0 0 12px 0 !important;
  padding: 0 !important;
}
.v2-pgr-details .field-pair-label,
.v2-pgr-details [class*="field-pair"] [class*="label"] {
  color: var(--color-text-secondary, #6B7280) !important;
  font-weight: 500 !important;
  font-size: 0.8125rem !important;
}
.v2-pgr-details .field-pair-value,
.v2-pgr-details [class*="field-pair"] [class*="value"] {
  color: var(--color-text-heading, #363636) !important;
  font-size: 0.9375rem !important;
}
.v2-pgr-details .digit-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
}

/* Action bar (Take Action button) — yellow CTA + parked above page
 * footer like the create-complaint surface. */
.v2-pgr-details .digit-footer,
.v2-pgr-details ~ .digit-footer,
.v2-pgr-details .digit-action-bar-wrap {
  /* Take Action — a normal-flow button row at the end of the page,
   * not a fixed strip floating at viewport bottom. Just a transparent
   * cell that right-aligns the Submit button below the last view
   * card. Page scrolls naturally; the bar scrolls with it. */
  position: static !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  background-color: transparent !important;
  border-top: 0 !important;
  box-shadow: none !important;
  padding: 16px 0 0 0 !important;
  margin: 0 !important;
  display: flex !important;
  justify-content: flex-end !important;
}
.v2-pgr-details button.actionButton,
.v2-pgr-details button.submit-bar,
.v2-pgr-details button[class*="submit-bar"],
.v2-pgr-details .digit-button-primary {
  background-color: var(--color-button-primary-bg-default, var(--color-primary-2, #FEC931)) !important;
  color: var(--color-button-primary-text, #FFFFFF) !important;
  border-radius: 6px !important;
  padding: 10px 24px !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  height: 40px !important;
  min-height: 40px !important;
  border: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 47.99rem) {
  .v2-pgr-details {
    padding: 0 16px !important;
    /* Take Action bar is no longer fixed — sits at content end and
     * scrolls with the page — so no bottom padding reservation needed. */
  }
  .v2-pgr-details .v2-employee-page-header {
    padding: 0.75rem 0 0.5rem 0 !important;
  }
  .v2-pgr-details .digit-summary-card,
  .v2-pgr-details .digit-card-component {
    padding: 16px !important;
  }
  /* The only action on the page, and at 181px it sat in the bottom-right
   * corner of a phone screen looking like an afterthought. Full width,
   * same as every other primary action on mobile (#2038). The button sits
   * four shrink-to-fit wrappers deep, so each one has to give it the room
   * before `width: 100%` on the button itself means anything. */
  .v2-pgr-details .digit-action-bar-fields,
  .v2-pgr-details .action-bar-individual-action-field,
  .v2-pgr-details .digit-action-button-wrapper {
    width: 100% !important;
  }
  .v2-pgr-details button.actionButton,
  .v2-pgr-details button.submit-bar,
  .v2-pgr-details button[class*="submit-bar"],
  .v2-pgr-details .digit-button-primary {
    width: 100% !important;
    justify-content: center !important;
  }
  /* Inline field pairs — switch to stacked on mobile, with the
   * label fixed full-width and `white-space: nowrap` so two-word
   * labels like "Complaint Type" stay on one line. */
  .v2-pgr-details [class*="field-pair"][class*="inline"],
  .v2-pgr-details .digit-viewcard-field-pair.inline,
  /* Also stack the non-inline field-pairs on mobile — the map +
   * photos panels sit inside `.digit-viewcard-field-pair` (no
   * .inline modifier) and the default flex-row collapses the value
   * column to 0px on a 480px viewport, hiding the map entirely. */
  .v2-pgr-details .digit-viewcard-field-pair {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
  }
  /* Children of the field-pair value column get full row width on
   * mobile — the map's relative container reads `width: 100%` of
   * its parent, so the parent has to actually have width itself. */
  .v2-pgr-details .digit-viewcard-field-pair > *,
  .v2-pgr-details .digit-viewcard-value > *,
  .v2-pgr-details [class*="field-pair-value"] > * {
    max-width: 100% !important;
    width: 100% !important;
  }
  .v2-pgr-details .digit-viewcard-label,
  .v2-pgr-details [class*="field-pair-label"] {
    width: 100% !important;
    white-space: nowrap !important;
    overflow: visible !important;
    flex-shrink: 0 !important;
  }
  .v2-pgr-details .digit-viewcard-value,
  .v2-pgr-details [class*="field-pair-value"] {
    width: 100% !important;
    word-break: break-word;
  }
  /* Take Action bar on mobile — same normal-flow treatment as
   * desktop: a transparent right-aligned cell at the end of the
   * page. Vendor's `height: 8rem` is released so it hugs its button. */
  .v2-pgr-details .digit-action-bar-wrap,
  .v2-pgr-details .digit-footer {
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 16px 0 0 0 !important;
    flex-direction: row !important;
    gap: 8px !important;
    background-color: transparent !important;
    border-top: 0 !important;
    box-shadow: none !important;
  }
  .v2-pgr-details button.actionButton,
  .v2-pgr-details button.submit-bar,
  .v2-pgr-details button.digit-button-primary {
    width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
  }
}

/* ----------------------------------------------------------------------
 * PGR Employee Inbox (`/employee/pgr/inbox-v2`) — same v2 chrome as
 * the Workbench search page (filter card + results table). Selectors
 * mirror the `.v2-workbench-search` block above so both surfaces share
 * the modernised look.
 * -------------------------------------------------------------------- */
.v2-pgr-inbox {
  margin-bottom: 0;
}
/* Phone prefix on the mobile-number filter — only the prefix BUTTON
 * gets the yellow tint; the wrapper (`.digit-text-input-field.prefix`)
 * stays white (driven by the unified input chrome above). Painting
 * the wrapper yellow made the input area read as a yellow box with
 * a white inner box and a triple border (#538 follow-up: testers
 * flagged "double / triple borders" on the Mobile No filter). The
 * border + radius are handled by the unified-chrome block; here we
 * only set color + weight so the prefix tint remains. */
.v2-pgr-inbox button.digit-prefix,
.v2-pgr-inbox .digit-prefix,
.v2-pgr-inbox .digit-mobile-number-container .prefix {
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
  font-weight: 600 !important;
  cursor: default !important;
}

/* Results table card — vendor pads the wrapper with `padding-bottom:
 * 24px`. Drop it so the table sits flush against the page bottom /
 * pagination. */
.v2-pgr-inbox .digit-card-component.digit-table-card,
.v2-pgr-inbox .digit-table-card {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* The filter card and the results-table card sit in the same CSS grid
 * (`.digit-sections-parent.inbox`). The table card naturally shrinks
 * to its rows-per-page content (~866px) while the filter column is
 * taller (~947px), leaving an empty band below the pagination footer.
 * Stretch the table cell + the inner card so they reach the same
 * bottom as the filter column. */
.v2-pgr-inbox .digit-sections-parent.inbox > * {
  align-self: stretch !important;
}

/* The side column (the links card and the filter) took a flat 20% of the row:
 * 230px on a wide desktop but 130px on an 820px tablet, where "Assigned to Me"
 * broke mid-word and the filter dropdowns cut their labels short. It keeps its
 * 20% wherever that's enough, and never drops below 13rem. */
@media (min-width: 48rem) {
  .v2-pgr-inbox .digit-sections-parent.inbox {
    grid-template-columns: minmax(13rem, 20%) minmax(0, 1fr) !important;
  }
}

/* ...except the links panel, which is in the FIRST grid row, not the second.
 * The rule above was written for the table/filter row and catching row 1 as
 * well left the links card stretched to the height of the search form beside
 * it: measured 210px of card around 99px of content, which is the
 * "too much white space on the top left box" in the #2038 review.
 *
 * `align-self` alone is not enough — vendor also sets
 * `.digit-section.links { height: 100% }` (resolved against the row) and a
 * `.digit-section { min-height: 10rem }` floor. Clear all three so the panel
 * is as tall as the one link it holds. Measured 210px -> 149px. */
.v2-pgr-inbox .digit-sections-parent.inbox > .digit-section.links {
  align-self: start !important;
  height: auto !important;
  min-height: 0 !important;
}
.v2-pgr-inbox .digit-results-table-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.v2-pgr-inbox .digit-results-table-wrapper > .digit-card-component,
.v2-pgr-inbox .digit-results-table-wrapper > .digit-table-card {
  flex: 1 1 auto;
  /* #2038: was `min-height: 100%`, i.e. at least the full wrapper height —
   * but the wrapper also holds the My/All tab strip above the card, so the
   * column's content came out ~42px taller than the column itself and the
   * card got a second scrollbar wrapped around the table's own one. `0`
   * lets the card take the space that is actually left. */
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* The row list keeps its own cap and its own scrollbar — that is the scroll
 * that belongs here. With the card no longer forced to a full-column
 * minimum, the column simply grows to fit tabs + card, so nothing overflows
 * and the second scrollbar never appears. */
.v2-pgr-inbox .digit-results-table-wrapper .digit-data-table {
  flex: 1 1 auto;
  min-height: 0;
}

/* My/All visibility tabs (Visibility V1, PR #1052). Rendered inside the
 * composer's results column (`resultsHeader` slot) so the strip sits
 * directly above the complaint list per the PRD. `sticky; left: 0` keeps
 * it in place when wide tables give the wrapper `overflow-x: auto`.
 * Colours come from the brand palette vars (same pattern as the table
 * header rules below) so tenant theming applies. */
.v2-pgr-inbox .pgr-inbox-tabs {
  display: flex;
  gap: 2rem;
  border-bottom: 1px solid var(--color-border, #d6d5d4);
  margin-bottom: 8px;
  position: sticky;
  left: 0;
  flex-shrink: 0;
}
.v2-pgr-inbox .pgr-inbox-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 4px;
  cursor: pointer;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-secondary, #505a5f);
}
.v2-pgr-inbox .pgr-inbox-tab.active {
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e));
  border-bottom-color: var(--color-primary-1, var(--color-primary-main, #c84c0e));
  font-weight: 700;
}
.v2-pgr-inbox .pgr-inbox-tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-error, #d4351c);
  display: inline-block;
}

/* react-data-table-component header colour — vendor renders header
 * cells as `.rdt_TableCol` (styled-components), which inherits its
 * legacy dark-teal `#0B4B66` colour. Force it through the brand
 * palette instead. */
.v2-pgr-inbox .rdt_TableHead,
.v2-pgr-inbox [class*="rdt_TableHead"],
.v2-pgr-inbox .rdt_TableHeadRow,
.v2-pgr-inbox [class*="rdt_TableHeadRow"] {
  background-color: var(--color-primary-selected-bg, #FFF4D7) !important;
}
.v2-pgr-inbox .rdt_TableCol,
.v2-pgr-inbox [class*="rdt_TableCol"],
.v2-pgr-inbox .rdt_TableCol_Sortable,
.v2-pgr-inbox [class*="rdt_TableCol"] *,
.v2-pgr-inbox [class*="rdt_TableCol_Sortable"] * {
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem !important;
}
.v2-pgr-inbox .rdt_TableCol,
.v2-pgr-inbox [class*="rdt_TableCol"] {
  background-color: transparent !important;
  border: 0 !important;
}

/* Zero the AppContainer's `margin-bottom: 56px` on the PGR inbox so
 * the page doesn't reserve a chunky 56px gap below the table /
 * pagination. */
.employee .app-container.ground-container:has(.v2-pgr-inbox) {
  margin-bottom: 0 !important;
}

/* Employee dashboard (embedded in digit-ui chrome) — vendor `.main` uses
 * margin-left: 72px while the collapsed sidebar rail is 48px, leaving a
 * visible white strip between the nav and the dashboard. Also zero the
 * ground-container padding (16px @ 780px+) that other modules use. */
.employee .ground-container.digit-home-ground:has(.dashboard-root.dashboard-embedded) {
  margin: 0 !important;
  padding: 0 !important;
  max-width: 100vw;
  overflow-x: clip;
}

.employee .employee-app-wrapper.digit-home-app-wrapper:has(.dashboard-root.dashboard-embedded) {
  margin: 0 !important;
  padding: 0 !important;
  max-width: 100vw;
  min-width: 0;
  overflow-x: clip;
}

.employee .main.digit-home-main:has(.dashboard-root.dashboard-embedded) {
  margin-left: 0 !important;
  padding-left: var(--app-rail-w, 0px) !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: clip !important;
  /* padding-top intentionally NOT set here: the dashboard product ships this
   * same selector in its own stylesheet, which loads later and wins. It is
   * fixed there. */
  box-sizing: border-box !important;
}

.dashboard-root.dashboard-embedded {
  --dashboard-embedded-inset: 12px;
}

.dashboard-root.dashboard-embedded .dashboard-grid-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
  box-sizing: border-box;
  padding-left: var(--dashboard-embedded-inset);
  padding-right: var(--dashboard-embedded-inset);
}

.dashboard-root.dashboard-embedded .dashboard-grid-wrap .react-grid-layout {
  max-width: 100% !important;
  min-width: 0;
}

.dashboard-root.dashboard-embedded .dashboard-grid-layout .react-grid-item {
  overflow: hidden;
}

.dashboard-root.dashboard-embedded .dashboard-header-top {
  padding-left: var(--dashboard-embedded-inset) !important;
  padding-right: var(--dashboard-embedded-inset) !important;
}

.dashboard-root.dashboard-embedded .dashboard-filters-bar {
  padding-left: var(--dashboard-embedded-inset);
  padding-right: var(--dashboard-embedded-inset);
  margin-bottom: 12px;
}

.dashboard-root.dashboard-embedded .dashboard-grid-layout {
  box-sizing: border-box;
}

/* Dashboard card headings — vendor `h2[class*="title"]` paints primary blue/green. */
.dashboard-root .dashboard-kpi-title {
  color: var(--foreground, #0b0c0c) !important;
}

.dashboard-root h2.dashboard-drag-handle-title,
.dashboard-root .dashboard-drag-handle-title {
  color: var(--foreground, #0b0c0c) !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  text-transform: none !important;
}

/* Compact dashboard filters — vendor forces 44px on select/date. */
.dashboard-root .dashboard-filter-inline-date,
.dashboard-root .dashboard-filter-inline-select {
  height: 1.75rem !important;
  min-height: 1.75rem !important;
  max-height: 1.75rem !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-radius: 4px !important;
  box-sizing: border-box !important;
}

/* Beat vendor `input[type=date] { border… !important }` (higher specificity). */
.dashboard-root input.dashboard-filter-inline-date[type="date"] {
  border: 1px solid var(--border, #e5e2db) !important;
  background-color: var(--surface, #ffffff) !important;
  box-shadow: none !important;
  padding-left: 0.375rem !important;
  padding-right: 0.375rem !important;
  width: 100% !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.dashboard-root .dashboard-filter-inline-date-wrap {
  height: 1.75rem !important;
  width: 6.75rem;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.dashboard-root .dashboard-filter-inline-select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: none !important;
  padding-right: 1.5rem !important;
  border: 1px solid var(--border, #e5e2db) !important;
  background-color: var(--surface, #ffffff) !important;
}

.dashboard-root .dashboard-filter-inline-select::-ms-expand,
.dashboard-root .dashboard-widget-group-by-select::-ms-expand {
  display: none;
}

.dashboard-root .dashboard-widget-group-by-select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: none !important;
}

.dashboard-root .dashboard-filter-inline-select-wrap::after {
  content: none !important;
  display: none !important;
}

.dashboard-root .dashboard-filter-inline-select-wrap,
.dashboard-root .dashboard-filter-inline-date-wrap,
.dashboard-root .dashboard-filters-heading,
.dashboard-root .dashboard-filters-date-range,
.dashboard-root .dashboard-filters-clear-inline {
  height: 1.75rem !important;
}

.dashboard-root .dashboard-filters-card {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

/* Header search — same height as Add KPI / Reset / Export (vendor forces 44px). */
.dashboard-root .dashboard-header-search,
.dashboard-root .dashboard-header-search-input:not(#dashboard-search-noop) {
  height: 2rem !important;
  min-height: 2rem !important;
  max-height: 2rem !important;
}

.dashboard-root .dashboard-header-search-input:not(#dashboard-search-noop) {
  font-size: 12px !important;
  line-height: 1.25 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 2rem !important;
  border-radius: 4px !important;
  box-sizing: border-box !important;
}

.dashboard-root .dashboard-header-controls .dashboard-header-btn {
  height: 2rem !important;
  min-height: 2rem !important;
  max-height: 2rem !important;
  box-sizing: border-box !important;
}

/* (Status checkbox column padding — restored to vendor default; user
 * wanted the rows aligned with the "Status" heading, not flush with
 * the column edge. The vendor's natural 24px content-container left
 * padding does that.)
 *
 * Each row's `<input type="checkbox">` is the real form input AND
 * separately the `<label class="digit-custom-checkbox">` is rendered
 * as the visible glyph. In the flex parent the hidden input still
 * takes 16px + an 11px gap before the visible label, so the visible
 * checkbox starts ~27px right of the container. Pull it back: take
 * the input out of the flex flow with `position: absolute`, and the
 * label flushes to the row's left edge. */
.v2-pgr-inbox .digit-checkbox-container .input,
.v2-pgr-inbox .digit-checkbox-container .input-emp,
.v2-pgr-inbox .digit-checkbox-container input[type="checkbox"] {
  position: absolute !important;
  margin: 0 !important;
  width: 16px !important;
  height: 16px !important;
  opacity: 0 !important;
  pointer-events: none;
}
.v2-pgr-inbox .digit-checkbox-container {
  position: relative;
}
/* #2038: was a 1px near-black outline with square corners, which drew a box
 * around every panel and made the page read as a spreadsheet. Hairline plus
 * a soft lift, same as the landing, login and create-complaint cards. */
.v2-pgr-inbox .digit-inbox-search-wrapper > div:first-child,
.v2-pgr-inbox .digit-card-component {
  background-color: var(--v2-surface-color, var(--color-surface, #ffffff)) !important;
  border: 1px solid var(--color-card-border, #E5E7EB) !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(8, 20, 40, 0.04), 0 4px 16px rgba(8, 20, 40, 0.06) !important;
}
.v2-pgr-inbox .card-label,
.v2-pgr-inbox h2.card-label {
  border: 0 !important;
  background: transparent !important;
  margin: 0 0 6px 0 !important;
  padding: 0 !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: var(--color-text-heading, #363636) !important;
}
.v2-pgr-inbox label {
  font-size: 0.875rem !important;
  color: var(--color-text-heading, #363636) !important;
  font-weight: 500 !important;
}
.v2-pgr-inbox .digit-text-input-field input[type="text"],
.v2-pgr-inbox .digit-text-input-field input[type="number"],
.v2-pgr-inbox .digit-card-component input[type="text"]:not([readonly]),
.v2-pgr-inbox .digit-card-component input[type="number"]:not([readonly]) {
  height: 44px !important;
  border: 1px solid var(--color-border, #d6d5d4) !important;
  border-radius: 6px !important;
  font-size: 0.9375rem !important;
}
.v2-pgr-inbox .digit-dropdown-employee-select-wrap,
.v2-pgr-inbox .digit-dropdown-master,
.v2-pgr-inbox .digit-dropdown-master-active,
.v2-pgr-inbox button[role="combobox"] {
  height: 44px !important;
  border: 1px solid var(--color-border, #d6d5d4) !important;
  border-radius: 6px !important;
  background-color: var(--v2-surface-color, var(--color-surface, #ffffff)) !important;
  width: 100% !important;
}
.v2-pgr-inbox .digit-dropdown-select {
  border: 0 !important;
}
/* v2 Field's wrappers take full column width so the County dropdown
 * fills its parent label-field-pair instead of shrinking to content
 * (which made it ~149px while the legacy Subtype dropdown was 242px).
 * After this both end up at the same 100% / parent width. */
.v2-pgr-inbox .digit-label-field-pair > div,
.v2-pgr-inbox .v2-scope .relative,
.v2-pgr-inbox .space-y-2 {
  width: 100% !important;
  max-width: 100% !important;
}
/* Search button + ActionBar primary CTA — vendor renders the inbox
 * search button as `.digit-button-primary` (not `.submit-bar`); cover
 * both class shapes. */
.v2-pgr-inbox button.submit-bar,
.v2-pgr-inbox button[class*="submit-bar"],
.v2-pgr-inbox button.digit-submit-bar,
.v2-pgr-inbox button.digit-button-primary,
.v2-pgr-inbox .digit-button-primary {
  background-color: var(--color-button-primary-bg-default, var(--color-primary-2, #FEC931)) !important;
  color: var(--color-text-primary, #0B0C0C) !important;
  border-radius: 6px !important;
  padding: 10px 24px !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  height: 40px !important;
  min-height: 40px !important;
  border: 0 !important;
  box-shadow: none !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  transition: background-color 0.15s ease-out !important;
}
.v2-pgr-inbox button.submit-bar:hover,
.v2-pgr-inbox button[class*="submit-bar"]:hover,
.v2-pgr-inbox button.digit-submit-bar:hover,
.v2-pgr-inbox button.digit-button-primary:hover,
.v2-pgr-inbox .digit-button-primary:hover {
  background-color: var(--color-button-primary-bg-hover, var(--color-primary-2, #E6B800)) !important;
}
/* Scoped to filled buttons: `.v2-pgr-inbox .digit-button-label` alone also
 * caught the tertiary/link labels on this page, which must not take the
 * primary-button foreground. */
.v2-pgr-inbox button.submit-bar h2,
.v2-pgr-inbox button[class*="submit-bar"] h2,
.v2-pgr-inbox button[class*="submit-bar"] .digit-button-label,
.v2-pgr-inbox button.digit-button-primary .digit-button-label,
.v2-pgr-inbox .digit-button-primary .digit-button-label {
  color: var(--color-button-primary-text, var(--color-text-primary, #0B0C0C)) !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  margin: 0 !important;
}
/* Results table */
.v2-pgr-inbox table {
  border-collapse: collapse;
  width: 100%;
}
.v2-pgr-inbox thead th,
.v2-pgr-inbox [class*="table-header"] {
  background-color: var(--color-primary-selected-bg, #FFF4D7) !important;
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem !important;
  padding: 12px 14px !important;
  border: 0 !important;
}
.v2-pgr-inbox tbody td {
  padding: 12px 14px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--color-border, #e5e7eb) !important;
  font-size: 0.875rem !important;
  color: var(--color-text-heading, #363636) !important;
}
.v2-pgr-inbox tbody tr {
  cursor: pointer;
  transition: background-color 0.15s ease-out;
}
.v2-pgr-inbox tbody tr:hover {
  background-color: var(--color-primary-selected-bg, #FFF4D7) !important;
}
.v2-pgr-inbox tbody tr:hover td {
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
}
/* Mobile */
@media (max-width: 47.99rem) {
  /* Stack the filter + results columns vertically on mobile.
   * `.digit-sections-parent.inbox` ships with `display: flex; columns:
   * 20% 1fr` which collapses the filter rail to ~75px on a 375vw and
   * makes the table 300vw with a horizontal scroll. */
  .v2-pgr-inbox .digit-sections-parent.inbox {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    grid-template-columns: 1fr !important;
    padding: 0 16px !important;
  }
  .v2-pgr-inbox .digit-sections-parent.inbox > * {
    width: 100% !important;
    flex: 1 1 100% !important;
  }
  .v2-pgr-inbox .filter-card {
    max-width: 100% !important;
    margin: 0 !important;
  }
  .v2-pgr-inbox .digit-results-table-wrapper,
  .v2-pgr-inbox .digit-table-card {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .v2-pgr-inbox .rdt_TableCol,
  .v2-pgr-inbox .rdt_TableCell,
  .v2-pgr-inbox [class*="rdt_TableCol"],
  .v2-pgr-inbox [class*="rdt_TableCell"] {
    white-space: nowrap;
  }
  .v2-pgr-inbox button.submit-bar,
  .v2-pgr-inbox button[class*="submit-bar"],
  .v2-pgr-inbox button.digit-button-primary {
    width: 100% !important;
  }
  .v2-pgr-inbox button[role="combobox"],
  .v2-pgr-inbox .digit-dropdown-employee-select-wrap {
    max-width: 100% !important;
  }
  /* Search button row's parent (`.searchBox` / search-button-wrapper)
   * extends edge-to-edge with no right padding — the button kisses
   * the viewport right border. Pad both sides so it stays inside the
   * 16px gutter. */
  .v2-pgr-inbox .searchBox,
  .v2-pgr-inbox .search-button-wrapper,
  .v2-pgr-inbox [class*="search-button"] {
    padding: 0 !important;
    margin: 12px 0 !important;
    box-sizing: border-box;
    width: 100% !important;
  }
  .v2-pgr-inbox .v2-employee-page-header {
    padding: 0.75rem 16px 0.5rem 16px !important;
  }
  /* Pagination footer wraps gracefully */
  .v2-pgr-inbox .pagination {
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px !important;
    justify-content: center;
  }
  /* Hide table column headers on mobile (legacy data-table truncates
   * them into empty stripes that don't read as labels). */
  .v2-pgr-inbox .rdt_TableHead,
  .v2-pgr-inbox [class*="rdt_TableHead"],
  .v2-pgr-inbox thead {
    display: none !important;
  }
}

/* ----------------------------------------------------------------------
 * Workbench MDMS View (read-only detail page) — re-skin the
 * MDMSAdd-rendered detail card so the view surface reads at the same
 * v2 cadence (white card, dark border, calm typography, brand-tinted
 * section headers, yellow primary action buttons).
 * -------------------------------------------------------------------- */
.v2-workbench-view .digit-card-component,
.v2-workbench-view [class*="formcomposer-card"],
.v2-workbench-view .form-card-wrap {
  background-color: var(--v2-surface-color, var(--color-surface, #ffffff)) !important;
  border: 1px solid var(--color-text-heading, #363636) !important;
  border-radius: 0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  padding: 20px 24px !important;
  margin-bottom: 16px !important;
}
.v2-workbench-view .digit-card-component .digit-card-header,
.v2-workbench-view .digit-card-component .digit-card-sub-header,
.v2-workbench-view .digit-card-component h2,
.v2-workbench-view .digit-card-component .card-sub-header,
.v2-workbench-view .digit-card-component .digit-form-card-header {
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  line-height: 1.3 !important;
  margin: 0 0 12px 0 !important;
}
/* Read-only field labels + values — calm row pairs */
.v2-workbench-view .label-field-pair,
.v2-workbench-view [class*="label-field-pair"] {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
}
.v2-workbench-view .label-field-pair:last-child {
  border-bottom: 0;
}
.v2-workbench-view .label-field-pair label,
.v2-workbench-view .label-field-pair .digit-card-label,
.v2-workbench-view .digit-card-component label {
  font-size: 0.75rem !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-secondary, #6B7280) !important;
  font-weight: 600 !important;
}
.v2-workbench-view .label-field-pair input[readonly],
.v2-workbench-view .label-field-pair .digit-employee-card-input,
.v2-workbench-view .digit-card-component input[readonly] {
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  height: auto !important;
  font-size: 0.9375rem !important;
  color: var(--color-text-heading, #363636) !important;
}
/* "View Audit" button + any other view-action buttons — v2 style */
.v2-workbench-view .v2-mdms-view-audit,
.v2-workbench-view button.mdms-view-audit {
  background-color: transparent !important;
  border: 1px solid var(--color-border, #d6d5d4) !important;
  color: var(--color-text-heading, #363636) !important;
  border-radius: 6px !important;
  padding: 8px 16px !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  height: auto !important;
  margin-top: 8px !important;
  box-shadow: none !important;
}
.v2-workbench-view .v2-mdms-view-audit:hover,
.v2-workbench-view button.mdms-view-audit:hover {
  background-color: var(--color-primary-selected-bg, #FFF4D7) !important;
  border-color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
  box-shadow: none !important;
}
/* MDMSAdd's view-mode action buttons (Edit, Disable/Enable, Delete) —
 * vendor renders them as `.digit-button-primary` / submit-bar;
 * align with v2 yellow CTA chrome. */
.v2-workbench-view button.digit-submit-bar,
.v2-workbench-view button[class*="submit-bar"],
.v2-workbench-view .digit-button-primary {
  background-color: var(--color-button-primary-bg-default, var(--color-primary-2, #FEC931)) !important;
  color: var(--color-text-primary, #0B0C0C) !important;
  border-radius: 6px !important;
  padding: 10px 24px !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  height: 40px !important;
  border: 0 !important;
  box-shadow: none !important;
}
.v2-workbench-view button.digit-submit-bar:hover,
.v2-workbench-view button[class*="submit-bar"]:hover,
.v2-workbench-view .digit-button-primary:hover {
  background-color: var(--color-button-primary-bg-hover, var(--color-primary-2, #E6B800)) !important;
}

/* MDMS view "Actions" CTA + dropdown menu — vendor renders the button
 * inside `.action-bar-wrap` (sibling of the page wrapper, action-bar
 * stays fixed at the bottom-right). When the user opens it, a
 * `.menu-wrap` panel renders the action items (Edit, Enable/Disable,
 * etc.). Re-skin both: button as a yellow primary CTA with a chevron
 * affordance, menu as a clean white card with light-yellow hover. */
.action-bar-wrap > button.submit-bar,
.action-bar-wrap > button[class*="submit-bar"] {
  background-color: var(--color-button-primary-bg-default, var(--color-primary-2, #FEC931)) !important;
  color: var(--color-text-primary, #0B0C0C) !important;
  border: 0 !important;
  border-radius: 6px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 18px !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-shadow: none !important;
  transition: background-color 0.15s ease-out;
}
.action-bar-wrap > button.submit-bar:hover,
.action-bar-wrap > button[class*="submit-bar"]:hover {
  background-color: var(--color-button-primary-bg-hover, var(--color-primary-2, #E6B800)) !important;
  box-shadow: none !important;
  transform: none !important;
}
.action-bar-wrap > button.submit-bar h2,
.action-bar-wrap > button[class*="submit-bar"] h2,
.action-bar-wrap > button.submit-bar .digit-button-label {
  color: var(--color-text-primary, #0B0C0C) !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  margin: 0 !important;
}
.action-bar-wrap > button.submit-bar .digit-icon-toggle,
.action-bar-wrap > button[class*="submit-bar"] .digit-icon-toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 16px !important;
  height: 16px !important;
}
.action-bar-wrap > button.submit-bar .digit-icon-toggle svg,
.action-bar-wrap > button[class*="submit-bar"] .digit-icon-toggle svg {
  width: 14px !important;
  height: 14px !important;
}
.action-bar-wrap > button.submit-bar .digit-icon-toggle svg path,
.action-bar-wrap > button[class*="submit-bar"] .digit-icon-toggle svg path {
  fill: var(--color-text-primary, #0B0C0C) !important;
}

/* Action menu dropdown */
.menu-wrap {
  background-color: var(--v2-surface-color, var(--color-surface, #ffffff)) !important;
  border: 1px solid var(--color-border, #d6d5d4) !important;
  border-radius: 6px !important;
  box-shadow: 0 8px 16px rgba(16, 24, 40, 0.12) !important;
  padding: 4px !important;
  overflow: hidden !important;
}
.menu-wrap > div,
.menu-wrap > button,
.menu-wrap [class*="menu-item"],
.menu-wrap > p {
  padding: 10px 14px !important;
  font-size: 0.875rem !important;
  color: var(--color-text-heading, #363636) !important;
  font-weight: 500 !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: 4px !important;
  cursor: pointer;
  transition: background-color 0.15s ease-out, color 0.15s ease-out;
  display: block;
  text-align: left;
  width: 100%;
}
.menu-wrap > div:hover,
.menu-wrap > button:hover,
.menu-wrap [class*="menu-item"]:hover,
.menu-wrap > p:hover {
  background-color: var(--color-primary-selected-bg, #FFF4D7) !important;
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
}
.menu-wrap > div:hover svg path,
.menu-wrap > button:hover svg path,
.menu-wrap [class*="menu-item"]:hover svg path {
  fill: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
}

@media (max-width: 47.99rem) {
  .v2-workbench-view .digit-card-component {
    padding: 16px !important;
  }
  .v2-workbench-view .v2-mdms-view-audit,
  .v2-workbench-view button.digit-submit-bar {
    width: 100% !important;
  }
}

/* ActionBar (fixed bottom-right "Add MDMS" button) — match the v2
 * Submit button + park above the page footer. */
.v2-workbench-search .digit-action-bar-wrap,
.v2-workbench-search ~ .digit-action-bar-wrap {
  background-color: var(--v2-surface-color, var(--color-surface, #ffffff)) !important;
  border-top: 1px solid var(--color-border, #d6d5d4) !important;
  box-shadow: none !important;
  bottom: 40px !important;
}
.v2-workbench-search .mdms-add-btn,
.v2-workbench-search button.digit-submit-bar,
.v2-workbench-search button.submit-bar,
.v2-workbench-search button[class*="submit-bar"] {
  background-color: var(--color-button-primary-bg-default, var(--color-primary-2, #FEC931)) !important;
  color: var(--color-text-primary, #0B0C0C) !important;
  border-radius: 6px !important;
  padding: 10px 24px !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  height: 40px !important;
  min-height: 40px !important;
  border: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  transition: background-color 0.15s ease-out !important;
}
.v2-workbench-search .mdms-add-btn:hover,
.v2-workbench-search button.digit-submit-bar:hover,
.v2-workbench-search button.submit-bar:hover,
.v2-workbench-search button[class*="submit-bar"]:hover {
  background-color: var(--color-button-primary-bg-hover, var(--color-primary-2, #E6B800)) !important;
  box-shadow: none !important;
  transform: none !important;
}
.v2-workbench-search button.submit-bar h2,
.v2-workbench-search button[class*="submit-bar"] h2,
.v2-workbench-search .digit-button-label {
  color: var(--color-text-primary, #0B0C0C) !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  margin: 0 !important;
}

/* Mobile: stack header actions, full-width filter inputs */
@media (max-width: 47.99rem) {
  .v2-workbench-search {
    padding: 0 16px !important;
    box-sizing: border-box;
  }
  .v2-workbench-search-header {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 0 0.5rem 0 !important;
  }
  /* Some workbench pages (LocalisationSearch) use the legacy
   * `.works-header-search` heading instead of the v2 page header
   * wrapper. Strip its own horizontal padding/margin so it relies on
   * the page wrapper's 16px gutter only — was rendering ~48px from
   * the viewport edge (16 wrap + 16 header padding + 16 header
   * margin). */
  .v2-workbench-search .works-header-search {
    padding: 0.75rem 0 0.5rem 0 !important;
    margin: 0 0 12px 0 !important;
  }
  /* AlertCard / info banner — zero only the inner padding tweaks on
   * mobile (margin handled below for all viewports). */
  .v2-workbench-search .digit-action-bar-wrap {
    padding: 12px !important;
  }
  .v2-workbench-search .mdms-add-btn,
  .v2-workbench-search button.digit-submit-bar,
  .v2-workbench-search button[class*="submit-bar"],
  .v2-workbench-search button.digit-button-primary {
    width: 100% !important;
  }
  .v2-workbench-search button[role="combobox"],
  .v2-workbench-search .digit-dropdown-employee-select-wrap {
    max-width: 100% !important;
  }
  /* Info banner ("WBH_MDMS_INFO") — tighten so it doesn't reserve
   * 86px on phones for a one-line tip. Zero the horizontal margin
   * so it sits inside the wrapper's gutter only. */
  .v2-workbench-search .digit-infobanner-wrap,
  .v2-workbench-search .digit-infobanner-wrap.default {
    margin: 12px 0 !important;
    padding: 10px 12px !important;
    max-width: 100% !important;
  }
  .v2-workbench-search .digit-infobanner-wrap p,
  .v2-workbench-search .digit-infobanner-wrap span {
    font-size: 0.8125rem !important;
    line-height: 1.4 !important;
  }
  /* Filter + results card — outer padding now lives on the wrapper
   * (.v2-workbench-search), so the inbox-search-wrapper itself just
   * fills the column. */
  .v2-workbench-search .inbox-search-wrapper {
    padding: 0;
  }
  .v2-workbench-search .inbox-search-wrapper > div:first-child,
  .v2-workbench-search .digit-card-component {
    width: 100% !important;
    box-sizing: border-box;
  }
  /* Filter form fields stack one-per-row */
  .v2-workbench-search .label-field-pair,
  .v2-workbench-search .digit-label-field-pair {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
  /* Results table — horizontal scroll (instead of letting the table
   * overflow the page width). The legacy data-table is column-heavy
   * and can't reflow per-row on phones. */
  .v2-workbench-search .digit-results-table-wrapper,
  .v2-workbench-search .digit-table-card,
  .v2-workbench-search .rdt_Table,
  .v2-workbench-search [class*="rdt_TableWrapper"] {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .v2-workbench-search .rdt_TableCol,
  .v2-workbench-search .rdt_TableCell,
  .v2-workbench-search [class*="rdt_TableCol"],
  .v2-workbench-search [class*="rdt_TableCell"] {
    white-space: nowrap;
  }
  /* Pagination footer wraps gracefully on mobile */
  .v2-workbench-search .pagination {
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px !important;
  }
  /* Hide the column-header row on phones — the legacy data-table
   * collapses headers into empty stripes (column titles get truncated
   * past the row's tap area), so they don't read as labels. Drop them
   * entirely; users still see the cell values per row. */
  .v2-workbench-search .rdt_TableHead,
  .v2-workbench-search [class*="rdt_TableHead"],
  .v2-workbench-search thead {
    display: none !important;
  }
  /* Hide the "Action: NA" detail row inside the mobile card layout —
   * the legacy data-table's mobile renderer ignores the column's
   * custom pencil-icon renderer and falls back to "NA". The whole
   * row is wrapped in an <a> already, so tapping anywhere navigates
   * to the edit page; the action affordance is redundant. */
  .v2-workbench-search .rdt_TableCell .detail:has(.label h2) {
    /* Selector below targets only the Action detail. */
  }
  .v2-workbench-search [role="cell"] .details-container .detail:last-child {
    display: none !important;
  }
}

/* ----------------------------------------------------------------------
 * Employee Create Complaint — re-skin the legacy FormComposerV2 chrome
 * (single .digit-card-component with section headers + fields) so it
 * matches the citizen file-complaint surface: white card with the same
 * dark 1px border + 0 radius + subtle shadow, brand-tinted section
 * headings, lighter labels, calmer field rhythm. The dynamic config
 * driving the form is untouched.
 * -------------------------------------------------------------------- */
.v2-employee-create-complaint .digit-card-component {
  background-color: var(--v2-surface-color, var(--color-surface, #ffffff)) !important;
  border: 1px solid var(--color-card-border, #E5E7EB) !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  transition: none !important;
  /* No left/right margin — let the card align with the breadcrumb's
   * left edge (driven by the legacy AppContainer's gutter). Earlier
   * 1.5rem horizontal margin pushed the card 24px to the right of
   * the breadcrumb, breaking the visual rhythm. */
  margin: 0 0 1.5rem 0 !important;
  padding: 24px 28px !important;
}
/* Section headings inside the card */
.v2-employee-create-complaint .digit-card-component .digit-card-header,
.v2-employee-create-complaint .digit-card-component .digit-card-sub-header,
.v2-employee-create-complaint .digit-card-component h2,
.v2-employee-create-complaint .digit-card-component .digit-form-card-header,
.v2-employee-create-complaint .digit-card-component .card-sub-header {
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  line-height: 1.3 !important;
  margin: 16px 0 8px 0 !important;
  padding: 0 !important;
}
.v2-employee-create-complaint .digit-card-component > h2:first-child,
.v2-employee-create-complaint .digit-card-component > .digit-card-header:first-child,
.v2-employee-create-complaint .digit-card-component > .digit-card-sub-header:first-child {
  margin-top: 0 !important;
}
/* Field labels */
.v2-employee-create-complaint .digit-card-component label,
.v2-employee-create-complaint .digit-card-component .digit-form-card-text {
  color: var(--color-text-heading, #363636) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
}
/* Required asterisks red — same convention citizen v2 uses */
.v2-employee-create-complaint .digit-card-component label .digit-mandatory-asterisk,
.v2-employee-create-complaint .digit-card-component label .mandatory,
.v2-employee-create-complaint .digit-card-component label .required-asterisk {
  color: var(--color-error, #d4351c) !important;
}

/* Layout: page flows naturally with global scroll. The earlier
 * body-only-scroll variant (constrained wrapper height + form card
 * overflow-y:auto + action bar pinned to wrapper bottom) was reverted
 * after testers flagged the regression in PR #99 (egov/CCRS#538). */
.employee .app-container.ground-container:has(> .v2-employee-create-complaint) {
  padding: 16px 16px 0 16px !important;
}
/* Cap the BoundaryComponent's v2 Select wrappers to the same width
 * the legacy form input wrappers render at (~600px) so the County /
 * Sub-County / Ward dropdowns line up with the rest of the form. */
.v2-employee-create-complaint .digit-card-component > div:has(> [class*="rounded-md"][role="combobox"]),
.v2-employee-create-complaint [class*="boundary"] > div,
.v2-employee-create-complaint .digit-card-component .v2-scope > div {
  max-width: 600px;
}
/* Cap every text-input wrapper on this surface to the same 600px the
 * dropdown triggers use, so Complainant Name / Postal Code don't
 * stretch past the County / Sub-County / Ward column width. */
.v2-employee-create-complaint .digit-card-component .digit-text-input-field {
  max-width: 600px !important;
  width: 100% !important;
}
.v2-employee-create-complaint button[role="combobox"] {
  max-width: 600px !important;
  /* Match the legacy dropdown chrome — white surface, light border,
   * 6px radius — so the County/Sub-County/Ward triggers read identical
   * to the form's other dropdowns. Earlier they showed with a black
   * 1px border + 0 radius (vendor button defaults). */
  background-color: var(--v2-surface-color, var(--color-surface, #ffffff)) !important;
  border: 1px solid var(--color-border, #d6d5d4) !important;
  border-radius: 6px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 12px !important;
  box-shadow: none !important;
}
.v2-employee-create-complaint button[role="combobox"]:hover,
.v2-employee-create-complaint button[role="combobox"]:focus,
.v2-employee-create-complaint button[role="combobox"]:focus-visible {
  border-color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
  outline: none !important;
}
/* Boundary v2 Select popup — cap width so it doesn't extend past the
 * trigger when the parent .relative wrapper is wider than 600. */
.v2-employee-create-complaint ul[role="listbox"] {
  max-width: 600px !important;
}
/* The v2 Select wrapper (.relative containing the trigger) — also cap
 * so the listbox `width: 100%` resolves to the trigger width instead of
 * the wider parent. */
.v2-employee-create-complaint .digit-card-component .relative {
  max-width: 600px;
}
.v2-employee-create-complaint .digit-card-component {
  margin-bottom: 0 !important;
}
/* Action bar — sits naturally below the form card. Transparent bg so
 * the page surface (#eee) shows through; only the Submit button reads
 * as a discrete element. No fixed positioning, no white shelf. */
.v2-employee-create-complaint .digit-action-bar-wrap,
.v2-employee-create-complaint form .digit-action-bar-wrap {
  position: static !important;
  bottom: auto !important;
  background-color: transparent !important;
  border-top: 0 !important;
  box-shadow: none !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 12px 0 0 0 !important;
  display: flex !important;
  justify-content: flex-end !important;
}
/* Submit button — match the citizen v2 Next/Submit (yellow bg, dark
 * text, 6px radius, 10px 24px padding, weight 600, no underline). */
.v2-employee-create-complaint .digit-submit-bar,
.v2-employee-create-complaint .digit-formcomposer-submitbar,
.v2-employee-create-complaint button.digit-submit-bar,
.v2-employee-create-complaint button[class*="submit-bar"] {
  background-color: var(--color-button-primary-bg-default, var(--color-primary-2, #FEC931)) !important;
  color: var(--color-button-primary-text, #FFFFFF) !important;
  border: 0 !important;
  border-bottom: 0 !important;
  border-radius: 6px !important;
  padding: 10px 24px !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  height: 40px !important;
  min-height: 40px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  box-shadow: none !important;
  transition: background-color 0.15s ease-out !important;
}
.v2-employee-create-complaint .digit-submit-bar:hover,
.v2-employee-create-complaint .digit-formcomposer-submitbar:hover,
.v2-employee-create-complaint button.digit-submit-bar:hover,
.v2-employee-create-complaint button[class*="submit-bar"]:hover {
  background-color: var(--color-button-primary-bg-hover, var(--color-primary-2, #E6B800)) !important;
  box-shadow: none !important;
  transform: none !important;
}
/* Scoped to the submit bar: `.v2-employee-create-complaint
 * .digit-button-label` on its own also caught secondary and tertiary
 * buttons on the page, which must not wear the primary-button foreground. */
.v2-employee-create-complaint .digit-submit-bar h2,
.v2-employee-create-complaint .digit-submit-bar .digit-button-label,
.v2-employee-create-complaint [class*="submit-bar"] .digit-button-label,
.v2-employee-create-complaint button[class*="submit-bar"] h2 {
  color: var(--color-button-primary-text, var(--color-text-primary, #0B0C0C)) !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  margin: 0 !important;
}

/* Legacy form dropdowns (`.digit-dropdown-employee-select-wrap` +
 * .digit-dropdown-master / -master-active) inside the create-complaint
 * card — re-skin them so they read like the v2 Select trigger (44px
 * height, light border, max-width matching other inputs, lighter
 * placeholder colour, yellow tint on hovered options). The data
 * layer (FormComposerV2 dropdown model) is untouched. */
.v2-employee-create-complaint .digit-dropdown-employee-select-wrap,
.v2-employee-create-complaint .digit-dropdown-master,
.v2-employee-create-complaint .digit-dropdown-master-active,
.v2-employee-create-complaint .digit-dropdown-select-wrap {
  height: 44px !important;
  min-height: 44px !important;
  border: 1px solid var(--color-border, #d6d5d4) !important;
  border-radius: 0.375rem !important;
  background-color: var(--v2-surface-color, var(--color-surface, #ffffff)) !important;
  transition: border-color 0.15s ease-out !important;
  max-width: 600px !important;
  width: 100% !important;
  box-shadow: none !important;
  padding: 0 12px !important;
  display: flex !important;
  align-items: center !important;
}
.v2-employee-create-complaint .digit-dropdown-employee-select-wrap:hover,
.v2-employee-create-complaint .digit-dropdown-employee-select-wrap:focus-within,
.v2-employee-create-complaint .digit-dropdown-master:hover,
.v2-employee-create-complaint .digit-dropdown-master-active,
.v2-employee-create-complaint .digit-dropdown-master-active:hover {
  border-color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
}
.v2-employee-create-complaint .digit-dropdown-employee-select-wrap input[type="text"],
.v2-employee-create-complaint .digit-dropdown-master input[type="text"],
.v2-employee-create-complaint .digit-dropdown-master-active input[type="text"] {
  border: 0 !important;
  background: transparent !important;
  outline: none !important;
  height: 100% !important;
  font-size: 1rem !important;
  color: var(--color-text-primary, #0B0C0C) !important;
  padding: 0 !important;
}
/* Vendor wraps the input in `.digit-dropdown-select` which has its own
 * 1px border — that's what produced the visible double-border around
 * each dropdown. Strip it so only the outer wrapper border remains. */
.v2-employee-create-complaint .digit-dropdown-employee-select-wrap .digit-dropdown-select,
.v2-employee-create-complaint .digit-dropdown-master .digit-dropdown-select,
.v2-employee-create-complaint .digit-dropdown-master-active .digit-dropdown-select,
.v2-employee-create-complaint .digit-dropdown-select {
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
}
/* Match the v2 Select's chevron — vendor renders a filled triangle at
 * 24×24 (`M7 10L12 15L17 10H7Z`); shrink it to 16×16 with the same
 * secondary text colour the v2 ChevronDown uses, so the legacy and
 * v2 dropdowns visually read identical at the trigger. */
.v2-employee-create-complaint .digit-dropdown-employee-select-wrap > svg,
.v2-employee-create-complaint .digit-dropdown-master > svg,
.v2-employee-create-complaint .digit-dropdown-master-active > svg {
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0;
}
.v2-employee-create-complaint .digit-dropdown-employee-select-wrap > svg path,
.v2-employee-create-complaint .digit-dropdown-master > svg path,
.v2-employee-create-complaint .digit-dropdown-master-active > svg path {
  fill: var(--color-text-secondary, #6B7280) !important;
}
.v2-employee-create-complaint .digit-dropdown-employee-select-wrap input::placeholder,
.v2-employee-create-complaint .digit-dropdown-master input::placeholder,
.v2-employee-create-complaint .digit-dropdown-master-active input::placeholder {
  color: var(--color-text-secondary, #6B7280) !important;
  opacity: 1 !important;
}
/* Dropdown popup option list */
.v2-employee-create-complaint .digit-dropdown-employee-select-wrap-active,
.v2-employee-create-complaint .digit-dropdown-options-card,
.v2-employee-create-complaint .digit-employee-select-wrap--menu,
.v2-employee-create-complaint [class*="dropdown"] [class*="options"] {
  border: 1px solid var(--color-border, #d6d5d4) !important;
  border-radius: 0.375rem !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}
/* Dropdown popup option items — yellow tint on hover/active row */
.v2-employee-create-complaint .digit-dropdown-item,
.v2-employee-create-complaint [class*="dropdown-item"] {
  padding: 8px 12px !important;
  font-size: 0.875rem !important;
}
.v2-employee-create-complaint .digit-dropdown-item:hover,
.v2-employee-create-complaint .digit-dropdown-item.selected,
.v2-employee-create-complaint .digit-dropdown-item.active,
.v2-employee-create-complaint [class*="dropdown-item"]:hover {
  background-color: var(--color-primary-selected-bg, #FFF4D7) !important;
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
}

/* Complainant phone-number input — left-side prefix tinted with the
 * theme yellow (`--color-primary-selected-bg` #FFF4D7) and brand-color
 * text, matching the citizen login phone input. The legacy MobileNumber
 * atom renders the prefix as `<button class="digit-prefix">+254</button>`
 * inside `.input-container`; older surfaces use
 * `.digit-text-input-field.prefix` or `.component-in-front`. Cover all
 * three so the rule fires regardless of which atom is in use. */
/* Only the prefix BUTTON gets the yellow tint — not the wrapper,
 * because painting `.digit-text-input-field.prefix` (the wrapper)
 * yellow leaves the inner input area looking yellow too. The
 * unified `.digit-text-input-field` rule keeps the wrapper bg
 * white; the inner `.digit-prefix` button gets the yellow chip
 * with a 1px right separator from the unified-input block. */
.v2-employee-create-complaint button.digit-prefix,
.v2-employee-create-complaint .digit-prefix,
.v2-employee-create-complaint .digit-mobile-number-container .prefix,
.v2-employee-create-complaint .component-in-front {
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
  font-weight: 600 !important;
  cursor: default !important;
}
/* Lighten the phone input's vendor-default `1px solid rgb(90, 90, 90)`
 * so it visually matches the yellow prefix chip and the v2 inputs
 * around it. */
.v2-employee-create-complaint .digit-mobile-number-container .digit-employeeCard-input,
.v2-employee-create-complaint .input-container input[type="text"] {
  border: 1px solid var(--color-border, #d6d5d4) !important;
}

/* Citizen topbar logo — vendor ships `.navbar img { height: 24px;
 * min-width: 78px }` for the wordmark in `.hambuger-back-wrapper`. At
 * 24px on a 56px+ topbar it reads small and disconnected from the
 * surrounding chrome. Bump the logo to 32px and let width auto so the
 * wordmark keeps its native aspect ratio.
 *
 * The navbar itself is pinned to its original 56px (8px top/bottom
 * padding around the 32px logo + 16-line-height controls) so the bigger
 * logo doesn't make the entire topbar taller — that previously knocked
 * the v2 layout calc (--v2-topbar-height: 82px) and pushed the page
 * footer past the viewport. Pinning here keeps the topbar visually
 * unchanged in height while the wordmark itself reads larger. */
.citizen .navbar {
  height: 56px !important;
  min-height: 56px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  align-items: center;
}
.citizen .navbar img.city,
.citizen .hambuger-back-wrapper img.city {
  height: 32px !important;
  min-width: 0 !important;
  max-width: 160px !important;
  width: auto !important;
}

/* 4. Buttons — smooth transitions, depth on hover, tactile press feedback.
 *    No color changes (those come from --color-button-* vars). */
button, .digit-button, .digit-btn,
button.digit-submit-bar, button[class*="submit-bar"],
input[type="submit"], input[type="button"] {
  transition: background-color 0.15s ease-out,
              box-shadow 0.15s ease-out,
              color 0.1s ease-out,
              transform 0.05s ease-out;
}
/* Submit/CTA polish — vendor ships `padding: 1px 24px` (vertical near-zero)
 * with `border-radius: 0` and `font-weight: 400`. The primary CTA needs
 * more presence: vertical breathing room, slight rounding, and a heavier
 * weight. Color and bg still come from the v3 button-primary-* vars.
 * Flex centering ensures the label sits in the middle of the box
 * (vendor ships `display:block` so text otherwise sticks to the top).
 * Height 40px (not 44) matches the form filter dropdowns next to it
 * so the search button aligns vertically with the input row. */
button.digit-submit-bar, button[class*="submit-bar"],
.digit-submit-bar, [class*="submit-bar"] {
  padding: 8px 28px !important;
  font-weight: 600 !important;
  border-radius: 4px !important;
  font-size: 14px;
  letter-spacing: 0.02em;
  min-height: 40px;
  height: 40px;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
/* Search-row alignment — wrapper around the Search button has
 * `padding-top: 8px` + `margin-top: 32px` for ~40px of top offset.
 * The filter dropdowns next to it have a label (~20px) + 4px gap
 * above their 40px input — the input top sits ~24px below the row
 * top. Match the button's top offset to the input's top by trimming
 * the wrapper's margin-top to 24px and zeroing padding-top. */
/* Filter wrappers next to the search button have label (20px) + gap
 * above their 40px input — input top sits ~40px below the row top.
 * Match that offset on the button wrapper, use align-items:center +
 * fixed height matching the input (40px) so both children — the
 * "Clear Search" label AND the Search button — center on the SAME
 * Y line that the dropdown text baseline sits on. */
.search-button-wrapper.search {
  padding-top: 0 !important;
  margin-top: 40px !important;
  height: 40px !important;
  align-items: center !important;
}

/* Bare `<button>` (e.g. citizen Edit-Profile Save) ships with inline
 * `background-color: rgb(200,76,14)` (hardcoded DIGIT orange) + 1px-tall
 * `padding: 1px 6px` + `border-bottom: 1px solid black`. !important is
 * required because inline styles have specificity 1,0,0,0. The button
 * has no class attribute and no `type` attribute either (default is
 * "submit" via property), so the selector targets ANY unclassed button.
 * Route through --color-button-primary-* so MDMS (Kenya yellow primary-2)
 * actually drives this CTA. */
/* Match text CTA buttons only — exclude buttons whose direct child is
 * an icon (SVG/IMG), which are treated as icon-buttons (avatar upload,
 * close-X, etc.) and shouldn't get filled-button styling.
 *
 * Mirror the visual styling of `.digit-button-primary` (which the
 * "Next" button uses via its inner `<h2 class="digit-button-label">`):
 * white bold text on yellow primary-2 bg. Note: `--color-button-primary-text`
 * is set to #204F37 (green) by current MDMS — but the inner h2 of
 * .digit-button-primary hardcodes color:#fff, so the Next button reads
 * as white-on-yellow. We hardcode white here too so Save matches Next
 * exactly. Width capped + right margin so the button doesn't run flush
 * to the card edge when right-aligned. */
button:not([class]):not(:has(> svg)):not(:has(> img)) {
  background-color: var(--color-button-primary-bg-default, var(--color-primary-2, #FEC931)) !important;
  color: var(--color-text-primary, #0B0C0C) !important;
  padding: 10px 28px !important;
  font-weight: 500 !important;
  border-radius: 4px !important;
  border-bottom: 0 !important;
  border: 0 !important;
  font-size: 16px !important;
  min-height: 44px !important;
  max-width: 180px !important;
  width: auto !important;
  margin-right: 24px !important;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.15s ease-out, box-shadow 0.15s ease-out;
}
button:not([class]):not(:has(> svg)):not(:has(> img)):hover {
  background-color: var(--color-button-primary-bg-hover, #E6B800) !important;
  box-shadow: 0 1px 3px 0 rgba(16, 24, 40, 0.10);
}

/* Icon-button counterpart: bare `<button>` whose only child is an SVG
 * or IMG (e.g. profile-pic camera/upload affordance) renders with
 * browser-default light-grey bg #EFEFEF — clashes with the surrounding
 * white card. Strip the bg + border so just the icon glyph shows. */
button:not([class]):has(> svg),
button:not([class]):has(> img) {
  background-color: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  cursor: pointer;
}
/* Hover shadow only on FILLED buttons (primary, secondary, submit-bar)
 * — text-style tertiary buttons should hover with color/underline,
 * not a card-like shadow lift. Excludes the various class-name spellings
 * vendor uses: digit-button-teritiary (typo) / digit-button-tertiary /
 * teritiary / tertiary / link / button-link. */
button:not(:disabled):not([class*="teritiary"]):not([class*="tertiary"]):not([class*="button-link"]):not(.digit-button-link):hover,
.digit-button:not(:disabled):not([class*="teritiary"]):not([class*="tertiary"]):not([class*="link"]):hover,
.digit-btn:not(:disabled):not([class*="teritiary"]):not([class*="tertiary"]):not([class*="link"]):hover {
  box-shadow: 0 1px 3px 0 rgba(16, 24, 40, 0.10),
              0 1px 2px 0 rgba(16, 24, 40, 0.06);
}
button:active:not(:disabled):not([class*="teritiary"]):not([class*="tertiary"]):not([class*="button-link"]),
.digit-button:active:not(:disabled):not([class*="teritiary"]):not([class*="tertiary"]):not([class*="link"]),
.digit-btn:active:not(:disabled):not([class*="teritiary"]):not([class*="tertiary"]):not([class*="link"]) {
  transform: translateY(0.5px);
  box-shadow: 0 1px 1px 0 rgba(16, 24, 40, 0.04);
}

/* 5. Headings — Figma uses heavy weight + tight line-height + slight negative
 *    letter-spacing for cleaner, more confident hierarchy. Color routes
 *    through --color-text-heading so kenya-green's primary-1 (#204F37 dark
 *    green) drives all heading tags by default — bare h1-h6 included.
 *    Block 39 below refines per-level size/weight; this block sets the
 *    shared color + base typographic feel. */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.digit-card-header, .digit-section-header,
.card-sub-header, .employee-card-sub-header,
.title-text,
[class*="page-heading"], [class*="card-title"], [class*="card-header"],
[class*="card-sub-header"] {
  color: var(--color-text-heading, var(--color-primary-1, #204F37));
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-feature-settings: "ss01", "cv11";
}
/* Vendor's `.card .card-sub-header` (digit-ui-css.css) sets color to
 * --color-text-primary (gray) at specificity 0,2,0 — beats the bare
 * .card-sub-header rule above. Match specificity + !important. */
html .card .card-sub-header,
html .card .employee-card-sub-header {
  color: var(--color-text-heading, var(--color-primary-1, #204F37)) !important;
}

/* 6. Inputs — smooth focus transitions, brand-aware focus ring beyond just
 *    the border (subtle wash that signals affordance without being loud). */
input.digit-input, input.digit-form-input, .digit-text-input input,
input[type="text"]:not(.no-style),
input[type="email"], input[type="password"], input[type="number"],
input[type="search"], input[type="tel"],
textarea, textarea.digit-textarea,
.digit-employee-form-field input,
select, .digit-select {
  transition: border-color 0.15s ease-out, box-shadow 0.15s ease-out;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-input-border-focus, #c84c0e) 18%, transparent);
}

/* 7. Back-link styling — Figma: green chevron + green label, no border,
 *    underline-on-hover. The deployed app uses several class names;
 *    cover the common ones. */
.digit-back-button, .back-button, .back-arrow,
[class*="BackLink"], [class*="backlink"],
.digit-employee-back-button,
.back-btn2, .back-wrapper, .hambuger-back-wrapper {
  color: var(--color-button-tertiary-text, var(--color-primary-1, #204F37));
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease-out;
}
.digit-back-button:hover, .back-button:hover,
[class*="BackLink"]:hover,
.back-btn2:hover, .back-wrapper:hover, .hambuger-back-wrapper:hover {
  color: var(--color-link-hover, #003078);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.digit-back-button svg, .back-button svg,
[class*="BackLink"] svg path,
.back-btn2 svg, .back-wrapper svg, .hambuger-back-wrapper svg {
  fill: currentColor;
}
/* SVG with fill="none" on inner shape rects (viewbox padding) — keep
 * those transparent; only color the actual icon paths. */
.back-btn2 svg path:not([fill="none"]),
.back-wrapper svg path:not([fill="none"]),
.hambuger-back-wrapper svg path:not([fill="none"]) {
  fill: currentColor;
}

/* 8. Anchors inside content cards — Figma: list-item-style links read as
 *    primary-1 green, NOT primary-2 yellow. Upstream rule
 *    `.CitizenHomeCard .links a { color: var(--color-primary-main) !important }`
 *    has specificity (0,2,1) with !important, so a single-class selector
 *    `.CitizenHomeCard a` (0,1,1) loses even with !important. Compound
 *    selectors below match or exceed (0,2,1) so they win cascade-tie
 *    against upstream. `html` prefix on the catch-all is the safety net
 *    for any wrapper variant we haven't enumerated. */
html .CitizenHomeCard a,
html [class*="HomeCard"] a,
html [class*="home-card"] a,
html .citizen-home-card a,
html .digit-card a, html .employeeCard a,
html .complaint-container a,
html .card-container a, html .digit-card-container a,
.CitizenHomeCard .links a, .CitizenHomeCard .linksWrapper a,
[class*="HomeCard"] .links a, [class*="HomeCard"] .linksWrapper a,
.digit-card .links a, .employeeCard .links a {
  color: var(--color-button-tertiary-text, var(--color-primary-1, #204F37)) !important;
}
html .CitizenHomeCard a:hover,
html [class*="HomeCard"] a:hover,
html [class*="home-card"] a:hover,
html .citizen-home-card a:hover,
html .digit-card a:hover, html .employeeCard a:hover,
.CitizenHomeCard .links a:hover, .CitizenHomeCard .linksWrapper a:hover,
[class*="HomeCard"] .links a:hover {
  color: var(--color-link-hover, #003078) !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 9. Sidebar — Figma: dark green bg, dim white text by default, brand-tinted
 *    hover wash, yellow selected pill. Selected styling already handled by
 *    earlier sidebar-selected-* rules; this adds the rest. */
.sidebar, [class*="side-nav"], [class*="sidenav"] {
  color: var(--color-sidebar-text-default, #D1D5DB);
}
.sidebar a:not(.active):not(.selected),
.sidebar > div:not(.active):not(.selected),
[class*="sidenav"] a:not(.active):not(.selected),
[class*="sidenav"] > div:not(.active):not(.selected) {
  color: var(--color-sidebar-text-default, #D1D5DB);
  transition: color 0.15s ease-out, background-color 0.15s ease-out;
}
.sidebar a:not(.active):not(.selected):hover,
[class*="sidenav"] a:not(.active):not(.selected):hover {
  color: var(--color-sidebar-hover-text, var(--color-primary-1, #204F37));
  background-color: var(--color-sidebar-hover-bg, var(--color-primary-1-bg, #FFF4D6));
}

/* 10. Focus rings — universal brand-aware outline for keyboard accessibility.
 *     Tighter than Tailwind's default; uses primary-1 (the more saturated
 *     brand color) for high contrast. */
*:focus-visible:not(input):not(textarea):not(select) {
  outline: 2px solid var(--color-primary-1, #c84c0e);
  outline-offset: 2px;
  border-radius: 2px;
}

/* 11. Text selection — soft brand-tinted highlight (was browser default
 *     blue). Reads better on light surfaces. */
::selection {
  background-color: var(--color-primary-1-bg, #FFF4D7);
  color: var(--color-primary-1, #c84c0e);
}

/* 12. Tooltips — refined corners, soft shadow. Color comes from
 *     --color-tooltip-* set by v3 expansion. */
.digit-tooltip, .digit-tooltip-content,
[role="tooltip"], .tippy-box, .tippy-content,
.tooltip-content, [class*="tooltip-text"] {
  border-radius: 6px !important;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08),
              0 2px 4px -2px rgba(0, 0, 0, 0.04) !important;
}

/* 13. Tables — uppercased compact headers per Figma's table system. Padding
 *     left to upstream (avoid layout shifts from changing td height). */
table.digit-table thead th, .digit-data-table thead th,
table.digit-table-main thead th {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
table.digit-table tbody tr, .digit-data-table tbody tr,
table.digit-table-main tbody tr {
  transition: background-color 0.1s ease-out;
}

/* 14. Body text smoothing — sharp, predictable rendering on retina + LCD
 *     subpixel antialiasing fallback for non-retina. */
body, html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 15. Disabled state — Figma uses muted gray bg + gray text consistently.
 *     Don't recolor (vars handle that), refine cursor + opacity feel. */
button:disabled, input:disabled, .digit-button:disabled,
[disabled], [aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.85;
}

/* 16. Cards inside grids — generous gutter via column-gap (no margin
 *     surgery). Many home cards sit on a flex/grid parent that already
 *     has gap; this is a safety net for older containers. */
[class*="home-card-container"] > .digit-card,
[class*="home-card-container"] > .citizen-home-card,
.complaint-container > .digit-card {
  margin-bottom: 16px;
}

/* ─── v3 polish layer — deeper component pass ─────────────────────────────
 *
 * Adapts Figma's mobile design language to desktop-specific surfaces it
 * doesn't explicitly cover: dropdowns, modals, pills, tabs, pagination,
 * checkboxes/radios, toggles, date pickers, scrollbars, skeleton loaders,
 * empty states, breadcrumbs, search bars.
 *
 * Every color references a v3 CSS variable so a tenant theme cascades
 * through. Same scope discipline as Block 1–16: no padding/margin/width
 * edits that risk layout regressions.
 */

/* 17. Form labels — Figma: ~12-14px, medium-weight, distinct gray, sits
 *     above input with consistent breathing room. */
.digit-card-label,
.digit-form-field label,
label.digit-form-field-label,
.digit-text-input label,
form label:not(.digit-radio-label):not(.digit-checkbox-label) {
  color: var(--color-input-label, #4B5563);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0;
  line-height: 1.4;
}

/* 18. Required asterisk — Figma: error-red, slight kern offset from label
 *     text. Applies to the `<sup>` or `*` span next to mandatory-field labels. */
.digit-form-field label .mandatory,
.digit-form-field label sup,
.digit-form-field label .required-mark,
label .required, label sup,
[class*="mandatory"] {
  color: var(--color-status-error-text, var(--color-error, #D4351C));
  font-weight: 600;
  margin-left: 2px;
}

/* 19. Helper text — Figma: smaller, tertiary gray, relaxed line-height. */
.digit-form-helper-text, .digit-helper-text,
.digit-form-field-helper, .digit-input-helper,
.field-helper, .helper-text,
[class*="helper-text"] {
  color: var(--color-input-helper, #6B7280);
  font-size: 12px;
  line-height: 1.4;
  margin-top: 4px;
}

/* 20. Dropdown / select — Figma: white bg, light border, chevron-right
 *     glyph, brand-color focus. Custom-rendered DIGIT dropdowns use a
 *     shared shell class. */
.digit-dropdown, .digit-select,
.digit-select-wrap, .digit-select-input,
[class*="custom-select-wrap"] {
  background-color: var(--color-input-bg, #FFFFFF);
  border: 1px solid var(--color-input-border-default, var(--color-input-border, #D1D5DB));
  border-radius: 4px;
  transition: border-color 0.15s ease-out, box-shadow 0.15s ease-out;
}
.digit-dropdown:hover, .digit-select:hover {
  border-color: var(--color-input-border-focus, var(--color-primary-1, #c84c0e));
}
.digit-dropdown[aria-expanded="true"],
.digit-select[aria-expanded="true"],
.digit-dropdown:focus-within,
.digit-select:focus-within {
  border-color: var(--color-input-border-focus, var(--color-primary-1, #c84c0e));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-input-border-focus, #c84c0e) 18%, transparent);
}
/* Dropdown options panel */
.digit-dropdown-menu, .digit-select-menu,
.digit-dropdown-options, .digit-options-card,
[class*="options-card"], [class*="dropdown-list"] {
  background-color: var(--color-page-bg, #FFFFFF);
  border: 1px solid var(--color-card-border, #E5E7EB);
  border-radius: 6px;
  box-shadow: 0 6px 16px -4px rgba(16, 24, 40, 0.10),
              0 4px 6px -2px rgba(16, 24, 40, 0.05);
  overflow: hidden;
}
.digit-dropdown-item, .digit-select-option,
[class*="dropdown-list"] > *,
[class*="options-card"] > *:not(.digit-search) {
  transition: background-color 0.1s ease-out, color 0.1s ease-out;
}
.digit-dropdown-item:hover, .digit-select-option:hover,
[class*="dropdown-list"] > *:hover,
.digit-dropdown-item.keyChange, .digit-select-option.selected {
  background-color: var(--color-primary-selected-bg, var(--color-primary-1-bg, #FFF4D7));
  color: var(--color-primary-1, #204F37);
}

/* 21. Modal / dialog — Figma: subtle backdrop overlay, panel with rounded
 *     corners and elevation shadow, comfortable header spacing. */
.digit-popup-wrap, .digit-modal-wrap, .digit-dialog-wrap,
[role="dialog"], [class*="modal-wrap"],
[class*="popup-overlay"], .digit-dialog-backdrop {
  background-color: rgba(16, 24, 40, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.digit-popup, .digit-modal, .digit-dialog,
[class*="popup-children-wrap"], [class*="modal-content"] {
  background-color: var(--color-page-bg, #FFFFFF);
  border: 1px solid var(--color-card-border, #E5E7EB);
  border-radius: 8px;
  box-shadow: 0 20px 25px -5px rgba(16, 24, 40, 0.10),
              0 10px 10px -5px rgba(16, 24, 40, 0.04);
}
/* The divider belongs to the header ROW. `[class*="popup-heading"]` also
 * matched `.digit-popup-heading`, which is the title TEXT, so the rule drew a
 * short rule under the word itself — the stray underline beneath "Logout"
 * (#2038). Colour still applies to both; only the border is row-scoped. */
:is(.employee, .citizen) .digit-popup-header,
:is(.employee, .citizen) .digit-modal-header,
:is(.employee, .citizen) .digit-dialog-header {
  border-bottom: 1px solid var(--color-card-divider, #E5E7EB);
}
:is(.employee, .citizen) .digit-popup-header,
:is(.employee, .citizen) .digit-modal-header,
:is(.employee, .citizen) .digit-dialog-header,
.employee [class*="popup-heading"] {
  color: var(--color-text-heading, var(--color-primary-1, #204F37));
}
.digit-popup-close, .digit-modal-close,
[class*="popup-close"], [aria-label="Close"] {
  color: var(--color-text-secondary, #5A5A5A);
  transition: color 0.15s ease-out;
  cursor: pointer;
}
.digit-popup-close:hover, .digit-modal-close:hover,
[aria-label="Close"]:hover {
  color: var(--color-text-primary, var(--color-primary-1, #204F37));
}

/* 22. Status pills / badges — Figma: soft tint bg + bold colored text +
 *     small radius. One pattern per severity, derived from status-* vars. */
.digit-tag, .digit-badge, .digit-status-tag,
.statushighlight, [class*="status-tag"], [class*="badge-"],
.digit-rounded-label, [class*="rounded-label"] {
  border-radius: 12px;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 2px 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.5;
}
.digit-tag.success, [class*="status-success"], .statushighlight.success {
  background-color: var(--color-status-success-bg, #BAD6C9);
  color: var(--color-status-success-text, var(--color-success, #00703C));
}
.digit-tag.error, [class*="status-error"], .statushighlight.error {
  background-color: var(--color-status-error-bg, #EFC7C1);
  color: var(--color-status-error-text, var(--color-error, #D4351C));
}
.digit-tag.warning, [class*="status-warning"], .statushighlight.warning {
  background-color: var(--color-status-warning-bg, #FFF4D6);
  color: var(--color-status-warning-text, var(--color-warning-dark, #9E5F00));
}
.digit-tag.info, [class*="status-info"], .statushighlight.info {
  background-color: var(--color-status-info-bg, #C7E0F1);
  color: var(--color-status-info-text, var(--color-info-dark, #0057BD));
}

/* 23. Tabs — Figma: underline-style active indicator, smooth color
 *     transition on hover, primary-1 active color. */
.digit-tab, [role="tab"],
.digit-tab-button, [class*="search-tab-head"] {
  color: var(--color-text-secondary, #5A5A5A);
  font-weight: 500;
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease-out, border-color 0.15s ease-out;
  cursor: pointer;
}
.digit-tab:hover, [role="tab"]:hover {
  color: var(--color-primary-1, #204F37);
}
.digit-tab.selected, .digit-tab[aria-selected="true"],
[role="tab"][aria-selected="true"],
[class*="search-tab-head-selected"] {
  color: var(--color-primary-1, #204F37);
  border-bottom-color: var(--color-primary-2, var(--color-primary-main, #FEC931));
  font-weight: 600;
}

/* 24. Breadcrumbs — Figma: gray separator, tertiary text, last item bold.
 *     Standard ARIA + DIGIT class names. */
.digit-breadcrumb, [aria-label="breadcrumb"],
[class*="breadcrumb"] {
  color: var(--color-text-secondary, #5A5A5A);
  font-size: 13px;
}
.digit-breadcrumb a, [class*="breadcrumb"] a {
  color: var(--color-button-tertiary-text, var(--color-primary-1, #204F37));
  text-decoration: none;
  transition: color 0.15s ease-out;
}
.digit-breadcrumb a:hover, [class*="breadcrumb"] a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.digit-breadcrumb-separator,
[class*="breadcrumb"] [class*="separator"],
[class*="breadcrumb"] > span:not(:first-child):not(:last-child) {
  color: var(--color-text-disabled, var(--color-grey-disabled, #9CA3AF));
  margin: 0 8px;
}
.digit-breadcrumb [aria-current="page"],
[class*="breadcrumb"] [aria-current="page"] {
  color: var(--color-text-primary, #363636);
  font-weight: 600;
}

/* 25. Pagination — Figma: numbered pills, active = primary-1-bg fill +
 *     primary-1 text + bold; chevrons gray with hover. */
.digit-pagination, [class*="pagination"] {
  font-weight: 500;
}
.digit-pagination-item, [class*="pagination"] > button,
[class*="pagination"] > a {
  color: var(--color-text-secondary, #5A5A5A);
  border-radius: 4px;
  min-width: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease-out, color 0.15s ease-out;
}
.digit-pagination-item:hover, [class*="pagination"] > button:hover {
  background-color: var(--color-primary-1-bg, var(--color-primary-selected-bg, #FFF4D7));
  color: var(--color-primary-1, #204F37);
}
.digit-pagination-item.active, .digit-pagination-item.selected,
[class*="pagination"] > button[aria-current="page"],
[class*="pagination"] [aria-current="true"] {
  background-color: var(--color-primary-1-bg, #FFF4D7);
  color: var(--color-primary-1, #204F37);
  font-weight: 700;
}
.digit-pagination-item:disabled, .digit-pagination-item[aria-disabled="true"] {
  color: var(--color-text-disabled, #9CA3AF);
  cursor: not-allowed;
  opacity: 0.7;
}

/* 26. Toast notifications — see the unified block earlier in this file
 *     (search "Toast styling — unified across"). Solid severity bg +
 *     white label + white SVG icons + visible close button.
 *     This block previously held a soft-tint pattern (light-pink bg,
 *     dark-red text) that clashed with the unified solid-color
 *     pattern; the conflicting selectors painted labels in error-red
 *     on the unified red bg, making messages invisible (CCRS#498
 *     follow-up). Removed in favour of the unified block which lives
 *     before this one in source order. */

/* 27. Custom checkbox — Figma: 16px square with subtle gray unchecked
 *     border; checked fills with primary-1, white tick; brand-aware focus. */
input[type="checkbox"]:not([class*="default-style"]) {
  appearance: none;
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border: 1.5px solid var(--color-input-border-default, #D1D5DB);
  border-radius: 3px;
  background-color: var(--color-input-bg, #FFFFFF);
  display: inline-block;
  position: relative;
  cursor: pointer;
  transition: background-color 0.12s ease-out, border-color 0.12s ease-out;
  vertical-align: middle;
  flex-shrink: 0;
}
input[type="checkbox"]:not([class*="default-style"]):hover {
  border-color: var(--color-primary-1, #204F37);
}
input[type="checkbox"]:not([class*="default-style"]):checked {
  background-color: var(--color-primary-1, #204F37);
  border-color: var(--color-primary-1, #204F37);
}
input[type="checkbox"]:not([class*="default-style"]):checked::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 4px; height: 8px;
  border: solid var(--color-page-bg, #FFFFFF);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
input[type="checkbox"]:not([class*="default-style"]):focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary-1, #204F37) 22%, transparent);
}

/* 28. Custom radio — same pattern, circular, primary-1 dot when checked. */
input[type="radio"]:not([class*="default-style"]) {
  appearance: none;
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border: 1.5px solid var(--color-input-border-default, #D1D5DB);
  border-radius: 50%;
  background-color: var(--color-input-bg, #FFFFFF);
  display: inline-block;
  position: relative;
  cursor: pointer;
  transition: background-color 0.12s ease-out, border-color 0.12s ease-out;
  vertical-align: middle;
  flex-shrink: 0;
}
input[type="radio"]:not([class*="default-style"]):hover {
  border-color: var(--color-primary-1, #204F37);
}
input[type="radio"]:not([class*="default-style"]):checked {
  border-color: var(--color-primary-1, #204F37);
}
input[type="radio"]:not([class*="default-style"]):checked::after {
  content: "";
  position: absolute;
  left: 3px; top: 3px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background-color: var(--color-primary-1, #204F37);
}
input[type="radio"]:not([class*="default-style"]):focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary-1, #204F37) 22%, transparent);
}

/* 29. Toggle switches — Figma: rounded pill track, white thumb, smooth
 *     animation, primary-1 fill when on. */
.digit-toggle, [class*="toggle-switch"], [role="switch"] {
  background-color: var(--color-grey-disabled, #C5C5C5);
  border-radius: 999px;
  transition: background-color 0.18s ease-out;
  cursor: pointer;
}
.digit-toggle.on, .digit-toggle[aria-checked="true"],
[role="switch"][aria-checked="true"] {
  background-color: var(--color-primary-1, #204F37);
}
.digit-toggle .digit-switch-shape-on,
.digit-toggle [class*="thumb"],
[role="switch"] [class*="thumb"] {
  background-color: var(--color-page-bg, #FFFFFF);
  border-radius: 50%;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.18s ease-out;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.20);
}

/* 30. Avatars — Figma: solid circle with initial, primary-1 bg or surface
 *     contrast. */
.digit-avatar, [class*="avatar"]:not([class*="avatar-text"]) {
  border-radius: 50%;
  background-color: var(--color-primary-1, #204F37);
  color: var(--color-header-text, #FFFFFF);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-feature-settings: "tnum";
}

/* 31. Stepper / wizard indicators — Figma: completed step has primary-1
 *     fill + check, current step has primary-1 outline, future is gray. */
.digit-stepper-item, [class*="stepper-item"], [class*="step-indicator"] {
  color: var(--color-text-secondary, #5A5A5A);
  transition: color 0.15s ease-out;
}
.digit-stepper-item .digit-step-circle,
[class*="step-circle"], [class*="step-marker"] {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--color-input-border-default, #D1D5DB);
  background-color: var(--color-page-bg, #FFFFFF);
  color: var(--color-text-secondary, #5A5A5A);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.18s ease-out;
}
.digit-stepper-item.completed .digit-step-circle,
.digit-stepper-item.complete [class*="step-circle"],
[class*="step-completed"] [class*="step-circle"] {
  background-color: var(--color-primary-1, #204F37);
  border-color: var(--color-primary-1, #204F37);
  color: var(--color-page-bg, #FFFFFF);
}
.digit-stepper-item.active .digit-step-circle,
.digit-stepper-item.current [class*="step-circle"],
[class*="step-current"] [class*="step-circle"] {
  border-color: var(--color-primary-1, #204F37);
  color: var(--color-primary-1, #204F37);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary-1, #204F37) 18%, transparent);
}
.digit-stepper-line, [class*="step-line"], [class*="step-connector"] {
  background-color: var(--color-input-border-default, #D1D5DB);
}
.digit-stepper-line.completed, [class*="step-line"][class*="complete"] {
  background-color: var(--color-primary-1, #204F37);
}

/* 32. Scrollbars — thin rail, subtle thumb, brand-tinted on hover.
 *     Webkit browsers + Firefox via scrollbar-color. */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-grey-disabled, #C5C5C5) transparent;
}
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-track {
  background-color: transparent;
}
*::-webkit-scrollbar-thumb {
  background-color: var(--color-grey-disabled, #C5C5C5);
  border-radius: 4px;
  transition: background-color 0.15s ease-out;
}
*::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-primary-1, #204F37);
}

/* 33. Search bar — Figma: leading search-glyph, clear-X on right, focus
 *     ring. The DIGIT search composer wraps an input + icon. */
.digit-search-bar, .digit-search,
[class*="search-bar"], [class*="search-form"] {
  background-color: var(--color-input-bg, #FFFFFF);
  border: 1px solid var(--color-input-border-default, #D1D5DB);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.15s ease-out, box-shadow 0.15s ease-out;
}
.digit-search-bar:focus-within, .digit-search:focus-within {
  border-color: var(--color-input-border-focus, var(--color-primary-1, #204F37));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-input-border-focus, #c84c0e) 18%, transparent);
}
.digit-search-bar svg, .digit-search svg {
  fill: var(--color-text-secondary, #5A5A5A);
  flex-shrink: 0;
}

/* 34. File dropzone — Figma: dashed border, brand-tinted on drag-over,
 *     centered helper text. */
.digit-upload-area, .digit-drop-area, .drop-area,
[class*="dropzone"], [class*="upload-area"] {
  background-color: var(--color-page-secondary-bg, #FAFAFA);
  border: 2px dashed var(--color-input-border-default, #D1D5DB);
  border-radius: 8px;
  color: var(--color-text-secondary, #5A5A5A);
  transition: border-color 0.15s ease-out, background-color 0.15s ease-out;
  cursor: pointer;
}
.digit-upload-area:hover, .digit-drop-area:hover {
  border-color: var(--color-primary-1, #204F37);
}
.digit-upload-area.active, .digit-drop-area.active,
[class*="dropzone"][class*="active"] {
  border-color: var(--color-primary-1, #204F37);
  background-color: var(--color-primary-1-bg, #FFF4D7);
}

/* 35. Empty states — Figma: centered illustration + helper text + optional
 *     CTA. Don't restructure layout; just refine typography. */
.digit-empty-state, [class*="empty-state"], [class*="no-results"],
.digit-no-result, [class*="NoResultsFound"] {
  color: var(--color-text-secondary, #5A5A5A);
  text-align: center;
}
.digit-empty-state h3, [class*="empty-state"] h3,
[class*="no-results"] h3 {
  color: var(--color-text-primary, #363636);
  font-weight: 600;
  margin-top: 16px;
}

/* 36. Skeleton loaders — soft shimmer over neutral block. Brand-agnostic
 *     (intentionally — should look the same across themes). */
@keyframes digit-skeleton-shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
.digit-skeleton, [class*="skeleton"]:not([class*="skeleton-button"]) {
  background-color: var(--color-page-secondary-bg, #FAFAFA);
  background-image: linear-gradient(
    90deg,
    var(--color-page-secondary-bg, #FAFAFA) 0px,
    color-mix(in srgb, var(--color-grey-mid, #EEEEEE) 80%, transparent) 40px,
    var(--color-page-secondary-bg, #FAFAFA) 80px
  );
  background-size: 200px 100%;
  background-repeat: no-repeat;
  border-radius: 4px;
  animation: digit-skeleton-shimmer 1.4s ease-in-out infinite;
}

/* 37. Date picker — Figma: today is primary-1 outline, selected is filled,
 *     range hover is primary-1-bg wash. */
.react-datepicker, [class*="datepicker"]:not([class*="datepicker__input"]) {
  border: 1px solid var(--color-card-border, #E5E7EB) !important;
  border-radius: 8px !important;
  background-color: var(--color-page-bg, #FFFFFF) !important;
  box-shadow: 0 6px 16px -4px rgba(16, 24, 40, 0.10),
              0 4px 6px -2px rgba(16, 24, 40, 0.05);
  font-family: inherit !important;
}
.react-datepicker__header {
  background-color: var(--color-page-secondary-bg, #FAFAFA) !important;
  border-bottom: 1px solid var(--color-card-border, #E5E7EB) !important;
}
.react-datepicker__current-month,
.react-datepicker__day-name {
  color: var(--color-text-primary, #363636) !important;
  font-weight: 600 !important;
}
.react-datepicker__day {
  color: var(--color-text-primary, #363636) !important;
  border-radius: 4px !important;
  transition: background-color 0.1s ease-out, color 0.1s ease-out;
}
.react-datepicker__day:hover {
  background-color: var(--color-primary-1-bg, #FFF4D7) !important;
  color: var(--color-primary-1, #204F37) !important;
}
.react-datepicker__day--today {
  font-weight: 700 !important;
  color: var(--color-primary-1, #204F37) !important;
}
.react-datepicker__day--selected,
.react-datepicker__day--in-range,
.react-datepicker__day--in-selecting-range {
  background-color: var(--color-primary-1, #204F37) !important;
  color: var(--color-page-bg, #FFFFFF) !important;
}
.react-datepicker__day--keyboard-selected {
  background-color: var(--color-primary-1-bg, #FFF4D7) !important;
  color: var(--color-primary-1, #204F37) !important;
}
.react-datepicker__day--disabled {
  color: var(--color-text-disabled, #9CA3AF) !important;
  cursor: not-allowed !important;
}

/* 38. Status dots in lists — Figma: tiny circle in status color before list
 *     item text. Targets bare list items inside cards. */
.digit-list-item-dot, [class*="list-dot"], [class*="status-dot"] {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  flex-shrink: 0;
}
.digit-list-item-dot.success, [class*="list-dot"][class*="success"] {
  background-color: var(--color-status-success-text, var(--color-success, #00703C));
}
.digit-list-item-dot.error, [class*="list-dot"][class*="error"] {
  background-color: var(--color-status-error-text, var(--color-error, #D4351C));
}
.digit-list-item-dot.warning, [class*="list-dot"][class*="warning"] {
  background-color: var(--color-status-warning-text, #9E5F00);
}
.digit-list-item-dot.info, [class*="list-dot"][class*="info"] {
  background-color: var(--color-status-info-text, #0057BD);
}

/* 39. Card-header vs page-heading hierarchy — Figma differentiates these:
 *     page-heading is largest + heaviest, card-header is mid, body smallest.
 *     Use weight + size for distinction (no padding changes). */
[class*="page-heading"], .digit-page-title,
h1.digit-card-header, h1[class*="title"] {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--color-text-heading, var(--color-primary-1, #204F37));
}
[class*="card-header"]:not([class*="card-header-with-options"]),
.digit-card-header,
h2.digit-card-header, h2[class*="title"] {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--color-text-heading, var(--color-primary-1, #204F37));
}
[class*="section-header"], .digit-section-header,
h3.digit-card-header, h3[class*="title"] {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text-heading, var(--color-primary-1, #204F37));
}

/* 40. Action / icon buttons — Figma: square hit area, subtle bg on hover,
 *     brand-color on press. */
.digit-icon-button, [class*="icon-button"], button[class*="icon-only"] {
  background-color: transparent;
  border: none;
  border-radius: 4px;
  padding: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease-out, color 0.15s ease-out;
}
.digit-icon-button:hover:not(:disabled),
[class*="icon-button"]:hover:not(:disabled) {
  background-color: var(--color-page-secondary-bg, #FAFAFA);
  color: var(--color-primary-1, #204F37);
}
.digit-icon-button:focus-visible {
  outline: 2px solid var(--color-primary-1, #204F37);
  outline-offset: 1px;
}

/* 41. Code / pre / kbd — surface for technical text within content. */
code, pre, kbd, samp,
.digit-code, [class*="code-block"] {
  background-color: var(--color-page-secondary-bg, #FAFAFA);
  border: 1px solid var(--color-card-border, #E5E7EB);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: var(--color-text-primary, #363636);
}
pre code {
  border: none;
  padding: 0;
  background-color: transparent;
}
pre, [class*="code-block"] {
  padding: 12px 16px;
  overflow-x: auto;
}

/* 42. Horizontal rules — Figma: subtle 1px hairline in card-border tone. */
hr, .digit-divider, [class*="divider"]:not([class*="vertical"]) {
  border: none;
  border-top: 1px solid var(--color-card-divider, var(--color-card-border, #E5E7EB));
  margin: 16px 0;
}

/* 43. Inline-action chips — Figma: light tint bg + brand text + small.
 *     Used for filter chips, applied filters etc. */
.digit-chip, .digit-filter-chip, .digit-applied-filter,
[class*="chip"]:not([class*="chip-container"]) {
  background-color: var(--color-primary-1-bg, var(--color-primary-selected-bg, #FFF4D7));
  color: var(--color-primary-1, #204F37);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background-color 0.15s ease-out;
}
.digit-chip:hover {
  background-color: color-mix(in srgb, var(--color-primary-1, #204F37) 15%, var(--color-page-bg, #FFFFFF));
}

/* 44. Button-group / segmented control — Figma: tabs-like but inline,
 *     active segment fills with primary-1-bg + primary-1 text. */
.digit-button-group, [class*="button-group"]:not([class*="button-group-container"]) {
  display: inline-flex;
  background-color: var(--color-page-secondary-bg, #FAFAFA);
  border: 1px solid var(--color-card-border, #E5E7EB);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}
.digit-button-group button,
[class*="button-group"] > button {
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  font-weight: 500;
  font-size: 13px;
  color: var(--color-text-secondary, #5A5A5A);
  cursor: pointer;
  transition: background-color 0.15s ease-out, color 0.15s ease-out;
}
.digit-button-group button:hover,
[class*="button-group"] > button:hover {
  color: var(--color-primary-1, #204F37);
}
.digit-button-group button.active,
.digit-button-group button[aria-pressed="true"],
[class*="button-group"] > button[aria-current="true"] {
  background-color: var(--color-primary-1-bg, #FFF4D7);
  color: var(--color-primary-1, #204F37);
  font-weight: 600;
}

/* 45. Inline links inside body text — Figma: same as default anchor but
 *     with subtle underline on hover, not by default (cleaner reading). */
.digit-card p a, .digit-card-text a,
.digit-paragraph a, p a {
  color: var(--color-button-tertiary-text, var(--color-primary-1, #204F37));
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease-out, color 0.15s ease-out;
}
.digit-card p a:hover, .digit-card-text a:hover,
.digit-paragraph a:hover, p a:hover {
  border-bottom-color: var(--color-primary-1, #204F37);
}

/* 46. Notification dot / badge counter — Figma: small primary-2 dot or
 *     pill with white count, top-right of icon. */
.digit-notification-badge, [class*="notification-badge"],
[class*="badge-count"] {
  background-color: var(--color-primary-2, var(--color-primary-main, #FEC931));
  color: var(--color-text-primary, #0B0C0C);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* 47. Body text rhythm — comfortable line-height, tabular-figures for
 *     numbers in dense data displays. */
body, .digit-body-text {
  line-height: 1.5;
}
[class*="number"], [class*="amount"], [class*="count"],
.digit-number, .digit-amount, table td.digit-numeric {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* ─── v3 polish — login + bare element coverage (post-PR-77 walk) ───────── */

/* 48. <header> tag + page-subheading classes — block 5 missed these. */
html header, html .digit-header-content,
html .digit-form-card-subheader,
html .loginCardSubH,
html [class*="form-card-subheader"],
html [class*="page-subheader"] {
  color: var(--color-text-heading, var(--color-primary-1, #204F37));
}

/* Login form centering — original layout pairs the form with a
 * citizen-banner.svg illustration on the right (`.banner` block 49
 * suppresses that asset because it had a leaked-tagline). With the
 * banner gone, the form sits flush-left at x=0 with empty grey on
 * the right. Center the form horizontally and vertically. */
.citizen-form-wrapper {
  width: 100% !important;
  justify-content: center !important;
  align-items: center !important;
  min-height: calc(100vh - 64px - 60px) !important;
  margin: 0 !important;
}
.citizen-form-wrapper > .digit-app-container {
  margin-right: 0;
}
/* Push the primary CTA (Next, Save, etc.) to the right of its card.
 * Form cards are `display:flex flex-direction:column` (e.g.
 * `.digit-card-component` for login, bare `<section>` for profile-edit
 * surfaces). `align-self: flex-end` floats the CTA right when the
 * parent is a flex column. Covers both classed `.digit-button-primary`
 * and bare `<button>` text CTAs. */
.digit-card-component > button.digit-button-primary,
.digit-app-container > button.digit-button-primary,
.card > button.submit-bar,
.card > button[class*="submit-bar"],
button:not([class]):not(:has(> svg)):not(:has(> img)) {
  align-self: flex-end !important;
}

/* Footer bg — vendor sets `.citizen-home-footer { background: #FAFAFA }`
 * which is just slightly off-white. The body bg is #EEEEEE (slightly
 * darker grey) so the footer reads as a separate white panel. Match
 * the body bg explicitly so the footer blends with the surrounding
 * surface. (Note: --color-page-bg in this tenant resolves to white
 * via legacy mapping, so we use a literal #EEEEEE matching body.) */
html .citizen-home-footer {
  background-color: #EEEEEE !important;
}

/* Citizen-only: the profile-pic wrapping `<section>` ships with
 * `background: #EEEEEE` which paints a darker panel inside the
 * otherwise white card, making the avatar area look like a separate
 * sub-panel — visually heavy on the citizen Edit Profile surface.
 * Employee surface keeps its grey backing (matches the design there). */
.user-profile.citizen section {
  background-color: transparent !important;
}

/* Sidebar profile name (.label-text under .profile-section) renders
 * inside a `.label-container.name-Profile` that sizes to ~95px content
 * width, with .label-text adding `padding: 0 16px`. That leaves ~63px
 * for the name — short names like "Gurjeet" wrap mid-word ("Gurj /
 * eet"). Widen the container to use the full 219px sidebar and tighten
 * the side padding so the full name renders on a single line. */
.SideBarStatic .profile-section .label-container,
.SideBarStatic .profile-section .label-container.name-Profile {
  width: 100% !important;
  text-align: center;
}
.SideBarStatic .profile-section .label-text {
  padding: 0 8px !important;
  text-align: center;
  width: 100% !important;
  white-space: normal;
}
/* Camera/upload affordance — smaller, sits a bit lower than vendor's
 * default. Vendor positions inline at `bottom: -24px` with a 40x40
 * SVG; user prefers ~28x28 with `bottom: -32px`. !important overrides
 * the inline style. */
.user-profile section button[style*="bottom"] svg {
  width: 28px !important;
  height: 28px !important;
}
.user-profile section button[style*="bottom"] {
  bottom: -32px !important;
}

/* 49. Login banner — drop the citizen-banner.svg illustration which
 *     contains a partial tagline ("...the resolution") that peeks out
 *     beside the login card and looks like leaked draft copy. A solid
 *     field reads cleaner.
 *
 *     #2038: the field was a literal #0B4B66, so the pre-auth pages kept
 *     upstream's teal no matter what the tenant theme said. Route it
 *     through the header token (the same navy the top bar wears once you
 *     are inside) and keep the old teal as the fallback, so a deployment
 *     with no ThemeConfig looks exactly as it does today. */
.banner, .banner-container,
[class*="banner-container"]:not([class*="banner-text"]) {
  background-image: none !important;
  /* Keyed on digitv2-header-sidenav, not header-bg. Two reasons.
   *
   * The vendored :root defines header-bg (#22394D), so a
   * `var(--color-header-bg, …)` chain can never reach its fallback — a tenant
   * that never set the token would silently take that generic value rather
   * than anything of its own.
   *
   * And header-bg is the TOP BAR's surface, which a theme may legitimately set
   * light: the navy palette in this ticket uses a white top bar, which would
   * be a white login banner. digitv2-header-sidenav is the tenant's dark brand
   * surface, which is what this full-bleed banner wants, and `primary-1` fans
   * out to it, so every v3 record fills it in. Bomet resolves to its #1565A8
   * rather than the old hardcoded teal — deliberate: the banner now follows
   * the tenant instead of ignoring it. */
  background-color: var(--color-digitv2-header-sidenav, #0B4B66) !important;
}

/* 50b. Tertiary action labels (.primary-label-btn, .link-label) — upstream
 *      compiled-Tailwind rule sets color to a literal hex (DIGIT orange or
 *      kenya-yellow primary-main). Used for "Forgot Password?", "Register
 *      with email", inline link-style labels in cards. Route through
 *      tertiary-text var with a neutral link-blue fallback so pre-MDMS
 *      surfaces stay neutral; post-MDMS picks up tenant green. */
html .primary-label-btn, html [class*="primary-label-btn"],
html .link-label, html label.link-label {
  color: var(--color-button-tertiary-text, var(--color-link-normal, #1D70B8)) !important;
  transition: color 0.15s ease-out;
}
html .primary-label-btn:hover, html [class*="primary-label-btn"]:hover,
html .link-label:hover, html label.link-label:hover {
  color: var(--color-link-hover, #003078) !important;
}
html .primary-label-btn svg, html .primary-label-btn svg path,
html .link-label svg, html .link-label svg path {
  fill: var(--color-button-tertiary-text, var(--color-link-normal, #1D70B8));
}

/* 50. .digit-button-link text (Forgot Password, Privacy Policy) — coral
 *     in DIGIT defaults, should follow tertiary-text role. Fallback chain
 *     hits --color-link-normal (a neutral blue in vendor defaults) before
 *     primary-1 — so pre-MDMS pages render neutral, post-MDMS picks up
 *     the tenant's tertiary-text/link color. */
html .digit-button-link,
html .digit-button-link .digit-button-label,
html .digit-button-link h1, html .digit-button-link h2, html .digit-button-link h3,
html .digit-button-link span,
html .digit-button-link .icon-label-container,
html [class*="button-link"] .digit-button-label,
html .icon-label-container.link h1,
html .icon-label-container.link h2,
html .icon-label-container.link h3 {
  color: var(--color-button-tertiary-text, var(--color-link-normal, #1D70B8)) !important;
}
html .digit-button-link svg path,
html [class*="button-link"] svg path {
  fill: var(--color-button-tertiary-text, var(--color-link-normal, #1D70B8));
}
html .digit-button-link:hover,
html .digit-button-link:hover .digit-button-label,
html .digit-button-link:hover h2 {
  color: var(--color-link-hover, #003078) !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 51. Tenant title in login banner header — slight weight bump. */
.bannerHeader p, .bannerHeader > div p {
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* 53. Unify back-button variants — DIGIT ships two back-button widgets
 *      that look noticeably different out of the box:
 *
 *      A) <div class="digit-back-link"> > <div class="digit-back-link-icon">
 *         + <div class="digit-back-link-label"> — used on /citizen/all-services
 *         and similar. Renders label at 20px, container is full-width 24px-tall,
 *         and (vendor bug) the chevron SVG points RIGHT (forward arrows!) which
 *         is semantically wrong for a Back button.
 *      B) <div class="back-btn2"> > <svg> + <p>Back</p> — used on /pgr/*
 *         citizen surfaces. Label at 16px, compact 50x56 container with
 *         16px vertical breathing room from the inner <p>'s margin, and the
 *         chevron SVG correctly points LEFT.
 *
 *      User flagged the inconsistency: complaint-type uses (B) which "looks
 *      better than the one outside" — same chevrons, same padding. Bring (A)
 *      to (B)'s scale: 16px label, 16px vertical padding, mirror the chevron
 *      so it points left. */
/* Vendor ships TWO competing rules: `.digit-back-link .digit-back-link-label
 * { font-size: 1rem }` then `{ font-size: 1.25rem }` (specificity 0,2,0);
 * a plain `html .digit-back-link-label` (0,1,1) loses. Match specificity. */
html .digit-back-link .digit-back-link-label,
html .digit-back-link-label {
  font-size: 16px !important;
  font-weight: 500;
  line-height: 1.5;
}
html .digit-back-link {
  gap: 4px;
  align-items: center;
  padding: 16px 0;
  height: auto;
}
html .digit-back-link .digit-back-link-icon,
html .digit-back-link-icon {
  display: inline-flex;
  align-items: center;
  width: 19px;
  height: 19px;
  /* Replace the vendor double-chevron SVG (which renders as ⏵⏵ pointing
   * forward — semantically wrong for Back) with the same single-chevron
   * (◂) used by `.back-btn2` on /pgr/* surfaces. mask-image lets the
   * glyph inherit currentColor / theme so MDMS theming keeps working. */
  background-color: var(--color-button-tertiary-text, var(--color-primary-1, #204F37));
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='m15 18-6-6 6-6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='m15 18-6-6 6-6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
html .digit-back-link .digit-back-link-icon svg,
html .digit-back-link-icon svg {
  display: none;
}

/* 52. .h1 — vendor digit-ui-css.css ships a compiled-Tailwind rule
 *     `.h1 { color: var(--color-text-primary, #0B0C0C) !important }` which
 *     drags every page-heading into body-text gray (#363636) instead of the
 *     designer's heading green. !important matches !important; we still
 *     resolve through --color-text-heading, so MDMS tenant theming wins. */
html .h1, html header.h1, html [class~="h1"] {
  color: var(--color-text-heading, var(--color-primary-1, #204F37)) !important;
}

/* Citizen language-selection / page-based-input cards — vendor sets
 * `.selection-card-wrapper` to `width: calc(100% - 219px); margin: 16px 0 0`
 * (the 219px reserved for an old desktop sidebar that's now collapsed
 * to ~48px). The wrapper sat flush-left with a 219px empty band on the
 * right and only top-aligned, so the inner `.card` read as off-center
 * both horizontally and vertically (egovernments/CCRS#519). Drop the
 * sidebar reservation and turn the wrapper into a flex centering
 * container — same affordance as the login surface. */
.selection-card-wrapper {
  width: 100% !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  /* viewport minus 56px topbar minus ~70px footer */
  min-height: calc(100vh - 130px) !important;
}
.selection-card-wrapper .card {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Sidebar drawer bg — vendor wires `.digit-msb-sidebar.dark` to
 * `--color-digitv2-header-sidenav` (defaults to #0B4B66, MDMS sets it to
 * #204D56 blue-teal on Nai Pepea), but the topbar uses
 * `--color-header-bg` which MDMS sets to #204F37 (kenya-green). The
 * drawer therefore reads off-brand against the topbar/footer palette on
 * BOTH desktop and mobile. Route the drawer (and the
 * `.digit-msb-sidebar-bottom` Logout area) through `--color-sidebar-bg`
 * (which MDMS also sets to the green) so the two surfaces match. */
.digit-msb-sidebar.dark,
.digit-msb-sidebar-bottom.dark,
.digit-msb-sidebar.dark .digit-msb-sidebar-bottom,
/* Desktop static sidebars use different selectors (`.digit-sidebar`,
 * `.citizen .sidebar`, `.employee .sidebar`) but read from the same
 * `--color-digitv2-header-sidenav` var. Recolor them all here. */
.digit-sidebar,
.citizen .sidebar,
.employee .sidebar {
  background-color: var(--color-sidebar-bg, var(--color-header-bg, var(--color-primary-1, #204F37))) !important;
}

/* ────────────────────────────────────────────────────────────────────────
 * Mobile / narrow-viewport responsiveness
 * ────────────────────────────────────────────────────────────────────────
 * Vendor digit-ui was originally tuned for desktop municipal-employee
 * surfaces; on a phone-sized viewport (<= 600px) several fixed-width and
 * fixed-flex layouts crowd or wrap awkwardly. These media queries tighten
 * the citizen + employee flows for mobile without touching desktop. */
@media (max-width: 600px) {
  /* Inbox Filter / Search popup — vendor's PopUp wrapper sits at 91%
   * width but the inner Filter form (`.popup-module > .digit-search-wrapper`)
   * has a 480px fixed width that overflows the modal, clipping the
   * complaint-subtype dropdown and the "ES_COMMON_SEARCH_BY" header on
   * mobile. Make the modal go fullscreen on phones and force every
   * inner container to fill the row. */
  .digit-popup-overlay .digit-popup-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    margin: 0 !important;
    top: 50% !important;
    left: 50% !important;
  }
  .digit-popup-wrapper .popup-module,
  .digit-popup-wrapper .digit-search-wrapper,
  .digit-popup-wrapper .digit-search-wrapper > div,
  .digit-popup-wrapper .popup-label,
  .digit-popup-wrapper .digit-label-field-pair {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  /* Stack the LabelFieldPair (label on top, field below) so the two-
   * column desktop layout doesn't crush dropdowns at narrow widths. */
  .digit-popup-wrapper .digit-label-field-pair {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 4px !important;
  }
  /* Header row — flex so the "Search by" title doesn't get crammed
   * against the close-X. */
  .digit-popup-wrapper .popup-label .header {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    overflow-wrap: anywhere !important;
  }
  /* Filter / Search form layout — vendor renders the form fields in a
   * `.digit-search-field-wrapper` grid with three fixed 80px columns on
   * mobile, so each dropdown / radio gets crushed and labels wrap
   * char-by-char. Collapse the grid to a single column at full width. */
  .digit-popup-wrapper .digit-search-field-wrapper,
  .digit-popup-wrapper .digit-search-field-wrapper.inbox,
  .digit-popup-wrapper .digit-search-field-wrapper.vertical-gap {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  /* Each grid cell child should also span the row so dropdowns aren't
   * clipped to half-width. */
  .digit-popup-wrapper .digit-search-field-wrapper > * {
    width: 100% !important;
    max-width: 100% !important;
    grid-column: 1 / -1 !important;
  }
  /* Filter / Search popup action-bar — `.digit-action-bar-wrap` is
   * `position:fixed; bottom:0; height:128px`, which floats over the
   * scrollable form content and hides the last few status checkboxes
   * behind the Clear All / Apply buttons. Reserve scroll space at the
   * bottom of `.digit-popup-children-wrap` so all form content is
   * reachable. */
  .digit-popup-wrapper .digit-popup-children-wrap {
    padding-bottom: 144px !important;
  }
  /* Also: when Clear All and Apply stack vertically the parent
   * `.digit-search-button-wrapper.inbox` has display: block so the two
   * buttons sit flush. Switch to flex-column with a gap so there's
   * breathing room between them. */
  .digit-popup-wrapper .digit-search-button-wrapper.inbox,
  .digit-popup-wrapper .digit-search-button-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  /* Match the Clear All height to the Apply submit-bar (40px) so the
   * stacked pair looks balanced. The `.large` button variant inflates
   * the inner H2's vertical margins (16.6px each side), pushing the
   * button to 71px tall — squash both. */
  .digit-popup-wrapper .digit-search-button-wrapper .digit-button-secondary,
  .digit-popup-wrapper .digit-search-button-wrapper .digit-button-secondary.large {
    height: 40px !important;
    min-height: 40px !important;
    padding: 8px 28px !important;
  }
  .digit-popup-wrapper .digit-search-button-wrapper .digit-button-secondary .digit-button-label,
  .digit-popup-wrapper .digit-search-button-wrapper .digit-button-secondary.large .digit-button-label {
    margin: 0 !important;
    line-height: 1 !important;
  }

  /* Inside the filter popup, the checkbox row visually starts ~23px in
   * from the Status label because the (opacity:0) input still takes
   * 16px of layout space before the visible square. Position the input
   * absolutely so the visible square sits flush at the container's
   * left edge — same place the labels above it start. */
  .digit-popup-wrapper .digit-checkbox-container > div > input.input,
  .digit-popup-wrapper .digit-checkbox-container > div > input.input-emp {
    position: absolute !important;
    width: 24px !important;
    height: 24px !important;
    left: 0 !important;
    top: 0 !important;
  }
  .digit-popup-wrapper .digit-checkbox-container > div {
    position: relative !important;
    width: 24px !important;
  }

  /* Submit-bar / "Next" / "Submit" CTA — vendor sets `min-width: 15rem`
   * (240px) which on a 360px viewport leaves the button visibly cramped
   * with awkward side-margins. Let it stretch full width with side
   * padding so it matches the form card. */
  .digit-submit-bar,
  button.digit-submit-bar,
  button[class*="submit-bar"],
  .digit-button-primary {
    min-width: 0 !important;
    width: 100% !important;
  }

  /* My Complaints empty-state copy — vendor's
   * `.pgr-citizen-wrapper .applications-list-container p { line-height: 0 !important }`
   * is intended to tighten the date/badge stacking inside complaint
   * list cards, but on the empty-state `<p>` (a 2-line paragraph
   * "You haven't logged any complaints yet.\nStart with one, make a
   * change.") it collapses both lines into the same baseline so the
   * two render on top of each other as garbled text. Restore normal
   * line-height on the empty-state card. */
  .pgr-citizen-wrapper .applications-list-container .employeeCard p,
  .pgr-citizen-wrapper .applications-list-container .empty-results-section p {
    line-height: 1.5 !important;
  }

  /* Action bar on multi-step forms — vendor lays out
   * `.digit-action-bar-wrap` as a flex row with NEXT and BACK side-by-
   * side. On 320–360px viewports BACK steals 200px and crushes NEXT
   * down to a 56px wide pill that ellipses its label ("NEX…" or
   * empty). Stack the buttons vertically (NEXT on top, BACK below) so
   * each one gets full row width. */
  .digit-action-bar-wrap {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .digit-action-bar-wrap > button,
  .digit-action-bar-wrap > .digit-button-secondary,
  .digit-action-bar-wrap > .digit-submit-bar {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    /* BACK button ships with `margin-left: 4rem` to space it from NEXT
     * in the desktop row layout. In our stacked layout that pushes the
     * 300px-wide button past the viewport right edge — zero the inline
     * margin so each row aligns flush with the action-bar. */
    margin: 0 !important;
  }
  /* Bare-text Save/Submit `<button>` (the unclassed CTA shim) — drop
   * the desktop-only 180px max-width so it stretches with the row. */
  button:not([class]):not(:has(> svg)):not(:has(> img)) {
    max-width: 100% !important;
    width: 100% !important;
    margin-right: 0 !important;
  }

  /* Card rows w/ label+value — vendor renders these as a two-column
   * flex row at fixed widths, which breaks values mid-word and stacks
   * labels of adjacent rows on top of each other on narrow viewports.
   * Seen on citizen Complaint Summary, employee Employee Details, etc.
   * Stack vertically anywhere `.row` lives inside an `*-data-table`. */
  [class*="data-table"] .row,
  .digit-viewcard-field-pair {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    height: auto !important;
  }
  [class*="data-table"] .row > * {
    width: 100% !important;
    max-width: 100% !important;
  }
  /* Status pill cells (`.sla-cell-success`, `.sla-cell-error`, etc.)
   * inherited the row-child 100% width and stretched into a full-width
   * bar instead of a pill. Force them back to inline-block + auto width
   * so the green/red/yellow chip hugs its label. */
  [class*="data-table"] .row [class*="sla-cell"],
  [class*="data-table"] .row [class*="status-cell"],
  [class*="data-table"] .row [class*="-pill"],
  [class*="data-table"] .row [class*="-badge"] {
    display: inline-block !important;
    width: auto !important;
    max-width: 100% !important;
  }

  /* Page-level horizontal padding — page-headers / Back-link hugged the
   * left edge of the viewport while content cards used 16px gutters,
   * making the breadcrumb feel disconnected. Match. */
  .digit-back-link,
  .complaint-summary > h1,
  .complaint-summary > h2 {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Privacy-checkbox row — already gets a positive margin-top via the
   * non-mobile rule above; on phones, the surrounding card uses tighter
   * gutters so the row's auto margin (default browser) makes it look
   * misaligned with the form fields above. Pull it back into the gutter. */
  .digit-privacy-checkbox,
  .digit-privacy-checkbox-align {
    flex-wrap: wrap;
  }

  /* Card max-width / margin tweaks — on mobile prefer no horizontal
   * margin so the card uses the full screen width minus the existing
   * 16px page padding. */
  .digit-card-component,
  .card {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Employee landing-page module cards — vendor sets `max-width: 30rem`
   * (480px) which on a 360px viewport overflows the right edge, hiding
   * "Active Employees" / "CONFIGURE_MASTER" off-screen. Constrain. */
  .digit-card-component.digit-landing-page-card {
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  .digit-home-moduleCardWrapper,
  .digit-landing-page-wrapper,
  .homeWrapper {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  /* Employee header bar — the topbar can have multiple logos / brand
   * elements that overlap on a narrow viewport. Tighten gap. */
  .digit-employee-header,
  .digit-topbar {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  /* Vendor renders both `.digit-header-img-ulb-wrapper-mobileview` and
   * `.digit-topbar-ulb-mobileview` simultaneously on the employee
   * surface, producing two stacked NCCG logos in the header. The
   * wrapper version covers the same role; hide the redundant topbar
   * variant on mobile — and with it the divider that was meant to
   * separate the two, which was left standing next to nothing and read
   * as a stray caret beside the logo (#2038 review round 2). */
  .digit-topbar .digit-topbar-ulb-mobileview,
  .digit-topbar .digit-header-img-ulb-wrapper-mobileview .topbar-divider {
    display: none !important;
  }

  /* Citizen page top padding — vendor sets `.main.center-container`
   * `padding-top: 88px` for the fixed header (~78px tall on mobile).
   * Just clear the header (78px → use 80 for a hair of breathing room)
   * and drop the cumulative downstream margins that compounded below
   * it. Selector is scoped to the page-level `.main.center-container`
   * to avoid inflating nested `.center-container.back-wrapper` inside
   * the navbar, which uses the same class. */
  .main.center-container.citizen-home-container {
    padding-top: 80px !important;
  }
  .user-profile.citizen > section {
    margin-top: 0 !important;
  }
  .main.center-container.citizen-home-container .digit-back-link {
    padding-top: 0 !important;
  }

  /* Citizen surface horizontal padding — page wrapper had a 24px left
   * inset; trim so cards align flush with the edge gutter. */
  .user-profile.citizen {
    margin: 0 4px !important;
  }

  /* Employee Edit Profile — vendor sets `.user-profile.employee
   * { margin-top: 6rem; margin-left: 4.5rem }` to position the card
   * within the desktop sidebar layout. On mobile that produces a 96px
   * top gap and a 72px left inset that crops the card to ~210px wide.
   * Reset to: clear the 56px topbar with 8px breathing (= 64px), and
   * use a small horizontal gutter. */
  .user-profile.employee {
    margin: 64px 8px 0 !important;
  }

  /* Citizen Edit Profile labels — `digit-ui-health-css` ships a stray
   * `.user-profile { margin-top: 6rem; margin-left: 3.5rem }` that leaks
   * into the citizen profile page (since the labels carry the
   * `.user-profile` class), creating a 96px gap above each label and a
   * 56px left indent. On mobile that pushes Name / Gender / Email /
   * etc. into a sparse, ragged layout. Reset to sensible spacing
   * scoped to citizen surface to avoid disturbing health-module pages. */
  .user-profile.citizen .digit-card-label.user-profile,
  .user-profile.citizen .user-profile {
    margin-top: 0 !important;
    margin-left: 0 !important;
  }

  /* "Powered by DIGIT" footer — vendor pins `.employee .citizen-home-footer`
   * to `position: fixed; bottom: 0`, so on mobile (where the page is taller
   * than the viewport) the footer covers form fields below it (Gender,
   * Edit Profile, etc.). Un-fix it on phones so it sits at the end of
   * content and the full form is reachable. */
  .citizen-home-footer,
  .employee .citizen-home-footer {
    position: static !important;
  }

  /* Sidebar drawer position — vendor's `.digit-msb-sidebar` is
   * `position:fixed; top:0` with z-index below the topbar's, so the
   * drawer paints from y=0 BEHIND the topbar (which is z:9999), and the
   * drawer's `height: 93%` leaves a gap at the bottom. Push the drawer
   * down past the topbar (~64px) and stretch it to the viewport bottom
   * so it reads as a proper full-height sidebar. */
  .digit-msb-sidebar {
    /* Flush against the bar, whatever height it is at this width —
     * --employee-header-h already carries the per-breakpoint value. */
    top: var(--employee-header-h, 56px) !important;
    height: calc(100vh - var(--employee-header-h, 56px)) !important;
    max-height: calc(100vh - var(--employee-header-h, 56px)) !important;
  }
  .digit-employee-sidemenu,
  .digit-employee-sidemenu > *:first-child,
  .digit-side-bar,
  .digit-side-bar > *:first-child,
  .citizen .sidebar,
  .employee .sidebar {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* Sidebar Logout button — the actual structure is
   * `.digit-msb-sidebar-bottom > button.digit-button-secondary > .icon-label-container > h2.digit-button-label`,
   * and the `.digit-button-label` h2 inherits yellow primary-2
   * (`--color-button-secondary-text` resolves to brand yellow on
   * Nairobi), which on the white button bg reads almost invisibly.
   * Force the label + svg to text-primary so it's legible. */
  .digit-msb-sidebar-bottom .digit-button-secondary .digit-button-label,
  .digit-msb-sidebar-bottom .digit-button-secondary,
  .digit-msb-sidebar-bottom .digit-button-secondary .icon-label-container {
    color: var(--color-text-primary, #0B0C0C) !important;
  }
  .digit-msb-sidebar-bottom .digit-button-secondary svg,
  .digit-msb-sidebar-bottom .digit-button-secondary svg path {
    fill: var(--color-text-primary, #0B0C0C) !important;
    color: var(--color-text-primary, #0B0C0C) !important;
  }

  /* Employee main shell — the desktop layout reserves 60px on the left
   * for the static sidebar inside `.main.digit-home-main`, plus 12px
   * on `.ground-container`, plus 16px on `.digit-landing-page-wrapper`.
   * On mobile the sidebar is collapsed into a hamburger so reserving
   * 88px of left gutter wastes ~26% of a 360px viewport. Zero them. */
  .main.digit-home-main {
    margin-left: 0 !important;
  }
  .ground-container.digit-home-ground {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .digit-landing-page-wrapper {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }
}

/* ======================================================================
 * Unified input / dropdown / textarea chrome.
 *
 * Convergence target — every text input, textarea, native select, v2
 * Select trigger, and vendor digit-* dropdown wrapper across citizen +
 * employee + workbench surfaces shares this look:
 *   • 1px solid `var(--color-border)` (light gray) — no dark/black
 *   • 6px radius — no boxy 0-radius
 *   • 44px height (textarea = auto, min 88px)
 *   • surface bg, no shadows
 *   • hover/focus → brand border
 *
 * OTP boxes (`.v2-otp-box`), the citizen login phone input
 * (`.v2-login-phone-input` / `#login-mobile`), the profile phone input
 * (`.v2-profile-phone-input`) — both sit flush inside a bordered
 * prefix wrapper, so a border of their own would read as a box in a
 * box — the legacy employee
 * sandbox OTP (`.sandbox-otp-input`), and the inner display elements
 * inside dropdowns (`.digit-dropdown-employee-select-wrap--elipses`,
 * `.digit-employee-select-wrap--elipses`) are intentionally excluded
 * because they have their own purpose-built chrome.
 * ==================================================================== */

input[type="text"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.v2-login-password-input):not(.sandbox-otp-input):not(.digit-dropdown-employee-select-wrap--elipses):not(.digit-employee-select-wrap--elipses):not(.employee-select-wrap--elipses),
input[type="number"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.sandbox-otp-input):not(.digit-dropdown-employee-select-wrap--elipses):not(.digit-employee-select-wrap--elipses):not(.employee-select-wrap--elipses),
input[type="tel"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.v2-profile-phone-input):not(.sandbox-otp-input):not(.digit-dropdown-employee-select-wrap--elipses):not(.digit-employee-select-wrap--elipses):not(.employee-select-wrap--elipses),
input[type="email"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.sandbox-otp-input):not(.digit-dropdown-employee-select-wrap--elipses):not(.digit-employee-select-wrap--elipses):not(.employee-select-wrap--elipses),
input[type="password"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.v2-login-password-input):not(.sandbox-otp-input),
input[type="search"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.sandbox-otp-input),
input[type="url"]:not(.v2-otp-box):not(.sandbox-otp-input),
input[type="date"]:not(.v2-otp-box):not(.sandbox-otp-input):not(.dashboard-filter-inline-date),
textarea:not(.v2-otp-skip),
select,
button[role="combobox"],
.digit-text-input-field,
.digit-text-input,
.digit-employeeCard-input,
.digit-employeeCard-inputError,
.digit-employee-card-textarea-field,
.digit-employeeCard-input-textarea,
.digit-textarea-master,
.digit-dropdown-employee-select-wrap,
.digit-dropdown-master,
.digit-dropdown-master-active,
.digit-dropdown-select-wrap,
.digit-multiselectdropdown-wrap,
.digit-multi-dropdown-wrap,
.digit-select {
  border: 1px solid var(--color-border, #d6d5d4) !important;
  border-radius: 6px !important;
  background-color: var(--v2-surface-color, var(--color-surface, #ffffff)) !important;
  box-shadow: none !important;
  transition: border-color 0.15s ease-out !important;
}

/* Standard 44px height for inputs + dropdown wrappers. Textareas opt
 * out (handled below). */
input[type="text"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.v2-login-password-input):not(.sandbox-otp-input):not(.digit-dropdown-employee-select-wrap--elipses):not(.digit-employee-select-wrap--elipses):not(.employee-select-wrap--elipses),
input[type="number"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.sandbox-otp-input):not(.digit-dropdown-employee-select-wrap--elipses):not(.digit-employee-select-wrap--elipses):not(.employee-select-wrap--elipses),
input[type="tel"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.v2-profile-phone-input):not(.sandbox-otp-input):not(.digit-dropdown-employee-select-wrap--elipses):not(.digit-employee-select-wrap--elipses):not(.employee-select-wrap--elipses),
input[type="email"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.sandbox-otp-input),
input[type="password"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.v2-login-password-input):not(.sandbox-otp-input),
input[type="search"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.sandbox-otp-input),
input[type="url"]:not(.v2-otp-box):not(.sandbox-otp-input),
input[type="date"]:not(.v2-otp-box):not(.sandbox-otp-input):not(.dashboard-filter-inline-date),
select,
button[role="combobox"],
.digit-text-input-field,
.digit-text-input,
.digit-employeeCard-input,
.digit-employeeCard-inputError,
.digit-dropdown-employee-select-wrap,
.digit-dropdown-master,
.digit-dropdown-master-active,
.digit-dropdown-select-wrap,
.digit-multiselectdropdown-wrap,
.digit-multi-dropdown-wrap,
.digit-select {
  height: 44px !important;
  min-height: 44px !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  font-size: 0.875rem !important;
  line-height: 1.25 !important;
}

/* Textareas — same border/radius treatment, but auto-grow vertically
 * with a sensible minimum. */
textarea:not(.v2-otp-skip),
.digit-employee-card-textarea-field,
.digit-employeeCard-input-textarea,
.digit-textarea-master {
  height: auto !important;
  min-height: 88px !important;
  padding: 10px 12px !important;
  font-size: 0.875rem !important;
  line-height: 1.4 !important;
  resize: vertical !important;
}

/* Inner display elements inside dropdown wrappers — the wrapper
 * already carries the visible chrome, so the input child should be
 * borderless and transparent. */
.digit-dropdown-employee-select-wrap--elipses,
.digit-employee-select-wrap--elipses,
.employee-select-wrap--elipses,
.digit-dropdown-employee-select-wrap > input,
.digit-multiselectdropdown-wrap > input,
.digit-multi-dropdown-wrap > input {
  border: 0 !important;
  background: transparent !important;
  height: auto !important;
  min-height: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-shadow: none !important;
}

/* Vendor `.digit-text-input-field` wrapper — already shows the
 * visible 1px border + 6px radius from the unified rule above.
 * Its inner `<input>` (often `.digit-employeeCard-input`) gets the
 * SAME chrome from the rule, producing a visible double-border in
 * the search filters (Complaint No, Mobile No, etc.). The wrapper
 * is the canonical border-bearer; the inner input flexes inside it
 * with no chrome of its own.
 *
 * The `:not()` chain on the inner-input selectors mirrors the
 * unified rule above to win the specificity tie — without it the
 * unified `input[type="text"]:not(...)` (specificity 71) would
 * stamp the inner input with a 1px border again.
 */
.digit-text-input-field,
.digit-text-input-field.prefix,
.text-input,
.text-input.mdms-search-input {
  display: flex !important;
  align-items: center !important;
  overflow: hidden !important;
  background-color: var(--v2-surface-color, var(--color-surface, #ffffff)) !important;
  padding: 0 !important;
}
/* `.text-input` (Workbench MDMS search wrappers) carries a 1px
 * border + 6px radius from the unified rule, so its inner input
 * (often `.employee-card-input`, no `digit-` prefix) needs to be
 * stripped — same pattern as .digit-text-input-field above. */
.text-input input[type="text"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.v2-login-password-input):not(.sandbox-otp-input),
.text-input input.employee-card-input,
.text-input input.digit-employeeCard-input {
  flex: 1 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 12px !important;
  outline: none !important;
}
/* Add `.employee-card-input` to the unified selector list it was
 * missing — same chrome as `.digit-employeeCard-input` (the camelCase
 * variant). Single rule below assigns the wrapper styling. */
.employee-card-input {
  border: 1px solid var(--color-border, #d6d5d4) !important;
  border-radius: 6px !important;
  background-color: var(--v2-surface-color, var(--color-surface, #ffffff)) !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 12px !important;
}
.digit-text-input-field input[type="text"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.v2-login-password-input):not(.sandbox-otp-input):not(.digit-dropdown-employee-select-wrap--elipses):not(.digit-employee-select-wrap--elipses):not(.employee-select-wrap--elipses),
.digit-text-input-field input[type="number"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.sandbox-otp-input):not(.digit-dropdown-employee-select-wrap--elipses):not(.digit-employee-select-wrap--elipses):not(.employee-select-wrap--elipses),
.digit-text-input-field input[type="tel"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.v2-profile-phone-input):not(.sandbox-otp-input):not(.digit-dropdown-employee-select-wrap--elipses):not(.digit-employee-select-wrap--elipses):not(.employee-select-wrap--elipses),
.digit-text-input-field input[type="email"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.sandbox-otp-input),
.digit-text-input-field input[type="password"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.v2-login-password-input):not(.sandbox-otp-input),
.digit-text-input-field input[type="search"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.sandbox-otp-input),
.digit-text-input-field input.digit-employeeCard-input,
.digit-text-input-field input.digit-employeeCard-inputError {
  flex: 1 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 12px !important;
  outline: none !important;
}
/* Prefix button — yellow tint + 1px right separator, no own border
 * or radius. */
.digit-text-input-field .digit-prefix,
.digit-text-input-field button.digit-prefix {
  background-color: var(--color-primary-selected-bg, #FFF4D7) !important;
  color: var(--color-text-primary, #0B0C0C) !important;
  border: 0 !important;
  border-right: 1px solid var(--color-border, #d6d5d4) !important;
  border-radius: 0 !important;
  padding: 0 14px !important;
  font-weight: 600 !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
  box-shadow: none !important;
}

/* Hover — brand border */
input[type="text"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.v2-login-password-input):not(.sandbox-otp-input):not(.digit-dropdown-employee-select-wrap--elipses):not(.digit-employee-select-wrap--elipses):not(.employee-select-wrap--elipses):hover,
input[type="number"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.sandbox-otp-input):hover,
input[type="tel"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.v2-profile-phone-input):not(.sandbox-otp-input):hover,
input[type="email"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.sandbox-otp-input):hover,
input[type="password"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.v2-login-password-input):not(.sandbox-otp-input):hover,
input[type="search"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.sandbox-otp-input):hover,
input[type="url"]:not(.v2-otp-box):not(.sandbox-otp-input):hover,
input[type="date"]:not(.v2-otp-box):not(.sandbox-otp-input):not(.dashboard-filter-inline-date):hover,
textarea:not(.v2-otp-skip):hover,
select:hover,
button[role="combobox"]:hover,
.digit-text-input-field:hover,
.digit-text-input:hover,
.digit-employeeCard-input:hover,
.digit-employeeCard-inputError:hover,
.digit-employee-card-textarea-field:hover,
.digit-employeeCard-input-textarea:hover,
.digit-textarea-master:hover,
.digit-dropdown-employee-select-wrap:hover,
.digit-dropdown-master:hover,
.digit-dropdown-master-active:hover,
.digit-dropdown-select-wrap:hover,
.digit-multiselectdropdown-wrap:hover,
.digit-multi-dropdown-wrap:hover,
.digit-select:hover {
  border-color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
}

/* Focus — brand border, no native outline */
input[type="text"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.v2-login-password-input):not(.sandbox-otp-input):not(.digit-dropdown-employee-select-wrap--elipses):not(.digit-employee-select-wrap--elipses):not(.employee-select-wrap--elipses):focus,
input[type="text"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.v2-login-password-input):not(.sandbox-otp-input):not(.digit-dropdown-employee-select-wrap--elipses):not(.digit-employee-select-wrap--elipses):not(.employee-select-wrap--elipses):focus-visible,
input[type="number"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.sandbox-otp-input):focus,
input[type="number"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.sandbox-otp-input):focus-visible,
input[type="tel"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.v2-profile-phone-input):not(.sandbox-otp-input):focus,
input[type="tel"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.v2-profile-phone-input):not(.sandbox-otp-input):focus-visible,
input[type="email"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.sandbox-otp-input):focus,
input[type="email"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.sandbox-otp-input):focus-visible,
input[type="password"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.v2-login-password-input):not(.sandbox-otp-input):focus,
input[type="password"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.v2-login-password-input):not(.sandbox-otp-input):focus-visible,
input[type="search"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.sandbox-otp-input):focus,
input[type="search"]:not(.v2-otp-box):not(.v2-login-phone-input):not(.sandbox-otp-input):focus-visible,
input[type="url"]:not(.v2-otp-box):not(.sandbox-otp-input):focus,
input[type="date"]:not(.v2-otp-box):not(.sandbox-otp-input):not(.dashboard-filter-inline-date):focus,
textarea:not(.v2-otp-skip):focus,
textarea:not(.v2-otp-skip):focus-visible,
select:focus,
select:focus-visible,
button[role="combobox"]:focus,
button[role="combobox"]:focus-visible,
.digit-text-input-field:focus,
.digit-text-input:focus,
.digit-employeeCard-input:focus,
.digit-employeeCard-input:focus-visible,
.digit-employeeCard-inputError:focus,
.digit-employee-card-textarea-field:focus,
.digit-employeeCard-input-textarea:focus,
.digit-textarea-master:focus,
.digit-dropdown-employee-select-wrap:focus-within,
.digit-dropdown-master:focus-within,
.digit-dropdown-master-active:focus-within,
.digit-dropdown-select-wrap:focus-within,
.digit-multiselectdropdown-wrap:focus-within,
.digit-multi-dropdown-wrap:focus-within,
.digit-select:focus-within {
  outline: none !important;
  border-color: var(--color-primary-1, var(--color-primary-main, #c84c0e)) !important;
}

/* Citizen layout — with the v2 sidebar now `position: fixed` (so the
 * page footer can flow next to it instead of below the row), the
 * main content needs left-padding equal to the sidebar width so it
 * doesn't underlap the fixed sidebar. Scoped via `:has()` to ONLY
 * the routes that render the sidebar — the citizen login / OTP
 * surfaces don't mount it (logged-out), so without this guard the
 * login card was pushed 260px to the right of viewport center. */
.center-container.citizen-home-container:has(> aside.v2-scope) {
  padding-left: 260px !important;
  /* row height is now driven by main content, not the sidebar; let
   * it shrink to fit. */
  align-items: flex-start !important;
}
/* Same `:has()` guard for the few citizen routes where the URL
 * convention says citizen but DIGIT's outer body wrapper is
 * `<div class="employee">` (e.g. /citizen/user/profile,
 * /citizen/user/language-selection). The earlier rule was
 * `.citizen .center-container...` which silently missed these and
 * left the edit-profile content underlapping the fixed sidebar. */
@media (max-width: 47.99rem) {
  /* On mobile the v2 sidebar isn't rendered (useIsDesktop check
   * gates it), so don't reserve the 260px gutter. */
  .center-container.citizen-home-container {
    padding-left: 0 !important;
  }
}

/* Topbars (citizen + employee) opt OUT of the unified form-control
 * chrome above. The citizen topbar uses `.navbar` (not
 * `.digit-topbar`), so we cover both selectors. `revert` walks
 * back through the cascade so topbar dropdowns/inputs keep their
 * pre-PR-100 vendor styling. */
.digit-topbar input,
.digit-topbar textarea,
.digit-topbar select,
.digit-topbar button[role="combobox"],
.digit-topbar .digit-text-input-field,
.digit-topbar .digit-text-input,
.digit-topbar .digit-employeeCard-input,
.digit-topbar .digit-employeeCard-inputError,
.digit-topbar .digit-employee-card-textarea-field,
.digit-topbar .digit-employeeCard-input-textarea,
.digit-topbar .digit-textarea-master,
.digit-topbar .digit-dropdown-employee-select-wrap,
.digit-topbar .digit-dropdown-master,
.digit-topbar .digit-dropdown-master-active,
.digit-topbar .digit-dropdown-select-wrap,
.digit-topbar .digit-multiselectdropdown-wrap,
.digit-topbar .digit-multi-dropdown-wrap,
.digit-topbar .digit-select,
.digit-topbar .employee-select-wrap--elipses,
.navbar input,
.navbar textarea,
.navbar select,
.navbar button[role="combobox"],
.navbar .digit-text-input-field,
.navbar .digit-text-input,
.navbar .digit-employeeCard-input,
.navbar .digit-dropdown-employee-select-wrap,
.navbar .digit-dropdown-master,
.navbar .digit-dropdown-master-active,
.navbar .digit-dropdown-select-wrap,
.navbar .digit-multiselectdropdown-wrap,
.navbar .digit-multi-dropdown-wrap,
.navbar .digit-select,
.navbar .employee-select-wrap--elipses,
header.digit-header input,
header.digit-header .digit-dropdown-employee-select-wrap,
header.digit-header .digit-dropdown-master {
  background-color: revert !important;
  border: revert !important;
  border-radius: revert !important;
  height: revert !important;
  min-height: revert !important;
  padding-left: revert !important;
  padding-right: revert !important;
  padding-top: revert !important;
  padding-bottom: revert !important;
  font-size: revert !important;
  line-height: revert !important;
  box-shadow: revert !important;
  color: revert !important;
  transition: revert !important;
}
.digit-topbar input:hover,
.digit-topbar select:hover,
.digit-topbar button[role="combobox"]:hover,
.digit-topbar .digit-dropdown-employee-select-wrap:hover,
.digit-topbar .digit-dropdown-master:hover,
.digit-topbar .digit-dropdown-master-active:hover,
.digit-topbar input:focus,
.digit-topbar select:focus,
.digit-topbar button[role="combobox"]:focus,
.digit-topbar .digit-dropdown-employee-select-wrap:focus-within,
.digit-topbar .digit-dropdown-master:focus-within,
.navbar input:hover,
.navbar select:hover,
.navbar button[role="combobox"]:hover,
.navbar .digit-dropdown-employee-select-wrap:hover,
.navbar .digit-dropdown-master:hover,
.navbar input:focus,
.navbar select:focus,
.navbar .digit-dropdown-employee-select-wrap:focus-within {
  border-color: revert !important;
}

/* ============================================================================
   Moz QA CSS batch (CCSD-1982 / 1983 / 1984)
   ========================================================================= */

/* CCSD-1982 — text inputs clickable across the full field.
   The wrapper was made flex but its child container never told to fill it,
   so the <input> spanned ~60% of the bordered box and the right side didn't
   place the caret. Stretch the container (and thus the input) to full width. */
.digit-text-input-field > .input-container {
  flex: 1 1 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

/* CCSD-1983 — header/brand logo must not stretch.
   The navbar logo had object-fit:fill + min-width:78px, distorting non-square
   logos. Use contain and drop the min-width. Profile avatars keep cover. */
.navbar img {
  object-fit: contain !important;
  min-width: 0 !important;
  width: auto !important;
}
.profile-section img {
  object-fit: cover !important;
  object-position: center !important;
}

/* CCSD-1984 — employee inbox Date Range: align the box + float the calendar.
   (a) normalize to the 44px rounded v2 chrome and vertically center contents;
   (b) render the calendar as an absolute popover so it overlays instead of
       pushing the page down and leaving empty space. */
.v2-pgr-inbox .digit-employee-select-wrap .digit-select {
  height: 44px !important;
  border: 1px solid var(--color-border, #d6d5d4) !important;
  border-radius: 6px !important;
  background: var(--v2-surface-color, var(--color-surface, #fff)) !important;
  display: flex !important;
  align-items: center !important;
}
.v2-pgr-inbox .digit-employee-select-wrap .digit-select input[type="text"] {
  position: static !important;
  height: 100% !important;
  width: calc(100% - 32px) !important;
  border: 0 !important;
}
.v2-pgr-inbox .digit-employee-select-wrap .digit-select svg {
  position: absolute;
  top: 50%;
  right: 8px;
  margin: 0 !important;
  transform: translateY(-50%);
}
.v2-pgr-inbox .digit-employee-select-wrap .options-card {
  position: absolute !important;
  z-index: 20;
  margin-top: 4px;
  width: max-content;
  max-width: none;
  background: #fff;
  box-shadow: 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12), 0 5px 5px -3px rgba(0,0,0,.2);
}

/* ===========================================================================
 * Legacy select/date-range vertical alignment (CCRS#921)
 *
 * Two generations of the same widget ship side by side. The current one
 * (digit-ui-components: .digit-employee-select-wrap > .digit-select) is a flex
 * row with align-items:center and horizontal padding, so its text sits on the
 * box's centre line. The legacy one (react-components:
 * .employee-select-wrap > .select) is a plain block with no padding, so the
 * input renders at the top of the box and the text reads ~8px high with a band
 * of dead space beneath it, touching the left border.
 *
 * That legacy markup is still what DateRangeNew, DateRange and the legacy
 * employee Dropdown render, so match it to the current one rather than
 * patching the date field alone.
 * ======================================================================== */
.employee .employee-select-wrap > .select,
.employee .employee-select-wrap > .select-active {
  display: flex !important;
  align-items: center !important;
  padding: 0 12px !important;
  min-height: 44px !important;
}

/* ===========================================================================
 * Employee working context (CCRS#1833)
 * Compact line in the employee header, read-only panel on click, and a sticky
 * row on mobile. Scoped to .employee so the citizen shell is untouched.
 * ======================================================================== */
/* The header's action-field row is overflow:hidden, so anything wider than the
 * space left over is sliced off at the edge rather than truncated. A flex item
 * will not shrink below its content until min-width:0 is set, so without this
 * the context overflows the container and loses its first characters instead
 * of ending in an ellipsis. */
/* Only the field holding the context may shrink — applying this to every
 * action field let the avatar collapse into an oval. If :has() is unsupported
 * the rule is simply skipped, which degrades to the clipping it replaces
 * rather than to broken controls. */
:is(.employee, .citizen) .digit-header-action-fields .individual-action-field:has(> .digit-working-context) { min-width: 0; }
.employee .digit-working-context {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}
.employee .digit-working-context-trigger { min-width: 0; max-width: 100%; }
/* Circular avatar must keep its aspect ratio regardless of flex pressure. */
:is(.employee, .citizen) .digit-header-action-fields .digit-profile-image,
:is(.employee, .citizen) .digit-header-action-fields img[alt="Profile"],
:is(.employee, .citizen) .digit-header-action-fields .digit-dropdown-employee-select-wrap { flex-shrink: 0; }
.employee .digit-working-context-trigger {
  background: none;
  border: none;
  padding: 0 4px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}
.employee .digit-working-context-trigger:focus-visible {
  outline: 2px solid var(--color-primary-accent, #c84c0e);
  outline-offset: 2px;
}
/* The generic `button:hover` lift above treats this as a filled button and
 * floats a card shadow behind a line of text in the bar (#2038). It is a
 * disclosure, not a raised control: swap the shadow for a quiet tint so the
 * row still reads as clickable without appearing to lift off the bar. */
.employee .digit-working-context-trigger:hover,
.employee .digit-working-context-trigger:active {
  box-shadow: none !important;
  transform: none !important;
}
.employee .digit-working-context-trigger:hover {
  background: rgba(15, 23, 42, 0.06) !important;
  border-radius: 6px;
}
/* Single line, truncated — the employee topbar is 56px and this sits beside
 * the city/language controls, so it must never wrap or push them off-screen.
 * block + nowrap (rather than flex) so text-overflow actually applies. */
.employee .digit-working-context-summary {
  display: block;
  max-width: 22rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  line-height: 1.35;
  /* Inherit the header's own text colour. The employee topbar is dark in CCRS
   * (#22394D) but light elsewhere, so a fixed grey is unreadable on one of
   * them — inheriting tracks whatever the shell uses for its own controls. */
  color: inherit;
  opacity: .85;
}
.employee .digit-working-context-summary > * { vertical-align: baseline; }
.employee .digit-working-context-sep { opacity: .5; margin: 0 5px; }
/* Stand out by weight, not hue: the brand orange fails contrast on the dark
 * topbar, and the accent has to work on both grounds. */
.employee .digit-working-context-more { font-weight: 700; opacity: 1; margin-left: 3px; }
.employee .digit-working-context-error { font-style: italic; }

/* Positioned inline as fixed by the component (the header container is
 * overflow:hidden), so only the chrome lives here. */
/* Same surface as the other two header dropdowns.
 *
 * This panel was drawn to its own spec — 2px radius against their 4px, a heavy
 * single `0 6px 22px` shadow against their two-layer soft one, and hardcoded
 * #d6d8da / #0b0c0c where they read theme tokens. Three menus hanging off one
 * bar looked like three different components.
 *
 * Only the surface is aligned. The panel's contents are genuinely richer than
 * a list of options — grouped labels and chips — and that difference is the
 * point of it. */
.employee .digit-working-context-panel {
  z-index: 10000;
  min-width: 272px;
  max-width: 352px;
  max-height: 70vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--color-card-border, #E5E7EB);
  border-radius: 4px;
  box-shadow: 0 4px 12px -2px rgba(16, 24, 40, 0.10),
              0 2px 4px -2px rgba(16, 24, 40, 0.06);
  padding: 8px 0;
  text-align: left;
}
.employee .digit-working-context-group { padding: 8px 15px; }
.employee .digit-working-context-group-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #787878;
  margin-bottom: 2px;
}
/* The panel renders inside the topbar subtree, which colours its descendants
 * white for the dark header. Re-assert the panel's own palette on every child
 * or the values are white-on-white. */
.employee .digit-working-context-panel,
.employee .digit-working-context-panel div,
.employee .digit-working-context-panel span {
  /* Themed, like the other menus' option text. The literal near-black was one
   * more way this panel opted out of the tenant's palette. */
  color: var(--color-text-primary, #363636);
}
.employee .digit-working-context-group-value {
  font-size: 13px;
  line-height: 1.5;
  color: #0b0c0c;
}
.employee .digit-working-context-panel .digit-working-context-group-label { color: #787878; }
.employee .digit-working-context-panel .digit-working-context-qualifier,
.employee .digit-working-context-panel .digit-working-context-raw-roles { color: #505a5f; }
.employee .digit-working-context-qualifier { color: #505a5f; font-size: 12px; }
.employee .digit-working-context-raw-roles { color: #505a5f; font-size: 11.5px; margin-top: 2px; }

/* Mobile: its own row under the 56px topbar, sticky so the context stays put
 * while an operator scrolls the inbox (requested on CCRS#1833). */
/* Desktop: the inline copy in the header is the one that shows. */
.employee .digit-working-context-mobile { display: none; }
@media (max-width: 640px) {
  /* Mobile: the sticky row takes over. The header only drops its action fields
   * when the page *loads* narrow — mobileView is sampled once in App.js — so
   * resizing down from desktop leaves the inline copy rendered and both would
   * show. Hide it explicitly rather than relying on that. */
  .employee .digit-working-context-mobile { display: block; }
  :is(.employee, .citizen) .digit-header-action-fields .digit-working-context { display: none; }
  /* …and collapse the wrapper Header.js puts around it so it leaves no gap.
   * Layered: the rule above always hides the content, this one removes the
   * empty slot where :has() is supported. */
  :is(.employee, .citizen) .digit-header-action-fields .individual-action-field:has(> .digit-working-context) { display: none; }
}
.employee .digit-working-context-mobile {
  position: sticky;
  top: var(--employee-header-h, 56px);
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid #d6d8da;
  padding: 6px 12px;
}
/* In the mobile row the trigger spans the bar so the whole strip is tappable,
 * and the summary is centred in it. */
.employee .digit-working-context-mobile .digit-working-context,
.employee .digit-working-context-mobile .digit-working-context-trigger { display: block; width: 100%; }
.employee .digit-working-context-mobile .digit-working-context-trigger { padding: 0; text-align: center; }
.employee .digit-working-context-mobile .digit-working-context-summary { text-align: center; }
/* Panel is fixed and positioned by the component; keep it inside narrow screens. */
@media (max-width: 640px) {
  .employee .digit-working-context-panel { max-width: calc(100vw - 16px); }
}

/* This row paints its own white ground, so it cannot inherit the dark
 * topbar's white text. */
.employee .digit-working-context-mobile .digit-working-context-summary {
  color: var(--color-text-secondary, #505a5f);
  opacity: 1;
  max-width: 100%;
}

/* ----------------------------------------------------------------------
 * 51. Language selection (#2038) — the last pre-auth screen still wearing
 *     the legacy card: 4px corners, a hairline, and square language
 *     buttons that read as disabled tiles rather than choices. Bring it
 *     onto the same shape language as the modernised login card so the
 *     two screens a user sees back to back match.
 *
 *     Radii are deliberately the v2 Button's `rounded-md` (6px) and the
 *     login card's 14px, not new values.
 * -------------------------------------------------------------------- */
.employee .languageSelection {
  border-radius: 14px !important;
  border: none !important;
  box-shadow: 0 12px 32px rgba(8, 20, 40, 0.18), 0 2px 8px rgba(8, 20, 40, 0.1) !important;
  padding: 32px !important;
}

/* The row is three buttons inside a 420px card, so it has to be allowed to
 * wrap — otherwise the widest label (PORTUGUÊS) is clipped by the card. */
.employee .languageSelection .language-selector {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 10px !important;
}
.employee .languageSelection .language-button-container {
  margin: 0 !important;
}

.employee .languageSelection .customBtn,
.employee .languageSelection .customBtn-selected {
  border-radius: 6px !important;
  min-height: 40px;
  padding: 0 14px !important;
  width: auto !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  white-space: nowrap;
  transition: background-color 0.15s ease-out, border-color 0.15s ease-out;
}

/* Unselected: a real, clickable outline rather than the grey 1px box. */
.employee .languageSelection .customBtn {
  border: 1px solid var(--color-input-border-default, var(--color-border, #E1E6EF)) !important;
  background: var(--color-input-bg, #ffffff) !important;
  color: var(--color-text-primary, #1D2433) !important;
}
.employee .languageSelection .customBtn:hover {
  border-color: var(--color-button-primary-bg-default, #2563EB) !important;
  background: var(--color-primary-1-bg, #EFF6FF) !important;
}

/* Selected: the same fill + white label as every other primary action. */
.employee .languageSelection .customBtn-selected {
  background: var(--color-button-primary-bg-default, var(--color-primary-2, #2563EB)) !important;
  border: 1px solid var(--color-button-primary-border, var(--color-button-primary-bg-default, #2563EB)) !important;
  color: var(--color-button-primary-text, #ffffff) !important;
}

/* Same type as the login CTA and the language buttons — 0.875rem / 500.
 * A heavier, larger label here made this one button look like a different
 * component from every other primary action in the flow.
 *
 * SubmitBar renders its label as an inner <h2 class="digit-button-label">
 * carrying its own 20px, so sizing the <button> alone changes nothing you
 * can see — the h2 has to be targeted too. */
.employee .languageSelection .digit-submit-bar,
.employee .languageSelection button[class*="submit-bar"] {
  border-radius: 6px !important;
  min-height: 40px;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
}
.employee .languageSelection .digit-submit-bar .digit-button-label,
.employee .languageSelection button[class*="submit-bar"] .digit-button-label,
.employee .languageSelection .digit-submit-bar .icon-label-container,
.employee .languageSelection button[class*="submit-bar"] .icon-label-container {
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  line-height: 1.25rem !important;
  margin: 0 !important;
}

/* ----------------------------------------------------------------------
 * 52. Employee top bar (#2038)
 * -------------------------------------------------------------------- */

/* The far-right brand mark is the *same* image already sitting next to the
 * eGov wordmark on the left (Header renders `img` a second time at the end
 * of the action row). One tenant crest per bar is enough. The element is
 * hidden rather than removed because Header is shared with other products,
 * and passing no `img` makes it fall back to the DIGIT mark instead. */
.digit-employee-header .digit-header-action-fields > .digit-header-img {
  display: none !important;
}

/* One type scale across the bar. It was carrying three: the working
 * context at 12px/400, the tenant and language dropdowns at 16px/400, and
 * the profile initial at 16px/700. Everything is 0.875rem/500 now; the
 * "+N" counters keep a heavier weight because they are a distinct datum
 * rather than a label, and they are the one thing in the bar that has to
 * survive being skimmed. */
.digit-employee-header .digit-header-action-fields,
.digit-employee-header .digit-header-action-fields .cp,
.digit-employee-header .digit-working-context-summary,
.digit-employee-header .digit-working-context-summary span,
.digit-employee-header .header-dropdown-profile {
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  line-height: 1.25rem !important;
  letter-spacing: normal !important;
}
.digit-employee-header .digit-working-context-summary .digit-working-context-more {
  font-weight: 600 !important;
}

/* The profile initial sits on its own filled circle, so it is the one piece
 * of text in the bar that must NOT take the bar's foreground colour —
 * inheriting near-black put dark text on a dark disc. Give the disc the
 * action colour and the initial white (5.17:1). */
.digit-employee-header .header-dropdown-profile.text {
  background: var(--color-button-primary-bg-default, #2563EB) !important;
  color: var(--color-button-primary-text, #ffffff) !important;
  font-weight: 600 !important;
}

/* ----------------------------------------------------------------------
 * 53. Employee home footer (#2038) — "Powered by DIGIT" floated ~32px
 *     above the bottom of the window because `.main` wraps to its content
 *     instead of filling the viewport. Make the column full height and let
 *     the footer be pushed to the end of it, so the mark sits on the
 *     bottom edge on a short page and still follows the content on a long
 *     one.
 * -------------------------------------------------------------------- */
.employee .main.digit-home-main {
  box-sizing: border-box;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.employee .main.digit-home-main > .digit-home-app-wrapper {
  flex: 1 1 auto;
}
.employee .main.digit-home-main > .employee-home-footer {
  margin-top: auto;
  margin-bottom: 0;
  padding-bottom: 10px;
}

/* ----------------------------------------------------------------------
 * 54. Employee landing cards (#2038)
 *
 *     The module cards were a 1px hard-black rectangle with square
 *     corners, and their actions were bare tertiary buttons — text with a
 *     chevron and no ground, so nothing said "button" until you hovered
 *     one. Give the card the same shape language as the login card, and
 *     give each action a standing surface so the affordance is visible at
 *     rest rather than on hover only.
 *
 *     Labels stay near-black: the tint and the chevron carry the
 *     affordance here, so the row does not also need to be blue.
 * -------------------------------------------------------------------- */
/* Card chrome itself (border, radius, shadow, padding) lives in section 30
 * above, which carries the higher-specificity selector. */

/* Title reads as a title: near-black, never the navy or the action blue. */
.employee .digit-landing-page-card .ladingcard-moduleName {
  color: var(--color-text-heading, #1D2433) !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

.employee .digit-landing-page-card .digit-landingpage-divider {
  margin: 14px 0 10px !important;
  border: 0 !important;
  border-top: 1px solid var(--color-card-divider, #E5E7EB) !important;
}

/* Actions: a standing surface, not hover-only. */
.employee .digit-landing-page-card button.digit-button-teritiary {
  display: flex !important;
  width: 100% !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin: 0 0 8px !important;
  padding: 10px 14px !important;
  min-height: 42px !important;
  background: var(--color-page-secondary-bg, #F4F6F9) !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  transform: none !important;
  text-align: left !important;
  transition: background-color 0.15s ease-out, border-color 0.15s ease-out;
}
.employee .digit-landing-page-card button.digit-button-teritiary:last-of-type {
  margin-bottom: 0 !important;
}
.employee .digit-landing-page-card button.digit-button-teritiary:hover {
  background: var(--color-primary-1-bg, #EFF6FF) !important;
  border-color: var(--color-button-primary-bg-default, #2563EB) !important;
}

/* The action label takes the clickable colour (#2038 review round 2). It was
 * near-black on the grounds that the filled row already signalled "clickable",
 * but the review asked for one colour across everything you can click, and a
 * blue label plus the tinted row is a stronger affordance than either alone. */
.employee .digit-landing-page-card button.digit-button-teritiary .digit-button-label,
.employee .digit-landing-page-card button.digit-button-teritiary .icon-label-container {
  color: var(--color-button-tertiary-text, var(--color-link-normal, #2563EB)) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  line-height: 1.25rem !important;
  margin: 0 !important;
}

/* The chevron is the affordance, so it takes the action colour. */
.employee .digit-landing-page-card button.digit-button-teritiary svg,
.employee .digit-landing-page-card button.digit-button-teritiary svg path {
  fill: var(--color-button-tertiary-text, #2563EB) !important;
  color: var(--color-button-tertiary-text, #2563EB) !important;
}

/* ----------------------------------------------------------------------
 * 55. Error / not-found screen (#2038) — ErrorComponent renders a bare
 *     <button>, so it picked up the generic button chrome: a blue fill
 *     with a near-black label, parked off-centre under a centred heading.
 * -------------------------------------------------------------------- */
.error-boundary .error-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 16px !important;
}
.error-boundary .error-container h1 {
  color: var(--color-text-heading, #1D2433) !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  margin: 0 !important;
}
.error-boundary .error-container button {
  align-self: center !important;
  margin: 0 !important;
  min-height: 40px !important;
  padding: 0 20px !important;
  border: 1px solid var(--color-button-primary-border, #2563EB) !important;
  border-radius: 6px !important;
  background: var(--color-button-primary-bg-default, #2563EB) !important;
  color: var(--color-button-primary-text, #ffffff) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
}
.error-boundary .error-container button * {
  color: var(--color-button-primary-text, #ffffff) !important;
}

/* ----------------------------------------------------------------------
 * 56. Create Complaint — form card and action bar (#2038)
 *
 *     The page container paints white edge to edge, and the action bar is
 *     a transparent 52px strip *outside* the form card. So once the card's
 *     hard border stopped, the submit button sat on a bare white slab with
 *     nothing tying it to the form above it.
 *
 *     Let the page ground show instead, and give the card the same chrome
 *     as the landing and login cards. The action bar then reads as a
 *     footer belonging to the form rather than a leftover white band.
 * -------------------------------------------------------------------- */
.employee .v2-employee-create-complaint {
  background-color: transparent !important;
}
.employee .v2-employee-create-complaint > form.custom-form > .digit-card-component {
  border: 1px solid var(--color-card-border, #E5E7EB) !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(8, 20, 40, 0.04), 0 4px 16px rgba(8, 20, 40, 0.06) !important;
}
.employee .v2-employee-create-complaint .digit-action-bar-wrap {
  padding: 16px 0 24px !important;
  margin: 0 !important;
}

/* ----------------------------------------------------------------------
 * 57. Search Complaints / inbox (#2038)
 *
 *     Against the reference the page read as a spreadsheet rather than a
 *     set of panels, for three reasons:
 *       - the page scope painted white edge to edge, so the cards had no
 *         ground to sit on and every panel ran into its neighbour;
 *       - every table CELL carried a left and right border, drawing a full
 *         grid instead of letting the row separators do the work;
 *       - the header row was a tinted band rather than a plain heading.
 * -------------------------------------------------------------------- */

/* Let the page ground show, so the panels read as cards (same fix as the
 * create-complaint container). */
.employee .v2-pgr-inbox {
  background-color: transparent !important;
}

/* One card treatment for the link, search, filter and results panels. */
.employee .v2-pgr-inbox .digit-section,
.employee .v2-pgr-inbox .digit-card-component.digit-table-card {
  background-color: var(--color-page-bg, #ffffff) !important;
  border: 1px solid var(--color-card-border, #E5E7EB) !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(8, 20, 40, 0.04), 0 4px 16px rgba(8, 20, 40, 0.06) !important;
}

/* The strip under the page title is an empty 2px element that happens to be
 * the search wrapper's first child, so the panel-chrome rule above boxed it
 * and the two borders collapsed into a hard black rule under the heading.
 * It holds no content, so it should draw nothing. Specificity has to clear
 * `.v2-pgr-inbox .digit-inbox-search-wrapper > div:first-child`. */
.employee .v2-pgr-inbox .digit-inbox-search-wrapper > div.digit-inbox-search-composer-header-action-wrapper {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Rows carry the separation; cells should not draw columns. */
.employee .v2-pgr-inbox .rdt_TableCell {
  border-left: 0 !important;
  border-right: 0 !important;
  font-size: 0.875rem !important;
  color: var(--color-table-row-text, #363636) !important;
}
.employee .v2-pgr-inbox .rdt_TableRow {
  border-bottom: 1px solid var(--color-table-border, #E5E7EB) !important;
}
.employee .v2-pgr-inbox .rdt_TableRow:last-of-type {
  border-bottom: 0 !important;
}
.employee .v2-pgr-inbox .rdt_TableRow:hover {
  background-color: var(--color-table-hover, #EFF6FF) !important;
}

/* Header: a plain heading row on the card surface, separated by a single
 * rule, rather than a tinted band with a border above and below. The tint
 * lives on .rdt_TableHead (the wrapper), not on the row. */
/* Opaque, not transparent: this header is sticky over a scrolling row list,
 * so a see-through ground lets the rows slide visibly through the labels.
 * The card surface reads as "no tint" while still hiding what passes under. */
.employee .v2-pgr-inbox .rdt_TableHead {
  background-color: var(--v2-surface-color, var(--color-surface, #ffffff)) !important;
}
.employee .v2-pgr-inbox .rdt_TableHeadRow {
  background-color: transparent !important;
  border-top: 0 !important;
  border-bottom: 1px solid var(--color-table-border, #E5E7EB) !important;
  min-height: 48px !important;
}
.employee .v2-pgr-inbox .rdt_TableCol,
.employee .v2-pgr-inbox .rdt_TableCol div {
  color: var(--color-table-header-text, #1D2433) !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
}

/* The links panel was shouting: a 24px navy card title over a 20px
 * underlined link, both far larger than anything else on the page. Bring
 * them onto the same scale as the filter panel beside them, and let the
 * title be a title (near-black) with the action in the link colour. */
.employee .v2-pgr-inbox .digit-inbox-search-links-header-text,
.employee .v2-pgr-inbox .digit-section.links .digit-inbox-search-links-heading,
.employee .v2-pgr-inbox .digit-section.links h1,
.employee .v2-pgr-inbox .digit-section.links h2,
.employee .v2-pgr-inbox .digit-section.links h3 {
  font-size: 1rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: var(--color-text-heading, #1D2433) !important;
  margin: 0 0 10px !important;
}
.employee .v2-pgr-inbox .digit-inbox-search-links-contents,
.employee .v2-pgr-inbox .digit-inbox-search-link,
.employee .v2-pgr-inbox .digit-inbox-search-link * {
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  line-height: 1.25rem !important;
  color: var(--color-button-tertiary-text, var(--color-link-normal, #2563EB)) !important;
  text-decoration: none !important;
}
.employee .v2-pgr-inbox .digit-inbox-search-link:hover,
.employee .v2-pgr-inbox .digit-inbox-search-link:hover * {
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

/* "Clear search" is a tertiary action next to the Search button; it was a
 * size larger than the button it sits beside. */
.employee .v2-pgr-inbox .digit-button-teritiary .digit-button-label,
.employee .v2-pgr-inbox [class*="teritiary"] .digit-button-label,
.employee .v2-pgr-inbox [class*="tertiary"] .digit-button-label {
  font-size: 0.875rem !important;
  font-weight: 500 !important;
}

/* The pagination strip drew a full border around itself, so the foot of the
 * results card looked like a separate boxed element sitting inside another
 * box. The rows above it already end in a rule. */
.employee .v2-pgr-inbox .rdt_Pagination {
  border: 0 !important;
  background: transparent !important;
}

/* ----------------------------------------------------------------------
 * 58. Inbox search fields on mobile (#2038)
 *
 *     `.digit-search-field-wrapper` is a three-column grid with fixed
 *     track widths, and it keeps all three columns at every viewport. On a
 *     phone that squeezes Mobile No down to a ~24px input and pushes the
 *     date field to the card's edge. Stack the fields instead, each full
 *     width, with the actions on their own row underneath.
 * -------------------------------------------------------------------- */
@media (max-width: 47.99rem) {
  .employee .v2-pgr-inbox .digit-search-field-wrapper {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .employee .v2-pgr-inbox .digit-search-field-wrapper > * {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  /* The inputs themselves are sized by the vendor's inline widths. */
  .employee .v2-pgr-inbox .digit-search-field-wrapper .digit-label-field-pair .digit-field,
  .employee .v2-pgr-inbox .digit-search-field-wrapper .digit-text-input,
  .employee .v2-pgr-inbox .digit-search-field-wrapper .digit-text-input-field,
  .employee .v2-pgr-inbox .digit-search-field-wrapper input[type="text"],
  .employee .v2-pgr-inbox .digit-search-field-wrapper input[type="date"],
  .employee .v2-pgr-inbox .digit-search-field-wrapper input[type="number"] {
    width: 100% !important;
    min-width: 0 !important;
  }
  /* Mobile number keeps its +254 prefix beside a field that can shrink. */
  .employee .v2-pgr-inbox .digit-search-field-wrapper .digit-input-with-prefix,
  .employee .v2-pgr-inbox .digit-search-field-wrapper .digit-mobile-input {
    display: flex !important;
    width: 100% !important;
  }
  /* The actions are pinned to `grid-column: 3 / -1`. Left alone, that forces
   * the grid to invent columns 2 and 3 even when the template is a single
   * track, so the fields stayed side by side. Span the one column instead. */
  .employee .v2-pgr-inbox .digit-search-field-wrapper > .digit-search-button-wrapper {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    justify-content: flex-end !important;
    flex-wrap: wrap;
    gap: 12px;
  }
}

/* ----------------------------------------------------------------------
 * 59. Working context: pill + assignments panel (#2038 review round 2)
 *
 *     The summary used to spend the bar on one of eight department names
 *     plus a "+7". It is a pill of counts now, and the panel carries the
 *     detail as chips.
 * -------------------------------------------------------------------- */
.employee .digit-working-context-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px !important;
  border-radius: 999px !important;
  border: 1px solid var(--color-header-pill-border, rgba(255, 255, 255, 0.22)) !important;
  background: var(--color-header-pill-bg, rgba(255, 255, 255, 0.08)) !important;
  transition: background-color 0.15s ease-out, border-color 0.15s ease-out;
}
.employee .digit-working-context-trigger:hover {
  background: var(--color-header-pill-bg-hover, rgba(255, 255, 255, 0.16)) !important;
  border-color: var(--color-header-pill-border-hover, rgba(255, 255, 255, 0.34)) !important;
}
/* The place is the anchor of the pill; the counts sit back from it. */
.employee .digit-working-context-summary .digit-working-context-place {
  font-weight: 600;
}
.employee .digit-working-context-summary .digit-working-context-count,
.employee .digit-working-context-summary .digit-working-context-sep {
  opacity: 0.78;
}

/* Panel.
 *
 * Radius and shadow match the other two header dropdowns rather than the
 * card scale: this is a menu hanging off the bar, not a page card, and at
 * 12px with a `0 12px 32px` drop it read as a different component from the
 * language and profile menus beside it. Padding stays generous — its contents
 * are grouped labels and chips, not a list of options. */
.employee .digit-working-context-panel {
  min-width: 280px;
  padding: 16px 18px 18px !important;
  border-radius: 4px !important;
  border: 1px solid var(--color-card-border, #E5E7EB) !important;
  box-shadow: 0 4px 12px -2px rgba(16, 24, 40, 0.10),
              0 2px 4px -2px rgba(16, 24, 40, 0.06) !important;
}
.employee .digit-working-context-place-block {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--color-card-divider, #E5E7EB);
}
.employee .digit-working-context-place-name {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text-heading, #1D2433);
}
.employee .digit-working-context-subtitle {
  margin-top: 2px;
  font-size: 0.8125rem;
  color: var(--color-text-secondary, #5F5C62);
}
.employee .digit-working-context-group + .digit-working-context-group {
  margin-top: 12px;
}
.employee .digit-working-context-group-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-secondary, #5F5C62);
  margin-bottom: 6px;
}
/* NOT "...-chips": a broad `[class*="chip"]` rule earlier in this file paints
 * anything whose class contains "chip" as a filter pill, which caught the
 * container and drew a tinted lozenge behind each row. */
.employee .digit-working-context-grouprow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.employee .digit-working-context-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--color-page-secondary-bg, #F4F6F9);
  border: 1px solid var(--color-card-border, #E5E7EB);
  font-size: 0.8125rem;
  line-height: 1.25rem;
  color: var(--color-text-primary, #1D2433);
}

/* ----------------------------------------------------------------------
 * 60. Navy top bar, separated from the navy sidebar (#2038 review round 2)
 *
 *     Rahul asked for a navy bar. The sidebar is the same navy, so without
 *     a seam the two read as one L-shaped slab and the sidebar loses its
 *     edge. A hairline at the boundary is enough — it keeps both surfaces
 *     the tenant's navy rather than inventing a second shade.
 * -------------------------------------------------------------------- */
:is(.employee, .citizen) .digit-topbar.digit-employee-header {
  border-bottom: 1px solid var(--color-header-seam, rgba(255, 255, 255, 0.14));
}


/* ----------------------------------------------------------------------
 * 61. Inbox panels (#2038 review round 2)
 * -------------------------------------------------------------------- */

/* "Filters" belongs at the head of the section. The markup already carries a
 * `.filter-header` (funnel glyph + label) but it was hidden, so the panel
 * opened straight into "Complaint Subtype" with nothing saying what the
 * column was for. */
.employee .v2-pgr-inbox .filter-card .filter-header {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.employee .v2-pgr-inbox .filter-card .filter-header .title-container,
.employee .v2-pgr-inbox .filter-card .filter-header .filter-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: var(--color-text-heading, #1D2433) !important;
}
.employee .v2-pgr-inbox .filter-card .filter-header svg {
  width: 20px !important;
  height: 20px !important;
  fill: var(--color-button-tertiary-text, #2563EB);
}

/* One box, not a box inside a box. `.filter-card` carried its own 4px radius
 * and white ground inside the 12px section card — which is the corner
 * mismatch the review spotted on the filters panel specifically. The section
 * is the card; this is just its content. */
.employee .v2-pgr-inbox .digit-section.filter {
  padding: 20px !important;
}
.employee .v2-pgr-inbox .filter-card,
.employee .v2-pgr-inbox .filter-card.filter-card-vertical {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* The links panel's title sat ~30px right of the link beneath it: the header
 * is a flex row whose first child is a logo slot, and MDMS supplies no logo
 * for this module, so the slot rendered 22px of nothing and shunted the title
 * across. Rather than hide it, give it the module's own icon — the same
 * filled speech-bubble the home card now uses — so the panel is headed the
 * way the reference is, and the icon column explains the indent instead of
 * being an accident. */
.employee .v2-pgr-inbox .digit-inbox-search-links-header-logo:empty {
  width: 20px !important;
  height: 20px !important;
  flex: 0 0 20px;
  background-color: var(--color-button-tertiary-text, #2563EB);
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M20 2H4C2.9 2 2.01 2.9 2.01 4L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 9h-2V5h2v6zm0 4h-2v-2h2v2z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M20 2H4C2.9 2 2.01 2.9 2.01 4L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 9h-2V5h2v6zm0 4h-2v-2h2v2z'/></svg>");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
/* Title and the links beneath it share one left edge. The icon sits in its
 * own 20px gutter, so the links are indented by the icon width plus the row
 * gap to line up with the title text rather than with the icon (#2038). */
.employee .v2-pgr-inbox .digit-inbox-search-links-header {
  align-items: center;
  gap: 8px !important;
}
.employee .v2-pgr-inbox .digit-inbox-search-links-contents {
  padding-left: 28px !important;
}
/* A tenant whose MDMS card config supplies `logoIcon.component` gets a real
 * 2rem icon from InboxSearchLinks instead, so the indent is 32px + the 8px row
 * gap. Written as an override on top of the 28px rather than as a pair of
 * mutually exclusive `:has()` branches, so an engine without `:has()` still
 * gets the alignment the unconditional rule always provided. */
.employee
  .v2-pgr-inbox
  .digit-inbox-search-links-container:not(
    :has(.digit-inbox-search-links-header-logo:empty)
  )
  .digit-inbox-search-links-contents {
  padding-left: 40px !important;
}
.employee .v2-pgr-inbox .digit-inbox-search-links-header-text {
  text-align: left !important;
}

/* Tabs need to look like tabs. The inactive one takes the clickable colour,
 * the active one keeps the heading colour and owns the rule beneath it, and
 * both respond to hover — at rest they were two pieces of dark text with a
 * hairline under the row. */
.employee .v2-pgr-inbox .pgr-inbox-tabs .pgr-inbox-tab {
  position: relative;
  padding: 8px 2px 10px !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: var(--color-button-tertiary-text, var(--color-link-normal, #2563EB)) !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  transition: color 0.15s ease-out;
}
.employee .v2-pgr-inbox .pgr-inbox-tabs .pgr-inbox-tab:hover {
  color: var(--color-link-hover, #1D4FD8) !important;
}
.employee .v2-pgr-inbox .pgr-inbox-tabs .pgr-inbox-tab.active {
  color: var(--color-text-heading, #1D2433) !important;
  font-weight: 600 !important;
}
.employee .v2-pgr-inbox .pgr-inbox-tabs .pgr-inbox-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--color-button-primary-bg-default, #2563EB);
}

/* ----------------------------------------------------------------------
 * 62. Confirmation dialogs — logout and friends (#2038 review round 2)
 *
 *     The logout confirm was the odd one out: its buttons were square
 *     while every other button in the employee UI is 6px, its shell was
 *     10px against the 12px every card uses, and its labels were 13.33px
 *     against 14px. Three near-misses in one dialog, which is exactly the
 *     "corner radius inconsistency" the review points at.
 * -------------------------------------------------------------------- */
/* Scoped to `.employee`, and the button rules further to the logout dialog
 * itself. Unscoped, `.digit-popup-wrapper button` is every popup in both the
 * citizen and the employee app — the PGR workflow-action and filter modals
 * included, which would have had their primary action re-radiused and their
 * weight dropped out from under them. 12px is the system shell radius, so
 * that one is safe to apply to any employee dialog. */
html .employee .digit-popup-overlay .digit-popup-wrapper,
html :is(.employee, .citizen) .digit-popup-wrapper,
html :is(.employee, .citizen) .digit-popup-wrapper.digit-logout-popup-wrapper.default {
  border-radius: 12px !important;
}
:is(.employee, .citizen) .digit-logout-popup-wrapper button,
:is(.employee, .citizen) .digit-logout-popup-wrapper [class*="popup-footer"] button {
  border-radius: 6px !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
}
:is(.employee, .citizen) .digit-logout-popup-wrapper button .digit-button-label,
:is(.employee, .citizen) .digit-logout-popup-wrapper [class*="popup-footer"] button .digit-button-label {
  font-size: 0.875rem !important;
  font-weight: 500 !important;
}

/* The dialog's footer carries no ground of its own in vendor CSS, so it shows
 * whatever is behind the card. Paint it with the card surface so the action
 * row is unambiguously part of the dialog (#2038). */
html :is(.employee, .citizen) .digit-logout-popup-wrapper .digit-popup-footer,
html :is(.employee, .citizen) .digit-logout-popup-wrapper [class*="popup-footer"] {
  background: var(--v2-surface-color, var(--color-surface, #ffffff)) !important;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* ----------------------------------------------------------------------
 * 63. Edit Profile (#2038 review round 2)
 *
 *     `.grounded-container` is the user-profile route's shell (see
 *     employee/index.js). Three things put it out of step with the rest of
 *     the employee UI:
 *
 *       - its v2 scope painted white edge to edge, so the cards had no
 *         ground and the page read as one undifferentiated sheet — the
 *         same thing already fixed on create-complaint and the inbox;
 *       - its cards use Tailwind's `rounded-lg` (8px) rather than the 12px
 *         every other card in this UI uses;
 *       - nothing capped the column, so a single-column form stretched its
 *         inputs to ~1360px on a desktop window.
 * -------------------------------------------------------------------- */
/* Generalised below — see "employee route grounds". */

/* One column, readable width, centred — a name field does not need 1360px. */
.employee .grounded-container > .v2-scope > * {
  max-width: 880px;
  margin-left: auto !important;
  margin-right: auto !important;
}

.employee .grounded-container > .v2-scope .rounded-lg {
  border-radius: 12px !important;
  border-color: var(--color-card-border, #E5E7EB) !important;
  box-shadow: 0 1px 2px rgba(8, 20, 40, 0.04), 0 4px 16px rgba(8, 20, 40, 0.06) !important;
}

/* The avatar's camera button sits on the action blue, but its icon kept the
 * page's near-black stroke — these are stroke-drawn (lucide) glyphs, so a
 * `fill` would not have touched them. Take the same foreground every other
 * filled primary control uses (#2038). */
:is(.employee, .citizen) .v2-profile-camera-btn {
  color: var(--color-button-primary-text, #FFFFFF) !important;
}
:is(.employee, .citizen) .v2-profile-camera-btn svg,
:is(.employee, .citizen) .v2-profile-camera-btn svg * {
  stroke: var(--color-button-primary-text, #FFFFFF) !important;
}

/* Profile route gutters were asymmetric — 64px left against 24px right, a
 * desktop sidebar allowance that never reset once the sidebar collapses to a
 * hamburger. It also pushed the centred column off centre on desktop, since
 * the max-width centres inside whatever the padding leaves. Symmetric at both
 * sizes (#2038). */
.employee .grounded-container > .v2-scope {
  padding-left: 24px !important;
  padding-right: 24px !important;
}
@media (max-width: 47.99rem) {
  .employee .grounded-container > .v2-scope {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}
/* With a rail on the page the left gutter starts where the rail ends, so the
 * column centres in the space beside it rather than across the whole window;
 * at 272px open the rail otherwise reached the heading. */
@media (min-width: 48rem) {
  html[data-sidebar-pinned] .employee .grounded-container > .v2-scope {
    padding-left: calc(var(--app-rail-w) + 24px) !important;
    transition: padding-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }
}


/* ----------------------------------------------------------------------
 * 64. Inbox results on mobile — stacked cards (#2038 review round 2)
 *
 *     The complaints inbox is a five-column table. On a phone only three
 *     columns fit, the third one truncated ("Pending a…"), the header row
 *     is off-screen so nothing labels what is left, and the remaining two
 *     columns sit behind a horizontal scrollbar nested inside the card's
 *     own vertical one. Nobody triages complaints that way.
 *
 *     ResultsDataTable now swaps the columns for one synthetic column below
 *     this breakpoint, rendering each record as a labelled card. The table
 *     itself stays — pagination, the pending state, selection and row clicks
 *     are all still react-data-table-component's — so this only has to
 *     undress the row and cell chrome so the card can own its own padding.
 *
 *     The molecule is shared, so every field is labelled and no column is
 *     treated as the record's title: which column identifies a record is the
 *     consumer's business, and this file is not the place to guess.
 * ---------------------------------------------------------------------- */

@media (max-width: 47.99rem) {
  /* The card the table already sits in is the only box wanted here. The
   * table body's own 1px outline and the wrapper's side padding would draw
   * a second one inside it, so drop both and let the cards run the full
   * width, separated by the row rule they already carry. */
  .digit-table-card-as-cards {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .digit-table-card-as-cards .rdt_TableBody {
    border: 0 !important;
  }
  .digit-table-card-as-cards .rdt_TableRow:last-of-type {
    border-bottom: 0 !important;
  }

  /* A card is the row, so the row contributes nothing of its own. */
  .digit-table-card-as-cards .rdt_TableRow {
    min-height: 0 !important;
    padding: 0 !important;
  }
  .digit-table-card-as-cards .rdt_TableCell {
    padding: 0 !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .digit-results-mobile-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    padding: 14px 16px;
    box-sizing: border-box;
  }

  /* Label left, value right, both on one line until they cannot be. */
  .digit-results-mobile-card-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }
  .digit-results-mobile-card-label {
    flex: 0 0 auto;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-secondary, #6B7280);
  }
  .digit-results-mobile-card-value {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.8125rem;
    text-align: right;
    word-break: break-word;
    color: var(--color-text-primary, #0B0C0C);
  }
  /* Status pills, link buttons and the like keep their own chrome, just
   * right-aligned and free to wrap — a complaint number needs the second
   * line on a narrow screen. */
  .digit-results-mobile-card-value > * {
    display: inline-block;
    vertical-align: middle;
    max-width: 100%;
    white-space: normal !important;
    text-align: right !important;
  }
  /* Only the link variation sheds its chrome — it is text pretending to be a
   * button, so its padding just pushes the value off the right edge. A filled
   * button keeps its box: stripping that leaves a label sitting on its own
   * background with a tap target of roughly one line-height, on exactly the
   * viewport this section exists to fix.
   *
   * The floor lives on this rule rather than the generic one below, because
   * `button[class*="link"]` outscores a bare `button` and `!important` settles
   * ties before source order does — a plain floor further down never applied
   * to the one kind of button that had shed its height. */
  .digit-results-mobile-card-value button[class*="link"],
  .digit-results-mobile-card-value button[class*="teritiary"],
  .digit-results-mobile-card-value button[class*="tertiary"] {
    padding: 0 !important;
    height: auto !important;
    min-height: 24px !important;
    display: inline-flex !important;
    align-items: center !important;
  }
  /* Same floor for the react-router link that is the way into a record: as a
   * bare anchor it measured 22px, under any reasonable thumb. */
  .digit-results-mobile-card-value button,
  .digit-results-mobile-card-value a {
    min-height: 24px;
  }
  .digit-results-mobile-card-value a {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
  }

  /* `fixedHeaderScrollHeight: 100vh` caps the table at one viewport so the
   * sticky header has something to pin against. In card mode there is no
   * header, so that cap only nests a scrollbar inside the page's and clips
   * the last card. Let the cards extend the page instead. */
  .digit-table-card-as-cards .digit-data-table {
    max-height: none !important;
    overflow-y: visible !important;
  }
}

/* ----------------------------------------------------------------------
 * 65. Employee forms — section rule, and label/field stacking on mobile
 *     (#2038 review round 2)
 *
 *     Two things on the create-complaint form, both visible worst on a
 *     phone:
 *
 *     a) `hr.digit-break-line` is `border-width: 1px` on all four sides
 *        with the colour inherited from `color: var(--color-primary-main)`
 *        — a 2px near-black double rule drawn across a white form card.
 *        Every other divider in the employee UI is a single light
 *        hairline; this one predates that language.
 *
 *     b) `.digit-label-field-pair` is a flex row with a content-width
 *        label column, and `.label-styles` truncates with an ellipsis
 *        rather than wrapping. On a 420px viewport that reads
 *        "Complainant Pho…" and "Complaint's Loca…" — the operator
 *        cannot tell what the field is. Stack them instead, which is
 *        what the profile form already does at this width.
 * ---------------------------------------------------------------------- */

.employee .v2-scope hr.digit-break-line {
  border: 0 !important;
  border-top: 1px solid
    var(--color-card-divider, var(--color-card-border, #E5E7EB)) !important;
  margin: 20px 0 !important;
}

@media (max-width: 47.99rem) {
  .employee .v2-scope .digit-label-field-pair {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
  }
  .employee .v2-scope .digit-label-field-pair > .digit-header-content.label,
  .employee .v2-scope .digit-label-field-pair > .digit-header-content.label
    .label-container {
    width: 100% !important;
    max-width: 100% !important;
  }
  /* With the label above it, the field gets the whole row; `.digit-field`
   * otherwise keeps the width it was given for the two-column desktop
   * layout (239px of a 399px row). */
  .employee .v2-scope .digit-label-field-pair > .digit-field,
  .employee .v2-scope .digit-label-field-pair > .digit-field > * {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* A label that has room to wrap does not need to truncate. */
  .employee .v2-scope .digit-label-field-pair .label-styles {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    width: auto !important;
    max-width: 100% !important;
  }
  .employee .v2-scope hr.digit-break-line {
    margin: 16px 0 !important;
  }
}

/* ----------------------------------------------------------------------
 * 66. Route grounds (#2038 review round 2, extended for citizen)
 *
 *     `.v2-scope` carries `background: var(--v2-page-bg)`, and `--v2-page-bg`
 *     resolves to `--color-page-bg`, which this palette sets to #FFFFFF. The
 *     employee route roots carry `.v2-scope` themselves, so each one repainted
 *     the page white on top of the grey ground `.app-container.ground-container`
 *     had already painted — a full-width white slab with the ground surviving
 *     only in the gutter, and 12px cards with a light hairline sitting invisibly
 *     on it.
 *
 *     `.v2-scope` is a styling scope, not a page. The ground is painted once,
 *     by the container that owns it, so a route root nested inside that
 *     container lets it show through. Fixed here rather than per route: Edit
 *     Profile had its own copy of this, create-complaint had a different
 *     workaround, and complaint details had neither.
 * ---------------------------------------------------------------------- */
.employee .app-container.ground-container > .v2-scope,
.employee .grounded-container > .v2-scope {
  background-color: transparent !important;
}

/*     Same defect on the citizen side, reported on #2038 as a downstream
 *     deviation: `/citizen/all-services` paints a white `div.v2-scope`
 *     route root over the grey `.body-container`, so the page reads as a
 *     white slab with the ground surviving only below the fold and the
 *     card invisible on it. The complaint pages mount theirs one level
 *     down, inside `.pgr-citizen-wrapper`, which is why My Complaints, a
 *     complaint and the File a Complaint form each sat in a white panel of
 *     their own, cards nested inside it, where employee pages put white
 *     cards straight on the grey.
 *
 *     The sign-in card (`.citizen-form-wrapper`) keeps its own ground. */
.citizen .center-container.citizen-home-container > .v2-scope:not(.citizen-form-wrapper),
.citizen .pgr-citizen-wrapper > .v2-scope {
  background-color: transparent !important;
}

/* ----------------------------------------------------------------------
 * 67. Detail-card label / value hierarchy (#2038 QA)
 *
 *     Reported as "everything (subheading and text) is in same font, hard to
 *     differentiate at first glance" on the complaint details page. Measured:
 *     the label is 13px/500 and the value 15px/400, in exactly the same
 *     colour. The label being smaller but heavier cancels out against the
 *     value being larger but lighter, so neither reads as subordinate.
 *
 *     Treat the label as what it is, a field caption: smaller, uppercase,
 *     tracked out, in the muted tone. The value carries the weight instead.
 *     That is the same caption treatment the v2 form fields already use, so
 *     the read/write halves of the module now match.
 *
 *     Note this needs the theme's text ramp to actually be a ramp. The
 *     bomet-county ThemeConfig currently sets text-primary, -secondary,
 *     -muted and -heading all to #1D2433, which flattens every caption in
 *     the app to body colour; that is fixed in the MDMS record, not here.
 * ---------------------------------------------------------------------- */
/*     The PGR details page already had a 13px label rule of its own from an
 *     earlier round, written as
 *     `.v2-pgr-details [class*="field-pair"] [class*="label"]`. That is
 *     three compounds to this rule's two, so it won on size and weight and
 *     only the uppercase landed. Matching its shape here keeps the caption
 *     defined in one place instead of two rules disagreeing. */
.employee .digit-viewcard-label,
.employee [class*="field-pair-label"],
.employee .digit-viewcard-field-pair [class*="label"] {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: var(--color-text-muted, #6B7280) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  margin-bottom: 2px !important;
}
.employee .digit-viewcard-value,
.employee [class*="field-pair-value"] {
  font-size: 0.9375rem !important;
  font-weight: 500 !important;
  color: var(--color-text-primary, #1D2433) !important;
}

/* ----------------------------------------------------------------------
 * 68. Language selection buttons (#2038 QA)
 *
 *     "button sizes are different for each language button": the container
 *     is `display: block` and each button shrink-wraps its own label, so the
 *     row measured 76 / 84 / 94px for English / Francais / Portugues. A
 *     language picker is a set of equal choices and should not rank them by
 *     how long the word is.
 *
 *     Flex row with a shared floor instead. 7rem clears the longest of the
 *     three at this type size and lands the row on the same left edge as the
 *     Continue button beneath it. Wraps rather than overflowing when a tenant
 *     ships more languages than fit.
 * ---------------------------------------------------------------------- */
.language-button-container {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  justify-content: center !important;
}
.language-button-container .customBtn,
.language-button-container .customBtn-selected {
  flex: 0 0 auto !important;
  min-width: 7rem !important;
  margin: 0 !important;
  text-align: center !important;
}

/* ----------------------------------------------------------------------
 * 69. Employee form type scale (#2038 QA)
 *
 *     "Bigger and more legible font size and header vs content font size
 *     hierarchy" on Create Complaint. Measured before: section header 16/600,
 *     field label 14/500, input text 14/400, and the breadcrumb's current
 *     crumb 16/400 — the same size as the section headers it sits above, so
 *     the loudest thing on the page was the navigation.
 *
 *     After: breadcrumb 14, label 14, input 15, section header 18. The
 *     section header now reads a step above its fields, the breadcrumb a step
 *     below, and the text the operator actually types is the larger of the
 *     two body sizes. Input size matches the detail card's value size from
 *     section 67, so the read and write views of a complaint agree.
 * ---------------------------------------------------------------------- */
.employee .digit-card-section-header {
  font-size: 1.125rem !important;
  font-weight: 600 !important;
}
.employee .digit-bread-crumb,
.employee .digit-bread-crumb-content {
  font-size: 0.875rem !important;
}
.employee .v2-scope input,
.employee .v2-scope textarea,
.employee .v2-scope [role="combobox"],
.employee .v2-scope [role="combobox"] span,
.employee .v2-scope [role="option"] {
  font-size: 0.9375rem !important;
}

/* ----------------------------------------------------------------------
 * 70. Submitted-complaint response screen on mobile (#2038 QA)
 *
 *     '"Create Another Complaint" clickable text is misaligned'. The panel's
 *     footer row carries `margin-left: auto`, which right-aligns the action
 *     buttons. That is the right call for a wide desktop panel, but on a
 *     phone the single tertiary link gets pushed off the left edge that the
 *     description paragraph directly above it sits on, so the two read as
 *     misaligned rather than as a column.
 *
 *     Left-align the footer on mobile only, so the link lines up with the
 *     copy it follows. Desktop keeps its right-aligned action row.
 *
 *     The Back bar below it is inline-styled `marginLeft: 6rem` and
 *     `minWidth: 16rem` in the PGR Response component, tuned for a desktop
 *     action bar. On a 414px viewport that is a 96px indent on a 256px
 *     button, so it sits off-centre too. Released here rather than in the
 *     component, which would have to branch on viewport to keep the desktop
 *     placement.
 * ---------------------------------------------------------------------- */
@media (max-width: 47.99rem) {
  .employee .digit-panelcard-footer,
  .employee .digit-panelcard-footer-buttons {
    margin-left: 0 !important;
    width: 100% !important;
    justify-content: flex-start !important;
  }
  /* The button element itself: its classes are `digit-button-primary large`,
     so a `.digit-button` selector never matched and the 6rem indent stayed.
     0.5rem matches its inline right margin, so with the bar's own 0.5rem
     padding it spans the same 16px edges as the link above. */
  .employee .mc_back button {
    margin-left: 0.5rem !important;
    min-width: 0 !important;
    width: 100% !important;
  }
}

/* ----------------------------------------------------------------------
 * 71. "Powered by DIGIT" below the fold on mobile (#2038 QA)
 *
 *     Reported as the footer not showing on a phone until you scroll, even
 *     on the landing page where the content ends less than half way down.
 *
 *     Measured on a 800px viewport: the topbar is `position: fixed` so it
 *     takes no flow, but the mobile working-context strip is `position:
 *     sticky` and does, costing 41px. Under it `.main` asks for 100vh and
 *     `.employee-app-wrapper` for `100vh - 160px`, neither of which knows
 *     about that strip. So the column always came to viewport + 41px and the
 *     footer, which is the last child of `.main`, started at y=801: one pixel
 *     past the fold.
 *
 *     Rather than teach each of those calc()s about the strip, make the
 *     column a flex column and let the two fillers flex. The footer then sits
 *     at the bottom of the viewport when the page is short and flows normally
 *     when it is long. Measured: footer bottom 841 -> exactly 800, page no
 *     longer scrollable on the landing page.
 * ---------------------------------------------------------------------- */
@media (max-width: 47.99rem) {
  .body-container > .employee {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
  }
  .body-container > .employee > .main {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .body-container > .employee > .main > .employee-app-wrapper {
    flex: 1 1 auto !important;
    min-height: 0 !important;
  }
}

/* ======================================================================
 * Employee sidebar — pin-to-open, and content that travels with it
 * (#2038 review: "smoother animation, always open button as well for
 * desktop, content moves with sidebar opening").
 *
 * Three separate complaints with one shared cause: the nav is
 * `position: fixed`, so it has never been able to move anything. Widening
 * it on hover painted a 240px panel straight over the page, and because
 * SideNav was handed empty `expandedWidth`/`collapsedWidth` strings it fell
 * through to the stylesheet's `width: auto` open state, which is not an
 * animatable value — so the declared transition never ran and the panel
 * simply appeared.
 *
 * SideNav now takes concrete widths (3rem / 15rem) so the width genuinely
 * interpolates, plus an opt-in pin. The pinned state is published on the
 * root element by EmployeeSideBar, which is what lets this stylesheet inset
 * the surface by the same distance over the same duration.
 *
 * Round 3 removed the hover peek altogether: the toggle in the rail's head is
 * now the only way to open or close it (see the full-height block at the end
 * of this file), so "pinned" and "open" are the same state.
 * ---------------------------------------------------------------------- */

/* The sidebar only exists at >=768px (EmployeeSideBar renders inside
 * `MediaQuery minWidth={768}`), so there is nothing to inset below that. */
@media (min-width: 48rem) {
  /* Vendor: `margin-left: 72px; width: calc(100% - 83px)`, a 48px rail plus
   * a 24px gutter and 11px on the right. The same gutters, around whatever
   * width the rail has now (--app-rail-w), so the page and the panel cannot
   * disagree about how far they moved. */
  .employee .main {
    transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }
  html[data-sidebar-pinned] .employee .main {
    margin-left: calc(var(--app-rail-w) + 24px) !important;
    width: calc(100% - var(--app-rail-w) - 35px) !important;
  }
}

/* An open rail keeps the expanded padding; without this the vendor's
 * collapsed `padding: 0 .75rem` fights the open layout. */
.digit-sidebar.pinned {
  padding: 0;
}

/* …and the open state must not clamp its own animation.
 *
 * Vendor's `.digit-sidebar.hovered` sets `min-width: 15rem`. `min-width` is
 * not an animatable property and it clamps the USED width, so the moment the
 * class lands the rail is 240px wide regardless of what `width` is busy
 * transitioning towards. Opening therefore snapped while closing animated —
 * on close the class is removed, the clamp disappears, and the width
 * transition finally has somewhere to travel.
 *
 * SideNav now supplies both widths inline, so the vendor's minimum has no job
 * left to do. Releasing it is what lets the open direction animate at all. */
:is(.employee, .citizen) .digit-sidebar.hovered,
:is(.employee, .citizen) .digit-sidebar.pinned {
  min-width: 0 !important;
}

/* Logout dialog account card — avatar, name, and the identifying line inside
 * a bordered block, so the dialog shows WHICH account is being signed out
 * rather than restating its own heading three times (#2038 review).
 *
 * The name and meta are separate rows deliberately: as inline spans they ran
 * together as "AdminADMIN", which reads as one corrupted string rather than
 * two facts about the account. */
.digit-logout-account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--color-card-border, #E5E7EB);
  border-radius: 8px;
  /* The popup header carries a 1px rule and the body started 5px under it, so
   * the card read as stuck to the divider. 16px is the spacing the rest of the
   * employee app puts between a section rule and the block beneath it. */
  margin-top: 12px;
}
.digit-logout-account-avatar {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary-1-bg, #FFF4D7);
  color: var(--color-primary-1, #204F37);
  font-weight: 700;
  font-size: 0.875rem;
  /* The initials are decorative next to the name they are derived from; the
   * fixed box keeps a long pair from stretching the circle into an ellipse. */
  letter-spacing: 0.02em;
}
.digit-logout-account-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.digit-logout-account-name {
  font-weight: 700;
  color: var(--color-text-primary, #363636);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.digit-logout-account-meta {
  font-size: 0.875rem;
  color: var(--color-text-secondary, #505A5F);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mobile header: one tenant mark, not two.
 *
 * Below the shared header's own breakpoint the `img` slot and the `ulb` slot
 * sit side by side in `.digit-header-img-ulb-wrapper-mobileview` with a
 * `.topbar-divider` between them. Plenty of deployments point both at the same
 * asset — Bomet serves one crest for both — so the same image rendered twice,
 * at 28px and 38px, split by a rule.
 *
 * Neither prop can simply be dropped: `ulb` is the only one that renders above
 * this breakpoint, and blanking `img` makes the shared header substitute its
 * own default mSeva mark. So both stay and the smaller one is hidden here,
 * along with the now-pointless divider.
 *
 * `--single-mark` is set by TopBar.js, which is the only place the two URLs
 * can be compared; a tenant whose marks differ never gets the class and keeps
 * both images. */
:is(.employee, .citizen) .digit-topbar.digit-employee-header--single-mark
  .digit-header-img-ulb-wrapper-mobileview .digit-header-img,
:is(.employee, .citizen) .digit-topbar.digit-employee-header--single-mark
  .digit-header-img-ulb-wrapper-mobileview .topbar-divider {
  display: none !important;
}

/* Dropdown carets are chrome, not action icons.
 *
 * The rule above bumps every SVG under `[class*="header-action"]` to 28px, to
 * stop the right-hand action icons reading tiny against the enlarged logos.
 * It also caught `.header-dropdown-arrow`, which is not an action icon but the
 * caret belonging to a text label — at 28px beside a 14px word it outweighed
 * the thing it points at, and sat 4px low because the SVG is inline and so
 * rides the text baseline rather than the line box.
 *
 * 18px matches the label's own optical weight, and taking the caret out of
 * inline flow is what actually centres it. Measured before: 28px, 4px low. */
:is(.employee, .citizen) .digit-topbar .header-dropdown-arrow {
  display: inline-flex !important;
  align-items: center !important;
  /* The caret reads as part of its label, so it sits closer to it than the
     8px the action row uses between separate controls. */
  margin-left: 2px !important;
}
:is(.employee, .citizen) .digit-topbar .header-dropdown-arrow svg {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
}

/* Action row spacing — 32px between three small controls reads as three
 * unrelated things rather than one cluster, and it pushes the working-context
 * pill away from the header's right edge for no reason. 16px still separates
 * them clearly at this size; the caret rule above already tightens each label
 * to its own caret, so the only gaps left are the ones between controls. */
:is(.employee, .citizen) .digit-topbar .digit-header-action-fields {
  gap: 16px !important;
}

/* The icon column must not move when the rail opens.
 *
 * Vendor gives `.digit-sidebar-item` no padding while collapsed and 16px once
 * open, so every icon jumped 4.5px right and the rows re-spaced as the panel
 * expanded — the icons appeared to jitter under the sliding edge. One padding
 * for both states fixes the column in place; 12px is what centres a 24px icon
 * in the 48px collapsed rail, so the closed state is unchanged and only the
 * open state stops moving. The rail is 80px closed now, so 28px is what
 * centres the icon; the value changed, the reasoning did not. */
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item,
:is(.employee, .citizen) .digit-sidebar.hovered .digit-sidebar-item,
:is(.employee, .citizen) .digit-sidebar.collapsed .digit-sidebar-item {
  padding: 8px 28px !important;
}

/* Labels stay on one line while the rail widens.
 *
 * A row's label lands the moment the rail starts to open, while the rail is
 * still 80px wide. Free to wrap, "File a Complaint" and "My Complaints" ran to
 * two lines until the rail passed about 230px, so their rows grew and every row
 * below dropped 12px and came back up as the width caught up: the jitter on
 * open. On one line, clipped until the rail has room, each row keeps its final
 * height for the whole animation. */
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item .item-label {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

/* Icons hold their place while the rail narrows.
 *
 * Collapsed, vendor centres each row and its wrapper. The class lands the
 * moment the rail starts to close, while it is still 272px wide, so every icon
 * jumped from x=28 to the middle (x=124) and then slid back as the width
 * shrank: the jitter on close. Left-aligned, the 28px padding keeps the icon at
 * x=28 throughout, and at the final 80px that is still dead centre (28 + 24 + 28).
 * Vendor also gives a collapsed icon 12px of side margin, which the centring
 * hid; open, the icon has none, so it goes here too. */
:is(.employee, .citizen) .digit-sidebar.collapsed .digit-sidebar-items-container .item-child-wrapper,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item.collapsed {
  justify-content: flex-start !important;
}
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item.collapsed .icon {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Optical alignment of the bar's right edge.
 *
 * Both sides sit 24px from the edge geometrically — measured, the boxes agree
 * exactly. The right still reads wider because the last thing on it is a
 * caret, and the caret's ink does not fill its own box: the arrow path spans
 * 7→17 of a 24-unit viewBox, so at 18px it carries 5.25px of built-in
 * whitespace on its right. The eGov wordmark opposite is cropped to its ink
 * and starts at exactly 24px, so the two edges are measured the same and seen
 * differently.
 *
 * Shifting the cluster out by that whitespace is what makes the INK symmetric,
 * which is the thing the eye is actually judging.
 *
 * Applied to the row, not to its last field: the row's real last child is the
 * duplicate tenant mark suppressed above, so `:last-child` selects a
 * `display: none` element and moves nothing. The cluster's left edge is not
 * aligned to anything, so shifting the whole thing only shows at the edge that
 * needed correcting. */
:is(.employee, .citizen) .digit-topbar .digit-header-action-fields {
  /* 11px, not the caret's 5.25px alone: the trailing field carries its own
   * padding past the glyph as well. Measured from the rendered result rather
   * than derived — left ink 24px, right ink 24px. */
  margin-right: -11px !important;
}

/* One row rhythm, open or closed.
 *
 * Two separate causes, which is why setting the gap alone was not enough.
 *
 * Vendor puts `gap: 24px` on the items container while the rail is collapsed,
 * so items sat 64px apart. It also switches the container from `flex` to
 * `block` once the rail opens — and `gap` does nothing on a block box — so the
 * open state ignored any gap at all and the rows fell to 40px apart. Every
 * item below the first visibly closed ranks as the panel widened.
 *
 * Pinning the display is the half that matters: a constant gap is meaningless
 * if the box stops being a flex container. 4px rather than either original —
 * 24 is airy for a labelled list and 0 leaves the rows touching, and the point
 * is that the rail should not re-space itself just because it got wider. */
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-items-container,
:is(.employee, .citizen) .digit-sidebar.hovered .digit-sidebar-items-container,
:is(.employee, .citizen) .digit-sidebar.collapsed .digit-sidebar-items-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  row-gap: 4px !important;
}

/* Logout dialog: no close cross.
 *
 * The dialog already offers Cancel, and the overlay stays dismissable, so the
 * cross was a third way to do the same thing — and it collided with the
 * heading, which is now a question rather than a one-word title. Measured: the
 * heading block ran to x=952.7 while the close glyph started at x=934.5, so
 * "log out?" sat under it.
 *
 * Removing it is the fix rather than padding the heading away from it: the
 * control had no job left once Cancel existed. Scoped to this dialog — other
 * popups have no Cancel and still need a way out. */
.digit-logout-popup-wrapper .digit-popup-close {
  display: none !important;
}

/* Logout dialog heading: dialog scale, not page scale.
 *
 * The shared PopUp renders its heading at 32px/700 — measured identical to the
 * dashboard's page <h1>. A confirm dialog is not a page, and inside a 520px
 * box that put the question at the same weight as the title of the screen
 * behind it. 20px still leads the dialog without competing with the page.
 *
 * Scoped here rather than changed on PopUp: every dialog in the app inherits
 * that 32px, so it is worth correcting centrally, but not from a ticket about
 * the employee chrome. */
.digit-logout-popup-wrapper .digit-popup-heading,
.digit-logout-popup-wrapper .digit-popup-heading-subheading-wrap h1,
.digit-logout-popup-wrapper .digit-popup-heading-subheading-wrap h2,
.digit-logout-popup-wrapper .digit-popup-heading-subheading-wrap > * {
  font-size: 20px !important;
  line-height: 1.35 !important;
}

/* Secondary buttons sit on the surface, they do not paint one.
 *
 * DIGIT's Secondary is an outline button: brand stroke, brand label, no fill.
 * The stroke and label are already right and already themed — the record ships
 * `--color-button-secondary-border` and `--color-button-secondary-text`, both
 * #2563EB on this tenant. There is no matching background token, so the ground
 * stayed a hardcoded white that neither the tenant nor the surface could
 * influence.
 *
 * On a white card that is invisible. On the employee page ground (#EEEEEE),
 * inside the dark mobile drawer, or anywhere else, it read as a white filled
 * pill wearing a blue outline rather than as an outline button. Tertiary and
 * link are both transparent already; this makes the family consistent.
 *
 * Hover takes the brand tint every other outline control in this UI uses,
 * rather than a second opaque fill. */
:is(.employee, .citizen) .digit-button-secondary {
  background-color: transparent !important;
}
:is(.employee, .citizen) .digit-button-secondary:hover:not(.disabled):not(:disabled) {
  background-color: var(--color-primary-1-bg, rgba(37, 99, 235, 0.08)) !important;
}

/* Header dropdown options — a real transition, and the same highlight for the
 * keyboard as for the pointer.
 *
 * Two things were off. The option declares `transition: all` with no duration,
 * which is inert: `all` names the properties but nothing says how long, so the
 * tint appeared and vanished between frames. Naming the two properties that
 * actually change, with a duration, is also cheaper than animating `all`,
 * which would happily animate layout if anything ever moved.
 *
 * The larger one is that nothing styled `.activeIndex`. The shared component
 * puts that class on the option the arrow keys have moved to, and no rule
 * picked it up — so the menu highlighted under a pointer and stayed
 * completely flat under the keyboard. Same for `:focus-visible`. Reusing the
 * hover treatment means the two input methods cannot drift apart. */
html .header-dropdown-option {
  transition: background-color 0.12s ease, color 0.12s ease;
}
html .header-dropdown-option.activeIndex,
html .header-dropdown-option.activeIndex *,
html .header-dropdown-option:focus-visible,
html .header-dropdown-option:focus-visible * {
  background-color: var(--color-primary-1-bg, #FFF4D7) !important;
  color: var(--color-primary-1, #204F37) !important;
}
/* The keyboard position should be legible without relying on the tint alone,
 * which is subtle at these sizes. */
html .header-dropdown-option.activeIndex,
html .header-dropdown-option:focus-visible {
  box-shadow: inset 2px 0 0 var(--color-primary-1, #204F37);
  outline: none;
}

/* ======================================================================
 * Inbox top row: the search card is as tall as the card beside it
 * (#2038 review: "align boxes on search page").
 *
 * The links card sits at the height of its content (149px on a laptop),
 * but the search card beside it came out at 210px. Three things made it
 * tall, none of them content:
 *   - the actions had a row of their own under the fields,
 *   - the Date Range field carries the legacy select's `margin-bottom:
 *     24px`, which set the height of the whole field row,
 *   - vendor gives every `.digit-section` a `min-height: 10rem` floor.
 *
 * With the actions inline and the other two cleared, the search card is
 * shorter than the links card, and both stretch to the row so their edges
 * meet whichever one is taller. That also covers widths where the links
 * title wraps to three lines.
 *
 * Inline actions need room: three fields of about 170px plus the two
 * buttons. The rail and a pinned sidebar both take width from this card
 * independently of the viewport, so the switch is a container query on the
 * card itself rather than a media query. Below it the actions keep their
 * own row, full width and right-aligned.
 * ---------------------------------------------------------------------- */
.v2-pgr-inbox .digit-sections-parent.inbox > .digit-section.search {
  min-height: 0 !important;
  container: pgr-inbox-search / inline-size;
}
/* Supersedes the `align-self: start` above. That was written while the
 * search card stood 210px tall; now that it is compact, sharing the row
 * height is what lines the two cards up. */
.v2-pgr-inbox .digit-sections-parent.inbox > .digit-section.links {
  align-self: stretch !important;
}
.v2-pgr-inbox .digit-section.search .digit-label-field-pair .digit-employee-select-wrap {
  margin-bottom: 0 !important;
}

/* Tablet and up. Vendor pins the actions to `grid-column: 3 / -1`, so the
 * third track took the buttons' 234px and squeezed Complaint No and Mobile
 * No to about 108px each at 834px, the phone input to about 30px. Equal
 * tracks, and the actions span the row under them. Phones have their own
 * stacked layout (section 58). */
@media (min-width: 48rem) {
  .v2-pgr-inbox .digit-section.search .digit-search-field-wrapper {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    row-gap: 16px !important;
  }
  .v2-pgr-inbox .digit-section.search .digit-search-field-wrapper > .digit-search-button-wrapper {
    grid-column: 1 / -1 !important;
    justify-content: flex-end !important;
  }
}

/* A narrow search card (a tablet, beside the filter column) can't hold three
 * fields in a row: at 418px the phone input behind its +254 prefix was about
 * 30px wide. Two to a row there, the actions still on their own row below.
 * Tablets and up only: phones keep their one-field-per-row layout. */
@media (min-width: 48rem) {
  @container pgr-inbox-search (max-width: 37.99rem) {
    .v2-pgr-inbox .digit-section.search .digit-search-field-wrapper {
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
  }
}

@container pgr-inbox-search (min-width: 50rem) {
  .v2-pgr-inbox .digit-section.search .digit-search-field-wrapper {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto !important;
    align-items: end !important;
  }
  /* 40px buttons centred on the 44px fields beside them. */
  .v2-pgr-inbox .digit-section.search .digit-search-field-wrapper > .digit-search-button-wrapper {
    grid-column: auto !important;
    margin-bottom: 2px !important;
  }
}

/* An error under one field (an invalid mobile number, say) made that cell
 * taller, and with the cells bottom-aligned its input rose above the inputs
 * beside it. Each field is a label, an input and an optional error, so the
 * cells of a row share those three tracks (subgrid): labels sit level above
 * the inputs even when one wraps, the inputs stay in line, and an error only
 * opens space under its own row. Tablet and up; phones stack the fields. */
@media (min-width: 48rem) {
  .v2-pgr-inbox .digit-section.search .digit-search-field-wrapper {
    row-gap: 0 !important;
    align-items: stretch !important;
  }
  .v2-pgr-inbox .digit-section.search .digit-search-field-wrapper > .digit-inbox-search-composer-label-pair {
    display: grid !important;
    grid-row: span 3;
    grid-template-rows: subgrid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0 !important;
    margin: 0 !important;
    /* Room under each row of fields, carried into the error track by the
     * empty item below so the track keeps it with no error in it. */
    padding-bottom: 16px;
  }
  /* Every part placed outright, in one column. Left to auto-placement, two
   * items pinned to the error track would open a second column for the
   * cell. */
  .v2-pgr-inbox .digit-section.search .digit-inbox-search-composer-label-pair > * {
    grid-column: 1;
    grid-row: 2;
  }
  .v2-pgr-inbox .digit-section.search .digit-search-field-wrapper > .digit-inbox-search-composer-label-pair::after {
    content: "";
    grid-column: 1;
    grid-row: 3;
  }
  /* A short label sits on its input when a neighbour's label wraps. The
   * vendor spaced label and input with an 8px flex gap; a margin does it here,
   * since a gap would also open under every input with no error below it. */
  .v2-pgr-inbox .digit-section.search .digit-inbox-search-composer-label-pair > :first-child {
    grid-row: 1;
    align-self: end;
    margin-bottom: 8px !important;
  }
  /* Date Range renders an empty spacer between its label and its picker,
   * which would push the picker down into the error track; the picker also
   * carried a -8px pull-up written for the old flex layout. */
  .v2-pgr-inbox .digit-section.search .digit-inbox-search-composer-label-pair > .filter-label:empty {
    display: none !important;
  }
  .v2-pgr-inbox .digit-section.search .digit-inbox-search-composer-label-pair > .digit-employee-select-wrap {
    margin-top: 0 !important;
  }
  .v2-pgr-inbox .digit-section.search .digit-inbox-search-composer-label-pair > .digit-error-icon-message-wrap {
    grid-row: 3;
    align-self: start;
    margin-top: 4px !important;
  }
}
/* One row of fields with the actions inline: the buttons go in the input
 * track, so an error under a field never moves them, and nothing pads the
 * card below the row. */
@container pgr-inbox-search (min-width: 50rem) {
  .v2-pgr-inbox .digit-section.search .digit-search-field-wrapper > .digit-inbox-search-composer-label-pair {
    padding-bottom: 0;
  }
  .v2-pgr-inbox .digit-section.search .digit-search-field-wrapper > .digit-search-button-wrapper {
    /* Both lines: a row alone would auto-place it in the first column. */
    grid-row: 2 !important;
    grid-column: -2 / -1 !important;
    align-self: center !important;
    margin-bottom: 0 !important;
  }
}

/* Search and Clear, sized to their labels. Both took the vendor's 105px
 * minimum, so two five-letter labels spanned 234px of the row. Clear is an
 * outlined Secondary beside Search: the same height, padding and corners,
 * where the vendor drew it 32px tall and square-cornered, with a 16px label.
 * Its stroke and label take the theme's secondary tokens: the vendor paints
 * both in --color-primary-main, a pale yellow on white on yellow-primary
 * tenants. */
.v2-pgr-inbox .digit-section.search .digit-search-button-wrapper {
  gap: 12px !important;
}
.v2-pgr-inbox .digit-section.search .digit-search-button-wrapper :is(.digit-button-primary, .digit-button-secondary) {
  width: auto !important;
  min-width: 5rem !important;
  height: 40px !important;
  padding: 0 20px !important;
  border-radius: 6px !important;
}
.v2-pgr-inbox .digit-section.search .digit-search-button-wrapper .digit-button-secondary {
  border: 1px solid var(--color-button-secondary-border, var(--color-primary-1, #204F37)) !important;
}
.v2-pgr-inbox .digit-section.search .digit-search-button-wrapper .digit-button-secondary .digit-button-label {
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--color-button-secondary-text, var(--color-primary-1, #204F37)) !important;
}

/* The filter card's Clear All, outlined like Clear above and the same size as
 * Apply beside it: the vendor's Secondary is square-cornered, with its stroke
 * and label in --color-primary-main. */
.v2-pgr-inbox .digit-section.filter .button-container .digit-button-secondary {
  height: 40px !important;
  border: 1px solid var(--color-button-secondary-border, var(--color-primary-1, #204F37)) !important;
  border-radius: 6px !important;
}
/* Every Clear label matches the Search and Apply labels beside it: the
 * vendor's Secondary also tightens its letter-spacing. */
.v2-pgr-inbox .digit-section.filter .button-container .digit-button-secondary .digit-button-label,
.v2-pgr-inbox .digit-section.search .digit-search-button-wrapper .digit-button-secondary .digit-button-label,
.digit-popup-wrapper .digit-search-button-wrapper .digit-button-secondary .digit-button-label {
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: normal !important;
  color: var(--color-button-secondary-text, var(--color-primary-1, #204F37)) !important;
}

/* The phone search and filter sheets stack Clear over a full-width Search.
 * Clear kept the vendor's square corners and its stroke and label in
 * --color-primary-main; the same corners and secondary tokens as above. */
.digit-popup-wrapper .digit-search-button-wrapper .digit-button-secondary {
  border: 1px solid var(--color-button-secondary-border, var(--color-primary-1, #204F37)) !important;
  border-radius: 6px !important;
}
.digit-popup-wrapper .digit-search-button-wrapper .digit-button-secondary .digit-button-label {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--color-button-secondary-text, var(--color-primary-1, #204F37)) !important;
}

/* The filter card was padded twice: 20px on the card, then 24px again on
 * its header and on its content, so the fields started 45px in while the
 * cards above start 24px in. One inset, the same as theirs. */
.v2-pgr-inbox .digit-sections-parent.inbox > .digit-section.filter {
  padding: 24px !important;
}
.v2-pgr-inbox .digit-section.filter .filter-header {
  padding: 0 !important;
  margin-bottom: 16px !important;
}
.v2-pgr-inbox .digit-section.filter .content-container {
  padding: 0 !important;
}

/* Side by side, the filter column (County/Sub County/Ward and ~10 statuses,
 * ~1310px) outgrew a 10-row table (~840px) and the stretched table card was
 * left with a tall blank band under its pagination.
 *
 * The table now sets the row height: `contain: size` takes the filter's
 * content out of the row's sizing, and its fields scroll inside the card
 * with Apply / Clear All kept in view below them. The floor of about one
 * screen keeps a one- or two-row table from squeezing the filter into a
 * sliver; the table card then stretches to it with the pagination at its
 * foot. */
@media (min-width: 48rem) {
  .v2-pgr-inbox .digit-sections-parent.inbox > .digit-section.filter {
    contain: size;
    /* Vendor's `height: fit-content` would keep it out of the row stretch. */
    height: auto !important;
    min-height: max(24rem, calc(100vh - 8rem));
    display: flex;
    flex-direction: column;
  }
  .v2-pgr-inbox .digit-section.filter > .digit-tab-main,
  .v2-pgr-inbox .digit-section.filter .filter-card {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .v2-pgr-inbox .digit-section.filter .filter-card > .content-container {
    flex: 0 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    /* Room for the fields' focus rings at the scroll edges. */
    padding: 0 4px !important;
    margin: 0 -4px;
  }
  /* The section already insets the card by 24px; vendor pads the buttons by
   * another 24px all round. */
  .v2-pgr-inbox .digit-section.filter .filter-card > .button-container {
    flex: none;
    padding: 16px 0 0 !important;
  }
  /* Vendor marks the header and buttons `with-shadow` while the fields
   * overflow. Its 1px shadow hugged the unpadded header like a box; a
   * hairline under the header and over the buttons marks the scroll edges. */
  .v2-pgr-inbox .digit-section.filter .filter-card > .filter-header.with-shadow {
    box-shadow: none !important;
    padding-bottom: 12px !important;
    margin-bottom: 0 !important;
    border-bottom: 1px solid var(--color-border, #d6d5d4);
  }
  .v2-pgr-inbox .digit-section.filter .filter-card > .filter-header.with-shadow + .content-container {
    padding-top: 12px !important;
  }
  .v2-pgr-inbox .digit-section.filter .filter-card > .button-container.with-shadow {
    box-shadow: none !important;
    border-top: 1px solid var(--color-border, #d6d5d4);
  }
  .v2-pgr-inbox .digit-table-card > div:last-child:has(> .rdt_Pagination) {
    margin-top: auto;
  }
}

/* The module icon belongs to the title's first line. Centred on the whole
 * block, it floated between the lines once the title wrapped, and lower
 * still because the title carries a bottom margin. 1px centres the 20px
 * glyph on the 22.4px line. */
.v2-pgr-inbox .digit-section.links .digit-inbox-search-links-header {
  align-items: flex-start !important;
}
.v2-pgr-inbox .digit-section.links .digit-inbox-search-links-header-logo {
  margin-top: 1px !important;
}

/* ======================================================================
 * Employee page gutters between 600px and 768px (#2038 review).
 *
 * Vendor reserves the sidebar rail from 640px up (`.employee .main {
 * margin-left: 72px; width: calc(100% - 83px) }`), but EmployeeSideBar only
 * renders the rail from 768px (`MediaQuery minWidth={768}`). The phone rule
 * that gives the space back stops at 600px. In between, every employee page
 * kept a 72px gutter for a rail that is not there: 100px of left gap against
 * 27px on the right, measured on the inbox at 697px.
 *
 * Same three resets as the phone block, over the whole range without a rail.
 * Scoped to `.employee`; citizen pages have their own shell.
 * ---------------------------------------------------------------------- */
@media (max-width: 47.99rem) {
  .employee .main.digit-home-main {
    margin-left: 0 !important;
    width: 100% !important;
  }
  .employee .ground-container.digit-home-ground {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .employee .digit-landing-page-wrapper {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }
  /* Home's module cards stop at 480px wide. Beside the old 72px gutter that
   * happened to look centred; without it they sat 28px from the left and
   * 189px from the right. Full width here, as they already are on phones. */
  .employee .digit-landing-page-card {
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* ======================================================================
 * App shell: full-width top bar, rail below it (#2038 design).
 *
 * Both apps. The top bar spans the window again with the tenant crest at its
 * left, on a white tile; the rail starts under it and opens or closes only
 * from the blue square on its edge. Its foot carries Logout and the eGov
 * lockup, so the bar no longer shows the lockup.
 *
 * The rail's two widths are declared once. `--app-rail-w` follows the rail's
 * state (published on <html> by AppSideNav) and is what every page inset
 * reads, so the page, the footer and the toggle cannot disagree with the
 * panel about how far it moved. Unset (no rail, or a phone) it is 0.
 * ---------------------------------------------------------------------- */
:root {
  --app-rail-open: 17rem;
  --app-rail-closed: 5rem;
  --app-rail-w: 0px;
}
@media (min-width: 48rem) {
  html[data-sidebar-pinned="false"] {
    --app-rail-w: var(--app-rail-closed);
  }
  html[data-sidebar-pinned="true"] {
    --app-rail-w: var(--app-rail-open);
  }

  /* The lockup lives in the rail's foot; the bar keeps only the crest. A
   * tenant with no crest image at all keeps the logo slot rather than an
   * empty corner. */
  :is(.employee, .citizen) .digit-topbar.digit-employee-header:not(.digit-employee-header--no-crest) .digit-topbar-logo {
    display: none !important;
  }
  :is(.employee, .citizen) .digit-topbar.digit-employee-header .digit-topbar-ulb {
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px;
  }
  :is(.employee, .citizen) .digit-topbar.digit-employee-header .digit-topbar-ulb-label {
    color: var(--color-header-text, #ffffff);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
  }
  :is(.employee, .citizen) .digit-topbar.digit-employee-header .digit-topbar-ulb img.state {
    width: 40px !important;
    height: 40px !important;
    max-height: 40px !important;
    object-fit: contain;
    background: #ffffff;
    border-radius: 8px;
    padding: 2px;
    box-sizing: border-box;
  }
}

/* The toggle: a blue square on the rail's edge, just under the bar. Fixed to
 * the viewport (see RailToggle), so it is placed from the same width variable
 * and eased on the same curve as the rail. Desktop only, like the rail. */
.digit-rail-toggle {
  display: none;
}
@media (min-width: 48rem) {
  html[data-sidebar-pinned] .digit-rail-toggle {
    position: fixed;
    top: calc(var(--employee-header-h, 64px) + 18px);
    left: calc(var(--app-rail-w) - 16px);
    z-index: 1001;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 2px solid #ffffff;
    border-radius: 9px;
    background: var(--color-primary-2, #2563EB);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.2);
    transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.12s ease;
  }
  /* No theme publishes a hover shade of primary-2, so it is derived. */
  html[data-sidebar-pinned] .digit-rail-toggle:hover {
    background: color-mix(in srgb, var(--color-primary-2, #2563EB) 85%, #000000);
  }
  html[data-sidebar-pinned] .digit-rail-toggle:focus-visible {
    outline: 2px solid var(--color-primary-2, #2563EB);
    outline-offset: 2px;
  }
  .digit-rail-toggle svg,
  .digit-rail-toggle svg * {
    fill: none !important;
    stroke: currentColor !important;
  }
}

/* The selected row is plain blue: vendor adds an 8px white strip down its
 * left edge (a ::before), which the design does not have. */
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-item.selected::before {
  display: none !important;
}

/* Rows start 22px under the bar, as designed; the rail has no head now. */
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-items-container {
  padding-top: 22px !important;
}

/* A section is a label over its rows; the rows keep the list's own 4px rhythm.
 * It also closes with a rule. Without one, the row after the section
 * (Dashboard) read as the section's third entry. Same height open or closed,
 * so nothing below it moves. */
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-section::after {
  content: "";
  display: block;
  height: 1px;
  margin: 8px 12px 4px;
  background: rgba(255, 255, 255, 0.18);
}
:is(.employee, .citizen) .digit-sidebar.collapsed .digit-sidebar-section::after {
  margin-left: 10px;
  margin-right: 10px;
}
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-section-label,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-section-divider {
  height: 28px;
  box-sizing: border-box;
  margin: 0;
}
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-section-label {
  display: flex;
  align-items: flex-end;
  padding: 0 12px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  color: var(--color-sidebar-text-default, #D1D5DB);
  opacity: 0.7;
}
/* Closed, there is no room for words: a hairline in the same 28px. */
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-section-divider {
  border: 0;
  margin: 0 10px;
  background: linear-gradient(
    transparent 13px,
    rgba(255, 255, 255, 0.18) 13px,
    rgba(255, 255, 255, 0.18) 14px,
    transparent 14px
  );
}

/* Foot: Logout, then the eGov lockup. Logout's icon sits on the same 28px
 * line as the row icons above it, open or closed. */
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-foot {
  margin-top: auto;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-logout {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 46px;
  margin: 6px 12px 10px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  /* The rail's own row colour, as its navigation rows use. */
  color: var(--color-sidebar-text-default, rgba(255, 255, 255, 0.88));
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-logout:hover {
  background: color-mix(in srgb, currentColor 10%, transparent);
}
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-logout:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -2px;
}
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-logout svg,
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-logout svg * {
  flex: 0 0 auto;
  fill: none !important;
  stroke: currentColor !important;
}
/* The lockup's band is exactly as tall as the page's "Powered by DIGIT"
 * footer (--v2-page-footer-height, 40px), so its top rule runs level with the
 * footer's top border across the whole window. Same navy as the rail: a
 * darker band read as a separate strip stuck to the rail's foot. */
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-egov-band {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: var(--v2-page-footer-height, 40px);
  box-sizing: border-box;
  padding: 0 0 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  /* The lockup travels with the rail rather than jumping (the rail's own
   * 0.28s and easing, AppSideNav's transitionDuration). Clipped, not squeezed,
   * while the rail is still too narrow for it. */
  overflow: hidden;
  transition: padding-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Closed, the lockup sits centred in the 80px rail: (80 - 56) / 2 = 12px. A
 * padding, not justify-content: center, because centring can't animate and
 * snapped the lockup from x=28 to the middle of the still-wide rail. */
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-foot.closed .digit-sidebar-egov-band {
  padding-left: 12px;
}
.digit-sidebar-foot .digit-sidebar-egov {
  display: block;
  height: 18px;
  width: auto;
}
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-egov {
  flex: 0 0 auto;
  max-width: none;
  transition: height 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
:is(.employee, .citizen) .digit-sidebar .digit-sidebar-foot.closed .digit-sidebar-egov {
  height: 14px;
}

/* Phones: the eGov lockup moves to the drawer's foot, and the crest keeps the
 * bar. The drawer is the Hamburger, not SideNav, hence its own selectors. */
@media (max-width: 47.99rem) {
  :is(.employee, .citizen) .digit-topbar.digit-employee-header .digit-topbar-logo.mobileview {
    display: none !important;
  }
  /* The phone bar renders the crest twice (the wrapper's image and the ulb
   * block) and older rules hid one or the other depending on width, which left
   * no crest at all under 600px once the lockup went. One crest, from the
   * wrapper, at every phone width. */
  :is(.employee, .citizen) .digit-topbar.digit-employee-header .digit-header-img-ulb-wrapper-mobileview {
    height: auto !important;
    align-self: center !important;
    display: flex !important;
    align-items: center !important;
  }
  :is(.employee, .citizen) .digit-topbar.digit-employee-header .digit-header-img-ulb-wrapper-mobileview .digit-header-img {
    display: block !important;
    height: 32px !important;
    max-height: 32px !important;
    width: auto !important;
    max-width: none !important;
  }
  :is(.employee, .citizen) .digit-topbar.digit-employee-header .digit-topbar-ulb-mobileview {
    display: none !important;
  }
}
/* The drawer's Logout is a secondary button on the drawer's own navy. Since
 * secondary buttons went transparent (#2038 round 2), its label and icon kept
 * the page's dark text colour: #1D2433 on #0B1F3A, about 1.1:1, and the word
 * all but vanished. On a dark surface it takes the drawer's own light text,
 * the same as the rows above it. */
:is(.employee, .citizen) .digit-msb-sidebar .digit-msb-sidebar-bottom .digit-button-secondary {
  border-color: rgba(255, 255, 255, 0.5) !important;
  color: var(--color-sidebar-selected-text, #FFFFFF) !important;
}
:is(.employee, .citizen) .digit-msb-sidebar .digit-msb-sidebar-bottom .digit-button-secondary .digit-button-label {
  color: var(--color-sidebar-selected-text, #FFFFFF) !important;
}
:is(.employee, .citizen) .digit-msb-sidebar .digit-msb-sidebar-bottom .digit-button-secondary svg,
:is(.employee, .citizen) .digit-msb-sidebar .digit-msb-sidebar-bottom .digit-button-secondary svg path {
  fill: var(--color-sidebar-selected-text, #FFFFFF) !important;
}
:is(.employee, .citizen) .digit-msb-sidebar .digit-msb-sidebar-bottom .digit-button-secondary:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
}

.digit-msb-sidebar .digit-msb-section-label {
  padding: 16px 16px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-sidebar-text-default, #D1D5DB);
  opacity: 0.7;
}

/* ======================================================================
 * Citizen shell on the employee rail and top bar (#2038 review).
 *
 * Citizen pages now render the same SideNav and Header as employee pages,
 * and the rules above that style those were widened to `:is(.employee,
 * .citizen)`. What is citizen-specific is the layout they sit in: the
 * content is `.citizen-home-container`, a padded flex row, where the
 * employee surface is a margined `.main`. The old gutter was a fixed 260px
 * keyed on the v2 sidebar (`aside.v2-scope`), which no longer renders.
 *
 * A rail is on the page exactly when <html> carries `data-sidebar-pinned`
 * (AppSideNav sets it while mounted), so the signed-out sign-in pages keep a
 * centred layout. The inset reads --app-rail-w, so the page travels with it.
 * ---------------------------------------------------------------------- */
/* "Powered by DIGIT" sat 74px above the bottom of the window on short pages:
 * the row's min-height subtracts the bar's height as well as the footer's,
 * but the row's own padding already makes room for the bar. A column that
 * fills the window, with the row taking the slack, parks the footer at the
 * bottom whatever either height is, the way employee pages end. */
.citizen:has(> .center-container.citizen-home-container) {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.citizen > .center-container.citizen-home-container {
  flex: 1 0 auto;
}

/* Vendor pads `.citizen .main` 82px (58px from 640px), sized for the legacy
 * citizen bar. Content now clears the shared bar by the same distance as on
 * employee pages. */
.citizen .main.center-container.citizen-home-container {
  padding-top: var(--employee-header-h, 76px) !important;
}
@media (min-width: 48rem) {
  /* The right gutter mirrors the 20px left of the page, so a card sits as
   * far from the window's edge as from the rail. */
  html[data-sidebar-pinned] .citizen .center-container.citizen-home-container {
    padding-left: calc(var(--app-rail-w) + 20px) !important;
    padding-right: 20px !important;
    align-items: flex-start !important;
    transition: padding-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }
}
/* The rail renders beside the page now, not inside it, and the vendor sheet
 * lifts this container to z-index 100 in the citizen flex column: its left
 * padding sat over the rail and took every click on it. With a rail on the
 * page the container takes no stacking level of its own, so the rail stays
 * clickable and a dialog opened in the page can cover the bar too. */
html[data-sidebar-pinned] .citizen .main.center-container.citizen-home-container {
  z-index: auto;
}

/* A module's landing page (/citizen/pgr-home): the Back row the module's
 * pages open with, then its All Services card at the same 434px cap. */
.citizen .citizen-module-home {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  padding: 0 16px 24px;
}
/* The column's gap already spaces the Back row from the card. */
.citizen .citizen-module-home > .back-btn2 {
  margin-bottom: 0;
}
.citizen-module-home__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 434px));
  gap: 16px;
  align-items: start;
}

/* Back reads as a link in the action colour, like the card rows and the
 * tertiary buttons it sits among, but its glyph was a small filled
 * triangle where every other chevron in the app (card rows, the account
 * menu, list cards) is an outline. Same outline chevron here, masked so it
 * takes the link colour and its hover. */
.back-btn2 > svg {
  display: none !important;
}
.back-btn2::before {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='m15 18-6-6 6-6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='m15 18-6-6 6-6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
}

/* One inset for every citizen page: heading, cards and Back 24px in from the
 * content column, as on All Services and Edit Profile. The complaint pages
 * sat 16px further in, their wrapper's own `padding: 0 16px` stacked on the
 * 24px their headers and cards already carry, with Back left between the
 * two. */
.citizen .pgr-citizen-wrapper {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.citizen .pgr-citizen-wrapper > .back-btn2 {
  margin-left: 24px;
}
.citizen .citizen-module-home {
  padding: 0 24px 24px !important;
}

/* Citizen sign-in (mobile number, OTP): the employee sign-in's ground, the
 * tenant's navy from edge to edge with the card lifted off it, where it was a
 * white page with a hairline card. The top bar stays for its language picker
 * (citizens have no language step of their own) and, being the same navy,
 * reads as part of the ground; "Powered by DIGIT" sits on the navy too. */
.citizen:has(.citizen-form-wrapper) {
  background-color: var(--color-digitv2-header-sidenav, #0B4B66);
}
.citizen .citizen-form-wrapper {
  background-color: transparent !important;
}
.citizen:has(.citizen-form-wrapper) > .citizen-home-footer {
  background-color: transparent !important;
  border-top: 0 !important;
}
.citizen:has(.citizen-form-wrapper) .digit-topbar.digit-employee-header {
  box-shadow: none !important;
  border-bottom: 0 !important;
}
/* The sign-in card carries the crest, so the bar does not repeat it: on
 * desktop its brand block, on a phone the crest beside the menu button (the
 * button stays; it is where a phone reaches Language). Keyed on the card
 * itself, not the sign-in wrapper, so a step that renders without the card
 * keeps the bar's crest rather than showing none. */
.citizen:has(.citizen-sign-in-card) .digit-topbar .digit-logo-ulb-wrapper,
.citizen:has(.citizen-sign-in-card) .digit-topbar .digit-header-img-ulb-wrapper-mobileview {
  display: none !important;
}
.citizen:has(.citizen-sign-in-card) .digit-topbar .digit-header-action-fields {
  margin-left: auto !important;
}

/* ======================================================================
 * Phone bar and drawer (#2038 design and mobile review).
 * ---------------------------------------------------------------------- */
@media (max-width: 47.99rem) {
  /* Menu button: a translucent rounded square, and no blue box on tap.
   * The box was the browser's tap highlight on a clickable div, and the
   * focus ring left behind after a pointer tap; keyboard focus still shows. */
  :is(.employee, .citizen) .digit-topbar .digit-topbar-hamburger {
    display: grid !important;
    place-items: center;
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 auto;
    border-radius: 9px;
    /* A tint of the bar's own text colour, so a light-header tenant gets a
     * dark chip rather than white on white. */
    background: color-mix(in srgb, var(--color-header-text, #ffffff) 12%, transparent);
    -webkit-tap-highlight-color: transparent;
  }
  :is(.employee, .citizen) .digit-topbar .digit-topbar-hamburger:focus:not(:focus-visible) {
    outline: none;
  }
  /* Vendor's `.clickable:hover` draws a 1px brand border, and on a touch
   * screen hover sticks after the tap, so the button kept a blue box. */
  :is(.employee, .citizen) .digit-topbar .digit-topbar-hamburger:is(:hover, :active) {
    border: 0 !important;
  }
  :is(.employee, .citizen) .digit-topbar .digit-topbar-hamburger svg {
    width: 20px !important;
    height: 20px !important;
  }
  /* Crest on the same white rounded square as the desktop bar. */
  :is(.employee, .citizen) .digit-topbar.digit-employee-header .digit-header-img-ulb-wrapper-mobileview .digit-header-img {
    width: 38px !important;
    height: 38px !important;
    max-height: 38px !important;
    object-fit: contain;
    background: #ffffff;
    border-radius: 8px;
    padding: 2px;
    box-sizing: border-box;
  }
  :is(.employee, .citizen) .digit-topbar .digit-header-mobile-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
  }
}

/* Language pill (phone bar). */
.digit-language-pill {
  position: relative;
}
.digit-language-pill-button {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  /* The bar's text colour and a tint of it, as the menu button. */
  background: color-mix(in srgb, var(--color-header-text, #ffffff) 12%, transparent);
  color: var(--color-header-text, #ffffff);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.digit-language-pill-button:focus:not(:focus-visible) {
  outline: none;
}
.digit-language-pill-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.digit-language-pill-button svg,
.digit-language-pill-button svg * {
  fill: none !important;
  stroke: currentColor !important;
}
.digit-language-pill-menu {
  position: absolute;
  right: 0;
  top: 42px;
  width: 160px;
  max-width: calc(100vw - 48px);
  margin: 0;
  padding: 0;
  list-style: none;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.24);
  overflow: hidden;
  z-index: 10000;
}
.digit-language-pill-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px;
  border: 0;
  border-bottom: 1px solid #f1f3f7;
  background: #ffffff;
  color: #111827;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.digit-language-pill-menu li:last-child .digit-language-pill-option {
  border-bottom: 0;
}
.digit-language-pill-option.active {
  background: #f3f6fc;
  font-weight: 600;
}
/* The menu opens inside the bar, whose rules paint every descendant with the
 * header's white text (`.digit-topbar.light *`); on the white menu that made
 * the names invisible. */
.digit-topbar .digit-language-pill-menu .digit-language-pill-option,
.digit-topbar .digit-language-pill-menu .digit-language-pill-option span {
  color: #111827 !important;
}
.digit-language-pill-option svg,
.digit-language-pill-option svg * {
  fill: none !important;
  stroke: var(--color-primary-2, #2563EB) !important;
}

/* Drawer: one faint line under the last grouped section, and one over the eGov
 * lockup (as the desktop rail has over its eGov band); no other lines, not
 * between rows, not under the profile, not around Logout. The global `[class*="divider"]` rule adds a light grey top border
 * to the separator, which is what made it read white; only its fill stays. */
:is(.employee, .citizen) .digit-msb-sidebar .digit-msb-profile,
:is(.employee, .citizen) .digit-msb-sidebar .digit-msb-item-child-wrapper,
:is(.employee, .citizen) .digit-msb-sidebar .digit-msb-sidebar-bottom,
:is(.employee, .citizen) .digit-msb-sidebar .digit-sidebar-foot {
  border-top: 0 !important;
  border-bottom: 0 !important;
}
:is(.employee, .citizen) .digit-msb-sidebar .digit-msb-divider {
  height: 1px;
  margin: 8px 16px;
  border: 0 !important;
  background: rgba(255, 255, 255, 0.14);
}
/* Logout as a plain row, then the eGov lockup at the very bottom behind a
 * faint line, as at the foot of the desktop rail. */
:is(.employee, .citizen) .digit-msb-sidebar .digit-msb-sidebar-bottom {
  order: 3;
  margin: auto 0 0 !important;
  padding: 0 12px !important;
}
:is(.employee, .citizen) .digit-msb-sidebar .digit-drawer-foot {
  order: 4;
  display: flex;
  align-items: center;
  margin-top: 8px;
  padding: 14px 28px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
}
:is(.employee, .citizen) .digit-msb-sidebar .digit-drawer-foot .digit-sidebar-egov {
  height: 20px;
}
:is(.employee, .citizen) .digit-msb-sidebar .digit-msb-sidebar-bottom .digit-button-secondary {
  width: 100% !important;
  height: 46px !important;
  justify-content: flex-start !important;
  gap: 16px !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: transparent !important;
}

/* ==========================================================================
 * Citizen "File a Complaint" (#2038 design). Desktop: a card with the
 * numbered stepper, grouped panels and a footer of hint + Back / Next. Phone
 * (up to 48rem): a "Step 1 of 3" strip with bars, flat panels on grey, and
 * the footer pinned to the bottom with an icon-only Back. The submitted page
 * (.cms-receipt) and a complaint's page (.cms-details) share the tokens.
 * ========================================================================== */
.cms-file,
.cms-receipt,
.cms-details,
.cms-complaints {
  /* The theme's own button tokens, as the shared Button reads them, so the
   * accents here follow each tenant the way its buttons do. */
  --cms-accent: var(--color-button-secondary-text, var(--color-primary-2, #2563EB));
  --cms-fill: var(--color-button-primary-bg-default, var(--color-primary-2, #2563EB));
  --cms-on-fill: var(--color-button-primary-text, #FFFFFF);
  --cms-accent-soft: #F3F6FC;
  --cms-accent-line: #C7D2E4;
  --cms-ink: #111827;
  --cms-ink-2: #374151;
  --cms-muted: #6B7280;
  --cms-line: #E5E7EB;
  --cms-panel: #F9FAFB;
  --cms-panel-line: #E9ECF2;
  --cms-danger: #DC2626;
  --cms-warn: #B45309;
  --cms-ok: #137A3E;
  color: var(--cms-ink);
}
/* The page's own inset, as My Complaints and All Services have theirs:
 * nothing else sits between the bar or the rail and these pages. */
.cms-file,
.cms-receipt,
.cms-details {
  padding: 24px 24px 32px;
}
.cms-file-title {
  margin-bottom: 18px;
}
/* The app's global button hover (a lifted shadow and a half-pixel press) is
 * for real buttons; the stepper, links and pickers here are not those. */
:is(.cms-step-mark, .cms-link-button, .cms-sheet-option):is(:hover, :active) {
  box-shadow: none !important;
  transform: none !important;
}
.cms-file .cms-mic-button:is(:hover, :active) {
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.22) !important;
  transform: none !important;
}
.cms-file-card {
  background: #FFFFFF;
  border: 1px solid var(--cms-line);
  border-radius: 14px;
}

/* Desktop stepper */
.cms-stepper {
  display: flex;
  justify-content: center;
  padding: 22px 28px;
  border-bottom: 1px solid #EEF1F6;
}
.cms-stepper ol {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 640px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cms-step {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: max-content;
}
.cms-step:last-child {
  flex: 0 0 auto;
}
.cms-step-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.cms-step-mark:disabled {
  cursor: default;
}
.cms-step-dot {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #D1D5DB;
  background: #FFFFFF;
  color: #9CA3AF;
  font-size: 12.5px;
  font-weight: 700;
}
.cms-step-label {
  font-size: 13px;
  font-weight: 500;
  color: #9CA3AF;
  white-space: nowrap;
}
.cms-step.current .cms-step-dot {
  border-color: var(--cms-accent);
  color: var(--cms-accent);
}
.cms-step.done .cms-step-dot {
  border-color: var(--cms-fill);
  background: var(--cms-fill);
  color: var(--cms-on-fill);
}
.cms-step.current .cms-step-label,
.cms-step.done .cms-step-label {
  color: var(--cms-ink);
}
.cms-step.current .cms-step-label {
  font-weight: 700;
}
.cms-step-line {
  flex: 1;
  min-width: 40px;
  height: 3px;
  margin: 0 14px 26px;
  border-radius: 2px;
  background: #D8DCE2;
}
.cms-step-line.done {
  background: var(--cms-fill);
}

/* Phone strip: hidden on desktop */
.cms-strip {
  display: none;
}

.cms-file-body {
  padding: 24px 28px;
}
.cms-step-pane.is-hidden {
  display: none;
}
.cms-step-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.cms-section {
  padding: 20px;
  background: var(--cms-panel);
  border: 1px solid var(--cms-panel-line);
  border-radius: 12px;
}
.cms-section-head {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cms-ink-2);
}
.cms-section-hint {
  margin: -8px 0 16px;
  max-width: 620px;
  font-size: 13px;
  line-height: 1.5;
  color: #4B5563;
}
.cms-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--cms-ink);
}
.cms-required {
  color: var(--cms-danger);
}

.cms-file .cms-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.cms-file .cms-section-address .cms-field-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
/* The cascade carries an inline flex column; here its levels join the grid. */
.cms-file .cms-field-grid > .pgr-boundary-cascade,
.cms-file .cms-field-grid > .cms-hierarchy {
  display: contents !important;
}
.cms-file .cms-section-address .cms-field-grid > :last-child {
  grid-column: 1 / -1;
}

/* Description */
.cms-textarea-wrap {
  position: relative;
}
.cms-textarea-wrap .cms-textarea {
  min-height: 150px;
  /* A bare textarea takes the browser's monospace; this one is prose. */
  font-family: inherit;
  line-height: 1.55;
}
.cms-textarea-wrap.with-mic .cms-textarea {
  padding-right: 76px;
}
.cms-mic-button {
  position: absolute;
  right: 14px;
  bottom: 16px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--cms-fill);
  color: var(--cms-on-fill);
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.22);
  cursor: pointer;
}
.cms-mic-button:hover {
  background: var(--color-button-primary-bg-hover, var(--cms-fill));
}
.cms-counter {
  margin-top: 10px;
  text-align: right;
  font-size: 12.5px;
  color: var(--cms-muted);
}

/* Photos */
/* Rules on the shared Button's own utilities (display, padding, fill) need a
 * third class: Tailwind scopes those as `.v2-scope .x` and loads later. */
.cms-file .cms-photos .cms-photo-button {
  display: none;
}
.cms-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 34px 20px;
  text-align: center;
  background: #FFFFFF;
  border: 1.5px dashed var(--cms-accent-line);
  border-radius: 12px;
  cursor: pointer;
}
.cms-drop:hover,
.cms-drop.dragging {
  border-color: var(--cms-accent);
  background: var(--cms-accent-soft);
}
.cms-drop.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.cms-drop.disabled:hover {
  border-color: var(--cms-accent-line);
  background: #FFFFFF;
}
.cms-drop-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #E8EDF7;
  color: var(--cms-accent);
}
.cms-drop-label {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--cms-accent);
}
.cms-drop-hint {
  font-size: 12.5px;
  color: var(--cms-muted);
}
.cms-field-error {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--cms-danger);
}
.cms-photo-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.cms-photo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 14px;
  background: #FFFFFF;
  border: 1px solid var(--cms-line);
  border-radius: 10px;
}
.cms-photo-thumb {
  flex: none;
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 8px;
  background: #E8EDF7;
}
.cms-photo-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.cms-photo-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--cms-ink);
}
.cms-photo-status {
  font-size: 12px;
  color: var(--cms-muted);
}
.cms-photo-status.failed {
  color: var(--cms-danger);
}
.cms-link-button {
  flex: none;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--cms-accent);
  cursor: pointer;
}
.cms-retry {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Location: the map sits on the page, not in a panel */
.cms-section-map {
  padding: 0;
  background: transparent;
  border: 0;
}
.cms-section-map .cms-section-head {
  font-size: 14px;
  color: var(--cms-ink);
  margin-bottom: 13px;
}
.cms-map {
  /* Leaflet's panes and controls stack in here, not over the page. */
  isolation: isolate;
}
/* GeoLocations is shared, so it is shaped from here rather than edited: its
 * instruction line moves under the map as a small caption, and its frame
 * (inline styles, hence the attribute match) takes the design's corners. */
.cms-map > div {
  display: flex;
  flex-direction: column-reverse;
  margin-bottom: 0 !important;
}
.cms-map > div > .card-label {
  margin: 10px 0 0;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.5;
  color: #4B5563;
}
.cms-map div[style*="border-radius: 20px"] {
  border-color: var(--cms-line) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}
.cms-pin-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.cms-pin-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #F3F4F6;
  color: #9CA3AF;
}
.cms-pin-icon.pinned {
  background: #E8EDF7;
  color: var(--color-primary-1, #14306B);
}
.cms-pin-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cms-pin-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--cms-ink);
}
.cms-pin-meta {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--cms-muted);
}

/* Review */
.cms-review-heading {
  display: none;
}
.cms-review-body {
  gap: 16px;
}
.cms-review-card {
  padding: 18px 20px;
  background: var(--cms-panel);
  border: 1px solid var(--cms-panel-line);
  border-radius: 12px;
}
.cms-review-head {
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cms-panel-line);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cms-ink);
}
.cms-review-rows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px 24px;
  margin: 0;
}
.cms-review-row {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.cms-review-row dt {
  font-size: 12.5px;
  color: var(--cms-muted);
}
.cms-review-row dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--cms-ink);
}
.cms-attachments {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cms-attachment {
  overflow: hidden;
  background: #FFFFFF;
  border: 1px solid var(--cms-line);
  border-radius: 12px;
}
.cms-attachment img {
  display: block;
  width: 100%;
  height: 104px;
  object-fit: cover;
  background: #EEF1F6;
}
.cms-attachment-name {
  display: block;
  overflow: hidden;
  padding: 10px 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 500;
}
.cms-file-error {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #FEF2F2;
  color: var(--cms-danger);
  font-size: 13.5px;
}

/* .body-container clips sideways overflow with overflow-x:hidden, which also
 * makes it a scroll container. It never scrolls itself (it grows with the
 * page and the window scrolls), so a sticky footer inside it would pin to a
 * box that doesn't move. clip clips the same without becoming a scroller. */
.body-container:has(.cms-file) {
  overflow-x: clip;
}

/* Footer: why Next is held, then Back / Next. Pinned to the bottom of the
 * screen at every width, so a long step (the map, the boundary levels, postal
 * code and landmark) never hides the way on behind a scroll. */
.cms-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 16px 28px 20px;
  background: #FFFFFF;
  border-top: 1px solid #EEF1F6;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 -8px 16px -12px rgba(17, 24, 39, 0.18);
}
.cms-hint {
  flex: 1;
  min-width: 220px;
  margin: 0;
  font-size: 12.5px;
  color: var(--cms-warn);
}
.cms-footer-actions {
  display: flex;
  flex: none;
  gap: 12px;
  margin-left: auto;
}

/* Sheets: a dialog on desktop, a card at the foot of a phone screen. Above
 * the top bar, which sits at z-index 9999999. */
.cms-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.5);
}
.cms-sheet {
  width: 100%;
  max-width: 440px;
  padding: 28px 24px 22px;
  background: #FFFFFF;
  border-radius: 16px;
  color: #111827;
  animation: cmsRise 200ms ease-out;
}
.cms-sheet-head {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #111827;
}
/* The sheet itself takes focus only while it has no action to give it to. */
.cms-sheet:focus {
  outline: none;
}
.cms-sheet-hint {
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #6B7280;
}
.cms-sheet-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}
.cms-sheet-actions > button {
  flex: 1;
}
.cms-sheet-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}
.cms-sheet-stack .cms-sheet-actions {
  gap: 10px;
  margin-top: 0;
}


/* Voice recorder */
.cms-voice {
  text-align: center;
}
.cms-voice-live {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cms-voice-pulse {
  position: relative;
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  margin: 22px auto 6px;
}
.cms-voice-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #DC2626;
  animation: cmsPulse 1.8s ease-out infinite;
}
.cms-voice-ring.late {
  animation-delay: 0.6s;
}
.cms-voice-dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #DC2626;
  color: #FFFFFF;
}
.cms-voice-live.ready .cms-voice-dot {
  background: #137A3E;
}
.cms-voice-live.error .cms-voice-dot {
  background: #9CA3AF;
}
.cms-voice-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 46px;
  margin-top: 8px;
}
.cms-voice-bars span {
  width: 4px;
  height: 100%;
  border-radius: 2px;
  background: #C7D2E4;
  transform-origin: center;
  transform: scaleY(0.3);
}
.cms-voice-live.recording .cms-voice-bars span {
  background: #DC2626;
  animation-name: cmsBar;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
.cms-voice-time {
  margin-top: 12px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: #111827;
}
.cms-voice-text,
.cms-voice-result {
  max-height: 150px;
  overflow-y: auto;
  margin: 16px 0 0;
  padding: 12px 14px;
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
  color: #111827;
  background: #F9FAFB;
  border: 1px solid #E9ECF2;
  border-radius: 10px;
}
.cms-voice-interim {
  color: #9CA3AF;
}

/* Photo source sheet (phone only; desktop uses the drop zone) */
.cms-photo-sheet {
  padding: 16px;
}
.cms-photo-sheet .cms-sheet-head {
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 600;
}
.cms-sheet-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cms-sheet-option {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 14px;
  background: #FFFFFF;
  border: 1px solid #C7D2E4;
  border-radius: 10px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--cms-accent);
  text-align: left;
  cursor: pointer;
}
.cms-sheet-option:hover {
  background: #F3F6FC;
  border-color: var(--cms-accent);
}
.cms-photo-sheet .cms-sheet-cancel {
  margin-top: 12px;
}

@keyframes cmsPulse {
  0% { transform: scale(1); opacity: 0.35; }
  100% { transform: scale(1.5); opacity: 0; }
}
@keyframes cmsBar {
  0%, 100% { transform: scaleY(0.25); }
  50% { transform: scaleY(1); }
}
@keyframes cmsRise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cms-sheet,
  .cms-voice-ring,
  .cms-voice-live.recording .cms-voice-bars span {
    animation: none !important;
  }
}

/* Phone */
@media (max-width: 48rem) {
  .cms-file,
  .cms-receipt {
    padding: 0;
  }
  .cms-file-title {
    display: none;
  }
  .cms-file-card {
    border: 0;
    border-radius: 0;
    background: #F9FAFB;
  }
  .cms-stepper {
    display: none;
  }
  .cms-strip {
    display: block;
    padding: 14px 16px;
    background: #FFFFFF;
    border-bottom: 1px solid var(--cms-line);
  }
  .cms-strip-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }
  .cms-strip-heading {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--cms-ink);
  }
  .cms-strip-next {
    white-space: nowrap;
    font-size: 12px;
    color: var(--cms-muted);
  }
  .cms-strip-bars {
    display: flex;
    gap: 6px;
    margin-top: 10px;
  }
  .cms-strip-bars span {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: var(--cms-line);
  }
  .cms-strip-bars span.on {
    background: var(--cms-fill);
  }
  .cms-file-body {
    padding: 16px;
  }
  .cms-step-body {
    gap: 20px;
  }
  .cms-section {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
  }
  .cms-label {
    font-size: 14.5px;
  }
  .cms-textarea-wrap .cms-textarea {
    min-height: 130px;
    resize: none;
  }
  .cms-textarea-wrap.with-mic .cms-textarea {
    padding-right: 68px;
  }
  .cms-mic-button {
    right: 12px;
    bottom: 12px;
    width: 46px;
    height: 46px;
  }
  .cms-counter {
    margin-top: 8px;
    font-size: 12px;
  }
  /* Photos ride under the description, as one button and a sheet. */
  .cms-section-photos {
    margin-top: -8px;
  }
  .cms-section-photos .cms-section-head,
  .cms-drop {
    display: none;
  }
  .cms-file .cms-photos .cms-photo-button {
    display: inline-flex;
    background: #FFFFFF;
  }
  .cms-photo-row {
    gap: 10px;
    padding: 10px 12px;
  }
  .cms-section-category .cms-section-head {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--cms-line);
  }
  .cms-file .cms-field-grid,
  .cms-file .cms-section-address .cms-field-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  /* Location: the map runs edge to edge, the fields ride up over it in a
   * sheet headed by what is pinned. */
  .cms-file-body.is-location {
    padding: 0;
  }
  .cms-location-body {
    gap: 0;
  }
  .cms-section-map .cms-section-head,
  .cms-section-map .cms-section-hint {
    display: none;
  }
  .cms-map div[style*="border-radius: 20px"] {
    border: 0 !important;
    border-radius: 0 !important;
  }
  .cms-map > div > .card-label {
    display: none;
  }
  .cms-pin-summary {
    position: relative;
    z-index: 1;
    margin-top: -18px;
    padding: 24px 16px 12px;
    background: #FFFFFF;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -10px 30px rgba(17, 24, 39, 0.16);
  }
  .cms-pin-summary::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 50%;
    width: 38px;
    height: 4px;
    margin-left: -19px;
    border-radius: 999px;
    background: #D1D5DB;
  }
  .cms-pin-title {
    font-size: 15px;
  }
  .cms-pin-meta {
    font-size: 12px;
  }
  .cms-section-address {
    position: relative;
    z-index: 1;
    padding: 0 16px 16px;
    background: #FFFFFF;
  }

  /* Review */
  .cms-review-heading {
    display: block;
    margin: 0 0 -4px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--cms-ink);
  }
  .cms-review-body {
    gap: 12px;
  }
  .cms-review-card {
    padding: 14px;
    background: #FFFFFF;
    border-color: var(--cms-line);
  }
  .cms-review-head {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom-color: #F1F3F7;
  }
  .cms-review-rows {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .cms-review-row {
    grid-template-columns: 104px minmax(0, 1fr);
  }
  .cms-attachments {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .cms-attachment img {
    height: 82px;
  }

  /* Full width on a phone, clear of the home indicator */
  .cms-footer {
    display: block;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: #FFFFFF;
    border-top: 1px solid var(--cms-line);
    border-radius: 0;
  }
  .cms-hint {
    margin-bottom: 10px;
    font-size: 12px;
  }
  .cms-footer-actions {
    gap: 12px;
    margin-left: 0;
  }
  .cms-file .cms-footer .cms-back {
    flex: none;
    width: 48px;
    padding: 0;
  }
  .cms-back-label {
    display: none;
  }
  .cms-footer .cms-next {
    flex: 1;
  }

  /* Back / Next sit on "Powered by DIGIT" at the foot of the screen on every
   * step. A short step (Complaint Details) left the bar under its last field
   * with a grey band below it; a long one pinned the bar to the very bottom,
   * over the page footer, which then showed only at the end of the page.
   * The card now fills the page so the bar starts at its foot, and the page
   * footer sticks too, with the bar stacked on top of it. */
  .citizen .pgr-citizen-wrapper:has(> .cms-file) {
    display: flex;
    flex-direction: column;
  }
  .pgr-citizen-wrapper > .cms-file,
  .cms-file > .cms-file-card {
    flex: 1 0 auto;
  }
  .cms-file > .cms-file-card {
    display: flex;
    flex-direction: column;
  }
  .cms-file-card > .cms-footer {
    margin-top: auto;
    bottom: calc(var(--v2-page-footer-height, 40px) + env(safe-area-inset-bottom, 0px));
    padding-bottom: 12px;
  }
  /* !important beats the phone rule that un-fixes this footer everywhere
   * (`position: static !important`); sticky never covers content, since the
   * footer still takes its own place at the end of the page. The page column
   * beside it is a flex item at z-index 100, so the card painted over the
   * pinned footer until it was raised above that. */
  .citizen:has(.cms-file) > .citizen-home-footer {
    position: sticky !important;
    bottom: 0;
    z-index: 101;
    box-sizing: border-box;
    height: calc(var(--v2-page-footer-height, 40px) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }

  .cms-sheet-overlay {
    place-items: end stretch;
    padding: 16px;
  }
  .cms-sheet {
    max-width: none;
    padding: 22px 18px 18px;
    animation-duration: 220ms;
  }
  .cms-sheet-head {
    font-size: 16px;
  }
  .cms-sheet-hint {
    font-size: 12.5px;
  }
  .cms-voice-pulse {
    width: 96px;
    height: 96px;
    margin: 18px auto 4px;
  }
  .cms-voice-dot {
    width: 66px;
    height: 66px;
  }
  .cms-voice-bars {
    height: 40px;
    margin-top: 6px;
  }
  .cms-voice-time {
    margin-top: 10px;
    font-size: 20px;
  }
  .cms-sheet-actions,
  .cms-sheet-stack {
    margin-top: 18px;
  }
  .cms-photo-sheet {
    padding: 16px;
  }
}

/* Complaint submitted */
.cms-receipt {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
}
.cms-receipt-strip {
  display: none;
}
.cms-receipt-card {
  padding: 44px 40px;
  background: #FFFFFF;
  border: 1px solid var(--cms-line);
  border-radius: 14px;
}
.cms-receipt-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #E7F4EC;
  color: var(--cms-ok);
}
.cms-receipt-icon.failed {
  background: #FEF2F2;
  color: var(--cms-danger);
}
.cms-receipt-head {
  margin: 0;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cms-ink);
}
.cms-receipt-text {
  max-width: 460px;
  margin: 10px auto 0;
  text-align: center;
  font-size: 14.5px;
  line-height: 1.6;
  color: #4B5563;
}
.cms-receipt-number {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding: 16px 18px;
  background: var(--cms-panel);
  border: 1px solid var(--cms-line);
  border-radius: 12px;
}
.cms-receipt-number-label {
  font-size: 12px;
  color: var(--cms-muted);
}
.cms-receipt-number-value {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--cms-ink);
}
.cms-receipt-number .cms-link-button {
  font-size: 13.5px;
}
.cms-receipt-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0 0;
  padding: 18px 20px;
  border: 1px solid var(--cms-line);
  border-radius: 12px;
}
.cms-receipt-rows .cms-review-row {
  grid-template-columns: 110px minmax(0, 1fr);
}
.cms-receipt-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}


/* A complaint */
.cms-details {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}
.cms-breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: #4B5563;
}
.cms-breadcrumb a {
  font-weight: 500;
  color: var(--cms-accent);
  text-decoration: none;
}
.cms-breadcrumb a:hover {
  text-decoration: underline;
}
.cms-breadcrumb > span[aria-hidden] {
  margin: 0;
  color: #9CA3AF;
}
.cms-breadcrumb [aria-current="page"] {
  font-weight: 400;
  color: #4B5563;
}
.cms-details-head {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e));
}
.cms-details-card {
  padding: 26px 28px;
  background: #FFFFFF;
  border: 1px solid var(--cms-line);
  border-radius: 14px;
}
.cms-details-card-head {
  margin: 0 0 20px;
  font-size: 17px;
  font-weight: 700;
  color: var(--cms-ink);
}
.cms-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px 32px;
  margin: 0;
}
.cms-details-item.wide {
  grid-column: 1 / -1;
}
.cms-details-item dt {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #8A93A2;
}
.cms-details-item dd {
  margin: 7px 0 0;
  overflow-wrap: anywhere;
  white-space: pre-line;
  font-size: 16px;
  color: var(--cms-ink);
}
/* "Download Application" (outline) and "File another complaint" (solid) are
   different button components; inline they sat on the text baseline with no
   gap, so the pair looked misaligned. Same row treatment as the receipt. */
.cms-details-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 14px;
}


@media (max-width: 48rem) {
  .cms-receipt-strip {
    display: block;
    padding: 14px 16px;
    background: #FFFFFF;
    border-bottom: 1px solid var(--cms-line);
    font-size: 14.5px;
    font-weight: 600;
  }
  .cms-receipt-card {
    padding: 24px 16px 0;
    background: #F9FAFB;
    border: 0;
    border-radius: 0;
  }
  .cms-receipt-icon {
    margin-bottom: 16px;
  }
  .cms-receipt-head {
    font-size: 20px;
    letter-spacing: 0;
  }
  .cms-receipt-text {
    margin-top: 6px;
    font-size: 13.5px;
    line-height: 1.5;
  }
  .cms-receipt-number {
    gap: 12px;
    margin-top: 18px;
    padding: 14px;
    background: #FFFFFF;
  }
  .cms-receipt-number-label {
    font-size: 11.5px;
  }
  .cms-receipt-number-value {
    font-size: 16px;
  }
  .cms-receipt-rows {
    gap: 10px;
    margin-top: 12px;
    padding: 14px;
    background: #FFFFFF;
  }
  .cms-receipt-rows .cms-review-row {
    grid-template-columns: 104px minmax(0, 1fr);
  }
  .cms-receipt-actions {
    position: sticky;
    bottom: 0;
    flex-direction: column;
    gap: 8px;
    margin: 24px -16px 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: #FFFFFF;
    border-top: 1px solid var(--cms-line);
  }
  .cms-receipt-actions > button {
    width: 100%;
  }
  .cms-details {
    gap: 14px;
    padding: 16px 16px 24px;
  }
  .cms-details-card {
    padding: 18px 16px;
  }
  .cms-details-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .cms-details-item dd {
    margin-top: 5px;
    font-size: 15px;
  }
  .cms-details-actions > button {
    width: 100%;
  }
}

/* ==========================================================================
 * Citizen My Complaints as an inbox (#2223)
 *
 * The employee inbox's shape for a citizen's own complaints: a table on a
 * desktop (Complaint No., Concern, Status, Filed on), a list on a phone, both
 * in the theme's table and status colours, with a search above and a pager
 * below. Each row opens the complaint.
 * ========================================================================== */
.cms-complaints-head {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 1rem 1.5rem 0.5rem;
}
.cms-complaints-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
}
.cms-complaints-title h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-primary-1, var(--color-primary-main, #c84c0e));
}
.cms-complaints-count {
  font-size: 14px;
  font-weight: 500;
  color: var(--cms-muted);
}
.cms-complaints-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0.5rem 1.5rem 1.5rem;
}
.cms-complaints-search {
  position: relative;
  max-width: 420px;
  margin-bottom: 16px;
}
/* Room for the icon. A global rule pads every search input 12px with
 * !important and three :not()s of weight, so this matches it and comes later. */
.cms-complaints .cms-complaints-search input.cms-complaints-search-field[type="search"] {
  padding-left: 36px !important;
}
.cms-complaints-search-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--cms-muted);
  pointer-events: none;
}
.cms-complaints-card {
  background: #FFFFFF;
  border: 1px solid var(--color-table-border, var(--cms-line));
  border-radius: 12px;
  overflow: hidden;
  /* The table or the list follows the card's own width, not the viewport's:
   * the rail takes width from it independently. */
  container: cms-complaints / inline-size;
}

/* Desktop: the table. Fixed layout, so a long description is cut rather than
 * widening the Concern column past the card. */
.cms-complaints-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.cms-complaints-col-number { width: 236px; }
.cms-complaints-col-status { width: 210px; }
.cms-complaints-col-date { width: 120px; }
.cms-complaints-col-go { width: 44px; }
.cms-complaints-table th {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-table-border, var(--cms-line));
  background: var(--color-table-header-bg, #F3F4F6);
  color: var(--color-table-header-text, var(--cms-ink-2));
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.cms-complaints-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-table-border, var(--cms-line));
  color: var(--color-table-row-text, var(--cms-ink));
  font-size: 14px;
  vertical-align: middle;
}
.cms-complaints-table tbody tr {
  cursor: pointer;
}
.cms-complaints-table tbody tr:hover td {
  background: var(--color-table-hover, #F9FAFB);
}
.cms-complaints-number {
  color: var(--cms-accent);
  font-weight: 500;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 3px;
}
.cms-complaints-number:focus-visible {
  outline: 2px solid var(--cms-accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.cms-complaints-concern {
  display: block;
  font-weight: 600;
  color: var(--cms-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cms-complaints-desc {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  color: var(--cms-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cms-complaints-date {
  color: var(--cms-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cms-complaints-go {
  color: #9CA3AF;
  text-align: right;
}
.cms-complaints-go svg,
svg.cms-complaints-go {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

/* Status, in the theme's status colours, toned by where the complaint is. */
.cms-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cms-status-pill::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.cms-status-pill.is-open {
  background: var(--color-status-warning-bg, #FFF4D7);
  color: var(--color-status-warning-text, #7A4E00);
}
.cms-status-pill.is-closed {
  background: var(--color-status-success-bg, #EAF6ED);
  color: var(--color-status-success-text, #2E7D32);
}
.cms-status-pill.is-rejected {
  background: var(--color-status-error-bg, #FDECEC);
  color: var(--color-status-error-text, #C62828);
}

/* A narrow card (a phone, a tablet beside the rail): the list. The table's
 * fixed columns need about 610px, so below 48rem Concern would be a sliver;
 * each complaint becomes one row with status and date, then its concern, two
 * lines of description and its number. */
.cms-complaints-list {
  display: none;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cms-complaints-list li + li {
  border-top: 1px solid var(--color-table-border, var(--cms-line));
}
.cms-complaints-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  color: inherit;
  text-decoration: none;
}
.cms-complaints-item:active {
  background: var(--color-table-hover, #F9FAFB);
}
.cms-complaints-item:focus-visible {
  outline: 2px solid var(--cms-accent);
  outline-offset: -2px;
}
.cms-complaints-item-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.cms-complaints-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.cms-complaints-item .cms-complaints-concern {
  font-size: 15px;
  line-height: 1.3;
  white-space: normal;
}
.cms-complaints-item .cms-complaints-desc {
  margin-top: 0;
  line-height: 1.4;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cms-complaints-item .cms-complaints-number {
  font-size: 12.5px;
  text-decoration: none;
}
.cms-complaints-item .cms-complaints-date {
  font-size: 12.5px;
}

.cms-complaints-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--color-table-border, var(--cms-line));
  font-size: 13px;
  color: var(--cms-muted);
}
.cms-complaints-table + .cms-complaints-list + .cms-complaints-pager {
  /* The last table row draws its own rule above the pager. */
  border-top: 0;
}
.cms-complaints-pager-buttons {
  display: inline-flex;
  gap: 6px;
}
.cms-complaints-pager button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--color-table-border, var(--cms-line));
  border-radius: 6px;
  background: #FFFFFF;
  color: var(--cms-ink-2);
  cursor: pointer;
}
.cms-complaints-pager button:disabled {
  color: #C5C5C5;
  cursor: default;
}
.cms-complaints-pager button svg {
  width: 16px;
  height: 16px;
}

@container cms-complaints (max-width: 47.99rem) {
  .cms-complaints-table {
    display: none;
  }
  .cms-complaints-list {
    display: block;
  }
  /* The list ends without a rule, so the pager draws its own. */
  .cms-complaints-table + .cms-complaints-list + .cms-complaints-pager {
    border-top: 1px solid var(--color-table-border, var(--cms-line));
  }
}
@media (max-width: 47.99rem) {
  .cms-complaints-head {
    padding: 1rem 1rem 0.5rem;
  }
  .cms-complaints-body {
    padding: 0.5rem 1rem 1.5rem;
  }
  .cms-complaints-search {
    max-width: none;
  }
}
