/* ════════════════════════════════════════════════════════════════════
   BRS — the application's visual system.

   ⚠ THIS FILE STYLES CLASS NAMES THE VIEWS ALREADY USE. The design was
   approved as a separate mock-up; applying it by renaming classes would
   have meant editing thirty-three Razor files and re-testing every one.
   Restyling the existing vocabulary — brs-card, brs-figure, brs-pill,
   brs-table — reskins the whole product from one place, and the views
   that were verified against a real statement stay verified.

   ⚠ NO CDN, ANYWHERE. This is installed on a customer's own machine,
   often one that cannot reach the internet. Every colour, every icon and
   every font fallback is local; a webfont that fails to load must leave
   a readable page, not a broken one.

   Layer order: Bootstrap (vendored) → this file. Bootstrap supplies the
   grid and form scaffolding the views were written against; everything
   below either replaces its appearance or adds what it has no opinion on.
   ════════════════════════════════════════════════════════════════════ */

:root {
  /* ── Brand ──────────────────────────────────────────────────────
     A product blue with a slight violet lean, so it reads as chosen
     rather than as the default blue every admin template ships. */
  --brs-brand:      #2f5de0;
  --brs-brand-600:  #2549c4;
  --brs-brand-700:  #1d3ba1;
  --brs-brand-50:   #eef2fe;
  --brs-brand-100:  #dde5fd;
  --brs-brand-200:  #c3d0fb;
  --brs-brand-ink:  #ffffff;

  --brs-side:       #16203c;
  --brs-side-2:     #1f2c4f;
  --brs-side-ink:   #a7b3ce;
  --brs-side-dim:   #5c6a8e;

  --brs-page:       #f4f6fb;
  --brs-card:       #ffffff;
  --brs-card-2:     #fafbfe;
  --brs-rule:       #e4e8f2;
  --brs-rule-2:     #cfd6e6;

  --brs-ink:        #131a2e;
  --brs-ink-2:      #4e5975;
  --brs-ink-3:      #737e9b;

  /* ⚠ SEMANTIC COLOUR IS SEPARATE FROM THE BRAND HUE. Credit, debit and
     needs-attention are spoken for by the domain; an accent that shared
     a hue with them would stop meaning "you can click this". */
  --brs-green:      #0b8a55;  --brs-green-50:  #e6f6ee;  --brs-green-200:  #a8dcc2;
  --brs-red:        #cf2030;  --brs-red-50:    #fdecee;  --brs-red-200:    #f4c2c7;
  --brs-amber:      #9a6207;  --brs-amber-50:  #fdf3e2;  --brs-amber-200:  #edd4a4;
  --brs-violet:     #6d3fd4;  --brs-violet-50: #f1ebfd;  --brs-violet-200: #d4c2f6;
  --brs-teal:       #0b7f8e;  --brs-teal-50:   #e3f4f6;  --brs-teal-200:   #a7d9df;

  --brs-sans: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system,
              "Helvetica Neue", Arial, sans-serif;
  --brs-mono: "IBM Plex Mono", ui-monospace, Consolas, "SF Mono", Menlo, monospace;

  --brs-r:    10px;
  --brs-r-sm: 7px;
  --brs-r-xs: 5px;
  --brs-sh:   0 1px 2px rgba(19,26,46,.06), 0 1px 3px rgba(19,26,46,.04);
  --brs-sh-2: 0 4px 12px rgba(19,26,46,.08), 0 1px 3px rgba(19,26,46,.05);
  --brs-sh-3: 0 12px 32px rgba(19,26,46,.14);

  --brs-side-w: 236px;
}

