/* Shared items for every page (docs/superpowers/specs/2026-10-12-layout-foundation-design.md): status colours, the
   page header, tags, modals, the loading spinner, data tables, table buttons and dropdowns, filter bars, notices and
   empty states. Loaded by every layout, before page styles, so a page can still adjust. Builds on the --fx-* tokens
   in fitexpress-theme.css, so light and dark come for free. */

/* The hidden attribute always hides, even on elements whose class sets a display (tags, panels, notices). */
[hidden] {
  display: none !important;
}

/* Text for screen readers only (e.g. a checkbox's label in a table with an "Include" heading). */
.fx-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- status colours ---------- */
:root {
  --fx-tx-pos: #1e8e5a;
  --fx-tx-neg: #d23b4a;
  --fx-tx-warn: #b7791f;
}
html[data-theme="dark"] {
  --fx-tx-pos: #4ccb8e;
  --fx-tx-neg: #ff6b7a;
  --fx-tx-warn: #e2b04a;
}

/* ---------- page header (<x-page-header>): gradient band, particle field, title, subtitle pill, totals tiles ---------- */
.fx-tx-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #12213a 0%, #1f557e 55%, #3e8ed0 100%);
  color: #ffffff;
  border-bottom: 1px solid var(--fx-line);
}
html[data-theme="dark"] .fx-tx-hero {
  background: linear-gradient(135deg, #070a10 0%, #0f2236 55%, #1c4a72 100%);
}
.fx-tx-hero .fx-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.fx-tx-hero .fx-particles canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.fx-tx-hero .hero-body {
  position: relative;
  z-index: 1;
  padding: 1.1rem 1.25rem 1.2rem;
}
.fx-tx-hero .fx-tx-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  margin-bottom: 0.85rem;
}
.fx-tx-hero .fx-tx-heading .title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}
.fx-tx-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.95rem;
  line-height: 1;
}
.fx-tx-hero .fx-tx-heading .subtitle {
  margin: 0;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85) !important;
}
.fx-tx-totals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
@media screen and (min-width: 700px) {
  .fx-tx-totals { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media screen and (min-width: 1400px) {
  .fx-tx-totals { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
.fx-tx-total {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--fx-radius);
  padding: 0.5rem 0.7rem;
  min-width: 0;
  backdrop-filter: blur(6px);
}
.fx-tx-total__label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fx-tx-total__value {
  display: block;
  font-size: clamp(0.95rem, 1.05vw, 1.2rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  white-space: nowrap;
}
.fx-tx-total.is-negative .fx-tx-total__value { color: #ff8a95; }
.fx-tx-total.is-positive .fx-tx-total__value { color: #7fe0b0; }

/* Three tiles (accounts): one row from tablet up, and they never stretch across the whole band. */
@media screen and (min-width: 700px) {
  .fx-tx-totals--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 720px;
  }
}
/* Narrow pages (<x-page-header class="is-narrow">): the header's contents sit in the same centred 1100px column
   as the page body below; the band itself stays full width. */
.fx-tx-hero.is-narrow .hero-body {
  width: 100%;
  max-width: calc(1100px + 2.5rem);
  margin: 0 auto;
}
/* Wider forms (older edit pages laid out in Bulma's .container): the header's contents follow Bulma's container
   widths (960 / 1152 / 1344px) so they line up with the form below.
   <x-page-header class="is-narrow is-wide"> with <section class="section fx-page-narrow is-wide"><div class="container"> */
.fx-page-narrow.is-wide > .container {
  max-width: none;
}
@media screen and (min-width: 1024px) {
  .fx-tx-hero.is-narrow.is-wide .hero-body { max-width: calc(960px + 2.5rem); }
}
@media screen and (min-width: 1216px) {
  .fx-tx-hero.is-narrow.is-wide .hero-body { max-width: calc(1152px + 2.5rem); }
}
@media screen and (min-width: 1408px) {
  .fx-tx-hero.is-narrow.is-wide .hero-body { max-width: calc(1344px + 2.5rem); }
}

/* Buttons in the header's slot (refresh, links to related tables): one wrapping row under the title. */
.fx-tx-hero .fx-header-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.fx-tx-hero .fx-header-actions form {
  margin: 0;
}
.fx-tx-hero .fx-header-actions .button.is-light {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.fx-tx-hero .fx-header-actions .button.is-light:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* A tile can be a link (e.g. a count that opens the filtered list). */
a.fx-tx-total {
  display: block;
  color: #ffffff;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
a.fx-tx-total:hover,
a.fx-tx-total:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

/* ---------- tags: small pills for statuses (fx-tag--pos / neg / info / warn / muted; --dot adds a dot) ---------- */
/* Squared corners (were pills): a pill's round ends looked indented under a label or beside text in a list. */
.fx-tag {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.fx-tag--neg { background: color-mix(in srgb, var(--fx-tx-neg) 14%, transparent); color: var(--fx-tx-neg); }
.fx-tag--pos { background: color-mix(in srgb, var(--fx-tx-pos) 14%, transparent); color: var(--fx-tx-pos); }
.fx-tag--info { background: color-mix(in srgb, var(--fx-link) 14%, transparent); color: var(--fx-link); }
/* Course status tags beyond the three the transactions list uses. */
.fx-tag--warn { background: color-mix(in srgb, var(--fx-tx-warn) 18%, transparent); color: var(--fx-tx-warn); }
.fx-tag--muted { background: color-mix(in srgb, var(--fx-text-muted) 14%, transparent); color: var(--fx-text-muted); }
.fx-tag--dot {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}
.fx-tag--dot::before {
  content: "";
  width: 0.45em;
  height: 0.45em;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

/* ---------- modals ---------- */
.fx-modal .modal-background {
  background: rgba(26, 43, 74, 0.45);
}
.fx-modal-card {
  width: 100%;
  max-width: 34rem;
  border: 1px solid var(--fx-line);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.14);
  overflow: hidden;
}
.fx-modal-head {
  padding: 1rem 1.15rem;
  border-bottom: 0;
  border-radius: 0;
  background: linear-gradient(135deg, #3082c5 0%, #3e8ed0 55%, #5ba8da 100%);
}
.fx-modal-head .modal-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
}
.fx-modal-head .modal-card-title .icon {
  color: #fff;
}
.fx-modal-head .delete {
  background-color: rgba(255, 255, 255, 0.25);
}
.fx-modal-head .delete:hover,
.fx-modal-head .delete:focus {
  background-color: rgba(255, 255, 255, 0.4);
}
.fx-modal-body {
  padding: 1.25rem 1.15rem 1rem;
  background: var(--fx-surface);
  color: var(--fx-text);
}
.fx-modal-body .label {
  margin-bottom: 0.35rem;
  color: #1a2b4a;
  font-weight: 600;
}
.fx-modal-body .help {
  margin-top: 0.5rem;
  color: #64748b;
  line-height: 1.45;
}
.fx-modal-foot {
  padding: 0.85rem 1.15rem;
  border-top: 1px solid #eef2f7;
  border-radius: 0;
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}
.fx-modal-foot .button.is-info {
  font-weight: 600;
}
html[data-theme="dark"] .fx-modal-body .label {
  color: var(--fx-text);
}
html[data-theme="dark"] .fx-modal-body .help {
  color: var(--fx-text-muted);
}
html[data-theme="dark"] .fx-modal-foot {
  background: var(--fx-surface-raised);
  border-top-color: var(--fx-line);
}
/* The account page gives its sections a bottom shadow and spacing; the modal parts must not inherit it. */
.fx-modal .modal-card-body,
.fx-modal .modal-card-foot,
.fx-modal .modal-card-head {
  margin: 0 !important;
  box-shadow: none !important;
}
.fx-modal .modal-card-body {
  border-radius: 0 !important;
}
.fx-modal .modal-card-foot {
  border-radius: 0 0 12px 12px !important;
}

/* ---------- pop-up windows: <x-modal-dialog> loaded into #modal-global ---------- */
/* The host: a dim overlay (not the old near-white one) and room for wide dialogs. */
#modal-global.fx-modal-open .modal-background {
  background: rgba(15, 23, 42, 0.55) !important; /* beats the old inline near-white overlay */
}
#modal-global.fx-modal-open .modal-content {
  width: auto;
  max-width: calc(100vw - 2rem);
  margin: 0;
  overflow: visible !important;
  background: none;
}
.fx-dialog {
  width: calc(100vw - 2rem);
  max-width: 34rem;
  max-height: calc(100vh - 3rem);
  margin: 0 auto;
}
.fx-dialog--wide {
  max-width: 48rem;
}
.fx-dialog--xwide {
  max-width: 68rem;
}
.fx-dialog .modal-card-body {
  font-size: 0.9rem;
  line-height: 1.5;
}
.fx-dialog .modal-card-body > * + * {
  margin-top: 0.85rem;
}
/* The question or summary at the top of a dialog. */
.fx-dialog__lead {
  color: var(--fx-text);
  font-size: 1rem;
  font-weight: 600;
}
.fx-dialog__muted {
  color: var(--fx-text-muted);
  font-size: 0.82rem;
}
/* Label/value pairs, e.g. what is about to be deleted. */
.fx-dialog__facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.3rem 1rem;
  margin: 0;
}
.fx-dialog__facts dt {
  color: var(--fx-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  align-self: center;
}
.fx-dialog__facts dd {
  margin: 0;
}
/* A scrolling list, e.g. notes. */
.fx-dialog__list {
  max-height: 18rem;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius-sm);
}
.fx-dialog__list > li {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--fx-line);
}
.fx-dialog__list > li:last-child {
  border-bottom: 0;
}
.fx-dialog__list-meta {
  display: block;
  color: var(--fx-text-muted);
  font-size: 0.72rem;
}
.fx-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}
.fx-dialog__actions .button {
  margin: 0 !important;
}
.fx-dialog .table {
  background: transparent;
}
.fx-dialog .fx-include-col {
  width: 5rem;
}
.fx-dialog .fx-table .is-checkradio + label {
  margin: 0;
  padding-left: 1.6rem;
}

/* Send receipt: totals right-aligned under the table, the amount due editable in place. */
.fx-receipt-totals {
  justify-content: end;
  text-align: right;
}
.fx-receipt-totals .fx-receipt-due {
  max-width: 9rem;
  text-align: right;
}
/* Dropdowns and text boxes in any pop-up (older fragments included): full width, square, readable. */
.fx-modal-body .select:not(.is-multiple) {
  width: 100%;
  height: 2.4rem;
}
.fx-modal-body .select select {
  width: 100%;
  height: 2.4rem;
  border-radius: 4px;
  box-shadow: none;
  font-size: 0.9rem;
}
.fx-modal-body .input,
.fx-modal-body .textarea {
  border-radius: 4px;
  box-shadow: none;
  font-size: 0.9rem;
}
.fx-modal-body .input {
  height: 2.4rem;
}
.fx-modal-body .label {
  font-size: 0.8rem;
}
/* Older fragments' centred headings and big corner close button, inside the frame. */
.fx-modal-body > .subtitle.has-text-centered:first-child {
  margin-bottom: 1rem;
  font-size: 1.05rem;
}
.fx-modal-body .modal-close.is-large {
  display: none;
}

/* ---------- loading: a turning ring with a status line ---------- */
.fx-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 4.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px dashed var(--fx-line, #dbe3ec);
  border-radius: var(--fx-radius-sm, 6px);
  color: var(--fx-text-muted, #5c6b7a);
  font-size: 0.9rem;
}
.fx-spinner {
  flex: 0 0 auto;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  border: 3px solid rgba(62, 142, 208, 0.2);
  border-top-color: #3e8ed0;
  animation: fx-spin 0.8s linear infinite;
}
html[data-theme="dark"] .fx-spinner {
  border-color: rgba(122, 186, 240, 0.22);
  border-top-color: #7abaf0;
}
@keyframes fx-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .fx-spinner {
    animation-duration: 2.4s;
  }
}

/* ---------- data tables: class="table fx-table" inside <div class="fx-table-wrap"> ---------- */
/* The same look as the redesigned lists (fx-tx-table): compact text, small uppercase headings that wrap, striped rows.
   td.is-num right-aligns figures on one line; td.is-nowrap keeps a cell on one line; td.is-mid centres. */
.fx-table-wrap {
  margin-bottom: 1.25rem;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius);
  background: var(--fx-surface);
  overflow-x: auto;
  overflow-y: hidden;
}
.fx-table {
  width: 100%;
  background: var(--fx-surface);
  color: var(--fx-text);
  font-size: 0.75rem;
}
.fx-table-wrap > .fx-table {
  margin: 0;
}
.fx-table thead th,
.fx-table thead td {
  padding: 0.3rem 0.4rem;
  border-bottom: 1px solid var(--fx-line) !important;
  background: var(--fx-surface-soft);
  color: var(--fx-text-muted) !important;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.15;
  text-transform: uppercase;
  vertical-align: bottom;
  white-space: normal;
}
.fx-table tbody tr {
  background-color: var(--fx-surface);
}
.fx-table tbody tr:nth-child(even) {
  background-color: var(--fx-surface-soft);
}
.fx-table tbody tr:hover {
  background-color: color-mix(in srgb, var(--fx-text) 6%, var(--fx-surface));
}
.fx-table tbody td,
.fx-table tbody th {
  padding: 0.28rem 0.4rem;
  border-top: 0;
  border-bottom: 1px solid var(--fx-line);
  border-color: var(--fx-line) !important;
  vertical-align: middle;
}
.fx-table tbody tr:last-child td,
.fx-table tbody tr:last-child th {
  border-bottom: 0;
}
.fx-table th:first-child,
.fx-table td:first-child {
  padding-left: 0.6rem;
}
.fx-table th:last-child,
.fx-table td:last-child {
  padding-right: 0.6rem;
}
.fx-table .is-num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.fx-table .is-nowrap {
  white-space: nowrap;
}
.fx-table .is-mid {
  text-align: center;
}

/* Phones: responsive-tables.css stacks every row as a card; give each td a data-label and .fx-table makes the card
   tidy: the first cell is the card title, the rest are "LABEL ... value" lines. */
@media screen and (max-width: 600px) {
  .fx-table-wrap {
    border: 0;
    background: transparent;
    overflow: visible;
  }
  .fx-table,
  .fx-table tbody tr,
  .fx-table tbody tr:nth-child(even) {
    background: transparent;
  }
  .fx-table tbody tr {
    margin: 0 0 0.6rem;
    padding: 0;
    border: 1px solid var(--fx-line);
    border-radius: var(--fx-radius-sm);
    background: var(--fx-surface) !important;
    overflow: hidden;
  }
  .fx-table tbody td,
  .fx-table tbody tr:last-child td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0.7rem !important;
    border-bottom: 1px solid var(--fx-line);
    font-size: 0.78rem;
    text-align: right;
  }
  .fx-table tbody td:last-child {
    border-bottom: 0;
  }
  .fx-table tbody td::before {
    float: none;
    color: var(--fx-text-muted);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-align: left;
  }
  .fx-table tbody td:first-child {
    justify-content: flex-start;
    background: var(--fx-surface-soft);
    font-weight: 700;
    text-align: left;
  }
  .fx-table tbody td:first-child::before,
  .fx-table tbody td:not([data-label])::before {
    content: none;
  }
}

/* ---------- table buttons and dropdowns: equal widths, square corners ---------- */
/* An actions cell (td.fx-actions) keeps its buttons on one line; each button fills a fixed width. */
.fx-table td.fx-actions {
  width: 1%;
  white-space: nowrap;
}
.fx-table td.fx-actions .button.is-small,
.fx-table .fx-btn {
  display: inline-flex;
  min-width: 3.4rem;
  height: 1.7rem;
  padding: 0 0.4rem;
  justify-content: center;
  gap: 0.2rem;
  border-radius: 4px;
  box-shadow: none;
  font-size: 0.62rem;
}
.fx-table td.fx-actions .button.is-small + .button.is-small,
.fx-table td.fx-actions .button.is-small + form,
.fx-table td.fx-actions form + .button.is-small {
  margin-left: 0.25rem;
}
.fx-table td.fx-actions .button.is-small .icon {
  margin: 0 !important;
}
/* A dropdown in a table cell fills the cell, whatever its value. */
.fx-table .select {
  display: block;
  width: 100%;
  height: 1.7rem;
}
.fx-table .select select {
  display: block;
  width: 100%;
  height: 1.7rem;
  padding: 0 1.15rem 0 0.4rem;
  border-radius: 4px;
  box-shadow: none;
  font-size: 0.62rem;
  line-height: 1.7rem;
}
.fx-table .select:not(.is-multiple):not(.is-loading)::after {
  right: 0.45rem;
  width: 0.4em;
  height: 0.4em;
  margin-top: -0.3em;
  border-width: 1.5px;
}

/* ---------- panels, back links and page columns ---------- */
/* A boxed group of details: <div class="fx-panel"><h2 class="fx-panel__title">Student</h2> ... */
.fx-panel {
  padding: 0.9rem 1rem;
  border: 1px solid var(--fx-line);
  border-radius: var(--fx-radius);
  background: var(--fx-surface);
  color: var(--fx-text);
  font-size: 0.9rem;
  line-height: 1.45;
}
.fx-panel__title {
  margin-bottom: 0.4rem;
  color: var(--fx-text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
/* The page body under a narrow header: <section class="section fx-page-narrow"><div class="container"> */
.fx-page-narrow {
  padding: 1.5rem 1.25rem 2rem;
}
.fx-page-narrow > .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
}
.fx-panel__meta {
  margin-top: 0.5rem;
  color: var(--fx-text-soft);
  font-size: 0.75rem;
}
.fx-panel p + p {
  margin-top: 0.15rem;
}
/* "Back to ..." above a page's content: <a class="button is-small fx-back"> */
.button.fx-back {
  margin-bottom: 1rem;
  border: 1px solid var(--fx-line);
  background: var(--fx-surface);
  color: var(--fx-text);
}
.button.fx-back:hover,
.button.fx-back:focus-visible {
  border-color: var(--fx-link);
  color: var(--fx-link);
}
/* A narrow side column beside the main one (details beside a form), stacked on smaller screens. */
.fx-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}
@media screen and (min-width: 900px) {
  .fx-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }
}

