/* ============================================================
   Monitech Operations Dashboard — Global Styles
   Move this <link> into App.razor or MainLayout.razor:
   <link href="https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@300;400;500;600;700&family=Barlow:wght@300;400;500&display=swap" rel="stylesheet" />
   ============================================================ */

/* ── Dark theme (default) ── */
:root,
[data-theme="dark"] {
  --bg: #0d1117;
  --surface: #161b22;
  --surface2: #1c2330;
  --border: #21262d;
  --accent: #ffcc00;
  --accent2: #ffe566;
  --text: #e6edf3;
  --muted: #7d8590;
  --danger: #c0584a;
  --success: #3fb950;
  --sidebar-width: 220px;
}

/* ── Light theme ── */
[data-theme="light"] {
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface2: #eaeef2;
  --border: #d0d7de;
  --accent: #d49200;
  --accent2: #e6a800;
  --text: #1f2328;
  --muted: #656d76;
  --danger: #c0584a;
  --success: #1a7f37;
  --sidebar-width: 220px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background: url('/Main Background.jpg') center / cover no-repeat fixed;
  color: var(--text);
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
}

  /* ── Overlay over background image ── */
  /* z-index:-1 keeps this darkening layer above the fixed background image but BEHIND all app
     content, so .layout-main no longer needs a positive z-index to sit above it. That in turn lets
     page-level modals (which are position:fixed) escape to the root stacking context and paint above
     the sidebar/topbar instead of being trapped beneath them. */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(32, 32, 32, 0.65);
    pointer-events: none;
    z-index: -1;
  }

[data-theme="light"] body::before {
  background: rgba(255, 255, 255, 0.35);
}

/* ── Font scale (device-level UI size) ────────────────────────────────────────
   Scales the whole interface proportionally via `zoom`, keyed by data-font-scale
   on <html> (set from localStorage by app.js). 'small' is the current/default
   size and applies no scaling; 'medium' and 'large' step it up. Persisted on the
   device, not per user. */
html[data-font-scale="medium"] body {
  zoom: 1.12;
}

html[data-font-scale="large"] body {
  zoom: 1.25;
}

/* ── Keyframes ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ── Links ── */
a, .btn-link {
  color: var(--accent);
}

/* ── Blazor form validation ── */
h1:focus {
  outline: none;
}

.valid.modified:not([type=checkbox]) {
  outline: 1px solid var(--success);
}

.invalid {
  outline: 1px solid var(--danger);
}

.validation-message {
  color: var(--danger);
}

/* ── Blazor error boundary ── */
.blazor-error-boundary {
  background: rgba(192, 88, 74, 0.12);
  border-top: 1px solid rgba(192, 88, 74, 0.3);
  padding: 1rem 1rem 1rem 3.7rem;
  color: var(--danger);
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
}

  .blazor-error-boundary::after {
    content: "An error has occurred."
  }

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--muted);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ── Dashboard widget base ── */
/* Shared by all widget components. Widget-specific styles live in each widget's .razor.css */

.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.widget-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.widget-eyebrow {
  font-size: 9px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
}

.widget-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text);
}

.widget-sub {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-left: auto;
  align-self: flex-end;
}

.widget-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.widget-error {
  padding: 24px;
  font-size: 13px;
  color: var(--danger, #e55);
}

.widget-footer-link {
  display: block;
  padding: 12px 24px;
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  border-top: 1px solid var(--border);
  transition: opacity .15s;
  margin-top: auto;
}

  .widget-footer-link:hover {
    opacity: .7;
  }

.widget-stats {
  display: flex;
  align-items: stretch;
  padding: 24px;
  gap: 0;
}

.stat-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.stat-value {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 48px;
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
  letter-spacing: .02em;
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}

.stat-sub {
  font-size: 11px;
  color: var(--muted);
}

.stat-divider {
  width: 1px;
  background: var(--border);
  margin: 0 16px;
  align-self: stretch;
}

.widget-all-clear {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  gap: 8px;
}

.all-clear-icon {
  font-size: 32px;
  color: var(--success);
  line-height: 1;
}

.all-clear-text {
  font-size: 12px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--success);
}

