/* The card system for Ingage iPay - the merchant back office, the account pages and the
   customer Payment Portal.

   This is a copy of Sail Rewards' Content/pagecss/SailUI.css (Ingage Rewards solution),
   which is itself Sail Scheduling's configuration-page design under a sail- prefix. The
   prefix is kept here even though this product is Ingage iPay, not Sail: the class names
   are internal, and keeping them identical is what lets a shape be copied between the two
   sites and the two files be diffed. When a shape changes in one, check the other.

   WHERE THE COLOURS COME FROM
   All of them, from Content/brand.css, by way of the --sail-* mapping below. A new hex in
   this file is a bug in waiting: it will be right in one theme and wrong in the other.
   brand.css flips its tokens under [data-bs-theme="dark"] / .dxTheme-Office365Dark, so
   dark mode needs almost no rule here.

   HOW IT IS SCOPED
   Everything is prefixed sail- and lives under .sail. A page loads this file itself, in
   its Head content block. The --sail-* tokens are declared ON .sail and inherit downward
   only, so outside a .sail element read the brand.css tokens directly.

   Some blocks below (.sail-preview, .sail-board, .sail-chart, the tag shapes) came across
   with the copy and are Rewards features iPay does not use yet. They cost nothing unused
   and keep the file diffable. */


/* ---------------------------------------------------------------- the tokens */

.sail {
  /* Brand blues. --sail-navy is the deep anchor (the page heading) and deliberately does
     NOT brighten in dark mode - brand.css leaves --brand-primary-darker alone - so the one
     rule that needs it visible on a dark surface swaps to --brand-accent instead.
     --sail-blue is the interactive fill and --sail-blue-deep the primary button's hover.
     Ink and deep land on the same token because the Portal has one step down from
     primary, not two. */
  --sail-navy: var(--brand-primary-darker);
  --sail-blue: var(--brand-primary);
  --sail-blue-ink: var(--brand-primary-dark);
  --sail-blue-deep: var(--brand-primary-dark);

  --sail-ink: var(--text-dark);
  --sail-ink-soft: var(--text-muted);
  --sail-ink-faint: var(--text-faint);

  --sail-surface: var(--card);
  --sail-surface-2: var(--surface);
  --sail-line: var(--border-color);
  --sail-line-soft: var(--border-soft);

  --sail-shadow: var(--shadow-sm);
  --sail-shadow-lift: var(--shadow-lg);

  /* Status tones, and they mean status rather than category. Blue is the neutral brand
     tone, green means a figure moved the way you want, amber that somebody else is
     deciding, red that it went the wrong way. The fill/ink pairs are brand.css's
     --tint-*; the spine is the plain semantic colour.

     This is why the six dashboard tiles are all one tone. The page this replaced coloured
     them by subject - blue members, #2eca6a points, #ff771d rewards - which spends the
     only colour vocabulary the system has on a distinction the headings already make, and
     spends it in two hexes that are in no palette and go nowhere in dark mode. */
  --sail-tone-action-fill: var(--tint-info);
  --sail-tone-action-ink: var(--tint-info-ink);
  --sail-tone-action-spine: var(--brand-primary);

  --sail-tone-waiting-fill: var(--tint-warning);
  --sail-tone-waiting-ink: var(--tint-warning-ink);
  --sail-tone-waiting-spine: var(--warning);

  --sail-tone-good-fill: var(--tint-success);
  --sail-tone-good-ink: var(--tint-success-ink);
  --sail-tone-good-spine: var(--success);

  --sail-tone-bad-fill: var(--tint-danger);
  --sail-tone-bad-ink: var(--tint-danger-ink);
  --sail-tone-bad-spine: var(--danger);

  /* THE SCALE. Type, spacing and corner radius, stated once - Scheduling's values, so a
     button is the same size in both products.

     Seven type steps at roughly a 1.2 ratio. Do NOT scale body type to the window:
     reading comfort is set by characters per line, so type that grows with the window
     keeps the same line length and spends the extra pixels showing less, and vw sizes do
     not answer browser zoom the way rem does. --t-display is the single exception, and it
     is read-once expressive type rather than anything functional.

     Three roles are placed by what they are rather than by what they measured: an input
     takes --t-sm because it holds the user's own words, a button stays at --t-xs because
     it is a label and a row of 15px buttons beside a 15px field reads as two competing
     voices, and a section heading takes --t-md so it separates from the body under it. */
  --t-2xs: 11px;
  --t-xs: 13px;
  --t-sm: 15px;
  --t-md: 17px;
  --t-lg: 21px;
  --t-xl: 26px;
  --t-2xl: 32px;
  --t-display: clamp(1.625rem, 2.2vw, 2.125rem);

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 26px;

  --r-sm: 8px;
  --r-lg: 12px;

  font-family: var(--font-sans);
  color: var(--sail-ink);
  -webkit-font-smoothing: antialiased;

  /* color-scheme - which decides whether the browser hands you a white or a dark spinner
     on the controls it draws itself - is set on the root by brand.css, per theme. Setting
     it here as well would pin this subtree to one value and undo that. */
}


/* ---------------------------------------------------------------- the ground */

/* The page ground, and the reason it is on the wrapper rather than on #main: the wrapper
   is the min-vh-100 flex column holding the content AND the footer, so painting it there
   covers the strip below a short page that #main's own height would leave white. Neither
   the header nor the sidebar is inside it, so both keep the colours style.css gives them.

   Unscoped on purpose. This file is linked by the redesigned pages only, so the rule
   cannot reach a page that has not been converted, and the alternative - a :has() test -
   would be a guard against something that cannot happen.

   style.css sets this same ground for dark mode already, on .main. That rule stays: it is
   what the pages still on the old design use, and it says the same thing this one does.

   IT READS brand.css's --surface DIRECTLY, NOT --sail-surface-2, and that is not a slip.
   The whole --sail-* mapping is declared on .sail, and a custom property inherits
   downwards only - so on an ANCESTOR of .sail every --sail-* name is unresolved, which
   makes the declaration invalid at computed-value time and drops it silently. There is no
   error and no warning; the ground simply stays whatever bootstrap painted, which in dark
   mode is a warm #212529 that looks nothing like this palette. Anything outside .sail has
   to read a brand.css token. */
#mastercontentwrapper {
  background: var(--surface);
}


/* ----------------------------------------------------------- the page column */

.sail {
  /* Answers to the content and to nothing else. The header bar deliberately does not match
     it - the bar runs the full width on every page. Bootstrap's own xxl container, loaded
     on this very page, is 1320, and the Dealer Portal's signed-in pages are fluid beside a
     260px sidebar, so 1280 is the neighbourhood rather than an outlier. */
  max-width: 1280px;
  padding: 22px 20px 56px 20px;

  /* LEFT-ANCHORED, not centred - the owner's call, 2026-09-03.

     This was `margin: 0 auto` until then, which splits the slack either side of the column,
     the way a document centred in a window behaves. These pages are not read that way. All
     eighteen of them inherit RootAuthenticated.Master, so every one sits inside the shell,
     where the rail is hard against the left edge and every heading, every table and every
     form field on the site starts at the left. Centre a 1280 column in the 1660px content
     area of a 1920 window and the page opens with a 190px gap between the rail and the
     first thing in it - and that gap changes size with the window, so the content moves
     when nothing about it has changed.

     `margin-right: auto` rather than a plain `margin: 0`: the two behave identically here,
     and this one says which side the slack is on. The measure and the gutters are both
     untouched - the cap still applies, and `padding` still keeps the content off the rail. */
  margin-left: 0;
  margin-right: auto;
}

/* THE OPT-OUT, for a page whose content is a table rather than prose.

   1280 is a measure, and a measure is about reading. It is right for the dashboard, where
   the widest thing on the page is a sentence and six tiles, and it would be right for a
   settings page. It is wrong for a list: the member table offers twenty columns, and
   capping it at 1280 while the window is 2400 wide means scrolling a table sideways inside
   a card that has 840px of empty page beside it. The room is there; the column was
   refusing it.

   So this lifts the cap and nothing else - the padding stays, so the page keeps its gutters
   and never runs into the window edge, and the left anchor above becomes a no-op
   rather than being overridden.

   Apply it to a page that is mostly a table. Do NOT apply it to one that is mostly prose or
   form fields: a 2,000px-wide paragraph is genuinely harder to read than a 700px one, which
   is the whole reason the cap exists. */
.sail--wide {
  max-width: none;
}

/* THE MEASURE. Running text is comfortable at 45-75 characters a line; past that the eye
   loses its place on the wrap. Cap the measure first, then widen the page - a page widened
   without this makes its own descriptions harder to read, not easier.

   .sail-head p is capped tighter, at 62ch, which is why a page description wraps to two or
   three short lines with space beside it. That is correct typography rather than a bug: the
   answer to the empty space is to align the frame, not to lengthen the line. */
.sail-section__head p {
  max-width: 75ch;
}

.sail *,
.sail *::before,
.sail *::after {
  box-sizing: border-box;
}


/* ------------------------------------------------------------------ page head */

.sail-head {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-5);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
}

.sail-head__text {
  flex: 1 1 340px;
  min-width: 0;
}

.sail-head h1 {
  font-family: var(--font-sans);
  font-size: var(--t-display);
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--sail-navy);
  margin: 0 0 5px 0;
  line-height: 1.15;
}

/* --sail-navy is the deep anchor and brand.css deliberately does not brighten it, so on a
   dark surface the heading reads as the accent instead. This is the one rule in the file
   that needs a dark twin, and it swaps which token it reads rather than stating a colour. */
.dxTheme-Office365Dark .sail-head h1,
[data-bs-theme="dark"] .sail-head h1 {
  color: var(--brand-accent);
}

.sail-head p {
  font-size: var(--t-sm);
  line-height: 1.5;
  color: var(--sail-ink-soft);
  margin: 0;
  max-width: 62ch;
}

.sail-head__actions {
  display: flex;
  gap: 9px;
  flex: 0 0 auto;
  padding-top: 3px;
}


/* -------------------------------------------------------------------- buttons */

.sail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  font-weight: 600;
  line-height: 1;
  padding: 10px 16px;
  border-radius: 7px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease, transform .08s ease;
}

.sail-btn:focus-visible {
  outline: 2px solid var(--sail-blue);
  outline-offset: 2px;
}

.sail-btn:active {
  transform: translateY(1px);
}

.sail-btn i {
  font-size: var(--t-sm);
}

