/* ==========================================================================
   Beam eWallet — design tokens

   Colors are pulled from beamlivesa.co.za's own stylesheet (the accent blue,
   the SafeRides green, and the same neutral gray scale they use), so this
   product reads as part of the Beam family rather than a different app that
   happens to share a name. Typography matches their site too: Open Sans.
   ========================================================================== */

:root {
  --beam-blue: #1e87f0;
  --beam-blue-dark: #1565c0;
  --beam-blue-light: #eaf4fe;
  --beam-green: #00a651;
  --beam-green-dark: #05893f;
  --beam-yellow: #ffcc00;
  --beam-red: #f04438;

  --gray-900: #1d2939;
  --gray-800: #26324a;
  --gray-700: #344054;
  --gray-500: #667085;
  --gray-300: #d0d5dd;
  --gray-200: #eaecf0;
  --gray-100: #f2f4f7;
  --gray-50: #f9fafb;
  --white: #ffffff;   /* text on a coloured background: buttons, chips, the gradient panels */

  /* Colours by job rather than by shade, so dark mode below can swap them. Backgrounds of
     panels, cards, inputs and the bars use --surface, never --white. */
  --surface: #ffffff;
  --blue-text: #1565c0;   /* blue as text: hovered links, the current menu item, info alerts */
  --code-bg: #1a2332;
  --code-text: #dce4f0;
  --danger-bg: #fef3f2;
  --danger-border: #fee4e2;
  --danger-text: #b42318;
  --success-bg: #e7f8ee;
  --success-border: #c8f0d9;
  --info-border: #d3e9fc;
  --warning-bg: #fff8e1;
  --warning-border: #f5e3a3;
  --warning-text: #7a5600;
  --warning-strong: #5f4300;
  --pending-text: #a15c00;

  color-scheme: light;

  --font-sans: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  /* Corners: nearly square on purpose (2026-10-15). Badges and counters get the smallest,
     controls a touch more, containers the most, so nesting still reads. */
  --radius-xs: 2px;  /* badges, counters, inline code, method chips */
  --radius-sm: 3px;  /* buttons, inputs, tabs, chips */
  --radius-md: 4px;  /* alerts, list rows, small boxes */
  --radius-lg: 6px;  /* panels, cards, the balance card */

  /* Control heights, so a button sits level with the inputs and tabs beside it. */
  --control-h: 2.5rem;      /* 40px: buttons and inputs */
  --control-h-sm: 2rem;     /* 32px: small buttons, tabs, chips */
  --control-h-lg: 2.75rem;  /* 44px: full-width form buttons, an easy tap on a phone */

  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.08);
}

/* ==========================================================================
   Dark mode. Follows the device until someone uses the theme button, which sets
   data-theme on <html> (site.js, kept in the bw_theme cookie so the next page arrives
   right). The gray scale turns over: --gray-900 is still "strongest text" and --gray-50
   still "page background", they just sit at the other end. --beam-blue-light and
   --beam-green-dark are only ever a tint and a text colour, so they change here too; the
   brand colours used as backgrounds (buttons, gradients, chips) stay as they are.
   Screen only, so a statement printed from dark mode still prints black on white.
   The two blocks hold the same values: change one, change both.
   ========================================================================== */

@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --gray-900: #e8ecf2;
    --gray-800: #d6dce5;
    --gray-700: #b3bdcb;
    --gray-500: #8d97a8;
    --gray-300: #3d4859;
    --gray-200: #2b3442;
    --gray-100: #222a36;
    --gray-50: #0f141b;
    --surface: #171d26;
    --beam-blue-light: #15304e;
    --beam-green-dark: #45c97f;
    --blue-text: #7ab6f5;
    --code-bg: #0b1017;
    --danger-bg: #3a1716;
    --danger-border: #5e2420;
    --danger-text: #fda29b;
    --success-bg: #10301f;
    --success-border: #1c4d32;
    --info-border: #1f4268;
    --warning-bg: #33280c;
    --warning-border: #5a4714;
    --warning-text: #f3d27a;
    --warning-strong: #ffe39b;
    --pending-text: #f5bf55;
    color-scheme: dark;
  }

  :root:not([data-theme="light"]) .theme-toggle__moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle__sun { display: block; }
}

