/* portal/public_html/assets/css/portal.css
   Portal overrides on top of Tabler 1.x (loaded first in app_core/ui/page.php).
   Mobile-first per docs/claude/06-mobile-first.md.

   All legacy custom UI classes (auth-card, hr-table, admin-card, etc.) were
   removed 2026-05-18 when the portal was converted to Tabler. If you need
   custom styling, do it as overrides on Tabler classes here. */

/* ---- HHA brand colour + design tokens --------------------------------- */
/* Tabler exposes its theme via CSS variables — override the primary
   palette so buttons, links, focus rings, and brand accents all use the
   HHA dark blue without us having to touch component HTML.
   The --hha-* / --slate-* / --space-* tokens beneath them are this portal's
   own semantic vocabulary, used by the post-2026-05-18 patterns below
   (.stat-row, .caught-up, .attention-grid, .mini-card). Single source of
   truth — never hard-code a hex that lives here. */
:root {
    --tblr-primary:      #0a4f8a;
    --tblr-primary-rgb:  10, 79, 138;
    --tblr-primary-fg:   #ffffff;
    --tblr-link-color:   #0a4f8a;
    --tblr-link-color-rgb: 10, 79, 138;

    /* Brand */
    --hha-navy:           #0a4f8a;
    --hha-navy-hover:     #073966;
    --hha-navy-tint:      #eff6ff;

    /* Neutrals (slate scale — Stripe / Linear / Vercel use a near-identical ramp) */
    --slate-50:           #f7f8fa;
    --slate-100:          #f1f5f9;
    --slate-150:          #ebedf2;
    --slate-200:          #e6e8ee;
    --slate-300:          #cbd5e1;
    --slate-400:          #94a3b8;
    --slate-500:          #64748b;
    --slate-600:          #475569;
    --slate-700:          #334155;
    --slate-900:          #0f172a;

    /* Semantic — saturated step for icons / borders, -bg / -border for tinted surfaces */
    --hha-success:        #047857;
    --hha-success-bg:     #ecfdf5;
    --hha-success-border: #a7f3d0;
    --hha-warning:        #b45309;
    --hha-warning-bg:     #fff7ed;
    --hha-warning-border: #fde68a;
    --hha-danger:         #b91c1c;
    --hha-danger-bg:      #fef2f2;
    --hha-danger-border:  #fecaca;
    --hha-info:           #1d4ed8;
    --hha-info-bg:        #eff6ff;

    /* Foregrounds / surfaces (semantic aliases) */
    --fg-body:            var(--slate-900);
    --fg-muted:           var(--slate-500);
    --fg-label:           var(--slate-700);
    --bg-surface:         #ffffff;

    /* Type */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco,
                 Consolas, "Liberation Mono", "Courier New", monospace;
    --fs-xs:    0.72rem;
    --fs-sm:    0.8rem;
    --fs-base:  0.875rem;
    --fs-md:    1rem;
    --fs-lg:    1.125rem;
    --fs-xl:    1.25rem;
    --fs-2xl:   1.5rem;
    --fs-4xl:   2.25rem;

    /* Spacing (4px base, matches Bootstrap 5 scale so utility classes align) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;

    /* Radii */
    --radius-sm:    5px;
    --radius:       7px;
    --radius-md:    8px;
    --radius-lg:   10px;

    /* Motion — investor-grade restraint: short ease-out only */
    --ease:         cubic-bezier(0.22, 1, 0.36, 1);
    --t-fast:       120ms;
    --t-base:       180ms;
}

/* Bootstrap 5 uses CSS variables for buttons too — re-point .btn-primary
   so hover/active states inherit the brand colour. */
.btn-primary {
    --tblr-btn-bg:               #0a4f8a;
    --tblr-btn-border-color:     #0a4f8a;
    --tblr-btn-hover-bg:         #073966;
    --tblr-btn-hover-border-color: #073966;
    --tblr-btn-active-bg:        #073966;
}