/* ⚠ THE VIEWER HAS THREE STATES, NOT TWO. An explicit choice stamps
   data-theme on the root; the default stamps nothing, so only
   prefers-color-scheme separates light from dark. Tokens are
   redefined for both, and no component is ever styled inside a
   theme block — a colour defined only there never applies in the
   un-stamped state. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brs-brand:      #7d9bff;
    --brs-brand-600:  #8fa9ff;
    --brs-brand-700:  #a3b8ff;
    --brs-brand-50:   #171f3a;
    --brs-brand-100:  #1e2950;
    --brs-brand-200:  #2b3a6d;
    --brs-brand-ink:  #0b1020;
  
    --brs-side:       #0b1020;
    --brs-side-2:     #151d35;
    --brs-side-ink:   #98a4c2;
    --brs-side-dim:   #6c7a9c;
  
    --brs-page:       #080c17;
    --brs-card:       #111726;
    --brs-card-2:     #161d2f;
    --brs-rule:       #222b42;
    --brs-rule-2:     #303b57;
  
    --brs-ink:        #e9edf7;
    --brs-ink-2:      #a5afc8;
    --brs-ink-3:      #8390ab;
  
    --brs-green:      #45c98c;  --brs-green-50:  #0d2a1e;  --brs-green-200:  #1d5039;
    --brs-red:        #ff8a94;  --brs-red-50:    #2c1418;  --brs-red-200:    #54242c;
    --brs-amber:      #e0ab5c;  --brs-amber-50:  #2a2011;  --brs-amber-200:  #4d3a1d;
    --brs-violet:     #b294f7;  --brs-violet-50: #211a3c;  --brs-violet-200: #3a2d6b;
    --brs-teal:       #52c2cf;  --brs-teal-50:   #0f2a2e;  --brs-teal-200:   #1d4a51;
  
    --brs-sh:   0 1px 2px rgba(0,0,0,.40);
    --brs-sh-2: 0 4px 14px rgba(0,0,0,.45);
    --brs-sh-3: 0 14px 36px rgba(0,0,0,.55);
  }
}

:root[data-theme="dark"] {
  --brs-brand:      #7d9bff;
  --brs-brand-600:  #8fa9ff;
  --brs-brand-700:  #a3b8ff;
  --brs-brand-50:   #171f3a;
  --brs-brand-100:  #1e2950;
  --brs-brand-200:  #2b3a6d;
  --brs-brand-ink:  #0b1020;

  --brs-side:       #0b1020;
  --brs-side-2:     #151d35;
  --brs-side-ink:   #98a4c2;
  --brs-side-dim:   #6c7a9c;

  --brs-page:       #080c17;
  --brs-card:       #111726;
  --brs-card-2:     #161d2f;
  --brs-rule:       #222b42;
  --brs-rule-2:     #303b57;

  --brs-ink:        #e9edf7;
  --brs-ink-2:      #a5afc8;
  --brs-ink-3:      #8390ab;

  --brs-green:      #45c98c;  --brs-green-50:  #0d2a1e;  --brs-green-200:  #1d5039;
  --brs-red:        #ff8a94;  --brs-red-50:    #2c1418;  --brs-red-200:    #54242c;
  --brs-amber:      #e0ab5c;  --brs-amber-50:  #2a2011;  --brs-amber-200:  #4d3a1d;
  --brs-violet:     #b294f7;  --brs-violet-50: #211a3c;  --brs-violet-200: #3a2d6b;
  --brs-teal:       #52c2cf;  --brs-teal-50:   #0f2a2e;  --brs-teal-200:   #1d4a51;

  --brs-sh:   0 1px 2px rgba(0,0,0,.40);
  --brs-sh-2: 0 4px 14px rgba(0,0,0,.45);
  --brs-sh-3: 0 14px 36px rgba(0,0,0,.55);
}

/* ── Base ─────────────────────────────────────────────────────────── */

