/* app.css — KrewHauz shell.
 *
 * Clean and calm, not clinical. The original pass was sterile to a fault: every
 * area looked identical, so the only way to tell where you were was to read.
 * This one keeps the restraint but gives each area a quiet identity — a tint, a
 * rule, an icon chip — so the eye can find things before the brain reads them.
 *
 * Rules that hold everywhere:
 *   - Color carries meaning. A tint means "this is that kind of thing", never
 *     decoration. Full-strength color is reserved for small marks and status.
 *   - Numbers earn their place. A figure someone will actually act on gets to
 *     be big; everything else is a sentence.
 *   - Generous space over hairline density. Crews read this on a laptop in a
 *     truck, and the owner reads it at 10pm.
 */

:root {
  /* ---- The palette ----------------------------------------------------
   * Five colours, earth tones:
   *   #62751d  olive   — the primary. Cut grass, not corporate green.
   *   #b1c860  lime    — highlight and fill ONLY. At 1.86:1 on white it fails
   *                      as text, so it never carries a word. Progress bars,
   *                      chart fills, success wash.
   *   #865c23  umber   — the warm secondary. Soil, mulch, money.
   *   #eeeeee  stone   — the page ground. White cards lift off it cleanly.
   *   #000000  black   — text. Used as #14170f, a near-black carrying a trace
   *                      of the olive so it sits in the family rather than
   *                      punching a hole in it. Reads as black at 18:1.
   *
   * Every derived colour below was contrast-checked. Text roles clear AA on
   * both white and stone; every filled button clears AA with white on it.
   * -------------------------------------------------------------------- */

  --earth-olive: #62751d;
  --earth-lime:  #b1c860;
  --earth-umber: #865c23;
  --earth-stone: #eeeeee;
  --earth-black: #000000;

  --bg:        #eeeeee;
  --surface:   #ffffff;
  --surface-2: #f7f7f4;
  --line:      #dcdcd4;
  --line-soft: #e8e8e1;
  --ink:       #14170f;   /* 18.1:1 on white */
  --ink-2:     #3c4235;   /* 10.4:1 */
  --muted:     #5f6657;   /*  5.9:1 */
  --faint:     #7e8676;   /*  3.8:1 — de-emphasised meta only */

  --accent:      #62751d;
  --accent-ink:  #4c5c17;
  --accent-soft: #f0f3e4;
  --accent-line: #d3ddb0;

  /* Status, in earth terms. Rust reads as trouble without shouting. */
  --good:      #62751d;  --good-soft: #f0f3e4;  --good-line: #d3ddb0;
  --warn:      #8f6b16;  --warn-soft: #f9f2df;  --warn-line: #e6d6a8;
  --bad:       #96432a;  --bad-soft:  #f9ece8;  --bad-line:  #ecccc0;
  --info:      #4c5157;  --info-soft: #eff0f1;  --info-line: #d5d8da;

  /* Category tones. Spread across the earth range so a 5% wash is still
     distinguishable: yellow-green, blue-green, red-brown, grey, gold, charcoal. */
  --t-work:    #62751d;  --t-work-soft:   #f0f3e4;  --t-work-line:   #d3ddb0;
  --t-people:  #3d5a49;  --t-people-soft: #eaf0ec;  --t-people-line: #c6d5cc;
  --t-money:   #865c23;  --t-money-soft:  #f7f0e5;  --t-money-line:  #e2d0b5;
  --t-kit:     #4c5157;  --t-kit-soft:    #eff0f1;  --t-kit-line:    #d5d8da;
  --t-care:    #8f6b16;  --t-care-soft:   #f9f2df;  --t-care-line:   #e6d6a8;
  --t-team:    #4a4f45;  --t-team-soft:   #eff0ed;  --t-team-line:   #d7d9d4;

  /* The canvas the app floats on. Phones taught everyone that a screen is a
     surface sitting on something, not paint on a wall. */
  --canvas:    #14170f;
  --canvas-2:  #1c2015;

  --sidebar-w: 250px;
  --shell-r:   26px;   /* the device corner */
  --radius:    18px;   /* cards */
  --radius-sm: 12px;   /* controls */
  --radius-xs: 9px;

  /* Springs. iOS overshoots slightly and settles — that tiny overshoot is most
     of why a phone feels alive and a web app feels dead. */
  --spring: cubic-bezier(.34, 1.42, .64, 1);
  --spring-soft: cubic-bezier(.22, 1.2, .36, 1);
  /* Elevation. Layered rather than single-drop: a near-opaque contact shadow,
     a mid diffusion, and a wide ambient. That is what makes a panel read as
     sitting above the page instead of having a grey outline drawn round it. */
  --e1: 0 1px 1px rgba(20,23,15,.04), 0 2px 4px rgba(20,23,15,.03);
  --e2: 0 1px 1px rgba(20,23,15,.04), 0 3px 6px rgba(20,23,15,.04), 0 8px 18px rgba(20,23,15,.05);
  --e3: 0 1px 1px rgba(20,23,15,.05), 0 6px 12px rgba(20,23,15,.06), 0 18px 36px rgba(20,23,15,.09);
  --e4: 0 2px 4px rgba(20,23,15,.06), 0 12px 24px rgba(20,23,15,.10), 0 32px 64px rgba(20,23,15,.12);
  --shadow:    var(--e3);
  --shadow-sm: var(--e1);

  /* A 1px lit edge along the top of a raised surface. Cheap, and it does more
     for perceived depth than another 10% of shadow. */
  --lip: inset 0 1px 0 rgba(255,255,255,.9);

  --ease: cubic-bezier(.2, .7, .3, 1);
  --fast: 130ms var(--ease);
  --med:  220ms var(--ease);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font: 400 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

/* Everything below is scoped to .shell — the office app. This stylesheet is
   also loaded by the client portal and the public booking form, and those are
   white customer-facing pages that must not inherit a dark ground or a grain
   overlay. Bare `body` rules here leak straight onto them. */
body.shell { background: var(--canvas); }

/* A slow olive glow behind the shell so the dark canvas is not a flat void. */
body.shell::after {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 600px at 8% 0%,  rgba(98,117,29,.30), transparent 60%),
    radial-gradient(800px 520px at 100% 100%, rgba(134,92,35,.18), transparent 62%);
}

body.shell::before {
  content: '';
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
}
/* The shell: a single rounded surface floating on the canvas, the way an app
   sits on a phone screen. Inset shrinks on small windows so a laptop in a truck
   is not spending 40px a side on atmosphere. */
.app {
  position: relative; z-index: 2;
  margin: 18px; border-radius: var(--shell-r);
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(177,200,96,.22), transparent 60%),
    radial-gradient(700px 420px at 98% 0%,  rgba(134,92,35,.10),  transparent 58%),
    var(--bg);
  box-shadow: 0 30px 90px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.07), 0 2px 0 rgba(255,255,255,.08) inset;
  /* The shell is the viewport. The MAIN column scrolls inside it, not the page
     — which is how every phone app works, and the only way the rounded corner
     survives a long list. It also means the sidebar is simply full height
     instead of faking it with sticky. */
  height: calc(100vh - 36px);
  overflow: hidden;
}
@media (max-width: 900px) {
  .app { margin: 0; border-radius: 0; height: 100vh; }
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 620; letter-spacing: -.014em; }
p { margin: 0 0 .75em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.tnum, .tbl td, .stat__value { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12px; }
.ico { width: 18px; height: 18px; flex: none; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; }

.sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #fcfcfa 60%, #f9f9f6 100%);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  height: 100%; overflow-y: auto; min-height: 0;
  box-shadow: 1px 0 0 rgba(255,255,255,.8) inset;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  padding: 20px 18px 6px;
}
.brand__mark {
  width: 36px; height: 36px; border-radius: 12px;
  background: linear-gradient(150deg, var(--earth-lime) -30%, var(--earth-olive) 55%, var(--accent-ink));
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; letter-spacing: .02em;
  box-shadow: var(--shadow-sm);
}
.brand__name { font-weight: 640; font-size: 14.5px; line-height: 1.2; }
.brand__sub { font-size: 11px; color: var(--faint); margin-top: 1px; }

/* Nav groups are the primary zoning device: a tinted label and a hairline
   marker so "where am I" is answered by color before you read a word. */
.navgroup { padding: 6px 10px 10px; }
.navgroup__label {
  display: flex; align-items: center; gap: 7px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--faint); padding: 8px 8px 7px;
}
.navgroup__label::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--tone, var(--faint)); flex: none;
}
.navgroup--work   { --tone: var(--t-work); }
.navgroup--people { --tone: var(--t-people); }
.navgroup--money  { --tone: var(--t-money); }
.navgroup--kit    { --tone: var(--t-kit); }
.navgroup--care   { --tone: var(--t-care); }
.navgroup--team   { --tone: var(--t-team); }

.navlink {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 999px;
  color: var(--ink-2); font-size: 14.5px; font-weight: 500;
  text-decoration: none; position: relative;
  transition: background 200ms var(--spring), color var(--fast),
              transform 260ms var(--spring), box-shadow var(--fast);
}
.navlink:hover {
  background: #fff; color: var(--ink); text-decoration: none;
  box-shadow: var(--e2); transform: translateX(3px);
}
.navlink:active { transform: translateX(3px) scale(.97); }
.navlink:hover .ico { color: var(--tone, var(--accent)); }
.navlink .ico { color: var(--faint); transition: color var(--fast); }
/* Selected is a solid pill, not a wash. Same affordance as a phone's tab bar:
   the thing you are on is filled in. */
