/* Online Gift Cards - portal and public pages.
   One stylesheet, no build step, no framework. */

:root {
  --ink:        #111827;
  --ink-soft:   #374151;
  --muted:      #6b7280;
  --faint:      #9ca3af;
  --line:       #e5e7eb;
  --bg:         #f4f4f5;
  --panel:      #ffffff;
  --brand:      #0f766e;
  --danger:     #b91c1c;
  --danger-bg:  #fef2f2;
  --ok:         #047857;
  --ok-bg:      #ecfdf5;
  --warn:       #b45309;
  --warn-bg:    #fffbeb;
  --radius:     12px;
  --wrap:       1400px;
  --shadow:     0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }

.muted { color: var(--muted); }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.center { text-align: center; }

/* ------------------------------------------------------------------ flash */

.flash-stack {
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: min(560px, calc(100vw - 32px));
  display: grid;
  gap: 8px;
}

.flash {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  box-shadow: var(--shadow);
  background: var(--panel);
  border: 1px solid var(--line);
}
.flash-success { background: var(--ok-bg);     border-color: #a7f3d0; color: var(--ok); }
.flash-error   { background: var(--danger-bg); border-color: #fecaca; color: var(--danger); }
.flash-info    { background: #eff6ff;          border-color: #bfdbfe; color: #1d4ed8; }

/* ------------------------------------------------------------------- auth */

/* Sign in, forgotten password and reset all share this: a panel saying what
   the product is, and the form beside it. The panel is not decoration for its
   own sake - the people who land here use this a handful of times a month, and
   an unnamed box is how somebody decides they are on the wrong website. */

.auth-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  color: #e6fffb;
  background: radial-gradient(1100px 620px at 12% 8%, #17877e 0%, transparent 60%),
              linear-gradient(150deg, #0f766e 0%, #0b3b45 55%, #07222a 100%);
}

/* A wash of light across the top corner, so the flat gradient has somewhere to
   start. Pointer-events off: it covers the whole panel. */
.auth-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(760px 420px at 88% 102%, rgba(225,29,72,.14) 0%, transparent 58%);
  pointer-events: none;
}

.auth-brand-inner { position: relative; z-index: 1; max-width: 420px; }

.auth-art {
  width: 220px;
  height: auto;
  display: block;
  margin-bottom: 30px;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.28));
}

.auth-brand-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -.5px;
  color: #fff;
}

.auth-brand-lead {
  margin: 10px 0 0;
  font-size: 16px;
  color: rgba(230,255,251,.82);
}

.auth-brand-points {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: rgba(230,255,251,.78);
}
.auth-brand-points li {
  position: relative;
  padding: 0 0 0 26px;
  margin-top: 12px;
}
/* A tick drawn in CSS - one less thing to load, and it inherits the colour. */
.auth-brand-points li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  width: 6px;
  height: 11px;
  border: solid rgba(255,255,255,.75);
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}

.auth-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}

/* Fixed box so the card does not jump as the logo loads. */
.auth-logo {
  display: block;
  height: 44px;
  width: auto;
  margin: 0 0 24px;
}

.auth-title { font-size: 20px; margin: 0 0 4px; }
.auth-sub { margin: 0; }

.auth-foot {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--faint);
  text-align: center;
  max-width: 380px;
}

/* One column on anything narrow. The panel goes first and shrinks to a strip:
   it is worth keeping for the name alone, and not worth a phone screen. */
@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; min-height: 100vh; }
  .auth-brand { padding: 34px 24px 30px; }
  .auth-brand-inner { max-width: none; text-align: center; }
  .auth-art { width: 150px; margin: 0 auto 18px; }
  .auth-brand-title { font-size: 24px; }
  .auth-brand-points { display: none; }
  .auth-main { padding: 28px 20px 48px; }
}

/* ------------------------------------------------------------------ forms */

.field { display: block; margin-top: 16px; }
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.input, select.input, textarea.input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15,118,110,.12);
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: 600 15px/1.2 inherit;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-block { width: 100%; }

/* -------------------------------------------------- recipient's gift card */

.gc-page {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 48px;
}