.sail-btn--primary,
.sail-btn--primary:link,
.sail-btn--primary:visited {
  background: var(--sail-blue);
  border-color: var(--sail-blue);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.sail-btn--primary:hover {
  background: var(--sail-blue-deep);
  border-color: var(--sail-blue-deep);
  color: var(--white);
}

.sail-btn--secondary,
.sail-btn--secondary:link,
.sail-btn--secondary:visited {
  background: var(--sail-surface);
  border-color: var(--sail-line);
  color: var(--sail-ink);
}

.sail-btn--secondary:hover {
  border-color: var(--sail-blue);
  color: var(--sail-blue-ink);
}

/* The destructive side of a card. It stays quiet until hovered so the affirmative action
   is the one the eye lands on. */
.sail-btn--quiet,
.sail-btn--quiet:link,
.sail-btn--quiet:visited {
  background: transparent;
  border-color: var(--sail-line);
  color: var(--sail-ink-soft);
}

.sail-btn--quiet:hover {
  border-color: var(--sail-tone-bad-spine);
  color: var(--sail-tone-bad-ink);
  background: var(--sail-tone-bad-fill);
}

.sail-btn--sm {
  font-size: var(--t-xs);
  padding: 8px 14px;
}


/* --------------------------------------------------------------- filter chips */

/* Narrows or switches what the page is showing. One click rather than open-then-pick, and
   every choice is on screen at once - which is the whole argument for it over the dropdown
   it replaced on the dashboard.

   These are LinkButtons on the dashboard, so they are anchors by the time they reach the
   browser and need the :link / :visited pairs; a browser's own visited colour would
   otherwise win over the class. */
.sail-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
}

.sail-filter-chip,
.sail-filter-chip:link,
.sail-filter-chip:visited {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--sail-line);
  background: var(--sail-surface);
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--sail-ink-soft);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .14s ease, color .14s ease, background-color .14s ease;
}

.sail-filter-chip:hover {
  border-color: var(--sail-blue);
  color: var(--sail-blue-ink);
}

.sail-filter-chip:focus-visible {
  outline: 2px solid var(--sail-blue);
  outline-offset: 1px;
}

.sail-filter-chip.is-active,
.sail-filter-chip.is-active:link,
.sail-filter-chip.is-active:visited {
  background: var(--sail-tone-action-fill);
  border-color: var(--sail-blue);
  color: var(--sail-tone-action-ink);
}

.sail-filter-chip__count {
  font-variant-numeric: tabular-nums;
  opacity: .75;
}


/* ------------------------------------------------------------------ a section */

/* A card with no status, so no spine and no tone. It stands for a group of settings or a
   group of facts, and a group is not in a state - a coloured edge would read as one. */
.sail-section {
  background: var(--sail-surface);
  border: 1px solid var(--sail-line);
  border-radius: var(--r-lg);
  box-shadow: var(--sail-shadow);
  padding: var(--sp-5) var(--sp-6);
  margin-bottom: var(--sp-5);
}

.sail-section__head {
  margin-bottom: 4px;
}

.sail-section__head h2 {
  font-family: var(--font-sans);
  font-size: var(--t-md);
  font-weight: 700;
  color: var(--sail-ink);
  margin: 0;
}

.sail-section__head p {
  font-size: var(--t-xs);
  line-height: 1.5;
  color: var(--sail-ink-soft);
  margin: 5px 0 0 0;
}


/* ------------------------------------------------------ a label over a group */

.sail-eyebrow {
  display: block;
  font-size: var(--t-2xs);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sail-ink-faint);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sail-eyebrow--section {
  margin: var(--sp-6) 0 9px 0;
}

/* The first group label on a page follows the chips, which carry their own bottom margin,
   so it does not need the full step above it as well. */
.sail-eyebrow--section:first-of-type {
  margin-top: var(--sp-2);
}


/* -------------------------------------------------------------------- a pill */

.sail-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: var(--t-2xs);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sail-pill--action { background: var(--sail-tone-action-fill); color: var(--sail-tone-action-ink); }
.sail-pill--waiting { background: var(--sail-tone-waiting-fill); color: var(--sail-tone-waiting-ink); }
.sail-pill--good { background: var(--sail-tone-good-fill); color: var(--sail-tone-good-ink); }
.sail-pill--bad { background: var(--sail-tone-bad-fill); color: var(--sail-tone-bad-ink); }
.sail-pill--off { background: var(--sail-line-soft); color: var(--sail-ink-soft); }


/* -------------------------------------------------------------------- a hint */

.sail-hint {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  font-size: var(--t-xs);
  line-height: 1.45;
  color: var(--sail-ink-soft);
  background: var(--sail-surface-2);
  border: 1px solid var(--sail-line-soft);
  border-radius: var(--r-sm);
  padding: var(--sp-3);
  margin-top: var(--sp-5);
}

.sail-hint i {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--sail-ink-faint);
}


/* ------------------------------------------------------------------ a banner */

.sail-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  border-radius: var(--r-sm);
  margin-bottom: 18px;
  font-size: var(--t-sm);
  line-height: 1.45;
  background: var(--sail-tone-good-fill);
  color: var(--sail-tone-good-ink);
}

.sail-banner i {
  font-size: var(--t-sm);
  margin-top: 1px;
}

.sail-banner--info {
  background: var(--sail-tone-action-fill);
  color: var(--sail-tone-action-ink);
}

.sail-banner--warning {
  background: var(--sail-tone-waiting-fill);
  color: var(--sail-tone-waiting-ink);
}

.sail-banner--bad {
  background: var(--sail-tone-bad-fill);
  color: var(--sail-tone-bad-ink);
}


/* ------------------------------------------------------------ an empty state */

.sail-empty {
  text-align: center;
  padding: 54px 24px 60px 24px;
  border: 1px dashed var(--sail-line);
  border-radius: 10px;
  background: var(--sail-surface);
}

.sail-empty i {
  font-size: var(--t-2xl);
  color: var(--sail-ink-faint);
  opacity: .65;
}

.sail-empty h2 {
  font-family: var(--font-sans);
  font-size: var(--t-md);
  font-weight: 700;
  color: var(--sail-ink);
  margin: 12px 0 5px 0;
}

.sail-empty p {
  font-size: var(--t-xs);
  color: var(--sail-ink-soft);
  margin: 0 auto;
  max-width: 44ch;
  line-height: 1.5;
}

.sail-empty__actions {
  display: flex;
  gap: 9px;
  justify-content: center;
  margin-top: 18px;
}


/* ============================================================================
   A figure and its context

   The dashboard's atom, and the one piece of this file with no counterpart in
   Scheduling - that product's dashboard is a live clock board rather than a set
   of totals. It is written here rather than behind #sailDashboard because a
   number with a label, a movement and a total is not specific to one page; the
   next page that reports figures should use this rather than invent a second one.

   The tile reads top to bottom in the order somebody actually asks: what is
   this, how big is it, which way is it going, and how much is there altogether.
   ============================================================================ */

/* ============================================================================
   THE BOARD - a page the person reading it arranges

   Added 2026-09-14. The dashboard's seven cards sit in one twelve-column grid
   that a merchant user reorders, resizes and removes from; what they choose is
   a row in MerchantUserGridLayouts, so it is theirs and it follows them.

   WHAT THIS REPLACED, because the shape it replaced was right for its
   constraints and those constraints have changed. The six figures used to be
   three subject COLUMNS - .sail-groups and .sail-group, now gone - each holding
   its pair one above the other. That existed to solve two things: a pair that
   answers itself (added against visits) should stay together, and a tile holding
   a three-character figure must not be six hundred pixels wide. The first is
   gone by decision - a card somebody can drag away cannot be promised a
   neighbour - and the second is now the merchant's to make, with a floor under
   it: a card cannot go below a quarter, so the narrowest board is still four
   legible tiles to a row.

   TWELVE COLUMNS, AND ONLY FOUR WIDTHS ALLOWED. Twelve divides by two, three
   and four, so a quarter, a third, a half and the full width are all whole
   numbers of columns and every row fills. Allowing any integer would allow 5,
   and a 5 + 4 row leaves a three-column hole that reads as a card that failed
   to load. DashboardCards.Widths is where that list actually lives; these
   classes are the other half of it and the two have to move together.
   ============================================================================ */

.sail-board {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--sp-5);
  align-items: start;
}

/* min-width: 0 on every card, because a grid item's default min-width is auto -
   so one wide child (the chart's 680px floor) would push its column past the
   fraction it was given and squeeze everything beside it. */
.sail-card {
  min-width: 0;
  position: relative;
}

.is-w3 { grid-column: span 3; }
.is-w4 { grid-column: span 4; }
.is-w6 { grid-column: span 6; }
.is-w12 { grid-column: span 12; }

/* A card that has been taken off the board. It is still rendered, complete, so that
   putting it back is a class rather than a page load - see DrawBoard() in the
   code-behind for why that is affordable, and for the data-help that comes off with it. */
.sail-card.is-off {
  display: none;
}

/* The chart is a .sail-section as well as a card, and a section carries a bottom
   margin for the stacked-panel pages it was written for. In a grid that margin is
   dead space under one cell. */
.sail-board > .sail-section {
  margin-bottom: 0;
}


/* ------------------------------------------------------- arranging the board

   EDIT MODE IS A MODE, and that is the decision this block rests on. A dashboard
   is read many times for every once it is arranged, so nothing here is on screen
   until Customize is pressed: no grips, no handles, no close buttons hovering
   over six figures somebody is trying to read. The cost is that arranging is two
   steps rather than one, which is the right way round for how often each happens.

   The class goes on the .sail root rather than on the board, so the bar above the
   board and the cards inside it are switched by one thing. */

.sail-board__bar {
  display: none;
}

.sail.is-customizing .sail-board__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-4);
  border: 1px dashed var(--sail-line);
  border-radius: var(--r-lg);
  background: var(--sail-tone-action-fill);
}

.sail-board__hint {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0;
  min-width: 0;
  font-size: var(--t-xs);
  color: var(--sail-tone-action-ink);
}

.sail-board__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex: none;
}

/* A row per card that is off the board. Not .sail-checks, which is a list of things
   that are either on or off: these are actions, and each one empties itself out of
   the menu when it is pressed. */
.sail-board__catalog {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 210px;
}

.sail-board__catalog button {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  padding: 7px 9px;
  border-radius: var(--r-sm);
  font-size: var(--t-xs);
  color: var(--sail-ink);
  cursor: pointer;
}

.sail-board__catalog button:hover {
  background: var(--sail-line-soft);
}

.sail-board__catalog button:focus-visible {
  outline: 2px solid var(--sail-blue);
  outline-offset: 1px;
}

.sail-board__catalog p {
  margin: 0;
  padding: 7px 9px;
  font-size: var(--t-xs);
  color: var(--sail-ink-faint);
}

/* A card being arranged. The dashed edge says "this is a thing you can move" without
   painting a colour, which in this system would mean a status. */
.sail.is-customizing .sail-card {
  cursor: grab;
  outline: 1px dashed var(--sail-line);
  outline-offset: 3px;
  user-select: none;
}