.navlink--on {
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--tone, var(--accent)) 92%, #fff),
    var(--tone, var(--accent)));
  color: #fff; font-weight: 620;
  box-shadow: var(--e2), inset 0 1px 0 rgba(255,255,255,.2);
}
.navlink--on .ico { color: #fff; }
.navlink--on:hover { color: #fff; transform: translateX(3px); }
.navlink--on .ico { color: var(--tone, var(--accent)); }
.navlink__count {
  margin-left: auto; font-size: 11.5px; font-variant-numeric: tabular-nums;
  color: var(--faint); background: var(--surface-2);
  border-radius: 20px; padding: 2px 8px; font-weight: 650; min-width: 22px; text-align: center;
}
.navlink--on .navlink__count { background: rgba(255,255,255,.22); color: #fff; }
/* Unread and open flags get the badge everyone already reads as "deal with me". */
.navlink__count--alert {
  background: var(--bad); color: #fff;
  box-shadow: 0 0 0 0 rgba(150,67,42,.55); animation: nudge 2.6s ease-out infinite;
}
.navlink--on .navlink__count--alert { background: #fff; color: var(--bad); }
@keyframes nudge {
  0%, 78%, 100% { box-shadow: 0 0 0 0 rgba(150,67,42,.5); }
  86% { box-shadow: 0 0 0 5px rgba(150,67,42,0); }
}

.sidebar__foot { margin-top: auto; padding: 8px 10px 14px; }
.sidebar__foot .navlink { font-size: 13.5px; }
.userchip {
  display: flex; align-items: center; gap: 11px; padding: 12px 10px 4px;
  margin-top: 8px; border-top: 1px solid var(--line-soft);
}

/* Big centred avatar card at the top of the sidebar. */
.me { text-align: center; padding: 14px 18px 18px; }
.me__ring {
  width: 76px; height: 76px; margin: 0 auto 10px; border-radius: 50%;
  padding: 3px; position: relative;
  background: conic-gradient(from 140deg, var(--earth-lime), var(--earth-olive), var(--earth-umber), var(--earth-lime));
  box-shadow: var(--e2);
}
.me__face {
  width: 100%; height: 100%; border-radius: 50%;
  background: linear-gradient(160deg, var(--t-people), #2c4437);
  color: #fff; display: grid; place-items: center;
  font-size: 26px; font-weight: 700; letter-spacing: -.02em;
  border: 3px solid #fff;
}
.me__dot {
  position: absolute; right: 3px; bottom: 5px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--earth-lime); border: 3px solid #fff;
}
.me__name { font-size: 15.5px; font-weight: 650; letter-spacing: -.015em; }
.me__role { font-size: 12.5px; color: var(--faint); text-transform: capitalize; margin-top: 1px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--t-people); color: #fff; display: grid; place-items: center;
  font-size: 11px; font-weight: 650;
}
.avatar--sm { width: 22px; height: 22px; font-size: 9.5px; }

.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; position: relative; }
/* Glass, and it earns a shadow only once there is content underneath it —
   a bar that is always elevated over a blank page looks like a mistake. */
.topbar {
  /* A flex item in a column shrinks to its content, so the declared height was
     never actually applied — the bar was 43px, sized by the search box, and a
     notification badge had nowhere to sit. */
  flex: none;
  height: 62px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.78));
  backdrop-filter: saturate(1.5) blur(12px);
  -webkit-backdrop-filter: saturate(1.5) blur(12px);
  border-bottom: 1px solid transparent;
  display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center;
  gap: 12px; padding: 0 22px;
  position: sticky; top: 0; z-index: 20;
  transition: box-shadow var(--med), border-color var(--med), background var(--med);
}
.topbar--lifted {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,.6), 0 6px 18px rgba(20,23,15,.06);
}
.search {
  width: clamp(280px, 34vw, 520px); position: relative;
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: #fff; padding: 0 8px 0 16px; height: 42px;
  box-shadow: var(--e1), var(--lip);
  transition: border-color var(--fast), box-shadow var(--fast), width 240ms var(--spring);
}
.search:hover { border-color: var(--accent-line); box-shadow: var(--e2), var(--lip); }
.search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--e2), var(--lip);
  width: clamp(320px, 40vw, 600px);
}
.search .ico { width: 18px; height: 18px; color: var(--accent); }
.search input::placeholder { color: var(--faint); }
/* The shortcut hint does the job the magnifying glass used to: it says "this is
   a thing you use", not "this is a decoration". */
.search__kbd {
  margin-left: auto; flex: none; font: inherit; font-size: 11px; font-weight: 650;
  color: var(--faint); background: var(--surface-2);
  border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 6px; padding: 3px 7px; letter-spacing: .02em;
}
.search:focus-within .search__kbd { opacity: 0; }
@media (max-width: 1080px) { .search__kbd { display: none; } }
.search input { border: 0; background: none; outline: none; flex: 1; min-width: 0; font: inherit; font-size: 14.5px; color: var(--ink); }
.search .ico { color: var(--faint); width: 17px; height: 17px; }
.topbar__left  { display: flex; align-items: center; gap: 9px; min-width: 0; }
.topbar__right { display: flex; align-items: center; gap: 9px; justify-content: flex-end; min-width: 0; }
/* Category tone cascades from the page, so every section, chip, and active nav
   item on a screen picks it up without being told individually. A section can
   still override with .sec--money etc. when it genuinely belongs elsewhere —
   an invoices panel on a customer screen, for instance. */
.page { padding: 26px 26px 72px; max-width: 1520px; width: 100%; --tone: var(--t-team); }
.page[data-tone="work"]   { --tone: var(--t-work); }
.page[data-tone="people"] { --tone: var(--t-people); }
.page[data-tone="money"]  { --tone: var(--t-money); }
.page[data-tone="kit"]    { --tone: var(--t-kit); }
.page[data-tone="care"]   { --tone: var(--t-care); }
.page[data-tone="team"]   { --tone: var(--t-team); }

/* ---------- page furniture ---------- */
.pagehead { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 22px; }
.pagehead__title { font-size: 25px; letter-spacing: -.025em; }
.pagehead__sub { margin: 5px 0 0; color: var(--muted); font-size: 14px; max-width: 76ch; }
.pagehead__actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* A section is the "clearly defined area". Its head carries the category tint
   so a screen made of four sections reads as four places, not one long page. */
/* A panel is a surface with a lit top edge and a layered shadow, and it warms
   very slightly under the cursor. No transform — shifting a full-width panel
   on hover reads as a glitch, not as feedback. */
.sec {
  background: linear-gradient(180deg, #ffffff, #fdfdfb);
  border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 18px; overflow: hidden;
  box-shadow: var(--e2), var(--lip);
  transition: box-shadow var(--med), border-color var(--med);
}
.sec:hover { box-shadow: var(--e3), var(--lip); border-color: #d2d2c8; }
.sec__head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line-soft);
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--tone, var(--t-team)) 7%, #fff),
      color-mix(in srgb, var(--tone, var(--t-team)) 3%, #fff));
}
.sec__head .ico { color: var(--tone, var(--t-team)); }
.sec__title { font-size: 14px; font-weight: 650; letter-spacing: -.005em; }
.sec__sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.sec__actions { margin-left: auto; display: flex; gap: 7px; align-items: center; }
.sec__body { padding: 0; }
.sec__body--pad { padding: 16px; }
.sec--work   { --tone: var(--t-work); }
.sec--people { --tone: var(--t-people); }
.sec--money  { --tone: var(--t-money); }
.sec--kit    { --tone: var(--t-kit); }
.sec--care   { --tone: var(--t-care); }
.sec--team   { --tone: var(--t-team); }
.sec--plain .sec__head { background: var(--surface); }

/* Small tinted square that sits beside a section title or a stat. */
.chipico {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--tone, var(--t-team)) 18%, #fff),
    color-mix(in srgb, var(--tone, var(--t-team)) 9%, #fff));
  color: var(--tone, var(--t-team));
  box-shadow: var(--lip), 0 1px 2px rgba(20,23,15,.05);
}
.chipico .ico { width: 16px; height: 16px; color: inherit; }

.grid { display: grid; gap: 14px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
@media (max-width: 1180px) { .grid--4 { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 900px)  { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.stat {
  background: linear-gradient(180deg, #ffffff, #fdfdfb);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: block; color: inherit;
  box-shadow: var(--e1), var(--lip);
  transition: box-shadow var(--med), transform var(--med), border-color var(--med);
}
.stat:hover { box-shadow: var(--e2), var(--lip); }
.stat--link { cursor: pointer; }
.stat--link:hover {
  border-color: var(--accent-line); text-decoration: none;
  box-shadow: var(--e3), var(--lip); transform: translateY(-2px);
}
.stat--link:active { transform: translateY(0); box-shadow: var(--e1), var(--lip); }
.stat__label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0; text-transform: none; }
.stat__value { font-size: 26px; font-weight: 640; letter-spacing: -.028em; margin-top: 6px; line-height: 1.1; }
.stat__value--good { color: var(--good); }
.stat__value--warn { color: var(--warn); }
.stat__value--bad  { color: var(--bad); }
.stat__sub { font-size: 12.5px; color: var(--faint); margin-top: 4px; }

/* ---------- tables ---------- */
/* Roomier rows and a quieter header. A table someone scans in a truck cab needs
   air more than it needs to fit one more row above the fold. */
.tablewrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left; font-size: 11px; font-weight: 650; letter-spacing: .05em;
  text-transform: uppercase; color: var(--faint);
  padding: 11px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
  background: linear-gradient(180deg, #fff, #fbfbf8);
  /* Not sticky. `position: sticky` on a th fights `border-collapse: collapse`
     and the card's `overflow: hidden`, and it rendered the header below the
     first row. These tables sit inside cards on a scrolling page — a sticky
     header per card would be noise even if it worked. */
}
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background var(--fast); }
.tbl tbody tr[data-href] { cursor: pointer; }
.tbl tbody tr[data-href] td:first-child { position: relative; }
/* Rail rather than a full-row grey: it points at the row you are on without
   washing out the type. Scales in from zero so long lists do not flicker. */
.tbl tbody tr[data-href] td:first-child::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--tone, var(--accent));
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--fast);
}
.tbl tbody tr[data-href]:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--tone, var(--accent)) 6%, #fff), #fff 60%); }
.tbl tbody tr[data-href]:hover td:first-child::before { transform: scaleX(1); }
.tbl .sub { display: block; font-size: 12.5px; color: var(--faint); margin-top: 2px; }
.nowrap { white-space: nowrap; }

.empty { padding: 34px 20px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.6; max-width: 62ch; margin: 0 auto; }

