/* ==========================================================================
   Orange Crew Junk Removal: office dashboard
   Follows the public website (see DESIGN.md): wide Archivo type, a white
   header with centered links, flat orange buttons with a dark label, warm
   paper backgrounds, near-black "ink" surfaces and white cards with small
   corners. Every design value is a custom property.
   ========================================================================== */
:root {
  /* brand */
  --brand: #ed6f23;
  --brand-hi: #f58a47;
  --brand-lo: #d65f16;
  --brand-deep: #b54c0c;
  --brand-soft: #fdf1e7;
  --brand-tint: #fef7f0;

  /* text */
  --ink: #1a1612;
  --ink-2: #3b352f;
  --body: #6e665c;
  --body-strong: #5a5249;
  --faint: #a9a094;

  /* dark surfaces, and the accent: an orange dark enough to be read as text
     on white (links, hover, focus). The leaf green of the logo is kept for
     "good" states: paid, switched on. */
  --deep: #1a1612;
  --deep-2: #2b251f;
  --deep-3: #211c17;
  --accent: #b54c0c;
  --accent-bright: #ed6f23;
  --accent-soft: #fdf1e7;
  --leaf: #0f8a47;
  --leaf-deep: #0b6e38;
  --leaf-bright: #3ccf7a;

  /* surfaces and lines */
  --page: #f6f2eb;
  --surface: #ffffff;
  --surface-warm: #faf7f2;
  --line: #e2dacd;
  --line-2: #ece6db;
  --line-strong: #d8d0c4;
  --line-input: #cfc7bb;

  /* status pairs: tint + text that passes AA on that tint */
  --gray-bg: #efebe4;    --gray-fg: #554e46;
  --blue-bg: #e8f0fb;    --blue-fg: #1c4c8c;
  --amber-bg: #fff1dc;   --amber-fg: #7a4400;
  --ok-bg: #e2f3ea;      --ok-fg: #0b5c33;
  --red-bg: #fde8e6;     --red-fg: #a1241a;
  --red: #b3261e;

  /* schedule and payment colors. A job takes the color of its customer's
     payments: red = an invoice is overdue, yellow = one is due today,
     green = paid up. With nothing due it is blue (booked) or gray (done). */
  --sched-bg: #e8f0fb;   --sched-fg: #1c4c8c;   --sched-bar: #3b76c4;
  --done-bg: #ebe7e0;    --done-fg: #1a1612;    --done-bar: #6e665c;
  --due-bg: #fff3b8;     --due-fg: #6b4e00;     --due-bar: #e0b000;
  --overdue-bar: #d92d20;
  --paid-bar: #0f8a47;

  /* shape */
  --radius-card: 10px;
  --radius-tile: 8px;
  --radius-input: 6px;
  --radius-btn: 6px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 0 rgba(26, 22, 18, .04), 0 10px 28px -14px rgba(26, 22, 18, .28);
  --shadow-lift: 0 1px 0 rgba(26, 22, 18, .05), 0 18px 36px -16px rgba(26, 22, 18, .4);
  --shadow-button: none;
  --shadow-pop: 0 20px 44px -18px rgba(0, 0, 0, .32);
  --ring: 0 0 0 4px rgba(237, 111, 35, .28);

  /* type */
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wide: 112%;
  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-base: 1rem;
  --fs-h2: 1.125rem;
  --fs-h1: 2.125rem;
  --fs-num: 1.75rem;

  /* layout */
  --bar-h: 76px;
  --wrap: 1280px;
  --gutter: 32px;
  --gap: 22px;
  --hour: 56px;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--font); font-size: var(--fs-base); line-height: 1.5; color: var(--ink-2);
  background: var(--page); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 800; font-stretch: var(--wide); letter-spacing: -.012em; line-height: 1.12; }