/* The figures themselves stop responding while the board is being arranged. The chart
   card holds a <select> that posts back on change, and reloading the page in the middle
   of a drag would throw the arrangement away; a tile holds nothing interactive, but a
   text selection starting inside one during a drag is its own small mess. */
.sail.is-customizing .sail-card > *:not(.sail-card__tools):not(.sail-card__resize) {
  pointer-events: none;
}

/* THE CARD IN THE HAND. It is translated under the pointer by the script and stays a grid
   item while it is, so the empty cell it leaves behind IS the placeholder - and that cell
   moves as the insertion point moves, with the cards around it animating into place.

   `transition: none` is load-bearing and not tidiness. `.sail-stat` carries
   `transition: transform .16s ease` for its hover lift, so without this the card would ease
   towards the pointer a sixth of a second behind it - which reads as lag on a slow machine
   rather than as a design, and gets worse the faster you move.

   pointer-events are off so the card in the hand cannot be the thing the pointer is judged
   to be over; the script already skips it when hit-testing, and this keeps hover states on
   the cards underneath from lighting up through it. */
.sail-card.is-dragging {
  cursor: grabbing;
  transition: none;
  opacity: .92;
  z-index: 3;
  pointer-events: none;
  will-change: transform;
  box-shadow: var(--sail-shadow-lift);
  outline-style: solid;
  outline-color: var(--sail-blue);
}

/* Landing. The card is released from wherever the pointer left it - never exactly its own
   cell - so it travels the last few pixels rather than teleporting, and stays above its
   neighbours until it has arrived. */
.sail-card.is-settling {
  z-index: 3;
  transition: transform .18s ease;
  box-shadow: var(--sail-shadow-lift);
}

/* The cards being pushed aside. A grid does not animate a change of cell, so the script
   measures, reorders, and puts each card back where it was with a transform for this rule
   to carry home. The chart card needs it stated here: it is a .sail-section and has no
   transform transition of its own, unlike the six tiles. */
.sail-card.is-shifting {
  transition: transform .18s ease;
}

.sail-card__tools {
  display: none;
}

.sail.is-customizing .sail-card__tools {
  display: flex;
  align-items: center;
  gap: 2px;
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  padding: 2px;
  border-radius: var(--r-sm);
  background: var(--sail-surface);
  box-shadow: var(--sail-shadow);
}

.sail-card__tools button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--sail-ink-soft);
  font-size: var(--t-xs);
  cursor: pointer;
}

.sail-card__tools button:hover:not(:disabled) {
  background: var(--sail-line-soft);
  color: var(--sail-ink);
}

.sail-card__tools button:focus-visible {
  outline: 2px solid var(--sail-blue);
  outline-offset: 1px;
}

/* A width that cannot go any further is disabled rather than hidden, so the pair of
   arrows keeps the same shape at every width and nothing moves under the pointer. */
.sail-card__tools button:disabled {
  opacity: .35;
  cursor: default;
}

.sail-card__tools button.is-remove:hover {
  background: var(--sail-tone-bad-fill);
  color: var(--sail-tone-bad-ink);
}

/* THE RESIZE HANDLE IS NOT THE ONLY WAY TO RESIZE, and that is deliberate rather than
   belt and braces: a drag handle cannot be reached from a keyboard and is miserable on
   a touch screen, so the two arrows above do the same job for everybody who is not
   holding a mouse. This is the direct way for everybody who is. */
.sail-card__resize {
  display: none;
}

.sail.is-customizing .sail-card__resize {
  display: block;
  position: absolute;
  top: 12px;
  bottom: 12px;
  right: 0;
  width: 14px;
  z-index: 2;
  cursor: col-resize;
  border-radius: var(--r-sm);
  background: none;
  border: 0;
  padding: 0;
}

.sail-card__resize::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 34px;
  transform: translate(-50%, -50%);
  border-radius: 2px;
  background: var(--sail-line);
}

.sail-card__resize:hover::before,
.sail-card__resize:focus-visible::before,
.sail-card.is-resizing .sail-card__resize::before {
  background: var(--sail-blue);
}

.sail-card__resize:focus-visible {
  outline: 2px solid var(--sail-blue);
  outline-offset: 1px;
}

.sail-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}

/* A row of tiles standing on their own rather than stacked inside a .sail-group - the
   member record's three points figures. A modifier rather than an inline
   grid-template-columns on the page, which is what this first shipped as: an inline
   style beats every media query in this file, so the three tiles stayed three abreast
   at 720px and the label wrapped underneath the figure beside it. */
.sail-stats--row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* There was a .sail-stats--measure here for a few minutes on 2026-09-04, capping a tile
   row to .sail-form's 1080 so the tiles and the carded groups under them ended on the
   same line. Removing the form's cap in the same session settled it better: with both
   running to the width of the page they line up with nothing to keep in step, and there
   is no second number to get wrong. Worth knowing only if a cap ever comes back - the
   right width for a tile row is the width of whatever it heads, which differs by page,
   so it would want to be a modifier again rather than something --row does for
   everybody. */

@media (max-width: 1000px) {
  .sail-stats--row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .sail-stats--row {
    grid-template-columns: 1fr;
  }
}

.sail-stat {
  background: var(--sail-surface);
  border: 1px solid var(--sail-line);
  border-radius: var(--r-lg);
  box-shadow: var(--sail-shadow);
  padding: var(--sp-5);
  transition: box-shadow .16s ease, transform .16s ease;
}

/* A tile is not a link, so the lift is smaller than a card's would be: enough to say the
   pointer is on this one, and no more than that. */
.sail-stat:hover {
  box-shadow: var(--sail-shadow-lift);
  transform: translateY(-1px);
}

/* The identity row: what this figure is, and - at the far end - how much of it there has
   ever been. The all-time total rides up here rather than sitting under the figure for a
   reason that is structural rather than decorative. Whether a tile HAS an all-time total
   depends on the metric (three of the six record one), while whether it has a movement
   line depends on the period (all six or none). Anything that varies from tile to tile has
   to live in a row of fixed height, or the six cards come out at three different heights
   in the same row. The header row is that fixed height; the flow below it is not. */
.sail-stat__top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--sp-4);
}

.sail-stat__icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sail-tone-action-fill);
  color: var(--sail-tone-action-ink);
  font-size: var(--t-sm);
}

.sail-stat__label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--sail-ink-soft);
  line-height: 1.3;
}

/* Quiet, and quiet on purpose: it is the answer to a question nobody asked first. The
   figure below is what the page is for. */
.sail-stat__total {
  flex: 0 0 auto;
  font-size: var(--t-2xs);
  color: var(--sail-ink-faint);
  white-space: nowrap;
}

.sail-stat__total strong {
  font-weight: 700;
  color: var(--sail-ink-soft);
  font-variant-numeric: tabular-nums;
}

/* The figure. tabular-nums is not decoration: without it the digits are proportional, so
   the six numbers sit at six different widths and a column of them reads as ragged. */
.sail-stat__value {
  font-family: var(--font-sans);
  font-size: var(--t-2xl);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--sail-ink);
  font-variant-numeric: tabular-nums;
}

/* Points carry two decimal places and the four counts do not. Rendering the cents at full
   size makes "1,284,392.00" read as a longer number than it is, so the fraction drops a
   step and goes quiet: the magnitude stays in the display type where the eye lands, and
   the precision is still on the page for anybody who needs it. Rounding it away instead
   would turn 12.50 into 13, which is a different figure. */
.sail-stat__frac {
  font-size: var(--t-lg);
  font-weight: 600;
  color: var(--sail-ink-faint);
  letter-spacing: 0;
}

/* Which way it moved, against the same period last time round. Green up and red down for
   all six figures, which holds here because more is better in every one of them - more
   members, more visits, more points moving in either direction, more rewards earned and
   more used. A metric where down is the good news would need its own modifier. */
.sail-stat__delta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--sail-ink-soft);
  font-variant-numeric: tabular-nums;
}

.sail-stat__delta i {
  font-size: var(--t-xs);
}

.sail-stat__delta.is-up { color: var(--sail-tone-good-ink); }
.sail-stat__delta.is-down { color: var(--sail-tone-bad-ink); }

/* Flat, or nothing to compare against. Stays on the quiet faint colour: an unchanged
   figure is information, and painting it green or red would say something it does not. */
.sail-stat__delta.is-flat { color: var(--sail-ink-faint); }

/* -------------------------------------------------------------------- motion */

/* BACKWARDS, NOT BOTH, AND THE DIFFERENCE IS NOT COSMETIC.
   `both` is backwards + FORWARDS, and forwards keeps the closing keyframe applied for the life
   of the element. Animated properties sit above every normal declaration in the cascade -
   inline styles included, only `!important` beats them - so `transform: none` in that closing
   keyframe was pinning transform on every tile for ever. Two things had been quietly dead
   because of it:

     .sail-stat:hover's translateY(-1px) lift, on all three pages that show a tile, which has
     never once happened since the animation was added;

     and the dashboard board's drag, where five of six figures would not move with the pointer
     while the chart - the only card that is a .sail-section rather than a .sail-stat - was
     perfect. "One thing works and the rest do not" is the signature of this fault, and the
     thing that works is the odd one out.

   Forwards buys nothing here to weigh against that: the closing keyframe is
   `opacity: 1; transform: none`, which is exactly what a tile's own styles give it anyway, so
   releasing the fill changes no resting appearance. Backwards is kept rather than dropping the
   fill entirely because it is the half that would matter if a delay were ever added.
   Documents/TODO.md item 90 has the measurements. */
.sail-stat,
.sail-empty {
  animation: sail-rise .26s ease backwards;
}

@keyframes sail-rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sail *,
  .sail *::before,
  .sail *::after {
    animation: none !important;
    transition: none !important;
  }
}


/* --------------------------------------------------------------- narrow view */

/* The desktop is where the back office is used, but it must not fall apart on a laptop
   split-screen or a tablet.

   The board turns through ninety degrees rather than simply stacking. Below 1150 the three
   subjects go one under another and the pair inside each one goes side by side, so the
   pair is still a pair and the row is still full. Stacking all six into a single column
   straight away would give one very long page of very wide cards - the same fault the
   full-width pairs had, in the other direction. Only when there is no room for two does it
   become one column.

   1150 rather than the 999 at which style.css collapses the sidebar: while the sidebar is
   still open it takes 225px out of the content, so three tiles are already tight at 1150
   even though the frame has not changed yet. */