/* ---------- badges & buttons ---------- */
.badge {
  display: inline-block; font-size: 11.5px; font-weight: 620; letter-spacing: 0;
  padding: 3px 9px; border-radius: 20px; border: 1px solid transparent; white-space: nowrap;
}
.badge--neutral { background: var(--surface-2); border-color: var(--line); color: var(--ink-2); }
.badge--good    { background: var(--good-soft); border-color: var(--good-line); color: var(--good); }
.badge--warn    { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.badge--bad     { background: var(--bad-soft);  border-color: var(--bad-line);  color: var(--bad); }
.badge--info    { background: var(--info-soft); border-color: var(--info-line); color: var(--info); }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface);
  font: inherit; font-size: 14px; font-weight: 550; color: var(--ink-2);
  cursor: pointer; white-space: nowrap; box-shadow: var(--e1), var(--lip);
  transition: background var(--fast), border-color var(--fast),
              box-shadow var(--fast), transform var(--fast);
}
.btn:hover { background: #fff; border-color: #cfcfc4; color: var(--ink); box-shadow: var(--e2); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn--primary {
  background: linear-gradient(180deg, #6d8222, var(--accent));
  border-color: var(--accent-ink); color: #fff;
  box-shadow: var(--e1), inset 0 1px 0 rgba(255,255,255,.22);
}
.btn--primary:hover {
  background: linear-gradient(180deg, #788f26, #5a6c1a);
  border-color: var(--accent-ink); color: #fff;
  box-shadow: var(--e2), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn--primary:active { background: var(--accent-ink); }
.btn--danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn--danger:hover { background: #8c342b; border-color: #8c342b; color: #fff; }
.btn--sm { height: 30px; padding: 0 11px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn .ico { width: 16px; height: 16px; }
.iconbtn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid transparent; background: none; border-radius: var(--radius-sm);
  color: var(--muted); cursor: pointer;
}
.iconbtn:hover { background: var(--surface-2); color: var(--ink); }

.seg {
  display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--surface-2); padding: 3px; gap: 2px;
}
.seg button {
  border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 520; color: var(--muted);
  padding: 0 12px; height: 30px; cursor: pointer; border-radius: 5px;
}
.seg button:hover { color: var(--ink); background: rgba(255,255,255,.7); }
.seg button[aria-pressed="true"] {
  background: var(--surface); color: var(--ink); font-weight: 640; box-shadow: var(--shadow-sm);
}

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 12px; }
.field__label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.field__hint { display: block; font-size: 12.5px; color: var(--faint); margin-top: 5px; line-height: 1.45; }
/* Match by exclusion, not enumeration: `<input name="x">` with no type attribute
   is a text input, but `input[type=text]` does not select it. Enumerating types
   silently left every bare input in the app unstyled. */
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]):not([type=submit]):not([type=button]),
select, textarea {
  width: 100%; font: inherit; font-size: 14px; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); padding: 9px 11px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 72px; resize: vertical; }
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-2); margin-bottom: 11px; }
.check input { width: 15px; height: 15px; accent-color: var(--accent); }
.row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.row--3 { grid-template-columns: repeat(3,1fr); }

