/* ===========================================================================
   Flayr — design system
   One stylesheet for tokens, type and components, loaded on every page:
   the public site, the customer account and the admin. site.css adds the
   marketing sections; admin.css adds the admin shell. Nothing else should
   define colours, radii or type sizes — use the tokens.

   Principles: light (#FAFAFC) background, white surfaces, no borders — depth
   comes from surface contrast and generous space. Rounded corners on every
   image and card. Geist for everything.
   ======================================================================== */

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/geist-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/geist-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../fonts/geist-mono-latin.woff2) format('woff2');
}

:root {
  /* Brand — the only colours carried over from the old identity */
  --navy:        #1B2B48;
  --navy-hover:  #26395C;
  --teal:        #58C0B3;
  --teal-deep:   #3F8C85;
  --teal-ink:    #2E766F;   /* teal for small text on light: passes AA */
  --mint:        #C2F2E9;   /* the light circle in the 2027 mark */
  --mint-brand:  #A8EFE5;
  --mint-soft:   #E7F7F4;
  --cyan:        #43D8CA;
  --signal:      #577EF2;
  --signal-soft: #EDF1FE;

  /* Neutrals */
  --bg:          #FAFAFC;   /* page — the rates.flayrfx.com background */
  --surface:     #FFFFFF;
  --surface-2:   #F2F2F5;   /* fills: inputs, tiles, secondary buttons */
  --surface-3:   #E8E8ED;
  --ink:         #0D1625;   /* headings */
  --text:        #343B49;   /* body */
  --muted:       #5F6D82;
  --faint:       #8A93A5;
  --hairline:    rgba(13, 22, 37, .07);

  /* Status */
  --ok:          #2E766F;  --ok-soft:     #E3F4F1;
  --warn:        #9A6700;  --warn-soft:   #FFF4D6;
  --danger:      #C0392B;  --danger-soft: #FDECEA;
  --info:        #3B5EC4;  --info-soft:   #EDF1FE;

  /* Shape */
  --r-xs: 8px;
  --r-sm: 10px;
  --r:    14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --pill: 980px;

  --shadow-pop: 0 12px 40px rgba(13, 22, 37, .12), 0 2px 6px rgba(13, 22, 37, .05);
  --shadow-thumb: 0 1px 3px rgba(13, 22, 37, .12), 0 1px 1px rgba(13, 22, 37, .04);
  --ring: 0 0 0 4px rgba(88, 192, 179, .35);

  /* Type */
  --font: 'Geist', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-hero: clamp(44px, 7vw, 80px);
  --fs-1:    clamp(36px, 5vw, 56px);
  --fs-2:    clamp(28px, 3.6vw, 40px);
  --fs-3:    clamp(22px, 2.4vw, 28px);
  --fs-4:    21px;
  --fs-lead: clamp(19px, 1.8vw, 24px);
  --fs-body: 17px;
  --fs-sm:   15px;
  --fs-xs:   13px;
  --fs-2xs:  12px;

  --ease: cubic-bezier(.25, .1, .25, 1);
  --container: 1080px;
  --container-wide: 1400px;
  --gutter: clamp(16px, 4vw, 32px);
}