@media (max-width: 1150px) {
  /* THE BOARD COLLAPSES BY PAIRING WIDTHS, NOT BY STACKING. A quarter and a third both
     become a half, and a half becomes the full width - so a board of quarters turns into
     two to a row rather than one, and only the cards that were already big take the whole
     width. Stacking everything straight away would give one very long page of very wide
     cards, which is the fault the three-column grid this replaced was written to avoid,
     in the other direction.

     The saved width is untouched: this is presentation, and widening the window puts the
     merchant's own arrangement back exactly as they left it. */
  .sail-board > .is-w3,
  .sail-board > .is-w4 {
    grid-column: span 6;
  }

  .sail-board > .is-w6,
  .sail-board > .is-w12 {
    grid-column: span 12;
  }

  .sail-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  /* No room for two of anything. */
  .sail-board > .sail-card {
    grid-column: span 12;
  }

  .sail-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .sail {
    padding: 16px 13px 44px 13px;
  }

  .sail-head__actions {
    width: 100%;
  }

  .sail-head__actions .sail-btn {
    flex: 1 1 0;
  }
}


/* ============================================================================
   A LIST OF THINGS

   The second shape this file carries, after the dashboard's tile: a toolbar, a
   table, a pager and a column picker. Written shared rather than behind
   #sailMembers because a list of records is what most of the Merchant back
   office is - Rewards, Stores, Email Campaigns, Email Templates, Event Rules
   and Point Rules are all the same page with different rows - and the next one
   converted should find this here rather than invent a second table.

   IT IS PAGED ON THE SERVER, AND THE SHAPE ASSUMES THAT. There is no rule here
   for a hundred thousand rows in a scroller, because a page never holds more
   than a hundred. That is the whole point of the rebuild: the grid this
   replaced fetched every row a merchant had - 184,661 of them for the largest -
   and paged them in the browser's memory.

   Scheduling has no equivalent yet; when it grows one, this is the file to
   copy from. See the sail-/sh- note at the top.
   ============================================================================ */


/* ------------------------------------------------------------------ toolbar */

/* The row above the table: what narrows it on the left, what acts on it on the
   right. The search field is the one thing on the page that grows, because it
   is the control people actually use - on a merchant with 184,661 members,
   finding one person is the job and browsing is the exception. */
.sail-toolbar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}

.sail-toolbar__grow {
  flex: 1 1 260px;
  min-width: 0;
}

.sail-toolbar__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex: 0 0 auto;
}

/* A NOTE ON WHAT `align-items: center` ABOVE IS CENTRING, because getting it wrong is
   invisible in the markup and obvious on the page.
   It centres the actions against the TALLEST THING IN THE ROW. On every list toolbar that is
   a .sail-search - one line - so the buttons come out centred on the input, 4px inside it top
   and bottom, which is this system's look for a control beside a taller input.
   Put a LABELLED .sail-field straight into __grow and that stops being true: the field is a
   label on top of an input, so the row is 68px tall and the button centres against all of it,
   landing across the gap between the two. Measured in the Manage Tags dialog when it was
   built that way - a 35px button 9px below the input's top and 17px above its bottom, reading
   as floated up out of the row it belongs to.
   THE FIX IS STRUCTURAL, NOT AN OVERRIDE. Keep the label outside the row: wrap the whole
   thing in the .sail-field and nest this toolbar inside it, so the flex line is input +
   button and `center` centres on the input by construction. Both Manage Tags dialogs are
   built that way. An `align-items` override here would only ever approximate it - flex-end
   gets the bottoms flush but sits 4px low against the house geometry, and baseline is far
   worse. */


/* ------------------------------------------------------------------- search */

/* The magnifier sits inside the field rather than beside it, so the control
   reads as one thing and the placeholder has somewhere to start. Padding on the
   input, absolute on the icon - a flex row would let a long placeholder push the
   icon off its own left edge. */
.sail-search {
  position: relative;
  display: block;
}

.sail-search > i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sail-ink-faint);
  font-size: var(--t-sm);
  pointer-events: none;
}

.sail-search input {
  width: 100%;
  font-family: var(--font-sans);
  /* --t-sm because it holds the user's own words. See the scale note. */
  font-size: var(--t-sm);
  color: var(--sail-ink);
  background: var(--sail-surface);
  border: 1px solid var(--sail-line);
  border-radius: 7px;
  padding: 9px 12px 9px 36px;
  transition: border-color .14s ease, box-shadow .14s ease;
}

.sail-search input::placeholder {
  color: var(--sail-ink-faint);
}

.sail-search input:focus {
  outline: none;
  border-color: var(--sail-blue);
  box-shadow: 0 0 0 3px var(--sail-tone-action-fill);
}


/* ------------------------------------------------------------------- select */

/* The page-size picker, and anything else small enough to be a native select.
   Native on purpose: it is three values, the browser's own control is keyboard
   and screen-reader correct for free, and brand.css sets color-scheme per theme
   so the arrow the browser draws comes out the right colour on both grounds. */
.sail-select {
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--sail-ink);
  background: var(--sail-surface);
  border: 1px solid var(--sail-line);
  border-radius: 7px;
  padding: 7px 9px;
  cursor: pointer;
}

.sail-select:focus-visible {
  outline: 2px solid var(--sail-blue);
  outline-offset: 1px;
}


/* -------------------------------------------------------------------- table */

/* The card the table sits in. It is .sail-section's surface without the
   padding, because a table draws its own edges and padding here would leave the
   header floating off the card's corners.

   IT SCROLLS SIDEWAYS, AND THAT IS WHY THE HEADER DOES NOT STICK. The picker
   offers twenty columns, and twenty columns do not fit any window - so the
   overflow has to go somewhere, and a container that scrolls is better than a
   page that scrolls. The cost is a sticky header: overflow-x: auto makes this a
   scroll container, and once it is one, position: sticky on a th resolves
   against this box rather than against the viewport, so it never sticks. The
   two cannot both be had on the same element and horizontal room is the one
   that is load-bearing. A hundred rows is a short scroll; twenty columns off
   the side of the screen is unreachable. */
.sail-table-wrap {
  background: var(--sail-surface);
  border: 1px solid var(--sail-line);
  border-radius: var(--r-lg);
  box-shadow: var(--sail-shadow);
  overflow-x: auto;
  /* Positioned so it is the containing block of what is absolutely positioned
     inside it - the .visually-hidden label on an actions column above all. A
     scroll box clips only what it contains in that sense; without this the label
     sits at the table's far edge outside the clip and widens the whole page. */
  position: relative;
}

.sail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-xs);
  /* Cells decide their own width from content; nowrap below keeps a row on one
     line, so this stops a long email forcing every other column narrow. */
  table-layout: auto;
}

.sail-table th,
.sail-table td {
  text-align: left;
  padding: 11px var(--sp-4);
  white-space: nowrap;
  border-bottom: 1px solid var(--sail-line-soft);
}

.sail-table thead th {
  font-size: var(--t-2xs);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sail-ink-soft);
  background: var(--sail-surface-2);
  border-bottom: 1px solid var(--sail-line);
  white-space: nowrap;
}

.sail-table tbody tr:last-child td {
  border-bottom: none;
}

/* Numbers and dates right, everything else left - so a column of figures lines
   up on its units. tabular-nums for the same reason it is on the dashboard
   tile: proportional digits make a column of numbers read ragged. */
.sail-table .is-numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* A row is a link to that member, so it lights up under the pointer. The first
   cell carries a real anchor for the keyboard and for middle-click; this is the
   affordance for everybody else. */
.sail-table tbody tr {
  cursor: pointer;
  transition: background-color .12s ease;
}

.sail-table tbody tr:hover {
  background: var(--sail-tone-action-fill);
}

/* The name, and the row's only real link. Inherits its colour rather than
   taking the blue, because every row would otherwise be a wall of blue text;
   the hover on the row is what says it is clickable. */
.sail-table td a,
.sail-table td a:link,
.sail-table td a:visited {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.sail-table td a:hover {
  color: var(--sail-blue-ink);
  text-decoration: underline;
}

.sail-table td a:focus-visible {
  outline: 2px solid var(--sail-blue);
  outline-offset: 2px;
  border-radius: 3px;
}

/* An empty cell should read as empty rather than as a cell that failed to
   render, so the page writes an em dash into it and this makes it quiet. */
.sail-table .is-blank {
  color: var(--sail-ink-faint);
}


/* ------------------------------------------------------------- sortable head */

/* The heading is the control. A button rather than a link would be more
   honest about what it does, but these are LinkButtons - every sort is a round
   trip, because the ordering is done by SQL - so they arrive as anchors and
   need the :link / :visited pairs, exactly as the filter chips do. */
.sail-table th a,
.sail-table th a:link,
.sail-table th a:visited {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.sail-table th a:hover {
  color: var(--sail-blue-ink);
}

.sail-table th a:focus-visible {
  outline: 2px solid var(--sail-blue);
  outline-offset: 2px;
  border-radius: 3px;
}

/* The column being sorted on. It takes the brand colour and its caret is
   opaque; every other caret is invisible until the pointer is on it, so the
   head reads as one sorted column rather than as fifteen competing arrows. */
.sail-table th.is-sorted a,
.sail-table th.is-sorted a:link,
.sail-table th.is-sorted a:visited {
  color: var(--sail-blue-ink);
}

.sail-table th .sail-sort-caret {
  font-size: var(--t-2xs);
  opacity: 0;
  transition: opacity .12s ease;
}

.sail-table th a:hover .sail-sort-caret {
  opacity: .45;
}

.sail-table th.is-sorted .sail-sort-caret {
  opacity: 1;
}


/* -------------------------------------------------------------------- pager */

/* Under the table: how much there is on the left, how to move through it on the
   right. The count goes first because it answers the question somebody has
   before they reach for a page number.

   IT STICKS TO THE BOTTOM OF THE WINDOW, the way .sail-formbar does with Save,
   and for the same reason: fifty rows is more than a screenful, so a pager that
   exists only after the last of them costs a scroll down for every page turned.
   Pinned, 2 -> 3 -> 4 is three clicks and no scrolling. It settles into place at
   the end of the table, where the border-top reads as the rule under the list.

   TURNING A PAGE STILL LANDS AT THE TOP OF THE DOCUMENT, and that is left alone
   deliberately. A page number is a LinkButton, so it is a full postback and the
   browser scrolls the new render to the top - which is where you want to be to
   read a page from its first row, and the pinned pager is in view when you get
   there, so the next page is still one click away. MaintainScrollPositionOnPostBack
   would hold the offset instead; it was tried on all eight pages and removed the
   same day at the owner's request, 2026-09-04. Don't re-add it - pinning is the
   whole fix.

   The band is the page ground rather than the card's white, which is the same
   choice .sail-formbar makes where it overlays a .sail-section: a bar passing in
   front of the content should not pretend to be part of it.

   One thing outside this file goes with it: .back-to-top is position: fixed at
   the bottom-right corner with z-index 99999, so it would paint over the last
   page number. Content/style.css lifts it clear on any page that has a pager. */
.sail-pager {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-top: var(--sp-4);
  padding: var(--sp-3) 0;
  background: var(--sail-surface-2);
  border-top: 1px solid var(--sail-line);
}

.sail-pager__summary {
  font-size: var(--t-xs);
  color: var(--sail-ink-soft);
  font-variant-numeric: tabular-nums;
}

.sail-pager__summary strong {
  font-weight: 700;
  color: var(--sail-ink);
}

.sail-pager__controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sail-pager__size {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: var(--t-xs);
  color: var(--sail-ink-soft);
  margin-right: var(--sp-3);
}

.sail-pager__page,
.sail-pager__page:link,
.sail-pager__page:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid var(--sail-line);
  background: var(--sail-surface);
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--sail-ink-soft);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  transition: border-color .14s ease, color .14s ease, background-color .14s ease;
}