/* ---------- modal / toast ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20,23,15,.34);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: fade-in 140ms var(--ease);
  display: grid; place-items: center; z-index: 100; padding: 24px;
}
.modal {
  background: linear-gradient(180deg, #fff, #fdfdfb);
  border-radius: 12px; box-shadow: var(--e4), var(--lip);
  border: 1px solid rgba(255,255,255,.7);
  width: 100%; max-height: 88vh; display: flex; flex-direction: column;
  animation: modal-in 180ms var(--ease);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
.modal__head { display: flex; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.modal__head h3 { font-size: 16px; flex: 1; }
.modal__body { padding: 18px; overflow-y: auto; }
.modal__foot { padding: 14px 18px; border-top: 1px solid var(--line-soft); display: flex; justify-content: flex-end; gap: 9px; background: var(--surface-2); }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 14px);
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 500;
  padding: 9px 15px; border-radius: var(--radius); box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: .18s ease; z-index: 200; max-width: 80vw;
}
.toast--on { opacity: 1; transform: translate(-50%, 0); }
.toast--warn { background: var(--warn); }
.toast--bad  { background: var(--bad); }

/* ---------- map canvas ---------- */
.mapwrap { position: relative; background: #eef1ee; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.mapwrap canvas { display: block; width: 100%; touch-action: none; }
.maplegend {
  /* Top-left: the base marker clamps to whichever edge it lies beyond, and it
     landed under a bottom-left legend more often than not. */
  position: absolute; left: 14px; top: 14px;
  background: rgba(255,255,255,.93); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 12.5px; color: var(--ink-2); line-height: 1.75;
  backdrop-filter: blur(6px); box-shadow: var(--shadow-sm);
}
.maplegend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.maptools { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- misc ---------- */
.kv { display: grid; grid-template-columns: 142px 1fr; gap: 9px 16px; font-size: 14px; align-items: baseline; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; color: var(--ink); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hr { height: 1px; background: var(--line-soft); margin: 14px 0; border: 0; }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.note {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  padding: 12px 15px; font-size: 13.5px; line-height: 1.55; color: var(--accent-ink);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.note--warn { border-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
.note--bad  { border-color: var(--bad);  background: var(--bad-soft);  color: var(--bad); }
.bar { height: 7px; background: var(--line-soft); border-radius: 20px; overflow: hidden; min-width: 60px; }
/* Olive-to-lime gradient: the fill is the one place the light green is legible
   and useful, since nothing has to be read off it. */
.bar > i {
  display: block; height: 100%; border-radius: 20px; transition: width .3s ease;
  background: linear-gradient(90deg, var(--earth-olive), var(--earth-lime));
}
.bar > i.warn { background: linear-gradient(90deg, var(--warn), #d3ab55); }
.bar > i.bad  { background: linear-gradient(90deg, var(--bad), #c47a62); }

/* ---------- setup / first run ---------- */
/* Setup runs full-bleed: no sidebar, no search, nothing to wander off into
   before the company exists. */
body.is-setup .app { grid-template-columns: 1fr; }
body.is-setup .sidebar,
body.is-setup .topbar { display: none; }
body.is-setup .page { padding-top: 44px; }

.modechoice {
  display: block; width: 100%; text-align: left; font: inherit; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius); padding: 13px 14px; margin-top: 10px;
}
.modechoice { transition: border-color var(--fast), background var(--fast), box-shadow var(--fast), transform var(--fast); }
.modechoice:hover {
  border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), #fff);
  box-shadow: var(--e2); transform: translateY(-1px);
}
.modechoice strong { display: block; font-size: 13.5px; margin-bottom: 3px; }
.modechoice span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* ---------- getting-started checklist ---------- */
.sec--start { border-color: var(--accent-line); }
.sec--start .sec__head { background: var(--accent-soft); border-bottom-color: var(--accent-line); }
.startrow {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 16px; border-bottom: 1px solid var(--line-soft);
}
.startrow:last-child { border-bottom: 0; }
.startrow { transition: background var(--fast); }
.startrow:hover { background: var(--surface-2); }
.startrow--next { background: linear-gradient(90deg, var(--accent-soft), #fff 70%); }
.startrow--done .startrow__label { color: var(--muted); }
.startrow__mark {
  width: 20px; height: 20px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--surface);
  display: grid; place-items: center; font-size: 11px; color: #fff;
}
.startrow--done .startrow__mark { background: var(--accent); border-color: var(--accent); }
.startrow--next .startrow__mark { border-color: var(--accent); border-style: dashed; }
.startrow__label { font-size: 14.5px; font-weight: 620; }
.startrow__why { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.5; }

/* ---------- dashboard ---------- */
.crewgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.crewcard {
  display: block; padding: 13px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fff, #fafaf6); color: inherit;
  box-shadow: var(--e1), var(--lip);
  transition: box-shadow var(--med), transform var(--med), border-color var(--med);
}
.crewcard:hover {
  text-decoration: none; border-color: var(--accent-line);
  box-shadow: var(--e3), var(--lip); transform: translateY(-2px);
}
.crewcard:active { transform: translateY(0); box-shadow: var(--e1), var(--lip); }
.crewdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }

.zonelist { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.zonerow {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 13.5px; padding: 5px 0; color: var(--muted);
}
.zonerow span:last-child { font-weight: 620; color: var(--ink-2); }
.zonerow--warn { color: var(--warn) !important; }
.zonerow--bad  { color: var(--bad) !important; }

/* Module status reads as a strip of small facts, not a grid of big numbers. */
.modstrip { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.modstat {
  padding: 15px 16px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  transition: background var(--fast);
}
.modstat:hover { background: var(--surface-2); }
.modstat__v { font-size: 19px; font-weight: 640; letter-spacing: -.02em; line-height: 1.15; }
.modstat__l { font-size: 13px; font-weight: 550; color: var(--ink-2); margin-top: 3px; }
.modstat__s { font-size: 12px; color: var(--faint); margin-top: 2px; }

.sec--start { --tone: var(--t-work); }

/* ---------- New menu ---------- */
/* Namespaced .dropdown, not .menu: app.css is shared with the booking form and
   the portal, and .menu was already the booking form's service grid. Generic
   class names in a shared stylesheet are a collision waiting to happen. */
.dropwrap { position: relative; }
.dropdown {
  animation: modal-in 140ms var(--ease);
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  min-width: 288px; padding: 6px; overflow: hidden;
}
.dropdown[hidden] { display: none; }
.dropdown__item {
  display: block; padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none;
  transition: background var(--fast), transform var(--fast);
}
.dropdown__item:hover {
  background: linear-gradient(90deg, var(--accent-soft), #fff);
  text-decoration: none; transform: translateX(2px);
}
.dropdown__item strong { display: block; font-size: 13.5px; font-weight: 600; }
.dropdown__item span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; line-height: 1.4; }

/* ---------- motion, focus, and the reduced-motion contract ---------- */

@keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }

/* Screens fade up as they mount. Short enough that it never delays a click. */
.page { animation: page-in 200ms var(--ease); }
@keyframes page-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* Keyboard focus is visible and consistent; mouse focus stays quiet. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.btn:focus-visible, .navlink:focus-visible, .seg button:focus-visible {
  outline-offset: 3px;
}

.seg button { transition: background var(--fast), color var(--fast), box-shadow var(--fast); }
.seg button[aria-pressed="true"] { box-shadow: var(--e1), var(--lip); }
.iconbtn { transition: background var(--fast), color var(--fast), transform var(--fast); }
.iconbtn:hover { transform: translateY(-1px); }
.badge { transition: background var(--fast), border-color var(--fast); }
.maplegend, .maptools .iconbtn { box-shadow: var(--e2), var(--lip); }

/* Everything above is decoration. Anyone who has asked their OS to stop moving
   things gets the same interface without a single transform or transition —
   including the grain, which is texture rather than motion but reads as noise
   to some people with vestibular sensitivity. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
  .navlink:hover,
  .btn:hover,
  .stat--link:hover,
  .crewcard:hover,
  .dropdown__item:hover,
  .modechoice:hover,
  .iconbtn:hover { transform: none; }
  body.shell::before { display: none; }
}

/* ==========================================================================
   Home screen — big coloured blocks
   Each block is a solid surface you identify by colour before you read it:
   dark = the day, green = the week, tan = the numbers.
   ========================================================================== */

.hey { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 20px; }
.hey__title { font-size: 30px; letter-spacing: -.033em; line-height: 1.05; }
.hey__sub { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }
.hey .btn { margin-left: auto; }

.deck { display: grid; gap: 16px; grid-template-columns: minmax(0,.92fr) minmax(0,1.08fr); margin-bottom: 16px; }
@media (max-width: 1080px) { .deck { grid-template-columns: 1fr; } }

.blk {
  border-radius: var(--radius); padding: 22px 24px; position: relative; overflow: hidden;
  box-shadow: var(--e3);
  animation: blk-in 520ms var(--spring-soft) both;
}
.blk--dark {
  background: radial-gradient(120% 100% at 0% 0%, #232a18 0%, #14170f 60%);
  color: #fff;
}
.blk--green {
  background: linear-gradient(150deg, #8ba03a 0%, #62751d 55%, #4c5c17 100%);
  color: #fff; animation-delay: 60ms;
}
.blk--tan {
  background: linear-gradient(150deg, #d9c7a8 0%, #cbb491 60%, #bda67f 100%);
  color: var(--ink); margin-bottom: 16px; animation-delay: 120ms;
}
@keyframes blk-in {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

.blk__head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.blk__eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.5);
}
.blk--tan .blk__eyebrow { color: rgba(20,23,15,.45); }
.blk__eyebrow--on-green { color: rgba(255,255,255,.72); }
.blk__empty { color: rgba(255,255,255,.5); font-size: 13.5px; padding: 8px 0; }

.pill {
  margin-left: auto; font-size: 12.5px; font-weight: 650;
  background: rgba(255,255,255,.9); color: var(--ink);
  padding: 5px 12px; border-radius: 999px; white-space: nowrap;
}
.pill--ghost { background: rgba(255,255,255,.14); color: #fff; }

/* --- the day --- */
.today { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.today__copy { min-width: 0; flex: 1; }
.today__line { font-size: 27px; letter-spacing: -.032em; line-height: 1.1; }
.today__sub { margin: 8px 0 0; color: rgba(255,255,255,.62); font-size: 14px; line-height: 1.5; max-width: 34ch; }

.dial { position: relative; flex: none; width: 120px; height: 120px; }
.dial svg { display: block; }
.dial__arc { animation: dial 1100ms var(--spring-soft) both; }
@keyframes dial { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: var(--to); } }
.dial__num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 27px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.dial__num span { font-size: 14px; opacity: .55; margin-left: 1px; }

.crews { display: flex; flex-direction: column; gap: 2px; }
.crewrow {
  display: flex; align-items: center; gap: 12px; color: #fff;
  padding: 11px 12px; border-radius: var(--radius-sm); text-decoration: none;
  background: rgba(255,255,255,.05);
  animation: row-in 460ms var(--spring-soft) both;
  animation-delay: calc(180ms + var(--i) * 70ms);
  transition: background var(--fast), transform 220ms var(--spring);
}
.crewrow:hover { background: rgba(255,255,255,.12); text-decoration: none; color: #fff; transform: translateX(3px); }
.crewrow__tick {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  border: 2px solid; display: grid; place-items: center; font-size: 13px; color: #14170f; font-weight: 800;
}
.crewrow__body { min-width: 0; flex: 1; }
.crewrow__body strong { display: block; font-size: 14px; font-weight: 620; }
.crewrow__body span { display: block; font-size: 12.5px; color: rgba(255,255,255,.55);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crewrow__n { font-size: 13.5px; color: rgba(255,255,255,.75); font-weight: 650; }
@keyframes row-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

/* --- the week --- */
.wk__peak { font-size: 14.5px; line-height: 1.5; color: rgba(255,255,255,.92); margin-bottom: 10px; max-width: 48ch; }
.wk__peak strong { font-weight: 700; }
.wk__chart { width: 100%; height: 190px; display: block; overflow: visible; }
.wk__area { animation: fade-in 900ms 220ms both; }
.wk__line { stroke-dasharray: 2200; stroke-dashoffset: 2200; animation: draw 1500ms var(--ease) 120ms forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.wk__dot { opacity: 0; animation: pop 420ms var(--spring) both; animation-delay: calc(700ms + var(--i) * 90ms); }
@keyframes pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
.wk__dot { transform-box: fill-box; transform-origin: center; }
.wk__axis { display: flex; justify-content: space-between; margin-top: 6px; padding: 0 4px; }
.wk__axis span { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.6); }
.wk__axis span.on { color: #14170f; background: #fff; padding: 2px 9px; border-radius: 999px; }

/* --- the numbers --- */
.strip { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(0, 3fr); gap: 22px; align-items: center; }
@media (max-width: 1080px) { .strip { grid-template-columns: 1fr; } }
.strip__title { font-size: 22px; letter-spacing: -.028em; margin-top: 4px; }
.strip__sub { font-size: 13.5px; color: rgba(20,23,15,.62); margin: 7px 0 0; line-height: 1.5; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 12px; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 2px;
  background: #fbf8f2; border-radius: var(--radius-sm); padding: 30px 15px 15px;
  color: var(--ink); text-decoration: none; box-shadow: var(--e2);
  animation: blk-in 460ms var(--spring-soft) both;
  animation-delay: calc(220ms + var(--i) * 60ms);
  transition: transform 260ms var(--spring), box-shadow var(--med);
}
.tile:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--e4); }
.tile:active { transform: translateY(-1px); }
/* The orange-chip idiom: a rounded icon square breaking the top edge of the
   card. It gives a flat tile a focal point and a bit of physicality. */
.tile__ico {
  position: absolute; top: -14px; left: 15px;
  width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(160deg, #7d8f2c, var(--accent));
  color: #fff; display: grid; place-items: center;
  box-shadow: var(--e2), inset 0 1px 0 rgba(255,255,255,.25);
}
.tile__ico .ico { width: 17px; height: 17px; }
.tile__label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
/* Scales with the tile, because a monthly recurring figure is a lot more
   characters than a stop count and was spilling out of the card. */
.tile__value {
  font-size: clamp(17px, 2.1vw, 25px); font-weight: 700; letter-spacing: -.032em;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.tile__value--bad { color: var(--bad); }
.tile__foot { font-size: 11.5px; color: var(--faint); }

.tile--cta {
  padding: 15px; justify-content: center;
  background: linear-gradient(160deg, #2a3220, #14170f); color: #fff;
}
.tile--cta .tile__label { color: #fff; font-size: 15px; font-weight: 660; letter-spacing: -.015em; }
.tile__cta-sub { font-size: 12px; color: rgba(255,255,255,.6); line-height: 1.45; margin-top: 4px; }
.tile__arrow {
  position: absolute; right: 13px; bottom: 13px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.14); display: grid; place-items: center;
  transition: transform 260ms var(--spring), background var(--fast);
}
.tile--cta:hover .tile__arrow { transform: translateX(3px); background: var(--accent); }

/* ---------- tab bar ---------- */
/* Used where two screens were merged into one place. Sliding pill, same shape
   as the nav, so "these are views of one thing" reads without a caption. */
.tabbar {
  display: inline-flex; gap: 3px; padding: 4px;
  background: rgba(255,255,255,.7); border: 1px solid var(--line);
  border-radius: 999px; box-shadow: var(--e1), var(--lip); margin-bottom: 16px;
}
.tabbar__tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: 999px;
  font-size: 14px; font-weight: 550; color: var(--muted); text-decoration: none;
  transition: background 200ms var(--spring), color var(--fast), box-shadow var(--fast);
}
.tabbar__tab:hover { color: var(--ink); text-decoration: none; background: rgba(255,255,255,.8); }
.tabbar__tab.is-on {
  background: linear-gradient(160deg, color-mix(in srgb, var(--tone, var(--accent)) 92%, #fff), var(--tone, var(--accent)));
  color: #fff; font-weight: 640; box-shadow: var(--e2), inset 0 1px 0 rgba(255,255,255,.2);
}
.tabbar__n {
  font-style: normal; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums;
  background: var(--surface-2); color: var(--faint); border-radius: 999px; padding: 1px 7px;
}
.tabbar__tab.is-on .tabbar__n { background: rgba(255,255,255,.24); color: #fff; }

/* ---------- crew cards ---------- */
.krew {
  background: linear-gradient(180deg, #fff, #fdfdfb);
  border: 1px solid var(--line); border-left: 4px solid var(--crew, var(--accent));
  border-radius: var(--radius-sm); padding: 15px 16px;
  box-shadow: var(--e1), var(--lip);
  animation: blk-in 460ms var(--spring-soft) both; animation-delay: calc(var(--i) * 70ms);
  transition: box-shadow var(--med), transform var(--med);
}
.krew:hover { box-shadow: var(--e3), var(--lip); transform: translateY(-2px); }
.krew__top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.krew__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--crew); flex: none; }
.krew__name { font-size: 15px; font-weight: 650; letter-spacing: -.015em; display: block; }
.krew__truck { font-size: 12.5px; color: var(--faint); }
.krew__bar { height: 6px; border-radius: 999px; background: var(--line-soft); overflow: hidden; margin-bottom: 12px; }
.krew__bar > i { display: block; height: 100%; border-radius: 999px; background: var(--crew); transition: width .4s var(--ease); }
.krew__stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 13px; }
.krew__stats b { display: block; font-size: 16px; font-weight: 680; letter-spacing: -.02em; }
.krew__stats span { display: block; font-size: 11.5px; color: var(--faint); margin-top: 1px; }
.krew__people { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.krew__sup { font-size: 12px; color: var(--faint); margin-left: 4px; }
.krew__foot { display: flex; align-items: center; gap: 14px; padding-top: 11px; font-size: 12.5px; color: var(--muted); }
.krew__foot a { margin-left: auto; font-weight: 600; }

/* ---------- day blocks (lawn book) ---------- */
.dayblk {
  background: linear-gradient(180deg, #fff, #fdfdfb);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 15px; box-shadow: var(--e1), var(--lip);
  animation: blk-in 420ms var(--spring-soft) both; animation-delay: calc(var(--i) * 60ms);
  transition: box-shadow var(--med), transform var(--med);
}
.dayblk:hover { box-shadow: var(--e3), var(--lip); transform: translateY(-2px); }
.dayblk__day { font-size: 12px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.dayblk__n { font-size: 30px; font-weight: 700; letter-spacing: -.035em; line-height: 1.1; margin-top: 3px; }
.dayblk__sub { font-size: 12.5px; color: var(--muted); }
.dayblk__subs { font-size: 11.5px; color: var(--faint); margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line-soft); }

/* ---------- weather strip ---------- */
/* Deliberately thin. Weather earns the top slot because it decides the week,
   but it is context for the blocks below rather than the headline — one summary
   line and one compact row of days. */
.wx {
  background: linear-gradient(180deg, #fff, #fdfdfb);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--e1), var(--lip); margin-bottom: 16px; overflow: hidden;
  animation: blk-in 460ms var(--spring-soft) both;
}
.wx__sum {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 14px; border-bottom: 1px solid var(--line-soft);
  font-size: 13px; color: var(--ink-2); line-height: 1.4;
  background: linear-gradient(180deg, color-mix(in srgb, var(--t-work) 6%, #fff), #fff);
}
.wx__sum .ico { width: 16px; height: 16px; color: var(--t-work); flex: none; }
.wx__sum > span { min-width: 0; }
.wx__note {
  margin-left: auto; flex: none; font-style: normal;
  font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--faint); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px;
}

.wx__days { display: grid; grid-template-columns: repeat(7, 1fr); }
@media (max-width: 900px) { .wx__days { grid-template-columns: repeat(4, 1fr); } }

/* Two tight lines per day: conditions on top, the verdict and the load below.
   One line does not fit seven columns without dropping the verdict, which is
   the most useful thing on the strip. */
.wxday {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 6px 9px; border-right: 1px solid var(--line-soft);
  animation: blk-in 380ms var(--spring-soft) both; animation-delay: calc(var(--i) * 40ms);
  transition: background var(--fast); cursor: default; min-width: 0;
}
.wxday__top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.wxday__bot { display: flex; align-items: center; gap: 6px; min-width: 0; }
.wxday:last-child { border-right: 0; }
.wxday:hover { background: var(--surface-2); }
.wxday__d {
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--faint); flex: none;
}
.wxday__i { color: var(--t-care); display: flex; flex: none; }
.wxday--no .wxday__i { color: var(--info); }
.wxday__t { font-size: 14px; font-weight: 680; letter-spacing: -.02em; flex: none; }
.wxday__t i { font-style: normal; font-size: 11.5px; color: var(--faint); margin-left: 3px; }
.wxday__call {
  font-size: 10px; font-weight: 700; border-radius: 999px; padding: 2px 7px; flex: none;
  background: var(--good-soft); color: var(--good); border: 1px solid var(--good-line);
  white-space: nowrap;
}
.wxday--risk .wxday__call { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.wxday--no   .wxday__call { background: var(--bad-soft);  color: var(--bad);  border-color: var(--bad-line); }
.wxday__jobs {
  font-size: 11px; font-weight: 600; color: var(--faint); flex: none;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.wxday.is-today {
  background: linear-gradient(180deg, var(--accent-soft), #fff);
  box-shadow: inset 0 2px 0 var(--accent);
}
.wxday.is-today .wxday__d { color: var(--accent-ink); }

/* The stop count is the first thing to go when columns get tight — the board
   below says the same thing in more detail. */
@media (max-width: 1240px) { .wxday__jobs { display: none; } }
@media (max-width: 1040px) { .wxday__call { font-size: 9.5px; padding: 2px 5px; } }

/* ==========================================================================
   Receivables — where the money is, at a glance
   ========================================================================== */

.mdeck { display: grid; gap: 16px; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); margin-bottom: 16px; }
@media (max-width: 1080px) { .mdeck { grid-template-columns: 1fr; } }

.bignum {
  font-size: clamp(34px, 4.4vw, 52px); font-weight: 700; letter-spacing: -.04em;
  line-height: 1; font-variant-numeric: tabular-nums; margin-bottom: 18px;
}

/* On-time vs late as one bar. The proportion is the story — a big number with
   no split tells you nothing about whether you have a problem. */
.split__bar {
  display: flex; height: 12px; border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,.12); margin-bottom: 11px;
}
.split__bar > i { display: block; height: 100%; transition: width .5s var(--ease); }
.split__cur  { background: linear-gradient(90deg, var(--earth-olive), var(--earth-lime)); }
.split__late { background: linear-gradient(90deg, #b4553a, #d4795c); }
.split__keys { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: rgba(255,255,255,.78); }
.split__keys i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; }
.dotc { background: var(--earth-lime); }
.dotl { background: #d4795c; }

.nudge {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 18px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: rgba(177,200,96,.13); border: 1px solid rgba(177,200,96,.28);
  color: #e7eed2; font-size: 13.5px; text-decoration: none;
  transition: background var(--fast), transform 220ms var(--spring);
}
.nudge:hover { background: rgba(177,200,96,.2); text-decoration: none; color: #fff; transform: translateY(-1px); }
.nudge span { margin-left: auto; font-weight: 650; white-space: nowrap; }

/* Aging as one proportional bar. Five table rows of numbers make you do the
   arithmetic; a bar shows you in one look whether the old money is a sliver or
   a third of what you are owed. */
.agebar {
  display: flex; gap: 3px; height: 46px; margin-bottom: 16px;
  border-radius: var(--radius-sm); overflow: hidden;
}
.agebar__seg {
  display: grid; place-items: center; min-width: 4px;
  font-size: 12.5px; font-weight: 700; color: #fff;
  animation: grow 620ms var(--spring-soft) both;
}
@keyframes grow { from { flex-grow: 0.001; opacity: 0; } }
.agebar__seg--ok    { background: linear-gradient(160deg, #7d8f2c, var(--earth-olive)); }
.agebar__seg--warn  { background: linear-gradient(160deg, #a8842c, var(--warn)); }
.agebar__seg--warn2 { background: linear-gradient(160deg, #9c6a26, #7d5218); }
.agebar__seg--bad   { background: linear-gradient(160deg, #b0553c, var(--bad)); }
.agebar__seg--bad2  { background: linear-gradient(160deg, #8a3626, #6b271b); }
.agebar__empty { flex: 1; display: grid; place-items: center; background: rgba(20,23,15,.06);
  color: var(--muted); font-size: 13px; border-radius: var(--radius-sm); }

.agekeys { display: grid; gap: 1px; }
.agekey {
  display: flex; align-items: center; gap: 10px; padding: 7px 0;
  font-size: 13.5px; border-bottom: 1px solid rgba(20,23,15,.07);
}
.agekey:last-child { border-bottom: 0; }
.agekey.is-zero { opacity: .42; }
.agedot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.agedot--ok { background: var(--earth-olive); }
.agedot--warn { background: var(--warn); }
.agedot--warn2 { background: #7d5218; }
.agedot--bad { background: var(--bad); }
.agedot--bad2 { background: #6b271b; }
.agekey__l { flex: 1; color: rgba(20,23,15,.72); }
.agekey__v { font-weight: 680; }
.agekey__n {
  min-width: 26px; text-align: center; font-size: 11.5px; font-weight: 650;
  background: rgba(20,23,15,.09); border-radius: 999px; padding: 2px 7px; color: rgba(20,23,15,.6);
}

.health__row { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.health__row:last-of-type { border-bottom: 0; }
.health__l { flex: 1; font-size: 13.5px; color: var(--muted); }
.health__v { font-size: 19px; font-weight: 680; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ---------- crew rows: day + week ---------- */
.crewrow__prog { display: flex; flex-direction: column; gap: 5px; flex: none; width: 148px; }
.cbar { display: flex; align-items: center; gap: 7px; }
.cbar em {
  font-style: normal; font-size: 9.5px; font-weight: 800; letter-spacing: .06em;
  color: rgba(255,255,255,.42); width: 9px; flex: none;
}
.cbar i {
  flex: 1; height: 5px; border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,.14); display: block;
}
.cbar i > b {
  display: block; height: 100%; border-radius: 999px;
  background: var(--crew, var(--earth-lime));
  transition: width .5s var(--ease);
}
/* The week reads quieter than the day — today is the thing you can still
   change; the week is context. */
.cbar--week i > b { background: rgba(255,255,255,.4); }
.cbar--week em { color: rgba(255,255,255,.3); }
.cbar u {
  text-decoration: none; font-size: 11px; font-weight: 650;
  color: rgba(255,255,255,.72); width: 34px; text-align: right; flex: none;
}
.cbar--week u { color: rgba(255,255,255,.42); }
@media (max-width: 1080px) { .crewrow__prog { width: 120px; } .cbar u { width: 30px; } }

/* ---------- Home's messages action ---------- */
.homemsg {
  display: flex; align-items: center; gap: 11px; margin-left: auto; flex: none;
  max-width: 340px; padding: 9px 15px 9px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  text-decoration: none; box-shadow: var(--e1), var(--lip);
  transition: transform 220ms var(--spring), box-shadow var(--fast), border-color var(--fast);
}
.homemsg:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--e3); border-color: #cfcfc4; }
.homemsg:active { transform: translateY(0); }
.homemsg__ico {
  position: relative; width: 34px; height: 34px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #7d8f2c, var(--accent)); color: #fff;
  box-shadow: var(--e1), inset 0 1px 0 rgba(255,255,255,.25);
}
.homemsg__ico .ico { width: 17px; height: 17px; }
.homemsg__ico em {
  position: absolute; top: -6px; right: -6px; font-style: normal;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--bad); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--surface);
}
.homemsg__body { min-width: 0; }
.homemsg__body strong { display: block; font-size: 13.5px; font-weight: 650; letter-spacing: -.01em; }
.homemsg__body span {
  display: block; font-size: 12.5px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.homemsg--unread { border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), #fff); }

.krew__route { margin-left: auto; }

/* ---------- day detail ---------- */
.wxday { border: 0; background: none; font: inherit; cursor: pointer; text-align: center; width: 100%; }
.wxday:hover { background: var(--surface-2); }
.wxday:active { transform: scale(.98); }
.wxday__rain { font-size: 11px; font-weight: 650; color: var(--faint); font-variant-numeric: tabular-nums; flex: none; }
.wxday__rain.is-wet { color: var(--info); }
@media (max-width: 1360px) { .wxday__rain { display: none; } }

.daytop {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 16px 18px; margin-bottom: 16px; border-radius: var(--radius-sm);
  background: linear-gradient(160deg, #232a18, #14170f); color: #fff;
}
.daytop__wx { display: flex; align-items: center; gap: 14px; }
.daytop__ico { color: var(--earth-lime); display: flex; }
.daytop__t b { font-size: 38px; font-weight: 700; letter-spacing: -.04em; }
.daytop__t span { font-size: 17px; color: rgba(255,255,255,.45); margin-left: 8px; }
.daytop__c { font-size: 13.5px; color: rgba(255,255,255,.6); }
.daytop__grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin: 0; flex: 1; min-width: 260px; }
.daytop__grid dt { font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: rgba(255,255,255,.42); }
.daytop__grid dd { margin: 3px 0 0; font-size: 17px; font-weight: 680; letter-spacing: -.02em; }

.vchips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.vchip { padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid; }
.vchip__k { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.vchip strong { display: block; font-size: 16px; letter-spacing: -.02em; margin-top: 2px; }
.vchip__n { display: block; font-size: 12px; opacity: .75; margin-top: 2px; }
.vchip--go   { background: var(--good-soft); border-color: var(--good-line); color: var(--good); }
.vchip--risk { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.vchip--no   { background: var(--bad-soft);  border-color: var(--bad-line);  color: var(--bad); }

/* Hourly: rain probability as height, the workable stretch called out. */
.hrs {
  display: grid; grid-template-columns: repeat(16, 1fr); gap: 2px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 8px;
}
.hr { display: flex; flex-direction: column; align-items: center; gap: 4px; border-radius: 5px; padding: 2px 0; }
.hr.in-window { background: rgba(98,117,29,.1); }
.hr__bar { display: flex; align-items: flex-end; height: 68px; width: 100%; justify-content: center; }
.hr__bar > i {
  display: block; width: 72%; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #a9bfcd, #d4dee4); min-height: 4px;
  transition: height .4s var(--ease);
}
.hr.is-wet .hr__bar > i { background: linear-gradient(180deg, #2b6485, #5b8fae); }
.hr__t { font-size: 10.5px; font-weight: 650; color: var(--ink-2); }
.hr__h { font-size: 9.5px; color: var(--faint); height: 12px; }

.radar { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: #0e120b; }
.radar canvas { display: block; width: 100%; }
.radar__time { font-size: 13px; font-weight: 650; color: var(--muted); min-width: 62px; text-align: right; }
.radar__key { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: var(--faint); flex: none; }
.radar__ramp {
  display: block; width: 92px; height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, #5ab45e, #46be5a, #dcd246, #eb9632, #d74632, #aa2864);
}

.daybook { display: grid; gap: 6px; }
.daybook__row {
  display: flex; align-items: center; gap: 10px; font-size: 13.5px;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.daybook__row .btn { margin-left: auto; }

/* ---------- message location ---------- */
/* Sits under the bubble, quiet. It is provenance, not content — you should be
   able to ignore it until the moment you need it. */
.msgplace {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--faint); margin-top: 4px; padding: 0 2px;
}
.msgplace.is-mine { justify-content: flex-end; }
.msgplace .ico { width: 12px; height: 12px; }

/* ==========================================================================
   Customer record
   ========================================================================== */

/* The glance bar. Same derivation the crew sees on their job card — the chips
   marked "office" are the ones that stop here. */
.glance {
  display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1.3fr) minmax(210px,auto);
  gap: 0; margin-bottom: 18px;
  background: linear-gradient(180deg, #fff, #fdfdfb);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--e2), var(--lip); overflow: hidden;
  animation: blk-in 420ms var(--spring-soft) both;
}
@media (max-width: 1080px) { .glance { grid-template-columns: 1fr; } }
.glance__cell { padding: 14px 18px; border-right: 1px solid var(--line-soft); min-width: 0; }
.glance__cell:last-child { border-right: 0; }
.glance__cell--bal { background: var(--surface-2); }
.glance__k {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 9px;
}
.glance__sync {
  font-style: normal; text-transform: none; letter-spacing: 0; font-size: 10.5px;
  background: var(--accent-soft); color: var(--accent-ink);
  border: 1px solid var(--accent-line); border-radius: 999px; padding: 1px 7px;
}
.glance__services, .glance__alerts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.svcpill {
  display: inline-flex; flex-direction: column; gap: 1px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: var(--radius-xs);
  padding: 5px 10px;
}
.svcpill strong { font-size: 12.5px; font-weight: 620; }
.svcpill em { font-style: normal; font-size: 11px; color: var(--faint); }
.svcpill--irrigation { border-left-color: var(--t-people); }
.svcpill--chemical   { border-left-color: var(--t-care); }
.svcpill--snow       { border-left-color: var(--t-kit); }
.svcpill--equipment  { border-left-color: var(--t-money); }

.alertpill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 620; padding: 4px 10px; border-radius: 999px;
  border: 1px solid; cursor: default;
}
.alertpill--bad     { background: var(--bad-soft);  color: var(--bad);  border-color: var(--bad-line); }
.alertpill--warn    { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.alertpill--info    { background: var(--info-soft); color: var(--info); border-color: var(--info-line); }
.alertpill--neutral { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.alertpill__office {
  font-style: normal; font-size: 9.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; opacity: .65; border-right: 1px solid currentColor;
  padding-right: 6px; margin-right: -1px;
}

.glance__bal { font-size: 28px; font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.glance__bal.is-late { color: var(--bad); }
.glance__bal.is-clear { color: var(--good); }
.glance__sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.standing {
  display: inline-block; margin-top: 9px; font-size: 11.5px; font-weight: 650;
  padding: 3px 9px; border-radius: 999px; border: 1px solid;
}
.standing--good { background: var(--good-soft); color: var(--good); border-color: var(--good-line); }
.standing--warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.standing--bad  { background: var(--bad-soft);  color: var(--bad);  border-color: var(--bad-line); }
.standing--new  { background: var(--surface-2); color: var(--muted); border-color: var(--line); }

/* --- media --- */
.media { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.media__item { margin: 0; }
.media__frame {
  aspect-ratio: 4/3; border-radius: var(--radius-sm); display: grid; place-items: center;
  background: linear-gradient(160deg, #dfe3d6, #cdd4c0); color: var(--accent-ink);
  border: 1px solid var(--line); margin-bottom: 7px;
}
.media__frame .ico { width: 28px; height: 28px; }
.media__item--incident .media__frame { background: linear-gradient(160deg, #f0d9d2, #e3c2b8); color: var(--bad); }
.media__item--measurement .media__frame { background: linear-gradient(160deg, #d8e0ea, #c3cedd); color: var(--info); }
.media__item figcaption { display: flex; flex-direction: column; gap: 2px; }
.media__item figcaption strong { font-size: 12.5px; font-weight: 620; }
.media__item figcaption span { font-size: 11.5px; color: var(--faint); }
.media__note { color: var(--muted) !important; line-height: 1.4; }
.media__item .badge { align-self: flex-start; margin-top: 3px; }

/* --- communication timeline --- */
.timeline { padding: 4px 0; }
.tl { display: flex; gap: 13px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); }
.tl:last-child { border-bottom: 0; }
.tl__dot {
  width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
}
.tl__dot .ico { width: 15px; height: 15px; }
/* Inbound is tinted: "did they contact us" is the question you scan for. */
.tl--in .tl__dot { background: var(--info-soft); border-color: var(--info-line); color: var(--info); }
.tl__body { min-width: 0; flex: 1; }
.tl__head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tl__head strong { font-size: 13.5px; font-weight: 620; }
.tl__meta { font-size: 11.5px; color: var(--faint); margin-left: auto; white-space: nowrap; }
.tl__text { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.tl__tags { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }

/* --- payment card --- */
.paycard {
  border-radius: var(--radius-sm); padding: 16px;
  background: linear-gradient(150deg, #2a3220, var(--ink)); color: #fff;
  box-shadow: var(--e2);
}
.paycard__brand { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .6; }
.paycard__num { font-size: 17px; font-weight: 600; letter-spacing: .06em; margin: 10px 0 14px; font-variant-numeric: tabular-nums; }
.paycard__foot { display: flex; justify-content: space-between; font-size: 12px; opacity: .7; }

/* --- service catalogue picker --- */
.pkgs { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; }
.pkgs__group { margin-bottom: 10px; }
.pkg {
  display: block; width: 100%; text-align: left; font: inherit; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius-xs); padding: 9px 11px; margin-bottom: 5px;
  transition: border-color var(--fast), background var(--fast), transform var(--fast);
}
.pkg:hover { border-color: var(--accent-line); transform: translateX(2px); }
.pkg.is-on { border-color: var(--accent); background: var(--accent-soft); }
.pkg__name { display: block; font-size: 13.5px; font-weight: 620; }
.pkg__meta { display: block; font-size: 12px; color: var(--faint); margin-top: 1px; }

/* ---------- row links ---------- */
/* The primary cell of a clickable row is a real anchor: it looks clickable,
   works with the keyboard, and cmd-click opens a new tab. Row-click stays as a
   convenience for the mouse, but it is no longer the only way in. */
.rowlink {
  display: flex; align-items: center; gap: 10px;
  color: inherit; text-decoration: none; margin: -4px 0;
}
.rowlink:hover { text-decoration: none; }
.rowlink strong { display: block; font-weight: 620; }
.rowlink:hover strong { color: var(--accent-ink); }
.rowlink__go {
  margin-left: auto; flex: none; display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  color: var(--faint); opacity: 0; transform: translateX(-4px);
  transition: opacity var(--fast), transform 200ms var(--spring), background var(--fast);
}
.rowlink__go .ico { width: 14px; height: 14px; }
tr:hover .rowlink__go { opacity: 1; transform: none; background: var(--accent-soft); color: var(--accent); }
.rowlink:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-xs); }

/* ---------- customers glance bar ---------- */
/* Filters that look like something you would want to read. Same shape language
   as the home tiles: an icon chip breaking the top edge, one big figure, a
   plain-language footnote. Pressed state is the filter. */
.cglance {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px; margin-bottom: 18px;
}
.cgcard {
  position: relative; display: flex; flex-direction: column; gap: 1px;
  text-align: left; font: inherit; cursor: pointer;
  background: linear-gradient(180deg, #fff, #fdfdfb);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 15px 14px; box-shadow: var(--e1), var(--lip);
  animation: blk-in 420ms var(--spring-soft) both; animation-delay: calc(var(--i) * 55ms);
  transition: transform 240ms var(--spring), box-shadow var(--med), border-color var(--med);
}
.cgcard:hover { transform: translateY(-3px); box-shadow: var(--e3), var(--lip); border-color: var(--tone); }
.cgcard:active { transform: translateY(-1px); }
.cgcard__ico {
  position: absolute; top: -13px; left: 15px;
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tone) 78%, #fff), var(--tone));
  box-shadow: var(--e2), inset 0 1px 0 rgba(255,255,255,.28);
}
.cgcard__ico .ico { width: 16px; height: 16px; }
.cgcard__v {
  font-size: clamp(19px, 2vw, 25px); font-weight: 700; letter-spacing: -.032em;
  font-variant-numeric: tabular-nums; line-height: 1.12;
}
.cgcard__v.is-alert { color: var(--bad); }
.cgcard__l { font-size: 13px; font-weight: 620; color: var(--ink-2); }
.cgcard__f { font-size: 11.5px; color: var(--faint); line-height: 1.4; }

.cgcard--people { --tone: var(--t-people); }
.cgcard--work   { --tone: var(--t-work); }
.cgcard--kit    { --tone: var(--t-kit); }
.cgcard--money  { --tone: var(--t-money); }
.cgcard--care   { --tone: var(--t-care); }

/* Selected: the card fills in, same idiom as the nav pill. */
.cgcard.is-on {
  border-color: var(--tone);
  background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 11%, #fff), color-mix(in srgb, var(--tone) 4%, #fff));
  box-shadow: var(--e2), var(--lip), inset 0 0 0 1px color-mix(in srgb, var(--tone) 30%, transparent);
}
.cgcard.is-on .cgcard__l { color: color-mix(in srgb, var(--tone) 80%, var(--ink)); }
/* Marks an agreement that runs on its own crew or day rather than inheriting
   the property's. Quiet — the common case is inheritance. */
.ovtag {
  font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  background: var(--surface-2); color: var(--faint);
  border: 1px solid var(--line); border-radius: 4px; padding: 1px 4px; vertical-align: 1px;
}

/* ---------- quote conversion ---------- */
.convlist { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.convrow {
  display: grid; grid-template-columns: 1fr 180px 84px; gap: 10px; align-items: center;
  padding: 9px 12px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px;
}
.convrow:last-child { border-bottom: 0; }
.convrow strong { font-weight: 620; }
.convrow select, .convrow input { height: 30px; font-size: 13px; }
.convrow .tnum { text-align: right; font-weight: 620; }
@media (max-width: 700px) { .convrow { grid-template-columns: 1fr; } }
.quotebox {
  margin: 0; padding: 12px 16px; border-left: 3px solid var(--t-people);
  background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14.5px; line-height: 1.55; color: var(--ink-2);
}

/* ---------- pipeline strip ---------- */
/* Lead → Quote → Won, as three steps you can walk. Makes the shape of the
   process visible on the screen that sits in the middle of it. */
.pipe {
  display: flex; align-items: stretch; gap: 6px; margin-bottom: 18px;
  background: linear-gradient(180deg, #fff, #fdfdfb);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--e1), var(--lip);
}
.pipe__step {
  flex: 1; display: flex; flex-direction: column; gap: 1px;
  padding: 9px 13px; border-radius: var(--radius-sm);
  color: inherit; text-decoration: none; min-width: 0;
  transition: background var(--fast), transform 200ms var(--spring);
}
a.pipe__step:hover { background: var(--surface-2); text-decoration: none; transform: translateY(-2px); }
.pipe__step.is-here {
  background: linear-gradient(160deg, color-mix(in srgb, var(--t-people) 12%, #fff), color-mix(in srgb, var(--t-people) 5%, #fff));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t-people) 28%, transparent);
}
.pipe__n { font-size: 22px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pipe__l { font-size: 13px; font-weight: 640; }
.pipe__s { font-size: 11.5px; color: var(--faint); }
.pipe__arrow { display: grid; place-items: center; color: var(--line); flex: none; }
.pipe__arrow .ico { width: 18px; height: 18px; }
@media (max-width: 760px) { .pipe { flex-direction: column; } .pipe__arrow { transform: rotate(90deg); } }
/* The invoice preview inside a modal — the document keeps its own white page
   rather than inheriting the app's surfaces. */
.invwrap { background: var(--bg); margin: -18px; padding: 20px; border-radius: 0 0 12px 12px; }
.invwrap .inv { box-shadow: var(--e3); border-radius: 4px; }

/* ---------- brand settings ---------- */
.brandrow { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: space-between; }
.brandprev { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brandprev .brandmark { box-shadow: var(--e2); }

/* --- take a payment ------------------------------------------------------ */
/* Sized and coloured to sit level with the primary action, not below it. The
   office opens envelopes all morning; this is a first-class verb. */
.paybtn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 999px;
  font: inherit; font-size: 13.5px; font-weight: 650; letter-spacing: -.01em;
  color: var(--t-money); cursor: pointer;
  background: linear-gradient(180deg, #fff, var(--t-money-soft));
  border: 1.5px solid var(--t-money-line);
  box-shadow: var(--e1), var(--lip);
  transition: transform var(--fast), box-shadow var(--fast), border-color var(--fast);
}
.paybtn:hover { transform: translateY(-1px); box-shadow: var(--e2), var(--lip); border-color: var(--t-money); }
.paybtn:active { transform: translateY(0); }
.paybtn .ico { width: 17px; height: 17px; }
.paybtn__n {
  font-style: normal; font-size: 11px; font-weight: 700; line-height: 1;
  padding: 3px 6px; border-radius: 999px;
  background: var(--t-money); color: #fff;
}
@media (max-width: 1180px) { .paybtn span { display: none; } .paybtn { padding: 0 11px; } }

.paybox-back { align-items: flex-start; }
.paybox {
  width: min(620px, 94vw); margin: 6vh auto 0; background: var(--surface);
  border-radius: var(--r-lg); border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(20,23,15,.24); overflow: hidden;
  display: flex; flex-direction: column; max-height: 88vh;
  animation: pbIn 200ms var(--spring) both;
}
@keyframes pbIn { from { opacity: 0; transform: translateY(-10px) scale(.985); } }
.paybox__head {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--t-money-soft), transparent);
}
.paybox__head h3 { font-size: 17px; }
.paybox__sub { font-size: 12.5px; color: var(--faint); margin-top: 2px; }
.paybox__head .iconbtn { margin-left: auto; }
.paybox__tally {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 6px; border-radius: 999px;
  background: #fff; border: 1px solid var(--t-money-line);
}
.paybox__tallyn {
  min-width: 20px; height: 20px; display: grid; place-items: center;
  border-radius: 999px; background: var(--t-money); color: #fff;
  font-size: 11px; font-weight: 700;
}
.paybox__tallyv { font-size: 13px; font-weight: 650; color: var(--t-money); }
.paybox__body { padding: 18px; overflow-y: auto; }
.paybox__foot {
  padding: 14px 18px; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: flex-end; gap: 9px; background: var(--surface-2);
}
.paybox__hint { font-size: 12px; color: var(--faint); line-height: 1.5; margin: 8px 2px 0; }
.paybox__empty { font-size: 13px; color: var(--faint); padding: 14px 2px; }

.pbfield { display: block; }
.pbfield__label {
  display: block; font-size: 11.5px; font-weight: 650; letter-spacing: .04em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 5px;
}
.pbfield input {
  width: 100%; height: 42px; padding: 0 12px; font: inherit; font-size: 14.5px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  background: #fff; color: var(--ink); outline: none;
  transition: border-color var(--fast), box-shadow var(--fast);
}
.pbfield input:focus { border-color: var(--t-money); box-shadow: 0 0 0 4px var(--t-money-soft); }
/* The amount and the name are what you are actually reading off the cheque, so
   they get the size. Everything else is secondary. */
.pbfield--big input { height: 50px; font-size: 18px; font-weight: 600; }
.pbamt { position: relative; }
.pbamt input { padding-left: 30px; }
.pbcur { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); font-weight: 600; }
.pbrow { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; margin-bottom: 14px; }
@media (max-width: 560px) { .pbrow { grid-template-columns: 1fr; } }

.pblist { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow-y: auto; }
.pbhit {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; padding: 11px 13px; font: inherit;
  background: var(--surface-2); border: 1.5px solid transparent;
  border-radius: var(--r-sm); cursor: pointer; color: var(--ink);
  transition: background var(--fast), border-color var(--fast), transform var(--fast);
}
.pbhit:hover, .pbhit:focus-visible {
  background: #fff; border-color: var(--t-money); transform: translateX(2px); outline: none;
}
.pbhit__name { font-weight: 600; font-size: 14px; }
.pbhit__meta { font-size: 12.5px; color: var(--faint); }

.pbwho {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; margin-bottom: 16px; border-radius: var(--r-sm);
  background: var(--t-money-soft); border: 1px solid var(--t-money-line);
}
.pbwho strong { display: block; font-size: 15px; }
.pbwho .sub { display: block; font-size: 12.5px; color: var(--faint); margin-top: 2px; }

.pbchips { display: flex; flex-wrap: wrap; gap: 7px; }
.pbchip {
  font: inherit; font-size: 13px; font-weight: 600; padding: 7px 13px;
  border-radius: 999px; cursor: pointer; color: var(--faint);
  background: var(--surface-2); border: 1.5px solid var(--line);
  transition: all var(--fast);
}
.pbchip:hover { color: var(--ink); border-color: var(--t-money-line); }
/* Cheque is first and preselected. It stays visually distinct even when
   another method is chosen, so the default is obvious on the way back. */
.pbchip[data-primary] { order: -1; }
.pbchip.is-on {
  background: var(--t-money); border-color: var(--t-money); color: #fff;
  box-shadow: 0 2px 8px rgba(134,92,35,.28);
}

.pbapply { margin-top: 18px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.pbapply__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 9px;
}
.pbapply__head .faint { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; }
.pbline {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border-radius: var(--r-sm); margin-bottom: 5px;
  background: var(--surface-2); border: 1.5px solid transparent;
  transition: background var(--fast), border-color var(--fast);
}
.pbline--full { background: var(--t-money-soft); border-color: var(--t-money-line); }
.pbline--part { background: var(--warn-soft); border-color: var(--warn-line); }
.pbline__id strong { font-size: 13.5px; }
.pbline__id .sub { display: block; font-size: 11.5px; color: var(--faint); margin-top: 1px; }
.pbdue { color: var(--bad); font-weight: 600; }
.pbline__amt { position: relative; flex: none; }
.pballoc {
  width: 108px; height: 34px; padding: 0 10px 0 24px; text-align: right;
  font: inherit; font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  background: #fff; color: var(--ink); outline: none;
}
.pballoc:focus { border-color: var(--t-money); box-shadow: 0 0 0 3px var(--t-money-soft); }
.pbline__amt .pbcur { left: 10px; font-size: 13px; }
.pbover {
  margin-top: 9px; padding: 9px 12px; border-radius: var(--r-sm); font-size: 12.5px;
  background: var(--info-soft); border: 1px solid var(--info-line); color: var(--info);
}
.pbover--bad { background: var(--bad-soft); border-color: var(--bad-line); color: var(--bad); font-weight: 600; }

/* --- top bar icon button (messages) -------------------------------------- */
.topicon {
  position: relative; flex: none;
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; cursor: pointer;
  color: var(--muted); background: var(--surface-2);
  border: 1.5px solid var(--line);
  transition: transform var(--fast), box-shadow var(--fast), border-color var(--fast), color var(--fast), background var(--fast);
}
.topicon:hover {
  transform: translateY(-1px); color: var(--ink); background: #fff;
  border-color: var(--accent-line); box-shadow: var(--e2), var(--lip);
}
.topicon:active { transform: translateY(0); }
.topicon .ico { width: 18px; height: 18px; }
/* Unread mail is the one thing in this bar that is genuinely time-sensitive,
   so it gets the alert colour rather than the brand — a crew waiting on an
   answer should not blend into the furniture. */
.topicon--alert { color: var(--bad); border-color: var(--bad-line); background: var(--bad-soft); }
.topicon--alert:hover { color: var(--bad); border-color: var(--bad); background: #fff; }
.topicon__n {
  position: absolute; top: -6px; right: -6px;
  min-width: 19px; height: 19px; padding: 0 5px;
  display: grid; place-items: center;
  font-style: normal; font-size: 11px; font-weight: 700; line-height: 1;
  color: #fff; background: var(--bad);
  border: 2px solid var(--surface); border-radius: 999px;
  box-shadow: 0 1px 4px rgba(150,67,42,.4);
  animation: badgePop 260ms var(--spring);
}
@keyframes badgePop { from { transform: scale(.4); opacity: 0; } }

/* --- paying ahead --------------------------------------------------------- */
.pbahead { color: var(--good); font-weight: 600; }
.pbaheadbox {
  margin-top: 16px; padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--good-soft); border: 1px solid var(--good-line);
}
.pbaheadbox__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase;
  color: var(--good); margin-bottom: 9px;
}
.pbaheadbox__head .faint { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 11.5px; }
.pbahead__chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
@media (max-width: 560px) { .pbahead__chips { grid-template-columns: repeat(2, 1fr); } }
/* Label over amount, not side by side: the office is scanning for the number
   that matches the cheque in their hand, so the number gets its own line. */
.pbahead__chip {
  display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
  padding: 9px 11px; font: inherit; text-align: left; cursor: pointer;
  background: #fff; border: 1.5px solid var(--good-line); border-radius: var(--r-sm);
  color: var(--ink); transition: all var(--fast);
}
.pbahead__chip:hover {
  border-color: var(--good); transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(98,117,29,.16);
}
.pbahead__lab { font-size: 11.5px; color: var(--faint); font-weight: 600; }
.pbahead__amt { font-size: 14px; font-weight: 700; color: var(--good); }
/* A prepaid account is not a zero balance — it reads as money in hand, which is
   the opposite signal and deserves the opposite colour. */
.glance__bal.is-ahead { color: var(--good); }
.pbahead__chip.is-on {
  border-color: var(--good); background: var(--good-soft);
  box-shadow: 0 0 0 3px rgba(98,117,29,.14);
}
.pbahead__off {
  font-size: 10.5px; font-weight: 700; letter-spacing: .01em;
  color: var(--good); margin-top: 1px;
}
.pbahead__off--none { color: var(--faint); font-weight: 500; }
/* The breakdown is the thing that stops a phone conversation going wrong, so it
   reads as a receipt rather than a hint. */
.pbdeal {
  margin-top: 11px; padding: 11px 13px; border-radius: var(--r-sm);
  background: #fff; border: 1px solid var(--good-line);
}
.pbdeal__row {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 13px; padding: 3px 0; color: var(--muted);
}
.pbdeal__row--off { color: var(--good); font-weight: 600; }
.pbdeal__row--tot {
  border-top: 1px solid var(--line-soft); margin-top: 4px; padding-top: 7px;
  font-weight: 700; font-size: 14.5px; color: var(--ink);
}
.pbdeal__note {
  margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line);
  font-size: 12px; line-height: 1.55; color: var(--muted);
}
.pbdeal__note strong { color: var(--good); }
.pctwrap { position: relative; }
.pctwrap input { width: 100%; height: 42px; padding: 0 30px 0 12px; font: inherit; font-size: 14.5px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff; color: var(--ink); outline: none; }
.pctwrap input:focus { border-color: var(--t-money); box-shadow: 0 0 0 4px var(--t-money-soft); }
.pctwrap__sign { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); font-weight: 600; }

/* --- credit on account ---------------------------------------------------- */
.creditcard { margin-top: 14px; }
.creditcard__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.creditcard__k {
  font-size: 11.5px; font-weight: 650; letter-spacing: .04em;
  text-transform: uppercase; color: var(--faint);
}
.creditcard__v { font-size: 26px; font-weight: 700; color: var(--good); letter-spacing: -.02em; margin-top: 2px; }
.creditcard__note { margin-top: 10px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.creditcard__next {
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line);
  font-size: 12.5px; color: var(--ink);
}

/* --- sign in --------------------------------------------------------------
   Chromeless, like setup. Signing in is a decision about which company you are
   working on, not a screen inside one. */

.signin { min-height: 78vh; display: grid; place-items: center; padding: 24px; }
.signin__card {
  width: min(400px, 100%); text-align: center;
  background: linear-gradient(180deg, #fff, #fdfdfb);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 34px 30px 28px; box-shadow: var(--e3), var(--lip);
}
.signin__mark {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 15px;
  display: grid; place-items: center; font-size: 24px; font-weight: 800; color: #fff;
  background: linear-gradient(150deg, var(--accent), var(--accent-ink));
  box-shadow: 0 6px 18px rgba(98,117,29,.3);
}
.signin__card h1 { font-size: 22px; letter-spacing: -.03em; }
.signin__lede { margin-top: 8px; font-size: 14px; color: var(--muted); line-height: 1.55; }

.signin__f { display: block; text-align: left; margin-top: 14px; }
.signin__f span {
  display: block; font-size: 11.5px; font-weight: 650; letter-spacing: .04em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 5px;
}
.signin__f input {
  width: 100%; height: 46px; padding: 0 13px; font: inherit; font-size: 15px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  background: #fff; color: var(--ink); outline: none;
  transition: border-color var(--fast), box-shadow var(--fast);
}
.signin__f input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.signin__f input:disabled { background: var(--surface-2); color: var(--faint); }

.signin__go { width: 100%; height: 48px; margin-top: 18px; justify-content: center; font-size: 15px; }
.signin__demo { width: 100%; justify-content: center; margin-top: 4px; }
.signin__note { margin-top: 12px; font-size: 12px; color: var(--faint); line-height: 1.55; }

.signin__or {
  position: relative; margin: 22px 0 14px; font-size: 12px; color: var(--faint);
}
.signin__or::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line);
}
.signin__or span { position: relative; background: #fdfdfb; padding: 0 12px; }

.signin__err {
  margin-top: 16px; padding: 11px 13px; border-radius: var(--r-sm); text-align: left;
  background: var(--bad-soft); border: 1px solid var(--bad-line);
  color: var(--bad); font-size: 13px; line-height: 1.5;
}
.signin__err--warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }

.signin__prog { margin-top: 16px; text-align: left; }
.signin__bar { height: 5px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.signin__bar > i { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.signin__prog span { display: block; font-size: 12px; color: var(--faint); margin-top: 6px; }

.signin__foot { margin-top: 18px; font-size: 12.5px; color: var(--faint); }
.signin__foot a { color: var(--accent); }