/* ------------------------------------------------------------ reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.47;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01' on;
}
img, video, svg, canvas, iframe { display: block; max-width: 100%; }
img, video { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: var(--teal-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-xs); }
::selection { background: var(--mint); color: var(--ink); }
hr { border: 0; height: 1px; background: var(--hairline); margin: 32px 0; }
[hidden] { display: none !important; }

/* -------------------------------------------------------------- type ---- */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .hero-title {
  color: var(--ink);
  font-weight: 600;
  margin: 0 0 .4em;
  text-wrap: balance;
}
.hero-title { font-size: var(--fs-hero); line-height: 1.05; letter-spacing: -0.035em; font-weight: 650; }
h1, .h1 { font-size: var(--fs-1); line-height: 1.07; letter-spacing: -0.03em; }
h2, .h2 { font-size: var(--fs-2); line-height: 1.1;  letter-spacing: -0.025em; }
h3, .h3 { font-size: var(--fs-3); line-height: 1.18; letter-spacing: -0.02em; }
h4, .h4 { font-size: var(--fs-4); line-height: 1.24; letter-spacing: -0.015em; }
h5, h6  { font-size: var(--fs-body); line-height: 1.3; }
p { margin: 0 0 1em; text-wrap: pretty; }
.lead { font-size: var(--fs-lead); line-height: 1.4; color: var(--text); letter-spacing: -0.015em; font-weight: 400; }
.eyebrow { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--teal-ink); letter-spacing: -0.005em; margin-bottom: 10px; }
.muted  { color: var(--muted); }
.faint  { color: var(--faint); }
.small  { font-size: var(--fs-sm); }
.xsmall { font-size: var(--fs-xs); }
.mono, code, kbd { font-family: var(--mono); font-size: .92em; }
code { background: var(--surface-2); padding: .1em .4em; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.strong { font-weight: 600; color: var(--ink); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prose { max-width: 720px; }
.prose h2 { margin-top: 1.6em; font-size: var(--fs-3); }
.prose h3 { margin-top: 1.4em; font-size: var(--fs-4); }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin: .3em 0; }
.prose img { border-radius: var(--r-lg); margin: 24px 0; }

/* ------------------------------------------------------------ layout ---- */
.container      { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { width: 100%; max-width: calc(var(--container-wide) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { width: 100%; max-width: calc(720px + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

.stack    { display: flex; flex-direction: column; gap: var(--gap, 16px); }
.row      { display: flex; align-items: center; gap: var(--gap, 12px); flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row-end  { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.grow     { flex: 1 1 auto; min-width: 0; }
.grid     { display: grid; gap: var(--gap, 20px); }
.grid-2   { display: grid; gap: var(--gap, 20px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3   { display: grid; gap: var(--gap, 20px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4   { display: grid; gap: var(--gap, 20px); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { display: grid; gap: var(--gap, 20px); grid-template-columns: repeat(auto-fill, minmax(min(var(--min, 260px), 100%), 1fr)); }
/* CSP forbids style="" attributes, so tune grids with classes */
.min-140 { --min: 140px; } .min-190 { --min: 190px; } .min-220 { --min: 220px; } .min-260 { --min: 260px; } .min-320 { --min: 320px; } .min-400 { --min: 400px; }
.gap-8 { --gap: 8px; } .gap-12 { --gap: 12px; } .gap-16 { --gap: 16px; } .gap-24 { --gap: 24px; } .gap-32 { --gap: 32px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }

.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; }
.mt-1 { margin-top: 8px; }  .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; } .mt-5 { margin-top: 64px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 40px; }
.w-full { width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 760px) { .hide-mobile { display: none !important; } }
@media (min-width: 761px) { .show-mobile { display: none !important; } }

/* ------------------------------------------------------------- icons ---- */
.icon { width: 1.1em; height: 1.1em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.16em; }
.icon-lg { width: 24px; height: 24px; }

/* ----------------------------------------------------------- buttons ---- */
.btn {
  --btn-bg: var(--surface-2); --btn-fg: var(--ink); --btn-bg-hover: var(--surface-3);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 9px 20px;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 0; border-radius: var(--pill);
  font-size: var(--fs-sm); font-weight: 500; line-height: 1.2; letter-spacing: -0.01em;
  text-decoration: none; white-space: nowrap;
  transition: background .18s var(--ease), transform .12s var(--ease), opacity .18s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--btn-bg-hover); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn-primary { --btn-bg: var(--navy); --btn-fg: #fff; --btn-bg-hover: var(--navy-hover); }
.btn-accent  { --btn-bg: var(--teal); --btn-fg: var(--ink); --btn-bg-hover: #6BCABE; }
.btn-light   { --btn-bg: #fff; --btn-fg: var(--ink); --btn-bg-hover: #f5f5f7; }
.btn-ghost   { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bg-hover: var(--surface-2); }
.btn-danger  { --btn-bg: var(--danger-soft); --btn-fg: var(--danger); --btn-bg-hover: #FAD9D5; }
.btn-lg { min-height: 50px; padding: 13px 28px; font-size: var(--fs-body); }
.btn-sm { min-height: 32px; padding: 6px 14px; font-size: var(--fs-xs); }
.btn-icon { width: 36px; min-height: 36px; padding: 0; }
.btn-icon.btn-sm { width: 30px; min-height: 30px; }
.btn-block { display: flex; width: 100%; }
.btn .icon { width: 16px; height: 16px; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--btn-fg); border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Apple-style text link with a chevron: "Learn more ›" */
.link-arrow { display: inline-flex; align-items: center; gap: 2px; color: var(--teal-ink); font-weight: 400; }
.link-arrow::after { content: '›'; font-size: 1.25em; line-height: 1; margin-left: 3px; transform: translateY(-1px); transition: transform .2s var(--ease); }
.link-arrow:hover::after { transform: translate(3px, -1px); }
.links-inline { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; font-size: var(--fs-body); }

/* ------------------------------------------------------------- cards ---- */
.card { --pad: 24px; --radius: var(--r-lg); background: var(--surface); border-radius: var(--radius); padding: var(--pad); }
.card-lg { --pad: clamp(24px, 4vw, 40px); --radius: var(--r-xl); }
.card-flush { --pad: 0px; padding: 0; overflow: hidden; }  /* no padding, so a leading image needs no bleed */
.card-fill { background: var(--surface-2); }
.card-title { font-size: var(--fs-4); font-weight: 600; color: var(--ink); margin: 0 0 4px; letter-spacing: -0.015em; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2, .card-head h3 { font-size: 17px; margin: 0; letter-spacing: -0.01em; }
a.card, .card-link { color: inherit; text-decoration: none; transition: transform .3s var(--ease); display: block; }
a.card:hover, .card-link:hover { transform: translateY(-2px); text-decoration: none; }

.media { display: block; position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); }
.media img, .media video { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Full bleed: an image leading a card runs to the card's edges and takes its
   rounded top corners, like Apple's product cards. Anything with --pad and
   --radius (cards, features) gets this. */
.card > .media:first-child, .feature > .media:first-child {
  margin: calc(var(--pad) * -1) calc(var(--pad) * -1) 20px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.media-xl { border-radius: var(--r-xl); }
.ratio-16x9 { aspect-ratio: 16 / 9; }
.ratio-4x3  { aspect-ratio: 4 / 3; }
.ratio-1x1  { aspect-ratio: 1; }
.ratio-3x4  { aspect-ratio: 3 / 4; }
img.rounded { border-radius: var(--r-lg); }

/* ------------------------------------------------------------- forms ---- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: var(--fs-xs); font-weight: 500; color: var(--muted); letter-spacing: 0; }
.field .hint { font-size: var(--fs-xs); color: var(--faint); }
.field .error-text { font-size: var(--fs-xs); color: var(--danger); }
.input, .select, .textarea,
.form input:not([type]), .form input[type=text], .form input[type=email], .form input[type=password], .form input[type=number],
.form input[type=tel], .form input[type=url], .form input[type=date], .form input[type=search], .form input[type=datetime-local], .form input[type=time],
.form select, .form textarea {
  width: 100%; min-height: 44px; padding: 11px 14px;
  background: var(--surface-2); color: var(--ink);
  border: 0; border-radius: var(--r);
  font-size: var(--fs-sm); line-height: 1.35;
  transition: background .15s, box-shadow .15s;
  appearance: none; -webkit-appearance: none;
}
.card .input, .card .select, .card .textarea, .card.form input, .card .form input, .card .form select, .card .form textarea { background: var(--surface-2); }
.input:hover, .select:hover, .textarea:hover,
.form input:not([type]):hover, .form input[type=text]:hover, .form input[type=email]:hover, .form input[type=password]:hover, .form input[type=number]:hover, .form input[type=url]:hover, .form input[type=tel]:hover, .form input[type=date]:hover, .form input[type=search]:hover, .form select:hover, .form textarea:hover { background: var(--surface-3); }
.form input:disabled, .input:disabled { opacity: .6; cursor: not-allowed; }
.input:focus, .select:focus, .textarea:focus,
.form input:not([type=checkbox]):not([type=radio]):focus, .form select:focus, .form textarea:focus { outline: none; background: var(--surface); box-shadow: var(--ring); }
.input::placeholder, .textarea::placeholder, .form input::placeholder, .form textarea::placeholder { color: var(--faint); }
.textarea, .form textarea { min-height: 120px; resize: vertical; }
.select, .form select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235F6D82' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.input-sm, .select-sm { min-height: 34px; padding: 6px 10px; font-size: var(--fs-xs); border-radius: var(--r-sm); }
.select-sm { padding-right: 30px; background-position: right 10px center; }
.input.is-invalid, .field.has-error .input { box-shadow: 0 0 0 2px var(--danger); }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2, .form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }

.check { display: inline-flex; align-items: flex-start; gap: 10px; font-size: var(--fs-sm); color: var(--text); cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0; border-radius: 6px; background: var(--surface-3); display: grid; place-content: center; transition: background .15s; cursor: pointer; }
.check input[type=radio] { border-radius: 50%; }
.check input:checked { background: var(--navy); }
.check input:checked::after { content: ''; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check input[type=radio]:checked::after { width: 8px; height: 8px; border: 0; border-radius: 50%; background: #fff; transform: none; }

/* iOS-style toggle: <label class="switch"><input type="checkbox"><span></span> Label</label> */
.switch { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-sm); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch > span:first-of-type { position: relative; flex: none; width: 40px; height: 24px; border-radius: 999px; background: var(--surface-3); transition: background .2s var(--ease); }
.switch > span:first-of-type::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-thumb); transition: transform .2s var(--ease); }
.switch input:checked + span { background: var(--teal); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { box-shadow: var(--ring); }

/* Search field with icon */
.search { position: relative; }
.search .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search input { padding-left: 38px !important; }

/* --------------------------------------------------- segmented control -- */
.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border-radius: var(--r); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.segmented > a, .segmented > button, .segmented > label {
  border: 0; background: transparent; color: var(--text); padding: 7px 16px; border-radius: 11px;
  font-size: var(--fs-xs); font-weight: 500; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background .15s, color .15s;
}
.segmented > .is-active, .segmented > [aria-selected="true"], .segmented > [aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-thumb); }
.segmented > a:hover { text-decoration: none; color: var(--ink); }

/* Underline-free tabs for larger page sections */
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-bottom: 24px; }
.tabs > a, .tabs > button { border: 0; background: transparent; padding: 8px 14px; border-radius: var(--pill); color: var(--muted); font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; text-decoration: none; }
.tabs > a:hover, .tabs > button:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.tabs > .is-active, .tabs > [aria-selected="true"] { color: var(--ink); background: var(--surface); }

/* ------------------------------------------------------ pills / badges -- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--pill); font-size: var(--fs-2xs); font-weight: 500; line-height: 1.5; white-space: nowrap; background: var(--surface-2); color: var(--text); }
.pill::before { content: none; }
.pill-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-teal, .pill-ok      { background: var(--ok-soft); color: var(--ok); }
.pill-amber, .pill-warn   { background: var(--warn-soft); color: var(--warn); }
.pill-red, .pill-danger   { background: var(--danger-soft); color: var(--danger); }
.pill-blue, .pill-info    { background: var(--info-soft); color: var(--info); }
.pill-navy                { background: var(--navy); color: #fff; }
.pill-mint                { background: var(--mint); color: var(--ink); }

/* ------------------------------------------------------------- table ---- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.table th {
  text-align: left; font-weight: 500; font-size: var(--fs-2xs); color: var(--muted);
  padding: 10px 14px; white-space: nowrap; letter-spacing: .01em;
}
.table td { padding: 13px 14px; vertical-align: middle; color: var(--text); }
.table tbody tr td { box-shadow: inset 0 1px 0 var(--hairline); }
.table tbody tr:hover td { background: #F7F7FA; }
.table tbody tr:hover td:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.table tbody tr:hover td:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.table .num, .table .text-right { text-align: right; }
.table td.actions { text-align: right; white-space: nowrap; width: 1%; }
.table tr.is-clickable { cursor: pointer; }
.table-compact td { padding: 9px 12px; }
.table tfoot td { font-weight: 600; color: var(--ink); padding-top: 16px; }
/* Editable cell: an input that looks like text until you touch it */
.cell-input { width: 100%; min-width: 60px; border: 0; background: transparent; padding: 6px 8px; margin: -6px -8px; border-radius: var(--r-xs); font-size: inherit; color: inherit; }
.cell-input:hover { background: var(--surface-2); }
.cell-input:focus { outline: none; background: var(--surface); box-shadow: var(--ring); }

/* Stacked cards on phones: <table class="table table-stack"> with data-label on each td */
@media (max-width: 760px) {
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { background: var(--surface); border-radius: var(--r); padding: 8px 4px; margin-bottom: 10px; }
  .table-stack tbody tr td { box-shadow: none; display: flex; justify-content: space-between; gap: 16px; padding: 6px 12px; text-align: right; }
  .table-stack td::before { content: attr(data-label); color: var(--muted); font-size: var(--fs-2xs); text-align: left; }
  .table-stack td.actions { justify-content: flex-end; width: auto; }
}

/* ----------------------------------------------------------- lists ------ */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.list > li + li { box-shadow: inset 0 1px 0 var(--hairline); }
.kv { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: 8px 20px; font-size: var(--fs-sm); margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }

/* ------------------------------------------------------------- stats ---- */
.stat { background: var(--surface); border-radius: var(--r-lg); padding: 20px 22px; }
.stat .stat-label { font-size: var(--fs-xs); color: var(--muted); margin-bottom: 6px; }
.stat .stat-value { font-size: 28px; font-weight: 600; color: var(--ink); letter-spacing: -0.025em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .stat-note { font-size: var(--fs-xs); color: var(--faint); margin-top: 4px; }

/* ------------------------------------------------------------ alerts ---- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--r); font-size: var(--fs-sm); background: var(--surface-2); color: var(--text); }
.alert-ok     { background: var(--ok-soft); color: var(--ok); }
.alert-warn   { background: var(--warn-soft); color: var(--warn); }
.alert-danger, .alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-info   { background: var(--info-soft); color: var(--info); }
.alert p:last-child { margin: 0; }

.empty { text-align: center; padding: 56px 24px; color: var(--muted); }
.empty .icon { width: 40px; height: 40px; margin: 0 auto 14px; color: var(--faint); stroke-width: 1.4; }
.empty h3 { font-size: var(--fs-4); margin-bottom: 6px; }

/* ------------------------------------------------------------ dialog ---- */
dialog.modal {
  border: 0; padding: 0; border-radius: var(--r-xl); background: var(--surface); color: var(--text);
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: var(--shadow-pop);
  overflow: hidden;
}
dialog.modal[open] { display: flex; flex-direction: column; animation: modal-in .22s var(--ease); }
dialog.modal.modal-lg { width: min(860px, calc(100vw - 32px)); }
dialog.modal.modal-xl { width: min(1180px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(13, 22, 37, .28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 26px 6px; }
.modal-head h2 { font-size: var(--fs-4); margin: 0; }
/* Dialogs often wrap head, body and foot in a <form>. That form has to be the
   flex column too, or the body cannot shrink and the buttons in the foot are
   pushed off the bottom of a tall dialog with no way to scroll to them. */
dialog.modal > form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.modal-head, .modal-foot { flex: none; }
.modal-body { padding: 14px 26px 22px; overflow-y: auto; flex: 1 1 auto; min-height: 0; overscroll-behavior: contain; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 26px 22px; flex-wrap: wrap; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ toasts ---- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; background: rgba(13, 22, 37, .92); color: #fff; padding: 11px 18px; border-radius: var(--pill); font-size: var(--fs-sm); box-shadow: var(--shadow-pop); backdrop-filter: blur(12px); animation: toast-in .25s var(--ease); max-width: calc(100vw - 32px); }
.toast.is-error { background: var(--danger); }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: all .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------- dropdown ---- */
.menu { position: relative; display: inline-block; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-pop); padding: 6px; z-index: 50; display: none; }
.menu.is-open .menu-list { display: block; }
.menu-list a, .menu-list button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 12px; border: 0; background: none; border-radius: var(--r-xs); color: var(--ink); font-size: var(--fs-sm); text-align: left; text-decoration: none; }
.menu-list a:hover, .menu-list button:hover { background: var(--surface-2); text-decoration: none; }
.menu-list .is-danger { color: var(--danger); }

/* ---------------------------------------------------------- progress ---- */
.progress { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--teal); border-radius: inherit; transition: width .3s var(--ease); }

.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-sm); min-height: 1em; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--surface-3); border-top-color: var(--teal-deep); animation: spin .8s linear infinite; }

.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--mint); color: var(--ink); display: inline-grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Drop zone for uploads */
.dropzone { display: grid; place-items: center; text-align: center; gap: 8px; padding: 36px 20px; border-radius: var(--r-lg); background: var(--surface-2); color: var(--muted); cursor: pointer; transition: background .15s, box-shadow .15s; }
.dropzone:hover, .dropzone.is-over { background: var(--mint-soft); box-shadow: inset 0 0 0 2px var(--teal); color: var(--ink); }
.dropzone .icon { width: 28px; height: 28px; }

/* Reveal on scroll (site.js adds .is-in) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  body { background: #fff; }
  .no-print, .nav, .footer, .admin-side, .admin-top { display: none !important; }
}

/* Filled glyphs (brand marks like TikTok): <svg class="icon icon-fill"> */
.icon-fill { fill: currentColor; stroke: none; }