/* ── Quill rich text editor — theme overrides ── */
.rte-host {
  border: 1px solid var(--muted);
  border-radius: 4px;
  overflow: hidden;
}

  .rte-host:focus-within {
    border-color: var(--accent);
  }

.ql-editor.rte-drag-over {
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}

/* Variant: use on pages where the host background is --surface so the editor recedes */
.rte-host.rte-sunken .ql-toolbar.ql-snow {
  background: var(--surface2) !important;
}

.rte-host.rte-sunken .ql-editor {
  background: var(--bg) !important;
}

/* Compact editor: starts short and grows with content (height stays auto), so a brief or empty entry
   doesn't render as a tall, mostly-empty box — used for the reports' immediate/preventative action fields. */
.rte-host.rte-compact .ql-editor {
  min-height: 44px;
}

/* A read-only rich editor can't be edited - show the default arrow cursor, not the text I-beam, so it
   doesn't look editable on hover. */
.rte-host.rte-readonly .ql-editor,
.rte-host.rte-readonly .ql-editor * {
  cursor: default;
}

.ql-toolbar.ql-snow {
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  background: var(--surface2);
  padding: 6px 8px;
  font-family: 'Barlow', sans-serif;
}

.ql-container.ql-snow {
  border: none !important;
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  height: auto;
}

.ql-editor {
  min-height: 160px;
  height: auto;
  color: var(--text);
  background: var(--surface);
}

  .ql-editor img {
    max-width: 100%;
    height: auto;
  }

/* Quill's own quill.snow.css loads after app.css and sets this placeholder to a hard-coded dark
   rgba(0,0,0,0.6) at equal specificity, so it wins by source order (dark text in dark theme).
   Prefix with .ql-container (always the editor's parent) to out-specify it and keep it theme-aware. */
.ql-container .ql-editor.ql-blank::before {
  color: var(--muted);
  font-style: normal;
}

.ql-snow .ql-stroke {
  stroke: var(--muted);
}

.ql-snow .ql-fill {
  fill: var(--muted);
}

.ql-snow .ql-picker {
  color: var(--muted);
}

.ql-snow.ql-toolbar button:hover .ql-stroke,
.ql-snow.ql-toolbar button.ql-active .ql-stroke {
  stroke: var(--accent);
}

/* ── Page layout utilities ── */

/* Body area within a page shell — fills remaining height, scrolls vertically.
   Padding matches the NCR page shell (.ncr-shell) so report headings line up. */
.page-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

  .page-body::-webkit-scrollbar {
    width: 4px;
  }

  .page-body::-webkit-scrollbar-track {
    background: transparent;
  }

  .page-body::-webkit-scrollbar-thumb {
    background: var(--border);
  }

/* Styled thin scrollbar — for any element that already handles its own overflow */
.thin-scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

  .thin-scroll::-webkit-scrollbar {
    width: 4px;
  }

  .thin-scroll::-webkit-scrollbar-track {
    background: transparent;
  }

  .thin-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
  }

/* ── Global button utilities ── */
.btn-back {
  padding: 8px 18px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: 'Barlow', sans-serif;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .15s, color .15s;
  white-space: nowrap;
}

  .btn-back:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

/* ── Table headers — dark sticky bar (global, applies to all table views) ── */
thead th {
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 1;
}

/* ── Sortable table headers ── */
th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

  th.sortable:hover {
    color: var(--accent);
  }

th.sort-active {
  color: var(--accent);
}

.sort-arrow {
  margin-left: 3px;
  font-size: 10px;
}

/* ── Shared button utilities ── */

/* Consistent corner radius for all buttons. Targets <button> elements plus any element
   carrying a btn-* class (e.g. <a class="btn-secondary">). Status badges/pills are NOT
   buttons and are intentionally excluded so they stay visually distinct. */
button, [class^="btn-"], [class*=" btn-"] {
  border-radius: 6px;
}

/* ── Reusable tab strip ───────────────────────────────────────────────────────
   A horizontal row of tabs with an accent underline on the active tab. Aligns to
   the standard 48px page gutter. Usage:
     <div class="tab-strip">
       <button class="tab-btn active">One</button>
       <button class="tab-btn">Two</button>
     </div>                                                                      */