.gc-card {
  width: 100%;
  max-width: 460px;
  background: var(--panel);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.gc-head {
  background: var(--brand);
  padding: 26px 24px;
  text-align: center;
}
.gc-logo { display: block; max-width: 100%; height: auto; margin: 0 auto; }
/* A banner is the header: edge to edge, as in the email. */
.gc-head--banner { padding: 0; line-height: 0; }
.gc-shop { color: #fff; font-size: 21px; font-weight: 600; letter-spacing: .3px; }

.gc-body { padding: 28px 28px 8px; text-align: center; }

.gc-label {
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
}

.gc-value {
  font-size: 46px;
  font-weight: 700;
  line-height: 1.1;
  padding: 4px 0 2px;
}

.gc-names { color: var(--ink-soft); font-size: 16px; }

.gc-message {
  margin: 18px 0 0;
  padding: 14px 16px;
  background: #f9fafb;
  border-left: 3px solid var(--brand);
  border-radius: 0 8px 8px 0;
  text-align: left;
  font-style: italic;
  color: var(--ink-soft);
}

.gc-qr-box {
  margin-top: 24px;
  padding: 22px 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.gc-qr {
  display: block;
  width: 260px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 14px;
  image-rendering: pixelated; /* keep the modules crisp when scaled up */
}

.gc-serial {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 1.6px;
  padding-top: 2px;
  /* The number gets read aloud and typed into a till - make it selectable
     and easy to hit on a phone. */
  user-select: all;
}

.gc-hint { color: var(--muted); font-size: 13px; margin: 10px 0 0; }

.gc-terms {
  color: var(--muted);
  font-size: 13px;
  text-align: left;
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.gc-foot {
  padding: 16px 28px 26px;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

/* Printing the card is a legitimate thing to do with it. */
@media print {
  body { background: #fff; }
  .gc-card { box-shadow: none; border: 1px solid var(--line); }
  .flash-stack { display: none; }
}

/* ==========================================================================
   Portal
   ========================================================================== */

.topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-platform { background: #111827; border-bottom-color: #1f2937; }
.topbar-platform .brand-text,
.topbar-platform .whoami { color: #e5e7eb; }
.topbar-platform .linklike { color: #9ca3af; }

.topbar-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 8px 20px;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--brand);
  flex: 0 0 auto;
}
.brand-mark-platform { background: #f59e0b; }
.brand-text { font-weight: 650; color: var(--ink); white-space: nowrap; }

.nav { display: flex; flex-wrap: wrap; gap: 4px 2px; flex: 1 1 auto; }
.nav-link {
  /* 10px, not 12. Ten tabs plus the store name plus the account controls come
     to within a hair of the 1400px bar, and two pixels a side is 40 across the
     row - invisible to look at, and the difference between one row and two on
     a store with a long name. */
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 550;
  white-space: nowrap;
}
.nav-link:hover { background: #f3f4f6; color: var(--ink); }
.nav-link.is-active { background: #f0fdfa; color: var(--brand); }
.nav-link-quiet { color: var(--faint); }

.badge {
  display: inline-block;
  min-width: 18px;
  padding: 1px 6px;
  margin-left: 4px;
  border-radius: 9px;
  background: var(--warn);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.topbar-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }

/* The one control in the bar that is a shape rather than a word. Round so it
   reads as help at a glance, and small enough not to compete with the nav. */
.help-link {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}
.help-link:hover { background: #f3f4f6; color: var(--ink); border-color: #d1d5db; }
.topbar-platform .help-link { border-color: #374151; color: #9ca3af; }
.topbar-platform .help-link:hover { background: #1f2937; color: #e5e7eb; }
.whoami { font-size: 13px; color: var(--muted); white-space: nowrap; }

.linklike {
  background: none; border: 0; padding: 0;
  font: inherit; font-size: 13px;
  color: var(--muted); cursor: pointer; text-decoration: underline;
  white-space: nowrap;
}
.linklike:hover { color: var(--ink); }

.inline { display: inline; }
.ml-8 { margin-left: 8px; }

.page { max-width: var(--wrap); margin: 0 auto; padding: 24px 20px 64px; }

.banner { padding: 10px 20px; text-align: center; font-size: 14px; font-weight: 550; }
.banner-warn { background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid #fde68a; }
.banner-acting {
  background: #111827;
  color: #e5e7eb;
  border-bottom: 1px solid #1f2937;
}
.banner-acting strong { color: #fbbf24; }
.banner-action { color: #93c5fd; margin-left: 10px; }
.banner-action:hover { color: #dbeafe; }

.flash-inline { display: grid; gap: 8px; margin-bottom: 20px; }

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.page-head h1 { font-size: 24px; margin: 0; }
.page-head-actions { display: flex; align-items: center; gap: 8px; }

.back {
  display: inline-block;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 2px;
}
.back:hover { color: var(--ink); }

.lede { color: var(--ink-soft); max-width: 62ch; margin: -8px 0 20px; }
.amount { font-size: 26px; font-weight: 700; }

/* ------------------------------------------------------------------ stats */

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  display: block;
}
a.stat:hover { border-color: var(--brand); }
.stat-value { display: block; font-size: 26px; font-weight: 700; line-height: 1.2; }
.stat-label { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.stat-attention { border-color: #fcd34d; background: var(--warn-bg); }
.stat-attention .stat-value { color: var(--warn); }
.stat-ok { border-color: #a7f3d0; background: var(--ok-bg); }
.stat-ok .stat-value { color: var(--ok); }

/* ----------------------------------------------------------------- panels */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 16px;
  align-items: start;
}

/* Same two panels, but the left one gets the room. For a list whose last
   column is a row of buttons - staff - where equal halves leave the buttons
   clipped against the panel edge. */
.grid-2-wide { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }

@media (max-width: 1080px) {
  .grid-2-wide { grid-template-columns: minmax(0, 1fr); }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px 20px;
  margin-bottom: 16px;
}
.panel-narrow { max-width: 460px; }
.panel-danger { border-color: #fecaca; }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.panel-head h2 { font-size: 15px; margin: 0; font-weight: 650; }

.subhead { font-size: 14px; margin: 18px 0 8px; font-weight: 650; }

/* The one screen in the portal that is read rather than scanned. Everything
   else here is a table or a form, where full width helps; running prose at
   1400px is about 120 characters a line and nobody finishes it. The step
   table keeps the full width, because it is still a table. */
.help-page p { max-width: 74ch; }
.empty { color: var(--muted); padding: 12px 0; margin: 0; }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.sub { color: var(--muted); font-size: 12px; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.tight { margin: 8px 0 0; padding-left: 18px; }
.tight li { margin: 2px 0; }
.error-text { color: var(--danger); }
.break { word-break: break-all; }

/* --------------------------------------------------------------- callouts */

.callout {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 14px;
}
.callout-warn  { background: var(--warn-bg);   border-color: #fde68a; color: #78350f; }
.callout-error { background: var(--danger-bg); border-color: #fecaca; color: #7f1d1d; }
.callout-ok    { background: var(--ok-bg);     border-color: #a7f3d0; color: #065f46; }
.callout-action { margin-left: 6px; font-weight: 600; }

/* ----------------------------------------------------------------- tables */

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left;
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  padding: 0 10px 8px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 10px; border-bottom: 1px solid #f3f4f6; vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table-roomy td { padding: 14px 10px; }
.table .num, .table th.num { text-align: right; }
.table .right, .table th.right { text-align: right; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 650; }
.row-warn { background: #fffdf5; }
.row-muted { opacity: .55; }

.mono, .serial {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}
.serial { font-size: 17px; font-weight: 650; letter-spacing: 1px; user-select: all; }

/* ------------------------------------------------------------------- tags */

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
}
.tag-ok    { background: var(--ok-bg);     color: var(--ok); }
.tag-warn  { background: var(--warn-bg);   color: var(--warn); }
.tag-error { background: var(--danger-bg); color: var(--danger); }
.tag-muted { background: #f3f4f6;          color: var(--muted); }

/* ------------------------------------------------------------------ forms */

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-sm { padding: 5px 8px; font-size: 13px; }
/* A select inside a table cell inherits the column's width and clips its own
   options ("Manag...", "Shop fl..."). Give it room to say what it is. */
.table .input-sm { width: auto; min-width: 118px; }
.input-lg { padding: 13px 16px; font-size: 16px; }

.colour-field { display: flex; align-items: center; gap: 10px; }
.input-colour { width: 52px; height: 36px; padding: 3px; cursor: pointer; }

.searchbar { display: flex; gap: 10px; margin-bottom: 20px; }
.searchbar .input { flex: 1 1 auto; }

.row-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-form .input { flex: 1 1 240px; }

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.btn-sm { padding: 5px 11px; font-size: 13px; }
.btn-lg { padding: 13px 26px; font-size: 16px; }
.btn-quiet { background: #fff; border-color: var(--line); color: var(--ink-soft); }
.btn-quiet:hover { background: #f9fafb; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-quiet { background: #fff; border-color: #fecaca; color: var(--danger); }
.btn-danger-quiet:hover { background: var(--danger-bg); }

.bulk { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.resend { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }

.sample {
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 13px;
  overflow-x: auto;
}

/* ---------------------------------------------------------------- details */

.details { display: grid; grid-template-columns: 132px 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.details dt { color: var(--muted); font-size: 13px; }
.details dd { margin: 0; }

.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}
.status-label { width: 60px; color: var(--muted); font-size: 13px; }

/*
 * The branding screen's window onto the real gift email. The frame is taller
 * than the window and the window clips it, so what shows is the top of the
 * email at the panel's width - phone width - with a fade where it is cut.
 */
.email-peek {
  position: relative;
  height: 300px;
  overflow: hidden;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  background: #f4f4f5;
}
.email-peek iframe {
  display: block;
  width: 100%;
  height: 720px;
  border: 0;
  pointer-events: none;
}
/* An input with its button beside it, e.g. "Send a test email". */
.inline-field { display: flex; gap: 8px; align-items: center; }
.inline-field .input { flex: 1; min-width: 0; }

.email-peek::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 56px;
  background: linear-gradient(rgba(244, 244, 245, 0), #f4f4f5);
}

/* Below this the nav gets a row of its own rather than being squeezed in
   beside the account controls. It would wrap on its own anyway; this just
   makes it a clean full-width row instead of a ragged one. A hidden nav item
   on a till tablet is one nobody finds. */
@media (max-width: 980px) {
  .topbar-inner {
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 10px 16px;
  }
  .nav { order: 3; flex-basis: 100%; gap: 4px; }
  .topbar-right { margin-left: auto; }
}

@media (max-width: 720px) {
  .field-row { grid-template-columns: 1fr; }
  .details { grid-template-columns: 1fr; gap: 2px 0; }
  .details dd { margin-bottom: 10px; }
  .page-head { flex-direction: column; }
}

/* Two ways to do the same job, side by side. The recommended one is marked
   rather than merely listed first - on a setup screen nobody sees twice, a
   nudge is worth more than a paragraph. */
.choice {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 18px;
  background: #fff;
}
.choice-primary { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15,118,110,.07); }
.choice .subhead { margin-top: 0; }

.check { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; }
.check input { width: 16px; height: 16px; }

.tight-p { margin: 8px 0 0; }

/* ------------------------------------------------------------- till pairing
   The pairing code is read off this screen and typed into a console on the
   shop's server, sometimes over the phone. Big, monospaced and widely spaced:
   the alphabet already excludes I, L, O, U, 0 and 1, and this is the other
   half of making it hard to get wrong. */
.pairing-code {
    font-size: 2rem;
    letter-spacing: 0.18em;
    font-weight: 600;
    text-align: center;
    margin: 0.5rem 0 1rem;
    padding: 0.9rem 0.5rem;
    background: #f4f6f8;
    border: 1px dashed #c7ced6;
    border-radius: 8px;
    word-break: break-all;
}

.pairing-command {
    padding: 0.7rem 0.9rem;
    background: #1f2430;
    color: #e8edf4;
    border-radius: 6px;
    overflow-x: auto;
    white-space: pre;
    font-size: 0.9em;
}

/* ------------------------------------------------- dates, filters, figures */

/*
 * A label and its field side by side, for filter bars. The stacked .field is
 * right inside a form somebody is filling in; in a row of date pickers it
 * wastes a line per control and pushes the page about.
 */
.field-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
}
.field-inline .field-label { margin-bottom: 0; white-space: nowrap; }
.field-inline .input { width: auto; }

.input-sm { padding: 6px 10px; font-size: 14px; }

/* The dashboard's date range: quiet, and clearly subordinate to the tiles. */
.range-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: -8px 0 20px;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.range-row .field-label { font-size: 12px; color: var(--muted); }
.range-more {
  margin-left: auto;
  font-size: 13px;
  color: var(--brand);
  text-decoration: none;
  white-space: nowrap;
}
.range-more:hover { text-decoration: underline; }

/* The sales page's own bar, which has room to be a little larger. */
.filter-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.filter-shortcuts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}

.chip {
  display: inline-block;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: none;
  background: #fff;
}
.chip:hover { background: #f9fafb; }
.chip-on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* The range a figure covers, under its label. */
.stat-range { display: block; font-size: 12px; color: var(--faint); margin-top: 1px; }

/*
 * A proportion bar in a table cell. Not a chart - just enough to see which
 * days were busy without pulling in a library to draw it.
 */
.bar-cell { width: 35%; padding-left: 12px !important; }
.bar {
  display: block;
  height: 8px;
  min-width: 2px;
  border-radius: 999px;
  background: var(--brand);
  opacity: .75;
}

/* --------------------------------------------------- small inline actions */

/*
 * A button that reads as a link. For the secondary of two choices sitting
 * together - "put it back" beside a cleared error - where a second real
 * button would give equal weight to the thing people rarely want.
 */
.btn-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--brand);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}
.btn-link:hover { color: var(--ink); }

/* A form that is only a button, sitting in the flow of a sentence or a row. */
.inline-form { display: inline-block; margin: 6px 0 0; }

.auth-aside { margin: 16px 0 0; text-align: center; font-size: 13px; }
.auth-aside a { color: var(--muted); }
.auth-aside a:hover { color: var(--brand); }

/* A callout with an action in its top-right corner. */
.callout-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .filter-shortcuts, .range-more { margin-left: 0; }
  .range-row, .filter-row { gap: 10px; }
}

/* A small panel that opens from a button in a table row - "Set one…" on the
   staff list. A <details> so it needs no JavaScript; the summary is styled as
   a button and its default marker is removed. */

.pop { display: inline-block; position: relative; }
.pop > summary { list-style: none; cursor: pointer; display: inline-block; }
.pop > summary::-webkit-details-marker { display: none; }
.pop > summary::marker { content: ""; }

.pop-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  width: 236px;
  padding: 12px;
  text-align: left;
  white-space: normal;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.pop-panel .input { width: 100%; }

/* "or" with a rule through it, between the two forms in the panel. */
.pop-or {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  font-size: 12px;
  color: var(--faint);
}
.pop-or::before, .pop-or::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

/* The facts under a stored logo: what size it actually is. */
.logo-facts {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

/* A short spec list - label on the left, answer on the right. Used for the
   logo requirements, where a paragraph would bury the one number somebody
   came to the page for. */
.spec {
  margin: 14px 0 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  font-size: 13px;
}
.spec dt { color: var(--muted); }
.spec dd { margin: 0; color: var(--ink-soft); }

/* A table used as a spec sheet rather than a list of rows: the header cells
   run down the left instead of across the top. */
.table tbody th {
  font-weight: 600;
  color: var(--muted);
  text-align: left;
  vertical-align: top;
}

/* A fallback tucked under the main path - the Shopify page's "doing it by hand". */
.manual > summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.manual ol { margin: 8px 0 8px 20px; padding: 0; }
.manual li { margin-bottom: 6px; }

/* .hint carries its own top margin and comes later, so it beat the utility. */
.hint.mt-16 { margin-top: 16px; }