@media screen {
  :root[data-theme="dark"] {
    --gray-900: #e8ecf2;
    --gray-800: #d6dce5;
    --gray-700: #b3bdcb;
    --gray-500: #8d97a8;
    --gray-300: #3d4859;
    --gray-200: #2b3442;
    --gray-100: #222a36;
    --gray-50: #0f141b;
    --surface: #171d26;
    --beam-blue-light: #15304e;
    --beam-green-dark: #45c97f;
    --blue-text: #7ab6f5;
    --code-bg: #0b1017;
    --danger-bg: #3a1716;
    --danger-border: #5e2420;
    --danger-text: #fda29b;
    --success-bg: #10301f;
    --success-border: #1c4d32;
    --info-border: #1f4268;
    --warning-bg: #33280c;
    --warning-border: #5a4714;
    --warning-text: #f3d27a;
    --warning-strong: #ffe39b;
    --pending-text: #f5bf55;
    color-scheme: dark;
  }

  :root[data-theme="dark"] .theme-toggle__moon { display: none; }
  :root[data-theme="dark"] .theme-toggle__sun { display: block; }
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--gray-900);
  background: var(--gray-50);
}

a {
  color: var(--beam-blue);
  text-decoration: none;
}

a:hover {
  color: var(--blue-text);
  text-decoration: underline;
}

/* ==========================================================================
   Brand mark — "beam" wordmark + the four-color stripe from their logo,
   built in CSS rather than shipping their raster logo, so it scales cleanly
   and can carry the "eWallet" sub-brand next to it.
   ========================================================================== */

.beam-mark {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
}

.beam-mark:hover {
  text-decoration: none;
}

.beam-mark__stripe {
  display: flex;
  height: 5px;
  width: 68px;
  border-radius: 3px;
  overflow: hidden;
}

.beam-mark__stripe span {
  flex: 1;
}

.beam-mark__stripe span:nth-child(1) { background: var(--beam-blue); }
.beam-mark__stripe span:nth-child(2) { background: var(--beam-green); }
.beam-mark__stripe span:nth-child(3) { background: var(--beam-yellow); }
.beam-mark__stripe span:nth-child(4) { background: var(--beam-red); }

.beam-mark__word {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  line-height: 1;
}

.beam-mark__word strong {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}

.beam-mark__word span {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-500);
}

.beam-mark--small .beam-mark__stripe { width: 44px; height: 4px; }
.beam-mark--small .beam-mark__word strong { font-size: 1.25rem; }
.beam-mark--small .beam-mark__word span { font-size: 0.75rem; }

.beam-mark--light .beam-mark__word strong { color: var(--white); }
.beam-mark--light .beam-mark__word span { color: rgba(255, 255, 255, 0.75); }

/* ==========================================================================
   App shell — top nav used by every page except the auth split-screen ones.
   ========================================================================== */

.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--gray-200);
}

/* The top bar: the mark, the site links straight after it, the account
   links pushed right, and the notifications bell at the far right. */