.tab-strip {
  flex-shrink: 0;
  display: flex;
  gap: 4px;
  padding: 0 48px;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  padding: 12px 18px;
  border: none;
  background: none;
  color: var(--muted);
  font-family: 'Barlow', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}

  .tab-btn:hover {
    color: var(--text);
  }

  .tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
  }

.btn-primary {
  padding: 8px 18px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: 'Barlow', sans-serif;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

  .btn-primary:hover,
  .btn-primary.active {
    border-color: var(--accent);
    color: var(--accent);
  }

/* Standard "+ New X" create button — accent outline that fills on hover. Matches the
   "New Announcement" button so all create actions look the same across pages. */
.btn-new {
  padding: 7px 16px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: 'Barlow', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}

  .btn-new:hover:not(:disabled),
  .btn-new.active {
    background: var(--accent);
    color: var(--bg);
  }

  .btn-new:disabled {
    opacity: .5;
    cursor: default;
  }

  /* Light mode: the accent-outline (amber text on a light background) is too faint, so make every
     "+ New X" create button a solid amber fill with dark text — a clear call-to-action across pages. */
  [data-theme="light"] .btn-new {
    background: var(--accent);
    color: #1a1a1a;
  }

    [data-theme="light"] .btn-new:hover:not(:disabled),
    [data-theme="light"] .btn-new.active {
      background: var(--accent2);
      color: #1a1a1a;
    }

.btn-accent {
  padding: 8px 18px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  font-family: 'Barlow', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 6px;
  transition: filter .15s;
}

  .btn-accent:hover:not(:disabled) {
    filter: brightness(1.1);
  }

  .btn-accent:disabled {
    opacity: .5;
    cursor: default;
  }

/* Outlined accent (yellow border + text, transparent fill) */
.btn-accent-outline {
  padding: 8px 18px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  font-family: 'Barlow', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 6px;
  transition: background .15s, color .15s;
}

  .btn-accent-outline:hover:not(:disabled) {
    background: var(--accent);
    color: var(--bg);
  }

  .btn-accent-outline:disabled {
    opacity: .5;
    cursor: default;
  }

.btn-secondary {
  padding: 8px 18px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: 'Barlow', sans-serif;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .15s, color .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

  .btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

/* Comment "Edit" action — the single global format for every comment thread (tickets, reports,
   NCRs, documents, announcements). Right-aligned within the (flex) comment header. */
.btn-comment-action {
  margin-left: auto;
  padding: 2px 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: 'Barlow', sans-serif;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 6px;
  transition: border-color .15s, color .15s;
}

  .btn-comment-action:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger {
  padding: 8px 18px;
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
  font-family: 'Barlow', sans-serif;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s, color .15s;
}

  .btn-danger:hover:not(:disabled) {
    background: var(--danger);
    color: #fff;
  }

  .btn-danger:disabled {
    opacity: .5;
    cursor: default;
  }

.btn-upload {
  padding: 8px 18px;
  background: transparent;
  border: 1px solid var(--text);
  color: var(--text);
  font-family: 'Barlow', sans-serif;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}

  .btn-upload:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
  }

  .btn-upload:disabled {
    opacity: .5;
    cursor: default;
  }

.btn-sm {
  padding: 5px 12px;
  font-size: 10px;
}

.ql-snow.ql-toolbar button:hover .ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-fill {
  fill: var(--accent);
}

.ql-snow.ql-toolbar button:hover,
.ql-snow.ql-toolbar button.ql-active,
.ql-snow.ql-toolbar .ql-picker-label:hover {
  color: var(--accent);
}

.ql-snow .ql-picker-options {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text);
}

  .ql-snow .ql-picker-options .ql-picker-item:hover {
    color: var(--accent);
  }

/* ── Quill inline format classes — must work outside .ql-editor too ── */
.ql-size-small {
  font-size: 0.75em;
}

.ql-size-large {
  font-size: 1.5em;
}

.ql-size-huge {
  font-size: 2.5em;
}

.ql-font-serif {
  font-family: Georgia, serif;
}

.ql-font-monospace {
  font-family: 'Courier New', monospace;
}