.sail-pager__page:hover {
  border-color: var(--sail-blue);
  color: var(--sail-blue-ink);
}

.sail-pager__page:focus-visible {
  outline: 2px solid var(--sail-blue);
  outline-offset: 1px;
}

.sail-pager__page.is-current,
.sail-pager__page.is-current:link,
.sail-pager__page.is-current:visited {
  background: var(--sail-blue);
  border-color: var(--sail-blue);
  color: var(--white);
}

/* First and last page are a step away rather than a click away, so the ends of
   a 3,694-page list stay reachable without the pager growing to fit. A gap in
   the numbers is shown rather than hidden - it says there is more here. */
.sail-pager__gap {
  padding: 0 3px;
  color: var(--sail-ink-faint);
  font-size: var(--t-xs);
}

/* A disabled step - prev on page one - stays in place rather than disappearing,
   so the controls do not shift under the pointer as you page. */
.sail-pager__page.is-off,
.sail-pager__page.is-off:link,
.sail-pager__page.is-off:visited {
  opacity: .4;
  pointer-events: none;
}


/* ----------------------------------------------------------- a dropdown panel */

/* The column picker. A bootstrap dropdown, which is what the topbar's switcher
   and account panel already are, so the open/close behaviour on this page is
   the behaviour the shell above it already has.

   data-bs-auto-close="outside" is what makes it usable: the default closes the
   panel on any click inside it, which for a list of twenty checkboxes would
   mean reopening it twenty times. Ticking is free and Apply is the round trip,
   because a column changes the SELECT. */
.sail-menu {
  min-width: 240px;
  padding: var(--sp-3);
  border: 1px solid var(--sail-line);
  border-radius: var(--r-lg);
  background: var(--sail-surface);
  box-shadow: var(--sail-shadow-lift);
}

.sail-menu__head {
  display: block;
  font-size: var(--t-2xs);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sail-ink-faint);
  padding: 2px 4px var(--sp-2) 4px;
}

/* Capped and scrolled: twenty columns is taller than a short window, and a
   panel that runs off the bottom of the screen takes its Apply button with it. */
.sail-menu__body {
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: var(--sp-2);
}

.sail-menu__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  border-top: 1px solid var(--sail-line-soft);
  padding-top: var(--sp-3);
}

/* The CheckBoxList renders a ul; this strips the list back to rows. Styled by
   descent rather than by a class on each item because the control writes its
   own markup and only the outer class is ours to set. */
.sail-checks {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sail-checks li {
  display: flex;
  align-items: center;
  border-radius: var(--r-sm);
}

.sail-checks li:hover {
  background: var(--tint-gray);
}

.sail-checks input[type="checkbox"] {
  margin: 0 8px 0 6px;
  accent-color: var(--sail-blue);
  cursor: pointer;
  flex: 0 0 auto;
}

.sail-checks label {
  flex: 1 1 auto;
  font-size: var(--t-xs);
  color: var(--sail-ink);
  padding: 7px 6px 7px 0;
  cursor: pointer;
  user-select: none;
}


/* --------------------------------------------------------------- narrow view */

@media (max-width: 780px) {
  /* The toolbar's actions drop under the search rather than squeezing beside
     it - a 260px search field and three buttons do not share a phone's width. */
  .sail-toolbar__actions {
    width: 100%;
    /* A list with a sub-filter has four controls here, more than a phone's row. */
    flex-wrap: wrap;
  }

  .sail-pager {
    justify-content: center;
  }

  .sail-pager__summary {
    width: 100%;
    text-align: center;
  }

  /* The size picker is the first thing to go: it is a preference, and the page
     numbers are the controls somebody came to the pager for. */
  .sail-pager__size {
    display: none;
  }
}


/* ============================================================================
   A RECORD, AND THE FORM THAT EDITS IT

   The third family in this file, after the dashboard's tile and the member
   list's table. It was written for the member detail page and it is written
   shared, because six more pages are the same shape: RewardDetails,
   StoreDetails, EmailCampaignDetails, EventRuleDetails, PointRuleDetails and
   EmailTemplateDetails are all one record, some tabs, and a form.

   WHAT IT REPLACES. DevExpress's ASPxFormLayout and ASPxPageControl, which
   drew grey group boxes, put every field in a full-width box whatever it held,
   and rendered read-only values as DISABLED INPUTS - a control that says "you
   may type here, but not now" about a number nobody can ever type. The facts
   list below exists so a read-only value can look like a fact instead.

   The inputs here are ordinary <input>, <select> and <textarea>, which asp:
   server controls render and DevExpress ones do not. That is the whole reason
   they can be styled from tokens at all: a DevExpress markup attribute cannot
   take a CSS variable, which this file's siblings have run into twice already.
   ============================================================================ */


/* ------------------------------------------------------------- back to the list */

/* A detail page is somewhere you arrived FROM somewhere, so it says where back
   is. Text rather than the bare 32px green circle icon this replaces - that
   icon was from a palette the product no longer uses, and an arrow on its own
   does not say what it returns to. */
.sail-back,
.sail-back:link,
.sail-back:visited {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--sail-ink-soft);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color .14s ease;
}

.sail-back:hover {
  color: var(--sail-blue-ink);
}

.sail-back:focus-visible {
  outline: 2px solid var(--sail-blue);
  outline-offset: 3px;
  border-radius: 3px;
}


/* ------------------------------------------------------------ what this record is */

/* The row of pills under a record's name: its state, in the words somebody
   would use. They are facts rather than controls, which is why they are pills
   and not the disabled dropdowns they replace. */
.sail-idents {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}


/* --------------------------------------------------------------------- the tabs */

/* Sections of one record. Client-side: every panel is rendered and switching
   only changes which is shown, so a half-typed form is never thrown away by
   looking at something else - which is what a server round trip per tab would
   do, and the reason the tabs are not links.

   They are <button type="button"> so they cannot submit the form they sit
   inside. Getting that wrong makes every tab click a save. */
.sail-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--sail-line);
  /* THE STRIP SEPARATES ITSELF from whatever is above it, rather than relying on that
     thing to leave room. This was 0 until 2026-09-04, and on the member record - where
     the strip follows a row of stat tiles, the one block in this file with no bottom
     margin - the two boxes touched: the tabs read as a caption on the third tile rather
     than as the controls for the panel below. Sits here rather than on .sail-stats
     because it is true on all five tab pages and says nothing about a component the
     dashboard also uses. It collapses with the preceding element's own bottom margin,
     so a strip after a .sail-head gets 26px rather than 26 plus 20. */
  margin-top: var(--sp-6);
  margin-bottom: var(--sp-5);
  /* Scrolls sideways so a fourth or fifth tab is reachable on a narrow window rather
     than wrapping into a second row that the underline no longer lines up with. */
  overflow-x: auto;
  /* THE 1px MATTERS. Each tab pulls itself down by 1px so its active underline covers
     this element's border rather than stacking on top of it - which leaves the tab
     overhanging the content box by that pixel. overflow-x: auto forces overflow-y to
     compute to auto as well, so that single pixel was enough to raise a vertical
     scrollbar on the tab strip: two little arrows floating at the end of the row on
     Windows. The padding gives the overhang somewhere to sit. */
  padding-bottom: 1px;
}

/* WEIGHTED TO READ AS A CONTROL, changed 2026-09-04. This was --t-xs / 600 /
   --sail-ink-soft, which is character for character what .sail-field > label is - so a
   tab and the caption over a text box were the same piece of type, and the only thing
   marking the strip as interactive was a 2px underline on the one tab already in force.
   Body size and full ink separate it from the labels below; the 3px underline and the
   tinted active tab give the selected one something to be. */
.sail-tab {
  flex: 0 0 auto;
  appearance: none;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  padding: 11px 16px;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  font-family: var(--font-sans);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--sail-ink);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color .14s ease, border-color .14s ease, background-color .14s ease;
}

.sail-tab:hover {
  color: var(--sail-ink);
  background: var(--tint-gray);
}

.sail-tab:focus-visible {
  outline: 2px solid var(--sail-blue);
  outline-offset: -2px;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
}

/* The tint is --tint-info, declared in both themes, which is why there are no dark rules
   here. It also settles the hover: this rule and .sail-tab:hover carry the same
   specificity and this one is later, so the tab in force keeps its fill under the
   pointer rather than flicking to the grey one. */
.sail-tab[aria-selected="true"] {
  color: var(--sail-blue-ink);
  background: var(--sail-tone-action-fill);
  border-bottom-color: var(--sail-blue);
}

/* How many rows are behind a tab, so somebody can see there is nothing on the
   Rewards tab without opening it. */
.sail-tab__count {
  font-size: var(--t-2xs);
  font-weight: 700;
  color: var(--sail-ink-faint);
  background: var(--tint-gray);
  border-radius: 20px;
  padding: 1px 7px;
  font-variant-numeric: tabular-nums;
}

.sail-tab[aria-selected="true"] .sail-tab__count {
  background: var(--sail-tone-action-fill);
  color: var(--sail-tone-action-ink);
}


/* --------------------------------------------------------------------- the form */

/* NOT CAPPED - the owner's call on 2026-09-04, made looking at the carded field groups
   on a wide window. It was 1080px until then, and while the groups had no border nobody
   could see where the column ended; once they were cards it stopped a couple of hundred
   pixels short of the page and the gap beside it read as waste rather than as measure.

   The argument for the cap was real and is worth keeping in mind rather than deleting: a
   label over a very wide input for a two-letter state code is harder to use, not easier,
   and the eye has to travel to pair a caption with its field. What takes most of the
   sting out of it here is that .sail-fields is a fixed three-column grid rather than one
   field per row, so the width divides by three - a Zip box on a 2,560px window comes out
   around 780px, not 2,000.

   If it ever does read too wide, raise a number here rather than going back to a column
   that leaves a third of the page empty. */
.sail-form {
  max-width: none;
}