html, body {
  background: var(--brs-page);
  color: var(--brs-ink);
  font-family: var(--brs-sans);
  font-size: 13.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a         { color: var(--brs-brand); text-decoration: none; }
a:hover   { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--brs-brand); outline-offset: 2px; border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Icons. One stroke weight, one geometry, colour inherited from the text
   around them — so an icon never needs its own colour rule. */
.brs-ic     { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor;
              stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.brs-ic-sm  { width: 15px; height: 15px; stroke-width: 1.85; }
.brs-ic-lg  { width: 22px; height: 22px; stroke-width: 1.6; }

/* ── Shell ────────────────────────────────────────────────────────── */

.brs-shell { display: flex; min-height: 100vh; }

.brs-side {
  width: var(--brs-side-w);
  flex: 0 0 var(--brs-side-w);
  background: var(--brs-side);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}

.brs-brand { display: flex; align-items: center; gap: 11px; padding: 17px 18px 16px; }
.brs-brand-glyph {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(145deg, var(--brs-brand) 0%, #5b7bf0 55%, #7f5be8 100%);
  display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(47,93,224,.45);
}
.brs-brand-glyph svg { width: 19px; height: 19px; stroke: #fff; stroke-width: 2;
                       fill: none; stroke-linecap: round; stroke-linejoin: round; }
.brs-brand-mark { display: block; font-size: 15px; font-weight: 800; color: #fff;
                  letter-spacing: -.01em; }
.brs-brand-sub  { display: block; font-size: 10.5px; color: var(--brs-side-dim);
                  font-weight: 500; margin-top: 1px; }

.brs-nav { flex: 1 1 auto; overflow-y: auto; padding: 4px 0 14px; }
.brs-nav-group { padding: 15px 18px 6px; font-size: 9.5px; font-weight: 700;
                 letter-spacing: .14em; text-transform: uppercase; color: var(--brs-side-dim); }

.brs-nav a {
  display: flex; align-items: center; gap: 11px;
  margin: 1px 9px; padding: 8px 11px; border-radius: var(--brs-r-sm);
  color: var(--brs-side-ink); font-size: 13.5px; font-weight: 500;
}
.brs-nav a:hover { background: var(--brs-side-2); color: #fff; text-decoration: none; }
.brs-nav a .brs-ic { opacity: .72; }
.brs-nav a:hover .brs-ic { opacity: 1; }
.brs-nav a.active {
  background: linear-gradient(90deg, var(--brs-brand) 0%, #4a6ee8 100%);
  color: #fff; font-weight: 600;
  box-shadow: 0 2px 10px rgba(47,93,224,.40);
}
.brs-nav a.active .brs-ic { opacity: 1; }

.brs-nav-count { margin-left: auto; font-size: 11px; font-weight: 700;
                 background: rgba(255,255,255,.13); border-radius: 20px; padding: 1px 7px; }
.brs-nav a.active .brs-nav-count { background: rgba(255,255,255,.22); }
.brs-nav-count.hot { background: var(--brs-amber); color: #2a1c02; }

.brs-side-foot { padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.08);
                 display: flex; align-items: center; gap: 10px; }
.brs-side-foot b    { display: block; font-size: 12.5px; color: #fff; font-weight: 600; }
.brs-side-foot span { display: block; font-size: 11px; color: var(--brs-side-dim); }

/* ── Main column ──────────────────────────────────────────────────── */

.brs-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.brs-top {
  height: 58px; background: var(--brs-card);
  border-bottom: 1px solid var(--brs-rule);
  display: flex; align-items: center; gap: 16px; padding: 0 22px;
  position: sticky; top: 0; z-index: 20;
}
.brs-top-company { font-weight: 700; font-size: 14px; letter-spacing: -.01em; }
.brs-top-right   { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.brs-avatar { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid;
              place-items: center; font-size: 11px; font-weight: 700; color: #fff;
              background: linear-gradient(140deg,#7f5be8,#2f5de0); }
.brs-avatar-sm { width: 26px; height: 26px; font-size: 10px; }

.brs-iconbtn { width: 34px; height: 34px; border-radius: var(--brs-r-sm); border: 0;
               background: none; color: var(--brs-ink-2); cursor: pointer;
               display: grid; place-items: center; }
.brs-iconbtn:hover { background: var(--brs-page); color: var(--brs-ink); text-decoration: none; }

.brs-body { padding: 22px; flex: 1 1 auto; }

/* ── Page head ────────────────────────────────────────────────────── */

.brs-page-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 20px;
                 flex-wrap: wrap; }
.brs-page-head h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.025em;
                    text-wrap: balance; }
.brs-page-head .brs-sub { margin: 4px 0 0; color: var(--brs-ink-2); font-size: 13px; }
.brs-page-actions { margin-left: auto; display: flex; gap: 9px; flex-wrap: wrap;
                    align-items: center; }
.brs-page-actions .btn, .brs-card-actions .btn { white-space: nowrap; }

/* ── Buttons — Bootstrap's classes, this product's appearance ─────── */

.btn {
  font-family: var(--brs-sans); font-weight: 600; font-size: 13px;
  padding: 8px 14px; border-radius: var(--brs-r-sm);
  border: 1px solid var(--brs-rule-2);
  background: var(--brs-card); color: var(--brs-ink);
  box-shadow: var(--brs-sh);
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
.btn:hover { border-color: var(--brs-ink-3); color: var(--brs-ink);
             background: var(--brs-card); text-decoration: none; }
.btn:focus-visible { box-shadow: 0 0 0 3px var(--brs-brand-100); }

.btn-primary, .btn-primary:active {
  background: linear-gradient(180deg, var(--brs-brand) 0%, var(--brs-brand-600) 100%);
  border-color: var(--brs-brand-600); color: var(--brs-brand-ink);
  box-shadow: 0 1px 2px rgba(29,59,161,.30), 0 2px 8px rgba(47,93,224,.25);
}
.btn-primary:hover { filter: brightness(1.07); border-color: var(--brs-brand-700);
                     background: linear-gradient(180deg, var(--brs-brand) 0%, var(--brs-brand-600) 100%);
                     color: var(--brs-brand-ink); }

.btn-outline-secondary { background: var(--brs-card); border-color: var(--brs-rule-2);
                         color: var(--brs-ink); }
.btn-outline-secondary:hover { background: var(--brs-card); border-color: var(--brs-ink-3);
                               color: var(--brs-ink); }

.btn-outline-danger, .btn-danger { background: var(--brs-card); color: var(--brs-red);
                                   border-color: var(--brs-red-200); box-shadow: var(--brs-sh); }
.btn-outline-danger:hover, .btn-danger:hover { background: var(--brs-red-50);
                                               border-color: var(--brs-red); color: var(--brs-red); }

.btn-sm { font-size: 12px; padding: 5px 10px; }
.btn-link { border-color: transparent; box-shadow: none; background: none;
            color: var(--brs-brand); font-weight: 600; }
.btn-link:hover { background: var(--brs-page); border-color: transparent; }
.btn.disabled, .btn:disabled { opacity: .45; box-shadow: none; }

/* ── Cards ────────────────────────────────────────────────────────── */

.brs-card {
  background: var(--brs-card); border: 1px solid var(--brs-rule);
  border-radius: var(--brs-r); box-shadow: var(--brs-sh);
  margin-bottom: 18px; overflow: hidden;
}
.brs-card-head {
  padding: 14px 17px; border-bottom: 1px solid var(--brs-rule);
  font-size: 14.5px; font-weight: 700; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 11px;
}
.brs-card-actions { margin-left: auto; font-weight: 400; font-size: 12.5px;
                    color: var(--brs-ink-3); display: flex; align-items: center; gap: 9px; }
.brs-card-body       { padding: 17px; }
.brs-card-body.tight { padding: 0; }

/* ── Figures — the stat tiles ──────────────────────────────────────
   ⚠ A TILE IS A LINK WHERE ONE EXISTS. A figure you cannot click is a
   figure you have to go and find somewhere else, and "218 unclassified"
   is only useful if it takes you to the 218. */
.brs-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(206px, 1fr));
               gap: 14px; margin-bottom: 18px; }

.brs-figure {
  background: var(--brs-card); border: 1px solid var(--brs-rule);
  border-radius: var(--brs-r); box-shadow: var(--brs-sh);
  padding: 15px 16px; position: relative; overflow: hidden; display: block;
  color: inherit;
}
a.brs-figure:hover { text-decoration: none; box-shadow: var(--brs-sh-2);
                     border-color: var(--brs-rule-2); transform: translateY(-1px);
                     transition: all .14s ease; color: inherit; }

.brs-figure-mark { width: 36px; height: 36px; border-radius: 9px; display: grid;
                   place-items: center; margin-bottom: 11px;
                   background: var(--brs-brand-50); color: var(--brs-brand); }
.brs-figure-edge { position: absolute; inset: 0 auto 0 0; width: 3px;
                   background: var(--brs-brand); }

.brs-figure-label { font-size: 11.5px; font-weight: 600; color: var(--brs-ink-2);
                    letter-spacing: 0; text-transform: none; }
.brs-figure-value { font-size: 27px; font-weight: 800; letter-spacing: -.035em;
                    color: var(--brs-ink); font-variant-numeric: tabular-nums;
                    line-height: 1.1; margin-top: 2px; }
.brs-figure-note  { font-size: 11.5px; color: var(--brs-ink-3); margin-top: 4px;
                    display: flex; align-items: center; gap: 5px; }

/* A money figure is longer than a count, so it is set smaller — the tile
   must not decide its own width from the value inside it. */
.brs-figure-value.money { font-size: 21px; }

.brs-figure.credit .brs-figure-mark { background: var(--brs-green-50); color: var(--brs-green); }
.brs-figure.credit .brs-figure-edge { background: var(--brs-green); }
.brs-figure.credit .brs-figure-value { color: var(--brs-green); }
.brs-figure.debit  .brs-figure-mark { background: var(--brs-red-50); color: var(--brs-red); }
.brs-figure.debit  .brs-figure-edge { background: var(--brs-red); }
.brs-figure.debit  .brs-figure-value { color: var(--brs-red); }
.brs-figure.flag   .brs-figure-mark { background: var(--brs-amber-50); color: var(--brs-amber); }
.brs-figure.flag   .brs-figure-edge { background: var(--brs-amber); }
.brs-figure.violet .brs-figure-mark { background: var(--brs-violet-50); color: var(--brs-violet); }
.brs-figure.violet .brs-figure-edge { background: var(--brs-violet); }
.brs-figure.teal   .brs-figure-mark { background: var(--brs-teal-50); color: var(--brs-teal); }
.brs-figure.teal   .brs-figure-edge { background: var(--brs-teal); }

/* ── Tables ───────────────────────────────────────────────────────── */

.brs-scroll-x { overflow-x: auto; }

.brs-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }

.brs-table thead th {
  background: var(--brs-card-2);
  border-bottom: 1px solid var(--brs-rule);
  padding: 10px 14px; text-align: left;
  font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--brs-ink-3); white-space: nowrap;
  /* ⚠ THE HEADER STICKS. A statement runs to fifty rows, and an amount
     sitting under no heading is an unlabelled number. */
  position: sticky; top: 0; z-index: 2;
}
.brs-table thead th.brs-num { text-align: right; }

.brs-table tbody td { padding: 11px 14px; border-bottom: 1px solid var(--brs-rule);
                      vertical-align: middle; }
.brs-table tbody tr:last-child td { border-bottom: 0; }
.brs-table tbody tr:hover td { background: var(--brs-card-2); }
.brs-table tfoot td { padding: 12px 14px; background: var(--brs-card-2);
                      border-top: 1px solid var(--brs-rule-2); font-weight: 700; }

/* ⚠ STATE ON THE LEFT EDGE. Going down fifty rows the eye tracks one
   vertical line, so what still needs a human has to be readable from
   that line alone. The pill remains the nameable state; the stripe is
   what the operator actually navigates by. */
.brs-table tbody td:first-child { border-left: 3px solid transparent; }
.brs-table tbody tr.s-unclassified td:first-child { border-left-color: var(--brs-amber); }
.brs-table tbody tr.s-duplicate   td:first-child { border-left-color: var(--brs-red); }
.brs-table tbody tr.s-classified  td:first-child { border-left-color: var(--brs-green); }
.brs-table tbody tr.s-ignored     td:first-child { border-left-color: var(--brs-rule-2); }

.brs-table-wide { min-width: 1060px; }

/* ⚠ MONEY IS RIGHT-ALIGNED AND TABULAR, ALWAYS. A column of amounts
   whose digits do not line up cannot be scanned for the odd one out,
   which is the commonest thing anybody does to a statement. */
.brs-num  { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.brs-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.brs-cr   { color: var(--brs-green); }
.brs-dr   { color: var(--brs-red); }

.brs-narration { font-size: 12.5px; line-height: 1.4; word-break: break-word; max-width: 430px; }
.brs-table-wide .brs-narration { min-width: 290px; }
.brs-ref { font-size: 11px; color: var(--brs-ink-3); font-family: var(--brs-mono); }

.brs-empty { padding: 46px 24px; text-align: center; color: var(--brs-ink-2); font-size: 13px; }
.brs-empty b { display: block; color: var(--brs-ink); font-size: 15px; font-weight: 700;
               margin-bottom: 6px; }

/* ── Badges ───────────────────────────────────────────────────────── */

.brs-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
}
.brs-pill .brs-ic { width: 11px; height: 11px; stroke-width: 2.4; }

/* ⚠ STATE IS SHAPE AS WELL AS COLOUR. A bank report is photocopied and
   read by colour-blind people; a state told only in colour survives
   neither, so each carries a glyph too. */
.brs-pill-unclassified::before { content: "\25B2"; font-size: 7px; }
.brs-pill-classified::before   { content: "\25CF"; font-size: 8px; }
.brs-pill-duplicate::before    { content: "\29C9"; font-size: 9px; }
.brs-pill-ignored::before      { content: "\2013"; font-size: 9px; }

.brs-pill-classified   { background: var(--brs-green-50); color: var(--brs-green);
                         border-color: var(--brs-green-200); }
.brs-pill-unclassified { background: var(--brs-amber-50); color: var(--brs-amber);
                         border-color: var(--brs-amber-200); }
.brs-pill-duplicate    { background: var(--brs-red-50); color: var(--brs-red);
                         border-color: var(--brs-red-200); }
.brs-pill-ignored      { background: var(--brs-page); color: var(--brs-ink-3);
                         border-color: var(--brs-rule-2); }
.brs-pill-neutral      { background: var(--brs-page); color: var(--brs-ink-2);
                         border-color: var(--brs-rule); font-family: var(--brs-mono);
                         font-size: 10.5px; font-weight: 500; padding: 2px 7px; }
.brs-pill-info         { background: var(--brs-brand-50); color: var(--brs-brand);
                         border-color: var(--brs-brand-200); }

/* ── Progress ─────────────────────────────────────────────────────── */

.brs-bar { height: 6px; background: var(--brs-page); border-radius: 4px; overflow: hidden;
           min-width: 78px; border: 1px solid var(--brs-rule); }
.brs-bar > i { display: block; height: 100%; border-radius: 4px;
               background: linear-gradient(90deg, var(--brs-green) 0%, #2fbd84 100%); }

/* ── Filters ──────────────────────────────────────────────────────── */

.brs-filters { display: flex; flex-wrap: wrap; gap: 11px; align-items: flex-end; }
.brs-filters .brs-field { display: flex; flex-direction: column; gap: 5px; }
.brs-filters label { font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
                     text-transform: uppercase; color: var(--brs-ink-3); }
.brs-filters .form-control, .brs-filters .form-select { font-size: 13px; min-width: 148px; }
.brs-filters .brs-field-wide .form-control,
.brs-filters .brs-field-wide .form-select { min-width: 240px; }

/* ── Forms — Bootstrap's classes, this product's appearance ───────── */

.form-label { font-size: 11.5px; font-weight: 700; color: var(--brs-ink-2);
              margin-bottom: 5px; letter-spacing: 0; }

.form-control, .form-select {
  font-family: var(--brs-sans); font-size: 13px; font-weight: 500;
  padding: 8px 10px;
  color: var(--brs-ink); background-color: var(--brs-card);
  border: 1px solid var(--brs-rule-2); border-radius: var(--brs-r-sm);
}
.form-control:focus, .form-select:focus {
  color: var(--brs-ink); background-color: var(--brs-card);
  border-color: var(--brs-brand); box-shadow: 0 0 0 3px var(--brs-brand-100);
}
.form-control::placeholder { color: var(--brs-ink-3); }
.form-control:disabled, .form-select:disabled { background-color: var(--brs-page); }

.form-check-input { border-color: var(--brs-rule-2); background-color: var(--brs-card); }
.form-check-input:checked { background-color: var(--brs-brand); border-color: var(--brs-brand); }
.form-check-input:focus { border-color: var(--brs-brand);
                          box-shadow: 0 0 0 3px var(--brs-brand-100); }
.form-check-label { font-size: 13px; color: var(--brs-ink); }

/* ── Notices ──────────────────────────────────────────────────────── */

.brs-alert {
  display: flex; gap: 13px; align-items: flex-start;
  border: 1px solid var(--brs-rule); border-radius: var(--brs-r);
  background: var(--brs-card); box-shadow: var(--brs-sh);
  padding: 14px 16px; margin-bottom: 18px;
}
.brs-alert-title { font-weight: 700; font-size: 13.5px; }
.brs-alert ul { margin: 5px 0 0; padding-left: 20px; font-size: 12.5px;
                color: var(--brs-ink-2); }
.brs-alert ul li + li { margin-top: 3px; }

/* The icon chip. Optional — an alert without one still reads correctly,
   because the tinted ground and the left edge already carry the level. */
.brs-alert-mark { width: 32px; height: 32px; border-radius: 8px; flex: none;
                  display: grid; place-items: center; color: #fff; }

.brs-alert-ok   { background: var(--brs-green-50); border-color: var(--brs-green-200);
                  color: var(--brs-green); }
.brs-alert-ok   .brs-alert-mark { background: var(--brs-green); }
.brs-alert-bad  { background: var(--brs-red-50); border-color: var(--brs-red-200);
                  color: var(--brs-red); }
.brs-alert-bad  .brs-alert-mark { background: var(--brs-red); }
.brs-alert-warn { background: var(--brs-amber-50); border-color: var(--brs-amber-200);
                  color: var(--brs-amber); }
.brs-alert-warn .brs-alert-mark { background: var(--brs-amber); }
.brs-alert-info { background: var(--brs-brand-50); border-color: var(--brs-brand-200);
                  color: var(--brs-brand); }
.brs-alert-info .brs-alert-mark { background: var(--brs-brand); }

/* The body text inside a tinted alert stays readable ink rather than
   taking the level's hue, which is reserved for the heading and mark. */
.brs-alert ul, .brs-alert p { color: var(--brs-ink-2); }

/* ── Pager ────────────────────────────────────────────────────────── */

.brs-pager { display: flex; align-items: center; gap: 12px; padding: 12px 17px;
             border-top: 1px solid var(--brs-rule); background: var(--brs-card-2);
             font-size: 12.5px; flex-wrap: wrap; }
.brs-pager-count { color: var(--brs-ink-2); margin-right: auto;
                   font-variant-numeric: tabular-nums; }

/* ── Sign in and first run ────────────────────────────────────────── */

.brs-gate { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) {
  .brs-gate { grid-template-columns: 1fr; }
  .brs-gate-pitch { display: none; }
}

.brs-gate-pitch {
  background:
    radial-gradient(900px 420px at 18% 8%, rgba(125,155,255,.22), transparent 60%),
    linear-gradient(160deg, #16203c 0%, #1d2a52 55%, #2a2260 100%);
  color: #fff; padding: 48px 46px; display: flex; flex-direction: column;
}
.brs-gate-pitch h2 { margin: 34px 0 14px; font-size: 30px; font-weight: 800;
                     letter-spacing: -.035em; line-height: 1.15; max-width: 20ch;
                     text-wrap: balance; }
.brs-gate-pitch p  { margin: 0; font-size: 14.5px; color: #b6c2e2; max-width: 42ch;
                     line-height: 1.6; }
.brs-gate-pitch ul { list-style: none; margin: 30px 0 0; padding: 0;
                     display: flex; flex-direction: column; gap: 15px; }
.brs-gate-pitch li { display: flex; gap: 12px; font-size: 13.5px; color: #d3dbf0; }
.brs-gate-tick { width: 22px; height: 22px; border-radius: 50%; flex: none;
                 background: rgba(125,155,255,.18); color: #a9bcff;
                 display: grid; place-items: center; }
.brs-gate-seal { margin-top: auto; padding-top: 26px; font-size: 11.5px;
                 color: var(--brs-side-dim); display: flex; align-items: center; gap: 8px; }

.brs-gate-form { display: grid; place-items: center; padding: 40px 24px;
                 background: var(--brs-card); }
.brs-gate-card { width: 100%; max-width: 366px; }
.brs-gate-card h1 { margin: 0 0 6px; font-size: 24px; font-weight: 800;
                    letter-spacing: -.03em; }
.brs-gate-card .brs-sub { margin: 0 0 26px; font-size: 13.5px; color: var(--brs-ink-2); }

/* ── Bits ─────────────────────────────────────────────────────────── */

.brs-muted  { color: var(--brs-ink-2); }
.brs-faint  { color: var(--brs-ink-3); }
.brs-small  { font-size: 12px; }
.brs-mono   { font-family: var(--brs-mono); font-variant-numeric: tabular-nums;
              font-size: .93em; }
.brs-nowrap { white-space: nowrap; }
.brs-hint   { font-size: 11.5px; color: var(--brs-ink-3); margin-top: 4px; }

.brs-who   { display: flex; align-items: center; gap: 10px; }
.brs-who b { font-weight: 600; font-size: 13px; display: block; }

/* ── Narrow screens ───────────────────────────────────────────────── */

/* ⚠ THE RAIL COLLAPSES, IT DOES NOT VANISH. Hiding navigation on a
   1100px laptop leaves the operator with no way between screens. Icons
   only, label on hover, everything still reachable. */
@media (max-width: 1200px) and (min-width: 861px) {
  :root { --brs-side-w: 62px; }
  .brs-brand > span:last-child, .brs-nav-group,
  .brs-nav a .brs-nav-label, .brs-nav-count,
  .brs-side-foot > span:last-child { display: none; }
  .brs-brand { justify-content: center; padding: 17px 0 16px; }
  .brs-nav a { justify-content: center; padding: 10px 0; position: relative; }
  .brs-side-foot { justify-content: center; }
  .brs-nav a::after {
    content: attr(data-label); position: absolute; left: calc(100% + 10px);
    background: var(--brs-ink); color: var(--brs-page);
    font-size: 12px; font-weight: 600; padding: 5px 9px;
    border-radius: var(--brs-r-xs); white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 40;
  }
  .brs-nav a:hover::after { opacity: 1; }
}

@media (max-width: 860px) {
  .brs-shell { flex-direction: column; }
  .brs-side { width: auto; flex: 0 0 auto; height: auto; position: static;
              flex-direction: row; flex-wrap: wrap; align-items: center; padding-bottom: 6px; }
  .brs-brand { padding: 12px 14px; }
  .brs-nav { display: flex; flex-wrap: wrap; padding: 4px; overflow: visible; }
  .brs-nav-group, .brs-side-foot { display: none; }
  .brs-body { padding: 16px; }
  .brs-page-head h1 { font-size: 19px; }
  .brs-figures { grid-template-columns: 1fr 1fr; gap: 11px; }
  .brs-figure-value { font-size: 22px; }
  .brs-figure-value.money { font-size: 17px; }
}

/* ── Print ────────────────────────────────────────────────────────── */

@media print {
  .brs-side, .brs-top, .brs-page-actions, .brs-filters, .brs-pager, .no-print
    { display: none !important; }
  .brs-body { padding: 0; }
  .brs-card { border: none; box-shadow: none; }
  .brs-table thead th { position: static; }
}