/* Two equal columns of panels, stacked below 900px: <div class="fx-columns"> */
.fx-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}
@media screen and (min-width: 900px) {
  .fx-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- forms: <form class="fx-form"> with Bulma fields ---------- */
.fx-form .label {
  margin-bottom: 0.3rem;
  color: var(--fx-text);
  font-size: 0.8rem;
  font-weight: 600;
}
.fx-form .field:not(:last-child) {
  margin-bottom: 0.85rem;
}
.fx-form .input,
.fx-form .textarea,
.fx-form .select select {
  border-radius: 4px;
  box-shadow: none;
  font-size: 0.9rem;
}
/* Text boxes and dropdowns the same height, so fields side by side line up. */
.fx-form .input,
.fx-form .select:not(.is-multiple),
.fx-form .select:not(.is-multiple) select {
  height: 2.4rem;
}
/* A button joined to a text box (e.g. Verify USI) is the box's height. */
.fx-form .field.has-addons .control .button {
  height: 2.4rem;
  font-size: 0.85rem;
}
.fx-form .input[type="date"] {
  max-width: 14rem;
}
.fx-form .help {
  margin-top: 0.25rem;
  color: var(--fx-text-muted);
}
/* Fields side by side (e.g. BSB and account number), wrapping on narrow screens. */
.fx-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0 1rem;
}
.fx-form-section {
  margin: 1.25rem 0 0.6rem;
  color: var(--fx-text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.fx-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--fx-line);
}