/* A GROUP IS A CARD, changed 2026-09-04 - the .sail-section skin, on the element that
   was already marking the group.

   It was borderless and unpainted before that, so five groups down a form the only thing
   dividing them was an 11px uppercase legend in --sail-ink-faint over a 1px
   --sail-line-soft rule. Both of those measure worse than they look. On the page ground
   the legend came out at 2.43:1, which is the figure that took --text-faint off the
   footer, and the rule under it at 1.05:1 - --sail-line-soft is for a rule inside a card
   rather than around one, and there was no card, so it was doing nothing at all. The
   result was a form that read as one undifferentiated column of fields.

   The elements stay <fieldset> and <legend>. Sail Scheduling's equivalent is a
   <section> with an <h2>, which loses the thing a legend is for: a screen reader naming
   the group when it reaches any field inside it. */
.sail-fieldset {
  background: var(--sail-surface);
  border: 1px solid var(--sail-line);
  border-radius: var(--r-lg);
  box-shadow: var(--sail-shadow);
  margin: 0 0 var(--sp-6) 0;
  padding: var(--sp-5) var(--sp-6);
  /* A fieldset's UA style is min-inline-size: min-content, so it refuses to shrink below
     its widest child and the card would hang past the page gutter on a narrow window
     instead of letting the grid inside restack. Harmless while the box had no edge;
     visible the moment it has one. */
  min-width: 0;
}

.sail-fieldset:last-child {
  margin-bottom: 0;
}

/* The group heading, promoted with the card - --t-md / 700 / full ink, which is
   .sail-section__head h2's type, so a field group and a section name themselves the same
   way. The small caps and the rule under it both go: they were doing the separating when
   nothing else was, and the card does it better. */
.sail-fieldset > legend {
  display: block;
  width: 100%;
  float: left;
  font-size: var(--t-md);
  font-weight: 700;
  color: var(--sail-ink);
  padding: 0;
  margin: 0 0 var(--sp-4) 0;
}

/* Three across at desk width. Not auto-fill: a form wants a predictable number
   of columns, and letting it choose gives five narrow ones on a wide window and
   a layout that reflows every time the sidebar opens. */
.sail-fields {
  clear: both;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
}

.sail-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

/* For a value that needs the room - an address line, an email address. */
.sail-field--wide {
  grid-column: span 2;
}

.sail-field--full {
  grid-column: 1 / -1;
}

.sail-field > label {
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--sail-ink-soft);
}

/* The required marker. Content rather than a character in the markup, so no
   page can forget it and none can spell it differently. */
.sail-field--required > label::after {
  content: " *";
  color: var(--sail-tone-bad-spine);
  font-weight: 700;
}

.sail-input {
  width: 100%;
  font-family: var(--font-sans);
  /* --t-sm because it holds the user's own words, the same rule the search
     field follows. */
  font-size: var(--t-sm);
  color: var(--sail-ink);
  background: var(--sail-surface);
  border: 1px solid var(--sail-line);
  border-radius: 7px;
  padding: 9px 11px;
  transition: border-color .14s ease, box-shadow .14s ease;
}

/* Browsers draw select and date inputs themselves and give them their own
   heights; without this a row of three fields comes out at three heights. */
select.sail-input,
input[type="date"].sail-input {
  height: 40px;
}

.sail-input::placeholder {
  color: var(--sail-ink-faint);
}

.sail-input:focus {
  outline: none;
  border-color: var(--sail-blue);
  box-shadow: 0 0 0 3px var(--sail-tone-action-fill);
}

/* :invalid alone would paint every empty required field red before the merchant
   has typed a character. :user-invalid waits until they have interacted with it,
   which is the difference between a form that helps and a form that scolds. */
.sail-input:user-invalid {
  border-color: var(--sail-tone-bad-spine);
}

.sail-field__hint {
  font-size: var(--t-2xs);
  color: var(--sail-ink-faint);
  line-height: 1.4;
}


/* ------------------------------------------------------- facts, rather than fields */

/* A read-only value. The page this replaced rendered these as disabled inputs -
   points balances, registration status, locked-out - which draws a control
   around something that is not one and greys out text that people need to read.
   A fact gets a label and a value and no box. */
.sail-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
  margin: 0;
}

.sail-fact {
  min-width: 0;
}

.sail-fact__label {
  display: block;
  font-size: var(--t-2xs);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--sail-ink-faint);
  margin-bottom: 3px;
}

.sail-fact__value {
  display: block;
  font-size: var(--t-sm);
  color: var(--sail-ink);
  overflow-wrap: break-word;
}

.sail-fact__value.is-blank {
  color: var(--sail-ink-faint);
}


/* ----------------------------------------------------------------- form footer */

/* Where a form is committed. Sticks to the bottom of the window so Save is
   reachable from anywhere in a long form without scrolling to the end - the old
   page put it after every field and nowhere else. */
.sail-formbar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-top: var(--sp-5);
  padding: var(--sp-3) 0;
  background: var(--sail-surface-2);
  border-top: 1px solid var(--sail-line);
}

/* Pushes what follows to the right, so destructive and affirmative actions sit
   at opposite ends and Delete is never where Save was a moment ago. */
.sail-formbar__gap {
  margin-left: auto;
}

/* A formbar belonging to ONE fieldset rather than to the page.
   THE STICKY TREATMENT ABOVE ASSUMES THERE IS EXACTLY ONE FORMBAR PER PAGE. A second one
   pins itself to the same edge and the two stack up in the same corner, each claiming to be
   the actions for the whole form - which is what happened the moment EmailCampaignDetails
   grew a Tags fieldset with a Save of its own (2026-09-08). The page's formbar keeps the
   sticky behaviour, because Save should be reachable without scrolling to the end of a long
   record; a section's sits where the section ends, which is where its own scope is obvious.
   position: static also drops the z-index above, since that only applies to positioned
   elements - so there is nothing left to fight the real bar for the corner. */
.sail-formbar--inline {
  position: static;
}


/* --------------------------------------------------------------------- a dialog */

/* Confirming something, or asking for the two values a small action needs.
   A native <dialog> opened with showModal(), which brings the backdrop, the
   focus trap, the Escape key and inertness of the page behind it - all of which
   the DevExpress ASPxPopupControl this replaces had to implement, and all of
   which the browser now does.

   It has to live INSIDE the WebForms <form> or the buttons in it post nothing.
   The top layer is a paint-time concept; the element stays where it is in the
   DOM, so both the postback and the inherited --sail-* tokens still work. */
.sail-dialog {
  width: min(520px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--sail-line);
  border-radius: var(--r-lg);
  background: var(--sail-surface);
  color: var(--sail-ink);
  box-shadow: var(--sail-shadow-lift);
}

.sail-dialog::backdrop {
  background: rgba(8, 15, 26, .62);
  backdrop-filter: blur(2px);
}

.sail-dialog__head {
  padding: var(--sp-5) var(--sp-5) 0 var(--sp-5);
}

.sail-dialog__head h2 {
  font-family: var(--font-sans);
  font-size: var(--t-md);
  font-weight: 700;
  color: var(--sail-ink);
  margin: 0;
}

.sail-dialog__head p {
  font-size: var(--t-xs);
  line-height: 1.5;
  color: var(--sail-ink-soft);
  margin: 6px 0 0 0;
}

.sail-dialog__body {
  padding: var(--sp-4) var(--sp-5) 0 var(--sp-5);
}

/* An action dialog's yes/no fields (SailListAction.Fields): bigger rows than a menu's
   ticks, with the label bold and a line of explanation under it. */
.sail-action-fields li {
  align-items: flex-start;
}

.sail-action-fields input[type="checkbox"] {
  margin-top: 10px;
  width: 16px;
  height: 16px;
}

.sail-action-fields label {
  font-size: var(--t-sm);
  padding: 7px 6px;
}

.sail-action-fields__mixed {
  font-size: var(--t-2xs);
  color: var(--sail-ink-soft);
}

.sail-action-fields__hint {
  display: block;
  margin-top: 2px;
  font-size: var(--t-xs);
  line-height: 1.45;
  color: var(--sail-ink-soft);
}

.sail-dialog__foot {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2);
  padding: var(--sp-5);
}

/* The affirmative half of a destructive dialog. --sail-btn--quiet is the
   restrained version for a card; once somebody has opened a dialog headed
   "Delete this member" the button that does it should say so plainly. */
.sail-btn--danger,
.sail-btn--danger:link,
.sail-btn--danger:visited {
  background: var(--sail-tone-bad-spine);
  border-color: var(--sail-tone-bad-spine);
  color: var(--white);
}

.sail-btn--danger:hover {
  background: var(--sail-tone-bad-ink);
  border-color: var(--sail-tone-bad-ink);
  color: var(--white);
}


/* -------------------------------------------------------------- a section action */

/* A section heading with something to do on the right of it - "Points history"
   and the button that adjusts them. */
.sail-section__bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}


/* --------------------------------------------------------------- narrow view */

@media (max-width: 1000px) {
  .sail-fields,
  .sail-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .sail-fields,
  .sail-facts {
    grid-template-columns: 1fr;
  }

  /* With one column there is no span left to make; without this a --wide field
     tries to cross two tracks that no longer exist. */
  .sail-field--wide {
    grid-column: auto;
  }

  .sail-formbar .sail-btn {
    flex: 1 1 auto;
  }

  .sail-formbar__gap {
    margin-left: 0;
  }
}


/* ------------------------------------------------------------- a tab's contents */

/* Every panel is in the DOM at once - that is what makes switching instant and what
   stops a tab change throwing away a half-typed form - so the hidden ones are hidden
   with the `hidden` attribute rather than removed.

   The rule is here rather than left to the browser's own [hidden] default because that
   default is display: none at the very bottom of the cascade, and ANY display
   declaration reaching this element would silently beat it and show every panel at
   once. Stating it with !important is what makes the attribute authoritative. */
.sail-tabpanel[hidden] {
  display: none !important;
}


/* -------------------------------------------------------- a figure and its text */

/* An image beside the explanation of what it is and the things you can do with it.
   Written for the store record's customer-signup QR code, and written generically
   because it is not really about QR codes: MemberPortal.aspx shows an uploaded logo
   in the same arrangement, and it is next in line to be converted.

   The figure takes its natural size and the body takes the rest, so this works for a
   square code and for a wide logo without either being told its dimensions here. */
.sail-media {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-5);
  flex-wrap: wrap;
}

/* The white ground is not decoration. A QR code has to be dark-on-light to be read,
   whatever the page around it is doing, so this panel keeps its own background in dark
   mode rather than reading a surface token - the one place on these pages where that is
   the right answer. The padding is the code's quiet zone, which scanners need. */
.sail-media__figure {
  flex: 0 0 auto;
  background: #ffffff;
  border: 1px solid var(--sail-line);
  border-radius: var(--r-sm);
  padding: var(--sp-3);
  line-height: 0;
}