/* ── @mention chips ─────────────────────────────────────────────── */
.mention {
  display: inline-block;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border-radius: 3px;
  padding: 0 4px;
  font-weight: 500;
  white-space: nowrap;
  cursor: default;
  user-select: text;
}

.mention-dropdown {
  position: fixed;
  z-index: 10000;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  min-width: 200px;
  max-width: 300px;
  overflow: hidden;
}

.mention-dropdown-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

  .mention-dropdown-item.active,
  .mention-dropdown-item:hover {
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--accent);
  }

.mention-dropdown-empty {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--muted);
}

/* ── Rich-text content rendering ── */

.rte-content {
  line-height: 1.65;
}

  .rte-content p {
    margin: 0 0 .6em;
  }

  .rte-content h1 {
    font-size: 1.35em;
    font-weight: 600;
    margin: .8em 0 .4em;
  }

  .rte-content h2 {
    font-size: 1.15em;
    font-weight: 600;
    margin: .8em 0 .4em;
  }

  .rte-content h3 {
    font-size: 1em;
    font-weight: 600;
    margin: .8em 0 .4em;
  }

  .rte-content ul,
  .rte-content ol {
    padding-left: 1.5em;
    margin: 0 0 .6em;
  }

  .rte-content li {
    margin-bottom: .25em;
  }

  .rte-content blockquote {
    border-left: 3px solid var(--accent);
    margin: .6em 0;
    padding: .3em 1em;
    color: var(--muted);
  }

  .rte-content pre {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: .75em 1em;
    font-size: 12px;
    overflow-x: auto;
    margin: .6em 0;
  }

  .rte-content code {
    background: var(--surface2);
    border-radius: 2px;
    padding: .1em .35em;
    font-size: 12px;
  }

  .rte-content a {
    color: var(--accent);
  }

  .rte-content img {
    max-width: 100%;
    height: auto;
  }

/* ── Global select styling for dark mode ──────────────────────────────────── */
select {
  color: var(--text) !important;
  background-color: var(--bg) !important;
}

  select option {
    background: var(--bg);
    color: var(--text);
  }

/* Consistent corner radius for all text inputs, textareas and selects — mirrors the
   buttons rule so every form control shares one subtle radius. Checkboxes/radios are
   excluded so toggles and checkboxes keep their own shape. */
input:not([type="checkbox"]):not([type="radio"]), textarea, select {
  border-radius: 6px;
}

/* ── Global date input styling ────────────────────────────────────────────── */
input[type="date"] {
  background-color: var(--bg) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  padding: 8px 10px !important;
  font-size: 13px !important;
  font-family: inherit !important;
  box-sizing: border-box !important;
  position: relative;
  cursor: pointer;
}

  input[type="date"]:focus {
    outline: none !important;
    border-color: var(--accent) !important;
  }

  input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    opacity: 0;
  }

/* ── Shared date field styling ────────────────────────────────────────────── */
.date-field-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

  .date-field-wrapper label {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    transition: color .15s;
  }

    .date-field-wrapper label:hover {
      color: var(--accent);
    }

  .date-field-wrapper input[type="date"] {
    cursor: pointer;
  }

    .date-field-wrapper input[type="date"]::-webkit-calendar-picker-indicator {
      cursor: pointer;
    }

/* ── Global error — kept for Login page inline use ───────────────────────────── */
.global-error {
  background: rgba(192, 88, 74, .1);
  border: 1px solid rgba(192, 88, 74, .3);
  color: var(--danger);
  padding: 10px 13px;
  font-size: 12px;
  letter-spacing: .04em;
  margin-bottom: 20px;
  border-radius: 4px;
}

/* ── Disabled input styling ───────────────────────────────────────────────────── */
input:disabled,
select:disabled,
textarea:disabled {
  color: var(--text-muted, #888);
  background: var(--surface-raised, rgba(255,255,255,0.04));
  border-color: var(--border);
  cursor: not-allowed;
}

/* ── Issue Reports pages (Product Fault / Process / Incident) ───────────────── */
.rep-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  position: relative;
  flex-wrap: wrap;
}

.rep-eyebrow {
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.rep-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0;
}