.app-header__bar {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.app-header__brand {
  flex: none;
}

/* A little larger than the in-page small mark, so the bar has a clear anchor on the left. */
.beam-mark--header .beam-mark__stripe { width: 52px; height: 4px; }
.beam-mark--header .beam-mark__word strong { font-size: 1.45rem; }
.beam-mark--header .beam-mark__word span { font-size: 0.8rem; }

.app-header__menu {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  order: 1;
}

.app-nav {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-nav li {
  display: flex;
  align-items: center;
}

.app-nav li form {
  display: flex;
  margin: 0;
}

/* Links and the Sign out button look the same: one label, no box. */
.app-nav__link {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  min-height: var(--control-h);
  padding: 0 0.55rem;
  border: 0;
  background: none;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-800);
  white-space: nowrap;
  cursor: pointer;
}

.app-nav__link:hover {
  color: var(--beam-blue);
  text-decoration: none;
}

.app-nav__link.is-current {
  color: var(--beam-blue);
}

.app-nav__link:focus-visible,
.app-header__icon:focus-visible {
  outline: 2px solid var(--beam-blue);
  outline-offset: 2px;
}

/* The theme button and the bell, side by side at the far right of the bar. */
.app-header__tools {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  order: 2;
}

/* The bell (_NotificationsIcon) and the theme button (_ThemeToggle): a square button the
   same height as the controls; the bell's unread count hangs off its top right corner. */
.app-header__icon {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--control-h);
  height: var(--control-h);
  box-sizing: border-box;
  padding: 0;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--gray-700);
}

.theme-toggle {
  cursor: pointer;
}

/* The moon while the page is light (click for dark), the sun while it's dark. The dark
   mode blocks at the top swap them. */
.theme-toggle__sun {
  display: none;
}

/* Pages without a top bar (sign-in, registration, the home page): the button sits in the
   top right corner of the window. */
.theme-corner {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10;
}

.app-header__icon:hover {
  border-color: var(--beam-blue);
  color: var(--beam-blue);
  text-decoration: none;
}

.app-header__icon svg {
  width: 19px;
  height: 19px;
}

/* The ring is the bar's own colour, so the count sits on top of the button's border
   rather than running into it. */
.app-header__count {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  box-sizing: border-box;
  border-radius: var(--radius-xs);
  background: var(--beam-red);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
}

/* Above the phone breakpoint the links run as a row with a small dot between neighbours
   in the same list, so "Home Wallet Privacy" reads as three links rather than a phrase.
   A drawn dot rather than a middot character, which sits at a different height in every
   font. */
@media (min-width: 861px) {
  .app-nav li + li .app-nav__link::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-right: 0.55rem;
    border-radius: 50%;
    background: var(--gray-300);
  }
}

/* Hamburger toggle: hidden on desktop, replaces the inline nav on narrow screens.
   site.js flips .nav-open on .app-header (and aria-expanded on the button). */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: var(--control-h);
  height: var(--control-h);
  padding: 0 9px;
  box-sizing: border-box;
  background: transparent;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--gray-700);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (prefers-reduced-motion: reduce) {
  .nav-toggle span { transition: none; }
}

@media (max-width: 860px) {
  /* The bar wraps: mark, theme button, bell and menu button stay on the first row; the
     links and the account links become full-width rows below it while the menu is open. */
  .app-header__bar {
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
  }

  .nav-toggle {
    display: inline-flex;
    order: 1;
  }

  /* The theme button and bell sit right beside the menu button, pushed over by the auto
     margin. */
  .app-header__tools {
    order: 0;
    margin-left: auto;
  }

  .app-header__menu {
    display: none;
    order: 2;
    width: 100%;
    flex-basis: 100%;
  }

  .nav-open .app-header__menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid var(--gray-200);
  }

  .app-header__menu nav,
  .app-nav,
  .app-nav li,
  .app-nav li form {
    display: block;
    width: 100%;
  }

  /* Full-width rows with hairlines between them, so each is an easy, separate tap. */
  .app-nav__link {
    width: 100%;
    min-height: 3rem;
    padding: 0 0.25rem;
    font-size: 1rem;
    text-align: left;
  }

  .app-nav li + li,
  .app-nav--account {
    border-top: 1px solid var(--gray-100);
  }
}

.app-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.app-footer {
  border-top: 1px solid var(--gray-200);
  color: var(--gray-500);
  font-size: 0.85rem;
}