h1 { font-size: var(--fs-h1); letter-spacing: -.02em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-base); }
p { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
b, strong { font-weight: 600; }
code { font-size: .86em; background: var(--surface-warm); border: 1px solid var(--line); padding: 1px 7px; border-radius: 7px; color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--line-2); }
.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--body); }
.small { font-size: var(--fs-sm); }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.show-sm { display: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--brand); color: var(--ink); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: var(--radius-btn); background: var(--deep); color: #fff; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- header */
.top { position: sticky; top: 0; z-index: 40; background: var(--surface); box-shadow: 0 1px 0 rgba(0, 0, 0, .07); }
.top-in { display: flex; align-items: center; gap: 28px; height: var(--bar-h); max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.brand { display: flex; align-items: center; flex: none; }
.brand img { width: auto; height: 46px; }
.nav { display: flex; align-items: stretch; justify-content: center; gap: 6px; flex: 1; min-width: 0; height: 100%; }
.nav a {
  position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px;
  font-size: .96875rem; font-weight: 600; color: var(--ink); white-space: nowrap; transition: color .15s;
}
.nav a:hover { color: var(--accent); }
.nav a.on { color: var(--ink); font-weight: 700; }
.nav a.on::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); }
.count {
  min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--radius-pill); display: inline-grid; place-items: center;
  font-size: var(--fs-xs); font-weight: 700; background: var(--brand); color: var(--ink); line-height: 1;
}
.top-right { display: flex; align-items: center; gap: 12px; flex: none; }
.clock { display: grid; line-height: 1.15; margin-right: 6px; white-space: nowrap; }
.clock-label { font-size: .6875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--body); }
.clock strong { font-size: 1.125rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--body-strong); cursor: pointer; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.icon-btn.on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(181, 76, 12, .2); }
.me { display: flex; align-items: center; gap: 4px; padding-left: 12px; margin: 0; border-left: 1px solid var(--line); height: 36px; }
.me .avatar { width: 34px; height: 34px; font-size: var(--fs-xs); background: var(--deep); color: #fff; }

/* phone tab bar */
.tabbar { display: none; }

/* band under the header on inner pages: section icon + breadcrumbs */
.band { background: var(--surface-warm); border-bottom: 1px solid var(--line); }
.band-in { display: flex; align-items: center; gap: 12px; max-width: var(--wrap); margin: 0 auto; padding: 10px var(--gutter); }
.band-ic { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(181, 76, 12, .2); }
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; font-size: var(--fs-sm); color: var(--body-strong); }
.crumbs a { font-weight: 500; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.crumbs strong { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs .sep { display: inline-grid; color: var(--faint); }
.crumbs .sep .ic { width: 14px; height: 14px; }
.site-link { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 500; color: var(--accent); white-space: nowrap; }
.site-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-link .ic { width: 14px; height: 14px; }

.content { flex: 1; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 28px var(--gutter) 72px; }
.foot { display: flex; justify-content: space-between; gap: 12px; max-width: var(--wrap); width: 100%; margin: 0 auto; padding: 18px var(--gutter) 28px; font-size: var(--fs-sm); color: var(--body); border-top: 1px solid var(--line); }
/* The schedule uses the whole window, so the board shows as many hours as the screen has room for. */
body.wide { --wrap: none; }
/* its own toolbar has the booking buttons (they carry the day being looked at), so the header's are left out there */
body.wide .top-right > .btn { display: none; }
/* On a computer it is laid out like a board on a wall: the menu on top, one
   toolbar, and the board filling everything below, edge to edge. The page
   itself does not scroll; the board (or the calendar view) scrolls inside. */
@media (min-width: 861px) {
  body.wide { height: 100vh; overflow: hidden; }
  body.wide .band, body.wide .foot { display: none; }
  body.wide .content { display: flex; flex-direction: column; min-height: 0; padding: 0; }
  body.wide .content > .flash { margin: 10px 20px 0; }
  body.wide .sched { flex: 1; min-height: 0; display: flex; flex-direction: column; border: 0; border-radius: 0; box-shadow: none; }
  body.wide .sched > * { flex: none; }
  body.wide .sched > [data-schedule] { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: auto; }
  body.wide [data-schedule] > * { flex: none; }
  body.wide [data-schedule] > .dispatch { flex: 1; min-height: 0; max-height: none; border-radius: 0; }
  /* the rows share the height that is left, so the board reaches the bottom of the window */
  body.wide .dp-grid { display: flex; flex-direction: column; min-height: 100%; }
  body.wide .dp-head { flex: none; }
  body.wide .dp-body { flex: 1; display: flex; flex-direction: column; }
  body.wide .dp-row { flex: 1 0 auto; }
  body.wide .week-head { top: 0; }
  body.wide .cal-bar { padding: 8px 20px; }
}

/* ---------------------------------------------------------------- page head */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 24px; flex-wrap: wrap; margin-bottom: 26px; }
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: var(--fs-xs); font-weight: 700; font-stretch: 118%; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.eyebrow::before { content: ""; width: 22px; height: 3px; background: var(--brand); flex: none; }
.eyebrow a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.page-head p { margin-top: 8px; color: var(--body); max-width: 68ch; }
.page-head h1 .badge { margin-left: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: var(--radius-btn);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: inherit; font-size: .9375rem; font-weight: 700; font-stretch: 106%; letter-spacing: .01em; cursor: pointer; white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s;
}
.btn:hover { border-color: var(--ink); color: var(--ink); background: var(--surface-warm); }
.btn:active { transform: translateY(1px); }
.btn .ic { width: 17px; height: 17px; }
.btn-primary { border-color: var(--brand); color: var(--ink); background: var(--brand); }
.btn-primary:hover { color: var(--ink); border-color: var(--brand-hi); background: var(--brand-hi); }
.btn-primary:active { border-color: var(--brand-lo); background: var(--brand-lo); }
.btn-dark, .btn-green { border-color: transparent; color: #fff; background: var(--leaf-deep); }
.btn-dark { background: var(--deep); }
.btn-dark .ic { color: var(--brand); }
.btn-dark:hover { color: #fff; border-color: transparent; background: var(--deep-2); }
.btn-green:hover { color: #fff; border-color: transparent; background: #095a2e; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); border-color: transparent; }
.btn-danger { color: var(--red); border-color: #efb8b3; }
.btn-danger:hover { color: var(--red-fg); background: var(--red-bg); border-color: #e59a94; }
.btn-sm { height: 36px; padding: 0 15px; font-size: var(--fs-sm); }
.btn-lg { height: 52px; font-size: var(--fs-base); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.link { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(181, 76, 12, .35); text-underline-offset: 3px; }
.link:hover { text-decoration-color: currentColor; }
.link .ic { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }
.inline-form { display: inline; }

/* ---------------------------------------------------------------- cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.card-head p { color: var(--body); font-size: var(--fs-sm); margin-top: 3px; }
.card-body { padding: 24px; }
.card-foot { padding: 14px 24px; border-top: 1px solid var(--line); background: var(--surface-warm); }
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: var(--gap); align-items: start; }
.split > * { min-width: 0; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-content: start; }

/* ---------------------------------------------------------------- home */
.hero {
  position: relative; overflow: hidden; margin-bottom: var(--gap); border-radius: var(--radius-card); color: #fff;
  background: var(--deep);
  box-shadow: var(--shadow-lift);
}
.hello { display: flex; align-items: center; gap: 24px; padding: 34px 36px 30px; }
.day-block { flex: none; width: 84px; border-radius: 16px; overflow: hidden; text-align: center; background: #fff; box-shadow: 0 10px 16px rgba(0, 0, 0, .25); }
.day-block .mm { display: block; background: var(--brand); color: var(--ink); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 5px 0; }
.day-block .dd { display: block; font-size: 2.4rem; font-weight: 700; color: var(--ink); line-height: 1.25; padding: 2px 0 6px; }
.hello-date { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-bright); margin-bottom: 6px; }
.hello h1 { color: #fff; font-size: clamp(1.75rem, 3.4vw, 2.75rem); line-height: 1.05; }
.hello p { margin-top: 10px; color: rgba(255, 255, 255, .78); font-weight: 500; }
.hello p strong { color: #fff; font-weight: 700; }

.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; border-top: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .12); }
.stat {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: 16px; align-content: center;
  padding: 22px 22px; color: #fff; background: var(--deep-3); transition: background .2s;
}
.stat:hover { background: var(--deep-2); }
.stat-ic { grid-row: 1 / 4; align-self: center; width: 46px; height: 46px; border-radius: var(--radius-tile); display: grid; place-items: center; color: var(--accent-bright); background: rgba(237, 111, 35, .1); box-shadow: inset 0 0 0 1px rgba(237, 111, 35, .3); }
.stat-ic .ic { width: 22px; height: 22px; }
.stat-label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
.stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-sub { font-size: var(--fs-sm); color: rgba(255, 255, 255, .68); }
.stat-sub b { color: var(--brand-hi); font-weight: 600; }
.stat.hot .stat-value { color: var(--brand); }
.stat.hot .stat-ic { color: var(--brand); background: rgba(237, 111, 35, .12); box-shadow: inset 0 0 0 1px rgba(237, 111, 35, .4); }
.stat.good .stat-value { color: var(--leaf-bright); }

.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.quick a {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius-card);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card); color: var(--ink);
  transition: box-shadow .22s, transform .22s, border-color .22s;
}
.quick a:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: rgba(181, 76, 12, .35); }
.quick-ic { flex: none; width: 48px; height: 48px; border-radius: var(--radius-tile); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(181, 76, 12, .2); }
.quick-ic .ic { width: 22px; height: 22px; }
.quick a > span:nth-child(2) { flex: 1; min-width: 0; }
.quick strong { display: block; font-size: 1.0625rem; font-weight: 700; }
.quick small { display: block; font-size: var(--fs-sm); color: var(--body); }
.quick-go { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--brand); transition: transform .22s; }
.quick a:hover .quick-go { transform: rotate(45deg); }

/* KPI cards (customers page, invoices list) */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-card); transition: box-shadow .22s, transform .22s, border-color .22s; }
a.kpi:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); border-color: rgba(181, 76, 12, .35); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.kpi-label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--body-strong); }
.chip { width: 38px; height: 38px; flex: none; border-radius: var(--radius-tile); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(181, 76, 12, .2); }
.chip .ic { width: 18px; height: 18px; }
.kpi-value { font-size: var(--fs-num); font-weight: 700; color: var(--ink); line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: var(--fs-sm); color: var(--body); }
.kpi.alert { border-color: #efb8b3; background: linear-gradient(180deg, #fff 0%, #fff7f6 100%); }
.kpi.alert .kpi-value { color: var(--red); }
.kpi.alert .chip, .kpi.tone-red .chip { background: var(--red-bg); color: var(--red-fg); box-shadow: inset 0 0 0 1px rgba(161, 36, 26, .2); }
.kpi.tone-amber .chip { background: var(--brand-soft); color: var(--amber-fg); box-shadow: inset 0 0 0 1px rgba(214, 95, 22, .35); }
.kpi.tone-ink .chip { background: var(--gray-bg); color: var(--gray-fg); box-shadow: inset 0 0 0 1px rgba(26, 22, 18, .12); }
.kpi.good .kpi-value, .kpi.tone-green .kpi-value { color: var(--leaf-deep); }

/* today's route */
.route { list-style: none; margin: 0; padding: 8px 0; }
.route li a { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 12px 24px; transition: background .15s; }
.route li a:hover { background: var(--surface-warm); }
.route-time { font-weight: 700; font-size: var(--fs-base); line-height: 1.2; padding: 8px 10px; border-radius: var(--radius-tile); text-align: center; background: var(--sched-bg); color: var(--sched-fg); font-variant-numeric: tabular-nums; }
.route-time small { display: block; font-weight: 500; font-size: var(--fs-xs); opacity: .85; }
.route li.completed .route-time { background: var(--done-bg); color: var(--done-fg); }
.route li.pay-overdue .route-time { background: var(--red-bg); color: var(--red-fg); }
.route li.pay-due .route-time { background: var(--due-bg); color: var(--due-fg); }
.route li.pay-paid .route-time { background: var(--ok-bg); color: var(--ok-fg); }
.route li.canceled .route-time { background: var(--gray-bg); color: var(--gray-fg); text-decoration: line-through; }
.route-body { min-width: 0; }
.route-body strong { display: block; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route-body > span { display: block; font-size: var(--fs-sm); color: var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.date-stamp { display: inline-grid; place-items: center; width: 48px; border-radius: var(--radius-tile); overflow: hidden; border: 1px solid var(--line); font-weight: 700; font-size: 1.125rem; line-height: 1.4; color: var(--ink); background: #fff; }
.date-stamp b { display: block; width: 100%; text-align: center; font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; background: var(--deep); color: #fff; padding: 2px 0; font-weight: 600; }

/* ---------------------------------------------------------------- lists */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li + li { border-top: 1px solid var(--line-2); }
.row-link { display: flex; align-items: center; gap: 14px; padding: 14px 24px; transition: background .15s; }
a.row-link:hover { background: var(--surface-warm); }
.row-main { min-width: 0; flex: 1; }
.row-title { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
a.row-title:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.row-sub { font-size: var(--fs-sm); color: var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-end { display: flex; align-items: center; gap: 10px; flex: none; }
.time-pill { flex: none; min-width: 68px; text-align: center; padding: 7px 8px; border-radius: var(--radius-tile); background: var(--surface-warm); color: var(--ink); font-size: .9375rem; font-weight: 700; line-height: 1.15; box-shadow: inset 0 0 0 1px var(--line); }
.time-pill small { display: block; font-weight: 500; font-size: var(--fs-xs); }
li.pay-overdue .time-pill { background: var(--red-bg); color: var(--red-fg); box-shadow: none; }
li.pay-due .time-pill { background: var(--due-bg); color: var(--due-fg); box-shadow: none; }
li.pay-paid .time-pill { background: var(--ok-bg); color: var(--ok-fg); box-shadow: none; }

.empty { padding: 44px 24px; text-align: center; color: var(--body); }
.empty > .ic { display: block; width: 30px; height: 30px; margin: 0 auto 12px; color: var(--accent); }
.empty strong { display: block; color: var(--ink); margin-bottom: 4px; font-size: 1.0625rem; font-weight: 700; }
.error-solo { max-width: 640px; padding-top: 80px; }
.error-card .empty { padding: 56px 24px; }
.error-card .empty strong { font-size: 1.375rem; }
.error-card .empty p { margin: 6px auto 22px; max-width: 46ch; }

/* ---------------------------------------------------------------- status badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; vertical-align: middle; letter-spacing: .01em;
  background: var(--gray-bg); color: var(--gray-fg);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.b-draft { background: var(--gray-bg); color: var(--gray-fg); }
.b-sent { background: var(--blue-bg); color: var(--blue-fg); }
.b-scheduled { background: var(--sched-bg); color: var(--sched-fg); }
.b-completed { background: var(--done-bg); color: var(--done-fg); }
.b-partial { background: var(--amber-bg); color: var(--amber-fg); }
.b-due { background: var(--due-bg); color: var(--due-fg); }
.b-paid, .b-converted, .b-accepted { background: var(--ok-bg); color: var(--ok-fg); }
.b-overdue { background: var(--red-bg); color: var(--red-fg); }
.b-void, .b-canceled, .b-dismissed { background: var(--gray-bg); color: var(--gray-fg); text-decoration: line-through; }
.b-declined { background: #fff; color: var(--red-fg); box-shadow: inset 0 0 0 1px #e59a94; }
.b-new { background: var(--brand); color: var(--ink); }
.b-online { background: var(--deep); color: #fff; }
/* An estimate visit (not the work itself): the word in a dark tag, and on the
   schedule a dashed edge. Both sit on top of the payment colors. */
.b-estimate { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.kind-tag { display: inline-block; margin-right: 5px; padding: 0 5px; border-radius: 4px; background: var(--ink); color: #fff; font-size: .5625rem; font-weight: 700; font-style: normal; letter-spacing: .06em; line-height: 1.6; text-transform: uppercase; text-decoration: none; vertical-align: 1px; }
/* to-do list kinds */
.t-blue { background: var(--blue-bg); color: var(--blue-fg); }
.t-amber { background: var(--amber-bg); color: var(--amber-fg); }
.t-green { background: var(--ok-bg); color: var(--ok-fg); }
.t-red { background: var(--red-bg); color: var(--red-fg); }

/* ---------------------------------------------------------------- payment marks
   A customer with an overdue invoice is red and one with an invoice due today
   is yellow, wherever they are shown. The name changes color, a tag says why
   in words, and rows get a colored edge. (Green "Paid" is schedule-only.) */
.pay-tag { margin-left: 8px; height: 22px; padding: 0 9px; font-size: .6875rem; letter-spacing: .02em; text-transform: none; font-weight: 600; vertical-align: 2px; }
h1 .pay-tag { vertical-align: middle; height: 26px; font-size: var(--fs-xs); }
.pay-overdue .pay-name, .pay-name.pay-overdue { color: var(--red); }
.pay-due .pay-name, .pay-name.pay-due { color: var(--due-fg); }
.eyebrow.pay-overdue a.pay-name { color: var(--red); }
.eyebrow.pay-due a.pay-name { color: var(--due-fg); }
/* the mark belongs to the row itself, not to rows nested inside an open customer */
.grp.pay-overdue .cust-open .pay-name, .grp.pay-due .cust-open .pay-name { color: inherit; }
.grp.pay-overdue > summary, a.grp.pay-overdue, tr.pay-overdue > td:first-child, .rows > li.pay-overdue, .route > li.pay-overdue { box-shadow: inset 4px 0 0 var(--overdue-bar); }
.grp.pay-due > summary, a.grp.pay-due, tr.pay-due > td:first-child, .rows > li.pay-due, .route > li.pay-due { box-shadow: inset 4px 0 0 var(--due-bar); }
tr.pay-paid > td:first-child, .rows > li.pay-paid, .route > li.pay-paid { box-shadow: inset 4px 0 0 var(--paid-bar); }
.grp.pay-overdue[open] > summary { background: var(--red-bg); }
.grp.pay-due[open] > summary { background: var(--due-bg); }
.grp.pay-overdue > summary .avatar, a.grp.pay-overdue .avatar, .profile.pay-overdue .avatar, .picked.pay-overdue .avatar { background: var(--red-bg); color: var(--red-fg); box-shadow: inset 0 0 0 1px rgba(161, 36, 26, .35); }
.grp.pay-due > summary .avatar, a.grp.pay-due .avatar, .profile.pay-due .avatar, .picked.pay-due .avatar { background: var(--due-bg); color: var(--due-fg); box-shadow: inset 0 0 0 1px rgba(107, 78, 0, .35); }
.picked.pay-overdue { background: var(--red-bg); border-color: rgba(161, 36, 26, .4); }
.picked.pay-due { background: var(--due-bg); border-color: rgba(107, 78, 0, .4); }
.picker-list li.pay-overdue strong { color: var(--red); }
.picker-list li.pay-due strong { color: var(--due-fg); }
.contact-list li.pay-overdue .ic { background: var(--red-bg); color: var(--red-fg); box-shadow: inset 0 0 0 1px rgba(161, 36, 26, .3); }
.contact-list li.pay-due .ic { background: var(--due-bg); color: var(--due-fg); box-shadow: inset 0 0 0 1px rgba(107, 78, 0, .3); }

/* ---------------------------------------------------------------- team */
/* --tm is the team member's color (set inline from TEAM_COLORS) */
.toolbar.team-tabs { padding: 0 0 18px; border: 0; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: var(--gap); }
.tm-card { display: flex; flex-direction: column; border-top: 4px solid var(--tm); }
.tm-card.former { opacity: .72; }
.tm-card-head { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line-2); transition: background .15s; }
.tm-card-head:hover { background: var(--surface-warm); }
.tm-card-head > .ic { margin-left: auto; color: var(--body); width: 18px; height: 18px; flex: none; }
.tm-who { min-width: 0; }
.tm-who strong { display: block; color: var(--ink); font-weight: 700; font-size: 1.0625rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-who small { display: block; color: var(--body); font-size: var(--fs-sm); }
.tm-today { flex: 1; padding: 14px 20px; display: grid; gap: 6px; align-content: start; }
.tm-label { font-size: .6875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--body-strong); }
.tm-today ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tm-today li a { display: block; font-size: var(--fs-sm); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-today li a:hover { color: var(--accent); }
.tm-today li b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tm-foot { display: flex; justify-content: space-between; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line-2); background: var(--surface-warm); font-size: var(--fs-sm); }
.tm-foot a { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-weight: 600; }
.tm-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tm-foot .ic { width: 15px; height: 15px; }
.avatar.tm { background: color-mix(in srgb, var(--tm) 13%, #fff); color: var(--tm); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tm) 35%, transparent); }
.avatar.lg.tm { background: var(--tm); color: #fff; box-shadow: none; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field > legend { padding: 0; margin-bottom: 7px; }
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch span:first-of-type { display: block; width: 34px; height: 34px; border-radius: 50%; background: var(--tm); transition: box-shadow .15s; }
.swatch input:checked + span { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--tm); }
.swatch input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 5px; }
/* who is on a job: initials in their color */
.tm-dot { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--tm); color: #fff; font-size: .5625rem; font-weight: 700; font-style: normal; letter-spacing: .02em; line-height: 1; }
.tm-dot.none { background: #fff; color: var(--body); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.tm-tag { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px 0 3px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--tm) 12%, #fff); color: var(--ink); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; vertical-align: middle; }
.block .tm-dot { position: absolute; top: 5px; right: 5px; }
.block.has-tm strong { padding-right: 22px; }
.ev .tm-dot { width: 15px; height: 15px; font-size: .5rem; vertical-align: -3px; margin-right: 4px; }
.worker-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.worker-filter a { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 6px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: #fff; font-size: var(--fs-sm); font-weight: 500; color: var(--ink); }
.worker-filter a.all { padding-left: 12px; }
.worker-filter a:hover { border-color: var(--accent); color: var(--accent); }
.worker-filter a.on { background: var(--deep); border-color: var(--deep); color: #fff; font-weight: 600; }
.worker-filter a.on .tm-dot.none { box-shadow: none; }
.assign-form { display: grid; gap: 10px; }

/* legend above the calendar */
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--surface-warm); font-size: var(--fs-sm); color: var(--ink-2); }
.legend-title { font-size: .6875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--body-strong); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend .dot { width: 14px; height: 14px; border-radius: 4px; background: var(--sched-bg); box-shadow: inset 3px 0 0 var(--sched-bar); }
.legend .dot.pay-overdue { background: var(--red-bg); box-shadow: inset 3px 0 0 var(--overdue-bar); }
.legend .dot.pay-due { background: var(--due-bg); box-shadow: inset 3px 0 0 var(--due-bar); }
.legend .dot.pay-paid { background: var(--ok-bg); box-shadow: inset 3px 0 0 var(--paid-bar); }
.legend .legend-kind { margin-left: auto; gap: 2px; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table th { text-align: left; font-size: .6875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--body-strong); padding: 14px 14px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th.right { text-align: right; }
.table td { padding: 15px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover { background: var(--surface-warm); }
.table th:first-child, .table td:first-child { padding-left: 24px; }
.table th:last-child, .table td:last-child { padding-right: 24px; }
.table.compact td { padding-top: 11px; padding-bottom: 11px; }
.t-strong { font-weight: 600; color: var(--ink); }
a.t-strong:hover, .t-strong a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.person { display: flex; align-items: center; gap: 14px; min-width: 0; }
.person p { color: var(--body); font-size: var(--fs-sm); margin-top: 3px; }
.avatar { width: 40px; height: 40px; border-radius: var(--radius-tile); flex: none; display: grid; place-items: center; font-size: var(--fs-sm); font-weight: 700; background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(181, 76, 12, .2); }
.avatar.lg { width: 68px; height: 68px; font-size: 1.4rem; border-radius: var(--radius-card); background: linear-gradient(135deg, var(--deep), var(--deep-2)); color: var(--accent-bright); box-shadow: inset 0 0 0 1px rgba(237, 111, 35, .3); }
.me .avatar { border-radius: 50%; box-shadow: none; }

/* ---------------------------------------------------------------- toolbar / filters */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 1; min-width: 220px; max-width: 440px; }
.search .ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--body); width: 17px; height: 17px; }
.search input { padding-left: 44px !important; }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.tabs a { display: inline-flex; gap: 8px; align-items: center; height: 36px; padding: 0 15px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: #fff; font-size: var(--fs-sm); font-weight: 500; color: var(--ink); transition: border-color .2s, color .2s, background .2s; }
.tabs a:hover { border-color: var(--accent); color: var(--accent); }
.tabs a.on { background: var(--deep); border-color: var(--deep); color: #fff; font-weight: 600; }
.tabs .n { min-width: 20px; padding: 0 6px; height: 20px; display: inline-grid; place-items: center; border-radius: var(--radius-pill); font-size: .6875rem; font-weight: 700; background: var(--gray-bg); color: var(--gray-fg); }
.tabs a.on .n { background: rgba(255, 255, 255, .16); color: #fff; }
.seg { display: inline-flex; padding: 4px; border-radius: var(--radius-tile); background: var(--surface-warm); border: 1px solid var(--line); }
.seg a { padding: 6px 15px; border-radius: var(--radius-btn); font-size: var(--fs-sm); font-weight: 500; color: var(--ink); }
.seg a:hover { color: var(--accent); }
.seg a.on { background: var(--deep); color: #fff; font-weight: 600; }
/* the same control as a choice in a form (Job / Estimate) */
.seg-radio { justify-self: start; }
.seg-radio label { position: relative; cursor: pointer; }
.seg-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-radio span { display: block; min-width: 108px; padding: 9px 22px; border-radius: var(--radius-btn); text-align: center; font-size: .9375rem; font-weight: 500; color: var(--ink); }
.seg-radio label:hover span { color: var(--accent); }
.seg-radio input:checked + span { background: var(--deep); color: #fff; font-weight: 600; }
.seg-radio input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- forms */
.form { display: grid; gap: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px 20px; }
.col-6 { grid-column: span 6; } .col-4 { grid-column: span 4; } .col-3 { grid-column: span 3; } .col-2 { grid-column: span 2; } .col-1 { grid-column: span 1; }
.field { display: grid; gap: 7px; align-content: start; }
.field > label, .label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.field > label .muted, .label .muted { font-weight: 400; }
.hint { font-size: .8125rem; color: var(--body); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=time],
input[type=number], input[type=search], input[type=url], select, textarea {
  width: 100%; height: 46px; padding: 0 14px; font: inherit; font-size: .9375rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line-input); border-radius: var(--radius-input);
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 104px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23252a2a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
/* a field the browser scrolls to (a missing or wrong value) stays clear of the sticky header */
input, select, textarea { scroll-margin-top: calc(var(--bar-h) + 72px); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[readonly] { background: var(--surface-warm); }
fieldset[disabled] input, fieldset[disabled] textarea { background: var(--surface-warm); }
.errors { padding: 14px 18px; background: var(--red-bg); color: var(--red-fg); font-weight: 500; font-size: .9375rem; border-radius: var(--radius-tile); border: 1px solid #efb8b3; }
.errors ul { margin: 6px 0 0; padding-left: 18px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--line); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--ink); font-size: .9375rem; cursor: pointer; }
.check input { width: 19px; height: 19px; accent-color: var(--accent); }

/* customer picker */
.picker { position: relative; }
.picker-list { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 20; background: #fff; border: 0; border-radius: 14px; box-shadow: var(--shadow-pop), 0 0 0 1px var(--line); list-style: none; margin: 0; padding: 8px; max-height: 320px; overflow: auto; }
.picker-list li { padding: 10px 14px; border-radius: 9px; cursor: pointer; }
.picker-list li[aria-selected=true], .picker-list li:hover { background: var(--accent-soft); }
.picker-list li strong { display: block; color: var(--ink); font-size: .9375rem; }
.picker-list li > span { font-size: var(--fs-sm); color: var(--body-strong); }
.picked { display: flex; align-items: center; gap: 12px; padding: 5px 8px; border: 1px solid rgba(181, 76, 12, .3); border-radius: var(--radius-input); background: var(--accent-soft); min-height: 46px; }
.picked .avatar { width: 32px; height: 32px; font-size: var(--fs-xs); background: #fff; }
.picked strong { color: var(--ink); }
.picked .small { color: var(--body-strong); }
.picked .icon-btn { margin-left: auto; width: 32px; height: 32px; }

/* ---------------------------------------------------------------- flash */
.flash { display: flex; align-items: center; gap: 12px; margin-bottom: var(--gap); padding: 14px 18px; border-radius: var(--radius-tile); font-weight: 500; font-size: .9375rem; background: var(--ok-bg); color: var(--ok-fg); border: 1px solid #b9dfca; }
.flash.error { background: var(--red-bg); color: var(--red-fg); border-color: #efb8b3; }
.flash.warn { background: var(--amber-bg); color: var(--amber-fg); border-color: #f3d19c; }
.flash .link { color: inherit; }
.flash.info { background: var(--sched-bg); color: var(--sched-fg); border-color: #bcd3f1; flex-wrap: wrap; }
.flash.info .inline-form { margin-left: auto; }

/* ---------------------------------------------------------------- detail pages */
.profile { display: flex; gap: 18px; align-items: center; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.contact-list li a, .contact-list li > span { display: flex; gap: 12px; align-items: center; padding: 9px 10px; border-radius: var(--radius-tile); color: var(--ink); font-weight: 500; font-size: .9375rem; word-break: break-word; transition: background .15s; }
.contact-list li a:hover { background: var(--accent-soft); color: var(--accent); }
.contact-list .ic { box-sizing: content-box; width: 16px; height: 16px; padding: 8px; border-radius: 9px; color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(181, 76, 12, .2); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.facts > div { padding: 20px 24px; }
.facts > div + div { border-left: 1px solid var(--line); }
.facts dt { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--body-strong); }
.facts dd { margin: 6px 0 0; font-size: var(--fs-num); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.notes { white-space: pre-wrap; color: var(--ink-2); font-size: .9375rem; }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 0; font-size: .9375rem; margin: 0; }
.kv dt, .kv dd { padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.kv dt { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--body-strong); padding-top: 14px; }
.kv dd { margin: 0; color: var(--ink); font-weight: 500; }

/* photos the customer added when booking online */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.photo-grid a { display: block; border-radius: var(--radius-tile); overflow: hidden; border: 1px solid var(--line); background: var(--surface-warm); aspect-ratio: 1; transition: box-shadow .2s, transform .2s; }
.photo-grid a:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------- calendar */
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.cal-bar h2 { font-size: 1.375rem; margin: 0 8px; }
.cal-nav { display: inline-flex; gap: 6px; }
.cal-nav .btn { width: 40px; padding: 0; height: 40px; }
.cal-bar .spacer { flex: 1; }
/* in the schedule's toolbar: what the colors mean, and the two booking buttons */
.cal-bar .legend { padding: 0; border: 0; background: none; gap: 4px 14px; font-size: var(--fs-xs); }
.cal-bar .legend .legend-kind { margin-left: 0; }
.cal-book { display: inline-flex; gap: 8px; }
/* not wide enough for everything on one line: the colors' meaning takes a thin line of its own */
@media (max-width: 1540px) {
  .cal-bar .legend { order: 9; flex-basis: 100%; justify-content: flex-end; }
}
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month .dow { padding: 12px; font-size: .6875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--body-strong); border-bottom: 1px solid var(--line); }
.month .day { min-height: 124px; padding: 8px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 4px; position: relative; }
.month .day:nth-child(7n + 7) { border-right: 0; }
.month .day.out { background: var(--surface-warm); }
.month .day.out .d { color: var(--body); }
.month .d { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.month .d:hover { background: var(--accent-soft); color: var(--accent); }
.month .day.today { background: var(--brand-tint); }
.month .day.today .d { background: var(--brand); color: var(--ink); font-weight: 700; }
.month .add { position: absolute; top: 8px; right: 8px; opacity: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); }
.month .day:hover .add, .month .add:focus-visible { opacity: 1; }
.month .add:hover { background: var(--accent-soft); }
.ev { display: block; padding: 4px 8px; border-radius: 8px; font-size: var(--fs-xs); font-weight: 500; line-height: 1.4; background: var(--sched-bg); color: var(--sched-fg); border-left: 3px solid var(--sched-bar); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev:hover { filter: brightness(.97); }
.ev .t { font-weight: 700; margin-right: 5px; }
.ev.completed { background: var(--done-bg); color: var(--done-fg); border-left-color: var(--done-bar); }
.ev.completed .t::before, .block.completed strong::before { content: "\2713\00a0"; }
.ev.pay-overdue { background: var(--red-bg); color: var(--red-fg); border-left-color: var(--overdue-bar); }
.ev.pay-due { background: var(--due-bg); color: var(--due-fg); border-left-color: var(--due-bar); }
.ev.pay-paid { background: var(--ok-bg); color: var(--ok-fg); border-left-color: var(--paid-bar); }
.ev.canceled { background: var(--gray-bg); color: var(--gray-fg); border-left-color: var(--line-strong); text-decoration: line-through; }
.more { font-size: var(--fs-xs); font-weight: 600; color: var(--accent); padding-left: 4px; }

.week { display: grid; grid-template-columns: 68px repeat(var(--days, 7), minmax(0, 1fr)); }
.week-head { position: sticky; top: var(--bar-h); z-index: 5; background: #fff; }
.week .wh { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line-2); }
.week .wh a { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; }
.week .wh .wd { font-size: .6875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--body-strong); }
.week .wh .dn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 1.0625rem; color: var(--ink); }
.week .wh a:hover .dn { background: var(--accent-soft); color: var(--accent); }
.week .wh.today .dn { background: var(--brand); color: var(--ink); }
.week .wh.today .wd { color: var(--ink); }
.week .gutter { position: relative; }
.week .hour-label { height: var(--hour); font-size: var(--fs-xs); font-weight: 500; color: var(--body-strong); text-align: right; padding-right: 12px; transform: translateY(-9px); }
.week .col { position: relative; border-left: 1px solid var(--line-2); background-image: linear-gradient(var(--line-2) 1px, transparent 1px); background-size: 100% var(--hour); }
.week .col.today { background-color: var(--brand-tint); }
.week .slot { display: block; height: calc(var(--hour) / 2); }
.week .slot:hover { background: rgba(181, 76, 12, .07); }
.block { position: absolute; left: 4px; right: 4px; z-index: 2; overflow: hidden; padding: 6px 9px; border-radius: 10px; font-size: var(--fs-xs); line-height: 1.3; background: var(--sched-bg); color: var(--sched-fg); border-left: 4px solid var(--sched-bar); box-shadow: 0 1px 2px rgba(26, 22, 18, .08); }
.block:hover { box-shadow: var(--shadow-lift); z-index: 3; }
.block strong { display: block; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.block span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.block .pay-note { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .625rem; }
.block.completed { background: var(--done-bg); color: var(--done-fg); border-left-color: var(--done-bar); }
/* the customer's payment color wins over booked / done */
.block.pay-overdue { background: var(--red-bg); color: var(--red-fg); border-left-color: var(--overdue-bar); }
.block.pay-overdue strong { color: var(--red-fg); }
.block.pay-due { background: var(--due-bg); color: var(--due-fg); border-left-color: var(--due-bar); }
.block.pay-paid { background: var(--ok-bg); color: var(--ok-fg); border-left-color: var(--paid-bar); }
.block.canceled { background: var(--gray-bg); color: var(--gray-fg); border-left-color: var(--line-strong); text-decoration: line-through; }
.block.canceled strong { color: var(--gray-fg); }
.block.estimate, .ev.estimate { border-top: 1.5px dashed; border-right: 1.5px dashed; border-bottom: 1.5px dashed; border-top-color: color-mix(in srgb, currentColor 55%, transparent); border-right-color: color-mix(in srgb, currentColor 55%, transparent); border-bottom-color: color-mix(in srgb, currentColor 55%, transparent); }
.block.estimate { padding-top: 4.5px; padding-bottom: 4.5px; }
.dp-block.estimate { padding-top: 2.5px; padding-bottom: 2.5px; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: #d92d20; z-index: 4; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #d92d20; }
.agenda-day { padding: 12px 24px; background: var(--surface-warm); border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--body-strong); }
.cal-bar + .agenda-day, [data-schedule] > .agenda-day:first-child { border-top: 0; }
.agenda-day.today { color: var(--ink); box-shadow: inset 4px 0 0 var(--brand); }
.agenda-none { padding: 12px 24px; font-size: var(--fs-sm); color: var(--body); }

/* ---------------------------------------------------------------- dispatch board
   One row per team member, "Unassigned" on top. Time runs left to right, the
   days of the week one after another; the board scrolls sideways while the
   names stay put. --dp-hour (one hour's width) and --dp-hours (hours shown per
   day) come from the board's style attribute, set by the server. */
.dispatch {
  --dp-who: 104px;
  position: relative; overflow: auto; max-height: max(440px, calc(100vh - 150px)); overscroll-behavior-x: contain;
  border-radius: 0 0 var(--radius-card) var(--radius-card); background: #fff;
}
.dispatch:focus-visible { outline-offset: -2px; }
.dp-grid { width: max-content; min-width: 100%; }
.dp-head { display: flex; position: sticky; top: 0; z-index: 6; background: #fff; box-shadow: 0 1px 0 var(--line); }
.dp-corner {
  position: sticky; left: 0; z-index: 7; flex: none; width: var(--dp-who); display: flex; align-items: flex-end; justify-content: center;
  padding: 0 8px 9px; background: #fff; box-shadow: 1px 0 0 var(--line);
  font-size: .625rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--body-strong);
}
.dp-day { flex: none; width: calc(var(--dp-hours) * var(--dp-hour)); box-shadow: inset 2px 0 0 var(--line-strong); }
/* the date stays in sight while its day scrolls by */
.dp-date { position: sticky; left: calc(var(--dp-who) + 2px); display: inline-flex; align-items: baseline; gap: 8px; padding: 10px 14px 2px; color: var(--ink); }
.dp-date b { font-size: 1.375rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.dp-date span { font-size: .6875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--body-strong); }
.dp-date:hover b { color: var(--accent); }
.dp-day.today .dp-date b { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px; margin: -6px 0; border-radius: 50%; background: var(--brand); }
.dp-day.today .dp-date span { color: var(--ink); }
.dp-hours { display: flex; }
.dp-hours span { flex: none; width: var(--dp-hour); padding: 6px 0 8px; text-align: center; font-size: .6875rem; font-weight: 500; color: var(--body-strong); white-space: nowrap; }
.dp-body { position: relative; }
.dp-row { display: flex; }
.dp-row + .dp-row { border-top: 1px solid var(--line); }
.dp-who {
  position: sticky; left: 0; z-index: 5; flex: none; width: var(--dp-who); display: grid; justify-items: center; align-content: center; gap: 5px;
  padding: 8px 6px; background: #fff; box-shadow: 1px 0 0 var(--line); text-align: center; color: var(--ink);
}
.dp-name { max-width: 100%; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-who .tm-dot { width: 32px; height: 32px; font-size: .75rem; }
.dp-who small { font-size: .625rem; font-weight: 600; letter-spacing: .04em; color: var(--body-strong); }
a.dp-who:hover .dp-name { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.dp-row.unassigned .dp-who { background: var(--surface-warm); }
.dp-row.unassigned .dp-lane { background: repeating-linear-gradient(135deg, transparent 0 7px, rgba(26, 22, 18, .028) 7px 14px); }
.dp-lane { position: relative; display: flex; flex: none; align-self: stretch; }
.dp-cell {
  --shade: rgba(26, 22, 18, .05);
  flex: none; display: flex; width: calc(var(--dp-hours) * var(--dp-hour)); box-shadow: inset 2px 0 0 var(--line-strong);
  background-image:
    linear-gradient(to right, var(--shade) 0 var(--open-a), transparent var(--open-a) var(--open-b), var(--shade) var(--open-b) 100%),
    linear-gradient(to right, var(--line-strong) 1px, transparent 1px),
    linear-gradient(to right, var(--line-2) 1px, transparent 1px);
  background-size: 100% 100%, var(--dp-hour) 100%, calc(var(--dp-hour) / 2) 100%;
}
.dp-cell.today { background-color: var(--brand-tint); }
.dp-cell .slot { flex: 1; }
.dp-cell .slot:hover { background: rgba(181, 76, 12, .08); }
.dp-block { right: auto; display: flex; flex-direction: column; padding: 4px 8px 4px 7px; }
.dp-block .dp-time { font-style: italic; font-variant-numeric: tabular-nums; }
.dp-block .dp-addr { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.dp-now { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #d92d20; z-index: 4; pointer-events: none; }
.dp-now::before { content: ""; position: absolute; left: -4px; top: 0; width: 10px; height: 10px; border-radius: 50%; background: #d92d20; }
.dp-hint { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--sched-bg); color: var(--sched-fg); font-size: var(--fs-sm); font-weight: 500; }
.dp-hint .ic { flex: none; }
.dp-hint .link { color: inherit; }

/* dragging a job to another time, day or person (dispatch, week, day, month) */
[data-job] { -webkit-user-drag: none; -webkit-touch-callout: none; user-select: none; }
.dispatch [data-job], [data-timegrid] [data-job], [data-monthgrid] [data-job] { cursor: grab; }
[data-job].dragging { opacity: .35; }
.drag-ghost {
  position: fixed !important; z-index: 90; margin: 0; pointer-events: none; cursor: grabbing; opacity: .95;
  box-shadow: var(--shadow-pop), 0 0 0 2px var(--accent) !important; transition: none !important;
}
.drag-ghost.no-drop { opacity: .6; box-shadow: var(--shadow-pop), 0 0 0 2px var(--line-strong) !important; }
.drag-ghost.saving { opacity: .7; }
.drag-tip {
  position: fixed; z-index: 91; pointer-events: none; padding: 5px 11px; border-radius: var(--radius-pill); background: var(--deep); color: #fff;
  font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; box-shadow: var(--shadow-pop);
}
.drag-tip.no-drop { background: var(--gray-fg); }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none !important; }
.dp-row.drop-target .dp-who { background: var(--accent-soft); box-shadow: 1px 0 0 var(--line), inset 4px 0 0 var(--accent); }
.dp-row.drop-target .dp-lane, .week .col.drop-target, .month .day.drop-target { background-color: rgba(181, 76, 12, .06); }
.month .day.drop-target { box-shadow: inset 0 0 0 2px var(--accent); }
.move-status { display: flex; align-items: center; gap: 10px; padding: 10px 20px; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); font-weight: 500; background: var(--ok-bg); color: var(--ok-fg); }
.move-status.warn { background: var(--amber-bg); color: var(--amber-fg); }
.move-status.error { background: var(--red-bg); color: var(--red-fg); }

/* ---------------------------------------------------------------- notes on a job */
.note-list { list-style: none; margin: 0; padding: 0; }
.note-list li { padding: 16px 24px; border-bottom: 1px solid var(--line-2); }
.note-list li.by-tech { box-shadow: inset 4px 0 0 var(--sched-bar); }
.note-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 6px; }
.note-meta strong { color: var(--ink); }
.note-meta .badge { height: 22px; padding: 0 9px; font-size: .6875rem; }
.note-form textarea { min-height: 84px; }

/* a technician's own schedule */
.tech-row.canceled .row-title, .tech-row.canceled .row-sub { text-decoration: line-through; color: var(--body); }
.tech-row .row-sub + .row-sub { margin-top: 1px; }
/* on a phone the name and the address must be readable in full */
.tech-row .row-title, .tech-row .row-sub { white-space: normal; overflow-wrap: anywhere; }
.tech-row .badge { flex: none; }
.invite-box { padding: 14px 16px; border-radius: var(--radius-tile); background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(181, 76, 12, .18); gap: 12px; }
/* a login's password: typed by the office in plain sight (it has to be passed on), or made up */
.pw-row { display: flex; gap: 8px; align-items: center; }
.pw-row input { flex: 1; min-width: 0; font-family: ui-monospace, "SFMono-Regular", Consolas, Menlo, monospace; letter-spacing: .02em; }
.pw-row input::placeholder { font-family: var(--font); letter-spacing: 0; }
.pw-row .btn { flex: none; height: 46px; }
.login-form { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line-2); }

/* ---------------------------------------------------------------- invoice editor */
.inv-lines { width: 100%; border-collapse: collapse; }
.inv-lines th { text-align: left; font-size: .6875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--body-strong); padding: 0 8px 10px; border-bottom: 1px solid var(--line); }
.inv-lines td { padding: 10px 8px 0; vertical-align: top; }
.inv-lines td:first-child, .inv-lines th:first-child { padding-left: 0; }
.inv-lines td:last-child, .inv-lines th:last-child { padding-right: 0; }
.inv-lines .qty { width: 96px; } .inv-lines .price { width: 150px; } .inv-lines .amt { width: 130px; text-align: right; } .inv-lines .rm { width: 46px; }
.inv-lines .amt-cell { text-align: right; font-weight: 600; color: var(--ink); padding-top: 22px; font-variant-numeric: tabular-nums; }
.totals { margin-left: auto; width: min(100%, 360px); display: grid; gap: 10px; font-size: .9375rem; }
.totals div { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.totals label { font-weight: 500; color: var(--ink-2); }
.totals .grand { margin-top: 4px; padding: 14px 18px; border-radius: var(--radius-tile); background: var(--deep); font-size: 1.25rem; font-weight: 700; color: #fff; }
.totals input { height: 40px; width: 130px; text-align: right; }

/* ---------------------------------------------------------------- customers & invoices list */
.groups { display: grid; }
.grp-head, .grp > summary, .grp-single { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 32px; align-items: center; gap: 14px; padding: 14px 24px; }
.cust-cols { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, .9fr) 32px !important; }
.grp-head { font-size: .6875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--body-strong); border-bottom: 1px solid var(--line); padding-top: 14px; padding-bottom: 10px; }
.grp { border-bottom: 1px solid var(--line-2); }
.grp:last-child { border-bottom: 0; }
.grp > summary { list-style: none; cursor: pointer; transition: background .15s; }
.grp > summary::-webkit-details-marker { display: none; }
.grp > summary:hover, .grp-single:hover { background: var(--surface-warm); }
.grp[open] > summary { background: var(--accent-soft); box-shadow: inset 4px 0 0 var(--accent); }
.grp-who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.grp-who > span:last-child { min-width: 0; }
.grp-who strong { display: block; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grp-who strong .badge { margin-left: 6px; height: 21px; font-size: .6875rem; }
.grp-who small { display: block; color: var(--body-strong); font-size: var(--fs-sm); }
.grp-arrow { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--body-strong); transition: transform .2s, background .15s, color .15s; }
.grp > summary:hover .grp-arrow, .grp-single:hover .grp-arrow { background: var(--accent-soft); color: var(--accent); }
.grp[open] .grp-arrow { transform: rotate(90deg); background: var(--deep); color: #fff; }
.grp-body { padding: 4px 0 0 54px; background: var(--surface-warm); border-top: 1px solid var(--line); }
.grp-body .table td .btn + .btn { margin-left: 6px; }
.grp-foot { padding: 10px 24px 16px; }
.owes-tag { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--red); }
.cust-open { display: grid; grid-template-columns: 290px minmax(0, 1fr); background: var(--surface-warm); border-top: 1px solid var(--line); }
.cust-side { padding: 14px; border-right: 1px solid var(--line); }
.cust-main { padding: 16px 24px 20px; min-width: 0; }
.cust-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 14px; }
.cust-main .table { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; border-collapse: separate; border-spacing: 0; }
.cust-main .table td .btn + .btn { margin-left: 6px; }

/* ---------------------------------------------------------------- PDF files */
.file-ic { display: inline-grid; place-items: center; flex: none; width: 40px; height: 48px; border-radius: 8px; background: var(--brand-soft); color: var(--amber-fg); font-size: var(--fs-xs); font-weight: 700; border: 1px solid #f3d19c; }
.file-thumb { display: block; flex: none; width: 48px; height: 48px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-warm); }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-ic.sm { width: auto; height: 20px; padding: 0 7px; border-radius: 6px; font-size: .6875rem; vertical-align: middle; }
.pdf-view iframe { display: block; width: 100%; height: min(78vh, 1000px); border: 0; background: #525659; }
.attach-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.attach-form label.btn { position: relative; }
.drop { position: relative; display: grid; place-items: center; text-align: center; gap: 6px; min-height: 160px; border: 2px dashed var(--line-strong); border-radius: var(--radius-card); background: var(--surface-warm); cursor: pointer; color: var(--body); font-size: .9375rem; padding: 18px; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop strong { display: block; color: var(--ink); font-size: 1.0625rem; font-weight: 700; }
.drop .ic { width: 30px; height: 30px; margin: 0 auto 8px; color: var(--accent); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop.has { border: 1px solid var(--line); background: #fff; }
.pdf-picked { display: grid; gap: 8px; width: 100%; text-align: left; }
.pdf-picked div { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 500; }
.pdf-picked small { display: block; color: var(--body); font-weight: 400; }
.read-status { margin-top: 14px; padding: 12px 16px; font-size: .9375rem; line-height: 1.5; border-radius: var(--radius-tile); background: var(--surface-warm); border: 1px solid var(--line); color: var(--ink); }
.read-status.ok { background: var(--ok-bg); border-color: #b9dfca; color: var(--ok-fg); }
.read-status.warn { background: var(--amber-bg); border-color: #f3d19c; color: var(--amber-fg); }
.read-status.busy { color: var(--body-strong); }
.read-status .link { color: inherit; }
.spin { display: inline-block; width: 13px; height: 13px; margin-right: 9px; border: 2px solid var(--line-strong); border-top-color: var(--brand-deep); border-radius: 50%; vertical-align: -1px; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* fields filled in from the PDF: check them */
input.auto { border-color: var(--brand-deep); background: var(--brand-tint); box-shadow: 0 0 0 3px rgba(237, 111, 35, .22); }

/* ---------------------------------------------------------------- login */
.login-page { background: var(--surface); }
.login { min-height: 100vh; flex: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.login-side {
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 48px 56px; color: rgba(255, 255, 255, .78);
  background: var(--deep);
}
.login-side > img { width: 230px; }
.login-side .eyebrow { color: var(--accent-bright); }
.login-side h1 { color: #fff; font-size: clamp(2rem, 3.6vw, 3.25rem); line-height: 1.05; max-width: 15ch; }
.login-side p { margin-top: 16px; max-width: 44ch; font-size: 1.0625rem; }
.login-points { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 0; max-width: 460px; border-top: 1px solid rgba(255, 255, 255, .1); }
.login-points li { display: flex; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.login-points .tile { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: var(--radius-tile); color: var(--accent-bright); background: rgba(237, 111, 35, .1); box-shadow: inset 0 0 0 1px rgba(237, 111, 35, .3); }
.login-points strong { display: block; color: #fff; font-weight: 700; }
.login-points small { display: block; font-size: var(--fs-sm); color: rgba(255, 255, 255, .7); }
.login-site { font-size: var(--fs-sm); margin: 0 !important; color: rgba(255, 255, 255, .7); }
.login-main { display: grid; place-items: center; padding: 40px 24px; background: var(--page); }
.login-card { width: 100%; max-width: 420px; display: grid; gap: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-lift); padding: 36px 32px; }
.login-card h2 { font-size: 1.875rem; }
.login-logo { display: none; width: 190px; margin-bottom: 6px; }

/* ---------------------------------------------------------------- printable invoice (US Letter) */
.print-page { background: var(--page); }
.print-wrap { width: 100%; max-width: 880px; margin: 0 auto; padding: 28px 16px 60px; }
.print-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.paper-wrap { overflow-x: auto; }
.paper {
  display: flex; flex-direction: column; width: 100%; max-width: 8.5in; min-height: 11in; margin: 0 auto; padding: .6in;
  background: #fff; color: #1a1612; border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow-card);
  font-size: 10.5pt; line-height: 1.45;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.paper-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; }
.paper-logo { width: 2.1in; margin-bottom: .14in; }
.paper-brand address { display: grid; font-style: normal; font-size: 9.5pt; color: #4a433c; }
.paper-brand address strong { color: #1a1612; font-weight: 700; }
.paper-id { text-align: right; }
.paper-title { font-size: 26pt; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); line-height: 1; margin-bottom: .14in; }
.paper-id dl { display: grid; grid-template-columns: auto auto; justify-content: end; gap: 3px 14px; margin: 0; font-size: 10pt; }
.paper-id dt { color: #4a433c; text-align: left; }
.paper-id dd { margin: 0; font-weight: 600; color: #1a1612; }
.paper-id .paper-no { font-weight: 700; }
.paper-rule { height: 3px; margin: .24in 0 .26in; border-radius: 3px; background: linear-gradient(90deg, var(--brand) 0, var(--brand) .9in, var(--deep) .9in, var(--deep) 100%); }
.paper-label { font-size: 8pt; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.paper-to { margin-bottom: .3in; }
.paper-name { font-size: 13pt; font-weight: 700; color: #1a1612; }
.paper-table { width: 100%; border-collapse: collapse; }
.paper-table th { font-size: 8pt; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #1a1612; text-align: right; padding: 0 0 8px 12px; border-bottom: 1.5pt solid #1a1612; white-space: nowrap; }
.paper-table td { text-align: right; padding: 10px 0 10px 12px; border-bottom: .75pt solid #d8d0c4; vertical-align: top; white-space: nowrap; font-variant-numeric: tabular-nums; }
.paper-table .desc { text-align: left; padding-left: 0; width: 100%; white-space: normal; }
.paper-table td.desc { font-weight: 500; color: #1a1612; }
.paper-bottom { display: flex; justify-content: space-between; align-items: flex-start; gap: .4in; margin-top: .3in; }
.paper-notes { flex: 1; min-width: 0; white-space: pre-wrap; font-size: 9.5pt; color: #4a433c; }
.paper-notes .paper-label { white-space: normal; }
.paper-totals { flex: none; width: 2.9in; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.paper-totals th { text-align: left; font-weight: 500; color: #4a433c; padding: 5px 12px; }
.paper-totals td { text-align: right; font-weight: 600; color: #1a1612; padding: 5px 12px; white-space: nowrap; }
.paper-totals .grand th, .paper-totals .grand td { background: var(--deep); color: #fff; font-size: 13pt; font-weight: 700; padding: 10px 12px; }
.paper-totals .grand th { border-radius: 8px 0 0 8px; box-shadow: 2px 0 0 var(--deep); }
.paper-totals .grand td { border-radius: 0 8px 8px 0; }
.paper-totals .after th, .paper-totals .after td { padding-top: 8px; }
.paper-totals .due th, .paper-totals .due td { font-weight: 700; color: #1a1612; border-top: .75pt solid #d8d0c4; }
.paper-foot { margin-top: auto; padding-top: .3in; text-align: center; }
.paper-thanks { font-size: 11pt; font-weight: 600; color: var(--accent); margin-bottom: 6px; }
.paper-contact { padding-top: 10px; border-top: .75pt solid #d8d0c4; font-size: 9pt; color: #4a433c; }

/* ---------------------------------------------------------------- settings
   A menu on the left (sections in groups), the chosen section on the right,
   tabs under its title when it has more than one page. */
.settings { display: grid; grid-template-columns: 228px minmax(0, 1fr); gap: 36px; align-items: start; }
.set-nav { position: sticky; top: calc(var(--bar-h) + 20px); display: grid; gap: 2px; padding-right: 20px; border-right: 1px solid var(--line); }
.set-nav-title { margin-bottom: 2px; font-size: 1.375rem; font-weight: 700; line-height: 1.15; color: var(--ink); }
.set-group { margin: 18px 0 6px; font-size: .6875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--body-strong); }
.set-nav a { position: relative; padding: 9px 12px; border-radius: 10px; font-size: .9375rem; color: var(--ink-2); transition: background .15s, color .15s; }
.set-nav a:hover { background: var(--accent-soft); color: var(--accent); }
.set-nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.set-nav a.on::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--brand); }
.set-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); min-width: 0; }
.set-head p { margin-top: 8px; max-width: 68ch; color: var(--body); }
.set-tabs { display: flex; gap: 28px; margin-top: 18px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.set-tabs a { position: relative; flex: none; padding: 10px 0 13px; font-size: .9375rem; font-weight: 500; color: var(--body-strong); white-space: nowrap; }
.set-tabs a:hover { color: var(--accent); }
.set-tabs a.on { color: var(--accent); font-weight: 600; }
.set-tabs a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); }
.set-note { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-tile); border: 1px solid var(--line); background: var(--surface-warm); font-size: var(--fs-sm); color: var(--ink-2); }
.set-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.with-unit { display: flex; align-items: center; gap: 10px; }
.with-unit input { flex: 1; min-width: 0; }
.with-unit span { flex: none; font-size: var(--fs-sm); color: var(--body-strong); }

/* an on/off switch (a checkbox underneath) */
.switch { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 42px; height: 24px; margin: 0; padding: 0; border: 0; border-radius: var(--radius-pill); background: #8a8178; cursor: pointer; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch:checked { background: var(--leaf); }
.switch:checked::after { transform: translateX(18px); }
fieldset[disabled] .switch { background: #8a8178; opacity: .55; cursor: default; }
fieldset[disabled] .switch:checked { background: var(--leaf); }
.switch-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch-row b { display: block; font-size: .9375rem; font-weight: 600; color: var(--ink); }
.switch-row small { display: block; margin-top: 1px; font-size: .8125rem; color: var(--body); }
.opt-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; }
.opt-list .switch-row { padding: 12px 0; border-bottom: 1px solid var(--line-2); }

/* notifications: a row per email, its switch at the right */
.notice-list { display: grid; }
.switch-row.notice { justify-content: space-between; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.switch-row.notice:first-child { padding-top: 0; }
.switch-row.notice:last-child { border-bottom: 0; padding-bottom: 0; }
.switch-row.notice small { max-width: 62ch; }

/* team permissions: one card per technician */
.perm-who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.perm-base { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 36px; font-size: var(--fs-sm); color: var(--ink-2); }
.perm-base p { margin-top: 6px; }
.perm-label { display: inline-flex; align-items: center; gap: 6px; font-size: .6875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.perm-label .ic { width: 15px; height: 15px; }
.perm-label.yes { color: var(--leaf-deep); }
.perm-label.no { color: var(--red); }
form.card:target { box-shadow: var(--shadow-card), 0 0 0 2px var(--accent); }
form.card[id^="member-"] { scroll-margin-top: calc(var(--bar-h) + 20px); }

/* business hours: a day, its switch and the two times */
.hours { display: grid; }
.hours-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: center; gap: 16px; min-height: 64px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.hours-row:last-child { border-bottom: 0; }
.hours-day { font-size: .9375rem; font-weight: 600; color: var(--ink); }
.hours-times { display: flex; align-items: center; gap: 12px; font-size: var(--fs-sm); color: var(--body-strong); }
.hours-times input { width: 148px; }
.hours-closed { display: none; font-size: .9375rem; color: var(--body-strong); }
.hours-row.closed .hours-times { display: none; }
.hours-row.closed .hours-closed { display: block; }
.windows-table td { vertical-align: top; }
.windows-table tr.closed td { background: var(--surface-warm); }

/* ==========================================================================
   Smaller screens
   ========================================================================== */
/* Narrower than this the header keeps one booking button; the form it opens offers Job or Estimate. */
@media (max-width: 1320px) {
  .top-right .btn-est { display: none; }
}

/* five stats: 3 + 2 on mid screens, 2 + 2 + 1 on phones */
@media (max-width: 1280px) {
  .stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .stat { grid-column: span 2; }
  .stat:nth-child(n + 4) { grid-column: span 3; }
  .stat-value { font-size: var(--fs-num); }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
  :root { --gutter: 24px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clock { display: none; }
  /* settings: the menu becomes a row of chips above the section */
  .settings { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .set-nav { position: static; display: flex; gap: 8px; padding: 0 0 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .set-nav-title, .set-group { display: none; }
  .set-nav a { flex: none; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: #fff; font-size: var(--fs-sm); white-space: nowrap; }
  .set-nav a.on { border-color: var(--deep); background: var(--deep); color: #fff; }
  .set-nav a.on::before { display: none; }
}

@media (max-width: 860px) {
  :root { --bar-h: 62px; --gutter: 16px; --gap: 16px; --fs-h1: 1.625rem; --fs-num: 1.5rem; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .hide-sm { display: none !important; }
  .show-sm { display: block; }
  .nav { display: none; }
  .top-in { gap: 10px; }
  .brand { margin-right: auto; min-height: 44px; }
  .brand img { height: 34px; }
  .top-right { gap: 6px; }
  .top-right .btn { height: 44px; padding: 0 16px; }
  /* every tap target is at least 44px tall on phones */
  .btn-sm { height: 44px; padding: 0 16px; }
  .me { border-left: 0; padding-left: 0; }
  .me .avatar { display: none; }
  .icon-btn { width: 44px; height: 44px; }

  /* app-style tab bar */
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    padding-bottom: env(safe-area-inset-bottom); background: var(--deep); border-top: 1px solid rgba(255, 255, 255, .1);
  }
  .tabbar a { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 60px; padding: 6px 2px; font-size: .6875rem; font-weight: 500; color: rgba(255, 255, 255, .72); }
  .tabbar .nav-ic { position: relative; display: grid; place-items: center; width: 44px; height: 28px; border-radius: var(--radius-pill); }
  .tabbar .nav-ic .ic { width: 21px; height: 21px; }
  .tabbar a.on { color: var(--accent-bright); font-weight: 700; }
  .tabbar a.on .nav-ic { background: rgba(237, 111, 35, .14); box-shadow: inset 0 0 0 1px rgba(237, 111, 35, .3); }
  .tabbar a.on::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
  .tabbar .count { position: absolute; top: -6px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; font-size: .625rem; }

  .band-in { padding-top: 8px; padding-bottom: 8px; }
  .site-link { display: none; }
  .content { padding-top: 20px; padding-bottom: 40px; }
  .foot { display: none; }
  .page-head { align-items: flex-start; margin-bottom: 18px; }
  .page-head .actions { width: 100%; }
  .page-head .actions > .btn, .page-head .actions > form { flex: 1 1 auto; }
  .page-head .actions > form .btn { width: 100%; }

  .hero { border-radius: var(--radius-card); }
  .hello { padding: 22px 20px; gap: 16px; }
  .day-block { width: 68px; }
  .day-block .dd { font-size: 1.9rem; }
  .stat { padding: 16px 18px; column-gap: 12px; }
  .stat-ic { width: 40px; height: 40px; }
  .quick { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .quick a { padding: 14px 16px; }

  .card-head { padding: 12px 18px; min-height: 58px; flex-wrap: wrap; }
  .card-body { padding: 18px; }
  .card-foot { padding: 12px 18px; }
  .toolbar { padding: 14px 18px; }
  .toolbar .tabs { margin-left: 0 !important; }
  .search { max-width: none; flex-basis: 100%; }
  .tabs a { height: 44px; }
  .table th:first-child, .table td:first-child { padding-left: 18px; }
  .table th:last-child, .table td:last-child { padding-right: 18px; }
  /* To do: badge moves above the name so the table fits the phone without sideways scroll */
  .todo-table thead { display: none; }
  .todo-table td { padding-top: 14px; padding-bottom: 14px; }
  .todo-table td:nth-child(2) { padding-left: 18px; overflow-wrap: anywhere; }
  .todo-table td:last-child { padding-left: 8px; }
  .todo-tag { margin-bottom: 6px; }
  .row-link { padding: 14px 18px; }
  .route li a { grid-template-columns: 84px minmax(0, 1fr); padding: 12px 18px; gap: 14px; }
  .route li a .badge { display: none; }
  .facts > div { padding: 16px 18px; }
  .facts dd { font-size: 1.25rem; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }

  .form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .col-6, .col-4, .col-3 { grid-column: 1 / -1; }
  .col-2, .col-1 { grid-column: span 1; }
  .form-actions .btn { flex: 1 1 auto; }

  .grp-head, .grp > summary, .grp-single, .cust-cols { grid-template-columns: minmax(0, 1fr) auto 32px !important; padding-left: 18px; padding-right: 18px; }
  .grp-body { padding-left: 0; }
  .cust-open { grid-template-columns: minmax(0, 1fr); }
  .cust-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .cust-main { padding: 14px 18px 18px; }
  .cust-actions .btn { flex: 1 1 auto; height: 44px; }

  /* a technician's login has no tab bar at the bottom */
  body.is-tech { padding-bottom: 0; }
  .note-list li { padding: 14px 18px; }
  .agenda-none { padding: 12px 18px; }
  .dispatch { --dp-who: 76px; max-height: none; }
  .dp-who .tm-dot { width: 28px; height: 28px; }
  .move-status, .dp-hint { padding: 10px 14px; }

  .opt-list, .perm-base { grid-template-columns: minmax(0, 1fr); }
  .hours-row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 0; }
  .hours-times input { flex: 1; width: auto; min-width: 0; }
  .set-nav a { padding: 11px 16px; }

  .cal-bar { padding: 12px 14px; }
  .cal-bar h2 { order: 5; flex-basis: 100%; margin: 4px 0 0; font-size: 1.125rem; }
  .cal-nav .btn, .cal-bar .btn-sm { height: 44px; }
  .cal-nav .btn { width: 44px; }
  .seg a { padding: 9px 13px; }
  .week { grid-template-columns: 50px repeat(var(--days, 7), minmax(0, 1fr)); }
  .week .hour-label { padding-right: 6px; font-size: .6875rem; }
  .month .day { min-height: 84px; padding: 4px; }
  .month .dow { padding: 8px 4px; text-align: center; }
  .ev { padding: 2px 4px; font-size: .625rem; border-left-width: 2px; }
  .ev .t { display: none; }

  .inv-lines, .inv-lines tbody, .inv-lines tr, .inv-lines td { display: block; width: auto !important; }
  .inv-lines thead { display: none; }
  .inv-lines tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 46px; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
  .inv-lines td { padding: 0 !important; }
  .inv-lines td:first-child { grid-column: 1 / -1; }
  .inv-lines .amt-cell { grid-column: 1 / 3; text-align: left; padding-top: 0 !important; }
  .inv-lines .rm { grid-row: 2; grid-column: 3; }

  .login { grid-template-columns: minmax(0, 1fr); }
  .login-side { display: none; }
  .login-main { align-items: start; padding-top: 48px; }
  .login-card { padding: 28px 22px; }
  .login-logo { display: block; }

  .paper { padding: .35in; min-height: 0; font-size: 9.5pt; }
  .paper-head { flex-direction: column; gap: 14px; }
  .paper-id { text-align: left; }
  .paper-id dl { justify-content: start; }
  .paper-bottom { flex-direction: column; }
  .paper-totals { width: 100%; }
}

@media (max-width: 560px) {
  /* two narrow stat cells: icon above the text so money never clips */
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat, .stat:nth-child(n + 4) { grid-column: span 1; }
  .stat:last-child { grid-column: span 2; }
  .stat { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; padding: 16px; }
  .stat-ic { grid-row: auto; width: 34px; height: 34px; border-radius: 10px; margin-bottom: 10px; }
  .stat-ic .ic { width: 18px; height: 18px; }
  .stat-value { font-size: 1.375rem; }
  .hello h1 { font-size: 1.625rem; }
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .kv { grid-template-columns: 96px minmax(0, 1fr); }
  /* the logo is a wide wordmark: smaller here, so the header's buttons all fit a phone */
  .brand img { height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------------------------------------------------------------- the payment link on a printed invoice */
.paper-pay { margin-top: .22in; padding: 10px 12px; border: .75pt solid #d8d0c4; border-radius: 8px; font-size: 9.5pt; }
.paper-pay .paper-label { margin: 0 8px 2px 0; }
.paper-pay a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }

/* ---------------------------------------------------------------- customer payment page (/pay/<token>)
   Public, no staff navigation. Built from the same pieces as the website:
   white header with the phone number, one card, one orange pill button. */
.pay-page { background: var(--page); }
.pay-top { background: var(--surface); border-bottom: 1px solid var(--line); }
.pay-top-in { max-width: 880px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pay-logo { width: 168px; }
.pay-call { display: grid; text-align: right; line-height: 1.2; }
.pay-call-label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--body-strong); }
.pay-call strong { font-size: 1.125rem; font-weight: 700; color: var(--ink); white-space: nowrap; }
.pay { flex: 1; width: 100%; max-width: 880px; margin: 0 auto; padding: 28px 16px 48px; display: grid; gap: 20px; align-content: start; }
.pay > .flash { width: 100%; max-width: 520px; margin: 0 auto; }
.pay-card { width: 100%; max-width: 520px; margin: 0 auto; display: grid; gap: 16px; text-align: center; padding: 32px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-lift); }
.pay-card .eyebrow { justify-content: center; }
.pay-card h1 { font-size: 1.875rem; }
.pay-card p { color: var(--body-strong); }
.pay-amount { display: grid; gap: 2px; padding: 18px 16px; border-radius: var(--radius-tile); background: var(--surface-warm); border: 1px solid var(--line); }
.pay-amount span { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--body-strong); }
.pay-amount strong { font-size: 2.5rem; font-weight: 800; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.pay-amount small { font-size: var(--fs-sm); color: var(--body-strong); }
.pay-secure { display: flex; align-items: flex-start; justify-content: center; gap: 8px; font-size: var(--fs-sm); text-align: left; }
.pay-secure .ic { width: 16px; height: 16px; margin-top: 2px; color: var(--leaf); }
.pay-mark { width: 56px; height: 56px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--ok-bg); color: var(--ok-fg); }
.pay-mark .ic { width: 28px; height: 28px; }
.pay-doc-head { width: 100%; max-width: 8.5in; margin: 12px auto 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pay-foot { padding: 0 16px 28px; text-align: center; font-size: var(--fs-sm); color: var(--body-strong); }
@media (max-width: 560px) {
  .pay-logo { width: 132px; }
  .pay-call strong { font-size: 1rem; }
  .pay-card { padding: 26px 18px; }
  .pay-amount strong { font-size: 2.125rem; }
}

/* ==========================================================================
   Print: only the invoice paper, on US Letter
   ========================================================================== */
@page { size: letter; margin: 0; }
@media print {
  body, .print-page { background: #fff; padding: 0; display: block; min-height: 0; }
  .top, .tabbar, .band, .foot, .flash, .skip, .no-print, .pay-top, .pay-card, .pay-doc-head, .pay-foot { display: none !important; }
  .pay { padding: 0; max-width: none; }
  .content, .print-wrap { max-width: none; padding: 0; margin: 0; }
  .split, .stack { display: block; }
  .paper-wrap { overflow: visible; }
  .paper { max-width: none; width: 8.5in; min-height: 10.9in; margin: 0; border: 0; border-radius: 0; box-shadow: none; padding: .6in; font-size: 10.5pt; }
  .paper-head { flex-direction: row; }
  .paper-id { text-align: right; }
  .paper-id dl { justify-content: end; }
  .paper-bottom { flex-direction: row; }
  .paper-totals { width: 2.9in; }
}