.rep-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.rep-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.rep-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rep-field--full {
  grid-column: 1 / -1;
}

.rep-field label {
  font-size: 12px;
  color: var(--muted);
}

.rep-field input, .rep-field select, .rep-field textarea {
  width: 100%;
  padding: 7px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
}

/* Highlight a required form field whose requirement isn't met yet (replaces the inline error text). */
.rep-field input.rep-invalid,
.rep-field select.rep-invalid,
.rep-field textarea.rep-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 25%, transparent);
  outline: none;
}

.rep-req {
  color: var(--danger);
}

.rep-check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

  .rep-check input {
    width: auto;
  }

.rep-files {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  font-size: 12px;
  color: var(--muted);
}

  .rep-files li {
    display: flex;
    align-items: center;
    gap: 6px;
  }

.rep-file-x {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
}

.rep-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}

.rep-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* Consistent rounded frame for every data-table wrapper (any class containing "-table-wrap",
   including the shared .data-table-wrap used to wrap otherwise-bare tables). */
[class*="-table-wrap"] {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  /* When the wrapper is a flex item (e.g. inside a display:flex column like the project register's
     .pr-body), min-width defaults to min-content, so the table grows past the container and gets
     clipped instead of scrolling. min-width:0 lets it shrink to the container and scroll horizontally —
     the behaviour block-flow wrappers (e.g. tickets) already have. No-op for non-flex wrappers. */
  min-width: 0;
}

/* ── Responsive column fit (all data tables) ──────────────────────────────────
   As the viewport narrows, every data-table's inter-column gaps tighten step-by-step to keep all
   columns visible for as long as possible, only falling back to the wrapper's horizontal scroll once
   even the tightest gaps can't fit. Applies to every `*-table-wrap`; opt a table OUT with the
   `no-table-fit` class (used for the Documents list + attachments tables, which have their own
   preview-split layout and tighten themselves).
   Deliberately viewport @media, NOT container queries: `container-type` collapses flex-item table
   wrappers in Chromium (it broke the Documents list), and table width tracks the viewport closely
   enough for this. The !important beats each table's own cell padding; scoped to *-table-wrap so it
   never touches unrelated cells. */
[class*="-table-wrap"]:not(.no-table-fit) { overflow-x: auto; }
@media (max-width: 1280px) {
  [class*="-table-wrap"]:not(.no-table-fit) th,
  [class*="-table-wrap"]:not(.no-table-fit) td { padding-left: 8px !important; padding-right: 8px !important; }
}
@media (max-width: 1024px) {
  [class*="-table-wrap"]:not(.no-table-fit) th,
  [class*="-table-wrap"]:not(.no-table-fit) td { padding-left: 5px !important; padding-right: 5px !important; }
}
@media (max-width: 820px) {
  [class*="-table-wrap"]:not(.no-table-fit) th,
  [class*="-table-wrap"]:not(.no-table-fit) td { padding-left: 3px !important; padding-right: 3px !important; }
}

/* When a table wrapper is the sole content of a page-body, bound it to the body's
   height so it scrolls internally — this keeps the sticky `thead th` header pinned
   while scrolling. Pages with a toolbar/other content above the table (wrapper is
   not :only-child) are left to scroll normally. */
.page-body > [class*="-table-wrap"]:only-child {
  max-height: 100%;
}

/* Short viewports (e.g. a phone turned landscape): the fixed 52px top bar plus a page's header/filter
   rows leave the internal-scrolling .page-body almost no height, so its scroll box — and a height-bounded
   table wrapper inside it — collapses to an unusable sliver. On short viewports switch these pages to
   natural scrolling: the shell grows to fit its content and .layout-main (already overflow-y:auto) scrolls
   the whole page beneath the fixed top bar, so the entire table is reachable. Horizontal scrolling of a
   too-wide table still happens inside its own wrapper. */
@media (max-height: 600px) {
  .fs-pg-shell { height: auto; min-height: 100%; }
  .page-body { flex: 0 0 auto; overflow-y: visible; }
  .page-body > [class*="-table-wrap"]:only-child { max-height: none; }
}