.app-footer__bar {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* ==========================================================================
   Buttons & form controls
   ========================================================================== */

.btn {
  /* This stylesheet has no global border-box rule, so anything sized width:100% must
     opt in itself or its padding+border land OUTSIDE that width — .btn-block buttons
     were ~42px wider than their container, which desktop's wide panels absorbed but
     which gave every phone-width screen a horizontal scrollbar (found live on UAT's
     homepage). Same reason .field input declares border-box further down. */
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--control-h);
  padding: 0.45rem 1.1rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--beam-blue);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--beam-blue);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--beam-blue-dark);
  color: var(--white);
}

.btn-block {
  width: 100%;
  min-height: var(--control-h-lg);
  font-size: 0.95rem;
}

.btn-ghost {
  background: transparent;
  color: var(--gray-700);
  border-color: var(--gray-300);
}

.btn-ghost:hover {
  background: var(--gray-50);
  color: var(--gray-900);
  text-decoration: none;
}

.btn-small {
  min-height: var(--control-h-sm);
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
}

/* A pager arrow with nowhere to go: rendered as a span rather than a link, so it needs
   the flat look a real disabled button would get from the attribute. */
.btn.is-disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.field {
  margin-bottom: 1.15rem;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gray-700);
  margin-bottom: 0.4rem;
}

.field .field-hint {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 0.35rem;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="url"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="password"],
.field input[type="date"],
.field select,
.field textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: var(--control-h);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.25;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--gray-900);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  resize: vertical;
  min-height: 4.5rem;
}

/* A group heading inside a long form (the business registration form). */
.form-section {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin: 1.5rem 0 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

.form-section:first-of-type {
  margin-top: 0.5rem;
  padding-top: 0;
  border-top: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--beam-blue);
  box-shadow: 0 0 0 3px var(--beam-blue-light);
}

.field .input-validation-error {
  border-color: var(--beam-red);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--gray-700);
  margin-bottom: 1.25rem;
}

.field-check input {
  margin-top: 0.2rem;
}

.text-danger,
.validation-summary-errors {
  color: var(--beam-red);
  font-size: 0.85rem;
}

.validation-summary-errors ul {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
}

.alert {
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.alert-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

.alert-success {
  background: var(--success-bg);
  color: var(--beam-green-dark);
  border: 1px solid var(--success-border);
}

.alert-info {
  background: var(--beam-blue-light);
  color: var(--blue-text);
  border: 1px solid var(--info-border);
}

.page-narrow {
  max-width: 480px;
  margin: 0 auto;
}

/* ==========================================================================
   Auth split-screen (Login / Register)
   ========================================================================== */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.auth-shell__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem;
  color: var(--white);
  background: linear-gradient(155deg, #0f6fd6 0%, #1e87f0 45%, #00a651 100%);
  overflow: hidden;
}

.auth-shell__panel::before,
.auth-shell__panel::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.auth-shell__panel::before {
  width: 420px;
  height: 420px;
  right: -140px;
  top: -160px;
}

.auth-shell__panel::after {
  width: 280px;
  height: 280px;
  left: -100px;
  bottom: -80px;
  background: rgba(255, 255, 255, 0.06);
}

.auth-shell__panel-content {
  position: relative;
  z-index: 1;
}

.auth-shell__tagline {
  margin-top: 2.5rem;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.3;
  max-width: 26ch;
}

.auth-shell__features {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.auth-shell__features li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.auth-shell__features li::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 8.5l3 3 7-7' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.auth-shell__footnote {
  position: relative;
  z-index: 1;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
}

.auth-shell__form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background: var(--surface);
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-card__mark {
  display: none;
  margin-bottom: 2rem;
}

.auth-card h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gray-900);
  margin: 0 0 0.4rem;
}

.auth-card__subtitle {
  color: var(--gray-500);
  font-size: 0.95rem;
  margin: 0 0 2rem;
}

.auth-card__switch {
  margin-top: 1.75rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--gray-700);
}

.auth-card__switch a {
  font-weight: 700;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
  color: var(--gray-500);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-shell__panel {
    display: none;
  }

  .auth-card__mark {
    display: inline-flex;
  }
}