/* ---------- filter bars: <form class="fx-filter-bar"> with Bulma .field children ---------- */
.fx-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.fx-filter-bar > .field {
  flex: 0 0 auto;
  min-width: 9rem;
  margin-bottom: 0 !important;
}
.fx-filter-bar > .field.is-wide {
  min-width: 15rem;
}
.fx-filter-bar .label {
  margin-bottom: 0.25rem;
  font-size: 0.78rem;
}
.fx-filter-bar > .fx-filter-break {
  flex-basis: 100%;
  height: 0;
}

/* ---------- notices: class="notification fx-notice is-success | is-danger | is-warning | is-info" ---------- */
.notification.fx-notice {
  padding: 0.75rem 1rem;
  border: 1px solid var(--fx-line);
  border-left-width: 4px;
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface);
  color: var(--fx-text);
  font-size: 0.85rem;
}
.notification.fx-notice.is-success { border-left-color: var(--fx-tx-pos); background: color-mix(in srgb, var(--fx-tx-pos) 7%, var(--fx-surface)); }
.notification.fx-notice.is-danger { border-left-color: var(--fx-tx-neg); background: color-mix(in srgb, var(--fx-tx-neg) 7%, var(--fx-surface)); }
.notification.fx-notice.is-warning { border-left-color: var(--fx-tx-warn); background: color-mix(in srgb, var(--fx-tx-warn) 9%, var(--fx-surface)); }
.notification.fx-notice.is-info { border-left-color: var(--fx-link); background: color-mix(in srgb, var(--fx-link) 7%, var(--fx-surface)); }
.notification.fx-notice > .delete {
  top: 0.6rem;
  right: 0.6rem;
}