/* ── Table-list pages scroll as a whole page (global table setting) ────────────
   By default a .page-body traps a data table in a short internal scroll box while
   the page header + search/filter stay pinned. For any list/table page we instead
   let the ENTIRE page scroll: the fixed app top bar stays put, but the page header,
   search/filter and table all scroll together and .layout-main (already
   overflow-y:auto) does the scrolling. This uses the available height far better and
   is the same mechanism the short-viewport rule above uses, promoted to always-on.

   Scoped with :has() to pages whose .page-body actually contains a data table, so
   master/detail views (which manage their own internal scroll) are left untouched.
   .tkt-shell is Tickets' own shell class; it gets the same treatment. */
.fs-pg-shell:has(.page-body [class*="-table-wrap"]),
.tkt-shell:has(.page-body [class*="-table-wrap"]) {
  height: auto;
  min-height: 100%;
}
.page-body:has([class*="-table-wrap"]) {
  flex: 0 0 auto;
  overflow-y: visible;
}
.page-body:has([class*="-table-wrap"]) [class*="-table-wrap"] {
  max-height: none;
}
/* The page itself scrolls now, so a sticky column-header row would tuck behind the
   sticky page header. Let it scroll with the rows instead. */
.page-body:has([class*="-table-wrap"]) thead th {
  position: static;
}

.rep-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

  .rep-table th, .rep-table td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
  }

  .rep-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
  }

  .rep-table tbody tr:last-child td {
    border-bottom: none;
  }

.rep-actions {
  text-align: right;
}

/* ── Report list toolbar (search / filter / sort) ─────────────────────────── */
.rep-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.rep-filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 140px;
}

.rep-filter-label {
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}

.rep-filter-select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Barlow', sans-serif;
  font-size: 12px;
  padding: 7px 10px;
  outline: none;
  min-width: 140px;
  transition: border-color .15s;
}

  .rep-filter-select:focus {
    border-color: var(--accent);
  }

.rep-search-bar {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

/* Explanatory notice shown under a report list (e.g. incident visibility caveat). */
.rep-list-notice {
  margin: 12px 2px 0;
  font-size: 12.5px;
  color: var(--text-muted, #6b7280);
  font-style: italic;
}

/* Active deep-link filter (e.g. a dashboard widget scope) shown as a dismissible chip. */
.rep-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 16px;
}
.rep-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 6px 4px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent, #2563eb) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #2563eb) 40%, transparent);
  color: var(--text);
}
.rep-filter-chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted, #6b7280);
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
}
.rep-filter-chip-x:hover { background: rgba(127,127,127,.2); color: var(--text); }

.rep-search-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Barlow', sans-serif;
  font-size: 12px;
  padding: 7px 10px;
  outline: none;
  transition: border-color .15s;
}

  .rep-search-input:focus {
    border-color: var(--accent);
  }