/* ==========================================================================
   Landing page
   ========================================================================== */

.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
}

.hero p {
  color: var(--gray-500);
  font-size: 1.05rem;
  max-width: 46ch;
  margin: 0 auto 2rem;
}

.hero__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* The homepage shares the auth split-screen shell; these are its right-card extras.
   (.hero above stays: Account/AccessDenied still uses it.) */

/* The "this is an early POC" warning on the homepage card: amber so it reads as a
   caution rather than blending into the marketing copy around it. */
.poc-notice {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--warning-text);
  margin: 0 0 1.5rem;
}

.poc-notice strong {
  color: var(--warning-strong);
}

.landing-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.landing-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.landing-list h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 0.15rem;
}

.landing-list p {
  font-size: 0.875rem;
  color: var(--gray-500);
  line-height: 1.5;
  margin: 0;
}

/* ==========================================================================
   Wallet dashboard
   ========================================================================== */

.wallet-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 1.5rem;
  align-items: start;
}

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

.balance-card {
  background: linear-gradient(135deg, #0f6fd6 0%, #1e87f0 55%, #00a651 130%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
}

.balance-card__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.balance-card__amount {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.balance-card__hint {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
}

.balance-card__meta {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.panel + .panel {
  margin-top: 1.5rem;
}

.panel h2 {
  font-size: 1.05rem;
  color: var(--gray-900);
  margin: 0 0 0.4rem;
}

.panel__hint {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin: 0 0 1.25rem;
}

.ledger-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.ledger-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.ledger-row:last-child {
  border-bottom: none;
}

.ledger-row__icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex: none;
}

.ledger-row__icon--credit {
  background: var(--success-bg);
  color: var(--beam-green-dark);
}

.ledger-row__icon--debit {
  background: var(--gray-100);
  color: var(--gray-700);
}

.ledger-row__details {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.ledger-row__type {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-900);
}

.ledger-row__description {
  font-size: 0.8rem;
  color: var(--gray-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-row__date {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.ledger-row__amount {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

.ledger-row__amount--credit {
  color: var(--beam-green-dark);
}

.ledger-row__amount--debit {
  color: var(--gray-900);
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.badge--completed {
  background: var(--success-bg);
  color: var(--beam-green-dark);
}

.badge--pending {
  background: var(--warning-bg);
  color: var(--pending-text);
}

.badge--reversed {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.badge--cancelled,
.badge--expired {
  background: var(--gray-100);
  color: var(--gray-700);
}

.badge--failed,
.badge--declined {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1rem;
  margin-top: 0.25rem;
  border-top: 1px solid var(--gray-100);
}

.pager__count {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.pager__controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pager__position {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-700);
  white-space: nowrap;
}

/* ==========================================================================
   Row lists: funds on hold, money requests, recipients, withdrawals
   ========================================================================== */

.hold-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.hold-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.85rem;
}

.hold-row:last-child {
  border-bottom: none;
}

.hold-row__amount {
  font-weight: 700;
  color: var(--gray-900);
}

.hold-row__note,
.hold-row__date {
  color: var(--gray-500);
}

.hold-row__action {
  margin-left: auto;
}

.hold-row__action + .hold-row__action {
  margin-left: 0.5rem;
}

.hold-row__action .btn,
.hold-row__action.btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}

.hold-row__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hold-row__actions .hold-row__action {
  margin-left: 0;
}

/* ==========================================================================
   Data tables (partner portal; anywhere the main shell needs a plain table)
   ========================================================================== */

.data-table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}

.data-table td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: top;
}

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

.data-table tr:hover td {
  background: var(--gray-50);
}

/* ==========================================================================
   Partner API documentation pages (Areas/Partner/Views/Docs)
   ========================================================================== */

.docs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.docs-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-h-sm);
  box-sizing: border-box;
  padding: 0 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  background: var(--gray-100);
  text-decoration: none;
}

.docs-nav a:hover {
  background: var(--gray-200);
  text-decoration: none;
}

.docs-nav a.active {
  background: var(--beam-blue);
  color: var(--white);
}

.docs-code {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  overflow-x: auto;
  font-family: "Consolas", "Menlo", ui-monospace, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  margin: 0 0 1rem;
}

.docs-code code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
}

.panel code,
.data-table code {
  font-family: "Consolas", "Menlo", ui-monospace, monospace;
  font-size: 0.85em;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xs);
  padding: 0.08em 0.35em;
}