/* ---------- empty states: <p class="fx-empty"> where a list has nothing to show ---------- */
.fx-empty {
  padding: 1.25rem 1rem;
  border: 1px dashed var(--fx-line);
  border-radius: var(--fx-radius-sm);
  color: var(--fx-text-muted);
  font-size: 0.85rem;
  text-align: center;
}

/* ---------- action stacks: a column of full-width buttons beside a page (<div class="fx-action-stack">) ---------- */
/* The main action is .is-primary; the rest .is-light; .is-danger only for something that needs attention. */
.fx-action-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.fx-action-stack > .button,
.fx-action-stack > form > .button {
  width: 100%;
  justify-content: flex-start;
  margin: 0 !important;
}

/* Error and confirmation help text keeps its colour (the theme greys every .help with !important). */
.help.is-danger { color: var(--fx-tx-neg) !important; }
.help.is-success { color: var(--fx-tx-pos) !important; }

/* Table tooltips drawn by table-tooltips.js, fixed to the window so a table's scrolling frame cannot cut them off.
   From tablet width up the stylesheet's own bubble and arrow are hidden for those tooltips. */
.fx-float-tip {
  position: fixed;
  z-index: 60;
  max-width: 340px;
  padding: 4px 8px;
  border-radius: 4px;
  background: #363636;
  color: whitesmoke;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.fx-float-tip.is-multiline {
  width: max-content;
  max-width: 300px;
  white-space: normal;
  text-align: center;
}
.fx-float-tip[hidden] { display: none; }
@media screen and (min-width: 768px) {
  html.fx-js-tips :is([data-transactions-table], .fx-tx-table-wrap, .fx-account-table-wrap) .tooltip[data-label]::before,
  html.fx-js-tips :is([data-transactions-table], .fx-tx-table-wrap, .fx-account-table-wrap) .tooltip[data-label]::after {
    display: none !important;
  }
}

/* ---------- receipt email toggle ---------- */
/* "Email receipt to biller when saved": the biller's receipt page and the receipt modal opened from the account summary
   and the transactions list (the red crosses). Saving a receipt emails nothing unless it is on. */
.receipt-email-toggle {
  display: inline-flex;
  align-items: center;
  align-self: center;
  margin: 0;
  padding: 0;
  user-select: none;
}
.receipt-email-toggle .control-label {
  color: var(--fx-text-muted, #475569);
  font-weight: 500;
  white-space: nowrap;
}
.fx-form > .receipt-email-toggle {
  margin-top: 1rem;
}
@media screen and (max-width: 768px) {
  .receipt-email-toggle .control-label {
    white-space: normal;
  }
}