.rep-state {
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.rep-empty {
  font-style: italic;
}

/* Status cell: the report status badge plus, for an escalated report, its NCR's status badge beside it. */
.rep-status-cell {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.rep-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.rep-badge--open {
  color: var(--accent);
  border-color: var(--accent);
}

.rep-badge--submitted {
  color: #2f81f7;
  border-color: #2f81f7;
}

.rep-badge--escalated {
  color: var(--danger);
  border-color: var(--danger);
}

.rep-badge--closed {
  color: var(--muted);
  border-color: var(--border);
}

.rep-badge--pending {
  color: var(--accent);
  border-color: var(--accent);
}
/* yellow */
.rep-badge--signed {
  color: var(--success);
  border-color: var(--success);
}
/* green */
.rep-badge--progress {
  color: #2f81f7;
  border-color: #2f81f7;
}
/* blue */

/* Yes/No pill toggle (matches the NCR form's yes/no styling) */
/* Yes/No segmented selector — rounded like the Tickets list/kanban view toggle, but with a solid
   (muted, not hairline) outline so the control is clearly visible. */
.rep-yesno-group {
  display: flex;
  gap: 0;
  border: 1px solid var(--muted);
  border-radius: 6px;
  overflow: hidden;
  width: fit-content;
  margin-bottom: 8px;
}

.rep-yesno-opt {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  border-right: 1px solid var(--muted);
  transition: background .12s, color .12s;
  letter-spacing: 0;
  text-transform: none;
  user-select: none;
}

  .rep-yesno-opt:last-child {
    border-right: none;
  }

  .rep-yesno-opt input[type="radio"] {
    display: none;
  }

  .rep-yesno-opt.active {
    background: var(--accent);
    color: var(--bg);
  }

.rep-signoff-required {
  align-self: center;
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
}

/* Sliding on/off toggle switch — the app's standard boolean control. */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.toggle-check {
  display: none;
}

.toggle-track {
  position: relative;
  width: 34px;
  height: 18px;
  background: var(--border);
  border-radius: 9px;
  transition: background .2s;
  flex-shrink: 0;
}

  .toggle-check:checked + .toggle-track {
    background: var(--accent);
  }

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  background: var(--muted);
  border-radius: 50%;
  transition: transform .2s, background .2s;
}

  .toggle-check:checked + .toggle-track .toggle-thumb {
    transform: translateX(16px);
    background: var(--bg);
  }

.toggle-text {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.rep-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.rep-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
}

.rep-chip-x {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 11px;
  padding: 0;
  line-height: 1;
}

.rep-person-picker {
  position: relative;
}
  /* Style the picker's input itself so it looks right anywhere it's used — not only inside a
   .rep-field (e.g. NCR linked-docs, ticket sidebar Share). Mirrors the .rep-field input styling. */
  .rep-person-picker input {
    width: 100%;
    padding: 7px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
  }

.rep-person-results {
  list-style: none;
  margin: 2px 0 0;
  padding: 4px;
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}

  .rep-person-results li button {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: var(--text);
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
  }

    .rep-person-results li button:hover {
      background: var(--surface2);
      color: var(--accent);
    }

/* Linked-report cards shown in NCR Step 1 */
.ncr-linked-reports {
  margin-bottom: 16px;
}

.ncr-linked-empty {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  padding: 4px 0;
}

.rep-link-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--surface);
}

.rep-link-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.rep-link-title {
  font-weight: 700;
  color: var(--text);
}

.rep-link-head .ncr-step-edit-btn {
  margin-left: auto;
}

.rep-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
}

.rep-link-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}

.rep-link-field--full {
  grid-column: 1 / -1;
  margin-top: 6px;
}

.rep-link-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
/* Grouped sub-sections inside a linked-report card (Items Affected, Immediate Action) — mirrors the
   report view's grouping. Spans the full card width and nests its own field grid. */
.rep-link-group {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rep-link-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text);
}

.rep-link-group-flag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.rep-link-sub {
  font-size: 12px;
  color: var(--muted);
  margin-left: 6px;
}

.rep-link-desc {
  color: var(--text);
}

.rep-attach-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* An attachment plus its (optional) delete button. */
.rep-attach-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rep-attach-del {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 2px 4px;
}

  .rep-attach-del:hover { color: var(--danger); }

/* Add-attachment control row in the detail view. */
.rep-attach-add {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rep-attach-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: block;
}

.rep-attach-link {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
}

  .rep-attach-link:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

/* Clickable report rows (open the detail view) */
.rep-table tbody tr.rep-row {
  cursor: pointer;
  transition: background .12s;
}

  .rep-table tbody tr.rep-row:hover {
    background: var(--surface);
  }

/* Detail view */
.rep-detail-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.rep-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rep-view-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.rep-view-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.rep-view-field--full {
  grid-column: 1 / -1;
}

.rep-view-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}

.rep-view-value {
  color: var(--text);
  font-size: 14px;
  word-break: break-word;
}

  .rep-view-value.rep-view-title {
    font-weight: 700;
    font-size: 16px;
  }

.rep-view-empty {
  color: var(--muted);
}

.rep-view-sub {
  color: var(--muted);
  font-size: 12px;
  margin-left: 8px;
}
/* Grouped sub-sections inside the report detail view (Logged, Classification, Items Affected,
   Immediate Action) — same grouped format as the NCR linked-report card. */
.rep-view-group {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rep-view-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text);
}

.rep-view-group-flag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}
/* A field grid nested inside a group sheds the outer box styling so it reads as a sub-section. */
.rep-view-group .rep-view-grid {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  gap: 12px 24px;
}