/* The inline-code pill above must never reach code inside a dark sample block: it ties
   with .docs-code code on specificity and sits later in the file, so without this
   higher-specificity reset every line of a .docs-code block renders as a light pill
   with light text (caught live on the docs pages). */
.panel pre code,
pre.docs-code code {
  font-size: inherit;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: inherit;
}

.method-chip {
  display: inline-block;
  font-family: "Consolas", "Menlo", ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--white);
  border-radius: var(--radius-xs);
  padding: 0.15rem 0.5rem;
  margin-right: 0.45rem;
  vertical-align: middle;
}

.method-chip--get {
  background: var(--beam-blue-dark);
}

.method-chip--post {
  background: var(--beam-green);
}

/* A fixed slate rather than a gray token: white text on it in both themes. */
.method-chip--put {
  background: #344054;
}

.docs-endpoint-route {
  font-family: "Consolas", "Menlo", ui-monospace, monospace;
  font-size: 0.92rem;
  font-weight: 600;
}

.docs-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  padding: 0;
  margin: 0 0 0.5rem;
  list-style: none;
  font-size: 0.85rem;
}

/* ---------------------------------------------------------------- wallet pages */

/* Wallet pages: the wallet's menu (_WalletMenu) down the left, and the page beside it. */
.app-main--side {
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.app-main__content {
  min-width: 0;
}

.side-menu {
  position: sticky;
  top: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
}

.side-menu__list {
  position: relative; /* site.js measures the current link's offsetLeft against the list */
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.side-menu__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 2.6rem;
  box-sizing: border-box;
  padding: 0 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--gray-800);
  white-space: nowrap;
}

.side-menu__link:hover {
  background: var(--gray-50);
  color: var(--blue-text);
  text-decoration: none;
}

.side-menu__link:focus-visible {
  outline: 2px solid var(--beam-blue);
  outline-offset: -2px;
}

.side-menu__link.is-current {
  background: var(--beam-blue-light);
  color: var(--blue-text);
}

/* My profile sits apart at the bottom. */
.side-menu__divided {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--gray-200);
}

/* No room for a column: the same list becomes a row above the page that scrolls sideways,
   with a soft fade on the side that has more links (classes set by site.js). */
@media (max-width: 900px) {
  .app-main--side {
    display: block;
  }

  .side-menu {
    position: static;
    margin-bottom: 1.25rem;
    padding: 0.35rem;
  }

  .side-menu__list {
    flex-direction: row;
    gap: 0.2rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .side-menu__list::-webkit-scrollbar {
    display: none;
  }

  .side-menu__list li {
    flex: none;
  }

  .side-menu__link {
    min-height: 2.25rem;
    padding: 0 0.7rem;
    font-size: 0.85rem;
  }

  .side-menu__divided {
    margin: 0 0 0 0.35rem;
    padding: 0 0 0 0.35rem;
    border-top: 0;
    border-left: 1px solid var(--gray-200);
  }

  .side-menu__list.more-right {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
  }

  .side-menu__list.more-left {
    -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 2.5rem), transparent);
    mask-image: linear-gradient(to left, #000 calc(100% - 2.5rem), transparent);
  }

  .side-menu__list.more-left.more-right {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent);
    mask-image: linear-gradient(to right, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent);
  }
}

/* FRS 5.5: which of the account's wallets the pages below are showing. */
.wallet-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.wallet-switcher form {
  margin: 0;
}