.sail-media__figure img {
  display: block;
  max-width: 180px;
  height: auto;
}

.sail-media__body {
  flex: 1 1 320px;
  min-width: 0;
}

.sail-media__body p {
  font-size: var(--t-xs);
  line-height: 1.5;
  color: var(--sail-ink-soft);
  margin: 0;
  max-width: 62ch;
}

.sail-media__actions {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-top: var(--sp-4);
}

/* A field showing a value rather than collecting one - the link the code encodes. It
   stays selectable so it can be copied, but it should not read as somewhere to type. */
.sail-input[readonly] {
  background: var(--sail-surface-2);
  color: var(--sail-ink-soft);
  cursor: text;
}


/* ============================================================================
   MEMBER OPTIONS
   Three control types the system did not have, all from MemberPortal.aspx: a
   colour, a file to drop, and a picture of another product's page.
   ============================================================================ */


/* --------------------------------------------------------------- a colour */

/* A swatch and the hex behind it, side by side, because merchants arrive with
   both kinds of answer: some have a brand hex from their designer and want to
   paste it, and some just want to point at a colour. MemberPortal.js keeps the
   two in step.

   The text box is the one the server reads. The swatch carries no name and is
   never posted - so with no script the hex box still works on its own, and
   there is only ever one value in play. */
.sail-color {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

/* appearance: none, then the two vendor pseudo-elements, because a native
   colour input is drawn by the platform: left alone it is a small inset chip
   with its own border and its own height, and it will not line up with the
   text box beside it or with the plain inputs in the fieldset above. */
.sail-color__swatch {
  flex: 0 0 auto;
  width: 46px;
  height: 40px;
  padding: 3px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: var(--sail-surface);
  border: 1px solid var(--sail-line);
  border-radius: 7px;
  cursor: pointer;
  transition: border-color .14s ease, box-shadow .14s ease;
}

.sail-color__swatch::-webkit-color-swatch-wrapper { padding: 0; }
.sail-color__swatch::-webkit-color-swatch { border: none; border-radius: 4px; }
.sail-color__swatch::-moz-color-swatch { border: none; border-radius: 4px; }

.sail-color__swatch:hover {
  border-color: var(--sail-blue);
}

.sail-color__swatch:focus-visible {
  outline: none;
  border-color: var(--sail-blue);
  box-shadow: 0 0 0 3px var(--sail-tone-action-fill);
}

/* Monospaced, because it is a code rather than words - six digits in a
   proportional face do not line up column to column down a grid of seven. */
.sail-color__hex {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  text-transform: uppercase;
}


/* ---------------------------------------------------------- a file to drop */

/* The file input, in a target you can drop onto. The control this replaced had
   drag-and-drop, so this keeps it; the dashed edge is what says the whole box
   is the target and not just the button.

   It is a real file input rather than a hidden one behind a styled label, so it
   keeps its own keyboard behaviour and announces its own state - only the
   button inside it is restyled, through ::file-selector-button. */
.sail-drop {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding: 11px 12px;
  background: var(--sail-surface-2);
  border: 1px dashed var(--sail-line);
  border-radius: 7px;
  transition: border-color .14s ease, background .14s ease;
}

/* Set by MemberPortal.js while something is over the box. */
.sail-drop.is-over {
  border-color: var(--sail-blue);
  background: var(--sail-tone-action-fill);
}

.sail-drop__input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  color: var(--sail-ink-soft);
}

.sail-drop__input::file-selector-button {
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--sail-ink);
  background: var(--sail-surface);
  border: 1px solid var(--sail-line);
  border-radius: 6px;
  padding: 7px 13px;
  margin-right: 11px;
  cursor: pointer;
  transition: border-color .14s ease, color .14s ease;
}

.sail-drop__input::file-selector-button:hover {
  border-color: var(--sail-blue);
  color: var(--sail-blue-ink);
}

.sail-drop__hint {
  flex: 0 0 auto;
  font-size: var(--t-2xs);
  color: var(--sail-ink-faint);
}


/* ------------------------------------------------- a picture of the portal */

/* The member portal's own chrome, painted from the seven colour fields below
   it. Worth the shapes: the page it replaced offered seven colour pickers and a
   logo with nothing to look at, so the only way to see a change was to open the
   real portal in another tab, come back, change one, save, and reload it.

   EVERY COLOUR INSIDE IT COMES FROM A --pv-* CUSTOM PROPERTY, and none of them
   is declared here. They arrive in a style attribute on this element, written
   by the page so the served HTML is already right, and MemberPortal.js rewrites
   the same seven as the swatches move. Nothing else on these pages works that
   way, and nothing else should - this is not our palette, it is the merchant's,
   and it does not answer to our light and dark modes because the portal it
   depicts does not either.

   The frame, though, is ours: the bar, the border and the shadow read tokens
   like any other card, so the panel sits on the page in both themes. */
/* It sits in a .sail-media, so it needs a basis: with flex-basis auto its width
   would come from its own contents, which are a logo and four short words and
   would collapse it to a strip. 720 plus the body's 320 plus the gap fits the
   page at desk width - MemberPortal is a plain .sail, so 1280 - and neither has
   to give anything up; below that the body wraps underneath rather than both
   being squeezed. The figure stops growing at its own max-width, so uncapping
   .sail-form on 2026-09-04 gave the body the extra room rather than the picture. */
.sail-preview {
  flex: 0 1 720px;
  min-width: 0;
  max-width: 720px;
  border: 1px solid var(--sail-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sail-shadow);
}

/* A browser bar, and it is not decoration: it is where the portal's own
   address goes, which is the thing a merchant needs when somebody asks them
   for the link. */
.sail-preview__bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 9px 13px;
  background: var(--sail-surface-2);
  border-bottom: 1px solid var(--sail-line);
}

.sail-preview__dots {
  flex: 0 0 auto;
  display: inline-flex;
  gap: 5px;
}

.sail-preview__dots i {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--sail-line);
}