/* Grouped sub-sections inside the report CREATE/EDIT form (Logged, Incident Details) —
   the form-input mirror of .rep-view-group. */
.rep-form-group {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rep-form-group-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text);
}

/* Nested field grid inside a form group. */
.rep-form-group .rep-grid { gap: 12px 24px; }

.rep-person-linked {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* Detail tabs (Comments | History) */
.rep-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin: 24px 0 0;
}

.rep-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  font-family: 'Barlow', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
  cursor: pointer;
}

  .rep-tab.active {
    color: var(--text);
    border-bottom-color: var(--accent);
  }

/* History timeline (synthesised lifecycle events) */
.rep-history {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rep-history-item {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.rep-history-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.rep-history-body { display: flex; flex-direction: column; gap: 2px; }
.rep-history-title { font-size: 13px; font-weight: 600; color: var(--text); }
.rep-history-detail { font-size: 12px; color: var(--muted); }
.rep-history-time { font-size: 11px; color: var(--muted); }

@media (max-width: 576px) {
  .rep-view-grid {
    grid-template-columns: 1fr;
  }
}

.rep-link-picker {
  margin-top: 8px;
  position: relative;
}

  .rep-link-picker input {
    width: 100%;
    padding: 7px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
  }

.rep-link-none {
  color: var(--muted);
  font-size: 13px;
  padding: 6px 8px;
}

/* Escalate popup (create new NCR vs add to existing) */
.rep-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.rep-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
}

.rep-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.rep-modal-text {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 14px;
}
/* Form fields inside a modal (reusing the rep-field styles): even vertical rhythm between
   fields and clear space before the action buttons below. */
.rep-modal-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 0 20px;
}

  .rep-modal-fields .rep-yesno-group {
    margin-bottom: 0;
  }

.rep-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.rep-modal-search {
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
}

.rep-modal-list {
  position: static;
  max-height: 260px;
  margin-bottom: 12px;
}

@media (max-width: 576px) {
  .rep-grid {
    grid-template-columns: 1fr;
  }

  .rep-link-grid {
    grid-template-columns: 1fr;
  }
}

/* ── PDF Markup: selectable-text overlay (Select Text tool) ──────────────────────
   pdf.js fills #pdf-text-layer with transparent, absolutely-positioned glyph spans.
   These rules are global (not scoped) because the spans are created dynamically. */
.pdf-text-layer {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  line-height: 1;
  text-align: initial;
  pointer-events: none; /* inert until the Select Text tool turns it on */
  z-index: 4;
}

  .pdf-text-layer.active {
    pointer-events: auto;
    z-index: 55; /* above annotations so any text can be selected */
    cursor: text;
  }

  .pdf-text-layer span {
    position: absolute;
    white-space: pre;
    color: transparent;
    transform-origin: 0 0;
    cursor: text;
    user-select: text;
    -webkit-user-select: text;
  }

  .pdf-text-layer ::selection {
    background: rgba(37, 99, 235, .35);
  }

  .pdf-text-layer span::selection {
    background: rgba(37, 99, 235, .35);
  }

  /* While Select Text is active, only the PDF's own text is selectable — never the review
   annotations (added text, comments, signatures) in the annotation layer beneath it. */
  .pdf-text-layer.active ~ .annotation-layer {
    user-select: none;
    -webkit-user-select: none;
  }

/* ── Reusable page shell + header ────────────────────────────────────────────
   Use on any page that wants the standard full-height column layout with a title on the
   left and an action button on the right. */
.fs-pg-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  z-index: 1;
}

.fs-pg-header {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--border);
  /* Stay pinned to the top while the rest of the page content scrolls beneath it.
       Left transparent (no background fill) so it shows the layout's translucent
       backdrop exactly like the Users header; the z-index keeps it above the
       scrolling content. */
  position: sticky;
  top: 0;
  z-index: 10;
}

.fs-pg-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
}

/* Right-hand action group for .fs-pg-header. Keeps one or more buttons grouped and
   evenly spaced, so the header's space-between layout still sees just two children
   (title + this group) even when there are multiple actions. */
.fs-pg-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