.wallet-switcher__label {
  margin-right: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.wallet-switcher__option {
  min-height: var(--control-h-sm);
  padding: 0 0.8rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--gray-700);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.wallet-switcher__option:hover {
  border-color: var(--beam-blue);
  color: var(--blue-text);
}

.wallet-switcher__option.active {
  border-color: var(--beam-blue);
  background: var(--beam-blue-light);
  color: var(--blue-text);
}

.wallet-switcher__option:focus-visible {
  outline: 2px solid var(--beam-blue);
  outline-offset: 2px;
}

.wallet-list {
  display: grid;
  gap: 0.75rem;
}

.wallet-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
}

.wallet-list__item.is-current {
  border-color: var(--beam-blue);
  background: var(--beam-blue-light);
}

.wallet-list__name {
  font-weight: 700;
  color: var(--gray-900);
}

.wallet-list__meta {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.wallet-list__balance {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.wallet-list__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.wallet-list__actions form {
  margin: 0;
}

.wallet-list__actions summary {
  list-style: none;
}

.wallet-list__actions summary::-webkit-details-marker {
  display: none;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.inline-form input[type="text"] {
  min-width: 0;
  flex: 1 1 10rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.balance-card__split {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.balance-card__split dt {
  font-size: 0.72rem;
  opacity: 0.8;
}

.balance-card__split dd {
  margin: 0.1rem 0 0;
  font-weight: 700;
  font-size: 0.95rem;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.action-grid .btn {
  padding-inline: 0.5rem;
  text-align: center;
}

/* Two to a row on a phone: a little smaller, so "Schedule a payment" fits on one line. */
@media (max-width: 480px) {
  .action-grid .btn {
    padding-inline: 0.35rem;
    font-size: 0.8rem;
  }
}

.nav-count {
  display: inline-block;
  min-width: 1.25rem;
  margin-left: 0.35rem;
  padding: 0 0.35rem;
  border-radius: var(--radius-xs);
  background: var(--beam-red);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.25rem;
  text-align: center;
}

.notification-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notification {
  display: flex;
  gap: 0.75rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.notification:last-child {
  border-bottom: none;
}

.notification__dot {
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: transparent;
}

.notification--unread .notification__dot {
  background: var(--beam-blue);
}

.notification__body {
  flex: 1;
  min-width: 0;
}

.notification__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-900);
}

.notification--unread .notification__title {
  font-weight: 700;
}

.notification__text {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--gray-700);
  overflow-wrap: anywhere;
}

.notification__meta {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--gray-500);
}

.withdrawal-row__hint {
  flex-basis: 100%;
  color: var(--gray-500);
  font-size: 0.8rem;
}

.withdrawal-row__hint strong {
  color: var(--gray-700);
  font-weight: 600;
}

a.ledger-row__type {
  color: inherit;
  text-decoration: none;
}

a.ledger-row__type:hover {
  color: var(--beam-blue);
  text-decoration: underline;
}

.filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0 1rem;
  align-items: end;
}

.filter-form__actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.15rem;
}

.detail-list {
  display: grid;
  grid-template-columns: minmax(110px, auto) 1fr;
  gap: 0.55rem 1rem;
  margin: 1.25rem 0;
  font-size: 0.92rem;
}

.detail-list dt {
  color: var(--gray-500);
  font-weight: 600;
}

.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.detail-list__mono {
  font-family: "Consolas", "Menlo", ui-monospace, monospace;
  font-size: 0.85em;
}

.receipt__label {
  margin: 0;
  color: var(--gray-500);
  font-weight: 600;
}

.receipt__amount {
  margin: 0.2rem 0 0.6rem;
  font-size: 2rem;
  font-weight: 800;
}

.receipt__amount--credit {
  color: var(--beam-green);
}

.receipt__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}

.stat-grid > div {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.9rem;
}

.stat-grid dt {
  font-size: 0.75rem;
  color: var(--gray-500);
  font-weight: 600;
}

