/* The portal's own stylesheet: the brand on top of Tabler 1.7.5. This one file is everything
   that differs from stock Tabler.
   Every colour is a named value from docs/design-system.md, section 4, given once as
   light-dark(light, dark). Tabler sets color-scheme from data-bs-theme, so each value follows
   the mode of the element using it, including the always-dark sidebar inside a light page. */
.tb {
  --ink: light-dark(#1F1F21, #EDEDEC);
  --ink-3: light-dark(#6B6B6F, #A1A19E);
  --canvas: light-dark(#FAFAF9, #1F1F21);
  --paper: light-dark(#FFFFFF, #26262A);
  --subtle: light-dark(#F1F1F0, #2F2F33);
  --line: light-dark(#E2E2DF, #3A3A3F);
  --line-strong: light-dark(#8A8A8E, #85858A);
  --brand: #D9B451;
  --brand-hover: #C7A23F;
  --brand-edge: light-dark(#A8842C, #D9B451);
  --on-brand: #1F1F21;
  --side: #1F1F21;
  --side-line: #38383D;
  --side-ink: #EDEDEC;
  --side-ink-2: #B9B9B5;
  --chosen: light-dark(#1F1F21, #EDEDEC);
  --on-chosen: light-dark(#FFFFFF, #1F1F21);
  --scrim: rgba(15, 15, 17, .55);
  --ok: light-dark(#116B32, #4ADE80);
  --warn: light-dark(#9A4507, #FBBF24);
  --bad: light-dark(#B91C1C, #F87171);
  --info: light-dark(#1D4ED8, #60A5FA);
  --quiet: light-dark(#52525B, #C7C7C4);

  /* Tabler's own variables, pointed at those values. */
  --tblr-primary: var(--brand); --tblr-primary-rgb: 217,180,81; --tblr-primary-fg: var(--on-brand);
  --tblr-primary-darken: var(--brand-hover);
  --tblr-body-color: var(--ink); --tblr-body-bg: var(--canvas);
  --tblr-bg-surface: var(--paper); --tblr-bg-surface-secondary: var(--canvas);
  --tblr-border-color: var(--line); --tblr-secondary: var(--ink-3);
  --tblr-link-color: var(--ink); --tblr-link-hover-color: var(--ink);
  --tblr-font-sans-serif: Inter, system-ui, sans-serif;
  /* Stock Tabler draws the focus ring in the main colour at half strength: gold on white is
     about 1.5:1. The ring is the text colour instead, 14:1 or better in both modes. */
  --tblr-focus-ring-color: var(--chosen);
  font-family: Inter, system-ui, sans-serif;
}

/* Sidebar: charcoal in both modes, with a gold marker on the current section. */
.tb .navbar-vertical.navbar-expand-lg { background: var(--side); border-color: var(--side-line) }
.tb .navbar-vertical .nav-item.active > .nav-link { box-shadow: inset 3px 0 0 var(--brand) }

/* The current section is tinted gold in both modes: stock Tabler turns it blue-grey in dark. */
.tb .navbar-vertical { --tblr-navbar-active-bg: rgba(217, 180, 81, .14) }

/* Every other button gets an edge that can be found, like a field: stock Tabler's is about 1.3:1. */
.tb .btn { --tblr-btn-border-color: var(--line-strong) }
.tb .btn-icon .badge-notification { position: absolute; top: .3rem; right: .3rem }

/* Progress bars and status dots use the same green, amber and red as the badges. */
.tb .progress-bar.bg-green { background-color: var(--ok) !important }
.tb .progress-bar.bg-yellow { background-color: var(--warn) !important }
.tb .progress-bar.bg-red { background-color: var(--bad) !important }
.tb .status-dot.status-green { --tblr-status-color: var(--ok) }
.tb .status-dot.status-yellow { --tblr-status-color: var(--warn) }
.tb .status-dot.status-red { --tblr-status-color: var(--bad) }
.tb .status-dot.status-azure { --tblr-status-color: var(--info) }

/* A keyboard hint inside a field reads as a hint, not as text typed in. */
.tb .input-icon kbd { background: var(--subtle); color: var(--ink-3); border: 1px solid var(--line); font-size: .7rem }
/* The hint is wider than an icon: it stands clear of the field's edge, and what's typed stops short of it. */
.tb .input-icon-addon:has(kbd) { padding-inline-end: .625rem }
.tb .input-icon:has(kbd) .form-control { padding-inline-end: 4.5rem }

/* A badge beside a page's title is badge-sized, not heading-sized, and stands clear of the words. */
.tb .page-title .badge { font-size: .75rem; margin-inline-start: .625rem }
.tb .page-header .page-pretitle { margin-bottom: .25rem }

/* Gold is the one strong action. It needs an edge to hold its shape on white. */
.tb .btn-primary { border-color: var(--brand-edge) }

/* Soft badges: stock text colours fail contrast (2:1 to 4:1), and Tabler marks them important,
   so the hue is changed where Tabler reads it. Every pair here is 5:1 or better. */
.tb .badge.bg-green-lt { --tblr-green: var(--ok) }
.tb .badge.bg-yellow-lt { --tblr-yellow: var(--warn) }
.tb .badge.bg-red-lt { --tblr-red: var(--bad) }
.tb .badge.bg-azure-lt { --tblr-azure: var(--info) }
.tb .badge.bg-secondary-lt { --tblr-secondary: var(--quiet) }

/* A count pill ("3 waiting for you"): figures that line up, and it never squeezes the words beside it. */
.tb .tb-waiting { font-variant-numeric: tabular-nums; flex-shrink: 0 }

/* Notices keep their tint but carry body-colour text. */
.tb .alert { --tblr-alert-color: var(--ink) }

/* Controls: an edge of at least 3:1 so a field can be found without its label. */
.tb .form-control, .tb .form-select, .tb .form-check-input, .tb .form-selectgroup-label { border-color: var(--line-strong) }

/* Gold on white is too faint to read as "on", and gold is kept for the one action. Switches,
   chosen options and the current tab use the text colour: charcoal in light, off-white in dark. */
.tb .form-check-input:checked { background-color: var(--chosen); border-color: var(--chosen); --tblr-form-switch-checked-color: var(--on-chosen) }
.tb .form-selectgroup-input:checked + .form-selectgroup-label { color: var(--ink); background: var(--subtle); border-color: var(--chosen); box-shadow: inset 0 0 0 1px var(--chosen) }
.tb .form-selectgroup-input:focus + .form-selectgroup-label { color: var(--ink); border-color: var(--chosen) }
.tb .nav-tabs .nav-link.active { border-bottom-color: var(--chosen) }

/* Links in running text are underlined: colour alone doesn't mark them. */
.tb a.tb-link { color: inherit; text-decoration: underline; text-underline-offset: 2px }

/* The logo's lettering is white, so it only ever sits on the charcoal ground, in both modes.
   Matches the ground whether it's inside .tb or is the .tb element itself (the sign-in page). */
.tb .tb-dark-ground, .tb.tb-dark-ground { background: var(--side); color: var(--side-ink-2) }
.tb .tb-dark-ground a.tb-link, .tb.tb-dark-ground a.tb-link { color: var(--side-ink) }
.tb .tb-dark-ground .card, .tb.tb-dark-ground .card { color: var(--ink) }
.tb .tb-dark-ground .card a.tb-link, .tb.tb-dark-ground .card a.tb-link { color: inherit }
/* Errors beside a field read at AA in both modes. */
.tb { --tblr-form-invalid-color: var(--bad); --tblr-form-invalid-border-color: var(--bad) }
.tb .form-control.is-invalid { border-color: var(--bad) }
.tb .invalid-feedback { color: var(--bad) }
/* The cover behind a code prompt or a confirmation, and the box on it. */
.tb .tb-scrim { position: fixed; inset: 0; background: var(--scrim); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 1050 }
.tb .tb-dialog { width: 480px; max-width: 100% }
/* A notice of what was just done, with its Undo, at the foot of the page. */
.tb .tb-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1040 }
/* A long email address in a list is cut short with dots, so one row can't push the others off the side. The whole of it is in its title. */
.tb .tb-clip { max-width: 15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
/* Lets the text beside an avatar wrap inside its box instead of widening it. */
.tb .tb-shrink { min-width: 0 }
/* "No connection", across the top of the page while the device is offline. */
.tb .tb-offline { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1060; margin: 0 }
/* A search box that takes the room its row has left. */
.tb .tb-grow { flex: 1 1 220px; width: auto }
/* The group's logo at the top of the sidebar. Its lettering is white, so it's only ever here, on charcoal. */
.tb .navbar-vertical .navbar-brand { padding: 18px 8px 10px; justify-content: flex-start }
.tb .tb-logo { width: 172px; height: auto; display: block }
/* The same logo above the card on the pages in front of sign-in, and in the strip across a phone's screen. Both grounds are charcoal. */
.tb .tb-logo-front { width: 260px; max-width: 100%; height: auto }
.tb .tb-logo-phone { width: 124px; height: auto; display: block }
/* Every box a code is typed into: large, well-spaced figures that line up, centred, the same on
   every page. Letter spacing leaves a gap after the last figure too, so the text is pushed in by
   the same amount to keep the figures truly central. A recovery code is longer and has letters,
   so tb-code-long keeps the size readable while fitting it on a phone. */
.tb .tb-code { font-size: 1.625rem; line-height: 2.25rem; font-weight: 500; letter-spacing: .3em; text-indent: .3em; font-variant-numeric: tabular-nums; text-align: center; min-height: 56px; padding-top: .5rem; padding-bottom: .5rem }
.tb .tb-code.tb-code-long { font-family: var(--tblr-font-monospace, ui-monospace, monospace); font-size: 1.375rem; letter-spacing: .12em; text-indent: .12em }
/* A front-door page on a phone: the logo strip, the content, and the one action at the bottom
   within thumb's reach. Text is a size up from the desk, and the button is a full finger tall. */
.tb.tb-phone { font-size: 1rem; line-height: 1.5rem }
.tb .tb-phone-screen { min-height: 100vh; min-height: 100dvh }
.tb .tb-tall { min-height: 56px }
/* A QR code is black on white in both modes: that's what a phone's camera reads best. */
.tb .tb-qr { background: #FFFFFF; color: #000000; border-radius: 6px; display: block }
/* Something to copy by eye, such as a key to type, in the full text colour inside quieter text. */
.tb .tb-ink { color: var(--ink) }
/* The label column of a short box of facts ("Device", "When"), so the values line up. */
.tb .tb-fact { width: 72px; flex-shrink: 0 }
/* The top bar's search box: a fixed width on a desk, the room there is on a narrow screen. */
.tb .tb-search { width: 22rem; max-width: 40vw }
/* The lines that drop under a search box as someone types (search.js): a panel as wide as the box
   at a desk and as the screen on a phone, grouped under quiet heads; the line chosen with the keys
   is picked out as a chosen option is, and each line is a full finger tall on a phone. */
.tb .tb-search, .tb .tb-search-page { position: relative }
.tb .tb-suggest { position: absolute; top: 100%; left: 0; right: 0; z-index: 1035; margin-top: 4px; max-height: 70vh; overflow-y: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 4px 0; box-shadow: var(--tblr-box-shadow-dropdown) }
.tb .tb-suggest-head { padding: 8px 12px 2px; font-size: 12px; font-weight: 600; color: var(--ink-3) }
.tb .tb-suggest-option { display: flex; flex-direction: column; justify-content: center; min-height: 44px; padding: 4px 12px; color: var(--ink); text-decoration: none }
.tb .tb-suggest-option:hover, .tb .tb-suggest-option[aria-selected="true"] { background: var(--subtle); color: var(--ink) }
.tb .tb-suggest-option[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--chosen) }
.tb .tb-suggest-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.tb .tb-suggest-detail { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.tb .tb-suggest-none { padding: 10px 12px; color: var(--ink-3) }
@media (max-width: 767.98px) {
  .tb .tb-search .tb-suggest { left: auto; width: calc(100vw - 24px) }
  .tb .tb-suggest-option { min-height: 48px }
}
/* A row a person can act on, picked out while it's the one open beside the list. */
.tb .tb-picked { background: var(--subtle) }
/* A job's sections along the bottom of a phone's screen, always in view, each a full finger tall. */
.tb .tb-bottom-nav { position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--tblr-bg-surface); border-top: 1px solid var(--tblr-border-color); padding: 6px 8px 14px; z-index: 1030 }
.tb .tb-bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 48px; justify-content: center; text-decoration: none; font-size: 12px; font-weight: 500; color: var(--ink-3) }
.tb .tb-bottom-nav a[aria-current="page"] { font-weight: 600; color: var(--ink) }
.tb .tb-bottom-nav ~ .tb-phone-action, .tb .tb-phone-action { position: sticky; bottom: 76px; padding: 0 16px 10px; z-index: 1030 }
/* On a phone, a job's buttons are a full finger tall and the main one taller. */
@media (max-width: 575.98px) {
  .tb .tb-finger { min-height: 48px }
  .tb .tb-finger-main { min-height: 56px }
  .tb .page-body { scroll-padding-bottom: 140px }
}
/* A choice made by following a link rather than ticking a box: drawn as a chosen option is. */
.tb .form-selectgroup-label.tb-chosen { color: var(--ink); background: var(--subtle); border-color: var(--chosen); box-shadow: inset 0 0 0 1px var(--chosen) }
/* Figures that line up down a column. */
.tb .tb-figures { font-variant-numeric: tabular-nums }
/* At a desk the current section keeps the gold line under it that it had before the sections were
   put in Tabler's collapsing list (Tabler leaves it out inside one), so the desk is unchanged. */
@media (min-width: 992px) {
  .tb .navbar-vertical.navbar-expand-lg .navbar-collapse .nav-item.active::after { content: "" }
}
/* Below a desk's width the sidebar is one slim charcoal bar: the menu button, the logo beside it
   and the person at the right. The sections open under it as a list with their icons and count
   pills (Tabler's collapsing navbar: it pushes the page down, at once when less motion is asked
   for). With no script the list shows open and the button goes, so no section is out of reach. */
@media (max-width: 991.98px) {
  .tb .navbar-vertical.navbar-expand-lg > .container-fluid { flex-wrap: wrap; justify-content: flex-start; gap: 0 8px; padding: 4px 12px 4px 4px }
  .tb .navbar-vertical .navbar-toggler { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; color: var(--side-ink) }
  .tb .navbar-vertical .navbar-toggler:hover { background: var(--tblr-navbar-active-bg) }
  .tb .navbar-vertical .navbar-toggler:focus { box-shadow: none }
  .tb .navbar-vertical .navbar-toggler:focus-visible { outline: 2px solid var(--side-ink); outline-offset: -2px }
  .tb .navbar-vertical .navbar-brand { padding: 0; margin: 0 auto 0 0 }
  .tb .navbar-vertical .navbar-brand a { display: flex; align-items: center; min-height: 44px }
  .tb .navbar-vertical .tb-logo { width: 104px }
  .tb .tb-bar-who { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--side-ink) }
  .tb .tb-bar-words { display: flex; flex-direction: column; min-width: 0; line-height: 1.25 }
  .tb .tb-bar-role { font-size: 12px; color: var(--side-ink-2) }
  .tb .navbar-vertical .navbar-collapse { flex-basis: 100% }
  .tb .navbar-vertical .navbar-nav { padding-block: 4px }
  .tb .navbar-vertical .nav-link { min-height: 48px }
  .tb .tb-menu-more { border-top: 1px solid var(--side-line); padding: 8px 0 12px }
  .tb .tb-menu-who { padding: 4px 1.25rem 8px; color: var(--side-ink) }
  .tb .tb-menu-out { padding: 4px .5rem 0 }
  .tb .tb-menu-out .btn { min-height: 48px }
  .tb .page-wrapper { min-width: 0 }
}
/* On a phone the person in the bar is their initials alone; their name and role are still read out. */
@media (max-width: 575.98px) {
  .tb .tb-bar-words { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0 }
}
@media (max-width: 991.98px) and (scripting: none) {
  .tb .navbar-vertical .navbar-collapse.collapse { display: block }
  .tb .navbar-vertical .navbar-toggler { display: none }
  .tb .navbar-vertical.navbar-expand-lg > .container-fluid { padding-inline-start: 12px }
}
/* The dot on the menu button: something in a section is waiting. Amber, the waiting colour, ringed in
   the bar's charcoal so it stands clear of the button's lines. */
.tb .tb-waiting-dot { position: absolute; top: 8px; right: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 2px var(--side) }