.text-primary { color: #0a4f8a !important; }
.bg-primary   { background-color: #0a4f8a !important; }

/* User avatar in the navbar dropdown — Tabler picks a hash-based colour;
   force HHA brand so it matches the rest of the chrome. */
.navbar .avatar { background: #0a4f8a !important; color: #fff !important; }

/* Sub-nav active-tab styling — pill / chip pattern.
   Two stacked navbars in this layout: the TOP header (logo + user menu) uses
   <header class="navbar navbar-expand-md">; the SUB-nav uses
   <header class="navbar-expand-md"> WITHOUT the .navbar class. Every rule
   below is scoped to header:not(.navbar) so the top header is untouched.
   Modern commercial portals (Vercel, Linear, Slack, Notion) use a subtle
   tinted-background pill for the active item rather than an underline —
   cleaner geometry (no fighting with the underlying divider line), more
   app-like. The sub-nav itself gets a single 1px box-shadow divider for
   separation from the page body. */
header.navbar-expand-md:not(.navbar) {
    background: #fff;
    box-shadow: inset 0 -1px 0 0 var(--tblr-border-color);
}
header.navbar-expand-md:not(.navbar) .navbar {
    border-bottom: 0;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    background: transparent;
}
header.navbar-expand-md:not(.navbar) .navbar-nav {
    gap: 2px;
}
header.navbar-expand-md:not(.navbar) .nav-link {
    padding: 0.45rem 0.8rem;
    color: var(--tblr-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    transition: color 0.12s ease, background-color 0.12s ease;
}
header.navbar-expand-md:not(.navbar) .nav-link:hover {
    color: #0f172a;
    background-color: rgba(15, 23, 42, 0.04);
}
header.navbar-expand-md:not(.navbar) .nav-item.active > .nav-link,
header.navbar-expand-md:not(.navbar) .nav-item.active > .nav-link:hover {
    color: var(--tblr-primary);
    background-color: rgba(10, 79, 138, 0.08);
    font-weight: 600;
}
header.navbar-expand-md:not(.navbar) .nav-item.active > .nav-link .nav-link-icon {
    color: var(--tblr-primary);
}

/* =======================================================================
   Polish pass — moves Tabler closer to a Linear / Vercel / Notion aesthetic
   without replacing the framework. Mostly: less shadow, tighter spacing,
   quieter colours, subtler dividers, sharper typography.
   ======================================================================= */

:root {
    /* Slightly cooler page bg (Tabler default is #f6f8fb-ish). */
    --tblr-body-bg:           #f7f8fa;
    --tblr-body-color:        #0f172a;
    --tblr-secondary:         #64748b;
    --tblr-border-color:      #e6e8ee;
    --tblr-border-color-translucent: rgba(15, 23, 42, 0.06);
    --tblr-card-border-color: #ebedf2;
    /* Tighter rounding — Tabler defaults are 6px; Linear uses 8 but on flat cards. */
    --tblr-border-radius:     8px;
    --tblr-border-radius-sm:  6px;
    --tblr-border-radius-lg:  10px;
}

/* Inter when the Google Fonts webfont loaded; system stack as fallback so
   the surface still renders cleanly if the CDN is unreachable. */
body {
    font-family: var(--font-sans);
    font-feature-settings: "ss01", "cv01", "cv11";
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.005em;
}

/* Quieter page header — Tabler's default is fairly chunky. */
.page-header { padding: 1.25rem 0 0.75rem; border-bottom: 0; }
.page-title  { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.page-pretitle {
    color: var(--tblr-secondary);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

/* Cards: flatter, lighter, more breathing room. */
.card {
    border: 1px solid var(--tblr-border-color);
    box-shadow: none;
    border-radius: var(--tblr-border-radius-lg);
}
.card-header {
    border-bottom: 1px solid var(--tblr-border-color);
    padding: 0.875rem 1.25rem;
    background: transparent;
    min-height: 0;
}
.card-title { font-size: 0.9rem; font-weight: 600; letter-spacing: -0.005em; margin: 0; }
.card-body  { padding: 1.25rem; }

/* Tables: tighter rows, lighter dividers, no zebra. */
.table { font-size: 0.875rem; }
.table > :not(caption) > * > * {
    padding: 0.6rem 0.875rem;
    border-bottom-color: var(--tblr-border-color);
}
.table thead th {
    background: transparent;
    color: var(--tblr-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--tblr-border-color);
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
}
.table tbody tr:hover { background: rgba(15, 23, 42, 0.015); }
.card-table > :first-child > :first-child > :first-child > * { border-top: 0; }
.card-table > :last-child  > :last-child  > :last-child  > * { border-bottom: 0; }

/* Buttons: slimmer, lower-key, less round. */
.btn {
    --tblr-btn-border-radius: 7px;
    --tblr-btn-padding-y:     0.45rem;
    --tblr-btn-padding-x:     0.875rem;
    --tblr-btn-font-size:     0.875rem;
    --tblr-btn-font-weight:   500;
    font-feature-settings: inherit;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.btn-sm {
    --tblr-btn-padding-y: 0.3rem;
    --tblr-btn-padding-x: 0.625rem;
    --tblr-btn-font-size: 0.8rem;
}
/* Outline button variants — soft-fill (Tabler -lt palette).
 * Default Bootstrap .btn-outline-* draws a 1px border on a transparent body.
 * Chrome rounds sub-pixel positions when small buttons (btn-sm icon-only)
 * land on a fractional x-coord inside a tight <td>, which silently drops
 * the right vertical edge — buttons read as "cut off". Giving the body a
 * tinted background means the button shape stays legible even if the
 * hairline border thins out a pixel. Hover/active darken progressively.
 * Active state uses the solid fill so a pressed button reads as "armed". */
.btn-outline-primary {
    --tblr-btn-color:               #0a4f8a;
    --tblr-btn-bg:                  #eff6ff;
    --tblr-btn-border-color:        #bfdbfe;
    --tblr-btn-hover-color:         #0a4f8a;
    --tblr-btn-hover-bg:            #dbeafe;
    --tblr-btn-hover-border-color:  #93c5fd;
    --tblr-btn-active-color:        #ffffff;
    --tblr-btn-active-bg:           #0a4f8a;
    --tblr-btn-active-border-color: #0a4f8a;
}
.btn-outline-danger {
    --tblr-btn-color:               #b91c1c;
    --tblr-btn-bg:                  #fef2f2;
    --tblr-btn-border-color:        #fecaca;
    --tblr-btn-hover-color:         #991b1b;
    --tblr-btn-hover-bg:            #fee2e2;
    --tblr-btn-hover-border-color:  #fca5a5;
    --tblr-btn-active-color:        #ffffff;
    --tblr-btn-active-bg:           #b91c1c;
    --tblr-btn-active-border-color: #b91c1c;
}
.btn-outline-secondary {
    --tblr-btn-color:               #475569;
    --tblr-btn-bg:                  #f8fafc;
    --tblr-btn-border-color:        #e2e8f0;
    --tblr-btn-hover-color:         #334155;
    --tblr-btn-hover-bg:            #f1f5f9;
    --tblr-btn-hover-border-color:  #cbd5e1;
}
.btn-outline-success {
    --tblr-btn-color:               #047857;
    --tblr-btn-bg:                  #ecfdf5;
    --tblr-btn-border-color:        #a7f3d0;
    --tblr-btn-hover-color:         #065f46;
    --tblr-btn-hover-bg:            #d1fae5;
    --tblr-btn-hover-border-color:  #6ee7b7;
}
.btn-outline-warning {
    --tblr-btn-color:               #b45309;
    --tblr-btn-bg:                  #fff7ed;
    --tblr-btn-border-color:        #fed7aa;
    --tblr-btn-hover-color:         #92400e;
    --tblr-btn-hover-bg:            #ffedd5;
    --tblr-btn-hover-border-color:  #fdba74;
}

/* Form controls — slimmer, monospaced focus. */
.form-control, .form-select {
    border-radius: 7px;
    border-color: var(--tblr-border-color);
    font-size: 0.875rem;
}
.form-control-sm, .form-select-sm {
    font-size: 0.8rem;
    border-radius: 6px;
}
.form-control:focus, .form-select:focus {
    border-color: var(--tblr-primary);
    box-shadow: 0 0 0 3px rgba(10, 79, 138, 0.12);
}
.form-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #334155;
    margin-bottom: 4px;
}
.form-hint { font-size: 0.78rem; color: var(--tblr-secondary); }

/* Badges — quieter palette, slightly more padded. */
.badge {
    font-weight: 600;
    font-size: 0.72rem;
    padding: 0.28em 0.55em;
    border-radius: 5px;
    letter-spacing: 0.01em;
}
.badge.bg-success-lt   { background: #ecfdf5 !important; color: #047857 !important; }
.badge.bg-warning-lt   { background: #fff7ed !important; color: #b45309 !important; }
.badge.bg-danger-lt    { background: #fef2f2 !important; color: #b91c1c !important; }
.badge.bg-secondary-lt { background: #f1f5f9 !important; color: #475569 !important; }
.badge.bg-blue-lt      { background: #eff6ff !important; color: #1d4ed8 !important; }
.badge.bg-purple-lt    { background: #faf5ff !important; color: #6d28d9 !important; }
.badge.bg-primary-lt   { background: #eff6ff !important; color: #0a4f8a !important; }

/* Alerts — flatter, less shouty. */
.alert {
    border-radius: 8px;
    border: 1px solid transparent;
    padding: 0.7rem 0.9rem;
    font-size: 0.875rem;
}
.alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert-danger  { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-info    { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* Navbar — quieter, denser. */
.navbar { padding: 0.625rem 0; border-bottom: 1px solid var(--tblr-border-color); background: #fff; }
.navbar-brand { font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
.navbar-expand-md .navbar-nav .nav-link {
    padding: 0.55rem 0.85rem;
    color: var(--tblr-secondary);
    font-size: 0.88rem;
    font-weight: 500;
}
.navbar-expand-md .navbar-nav .nav-link:hover { color: #0f172a; }
.dropdown-menu {
    border-radius: 8px;
    border: 1px solid var(--tblr-border-color);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    padding: 0.375rem;
    font-size: 0.875rem;
}
.dropdown-item    { border-radius: 5px; padding: 0.4rem 0.6rem; }
.dropdown-divider { border-color: var(--tblr-border-color); margin: 0.25rem 0; }

/* Pagination — slimmer. */
.page-link {
    border-radius: 6px !important;
    margin: 0 1px;
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
    border-color: var(--tblr-border-color);
    color: #475569;
}
.page-item.active > .page-link {
    background: var(--tblr-primary);
    border-color: var(--tblr-primary);
}

/* Avatar circles — styled below in the "Polish v2" block (darker palette
   + bolder small-size text + inset ring for contrast on the new ≥4.5:1
   slot set). Don't add another .avatar rule here. */

/* Steps (timeline on request.php). */
.steps-vertical .step-item { padding: 0.5rem 0 0.5rem 1.25rem; }

/* Code chips inside text — softer. */
code {
    background: #f1f5f9;
    color: #334155;
    border-radius: 4px;
    padding: 0.1rem 0.35rem;
    font-size: 0.85em;
}

/* Subtle row "is me" highlight. */
.table-active { background: rgba(10, 79, 138, 0.04); }

/* Tighten card spacing on the page body. */
.page-body { padding-top: 0.75rem; }

/* Empty-state polish. */
.empty {
    padding: 3.5rem 1rem;
    background: transparent;
}
.empty-title { font-weight: 600; letter-spacing: -0.01em; }
.empty-subtitle { color: var(--tblr-secondary); }

/* =========================================================================
   Polish v2 — patterns introduced by the design-system pass (2026-05-18).
   Every rule below either re-points a --tblr-* variable already wired up
   in Tabler, or styles a NEW pattern class (.stat-row / .stat / .caught-up /
   .attention-grid / .mini-card / .filter-row). No legacy custom namespaces
   (hr-*, admin-*, launcher-*) are reintroduced.
   ========================================================================= */

/* ---- Brand square — three sizes ---------------------------------------- */
/* The HH wordmark tile used in the top navbar (default), the design-system
   mock variant (sm), and the auth screen logo (lg). Single class, three
   size modifiers — pick the right one per surface, don't hand-style sizes. */
.brand-sq {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    background: var(--hha-navy); color: #fff;
    border-radius: var(--radius-md);
    font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em;
    flex-shrink: 0;
}
.brand-sq-sm { width: 28px; height: 28px; font-size: 11px; border-radius: 6px; }
.brand-sq-lg { width: 48px; height: 48px; font-size: 1.1rem; border-radius: var(--radius-md); }
.navbar { min-height: 56px; }

/* =======================================================================
   STAT CARDS — replaces the text-only `.badge` strip on Users page.
   4 cards in a row, clickable, each one filters the table to that status.
   ======================================================================= */

/* Auto-fit so a row of 4 cards (users.php) and a row of 6 (helpdesk/queue.php)
   both lay out cleanly without per-page modifiers. Mobile collapses to 2. */
.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-3);
}
@media (max-width: 768px) {
    .stat-row { grid-template-columns: repeat(2, 1fr); }
}

.stat {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-4);
    background: var(--bg-surface);
    border: 1px solid var(--slate-150);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--fg-body);
    transition: border-color var(--t-fast) var(--ease),
                background-color var(--t-fast) var(--ease);
}
.stat:hover {
    border-color: var(--slate-300);
    background: var(--bg-surface);
    color: var(--fg-body);
    text-decoration: none;
}
.stat-label {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--fg-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
}
.stat-row-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-2);
}
.stat-n {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.025em;
    color: var(--slate-900);
    font-feature-settings: "tnum";
}
.stat-n.stat-success { color: var(--hha-success); }
.stat-n.stat-warning { color: var(--hha-warning); }
.stat-n.stat-danger  { color: var(--hha-danger);  }

.spark { flex-shrink: 0; display: block; }

.stat-delta {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: var(--fs-xs);
    font-weight: 600;
    line-height: 1;
}
.stat-delta i { font-size: 13px; }
.stat-delta.up   { color: var(--hha-success); }
.stat-delta.down { color: var(--hha-danger);  }
.stat-delta.flat { color: var(--slate-400);   }

/* =======================================================================
   COLLAPSED "ALL CAUGHT UP" — replaces the giant centered empty state
   when count is 0. Keeps the page dense on a busy admin surface.
   The full `.empty` block above is still used for genuinely empty surfaces.
   ======================================================================= */

.caught-up {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: var(--hha-success-bg);
    border: 1px solid var(--hha-success-border);
    border-radius: var(--radius-md);
    font-size: var(--fs-base);
    color: var(--hha-success);
}
.caught-up i {
    font-size: 18px;
    color: var(--hha-success);
}
.caught-up strong {
    font-weight: 600;
    color: var(--hha-success);
}
.caught-up .text-secondary {
    color: #065f46 !important;  /* darker for legibility on light-success bg */
    opacity: 0.7;
}
.caught-up a {
    color: inherit;
    text-decoration: none;
    opacity: 0.7;
}
.caught-up a:hover { opacity: 1; text-decoration: underline; }

/* =======================================================================
   ATTENTION GRID — two side-by-side mini cards: "Needs attention" /
   "Recently joined". Sits between the inline caught-up row and the full
   table. Each row is one user with a contextual action.
   ======================================================================= */

.attention-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}
@media (max-width: 768px) {
    .attention-grid { grid-template-columns: 1fr; }
}

.mini-card { overflow: hidden; }
.mini-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) var(--space-4);
    border-bottom: 1px solid var(--slate-150);
}
.mini-title {
    font-size: var(--fs-base);
    font-weight: 600;
    color: var(--slate-900);
    display: inline-flex;
    align-items: center;
}
.mini-body { padding: var(--space-2) 0; }
.mini-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-4);
    transition: background-color var(--t-fast) var(--ease);
}
.mini-row:hover { background: rgba(15, 23, 42, 0.015); }
.mini-row .grow { flex: 1; min-width: 0; }
.mini-row .mini-name {
    font-size: var(--fs-base);
    font-weight: 500;
    color: var(--slate-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mini-row .mini-meta {
    font-size: var(--fs-xs);
    line-height: 1.35;
    margin-top: 1px;
}

/* =======================================================================
   FILTER ROW polish — sub-header above a table, not a content section.
   Use .filter-row in place of the old .bg-light utility on the row.
   ======================================================================= */

.filter-row {
    background: var(--slate-50) !important;
    border-bottom: 1px solid var(--slate-150);
}

/* =======================================================================
   AVATAR — darker palette + bolder small-size text for legibility.
   Pairs with the 8-slot palette in render_avatar() (app_core/ui/components.php);
   every slot is ≥4.5:1 contrast vs white. The inset shadow pushes initials
   forward — does NOT count as card elevation, it's text contrast.
   ======================================================================= */
.avatar {
    font-weight: 700;
    letter-spacing: 0.01em;
    font-feature-settings: "ss01";
    color: #fff;
    box-shadow:
        inset 0 0 0 1px rgba(15, 23, 42, 0.04),
        inset 0 -1px 0 rgba(15, 23, 42, 0.08);
    /* Tabler's .avatar omits flex-shrink, so in a `d-flex align-items-center`
       row with a long sibling (e.g. requester name + type badge in the queue)
       the avatar gets squeezed and renders at slightly different widths from
       row to row. Pin it to its declared size. */
    flex-shrink: 0;
}
.avatar-sm { font-size: 0.78rem; }

/* Page header — tighten further so the stat-row sits closer to it */
.page-header { padding-bottom: var(--space-2); }

/* Card header is a flex row; .card-actions hugs the right edge */
.card-header { display: flex; align-items: center; gap: var(--space-2); }
.card-actions { margin-left: auto; }

/* Code chip — enforce JetBrains Mono in paragraph + helper-text contexts.
   The general `code` rule above stays for table-cell / unscoped uses. */
p code, .text-secondary code {
    background: var(--slate-100);
    color: var(--slate-700);
    font-family: var(--font-mono);
    font-size: 0.85em;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

/* Inline link in description text — never the default Bootstrap blue */
p a { color: var(--hha-navy); text-decoration: none; }
p a:hover { text-decoration: underline; }

/* Pretitle dot — adds a visual anchor to the eyebrow */
.page-pretitle::before {
    content: "";
    display: inline-block;
    width: 5px; height: 5px;
    background: var(--hha-navy);
    border-radius: 50%;
    margin-right: 7px;
    vertical-align: middle;
    margin-top: -2px;
}

/* =========================================================================
   Utilities — small, named replacements for repeated inline styles. Added
   2026-05-18 during the portal-wide standardisation sweep so pages stop
   reaching for `style="…"` for layout. Each class is a pattern primitive
   (NOT a per-app namespace — those are still banned per 11-portal-ui.md).
   ========================================================================= */

/* Bootstrap 5 doesn't ship .d-contents; used by <form> nested inside <tr>
   so the form's children participate in the table row layout. */
.d-contents { display: contents !important; }

/* icon-tile — rounded-square icon container (launcher tiles, dashboard
   accents). Default 36px; -lg variant 44px. The icon inside picks up the
   tile's currentColor. */
.icon-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--hha-navy-tint);
    color: var(--hha-navy);
    flex-shrink: 0;
}
.icon-tile > i { font-size: 1.25rem; line-height: 1; }
.icon-tile-lg { width: 44px; height: 44px; }
.icon-tile-lg > i { font-size: 1.5rem; }

/* dot-pip — small solid circle indicator (unread row, "online", etc).
   Inherits currentColor so the caller controls hue via text-* utility.
   -sm modifier shrinks to 6px for use inside a row with limited height. */
.dot-pip {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: currentColor;
    border-radius: 50%;
    flex-shrink: 0;
}
.dot-pip-sm { width: 6px; height: 6px; }
/* -bell modifier: absolutely positions the dot on a relative parent
   (notification bell button). Keeps the navbar bell badge consistent
   with the page-level dot indicators. */
.dot-pip-bell {
    position: absolute;
    top: 6px;
    right: 4px;
}

/* help-cue — span that hosts a Bootstrap tooltip. Dashed underline +
   help cursor signal that hover reveals more info. Pair with
   data-bs-toggle="tooltip" data-bs-title="…" */
.help-cue {
    cursor: help;
    border-bottom: 1px dotted var(--tblr-border-color);
}

/* input-num — constrained-width numeric input. Three sizes so admin tables
   can keep numeric columns tight without each page hand-styling widths. */
.input-num    { width: 6rem !important; }
.input-num-sm { width: 4.5rem !important; }
.input-num-lg { width: 8rem !important; }

/* Navbar notification cluster — width-pegged dropdown panel + scroll area +
   the tiny count badge that sits on the bell icon. Keeps every navbar a
   single shape regardless of unread count. */
.notify-dropdown { width: 360px; max-width: calc(100vw - 24px); }
.notify-scroll   { max-height: 420px; overflow-y: auto; }
.bell-count-badge {
    position: absolute;
    top: 6px;
    right: -2px;
    font-size: 0.62rem;
    padding: 0.18em 0.4em;
    border-radius: 8px;
}

/* notify-row — feed-list row used in /notifications.php and the navbar bell
   dropdown. Same shape as .mini-row but full-width with an unread state. */
.notify-row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--slate-150);
    text-decoration: none;
    color: var(--fg-body);
    transition: background-color var(--t-fast) var(--ease);
}
.notify-row:hover { background: rgba(15, 23, 42, 0.015); color: var(--fg-body); text-decoration: none; }
.notify-row:last-child { border-bottom: 0; }
.notify-row.unread { background: var(--hha-navy-tint); }
.notify-row .notify-icon {
    color: var(--fg-muted);
    font-size: 1.15rem;
    line-height: 1;
    padding-top: 2px;
}
.notify-row .notify-body { flex: 1; min-width: 0; }

/* comment-bubble — threaded conversation card (helpdesk ticket comments).
   Three variants signal who wrote the comment:
     default          — external requester (white surface)
     --agent          — internal staff (slate-tinted)
     --internal       — internal-only agent note (warning-tinted) */
.comment-bubble {
    border: 1px solid var(--slate-150);
    border-left-width: 3px;
    border-left-color: var(--slate-300);
    border-radius: 6px;
    background: var(--bg-surface);
    padding: var(--space-3) var(--space-4);
}
.comment-bubble--agent {
    background: var(--slate-50);
    border-color: var(--slate-200);
    border-left-color: var(--slate-400);
}
.comment-bubble--internal {
    background: var(--hha-warning-bg);
    border-color: var(--hha-warning-border);
    border-left-color: var(--hha-warning);
}