.stat-grid dd {
  margin: 0.15rem 0 0;
  font-weight: 700;
}

.statement__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.statement__who {
  text-align: right;
  font-size: 0.9rem;
}

.data-table th.num,
.data-table td.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.choice-chip {
  min-height: var(--control-h-sm);
  border: 1px solid var(--gray-300);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0 0.75rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
}

.choice-chip:hover {
  border-color: var(--beam-blue);
  color: var(--beam-blue);
}

.qr-box {
  text-align: center;
}

.qr-box__code svg {
  width: min(260px, 100%);
  height: auto;
}

.qr-box__amount {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0.5rem 0 0;
}

.qr-box__text {
  font-family: "Consolas", "Menlo", ui-monospace, monospace;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  font-weight: 700;
}

@media (max-width: 560px) {
  .balance-card__split {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .balance-card__split > div {
    display: flex;
    justify-content: space-between;
  }

  .statement__who {
    text-align: left;
  }
}

/* The photos a customer uploaded for identity verification (Profile): one line each, the
   Remove button on the same line. */
.identity-files {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  font-size: 0.9rem;
}

.identity-files li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.identity-files__remove {
  display: inline;
  margin: 0 0 0 auto;
}

@media print {
  .app-header,
  .app-footer,
  .no-print,
  .side-menu,
  .receipt__actions,
  .alert {
    display: none !important;
  }

  body {
    background: #fff !important;
  }

  /* The statement prints full width, not beside an empty menu column. */
  .app-main--side {
    display: block;
  }

  .panel {
    border: none;
    box-shadow: none;
    padding: 0;
  }
}

/* Scanning a QR code on "Pay a code" (wwwroot/js/qr-scan.js): the camera picture, square and
   centred on what the camera sees, with a frame to aim at. */
.qr-scan {
  margin-bottom: 1rem;
}

.qr-scan__view {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

/* The script shows and hides parts with the hidden attribute; a display rule above would
   otherwise win over it. */
.qr-scan [hidden] {
  display: none;
}

.qr-scan__video {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: inset 0 0 0 2px var(--info-border);
}

.qr-scan__message {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--gray-700);
}

.qr-scan__or {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* A business's sales report (Views/Shared/_SalesReport.cshtml). */
.sales-report__heading {
  margin: 1.5rem 0 0.5rem;
  font-size: 1rem;
}

.sales-report__split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0 1.5rem;
}

.sales-report__sub {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-500);
}

.sales-report .nowrap {
  white-space: nowrap;
}

/* Six figures fit one row on a laptop and two a row on a phone. */
.sales-report .stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

/* A dispute's history on the customer's transaction page (FRS 18). */
.dispute-log {
  list-style: none;
  margin: 0.75rem 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.dispute-log li {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.dispute-log li.dispute-log__mine {
  border-color: var(--info-border);
}

.dispute-log__who {
  display: block;
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 0.2rem;
}

/* Wallet / Admin switch for staff (2026-11-12), in both top bars: two halves of one control,
   the side you're on filled in. */
.mode-switch {
  display: inline-flex;
  flex: none;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}

.mode-switch__option {
  display: inline-flex;
  align-items: center;
  height: var(--control-h-sm);
  padding: 0 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  text-decoration: none;
  white-space: nowrap;
}

.mode-switch__option + .mode-switch__option {
  border-left: 1px solid var(--gray-300);
}

.mode-switch__option:hover {
  color: var(--blue-text);
  background: var(--gray-50);
  text-decoration: none;
}

.mode-switch__option.is-current {
  background: var(--beam-blue);
  color: var(--white);
}

/* On a phone the switch leaves the bar (it would push the buttons onto a second line) and an
   "Admin portal" link in the menu takes its place. */
.app-nav .app-nav__mode {
  display: none;
}

@media (max-width: 520px) {
  .app-header__tools .mode-switch {
    display: none;
  }

  .app-nav .app-nav__mode {
    display: flex;
  }
}