.sail-preview__url {
  min-width: 0;
  font-family: var(--font-mono);
  font-size: var(--t-2xs);
  color: var(--sail-ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sail-preview__page {
  background: var(--pv-page);
  color: var(--pv-text);
}

.sail-preview__header {
  background: var(--pv-header);
  text-align: center;
  padding: 10px;
}

/* The portal scales the logo to 150px tall inside a full-width header; this is
   about half of that, which keeps the whole panel to a height somebody can take
   in at the same time as the swatches underneath it. */
.sail-preview__logo {
  display: inline-block;
  max-width: 90%;
  max-height: 76px;
  vertical-align: middle;
}

.sail-preview__nav {
  background: var(--pv-nav);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 20px;
  padding: 10px 13px;
}

.sail-preview__link {
  font-size: var(--t-xs);
  color: var(--pv-normal);
  transition: color .14s ease;
}

/* The whole reason the hover colour is worth previewing. It is the one of the
   seven that cannot be seen any other way without hovering the real portal. */
.sail-preview__link:hover {
  color: var(--pv-hover);
}

.sail-preview__link.is-current {
  color: var(--pv-active);
}

.sail-preview__body {
  padding: 20px 16px 26px 16px;
  text-align: center;
}

.sail-preview__body p {
  margin: 0;
}

.sail-preview__hi {
  font-size: var(--t-xl);
  font-weight: 700;
  line-height: 1.2;
}

.sail-preview__line {
  font-size: var(--t-xs);
  line-height: 1.5;
  margin-top: 4px;
}

.sail-preview__line--strong {
  font-weight: 700;
  margin-top: 14px;
}

.sail-preview__balance {
  font-size: 52px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
}


/* ------------------------------------------------- narrow view, these three */

@media (max-width: 620px) {
  /* The nav wraps to two rows before this, which is what the portal does too. */
  .sail-preview__nav {
    gap: 6px 14px;
  }

  .sail-preview__balance {
    font-size: 40px;
  }

  /* The hint drops under the file input rather than being squeezed beside it. */
  .sail-drop__hint {
    flex: 1 1 100%;
  }
}


/* =================================================================================
   TAGS - the email template list and record
   ---------------------------------------------------------------------------------
   Added 2026-09-04 with email-template tagging. Three shapes, and the restraint is the
   point: the filter menu, the bulk dialog and the suggestion dialog are all .sail-menu
   and .sail-checks, which already existed, and the bulk action is an ordinary
   .sail-btn in the toolbar that JavaScript enables once a row is ticked. Only the chip
   itself and the row's tick column are genuinely new control types.

   THE CHIP CARRIES NO COLOUR OF ITS OWN, and that is the system's rule rather than an
   oversight: colour means status here, not category. Every tag UI people know - Gmail,
   Jira, Notion - is a rainbow, so this will be asked for; the answer is the same one the
   merchant switcher's tile got, which is that a per-category hue spends the only colour
   vocabulary the system has on a distinction the text already makes. What DOES change
   colour is state: a tag being filtered on is --tint-info, like the switcher's current
   account.

   Both fills are brand.css --tint-* pairs, each declared in both themes, so this whole
   block needs no dark-mode rules.
   ================================================================================= */

/* A row's tags. Wraps rather than scrolling - a template with eight tags is a row three
   lines tall, which reads better than a cell that hides half of them behind a scrollbar
   nobody discovers in a table that already scrolls sideways. */
.sail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.sail-tag {
  display: inline-flex;
  align-items: center;
  max-width: 22ch;
  padding: 2px var(--sp-2);
  border-radius: 999px;
  background: var(--tint-gray);
  color: var(--tint-gray-ink);
  font-size: var(--t-2xs);
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The ones the list is currently filtered on, so a row says which of its tags is doing
   the narrowing. Same tone the switcher uses for "this is the one you are on". */
.sail-tag.is-active {
  background: var(--tint-info);
  color: var(--tint-info-ink);
}

/* A chip in a row is a button - it filters the list to that tag, and clicking it again
   stops. The base rule above was written for a span, so the button needs the resets a
   span never did; everything visual stays in one place rather than being duplicated for
   the two element types. */
button.sail-tag {
  border: 0;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

button.sail-tag:hover {
  background: var(--tint-info);
  color: var(--tint-info-ink);
}

/* Keyboard focus has to be visible on a control this small, and the chips sit close
   enough together that an outline needs the offset to stay readable. */
button.sail-tag:focus-visible {
  outline: 2px solid var(--sail-blue);
  outline-offset: 1px;
}

/* The tick column on a list that supports bulk actions.
   Fixed and narrow, and the header cell holds the select-all box. The label wrapper
   gives the box a bigger hit area than the 13px control itself without changing how it
   looks - a 40px row with a tiny target is the difference between ticking eight rows and
   ticking seven and one you did not mean. */
.sail-table th.sail-pick,
.sail-table td.sail-pick {
  width: 34px;
  padding-right: 0;
  text-align: center;
}

.sail-pick label {
  display: block;
  margin: 0;
  padding: var(--sp-2) 0;
  cursor: pointer;
}

.sail-pick input {
  display: block;
  margin: 0 auto;
  cursor: pointer;
}

/* A ticked row, so the selection is visible while the toolbar button is being reached
   for. --tint-info again, and it beats the zebra stripe rather than blending with it. */
.sail-table tbody tr.is-picked > td {
  background: var(--tint-info);
}

/* One suggestion: what it would be called, and how many templates it lands on. The count
   sits on the right of the row so the numbers line up down the list and the eye can find
   the big ones without reading every name. .sail-checks supplies the row itself. */
.sail-suggest__count {
  margin-left: auto;
  padding-left: var(--sp-3);
  color: var(--sail-ink-soft);
  font-size: var(--t-2xs);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* The tag menus and dialogs get taller than the window on a merchant with a real
   vocabulary, so the list scrolls inside and the Apply button stays reachable. */
.sail-taglist {
  max-height: 320px;
  overflow-y: auto;
}

/* The filter above the "Email template" select, on the three pages that have one.
   A row of two controls that narrow the select underneath rather than replacing it - see
   Content/pagejs/SailTemplatePicker.js for why the select itself is left alone. The tag menu
   hides itself when the merchant has no tags, so this is usually just the text box. */
.sail-pickfilter {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: 6px;
}

.sail-pickfilter [data-sail-template-search] {
  flex: 1 1 auto;
  min-width: 0;
}

.sail-pickfilter [data-sail-template-tag] {
  flex: 0 1 auto;
  max-width: 40%;
}


/* ------------------------------------------------------------------ the line chart

   The dashboard's "Members added over time" panel, and the system's first chart. It is a
   NEW SHAPE by the test at the top of this file - a plot is a control the card system could
   not express, not a rearrangement of one it already had - but it is a small one, because
   the panel around it is an ordinary .sail-section and the picker in its header is the
   .sail-select the list pages already use.

   EVERY COLOR HERE IS A TOKEN AND THE SVG CARRIES NO PAINT ATTRIBUTES OF ITS OWN. That is
   the whole reason the chart is hand-drawn markup rather than a control: `fill` and `stroke`
   are ordinary CSS properties on an SVG element, so the line is --sail-blue and follows the
   theme the same way a button does, and dark mode needs not one rule below. A DevExpress
   chart takes its colors as server-side markup attributes, which cannot read a variable.

   ONE TONE, because color means status and not category - the same rule the dashboard's
   tiles follow. There is a single series here, so there is nothing for a second hue to
   distinguish. */

/* No margin of its own. This carried a margin-top until 2026-09-14, when the tiles above it
   were a separate grid that ended flush against it; the chart is now a card in the same board
   as the tiles, so the board's own gap is what separates it and a margin here would show up as
   one card sitting lower than the ones beside it. */
.sail-chart {
  margin-top: 0;
}

.sail-chart__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}

.sail-chart__title {
  min-width: 0;
}

.sail-chart__summary {
  font-size: var(--t-sm);
  color: var(--sail-ink-soft);
  margin: 2px 0 0;
}

/* The label sits above its select rather than beside it, so the picker keeps the same
   shape when the head wraps to two lines on a narrow window. */
.sail-chart__scope {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: none;
}

.sail-chart__scope label {
  font-size: var(--t-2xs);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--sail-ink-faint);
}

/* A FLOOR, AND THE SCROLLER THAT GOES WITH IT. An SVG with a fixed viewBox scales everything
   inside it with its width, text included - so at 420px the chart came out 305px wide and
   83px tall with 4px axis labels, which is a picture of a chart rather than a chart. Below
   about 700px of card it scrolls sideways instead, which is what this system already does
   with a wide table and what the house rule allows for a diagram. On any normal window the
   container is wider than the floor and no scrollbar appears at all. */
.sail-chart__plot {
  overflow-x: auto;
}

/* height: auto against the viewBox is what makes the plot responsive: the SVG keeps its
   aspect ratio and every coordinate inside it is in viewBox units, so nothing needs to be
   recalculated when the card changes width. */
.sail-chart__svg {
  display: block;
  width: 100%;
  min-width: 680px;
  height: auto;
  overflow: visible;
}

.sail-chart__grid {
  stroke: var(--sail-line);
  stroke-width: 1;
}

.sail-chart__ylabel,
.sail-chart__xlabel {
  font-family: var(--font-sans);
  font-size: 13px;
  fill: var(--sail-ink-faint);
}

.sail-chart__area {
  fill: var(--sail-blue);
  opacity: .1;
}

.sail-chart__line {
  fill: none;
  stroke: var(--sail-blue);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.sail-chart__dot {
  fill: var(--sail-surface);
  stroke: var(--sail-blue);
  stroke-width: 2;
}

/* The catchable target for the native tooltip, twelve units across and invisible. Without
   it every point on this chart would be a three-unit circle to hit. */
.sail-chart__hit {
  fill: transparent;
}

.sail-chart__pt:hover .sail-chart__dot {
  fill: var(--sail-blue);
}

.sail-chart__empty {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-6) 0;
  justify-content: center;
  font-size: var(--t-sm);
  color: var(--sail-ink-soft);
}

.sail-chart__empty i {
  font-size: 1.1rem;
  color: var(--sail-ink-faint);
}


/* ============================================================================
   IPAY ADDITIONS - shapes Sail Rewards does not have yet. Kept at the end so the
   copied body above stays diffable against Rewards' file.
   ============================================================================ */

/* The sentence under a list's tabs saying what this tab holds. */
.sail-list__lede {
  margin: calc(-1 * var(--sp-2)) 0 var(--sp-4) 0;
  max-width: 90ch;
  font-size: var(--t-xs);
  line-height: 1.5;
  color: var(--sail-ink-soft);
}

/* THE BULK BAR - what can be done to the ticked rows. A control type the system did not
   have: Rewards' bulk tagging lives in a dialog, but iPay's invoice approvals are the
   main job of their page, so they sit in plain view above the table. The buttons are
   disabled until something is ticked (SailUI.js), and each opens a confirmation. */
.sail-bulkbar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
  padding: 8px 12px;
  border: 1px solid var(--sail-line);
  border-radius: var(--r-sm);
  background: var(--sail-surface-2);
}

.sail-bulkbar__count {
  margin-right: auto;
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--sail-ink-soft);
}

.sail-bulkbar .sail-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* A field that cannot be changed right now (editing yourself on User Management) reads as
   such rather than as a live control that ignores you. */
.sail-input:disabled {
  background: var(--sail-surface-2);
  color: var(--sail-ink-faint);
  cursor: not-allowed;
}

/* A table whose rows are not links, with actions in the last cell instead. */
.sail-table.is-static tbody tr {
  cursor: default;
}

.sail-table.is-static tbody tr:hover {
  background: none;
}

.sail-table td.sail-row-actions,
.sail-table th.sail-row-actions {
  text-align: right;
  white-space: nowrap;
}

.sail-table td.sail-row-actions .sail-btn + .sail-btn {
  margin-left: 6px;
}

/* A row's labelled action on a list whose rows are links (the customer list's "New
   invoice"). It is an anchor in a cell, so it takes back the button look the table's
   plain-link rules above would otherwise give it. */
.sail-table td.sail-row-actions a.sail-btn,
.sail-table td.sail-row-actions a.sail-btn:link,
.sail-table td.sail-row-actions a.sail-btn:visited {
  padding: 5px 12px;
  color: var(--sail-ink);
  text-decoration: none;
}

.sail-table td.sail-row-actions a.sail-btn:hover,
.sail-table tbody tr[data-href]:hover td.sail-row-actions a.sail-btn {
  border-color: var(--sail-blue);
  color: var(--sail-blue-ink);
  text-decoration: none;
}

/* Narrow: the count takes its own line and the actions sit together under it, rather
   than one button wrapping away from its neighbours. */
@media (max-width: 600px) {
  .sail-bulkbar__count {
    flex: 1 0 100%;
    margin-right: 0;
  }
}

/* A switch in a list cell (a tab's ToggleColumns - the invoice list's ACH Disabled and
   Card Fees Disabled). Bootstrap's form-switch, without its left gutter, centred under its
   header, and in the brand colour when on. Disabled means locked until its row is ticked
   (not-allowed), or saving (data-sail-saving, progress). */
.sail-table td.sail-toggle-cell {
  width: 1%;
  white-space: nowrap;
}

.sail-switch.form-check {
  display: flex;
  justify-content: center;
  min-height: 0;
  margin: 0;
  padding-left: 0;
}

.sail-switch .form-check-input {
  float: none;
  margin: 0;
  cursor: pointer;
}

.sail-switch .form-check-input:checked {
  background-color: var(--sail-blue);
  border-color: var(--sail-blue);
}

.sail-switch .form-check-input:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.sail-switch .form-check-input[data-sail-saving] {
  opacity: .7;
  cursor: progress;
}

/* A Boolean column (the switches, or Yes / No where they are read-only): centred, and its
   header allowed to wrap - the cells hold one small control, so a two-word caption on
   one line would make the column several times wider than anything in it. */
.sail-table th.is-flag,
.sail-table td.is-flag {
  text-align: center;
}

.sail-table thead th.is-flag {
  /* Wide enough for "CARD FEES" beside its sort caret on one line; table cells ignore
     max-width, so this is what sets the column. */
  min-width: 7.5rem;
  white-space: normal;
  line-height: 1.3;
}

.sail-table th.is-flag a,
.sail-table th.is-flag a:link,
.sail-table th.is-flag a:visited {
  justify-content: center;
  white-space: normal;
}

/* ---------------------------------------------------------------- stacked rows on phones

   A SailList with StackOnPhone (the customer's invoice lists and saved methods): under
   620px each row is a card of "CAPTION  value" lines instead of a wide table to swipe
   across. The caption comes from the cell's data-label. */
@media (max-width: 620px) {
  .sail-table--stack,
  .sail-table--stack tbody,
  .sail-table--stack tr,
  .sail-table--stack td {
    display: block;
    width: 100%;
  }

  .sail-table--stack thead {
    display: none;
  }

  .sail-table--stack tr {
    padding: 10px 14px;
    border-bottom: 1px solid var(--sail-line);
  }

  .sail-table--stack td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 3px 0;
    border: 0;
    text-align: right;
  }

  .sail-table--stack td::before {
    content: attr(data-label);
    flex: none;
    font-size: var(--t-2xs);
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--sail-ink-faint);
    text-align: left;
  }

  .sail-table--stack td:not([data-label])::before {
    content: none;
  }

  .sail-table--stack td.sail-row-actions {
    justify-content: flex-end;
    padding-top: 8px;
  }
}
