/* © 2026 James J Carballo. All rights reserved. See LICENSE. */
/* Clean and bright: white cards on a soft gray-blue page, navy text and Proliox orange.
   Orange text is darker so it reads on white. */
:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f1f4f9;
  --hover: #eef2f8;
  --border: #e3e8ef;
  --input-border: #cfd7e3;
  --line: #e6ebf2;
  --ink: #0f1b2d;
  --ink-soft: #4a5a70;
  --accent: #c45f00;
  --accent-dark: #9a4a00;
  --accent-soft: rgba(255, 138, 0, .12);
  --primary: #ff8a00;
  --primary-hover: #ffa033;
  --primary-ink: #120a00;
  --spark: #ffb020;
  --spark-hover: #ffc14d;
  --spark-ink: #120a00;
  --bar: #ffffff;
  --bar-2: #f1f4f9;
  --bar-ink: #0f1b2d;
  --bar-soft: #4a5a70;
  --ok: #047857;
  --ok-soft: rgba(16, 185, 129, .14);
  --warn: #8a5a00;
  --warn-soft: rgba(255, 196, 40, .22);
  --bad: #be123c;
  --bad-soft: rgba(244, 63, 94, .12);
  --info: #c45f00;
  --info-soft: rgba(255, 138, 0, .12);
  --muted-soft: rgba(15, 27, 45, .06);
  --glass: #ffffff;
  --radius: 10px;
  --shadow: 0 14px 38px rgba(11, 31, 58, .16);
  --lift: 0 1px 2px rgba(11, 31, 58, .05), 0 4px 14px rgba(11, 31, 58, .05);
  --top-bg: #ffffff;
  --nav-bg: #ffffff;
  --subnav-bg: #ffffff;
  --glow-1: rgba(255, 138, 0, .16);
  --glow-2: rgba(56, 120, 255, .12);
  --grid: rgba(204, 122, 0, .13);
  --task-bg: #ede9fe; --task-ink: #5b21b6; --task-edge: #7c3aed;
  --event-bg: #fce7f3; --event-ink: #9d174d; --event-edge: #db2777;
  --assess-bg: #e0f2fe; --assess-ink: #075985; --assess-edge: #0284c7;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1 { font-size: 1.6rem; font-weight: 800; margin: 0; line-height: 1.2; letter-spacing: -.02em; }
h2 { font-size: 1.05rem; font-weight: 700; margin: 0 0 .75rem; letter-spacing: -.01em; }
p { margin: 0 0 .5rem; }
a { color: var(--accent); }
.muted { color: var(--ink-soft); }
.small { font-size: .875rem; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

/* Surfaces */
.card, .stat, .visit-card, .auth-card, .figure {
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--lift);
}

/* Frame: a glass bar on top and a row of links under it */
.layout { min-height: 100vh; }
.topbar { position: relative; z-index: 20; display: flex; align-items: center; gap: .75rem; padding: .55rem 1.5rem; color: var(--bar-ink); background: var(--top-bg); border-bottom: 1px solid var(--border); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.15rem; letter-spacing: .01em; }
.brand img { width: 30px; height: 30px; display: block; }
.topbar .biz { display: flex; align-items: center; gap: .5rem; padding-left: .75rem; border-left: 1px solid var(--bar-2); color: var(--bar-soft); font-size: .9rem; max-width: 34%; min-width: 0; }
.topbar .biz span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: .15rem; padding: 0 1.25rem; overflow-x: auto; scrollbar-width: none; background: var(--nav-bg); border-bottom: 1px solid var(--border); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.nav a { flex: none; padding: .75rem .8rem .65rem; color: var(--ink-soft); font-size: .92rem; font-weight: 600; text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--accent); font-weight: 700; border-bottom-color: var(--accent); }
.searchbox { position: relative; flex: 1; max-width: 420px; margin-left: auto; }
.searchbox input { width: 100%; color: var(--bar-ink); background: var(--bar-2); border-color: var(--bar-2); }
.searchbox input::placeholder { color: var(--bar-soft); }
.results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: .3rem; max-height: 60vh; overflow-y: auto; z-index: 30; }
.results a { display: block; padding: .45rem .6rem; border-radius: 8px; color: var(--ink); text-decoration: none; }
.results a:hover, .results a:focus { background: var(--accent-soft); }
.results .kind { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.main { max-width: 1280px; min-width: 0; margin: 0 auto; padding: 1.5rem 1.5rem 2.5rem; }
.head { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.head-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.crumb { font-size: .875rem; margin-bottom: .2rem; display: block; }
.eyebrow { color: var(--ink-soft); font-weight: 600; margin-bottom: .1rem; }
.section-title { margin: 1.4rem 0 .75rem; font-size: 1.1rem; font-weight: 600; }

/* Components */
.card { border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-side { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.stat { display: flex; flex-direction: column; position: relative; border-radius: var(--radius); padding: 1rem 1.15rem; color: inherit; text-decoration: none; }
a.stat:hover, button.stat:hover { background: var(--surface); box-shadow: var(--shadow); }
a.stat::after, button.stat::after { content: "→"; position: absolute; top: .9rem; right: 1rem; color: var(--accent); }
button.stat { width: 100%; min-height: 0; font-weight: 400; text-align: left; border-color: transparent; }
.stat .title { font-size: .92rem; font-weight: 600; }
.stat .value { order: -1; display: flex; align-items: center; gap: .6rem; font-size: 1.75rem; font-weight: 600; line-height: 1.2; margin-bottom: .2rem; color: var(--accent-dark); }
.stat.promo { justify-content: space-between; gap: .9rem; }
.stat.promo p { margin: 0; color: var(--ink-soft); }
.stat.promo button { align-self: flex-start; }
.measure { margin-top: .5rem; }
.measure .value { font-size: 1.35rem; }
.overview div { display: flex; justify-content: space-between; gap: .5rem; font-size: .9rem; padding: .08rem 0; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .4rem; background: var(--ink-soft); }
.dot.ok { background: var(--ok); } .dot.warn { background: #c98a00; } .dot.bad { background: var(--bad); } .dot.info { background: var(--info); } .dot.accent { background: var(--accent); }
.trend { font-size: .75rem; font-weight: 600; border-radius: 6px; padding: .08rem .45rem; background: var(--muted-soft); color: var(--ink-soft); letter-spacing: 0; }
.trend.up { background: var(--ok-soft); color: var(--ok); }
.trend.down { background: var(--bad-soft); color: var(--bad); }
.callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; background: var(--accent-soft); border-radius: 12px; padding: .65rem .85rem; margin-bottom: 1rem; }

/* Client list */
.pick { width: 40px; padding-right: 0; }
.pick input { min-height: 0; width: 18px; height: 18px; display: block; }
td.pick input { opacity: 0; }
.client-row:hover td.pick input, .client-row.picked td.pick input, td.pick input:focus-visible { opacity: 1; }
.client-row:hover td, .client-row.picked td { background: var(--hover); }
.last-cell { position: relative; }
.row-actions { display: none; position: absolute; top: 50%; right: .5rem; transform: translateY(-50%); gap: .15rem; padding: .2rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.client-row:hover .row-actions, .client-row:focus-within .row-actions { display: flex; }
.pick-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .75rem; padding: .5rem .75rem; background: var(--accent-soft); border-radius: 10px; }

/* Icon buttons */
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; min-height: 0; padding: 0; color: var(--accent); background: var(--surface); border: 1px solid transparent; border-radius: 8px; flex: none; }
.icon-button:hover { background: var(--hover); }
.icon-button svg { width: 20px; height: 20px; }
.card-head .icon-button, .client-top .icon-button { width: 40px; height: 40px; border-color: var(--border); }
.icon-row { display: flex; gap: .15rem; flex: none; }

/* Client page */
.client-page { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.client-rail { order: -1; }
.client-page.no-rail { grid-template-columns: minmax(0, 1fr); }
.client-main { min-width: 0; }
.client-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .75rem; }
.client-status { display: inline-flex; align-items: center; gap: .5rem; }
.client-status svg { width: 24px; height: 24px; }
.client-title { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .5rem; }
.client-title .icon-button { width: 40px; height: 40px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; margin: 1rem 0 1.25rem; }
.fact { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: .75rem; padding: .65rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.tabs { position: sticky; top: 46px; z-index: 5; display: inline-flex; gap: .2rem; max-width: 100%; overflow-x: auto; margin-bottom: 1rem; padding: .25rem; background: var(--surface-2); border-radius: 12px; }
.tabs button { flex: none; min-height: 34px; padding: .25rem .85rem; color: var(--ink-soft); background: none; border: 0; border-radius: 9px; font-weight: 500; }
.tabs button:hover { background: none; color: var(--ink); }
.tabs button.on { color: var(--accent); background: var(--surface); font-weight: 600; box-shadow: var(--lift); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.card-head h2, .rail-link h2 { margin: 0; }
.card-head h2:has(> svg) { display: flex; align-items: center; gap: .5rem; }
.card-head h2 > svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
/* A heading with an icon straight inside a card gets the same small icon as the others. */
.card > h2:has(> svg) { display: flex; align-items: center; gap: .5rem; }
.card > h2 > svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
.client-main .card > h2, .card-head h2, .client-rail h2, .rail-link h2 { font-size: 1.05rem; font-weight: 700; }
.pill-button { display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; border-radius: 10px; font-weight: 500; }
.pill-button svg { width: 19px; height: 19px; color: var(--accent); }
.pill-button.on { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.item-cell { display: flex; align-items: center; gap: .6rem; }
.item-cell > svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
.block { display: block; }
.total-row td { border-top: 1px solid var(--ink-soft); }
.contact-empty { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.client-rail { position: sticky; top: 62px; max-height: calc(100vh - 74px); overflow-y: auto; padding: 2px; }
.rail-figure { margin-bottom: .75rem; }
.rail-figure:last-child { margin-bottom: 0; }
.rail-figure b { display: block; font-size: 1.4rem; font-weight: 600; line-height: 1.2; color: var(--accent-dark); }
.rail-link { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 0; padding: 0; margin-bottom: .5rem; color: inherit; background: none; border: 0; text-align: left; font-size: 1.2rem; }
.rail-link:hover { background: none; color: var(--accent); }
.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.tag-remove { min-height: 0; padding: 0 .1rem; color: inherit; background: none; border: 0; font-size: .85rem; line-height: 1; }
.tag-remove:hover { background: none; color: var(--bad); }
.notes-count { display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; margin-left: .35rem; padding: 0 .4rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .75rem; font-weight: 700; vertical-align: middle; }
.note-list { display: flex; flex-direction: column; margin-top: .25rem; }
.note { padding: .75rem 0; border-top: 1px solid var(--line); }
.note-item { display: flex; gap: .8rem; }
.note-rail { flex: none; display: flex; flex-direction: column; align-items: center; }
.note-rail::after { content: ""; flex: 1; width: 2px; margin: .35rem 0; border-radius: 2px; background: var(--line); }
.note-item:last-child .note-rail::after { display: none; }
.note-main { flex: 1; min-width: 0; padding: .35rem 0 1.25rem; }
.note-item:last-child .note-main { padding-bottom: .25rem; }
.note-head { display: flex; align-items: flex-start; gap: .5rem; margin-bottom: .3rem; }
.note-head .icon-button { margin: -.55rem -.4rem -.7rem 0; width: 34px; height: 34px; border-color: transparent; background: transparent; color: var(--ink-soft); }
.note-head .icon-button:hover { color: var(--accent); background: var(--accent-soft); }
.note-avatar { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-size: .78rem; font-weight: 700; color: var(--primary-ink); background: var(--primary); }
.note-head strong { font-size: .92rem; }
.note-when { font-size: .8rem; color: var(--ink-soft); white-space: nowrap; }
.note-body { font-size: .95rem; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; }
.note-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; margin-top: .7rem; }
.note-photos.single { grid-template-columns: minmax(0, 240px); }
.note-photo { position: relative; display: block; min-height: 0; padding: 0; overflow: hidden; border: 0; border-radius: 10px; background: var(--line); aspect-ratio: 1; }
.note-photos.single .note-photo { aspect-ratio: 4 / 3; }
.note-photo:hover { background: var(--line); }
.note-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.note-photo:hover img { transform: scale(1.04); }
.note-more { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 1.15rem; font-weight: 700; background: rgba(0, 0, 0, .5); }
.note-about { display: inline-flex; align-items: center; gap: .35rem; margin-top: .7rem; padding: .25rem .65rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .8rem; font-weight: 600; text-decoration: none; }
.note-about svg { width: 14px; height: 14px; }
.notes-empty { display: grid; justify-items: center; gap: .2rem; padding: 1.25rem .5rem; text-align: center; }
.notes-empty svg { width: 28px; height: 28px; margin-bottom: .3rem; color: var(--ink-soft); }
.notes-empty p { margin: 0; font-weight: 600; }
.grow-text { flex: 1; min-width: 0; }
.avatar-sm { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; border-radius: 8px; font-size: .7rem; font-weight: 700; color: var(--primary-ink); background: var(--primary); }

/* Composers inside a card */
.composer { margin: .25rem 0 .75rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.composer textarea, .composer > input { display: block; width: 100%; }
.composer-foot { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .6rem; }
.drop-zone { margin: .6rem 0; padding: .8rem; text-align: center; border: 1px dashed var(--input-border); border-radius: 10px; }
.drop-zone.over { background: var(--accent-soft); border-color: var(--accent); }
.drop-zone p { margin: .4rem 0 0; }
.note-file { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; padding: .3rem; border: 1px solid var(--border); border-radius: 8px; }
.note-file img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.note-file span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem .75rem; margin-bottom: .5rem; border: 1px solid var(--border); border-radius: 10px; }
.icon-button:disabled { opacity: .35; cursor: default; }
.menu-label { grid-column: 1 / -1; margin-top: .35rem; font-size: .8rem; font-weight: 700; color: var(--ink-soft); }

/* Quote page and client preview */
.client-card { padding: .9rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); }
.client-card p { margin: .5rem 0 0; }
.signature { display: block; max-width: 320px; width: 100%; border: 1px solid var(--line); border-radius: 8px; }
.signature-pad { display: block; width: 100%; touch-action: none; background: #fff; border: 1px solid var(--input-border); border-radius: 10px; cursor: crosshair; }
.biz-head { display: flex; justify-content: center; margin-bottom: 1rem; font-size: 1.3rem; }
.biz-logo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.preview-page { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
.preview-side { position: sticky; top: 62px; }
.preview-side button { display: block; width: 100%; margin-bottom: .5rem; }
.preview-side button:disabled { color: var(--ink-soft); background: var(--muted-soft); border-color: var(--muted-soft); cursor: not-allowed; }

/* Map of today's visits */
.map-heading { margin-bottom: .4rem; }
.map-note { margin: .5rem 0 0; }
.qr-code { display: block; width: 220px; height: 220px; margin: .5rem auto; image-rendering: pixelated; }
.secret-text { font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; user-select: all; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem .75rem; margin: .5rem 0; font-family: ui-monospace, Consolas, monospace; user-select: all; }
.map-box { width: 100%; height: min(360px, 100vw); overflow: hidden; background: #f3f4f5; border-radius: 10px; }
.map-pin { position: relative; display: block; width: 28px; height: 35px; text-decoration: none; }
.map-pin-drop { position: absolute; top: 0; left: 0; width: 28px; height: 28px; background: #e0352b; border: 2px solid #fff; border-radius: 50% 50% 50% 0; box-shadow: 0 1px 4px rgba(0, 0, 0, .45); transform: rotate(-45deg); }
.map-pin.completada .map-pin-drop { background: var(--ok); }
.map-pin.en_curso .map-pin-drop { background: #c98a00; }
.map-pin-number { position: absolute; top: 0; left: 0; width: 28px; color: #fff; font-size: .8rem; font-weight: 700; line-height: 28px; text-align: center; }
.map-card { z-index: 5; }
.map-card .maplibregl-popup-tip { display: none; }
.map-card .maplibregl-popup-content { max-height: min(400px, 90vw); padding: 0; overflow-y: auto; color: var(--ink); font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.map-card-sheet { padding: 0; }
.map-card-visit + .map-card-visit { border-top: 1px solid var(--border); }
.map-card-head { padding: .6rem .85rem; background: var(--surface-2); }
.map-card-body { padding: .6rem .85rem .75rem; font-size: .85rem; }
.map-card-body p { margin: 0; overflow-wrap: anywhere; }
.map-stops { max-height: 170px; margin: .5rem 0 0; padding-left: 1.6rem; overflow-y: auto; }
.map-stops li { margin-bottom: .2rem; }

/* Notifications */
.bell { position: relative; display: grid; place-items: center; width: 36px; height: 36px; color: var(--bar-ink); border-radius: 50%; text-decoration: none; }
.bell:hover { background: var(--bar-2); }
.bell svg { width: 22px; height: 22px; }
.bell-count { position: absolute; top: 0; right: -2px; min-width: 17px; padding: 0 4px; color: #fff; font-size: .68rem; font-weight: 700; line-height: 17px; text-align: center; background: #e0352b; border-radius: 9px; }
.bell-count[hidden] { display: none; }
.notify-card { padding-top: .25rem; }
.notify-day { margin: 1rem 0 .35rem; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.notify-row { display: flex; align-items: center; gap: .85rem; margin: 0 -.6rem; padding: .7rem .6rem; border-radius: 12px; color: var(--ink); text-decoration: none; }
a.notify-row:hover { background: var(--surface-2); }
.notify-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.notify-icon svg { width: 20px; height: 20px; }
.notify-icon.info { background: var(--info-soft); color: var(--accent-dark); }
.notify-icon.ok { background: var(--ok-soft); color: var(--ok); }
.notify-icon.bad { background: var(--bad-soft); color: var(--bad); }
.notify-icon.muted { background: var(--muted-soft); color: var(--ink-soft); }
.notify-icon.warn { background: var(--warn-soft); color: var(--warn); }
.notify-icon.party { background: linear-gradient(135deg, #ff9f1c, #ff4f8b); color: #fff; box-shadow: 0 3px 10px rgba(255, 95, 120, .35); }
/* Confetti for a quote approved: pieces fall from the top, drifting and turning. */
.confetti { position: fixed; inset: 0; z-index: 60; overflow: hidden; pointer-events: none; }
.confetti span { position: absolute; top: -16px; width: 8px; height: 14px; border-radius: 2px; animation-name: confetti-fall; animation-timing-function: cubic-bezier(.25, .6, .45, 1); animation-fill-mode: forwards; }
.confetti .c0 { background: #ff9f1c; }
.confetti .c1 { background: #ff4f8b; }
.confetti .c2 { background: #2ec4b6; }
.confetti .c3 { background: #ffd166; }
.confetti .c4 { background: #5b8cff; border-radius: 50%; width: 9px; height: 9px; }
@keyframes confetti-fall { to { transform: translate(var(--drift), 105vh) rotate(var(--turn)); opacity: .9; } }
.notify-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.notify-action { font-weight: 600; line-height: 1.35; }
.notify-meta { font-size: .82rem; color: var(--ink-soft); }
.notify-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
#notify-more { margin-bottom: .9rem; }

/* The New menu */
dialog.fan-dialog { position: fixed; inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; overflow: hidden; background: transparent; border-radius: 0; box-shadow: none; }
.create-fan { position: absolute; inset: 0; background: rgba(5, 6, 9, .8); }
.fan-item { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; width: 100px; min-height: 0; height: 100px; margin: -50px 0 0 -50px; padding: 0; color: var(--ink); font-weight: 600; background: var(--surface); border: 1px solid var(--accent); border-radius: 50%; box-shadow: 0 0 22px rgba(255, 176, 32, .25); animation: fan-pop .22s cubic-bezier(.2, 1.3, .5, 1) backwards; transition: transform .12s ease, background .12s ease, color .12s ease; }
.fan-item svg { width: 28px; height: 28px; color: var(--accent); }
.fan-item span { font-size: .85rem; }
.fan-item:hover, .fan-item:focus-visible { color: var(--primary-ink); background: var(--primary); transform: scale(1.1); }
.fan-item:hover svg, .fan-item:focus-visible svg { color: var(--primary-ink); }
.fan-close { position: absolute; display: grid; place-items: center; width: 52px; min-height: 0; height: 52px; margin: -26px 0 0 -26px; padding: 0; color: var(--spark-ink); background: var(--spark); border: 0; border-radius: 50%; box-shadow: 0 6px 18px rgba(10, 20, 60, .35); }
.fan-close svg { width: 22px; height: 22px; }
.fan-rows { display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start; gap: 1rem; padding-right: 1rem; padding-left: 1rem; }
.fan-rows .fan-item { position: static; margin: 0; }
@keyframes fan-pop { from { opacity: 0; transform: scale(.3); } }
@media (prefers-reduced-motion: reduce) { .fan-item { animation: none; } }

/* Help assistant */
.assist-open { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40; width: 56px; min-height: 0; height: 56px; padding: 0; color: var(--primary-ink); font-size: 1.5rem; font-weight: 700; background: var(--primary); border: 0; border-radius: 50%; box-shadow: 0 0 22px rgba(255, 138, 0, .45); }
.assist-open:hover { background: var(--primary); transform: scale(1.06); }
.assist { position: fixed; right: 1.25rem; bottom: 5.5rem; z-index: 40; display: flex; flex-direction: column; width: min(420px, calc(100vw - 24px)); height: min(560px, calc(100dvh - 130px)); overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.assist[hidden] { display: none; }
.assist-head { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; color: var(--ink); background: var(--surface-2); }
.assist-head strong { flex: 1; }
.assist-head .link { color: var(--accent); }
.assist-x { min-height: 0; padding: 0 .35rem; color: var(--ink); font-size: 1.3rem; line-height: 1.2; background: none; border: 0; }
.assist-x:hover { background: none; }
.assist-list { flex: 1; display: flex; flex-direction: column; gap: .55rem; padding: .8rem; overflow-y: auto; }
.assist-msg { max-width: 88%; padding: .5rem .75rem; font-size: .92rem; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); border-radius: 14px; }
.assist-msg.user { align-self: flex-end; color: var(--primary-ink); background: var(--primary); }
.assist-msg.assist-error { color: var(--bad); background: var(--bad-soft); }
#assist-form { display: flex; align-items: flex-end; gap: .5rem; padding: .6rem .8rem 0; }
#assist-form textarea { flex: 1; min-height: 0; margin: 0; resize: none; }
.assist-note { margin: .3rem .8rem .55rem; font-size: .75rem; }
/* (max-width: 760px) */ :where(:root.layout-760) .assist-open{ bottom: 4.25rem; } :where(:root.layout-760) .assist{ bottom: 8.5rem; height: min(520px, calc(100dvh - 190px)); right: 12px; } 

/* Area tabs */
.nav { gap: .35rem; }
.nav a { padding-right: 1.1rem; padding-left: 1.1rem; font-size: .9rem; }
.subnav { display: flex; gap: .25rem; padding: .4rem 1.25rem; overflow-x: auto; scrollbar-width: none; background: var(--subnav-bg); border-bottom: 1px solid var(--line); }
.subnav a { flex: none; padding: .3rem .8rem; color: var(--ink-soft); font-size: .84rem; text-decoration: none; white-space: nowrap; border: 1px solid transparent; border-radius: 4px; }
.subnav a:hover { color: var(--ink); background: var(--hover); }
.subnav a.on { color: var(--accent); background: var(--accent-soft); border-color: var(--border); font-weight: 600; }

/* Phone: bottom bar, Search, More, Calendar and job */
.chips { display: flex; gap: .4rem; margin-bottom: .55rem; padding-bottom: .15rem; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: .42rem .85rem; color: var(--ink); font-size: .85rem; font-weight: 600; text-decoration: none; white-space: nowrap; background: var(--glass); border: 1px solid var(--border); border-radius: 4px; }
.chip.on { color: var(--primary-ink); background: var(--primary); border-color: var(--primary); }
.chips.sub .chip { font-weight: 500; color: var(--ink-soft); border-color: var(--line); }
.chips.sub .chip.on { color: var(--accent); background: var(--accent-soft); border-color: var(--border); }
.chip-count { color: var(--accent); font-size: .78rem; }
.find-search { margin-bottom: .6rem; }
.find-search input { width: 100%; }
.find-list { padding-top: .25rem; padding-bottom: .25rem; }
.find-row, .more-row { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 56px; padding: .55rem 0; color: inherit; text-align: left; text-decoration: none; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.find-row:last-child, .more-row:last-child { border-bottom: 0; }
.find-row svg, .more-row svg { flex: none; width: 20px; height: 20px; color: var(--accent); }
.find-row .grow-text { flex: 1; min-width: 0; }
.more-list { padding-top: .25rem; padding-bottom: .25rem; }
.more-row { font-weight: 600; }
.more-hero { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: 1.5rem 1rem 1.25rem; text-align: center; background-image: radial-gradient(circle at 50% 0, var(--accent-soft), transparent 70%); }
.more-hero h1 { margin-top: .6rem; font-size: 1.2rem; overflow-wrap: anywhere; }
.more-hero a { margin-top: .4rem; }
/* The ring takes the theme's own color, so it changes with the theme. */
.more-logo { display: grid; place-items: center; width: 112px; height: 112px; margin: 8px; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 50%; outline: 4px solid var(--accent); outline-offset: 4px; box-shadow: 0 8px 22px rgba(0, 0, 0, .18), 0 0 18px var(--accent-soft); transition: outline-color .3s, box-shadow .3s; }
.more-logo:has(img) { border: 0; }
.more-logo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.more-logo span { color: #b45309; font-size: 2rem; font-weight: 700; }
.phone-top > a.bell { margin-left: auto; }
.top-help { min-height: 0; padding: 0; background: none; border: 0; }
.danger-text, .danger-text svg { color: var(--bad); }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .25rem; margin-bottom: .75rem; }
.week-day { display: flex; flex-direction: column; align-items: center; gap: .05rem; min-height: 62px; padding: .35rem 0; color: var(--ink-soft); background: var(--glass); border: 1px solid var(--line); border-radius: 6px; }
.week-day b { color: var(--ink); font-size: 1.05rem; }
.week-day i { width: 6px; height: 6px; border-radius: 50%; }
.week-day i.has-work { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.week-day.is-today { border-color: var(--accent); }
.week-day.on { color: var(--primary-ink); background: var(--primary); border-color: var(--primary); }
.week-day.on b { color: var(--primary-ink); }
.week-day.on i.has-work { background: var(--primary-ink); box-shadow: none; }
.phone-cal-bar .cal-heading { flex: 1 0 100%; margin: 0; }
.cal-group h2 { margin-bottom: .35rem; }
.today-title { color: var(--accent); }
.cal-line { display: flex; align-items: center; gap: .6rem; width: 100%; min-height: 56px; padding: .55rem 0; color: inherit; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.cal-line:last-child { border-bottom: 0; }
.cal-line .grow-text { flex: 1; min-width: 0; }
.cal-line-time { flex: none; width: 66px; color: var(--accent); font-weight: 600; }
.job-top { margin-bottom: .9rem; }
.job-top h1 { margin: .35rem 0 .3rem; }
.job-top p { margin: 0 0 .25rem; }
.quick-actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .5rem; margin: .7rem 0 .5rem; }
.quick-actions > * { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 44px; }
.quick-actions svg { width: 18px; height: 18px; color: var(--accent); }
.job-main-actions { display: flex; gap: .5rem; }
.job-main-actions > :first-child { flex: 1; min-height: 46px; text-align: center; }
#take-note-photo { display: inline-flex; align-items: center; gap: .35rem; }
#take-note-photo svg { width: 18px; height: 18px; }
/* Every button in the note's photo box has its icon at the same small size, beside its words. */
.drop-zone button { display: inline-flex; align-items: center; gap: .35rem; }
.drop-zone button svg { width: 18px; height: 18px; flex: none; }
.fan-up { align-content: flex-end; height: 100%; }

/* The list of saved items under a line's name */
.product-picker { position: fixed; z-index: 60; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); }
.picker-option { display: block; width: 100%; min-height: 0; padding: .5rem .7rem; color: var(--ink); text-align: left; font-weight: 400; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.picker-option:last-child { border-bottom: 0; }
.picker-option:hover, .picker-option.on { background: var(--hover); }
.picker-top { display: flex; justify-content: space-between; gap: .75rem; }
.picker-text { display: -webkit-box; margin-top: .1rem; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }

/* Tax settings */
.tax-list { margin-top: .5rem; }
.tax-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 110px minmax(0, 1.4fr) auto; align-items: end; gap: .6rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.tax-row > input[type="radio"] { margin-bottom: .9rem; }
.tax-row label { margin: 0; }
.tax-group-note { grid-column: 2 / -1; margin: 0; }

/* Automations */
.auto-group { margin: 1rem 0 .5rem; }
.auto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: .75rem; }
.auto-grid .card { margin: 0; }
.auto-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
.auto-switch { margin: 0; flex: none; }
.auto-days { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.auto-days input { width: 80px; }

.measure-photo { display: block; width: 100%; max-height: 320px; object-fit: contain; background: #000; border-radius: 8px; }

/* The iPhone's loading screen, the glowing cube on black, stays until Proliox has drawn itself.
   Inside the iPhone app the phone already showed the cube, so there it is only the plain dark. */
html:has(.boot-cover) { background: #0b0b0d; }
.boot-cover { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6rem; background: #0b0b0d; transition: opacity .35s ease; animation: boot-give-up 0s linear 15s forwards; }
.boot-cover.leaving { opacity: 0; }
.boot-cover img { width: 150px; height: 150px; animation: boot-breathe 2.4s ease-in-out infinite alternate; }
.boot-cover span { position: relative; width: 140px; height: 3px; overflow: hidden; background: rgba(255, 176, 32, .18); border-radius: 3px; }
.boot-cover span::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 40%; background: #ffb020; border-radius: 3px; box-shadow: 0 0 10px #ffb020; animation: boot-run 1.3s ease-in-out infinite alternate; }
:root.in-iphone-app .boot-cover > * { display: none; }
:root:not(.layout-phone) .boot-cover { display: none; }
@keyframes boot-breathe { to { transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .boot-cover img { animation: none; } .boot-cover span::after { animation-duration: 4s; } }

@keyframes boot-run { to { transform: translateX(150%); } }
@keyframes boot-give-up { to { visibility: hidden; } }
.measure-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin-bottom: .5rem; }

.legal-note { margin: 1rem 0 .25rem; color: var(--ink-soft); font-size: .75rem; text-align: center; }

/* Appearance */
.look-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; }
.look-option { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: .65rem .4rem; min-height: 0; color: var(--ink); font-size: .85rem; font-weight: 600; background: var(--surface); border: 2px solid var(--line); border-radius: 8px; }
.look-option.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--accent-soft); }
.look-option img { display: block; width: 64px; height: 64px; }
.swatch { display: flex; align-items: flex-end; gap: 4px; width: 100%; height: 56px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; }
.swatch i { flex: 1; height: 16px; border-radius: 3px; }
.swatch i:last-child { height: 30px; }
.t-blanco { background: #ffffff; } .t-blanco i { background: #ff8a00; }
.t-noche { background: #060a0f; } .t-noche i { background: #ffb020; }
.t-oceano { background: #eef4fa; } .t-oceano i { background: #0b6bcb; }
.t-medianoche { background: #071226; } .t-medianoche i { background: #22b8f0; }
.t-terracota { background: #fbf6ef; } .t-terracota i { background: #bf5128; }
.t-grafito { background: #17181b; } .t-grafito i { background: #f0503f; }
.t-violeta { background: #120a24; } .t-violeta i { background: #c04dff; }

/* Today */
.today-head { margin-bottom: 1rem; }
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.figure { display: flex; flex-direction: column; gap: .1rem; padding: .8rem 1rem; color: inherit; text-decoration: none; border-radius: var(--radius); }
.figure:hover { background: var(--hover); }
.figure-label { color: var(--ink-soft); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.figure b { color: var(--accent); font-size: 1.45rem; font-weight: 600; line-height: 1.2; }
.attention { display: flex; flex-direction: column; }
.attention-row { display: flex; align-items: center; gap: .7rem; padding: .7rem .4rem; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.attention-row:last-child { border-bottom: 0; }
.attention-row:hover { background: var(--hover); }
.attention-row .dot { flex: none; }
.attention-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.attention-action { flex: none; color: var(--accent); font-size: .84rem; font-weight: 600; white-space: nowrap; }

/* Dragging a visit on the calendar */
.cal-main [data-move-visit] { cursor: grab; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.drag-source { opacity: .35; }
/* While a visit is held on a phone, big days wait at the bottom to drop it on. */
.drag-hold { transform: scale(.98); transition: transform .25s; }
.drop-tray { position: fixed; left: 0; right: 0; bottom: 0; z-index: 999; padding: .8rem .6rem calc(.8rem + env(safe-area-inset-bottom)); color: var(--ink); background: var(--surface); border-top: 2px solid var(--accent); border-radius: 18px 18px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .35); animation: tray-up .18s ease-out; }
@keyframes tray-up { from { transform: translateY(100%); } }.tray-title { margin-bottom: .5rem; font-weight: 700; text-align: center; }
.tray-weeks { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .5rem; }
.tray-step { padding: .7rem 0; font-size: .85rem; font-weight: 600; text-align: center; color: var(--ink-soft); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.tray-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .3rem; }
.tray-day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; min-height: 84px; color: var(--ink-soft); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.tray-day b { color: var(--ink); font-size: 1.25rem; }
.tray-day small { font-size: .68rem; }
.tray-day.is-today { border-color: var(--accent); }
.tray-day.is-current { opacity: .55; }
.drop-tray .drop-over { color: var(--primary-ink); background: var(--primary); border-color: var(--primary); outline: 0; transform: scale(1.06); }
.drop-tray .drop-over b { color: var(--primary-ink); }
@media (prefers-reduced-motion: reduce) { .drop-tray { animation: none; } .drag-hold { transition: none; } }
/* Without signal: a band on top says the screen is a saved copy. */
/* The free trial's days left, at the top, and the plans screen */
.trial-bar { position: sticky; top: 0; z-index: 59; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4rem 1rem; padding: .45rem 1rem; padding-top: max(.45rem, env(safe-area-inset-top)); color: var(--ink); font-size: .9rem; font-weight: 700; background: var(--accent-soft); border-bottom: 1px solid var(--border); }
.trial-bar button { min-height: 32px; padding: .25rem .9rem; font-size: .85rem; }
.trial-chip { display: flex; align-items: center; gap: .6rem; margin: 0 auto; padding: .3rem .35rem .3rem .9rem; color: var(--bar-ink); font-size: .85rem; font-weight: 700; white-space: nowrap; background: var(--accent-soft); border: 1px solid var(--border); border-radius: 999px; }
.trial-chip button { min-height: 30px; padding: .2rem .85rem; font-size: .82rem; border-radius: 999px; }
.plans-page { max-width: 1040px; margin: 0 auto; padding: max(2rem, env(safe-area-inset-top)) 1rem 2.5rem; text-align: center; }
.plans-page .brand { justify-content: center; margin-bottom: 1.2rem; }
.plans-page h1 { margin: 0 0 .5rem; }
.plans-page > .muted { max-width: 40rem; margin: 0 auto 1.2rem; }
.plans-current { font-weight: 700; color: var(--accent); }
.plans-period { display: inline-flex; gap: .3rem; margin: .4rem 0 1.4rem; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; }
.plans-period button { min-height: 38px; padding: .35rem 1.1rem; color: var(--ink-soft); background: none; border: 0; border-radius: 999px; }
.plans-period button[aria-pressed="true"] { color: var(--primary-ink); background: var(--primary); }
.plan-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.2rem; text-align: left; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: .45rem; padding: 1.4rem; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); }
.plan-card h3 { margin: 0; }
.plan-card p { margin: 0; }
.plan-card button { margin-top: auto; }
.plan-card-best { border: 2px solid var(--primary); box-shadow: var(--lift); }
.plan-card-badge { position: absolute; top: -.8rem; left: 50%; padding: .15rem .7rem; color: var(--primary-ink); font-size: .78rem; font-weight: 800; white-space: nowrap; background: var(--primary); border-radius: 999px; transform: translateX(-50%); }
.plan-card-price b { font-size: 2.1rem; color: var(--accent); }
.plans-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin: 1rem 0; }
:root.layout-phone .plan-cards { grid-template-columns: minmax(0, 1fr); }
.offline-bar { position: sticky; top: 0; z-index: 60; padding: .55rem 1rem calc(.55rem); padding-top: max(.55rem, env(safe-area-inset-top)); color: #3b2300; font-size: .9rem; font-weight: 700; text-align: center; background: #ffd27a; }
/* A job's profit: what it brought in, less expenses and labor. */
.profit-rows { display: grid; gap: .1rem; }
.profit-rows > div { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.profit-rows span { color: var(--ink-soft); }
.profit-total { border-bottom: 0 !important; font-size: 1.1rem; }
.profit-total span, .profit-total b { color: var(--ok); font-weight: 800; }
.profit-total.loss span, .profit-total.loss b { color: var(--bad); }
.profit-expenses { margin: .5rem 0; }
.profit-expenses summary { cursor: pointer; color: var(--accent); font-weight: 600; }
/* A link to share, like the public request form, with copy and open buttons. */
.share-link { display: grid; gap: .5rem; margin: .4rem 0 .9rem; padding: .8rem .9rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.share-link code { padding: .45rem .6rem; overflow-wrap: anywhere; font-size: .85rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
/* Client search: a text box in place of the long list, with the matching names under it. */
.client-search { position: relative; margin-top: .25rem; }
.pick-source { display: none !important; }
.pick-input { display: block; width: 100%; font-weight: 400; }
.pick-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40; max-height: 260px; overflow-y: auto; padding: .3rem; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.pick-item { padding: .55rem .65rem; border-radius: 8px; font-weight: 500; cursor: pointer; }
.pick-item:hover, .pick-item.on { background: var(--accent-soft); color: var(--accent); }
.pick-none { padding: .55rem .65rem; color: var(--ink-soft); font-size: .9rem; }
/* Holding a visit to drag it must not select its text or open the phone's own menu. */
[data-move-visit] { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.drag-ghost { position: fixed; z-index: 1000; margin: 0; overflow: hidden; pointer-events: none; cursor: grabbing; opacity: .92; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.drop-over { outline: 2px solid var(--accent); outline-offset: -2px; background-color: var(--surface-2); }

/* The client's approval page: a business document, so it stays light and plain. */
body.client-view { --bg: #f3f5fb; --surface: #fff; --surface-2: #f2f4f9; --hover: #e9edf8; --border: #e0e4f0; --input-border: #c6cce0; --line: #e6e9f3; --ink: #1c2147; --ink-soft: #565d83; --accent: #1e4fb8; --accent-dark: #1e3a8a; --accent-soft: #e6e9fc; --primary: #1e4fb8; --primary-hover: #163c8f; --primary-ink: #fff; --ok: #0b6b57; --ok-soft: #d8f3ec; --warn: #7a4d00; --warn-soft: #fdeecb; --bad: #a11a3e; --bad-soft: #fde4ea; --info: #1e4fb8; --info-soft: #e6e9fc; --muted-soft: #e7e9f2; --radius: 12px; --lift: 0 1px 2px rgba(28, 33, 71, .06), 0 4px 14px rgba(28, 33, 71, .05); color-scheme: light; color: var(--ink); background: var(--bg); font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
body.client-view::before { display: none; }
body.client-view .card { background: var(--surface); border-color: var(--border); box-shadow: var(--lift); -webkit-backdrop-filter: none; backdrop-filter: none; }
body.client-view h1, body.client-view h2 { letter-spacing: 0; text-transform: none; }

/* The client's approval page */
.approval-page { max-width: 760px; margin: 0 auto; padding: 1.25rem 1rem calc(2rem + env(safe-area-inset-bottom)); }
.approval-page .form-error { margin-bottom: .75rem; }
.approval-page .check { margin: .75rem 0; }
.quote-number { font-size: 1.05rem; font-weight: 500; color: var(--ink-soft); }
.badge.status-pill { display: inline-flex; align-items: center; gap: .4rem; border-radius: 999px; padding: .3rem .8rem; font-size: .9rem; font-weight: 500; }
.badge.status-pill::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.quote-client { margin: .5rem 0 .75rem; line-height: 1.6; }
.quote-client strong { font-size: 1.05rem; }
.quote-fact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; padding: .2rem 0; }
.quote-top { padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }

/* Requests empty state */
.create-card { display: inline-flex; flex-direction: column; align-items: center; gap: 1rem; padding: 1.25rem 2.5rem; background: var(--surface-2); }
.plus-circle { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; font-size: 1.5rem; color: var(--spark-ink); background: var(--spark); border-radius: 12px; }

/* Small windows */
dialog:has(.narrow) { width: min(480px, calc(100vw - 24px)); }
dialog:has(.import-window) { width: min(1240px, calc(100vw - 24px)); }
.mini-head { margin: .75rem 0 .25rem; font-size: .9rem; font-weight: 700; }
.detail-columns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; padding: .5rem 0; border-block: 1px solid var(--line); }
.tabs.in-modal { position: static; margin: 0 1.1rem; }

/* Client import */
.import-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.drop-zone.big { padding: 3rem 1rem; }
.import-table td { padding: .25rem; }
.import-table td:first-child { min-width: 170px; }
.import-table input { width: 130px; min-height: 34px; padding: .25rem .4rem; }
.import-bad td { background: var(--bad-soft); }

/* Schedule settings */
.pref-row { padding: .75rem 0; border-top: 1px solid var(--line); margin: 0; }
.pref-options { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.color-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-weight: 500; }
.color-row input { width: 56px; height: 36px; min-height: 0; padding: 2px; }

/* Schedule side panel and day timeline */
.cal-layout.with-panel { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: .75rem; align-items: start; }
.cal-main { min-width: 0; }
.cal-panel { margin: 0; max-height: calc(100vh - 150px); overflow-y: auto; }
.cal-panel .pill { margin-bottom: .75rem; }
.event.unscheduled { background: var(--ok-soft); color: var(--ink); border-left-color: var(--ok); margin-bottom: .4rem; }
.event.reminder { background: var(--bad-soft); color: var(--bad); border-left-color: var(--bad); }
.completed-grayed .event.completada { background: var(--muted-soft); color: var(--ink-soft); border-left-color: var(--ink-soft); }
.completed-grayed .event.completada::before { content: "✓ "; }
.completed-strike .event.completada { text-decoration: line-through; }
.off-hours { position: absolute; pointer-events: none; background: var(--surface-2); }
.hgrid-col .off-hours { left: 0; right: 0; }
.hline-track .off-hours { top: 0; bottom: 0; }
.hline { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--lift); }
.hline-inner { min-width: max-content; }
.hline-row { display: grid; grid-template-columns: 170px 110px 2304px; border-bottom: 1px solid var(--line); }
.hline-row:last-child { border-bottom: 0; }
.hline-who, .hline-any { position: sticky; z-index: 3; padding: .5rem; background: var(--surface); border-right: 1px solid var(--line); min-width: 0; }
.hline-who { left: 0; }
.hline-any { left: 170px; }
.hline-track { position: relative; min-height: 52px; cursor: copy; background-image: repeating-linear-gradient(to right, var(--line) 0, var(--line) 1px, transparent 1px, transparent 96px); }
.hline-head .hline-track { min-height: 34px; cursor: default; }
.hline-hour { position: absolute; top: .5rem; padding-left: .3rem; }
.hline-track .event { position: absolute; height: 38px; margin: 0; overflow: hidden; }
.cal-date .today-pill { padding: .05rem .4rem; }

/* Schedule by the hour */
.cal-heading { margin-right: .25rem; }
.cal-pick { width: auto; }
.hgrid { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--lift); }
.hgrid-inner { min-width: 680px; }
.hgrid.n1 .hgrid-inner { min-width: 0; }
.hgrid-row { display: grid; grid-template-columns: 64px repeat(7, minmax(0, 1fr)); }
.hgrid.n1 .hgrid-row { grid-template-columns: 64px minmax(0, 1fr); }
.hgrid.n5 .hgrid-row { grid-template-columns: 64px repeat(5, minmax(0, 1fr)); }
.hgrid-head { border-bottom: 1px solid var(--line); }
.hgrid-day { padding: .5rem .25rem; text-align: center; font-weight: 700; }
.today-pill { padding: .15rem .55rem; color: var(--spark-ink); background: var(--spark); border-radius: 8px; }
.hgrid-anytime { min-height: 44px; border-bottom: 1px solid var(--ink-soft); }
.hgrid-anytime > div { min-width: 0; padding: .25rem; border-left: 1px solid var(--line); }
.hgrid-anytime > div:first-child { border-left: 0; text-align: right; }
.hgrid-scroll { height: calc(100vh - 300px); min-height: 320px; overflow-y: auto; }
.hgrid-hour { height: 48px; padding-right: .4rem; text-align: right; }
.hgrid-col { position: relative; min-width: 0; height: 1152px; cursor: copy; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, var(--line) 0, var(--line) 1px, transparent 1px, transparent 48px); }
.hgrid-col .event { position: absolute; margin: 0; overflow: hidden; }

/* Pipeline flow on the home page */

.day-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: .5rem; margin-bottom: .75rem; }
.day-totals span { display: block; font-size: .8rem; color: var(--ink-soft); }
.day-totals b { font-size: 1.15rem; font-weight: 600; }

/* Filter bar */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.filters select { width: auto; }
.pill { display: inline-flex; flex-direction: column; gap: 0; margin: 0; padding: .3rem .4rem .15rem .65rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: .7rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }
.pill.on { border-color: var(--accent); }
.pill > select { display: block; width: auto; margin: 0; padding: 0 .2rem 0 0; min-height: 0; border: 0; background: transparent; color: var(--ink); font-size: .9rem; font-weight: 500; letter-spacing: 0; text-transform: none; }
.filters .grow { flex: 1 1 220px; max-width: 340px; margin-left: auto; }
.filters input { width: 100%; }
.count { font-weight: 500; color: var(--ink-soft); font-size: 1rem; }
.th-sort { background: none; border: 0; padding: 0; min-height: 0; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
.sort-hint { color: var(--ink-soft); }
.th-sort:hover { color: var(--accent); background: none; }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; border-radius: 6px; padding: 0 .4rem; background: var(--accent-soft); color: var(--accent-dark); margin: 0 .2rem .15rem 0; }

button, .btn {
  font: inherit; font-weight: 500; border-radius: 9px; border: 1px solid var(--input-border); background: var(--surface); color: var(--ink);
  padding: .5rem .85rem; cursor: pointer; text-decoration: none; display: inline-block; line-height: 1.3; min-height: 40px;
}
button:hover, .btn:hover { background: var(--hover); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.spark { font-weight: 600; color: var(--spark-ink); background: var(--spark); border-color: var(--spark); }
.spark:hover { background: var(--spark-hover); border-color: var(--spark-hover); }
.danger { color: var(--bad); }
.link { background: none; border: 0; padding: .25rem; min-height: 0; font-weight: 500; color: var(--accent); text-decoration: underline; }
.link:hover { background: none; }
.link.danger { color: var(--bad); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
.card:has(> .table-wrap:only-child) { padding: 0; overflow: hidden; }
th { text-align: left; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); padding: .6rem .75rem; background: var(--surface-2); white-space: nowrap; }
td { padding: .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
th.right { text-align: right; }
td a.name { font-weight: 600; color: var(--ink); text-decoration: none; }
td a.name:hover { color: var(--accent); text-decoration: underline; }

.badge { display: inline-block; font-size: .76rem; font-weight: 600; border-radius: 6px; padding: .12rem .5rem; white-space: nowrap; background: var(--muted-soft); color: var(--ink-soft); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info, .badge.accent { background: var(--info-soft); color: var(--accent-dark); }

.empty { text-align: center; color: var(--ink-soft); padding: 1.6rem .5rem; }
.empty-hero { text-align: center; padding: 2.5rem 1rem; }
.empty-hero h2 { font-size: 1.4rem; margin-bottom: .4rem; }
.empty-hero p { max-width: 460px; margin: 0 auto 1rem; color: var(--ink-soft); }
.list-row { display: flex; gap: .75rem; justify-content: space-between; align-items: flex-start; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
/* A long link in a row (a text in the Contact log) wraps instead of pushing the remove button off the screen. */
.list-row > div { min-width: 0; }
.totals { margin: .75rem 0 0 auto; max-width: 300px; }
/* Practice mode: a striped band on top, a tag on the profile, and the switch in the menu. */
.practice-tag { display: inline-block; margin-left: .4rem; padding: .1rem .45rem; color: #1a1100; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; vertical-align: middle; background: #ffc21a; border-radius: 999px; }
.account { display: flex; align-items: center; }
.more-hero .practice-tag { margin: .5rem 0 0; }
.practice-switch { display: flex; align-items: center; gap: .7rem; width: 100%; }
.practice-switch-text { flex: 1; text-align: left; }
.practice-state { min-width: 44px; padding: .15rem .55rem; color: var(--ink-soft); font-size: .75rem; text-align: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.practice-state.on { color: #1a1100; background: #ffc21a; border-color: #e0a800; }
.missions { display: grid; gap: .5rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.missions li { display: flex; gap: .75rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 12px; }
.missions li.done { background: var(--ok-soft); border-color: transparent; }
.mission-num { display: grid; place-items: center; flex: none; width: 30px; height: 30px; font-weight: 800; color: var(--accent); background: var(--accent-soft); border-radius: 50%; }
.missions li.done .mission-num { color: var(--ok); background: var(--surface); }
.mission-num svg { width: 18px; height: 18px; }
.mission-done { margin: 1rem 0 0; padding: .8rem 1rem; font-size: 1.1rem; font-weight: 800; text-align: center; color: var(--ok); background: var(--ok-soft); border-radius: 12px; }
/* Quote options (Good / Better / Best): each line's option shows only while the quote offers them. */
.line-option, .offer-help { display: none; }
.with-options .line-option, .with-options .offer-help { display: block; }
.line-option select { max-width: 220px; }
.offer-options { margin-bottom: .4rem; }
.items .option-head td { padding-top: 1rem; background: var(--surface-2); }
.items .option-head td { display: table-cell; }
.items .option-head span, .items .option-head strong.nowrap { display: inline-block; }
.items .option-head td > strong.nowrap { float: right; }
.option-pick { display: grid; gap: .6rem; margin: 0 0 1rem; padding: 0; border: 0; }
.option-pick legend { margin-bottom: .5rem; font-weight: 700; }
.option-card { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; }
.option-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.option-card input[type=radio] { flex: none; width: 1.2rem; height: 1.2rem; margin: 0; accent-color: var(--accent); }
.option-card span { display: flex; align-items: center; font-size: 1rem; flex: 1; justify-content: space-between; gap: 1rem; }
.option-card b { font-size: 1.1rem; }
.totals div { display: flex; justify-content: space-between; padding: .15rem 0; }
.totals .grand { font-weight: 700; border-top: 1px solid var(--line); margin-top: .3rem; padding-top: .4rem; }

/* Pipeline board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: .75rem; overflow-x: auto; padding-bottom: .5rem; }
.column { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .7rem; min-height: 200px; }
.column h2 { font-size: .95rem; display: flex; justify-content: space-between; margin-bottom: .1rem; }
.deal { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .55rem .7rem; margin-top: .5rem; color: inherit; text-decoration: none; }
.deal:hover { background: var(--hover); }
.deal b { display: block; font-size: .92rem; }

/* Chart */
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--accent); }
.chart .hit:hover + .bar, .chart .bar:hover { fill: var(--accent-dark); }
.chart .hit { fill: transparent; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--ink-soft); font-size: 12px; }
.chart text.val { fill: var(--ink); font-weight: 600; }

/* Forms */
dialog { border: 0; border-radius: 18px; padding: 0; width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); color: inherit; background: var(--surface); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(15, 23, 42, .4); }
.modal-form { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); }
.modal-title { padding: .9rem 1.25rem; margin-bottom: .5rem; font-size: 1.05rem; font-weight: 600; background: var(--surface-2); }
.modal-body { padding: .25rem 1.25rem 1rem; overflow-y: auto; }
.modal-foot { display: flex; gap: .5rem; justify-content: flex-end; padding: .75rem 1.1rem; border-top: 1px solid var(--line); }
.create-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .5rem; padding-bottom: .5rem; }
label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .75rem; }
label > input, label > select, label > textarea { display: block; width: 100%; margin-top: .25rem; }
input, select, textarea {
  font: inherit; font-weight: 400; padding: .5rem .7rem; border: 1px solid var(--input-border); border-radius: 10px; background: var(--surface); color: inherit; min-height: 40px; max-width: 100%;
}
textarea { min-height: 80px; resize: vertical; }
.fields-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .75rem; }
.property-block { border: 1px solid var(--line); border-radius: 12px; padding: .75rem; margin-bottom: .6rem; }
.property-block details { margin-bottom: .25rem; }
.property-block summary { cursor: pointer; font-size: .875rem; font-weight: 600; margin-bottom: .5rem; }
.form-section { margin: 1rem 0 .5rem; font-size: 1.05rem; border-top: 1px solid var(--line); padding-top: .9rem; }
.account { position: relative; }
/* The account button: a round badge with the business logo (or initials), wearing a thin ring in the
   theme's color like the logo on the phone's More page. */
.avatar, .account-badge { display: grid; place-items: center; flex: none; overflow: hidden; border-radius: 50%; font-weight: 700; letter-spacing: .02em; color: var(--accent); background: var(--accent-soft) !important; }
.avatar { width: 40px; height: 40px; min-height: 0; padding: 0; font-size: .82rem; border: 0; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); transition: box-shadow .2s, transform .2s; }
.avatar:hover { transform: translateY(-1px); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent), 0 6px 16px rgba(0, 0, 0, .18); }
.avatar.has-logo, .account-badge.has-logo { padding: 3px; background: #fff !important; }
.avatar img, .account-badge img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.more-wrap { position: relative; }
.more-button { color: var(--accent); }
.account-menu { position: absolute; top: calc(100% + 8px); right: 0; width: 260px; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: .4rem; z-index: 30; }
.account-who { padding: .5rem .6rem .7rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; overflow-wrap: anywhere; }
.account-menu a, .menu-item { display: block; width: 100%; text-align: left; padding: .5rem .6rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; background: none; border: 0; min-height: 0; }
.account-menu a:hover, .menu-item:hover { background: var(--accent-soft) !important; }
/* The account menu: who is signed in on top, then the pages with their icons, and Log out on its own. */
.account-panel { top: calc(100% + 12px); width: 300px; padding: 0; overflow: hidden; border-radius: 16px; animation: panel-in .14s ease-out; }
/* Only a small slide, never a fade, so the menu is readable even if animations are held back. */
@keyframes panel-in { from { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .account-panel { animation: none; } }
.account-panel .account-who { display: flex; align-items: center; gap: .8rem; margin: 0; padding: 1rem; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.account-badge { width: 48px; height: 48px; font-size: 1rem; box-shadow: 0 0 0 2px var(--accent); }
.account-names { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.account-names strong { font-size: 1rem; }
.account-names span, .account-names em { overflow: hidden; color: var(--ink-soft); font-size: .84rem; font-style: normal; white-space: nowrap; text-overflow: ellipsis; }
.account-names em { margin-top: .2rem; color: var(--accent); font-weight: 600; }
.account-group { display: grid; gap: 2px; padding: .4rem; }
.account-group + .account-group { border-top: 1px solid var(--line); }
.account-panel a, .account-panel .menu-item { display: flex; align-items: center; gap: .7rem; padding: .5rem .55rem; font-weight: 600; border-radius: 10px; }
.account-icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; color: var(--ink-soft); background: var(--surface-2); border-radius: 9px; }
.account-icon svg { width: 18px; height: 18px; }
.account-panel a:hover .account-icon, .account-panel a.on .account-icon { color: var(--accent); background: var(--surface); }
.account-panel a.on { color: var(--accent); background: var(--accent-soft); }
.account-panel .account-out { color: var(--bad); }
.account-panel .account-out .account-icon { color: var(--bad); background: var(--bad-soft); }
.account-panel .account-out:hover { background: var(--bad-soft) !important; }
.settings-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1rem; align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { padding: .45rem .6rem; border-radius: 8px; color: var(--ink); text-decoration: none; }
.settings-nav a:hover { background: var(--hover); }
.settings-nav a.on { background: var(--accent-soft); font-weight: 600; color: var(--accent-dark); }
.logo-preview { display: block; max-width: 160px; max-height: 120px; border-radius: 10px; margin-bottom: .6rem; background: #fff; }
.doc-logo { display: block; max-width: 140px; max-height: 90px; margin-bottom: .4rem; }
.password-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; align-items: end; }
.show-password { width: auto !important; margin: 0 0 .75rem !important; }
#forgot-help { margin: .4rem 0 .75rem; }
.event.item-task { background: var(--task-bg); color: var(--task-ink); border-left-color: var(--task-edge); }
.event.item-event { background: var(--event-bg); color: var(--event-ink); border-left-color: var(--event-edge); }
.cal-week.no-weekends, .cal-month.no-weekends { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.name-link { padding: 0; font-weight: 700; color: var(--ink); text-decoration: none; text-align: left; }
.name-link:hover { color: var(--accent); text-decoration: underline; }
.fields-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 .75rem; margin-top: .75rem; }
.form-details { margin-bottom: .75rem; }
.form-details summary { cursor: pointer; font-size: .875rem; font-weight: 600; margin-bottom: .5rem; }
textarea.tall { min-height: 180px; }
.line-text { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: .4rem; align-items: end; }
.doc-terms { margin-top: 1.25rem; border-top: 1px solid var(--line); padding-top: .9rem; }
.fields-name { display: grid; grid-template-columns: 120px repeat(2, minmax(0, 1fr)); gap: 0 .75rem; }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 400; margin-bottom: .4rem; }
.check input { min-height: 0; width: 18px; height: 18px; flex: none; }
.form-error { color: var(--bad); background: var(--bad-soft); border-radius: 8px; padding: .5rem .7rem; margin-bottom: .75rem; font-size: .9rem; }
fieldset { border: 0; padding: 0; margin: 0 0 .75rem; }
legend { font-size: .875rem; font-weight: 600; padding: 0; margin-bottom: .35rem; }

.line-item { border: 1px solid var(--line); border-radius: 12px; padding: .6rem; margin-bottom: .6rem; }
.line-item label { margin-bottom: .4rem; }
.line-item textarea { min-height: 60px; }
.line-row { display: grid; grid-template-columns: minmax(0, 1fr) 76px 100px 100px 40px; gap: .4rem; align-items: end; }
.line-row input { width: 100%; }
.line-row input[readonly] { background: transparent; border-color: transparent; padding-left: .2rem; font-weight: 600; }
.line-remove { padding: 0; width: 40px; margin-bottom: .4rem; }
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; margin-bottom: .5rem; }
.image-tile { position: relative; }
.image-tile img, .image-thumb img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.image-tile > button:not(.image-thumb) { position: absolute; top: 4px; right: 4px; min-height: 0; width: 26px; height: 26px; padding: 0; border-radius: 50%; background: rgba(6, 13, 32, .85); color: #fff; }
.image-thumb, .image-thumb:hover { display: block; width: 100%; padding: 0; border: 0; background: none; min-height: 0; }

/* Schedule */
.cal-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .9rem; }
.cal-title { font-weight: 700; flex: 1 1 180px; }
.segmented { display: inline-flex; }
.segmented button { border-radius: 0; margin-left: -1px; }
.segmented button:first-child { border-radius: 10px 0 0 10px; margin-left: 0; }
.segmented button:last-child { border-radius: 0 10px 10px 0; }
.segmented button.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-day { background: var(--surface); border: 0; box-shadow: var(--lift); border-radius: 10px; padding: .4rem; min-height: 120px; min-width: 0; }
.cal-month .cal-day { min-height: 92px; }
.cal-day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-day.other { background: var(--surface-2); }
.cal-date { font-size: .8rem; font-weight: 700; color: var(--ink-soft); margin-bottom: .3rem; }
.cal-dow { font-size: .78rem; color: var(--ink-soft); font-weight: 600; text-align: center; }
.event { display: block; width: 100%; text-align: left; font-size: .78rem; font-weight: 500; line-height: 1.25; background: var(--info-soft); color: var(--accent-dark); border: 0; border-left: 3px solid var(--info); border-radius: 4px; padding: .25rem .35rem; margin-bottom: 3px; min-height: 0; overflow-wrap: anywhere; text-decoration: none; }
.event.en_curso { background: var(--warn-soft); color: var(--warn); border-left-color: #c98a00; }
.event.completada { background: var(--ok-soft); color: var(--ok); border-left-color: var(--ok); }
.event.cancelada { background: var(--muted-soft); color: var(--ink-soft); border-left-color: var(--ink-soft); text-decoration: line-through; }
.event.evaluacion { background: var(--assess-bg); color: var(--assess-ink); border-left-color: var(--assess-edge); }

/* Team agenda */
.visit-card { border-radius: var(--radius); padding: 1rem; margin-bottom: .9rem; }
.visit-card h3 { margin: .15rem 0 .35rem; font-size: 1.05rem; }
.visit-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.day-label { font-weight: 700; margin: 1rem 0 .5rem; }
.clock { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }

/* Sign in */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: var(--bar); }
.auth-card { width: min(420px, 100%); border-radius: var(--radius); padding: 1.6rem; }
.auth-card .brand { padding: 0 0 .4rem; font-size: 1.5rem; }
.auth-card > button { width: 100%; margin-top: .25rem; }
/* Clerk draws its own sign-in box, so the card around it only adds the logo. */
.auth-clerk { width: min(440px, 100%); padding: 1rem; display: grid; justify-items: stretch; gap: .5rem; box-sizing: border-box; }
.auth-clerk .brand { justify-self: center; }
/* Clerk's box is 400px wide by itself; inside the card it fits the screen and stays centered. */
.auth-clerk #clerk-sign-in, .auth-clerk .cl-rootBox, .auth-clerk .cl-cardBox { width: 100%; max-width: 100%; box-sizing: border-box; }
.auth-clerk .cl-card { width: auto; max-width: 100%; }
/* Sign in and sign up wear Proliox's own look whatever theme the device picked: near-black, a faint orange grid,
   an orange glow, the message and the app on three iPhones on one side, and Clerk's box glowing on the other. */
.auth-brand { position: relative; grid-template-columns: minmax(0, 560px) minmax(0, 440px); gap: clamp(2rem, 6vw, 6rem); align-items: center; justify-content: center; place-items: center normal; padding: 3rem clamp(1rem, 5vw, 5rem); overflow: hidden; color: #f6f6f8;
  background-color: #0b0b0d;
  background-image: radial-gradient(900px 520px at 85% 0%, rgba(255, 138, 0, .26), transparent 70%), radial-gradient(700px 480px at 0% 100%, rgba(255, 138, 0, .13), transparent 70%),
    linear-gradient(rgba(255, 138, 0, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 138, 0, .055) 1px, transparent 1px);
  background-size: auto, auto, 44px 44px, 44px 44px; }
.auth-pitch { min-width: 0; }
.auth-logo { display: inline-flex; align-items: center; gap: .6rem; color: #fff; font-size: 1.4rem; font-weight: 800; text-decoration: none; }
.auth-logo img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 0 18px rgba(255, 138, 0, .5); }
.auth-pitch h1 { margin: 1.6rem 0 .8rem; color: #fff; font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; }
.auth-pitch h1 span { color: #ffe000; text-shadow: 0 0 22px rgba(255, 224, 0, .55); }
.auth-pitch > p { margin: 0; color: #c3c3cc; font-size: 1.15rem; }
.auth-checks { display: grid; gap: .55rem; margin: 1.4rem 0 0; padding: 0; color: #e6e6ea; font-weight: 600; list-style: none; }
.auth-checks li::before { margin-right: .55rem; color: #ffe000; font-weight: 800; content: "✓"; }
.auth-phones { display: flex; gap: 1rem; margin-top: 2.4rem; }
.auth-phones img { width: 30%; max-width: 150px; height: auto; border: 1.5px solid rgba(255, 138, 0, .5); border-radius: 22px; box-shadow: 0 0 22px rgba(255, 138, 0, .25), 0 14px 30px rgba(0, 0, 0, .5); }
.auth-phones img:nth-child(2) { transform: translateY(-1.2rem); }
.auth-brand .auth-clerk { width: min(440px, 100%); padding: 0; background: none; border: 0; box-shadow: none; }
.auth-brand .cl-card { box-shadow: 0 0 0 1.5px rgba(255, 138, 0, .45), 0 0 40px rgba(255, 138, 0, .25), 0 20px 50px rgba(0, 0, 0, .5) !important; }
.auth-brand .legal-note { color: #a9a9b3; }
.auth-brand .legal-note a { color: #ffeb4d; }
@media (max-width: 900px) {
  .auth-brand { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; align-content: start; padding: max(2rem, env(safe-area-inset-top)) 1rem 2rem; }
  .auth-pitch { text-align: center; }
  .auth-pitch h1 { margin: 1rem 0 .5rem; font-size: 1.9rem; }
  .auth-pitch > p { font-size: 1rem; }
  .auth-checks, .auth-phones { display: none; }
  .auth-brand .auth-clerk { justify-self: center; }
}

#toast { position: fixed; inset: auto auto 84px 50%; margin: 0; border: 0; transform: translateX(-50%); background: var(--primary-hover); color: var(--primary-ink); padding: .6rem 1rem; border-radius: 10px; z-index: 50; max-width: calc(100vw - 32px); box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
#toast.error { color: #fff; background: #b4233c; }

/* Printable document: always dark ink on white paper */
.doc { --bg: #f3f5fb; --surface: #fff; --surface-2: #f2f4f9; --hover: #e9edf8; --border: #e0e4f0; --input-border: #c6cce0; --line: #e6e9f3; --ink: #1c2147; --ink-soft: #565d83; --accent: #1e4fb8; --accent-dark: #1e3a8a; --accent-soft: #e6e9fc; --primary: #1e4fb8; --primary-hover: #163c8f; --primary-ink: #fff; --ok: #0b6b57; --ok-soft: #d8f3ec; --warn: #7a4d00; --warn-soft: #fdeecb; --bad: #a11a3e; --bad-soft: #fde4ea; --info: #1e4fb8; --info-soft: #e6e9fc; --muted-soft: #e7e9f2; --radius: 12px; --lift: 0 1px 2px rgba(28, 33, 71, .06), 0 4px 14px rgba(28, 33, 71, .05); --ink: #0b1f3f; --ink-soft: #3d5273; --line: rgba(30, 64, 120, .18); color-scheme: light; color: var(--ink); background: #fff; font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; border-radius: var(--radius); padding: 2rem; max-width: 800px; }
.doc-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.doc-kind { font-size: 1.4rem; font-weight: 700; color: var(--accent-dark); }
.doc-to { margin-bottom: 1.25rem; }

/* (max-width: 860px) */
  :where(:root.layout-860) .layout{ padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  /* iPhones zoom into any field with text smaller than 16px */
  :where(:root.layout-860) input, :where(:root.layout-860) select, :where(:root.layout-860) textarea, :where(:root.layout-860) .pill > select{ font-size: 16px; }
  :where(:root.layout-860) .icon-button{ width: 42px; height: 42px; }
  :where(:root.layout-860) .note-head .icon-button{ width: 42px; height: 42px; }
  :where(:root.layout-860) .nav{ position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 20; padding: 0 .3rem env(safe-area-inset-bottom); border-top: 1px solid var(--border); border-bottom: 0; }
  :where(:root.layout-860) .nav a{ padding: .7rem .6rem; font-size: .875rem; border-bottom: 0; border-top: 3px solid transparent; }
  :where(:root.layout-860) .nav a.on{ border-top-color: var(--spark); }
  :where(:root.layout-860) .main{ padding: 1rem; }
  :where(:root.layout-860) .topbar{ flex-wrap: wrap; padding: calc(.5rem + env(safe-area-inset-top)) 1rem .5rem; }
  :where(:root.layout-860) .topbar .biz{ max-width: 45%; flex: 1; }
  :where(:root.layout-860) .searchbox{ order: 5; flex: 1 0 100%; max-width: none; }
  :where(:root.layout-860) .client-rail{ order: 0; }
  :where(:root.layout-860) .settings-layout{ grid-template-columns: minmax(0, 1fr); }
  :where(:root.layout-860) .client-page, :where(:root.layout-860) .facts, :where(:root.layout-860) .preview-page, :where(:root.layout-860) .cal-layout.with-panel, :where(:root.layout-860) .detail-columns{ grid-template-columns: minmax(0, 1fr); }
  :where(:root.layout-860) .hline-row{ grid-template-columns: 110px 70px 2304px; }
  :where(:root.layout-860) .hline-any{ left: 110px; }
  :where(:root.layout-860) .preview-side{ position: static; }
  :where(:root.layout-860) .hgrid-scroll{ height: 60vh; }
  :where(:root.layout-860) .client-rail{ position: static; max-height: none; }
  :where(:root.layout-860) .tabs{ top: 0; position: static; }
  :where(:root.layout-860) .fact{ grid-template-columns: 110px minmax(0, 1fr); }
  :where(:root.layout-860) .settings-nav{ flex-direction: row; overflow-x: auto; }
  :where(:root.layout-860) .settings-nav a{ white-space: nowrap; }
  :where(:root.layout-860) .cal-week.no-weekends{ grid-template-columns: minmax(0, 1fr); }
  :where(:root.layout-860) .grid-2, :where(:root.layout-860) .fields-2, :where(:root.layout-860) .fields-3, :where(:root.layout-860) .fields-name, :where(:root.layout-860) .grid-side{ grid-template-columns: minmax(0, 1fr); }
  :where(:root.layout-860) .modal-foot{ flex-wrap: wrap; }
  :where(:root.layout-860) .figures{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :where(:root.layout-860) .nav.phone-nav{ display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; gap: 0; padding: 0 .25rem env(safe-area-inset-bottom); overflow: visible; }
  :where(:root.layout-860) .phone-nav a{ display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .45rem 0 .4rem; font-size: .68rem; letter-spacing: .02em; }
  :where(:root.layout-860) .phone-nav svg{ width: 22px; height: 22px; }
  :where(:root.layout-860) .phone-new{ justify-self: center; display: grid; place-items: center; width: 54px; min-height: 0; height: 54px; margin-top: -18px; padding: 0; color: var(--primary-ink); background: var(--primary); border: 0; border-radius: 50%; box-shadow: 0 0 20px rgba(255, 138, 0, .5); }
  :where(:root.layout-860) .phone-new:hover{ background: var(--primary); }
  :where(:root.layout-860) .phone-new svg{ width: 26px; height: 26px; }
  :where(:root.layout-860) .nav{ justify-content: space-around; }
  :where(:root.layout-860) .subnav{ padding-right: .75rem; padding-left: .75rem; }
  :where(:root.layout-860) .attention-row{ display: grid; grid-template-columns: auto minmax(0, 1fr); }
  :where(:root.layout-860) .attention-action{ grid-column: 2; }
  :where(:root.layout-860) .filters .grow{ margin-left: 0; max-width: none; flex-basis: 100%; }
  :where(:root.layout-860) .cal-week{ grid-template-columns: minmax(0, 1fr); }
  :where(:root.layout-860) .cal-week .cal-day{ min-height: 0; }
  :where(:root.layout-860) .cal-month .cal-day{ min-height: 56px; padding: .2rem; }
  :where(:root.layout-860) .cal-month .event{ font-size: 0; height: 7px; padding: 0; border-left-width: 0; margin-bottom: 2px; background: var(--info); }
  :where(:root.layout-860) .cal-month .event.en_curso{ background: #c98a00; }
  :where(:root.layout-860) .cal-month .event.completada{ background: var(--ok); }
  :where(:root.layout-860) .cal-month .event.cancelada{ background: var(--ink-soft); }
  :where(:root.layout-860) .cal-month .event.evaluacion{ background: #0284c7; }
  :where(:root.layout-860) .line-row{ grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr) 40px; }
  :where(:root.layout-860) .line-name{ grid-column: 1 / -1; }
  :where(:root.layout-860) .doc{ padding: 1rem; }
  :where(:root.layout-860) .hide-sm{ display: none; }
  :where(:root.layout-860) #toast{ bottom: 76px; }


/* Themes. The white one is the default above. */
[data-tone="dark"] { color-scheme: dark; --line: rgba(255, 255, 255, .12); --ok: #5ee9c0; --ok-soft: rgba(94, 233, 192, .15); --warn: #ffd76a; --warn-soft: rgba(255, 215, 106, .15); --bad: #ff9db1; --bad-soft: rgba(255, 157, 177, .15); --muted-soft: rgba(255, 255, 255, .1); --glass: rgba(255, 255, 255, .05); --shadow: 0 16px 44px rgba(0, 0, 0, .6); --task-bg: #2e2650; --task-ink: #ddd6fe; --task-edge: #a78bfa; --event-bg: #47203a; --event-ink: #fbcfe8; --event-edge: #f472b6; --assess-bg: #12303f; --assess-ink: #7dd3fc; --assess-edge: #38bdf8; }
[data-theme="noche"] { --bg: #060a0f; --surface: #10161e; --surface-2: #1a212b; --hover: #232b37; --border: rgba(255, 176, 32, .32); --input-border: rgba(255, 176, 32, .32); --ink: #f2f4f7; --ink-soft: #b4bcc8; --accent: #ffb020; --accent-dark: #ffb020; --accent-soft: rgba(255, 176, 32, .16); --primary: #ff8a00; --primary-hover: #ffa033; --primary-ink: #120a00; --spark: #ff8a00; --spark-hover: #ffa033; --spark-ink: #120a00; --bar: #060a0f; --bar-2: #1a212b; --bar-ink: #ffffff; --bar-soft: #b4bcc8; --info: #ffb020; --info-soft: rgba(255, 176, 32, .16); --top-bg: rgba(0, 0, 0, .45); --nav-bg: rgba(6, 10, 15, .72); --subnav-bg: rgba(6, 10, 15, .45); --glow-1: rgba(255, 138, 0, .34); --glow-2: rgba(56, 120, 255, .32); --grid: rgba(255, 176, 32, .07); }
[data-theme="oceano"] { --bg: #ffffff; --surface: #ffffff; --surface-2: #eef4fa; --hover: #e6eff8; --border: rgba(11, 92, 173, .32); --input-border: rgba(11, 92, 173, .32); --ink: #0f2238; --ink-soft: #4f6378; --accent: #0b5cad; --accent-dark: #0b5cad; --accent-soft: rgba(37, 131, 235, .13); --primary: #0b6bcb; --primary-hover: #0a5cae; --primary-ink: #ffffff; --spark: #0b6bcb; --spark-hover: #0a5cae; --spark-ink: #ffffff; --bar: #ffffff; --bar-2: #eef4fa; --bar-ink: #0f2238; --bar-soft: #4f6378; --info: #0b5cad; --info-soft: rgba(37, 131, 235, .13); --top-bg: rgba(255, 255, 255, .85); --nav-bg: rgba(255, 255, 255, .88); --subnav-bg: rgba(255, 255, 255, .62); --glow-1: rgba(56, 150, 255, .16); --glow-2: rgba(0, 200, 200, .1); --grid: rgba(11, 92, 173, .1); }
[data-theme="medianoche"] { --bg: #071226; --surface: #0e1c36; --surface-2: #16274a; --hover: #1e3360; --border: rgba(95, 212, 255, .3); --input-border: rgba(95, 212, 255, .3); --ink: #eef5ff; --ink-soft: #a5b6d0; --accent: #5fd4ff; --accent-dark: #5fd4ff; --accent-soft: rgba(95, 212, 255, .15); --primary: #22b8f0; --primary-hover: #4cc7f5; --primary-ink: #04121f; --spark: #22b8f0; --spark-hover: #4cc7f5; --spark-ink: #04121f; --bar: #071226; --bar-2: #16274a; --bar-ink: #ffffff; --bar-soft: #a5b6d0; --info: #5fd4ff; --info-soft: rgba(95, 212, 255, .15); --top-bg: rgba(3, 9, 22, .6); --nav-bg: rgba(5, 14, 32, .78); --subnav-bg: rgba(5, 14, 32, .5); --glow-1: rgba(34, 184, 240, .28); --glow-2: rgba(120, 80, 255, .25); --grid: rgba(95, 212, 255, .07); }
[data-theme="terracota"] { --bg: #fbf6ef; --surface: #fffdf9; --surface-2: #f6efe7; --hover: #f1e7dc; --border: rgba(164, 67, 31, .3); --input-border: rgba(164, 67, 31, .3); --ink: #2c211b; --ink-soft: #6f5f54; --accent: #a4431f; --accent-dark: #a4431f; --accent-soft: rgba(196, 84, 40, .13); --primary: #bf5128; --primary-hover: #a4431f; --primary-ink: #ffffff; --spark: #bf5128; --spark-hover: #a4431f; --spark-ink: #ffffff; --bar: #fbf6ef; --bar-2: #f6efe7; --bar-ink: #2c211b; --bar-soft: #6f5f54; --info: #a4431f; --info-soft: rgba(196, 84, 40, .13); --top-bg: rgba(251, 246, 239, .9); --nav-bg: rgba(251, 246, 239, .92); --subnav-bg: rgba(251, 246, 239, .65); --glow-1: rgba(191, 81, 40, .13); --glow-2: rgba(180, 140, 60, .14); --grid: rgba(164, 67, 31, .09); --glass: rgba(255, 253, 249, .8); }
[data-theme="grafito"] { --bg: #17181b; --surface: #212327; --surface-2: #2b2e33; --hover: #34383e; --border: rgba(255, 255, 255, .17); --input-border: rgba(255, 255, 255, .17); --ink: #f3f3f4; --ink-soft: #b3b6bb; --accent: #ff6b5e; --accent-dark: #ff6b5e; --accent-soft: rgba(255, 107, 94, .15); --primary: #f0503f; --primary-hover: #ff6b5e; --primary-ink: #ffffff; --spark: #f0503f; --spark-hover: #ff6b5e; --spark-ink: #ffffff; --bar: #17181b; --bar-2: #2b2e33; --bar-ink: #ffffff; --bar-soft: #b3b6bb; --info: #ff6b5e; --info-soft: rgba(255, 107, 94, .15); --top-bg: rgba(10, 10, 12, .5); --nav-bg: rgba(20, 21, 24, .82); --subnav-bg: rgba(20, 21, 24, .5); --glow-1: rgba(240, 80, 63, .2); --glow-2: rgba(255, 255, 255, .06); --grid: rgba(255, 255, 255, .045); }
[data-theme="violeta"] { --bg: #120a24; --surface: #1c1236; --surface-2: #281a4a; --hover: #33225d; --border: rgba(217, 164, 255, .3); --input-border: rgba(217, 164, 255, .3); --ink: #f5effd; --ink-soft: #b9abd2; --accent: #d9a4ff; --accent-dark: #d9a4ff; --accent-soft: rgba(217, 164, 255, .15); --primary: #c04dff; --primary-hover: #d06fff; --primary-ink: #ffffff; --spark: #c04dff; --spark-hover: #d06fff; --spark-ink: #ffffff; --bar: #120a24; --bar-2: #281a4a; --bar-ink: #ffffff; --bar-soft: #b9abd2; --info: #d9a4ff; --info-soft: rgba(217, 164, 255, .15); --top-bg: rgba(8, 3, 20, .6); --nav-bg: rgba(16, 8, 34, .8); --subnav-bg: rgba(16, 8, 34, .5); --glow-1: rgba(255, 70, 190, .25); --glow-2: rgba(100, 80, 255, .3); --grid: rgba(217, 164, 255, .07); }

/* (max-width: 760px) */
  :where(:root.layout-760) .tax-row{ grid-template-columns: auto minmax(0, 1fr) 96px; }
  :where(:root.layout-760) .tax-note{ grid-column: 2 / -1; }
  :where(:root.layout-760) .tax-row > button{ grid-column: 2 / -1; justify-self: start; }


/* On a phone a form fills the screen, with its buttons always in reach. */
/* (max-width: 600px) */
  :where(:root.layout-phone) dialog:not(.fan-dialog), :where(:root.layout-phone) dialog:not(.fan-dialog):has(.narrow), :where(:root.layout-phone) dialog:not(.fan-dialog):has(.import-window){ width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border-radius: 0; }
  :where(:root.layout-phone) dialog:not(.fan-dialog) > .modal-form{ height: 100%; max-height: none; }
  :where(:root.layout-phone) dialog:not(.fan-dialog) .modal-title{ padding-top: calc(.9rem + env(safe-area-inset-top)); }
  :where(:root.layout-phone) dialog:not(.fan-dialog) .modal-body{ flex: 1; }
  :where(:root.layout-phone) dialog:not(.fan-dialog) .modal-foot{ padding-bottom: calc(.75rem + env(safe-area-inset-bottom)); }
  :where(:root.layout-phone) dialog:not(.fan-dialog) .modal-foot > *{ flex: 1; min-height: 46px; }
  :where(:root.layout-phone) dialog:not(.fan-dialog):has(.modal-form.action-menu){ height: auto; max-height: 85dvh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  :where(:root.layout-phone) dialog:not(.fan-dialog):has(.modal-form.action-menu) > .modal-form{ height: auto; max-height: 85dvh; }
  :where(:root.layout-phone) .assist-open{ display: none; }
  :where(:root.layout-phone) .assist{ inset: 0 0 auto; width: 100%; height: 100dvh; background: var(--bg); border: 0; border-radius: 0; box-shadow: none; }
  :where(:root.layout-phone) .assist-head{ padding: calc(.75rem + env(safe-area-inset-top)) 1rem .75rem; border-bottom: 1px solid var(--line); }
  :where(:root.layout-phone) .assist-head strong{ font-size: 1.05rem; }
  :where(:root.layout-phone) .assist-x{ order: -1; width: 40px; height: 40px; padding: 0; font-size: 1.7rem; }
  :where(:root.layout-phone) .assist-list{ padding: 1rem; }
  :where(:root.layout-phone) .assist-msg{ font-size: 1rem; }
  :where(:root.layout-phone) .assist form{ padding: .6rem 1rem 0; border-top: 1px solid var(--line); }
  :where(:root.layout-phone) .assist-note{ margin: .35rem 1rem calc(.6rem + env(safe-area-inset-bottom)); }
  :where(:root.layout-phone) body.assist-on{ overflow: hidden; }
  /* Line items stack, so the description gets the full width and the numbers sit under it. */
  :where(:root.layout-phone) .items thead{ display: none; }
  :where(:root.layout-phone) .items tr{ display: flex; flex-wrap: wrap; padding: 1rem 0; }
  :where(:root.layout-phone) .items td{ padding: 0; border: 0; }
  :where(:root.layout-phone) .items td:first-child{ flex: 1 0 100%; margin-bottom: .75rem; }
  :where(:root.layout-phone) .items .item-name{ font-weight: 700; }
  :where(:root.layout-phone) .items .item-details{ margin-top: .35rem; font-size: 1rem; line-height: 1.55; color: var(--ink-soft); }
  :where(:root.layout-phone) .items td[data-label]{ flex: 1 1 0; padding: .55rem .75rem; text-align: right; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  :where(:root.layout-phone) .items td[data-label] + td[data-label]{ border-left: 1px solid var(--line); }
  :where(:root.layout-phone) .items td[data-label]::before{ content: attr(data-label); display: block; font-weight: 700; text-transform: uppercase; color: var(--ink); }
  :where(:root.layout-phone) .table-wrap + .totals{ margin-top: 1.25rem; border-top: 6px solid var(--line); border-bottom: 6px solid var(--line); }
  :where(:root.layout-phone) .table-wrap + .totals div{ padding: .75rem 0; border-bottom: 1px solid var(--line); }
  :where(:root.layout-phone) .table-wrap + .totals div:last-child{ border-bottom: 0; }
  :where(:root.layout-phone) .table-wrap + .totals .grand{ margin-top: 0; border-top: 0; font-size: 1.05rem; }
  :where(:root.layout-phone) .totals{ max-width: none; }


@media print {
  :root { color-scheme: light; }
  :root { --bg: #f3f5fb; --surface: #fff; --surface-2: #f2f4f9; --hover: #e9edf8; --border: #e0e4f0; --input-border: #c6cce0; --line: #e6e9f3; --ink: #1c2147; --ink-soft: #565d83; --accent: #1e4fb8; --accent-dark: #1e3a8a; --accent-soft: #e6e9fc; --primary: #1e4fb8; --primary-hover: #163c8f; --primary-ink: #fff; --ok: #0b6b57; --ok-soft: #d8f3ec; --warn: #7a4d00; --warn-soft: #fdeecb; --bad: #a11a3e; --bad-soft: #fde4ea; --info: #1e4fb8; --info-soft: #e6e9fc; --muted-soft: #e7e9f2; --radius: 12px; --lift: 0 1px 2px rgba(28, 33, 71, .06), 0 4px 14px rgba(28, 33, 71, .05); color-scheme: light; }
  body { background: #fff; color: #0b1f3f; font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
  .card, .stat, .figure { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  h1, h2 { letter-spacing: 0; text-transform: none; }
  .nav, .subnav, .topbar, .no-print, #toast, .assist-open { display: none !important; }
  .layout { padding: 0; }
  .content, .main { padding: 0; max-width: none; }
  .doc { border: 0; box-shadow: none; padding: 0; max-width: none; }
}

/* Photo viewer: the whole screen, photos centered, thumbnails along the bottom. */
dialog.viewer-dialog { position: fixed; inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border-radius: 0; overflow: hidden; background: transparent; box-shadow: none; }
dialog.viewer-dialog::backdrop { background: transparent; }
body:has(dialog.viewer-dialog[open]) { overflow: hidden; }
.photo-viewer { --pv-shade: 1; position: absolute; inset: 0; display: flex; flex-direction: column; color: #fff; background: rgba(5, 7, 12, var(--pv-shade)); user-select: none; }
.pv-share { position: absolute; top: calc(.75rem + env(safe-area-inset-top)); right: 1rem; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; min-height: 0; padding: 0; border: 0; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .14); backdrop-filter: blur(8px); }
.pv-share:hover { color: #fff; background: rgba(255, 255, 255, .24); }
.pv-share svg { width: 21px; height: 21px; }
.pv-track { flex: 1; padding-top: env(safe-area-inset-top); min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; touch-action: pan-x; transition: transform .18s ease; }
.pv-track::-webkit-scrollbar { display: none; }
.pv-track.pv-dragging { transition: none; }
.pv-slide { flex: 0 0 100%; display: flex; align-items: center; justify-content: center; height: 100%; padding: .25rem .5rem; scroll-snap-align: center; scroll-snap-stop: always; }
.pv-slide img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); pointer-events: none; }
.pv-thumbs { flex: none; display: flex; gap: .5rem; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom)); overflow-x: auto; scrollbar-width: none; }
.pv-thumbs::-webkit-scrollbar { display: none; }
.pv-thumb { flex: none; width: 58px; height: 58px; min-height: 0; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 10px; background: rgba(255, 255, 255, .08); opacity: .55; transition: opacity .15s, border-color .15s; }
.pv-thumb:hover { opacity: .85; background: rgba(255, 255, 255, .08); }
.pv-thumb.on { opacity: 1; border-color: var(--accent); }
.pv-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pv-thumb:first-child { margin-left: auto; }
.pv-thumb:last-child { margin-right: auto; }
/* (min-width: 900px) */ :where(:root:not(.layout-899)) .pv-thumb{ width: 66px; height: 66px; } 

/* Weather on Today: a chip at the top right, and the week in a sheet. */
.today-head { flex-wrap: nowrap; align-items: flex-start; }
.today-head > div:first-child { min-width: 0; }
.weather-chip { flex: none; display: inline-flex; align-items: center; gap: .55rem; min-height: 0; padding: .45rem .8rem .45rem .5rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.weather-chip:hover { border-color: var(--accent); background: var(--surface); }
.weather-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.weather-text b { font-size: 1.15rem; }
.weather-text span { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; color: var(--ink-soft); }
.weather-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--accent); background: var(--accent-soft); }
.weather-icon svg { width: 22px; height: 22px; }
.weather-icon.big { width: 72px; height: 72px; color: var(--primary-ink); background: var(--primary); }
.weather-icon.big svg { width: 36px; height: 36px; }
.weather-now { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 1.5rem; }
.weather-now > div { display: flex; flex-direction: column; gap: .1rem; }
.weather-now b { font-size: 2.4rem; line-height: 1; }
.weather-week { display: flex; flex-direction: column; margin-bottom: .75rem; }
.weather-day { display: grid; grid-template-columns: 3.4rem 36px 2.6rem 2.4rem minmax(0, 1fr) 2.4rem; align-items: center; gap: .6rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.weather-day .weather-icon { width: 32px; height: 32px; }
.weather-day .weather-icon svg { width: 19px; height: 19px; }
.weather-name { font-weight: 600; }
.weather-rain { font-size: .8rem; font-weight: 600; color: var(--accent); }
.weather-low { text-align: right; color: var(--ink-soft); }
.weather-high { font-weight: 600; }
.weather-bar { position: relative; height: 6px; border-radius: 999px; background: var(--line); }
.weather-bar span { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--accent); }

/* The weather screen: the whole window, a sky that follows the weather, glass cards over it. */
dialog:has(.wx-screen) { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; }
:where(:root:not(.layout-phone)) dialog:has(.wx-screen) { width: min(560px, 100vw); height: min(900px, 100dvh); margin: auto; border-radius: 22px; border: 1px solid var(--border); }
/* In Proliox's own colors (they follow the chosen theme): an amber glow at the top that is warmer by day. */
.wx-screen { --wx-ink: var(--ink); --wx-soft: var(--ink-soft); --wx-card: var(--surface); --wx-line: var(--border);
  position: relative; min-height: 100%; padding: calc(env(safe-area-inset-top) + 1rem) 16px calc(env(safe-area-inset-bottom) + 2rem); color: var(--wx-ink);
  background: radial-gradient(120% 55% at 50% 0%, rgba(255, 138, 0, .3), transparent 70%), var(--bg); }
.wx-screen.wx-night { background: radial-gradient(120% 55% at 50% 0%, rgba(255, 138, 0, .14), transparent 70%), var(--bg); }
.wx-screen.wx-cloud, .wx-screen.wx-rain { background: radial-gradient(120% 55% at 50% 0%, rgba(255, 138, 0, .1), transparent 70%), var(--bg); }
.wx-screen .wx-temp { color: var(--primary); }
.wx-screen .wx-card, .wx-screen .wx-tile { box-shadow: 0 0 18px rgba(255, 138, 0, .12); }
.wx-close { position: absolute; top: calc(env(safe-area-inset-top) + .8rem); left: 12px; width: 42px; height: 42px; min-height: 0; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); background: var(--wx-card); color: var(--accent); }
.wx-close svg { width: 22px; height: 22px; }
.wx-head { text-align: center; padding: 1.4rem 0 1.6rem; }
.wx-place { display: inline-flex; align-items: center; gap: .3rem; font-size: 1.9rem; font-weight: 600; }
.wx-place svg { width: 18px; height: 18px; }
.wx-temp { font-size: 6rem; font-weight: 200; line-height: 1; margin: .2rem 0 .1rem .3em; }
.wx-kind { font-size: 1.2rem; font-weight: 600; color: var(--wx-soft); }
.wx-hl { font-size: 1.15rem; font-weight: 600; margin-top: .15rem; white-space: pre; }
.wx-card, .wx-tile { background: var(--wx-card); border: 1px solid var(--wx-line); border-radius: 18px; padding: .85rem 1rem; margin-bottom: .8rem; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.wx-tile-title { display: flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--wx-soft); margin-bottom: .55rem; }
.wx-tile-title svg { width: 15px; height: 15px; }
.wx-where { display: flex; align-items: center; gap: .8rem; }
.wx-where p { flex: 1; margin: 0; font-size: .9rem; }
.wx-where button { flex: none; display: inline-flex; align-items: center; gap: .3rem; min-height: 0; padding: .5rem .8rem; border: 0; border-radius: 999px; background: var(--primary); color: var(--primary-ink); font-weight: 700; }
.wx-where button svg { width: 16px; height: 16px; }
.wx-hours { display: flex; gap: .2rem; overflow-x: auto; scrollbar-width: none; margin: 0 -.4rem; padding-top: .55rem; border-top: 1px solid var(--wx-line); }
.wx-hours::-webkit-scrollbar { display: none; }
.wx-hour { flex: none; width: 3.6rem; display: flex; flex-direction: column; align-items: center; gap: .35rem; font-size: .95rem; }
.wx-hour-time { font-weight: 600; font-size: .85rem; white-space: nowrap; }
.wx-hour-rain { min-height: .9rem; font-size: .72rem; font-weight: 700; color: var(--accent); }
.wx-hour b { font-size: 1.1rem; }
.wx-screen .weather-icon { background: transparent; color: var(--accent); width: 34px; height: 34px; }
.wx-screen .weather-icon.sun, .wx-screen .weather-icon.partly { color: var(--primary); }
.wx-screen .weather-icon svg { width: 24px; height: 24px; }
.wx-screen .weather-week { margin: 0; }
.wx-screen .weather-day { border-top-color: var(--wx-line); font-size: 1.05rem; }
.wx-screen .weather-low { color: var(--wx-soft); }
.wx-screen .weather-rain { color: var(--accent); }
.wx-screen .weather-bar { background: var(--line); }
.wx-screen .weather-bar span { background: linear-gradient(90deg, var(--accent), var(--primary)); }
.wx-screen .weather-bar em { position: absolute; top: -2px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--ink); border: 2px solid var(--bg); }
.wx-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.wx-tiles .wx-tile { margin: 0; display: flex; flex-direction: column; min-height: 150px; position: relative; }
.wx-tile-value { font-size: 2.1rem; font-weight: 600; line-height: 1.1; }
.wx-tile-value small { font-size: 1rem; font-weight: 600; }
.wx-tile-note { margin-top: auto; padding-top: .5rem; font-size: .9rem; }
.wx-uv { position: relative; display: block; height: 5px; margin-top: .6rem; border-radius: 999px; background: linear-gradient(90deg, #4cd964, #ffd60a, #ff9500, #ff3b30, #af52de); }
.wx-uv i { position: absolute; top: -3px; width: 11px; height: 11px; margin-left: -5px; border-radius: 50%; background: var(--ink); border: 2px solid var(--bg); }
.wx-compass { position: absolute; top: .8rem; right: .8rem; width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--wx-line); display: grid; place-items: center; }
.wx-compass span { position: absolute; top: 1px; font-size: .55rem; font-weight: 700; color: var(--wx-soft); }
.wx-compass i { width: 2px; height: 30px; background: linear-gradient(180deg, var(--primary) 0 55%, transparent 55%); position: relative; }
.wx-compass i::after { content: ""; position: absolute; left: -4px; top: -2px; border: 5px solid transparent; border-bottom: 7px solid var(--primary); border-top: 0; }
.wx-foot { font-size: .8rem; color: var(--wx-soft); text-align: center; margin: 1rem .5rem 0; }
/* (min-width: 601px) */ :where(:root:not(.layout-phone)) dialog:has(.weather-sheet){ width: min(520px, calc(100vw - 24px)); } 
/* (max-width: 600px) */
  :where(:root.layout-phone) .weather-chip{ padding: .35rem .65rem .35rem .4rem; }
  :where(:root.layout-phone) .weather-chip .weather-icon{ width: 30px; height: 30px; }
  :where(:root.layout-phone) .weather-chip .weather-icon svg{ width: 19px; height: 19px; }
  :where(:root.layout-phone) .weather-text span{ max-width: 6rem; }

/* Proliox's camera: the picture fills the screen, photos taken line up above the shutter. */
.camera .cam-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; background: #000; touch-action: none; }
/* The whole picture, as the photo will be (like the iPhone's camera), not cut to fill the screen. */
.camera .cam-video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; transform-origin: center; }
.cam-zoom { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(12.5rem + env(safe-area-inset-bottom)); display: flex; gap: .4rem; padding: .3rem; border-radius: 999px; background: rgba(0, 0, 0, .45); }
.cam-zoom button { width: 40px; height: 40px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: .8rem; font-weight: 700; }
.cam-zoom button.on { background: rgba(0, 0, 0, .6); color: #ffd34d; font-size: .95rem; }
.cam-zoom:not([data-level=""])::before { content: attr(data-level); position: absolute; bottom: calc(100% + .4rem); left: 50%; transform: translateX(-50%); padding: .2rem .55rem; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #ffd34d; font-weight: 700; font-size: .85rem; }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .18s; }
.camera.snap .cam-flash { opacity: .7; transition: none; }
.cam-problem { position: absolute; inset: 30% 1.5rem auto; display: grid; gap: 1rem; padding: 1.25rem; border-radius: 16px; background: rgba(0, 0, 0, .75); color: #fff; text-align: center; }
.cam-problem p { margin: 0; }
.cam-bottom { flex: none; padding-bottom: calc(.75rem + env(safe-area-inset-bottom)); background: rgba(5, 7, 12, .92); }
.cam-thumbs { min-height: 0; padding-bottom: .25rem; }
.cam-thumbs:empty { display: none; }
.cam-shot { position: relative; flex: none; width: 58px; height: 58px; }
.cam-shot img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 2px solid var(--accent); }
.cam-shot button { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 22px; height: 22px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: #000; color: #fff; font-size: .9rem; line-height: 1; }
/* The scanned page, big, right after it is taken. */
.cam-review { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; gap: 1rem; padding: calc(env(safe-area-inset-top) + 16px) 16px calc(env(safe-area-inset-bottom) + 16px); background: #000; }
.cam-review[hidden] { display: none; }
.cam-review img { flex: 1; min-height: 0; width: 100%; object-fit: contain; border-radius: 12px; }
.cam-review-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.cam-review-row button { min-height: 48px; font-weight: 700; }
/* Scan mode: the page's edges drawn over the picture, and a short hint. */
.cam-edges { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; display: none; }
.cam-edges.on { display: block; }
.cam-edges polygon { fill: rgba(255, 138, 0, .22); stroke: var(--primary); stroke-width: 3; stroke-linejoin: round; transition: all .15s linear; }
.cam-scan-hint { position: absolute; top: calc(env(safe-area-inset-top) + 14px); left: 50%; transform: translateX(-50%); max-width: 86%; padding: .45rem .85rem; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .85rem; font-weight: 600; text-align: center; }
/* Inside the camera: photos from the phone, Photo and Scan, above the shutter. */
.cam-modes { display: flex; justify-content: center; gap: .5rem; padding: .4rem 1rem 0; }
.cam-modes button { display: inline-flex; align-items: center; gap: .35rem; min-height: 0; padding: .45rem .85rem; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; background: rgba(255, 255, 255, .08); color: #fff; font-size: .85rem; font-weight: 700; }
.cam-modes button.on { border-color: var(--primary); color: var(--primary); }
.cam-modes button svg { width: 18px; height: 18px; }
.cam-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: .5rem 1.25rem 0; }
.cam-text { justify-self: start; min-height: 0; padding: .5rem .25rem; border: 0; background: none; color: #fff; font-weight: 600; }
.cam-text:hover { background: none; color: #fff; }
.cam-done { justify-self: end; color: var(--accent); }
.cam-done:hover { color: var(--accent); }
.cam-shutter { width: 72px; height: 72px; min-height: 0; padding: 0; border: 4px solid #fff; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3px #000; }
.cam-shutter:hover { background: #fff; }
.cam-shutter:active { transform: scale(.94); }.cam-full { position: absolute; left: 1rem; right: 1rem; bottom: calc(13.5rem + env(safe-area-inset-bottom)); padding: .7rem 1rem; border-radius: 14px; background: rgba(0, 0, 0, .75); color: #fff; font-weight: 600; text-align: center; }
.cam-shutter:disabled { opacity: .35; }
/* Email account in Settings */
.email-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .6rem; margin-top: .5rem; }
.email-choice { display: flex; align-items: center; gap: .7rem; min-height: 54px; padding: .6rem .9rem; border-radius: 14px; font-weight: 600; text-align: left; }
.email-badge { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-weight: 800; font-size: 1.05rem; color: #fff; background: var(--ink-soft); }
.email-badge.google { background: #ea4335; }
.email-badge.microsoft { background: #0a64c8; }
.email-badge.server { background: var(--accent); color: var(--primary-ink); }
.email-account { display: flex; align-items: center; gap: .8rem; margin: .25rem 0 .75rem; }
.email-account strong { overflow-wrap: anywhere; }
.steps { margin: .5rem 0 1rem; padding-left: 1.3rem; display: grid; gap: .45rem; font-size: .9rem; line-height: 1.45; }
.copy-row { display: flex; gap: .5rem; }
.copy-row input { flex: 1; min-width: 0; }.stripe-open { margin-bottom: .9rem; background: #635bff; border-color: #635bff; color: #fff; font-weight: 700; }
.stripe-open:hover { background: #544ee0; border-color: #544ee0; color: #fff; }
/* Kinds of business to look for, in the browser screen */
.lead-kinds { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.25rem 0 .9rem; }
.lead-kind { min-height: 0; padding: .35rem .75rem; border-radius: 999px; font-size: .82rem; font-weight: 600; }
.lead-kind.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* The tour: the screen dims around a lit-up button, with a card that explains it. */
.tour { position: fixed; inset: 0; z-index: 2147483000; touch-action: none; }
html.touring, html.touring body { overflow: hidden; overscroll-behavior: none; }
.tour.tour-dim { background: rgba(4, 8, 14, .66); }
.tour-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(4, 8, 14, .66), 0 0 0 3px var(--primary), 0 0 24px 4px rgba(255, 138, 0, .55); pointer-events: none; }
.tour-card { position: fixed; padding: 1.1rem 1.15rem 1rem; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
.tour-card h2 { margin: .15rem 0 .4rem; font-size: 1.15rem; }
.tour-card p { margin: 0 0 .9rem; line-height: 1.5; color: var(--ink-soft); }
.tour-count { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); }
.tour-dots { display: flex; gap: .35rem; margin-bottom: .9rem; }
.tour-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.tour-dots span.on { width: 20px; border-radius: 4px; background: var(--primary); }
.tour-buttons { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; }
.tour-buttons .link { margin-right: auto; }

/* Learn: the list of lessons, each one a row with its number, or a check once done. */
.learn-top p { margin-top: 0; }
.learn-progress { display: block; width: 100%; height: 10px; margin: .4rem 0 .5rem; border: 0; border-radius: 6px; background: var(--line); appearance: none; overflow: hidden; }
.learn-progress::-webkit-progress-bar { background: var(--line); border-radius: 6px; }
.learn-progress::-webkit-progress-value { background: var(--primary); border-radius: 6px; }
.learn-progress::-moz-progress-bar { background: var(--primary); border-radius: 6px; }
.learn-list { padding-top: .3rem; padding-bottom: .3rem; }
.learn-row { display: flex; align-items: center; gap: .9rem; width: 100%; min-height: 68px; padding: .7rem 0; color: inherit; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.learn-row:last-child { border-bottom: 0; }
.learn-num { flex: none; display: grid; place-items: center; width: 38px; height: 38px; font-weight: 700; color: var(--primary); background: var(--accent-soft); border-radius: 50%; }
.learn-num svg { width: 20px; height: 20px; }
.learn-row.done .learn-num { color: var(--ok); background: var(--ok-soft); }
.learn-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.learn-go { flex: none; font-weight: 700; color: var(--primary); }
.learn-row.done .learn-go { color: var(--ink-soft); }
.learn-row.next { background: var(--accent-soft); border-radius: 12px; padding-inline: .6rem; }
/* Team: members with their role, pending invitations, and what each role sees */
.team-head p { margin: .2rem 0 0; }
/* Team's buttons, two by two: Invite and Add subcontractor, then Account activity and Team hours. */
.team-head .head-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.team-head .head-actions > * { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; text-align: center; }
.team-head .head-actions svg { width: 18px; height: 18px; flex: none; }
.team-label { margin: 1.4rem 0 .5rem; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.team-list { padding: 0; overflow: hidden; }
.team-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: .9rem; padding: .9rem 1.1rem; border-top: 1px solid var(--line); }
.team-row:first-child { border-top: 0; }
.team-row.pending { grid-template-columns: auto minmax(0, 1fr) auto; }
.team-row.inactive { opacity: .6; }
.team-avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; letter-spacing: .04em; background: var(--accent); color: var(--primary-ink, #fff); flex: none; }
.team-avatar.invite { background: transparent; color: var(--ink-soft); border: 2px dashed var(--border); }
.team-avatar.invite svg { width: 20px; height: 20px; }
.team-who { display: grid; gap: .15rem; text-align: left; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; min-width: 0; width: auto; margin: 0; }
.team-who strong { font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-sub { font-size: .86rem; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-sub.warn-text { color: var(--warn); }
.team-open, .team-resend { background: none; border: 0; color: var(--ink-soft); cursor: pointer; padding: .3rem; width: auto; margin: 0; }
.team-open svg { width: 18px; height: 18px; }
.team-resend { color: var(--accent); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.role-tag { display: inline-block; padding: .22rem .55rem; border-radius: 6px; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border: 1.5px solid var(--border); color: var(--ink-soft); white-space: nowrap; }
.role-tag.role-owner { background: var(--accent); border-color: var(--accent); color: var(--primary-ink, #fff); }
.role-tag.role-admin { border-color: var(--accent); color: var(--accent); }
.team-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.team-role { padding: .9rem; margin: 0; }
.team-role p { margin: .5rem 0 0; }
.team-invite { width: 100%; margin-top: 1.4rem; padding: .95rem; font-size: 1rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; display: flex; justify-content: center; align-items: center; gap: .5rem; }
.team-invite svg { width: 18px; height: 18px; }
.team-edit-extra { display: flex; justify-content: space-between; gap: 1rem; margin-top: .6rem; }
/* (max-width: 600px) */
  :where(:root.layout-phone) .team-roles{ grid-template-columns: 1fr; }
  :where(:root.layout-phone) .team-row{ padding: .8rem .9rem; gap: .7rem; }


/* --- Night glow and Light glow: Proliox orange outlines that softly glow --- */
[data-theme="brillo"] { --bg: #0b0b0d; --surface: #141417; --surface-2: #1d1d22; --hover: #25252b; --border: rgba(255, 224, 0, .62); --input-border: rgba(255, 224, 0, .45); --ink: #f6f6f8; --ink-soft: #a9a9b3; --accent: #ffeb4d; --accent-dark: #ffeb4d; --accent-soft: rgba(255, 224, 0, .16); --primary: #ffe000; --primary-hover: #ffeb4d; --primary-ink: #120a00; --spark: #ffe000; --spark-hover: #ffeb4d; --spark-ink: #120a00; --bar: #0b0b0d; --bar-2: #1d1d22; --bar-ink: #ffffff; --bar-soft: #a9a9b3; --info: #ffeb4d; --info-soft: rgba(255, 224, 0, .16); --glass: #141417; --top-bg: #0b0b0d; --nav-bg: rgba(11, 11, 13, .92); --subnav-bg: #0b0b0d; --glow-1: rgba(255, 224, 0, .3); --glow-2: rgba(255, 224, 0, .1); --grid: rgba(255, 224, 0, .07); --radius: 16px; --lift: 0 0 16px rgba(255, 224, 0, .26), inset 0 0 14px rgba(255, 224, 0, .05); --glow-rgb: 255, 224, 0; }
[data-theme="brillo-claro"] { --bg: #f4f4f6; --surface: #ffffff; --surface-2: #f7f3ee; --hover: #fff3e6; --border: rgba(255, 138, 0, .7); --input-border: rgba(255, 138, 0, .5); --ink: #121214; --ink-soft: #5b5b66; --accent: #d96d00; --accent-dark: #c86400; --accent-soft: rgba(255, 138, 0, .12); --primary: #ff8a00; --primary-hover: #ff9d26; --primary-ink: #120a00; --spark: #ff8a00; --spark-hover: #ff9d26; --spark-ink: #120a00; --bar: #ffffff; --bar-2: #f4f4f6; --bar-ink: #121214; --bar-soft: #5b5b66; --info: #d96d00; --info-soft: rgba(255, 138, 0, .12); --glass: #ffffff; --top-bg: #ffffff; --nav-bg: rgba(255, 255, 255, .94); --subnav-bg: #ffffff; --radius: 16px; --lift: 0 0 14px rgba(255, 138, 0, .2); --glow-rgb: 255, 138, 0; }
[data-theme^="brillo"] .card, [data-theme^="brillo"] .stat, [data-theme^="brillo"] .visit-card, [data-theme^="brillo"] .more-row:first-child { border-width: 1.5px; border-radius: var(--radius); }
[data-theme^="brillo"] .phone-new, [data-theme^="brillo"] .spark, [data-theme^="brillo"] button.primary { box-shadow: 0 0 18px rgba(var(--glow-rgb), .55); }
[data-theme^="brillo"] .phone-nav { border-top: 1.5px solid var(--border); box-shadow: 0 -4px 18px rgba(var(--glow-rgb), .18); }
[data-theme^="brillo"] .bell, [data-theme^="brillo"] .avatar { border: 1.5px solid var(--border); box-shadow: 0 0 10px rgba(var(--glow-rgb), .3); border-radius: 50%; }
[data-theme^="brillo"] .stat .value { color: var(--accent); }
.t-brillo { background: #0b0b0d; box-shadow: inset 0 0 0 1.5px #ffe000, 0 0 10px rgba(255, 224, 0, .45); } .t-brillo i { background: #ffe000; }
.t-brillo-claro { background: #ffffff; box-shadow: inset 0 0 0 1.5px #ff8a00, 0 0 10px rgba(255, 138, 0, .35); } .t-brillo-claro i { background: #ff8a00; }

/* --- Messages --- */
.chat-badge { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--primary); color: var(--primary-ink); font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center; }
.msg-layout { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 1rem; align-items: start; }
.msg-layout > .card { margin: 0; }
.chat-pills { display: flex; gap: .4rem; margin-bottom: .6rem; }
.chat-pills button { min-height: 30px; padding: .15rem .8rem; border-radius: 999px; font-size: .85rem; }
.chat-pills button.on { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.chat-row { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .55rem .4rem; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; color: inherit; text-align: left; text-decoration: none; font-weight: 400; min-height: 0; }
.chat-row:last-child { border-bottom: 0; }
.chat-row.on, .chat-row:hover { background: var(--hover); }
.chat-row .grow-text { flex: 1; min-width: 0; }
.chat-row .grow-text span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chat-avatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .85rem; }
.chat-avatar.group { border-radius: 12px; }
.chat-unread { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--primary); color: var(--primary-ink); font-size: .72rem; font-weight: 700; line-height: 20px; text-align: center; }
.chat-thread { display: flex; flex-direction: column; height: calc(100dvh - 210px); min-height: 360px; padding: 0; overflow: hidden; }
.chat-thread-head { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
.chat-thread-head .grow-text { flex: 1; min-width: 0; }
.chat-scroll { flex: 1; overflow-y: auto; padding: .8rem .9rem; display: flex; flex-direction: column; gap: .35rem; }
.bubble { max-width: 78%; padding: .5rem .75rem; border-radius: 16px; background: var(--surface-2); align-self: flex-start; overflow-wrap: anywhere; }
.bubble.mine { align-self: flex-end; background: var(--primary); color: var(--primary-ink); border-bottom-right-radius: 5px; }
.bubble.theirs { border-bottom-left-radius: 5px; }
.bubble img { display: block; max-width: 100%; max-height: 260px; border-radius: 10px; margin: .1rem 0 .25rem; cursor: zoom-in; }
.bubble-who { font-size: .72rem; font-weight: 700; margin-bottom: .1rem; }
.bubble-time { font-size: .68rem; opacity: .7; text-align: right; }
.chat-day { align-self: center; font-size: .72rem; color: var(--ink-soft); margin: .4rem 0; }
.chat-compose { display: flex; align-items: flex-end; gap: .4rem; padding: .6rem; border-top: 1px solid var(--line); }
.chat-compose textarea { flex: 1; min-height: 40px; max-height: 120px; resize: none; border-radius: 20px; padding: .5rem .85rem; }
.chat-compose .icon-button, .chat-send { flex: none; width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; display: grid; place-items: center; }
.chat-send { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.chat-send svg, .chat-compose .icon-button svg { width: 20px; height: 20px; }
.people-checks { display: grid; gap: .1rem; max-height: 45vh; overflow-y: auto; }
.people-checks label { display: flex; align-items: center; gap: .6rem; padding: .4rem .2rem; border-bottom: 1px solid var(--line); }
.people-checks input { width: 22px; height: 22px; min-height: 0; accent-color: var(--primary); }
.role-tag { font-size: .7rem; padding: .05rem .45rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
/* (max-width: 760px) */
  :where(:root.layout-760) .msg-layout{ grid-template-columns: 1fr; }
  :where(:root.layout-760) .msg-layout.in-chat > .chat-list-card, :where(:root.layout-760) .msg-layout:not(.in-chat) > .chat-thread{ display: none; }
  :where(:root.layout-760) .chat-thread{ height: calc(100dvh - 170px - env(safe-area-inset-bottom)); }


/* --- Time on a job --- */
.timer-card .timer-big { font-size: 1.9rem; font-weight: 800; color: var(--accent); letter-spacing: -.02em; }
.timer-card .timer-people { margin-top: .4rem; }
.timer-running { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 700; color: var(--ok); }
.timer-running::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* --- Team hours --- */
.hours-row { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.hours-row:last-child { border-bottom: 0; }
.hours-row.focus { background: var(--accent-soft); border-radius: 10px; padding: .7rem .6rem; }
.hours-top { display: flex; align-items: center; gap: .6rem; margin-bottom: .35rem; }
.hours-top .grow-text { flex: 1; min-width: 0; }
.hours-bar { position: relative; height: 12px; border-radius: 6px; background: var(--muted-soft); overflow: visible; }
.hours-fill { height: 100%; border-radius: 6px; background: var(--ok); }
.hours-row.near .hours-fill { background: #eab308; }
.hours-row.over .hours-fill { background: #ef4444; }
.hours-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink-soft); }
.hours-mark span { position: absolute; top: -1.15rem; transform: translateX(-50%); font-size: .68rem; color: var(--ink-soft); white-space: nowrap; }
.hours-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.legend-dots { display: flex; flex-wrap: wrap; gap: .8rem; font-size: .8rem; color: var(--ink-soft); }
.legend-dots i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .3rem; vertical-align: middle; }

/* --- Calendar colors --- */
.cal-chips { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding: .1rem 0 .6rem; }
.cal-chip { flex: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 32px; padding: .2rem .7rem; border-radius: 999px; font-size: .82rem; font-weight: 600; }
.cal-chip i { width: 12px; height: 12px; border-radius: 50%; }
.cal-chip.off { opacity: .45; text-decoration: line-through; }
.day-dots { display: flex; justify-content: center; gap: 3px; min-height: 6px; margin-top: 2px; }
.day-dots i { width: 6px; height: 6px; border-radius: 50%; }
.event.solid { border-left-width: 4px; font-weight: 600; }
.event.solid.more-people { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .85); }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: #ef4444; z-index: 30; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }
.now-row { display: flex; align-items: center; gap: .4rem; color: #ef4444; font-size: .75rem; font-weight: 700; margin: .25rem 0; }
.now-row::after { content: ""; flex: 1; height: 2px; background: #ef4444; }
.cal-line.solid { border-radius: 12px; margin-bottom: .35rem; border: 0; }
.cal-line.solid .muted { color: inherit; opacity: .85; }
.cal-line.solid.more-people { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .85); }
.crew-row { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.crew-row:last-child { border-bottom: 0; }
.crew-row .grow-text { flex: 1; min-width: 0; }
.color-swatches { display: flex; flex-wrap: wrap; gap: .45rem; }
.color-swatches label { position: relative; }
.color-swatches input { position: absolute; opacity: 0; inset: 0; }
.color-swatches span { display: block; width: 32px; height: 32px; border-radius: 50%; border: 3px solid transparent; }
.color-swatches input:checked + span { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface); }
.color-dot { flex: none; display: inline-block; width: 14px; height: 14px; border-radius: 50%; }

/* --- Service library --- */
.lib-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .5rem; }
.lib-kinds button.on { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.lib-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 104px; align-items: center; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.lib-row input[type="checkbox"] { width: 22px; height: 22px; min-height: 0; accent-color: var(--primary); }
.lib-row input[data-price] { text-align: right; }
.lib-row.off .grow-text { opacity: .5; }
.suggested { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }

/* --- What's new --- */
.wn-head { text-align: center; padding: .5rem 0 1rem; }
.wn-head img { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 0 22px rgba(255, 138, 0, .45); }
.wn-head h2 { font-size: 1.5rem; margin: .6rem 0 .1rem; }
.wn-list { display: grid; gap: .55rem; }
.wn-card { display: flex; gap: .8rem; align-items: flex-start; padding: .75rem .85rem; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); }
.wn-icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.wn-icon svg { width: 20px; height: 20px; }
.wn-card p { margin: .1rem 0 0; color: var(--ink-soft); font-size: .88rem; }
.wn-old summary { cursor: pointer; font-weight: 700; margin: .9rem 0 .5rem; }

/* --- Marking up a photo --- */
dialog.markup-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: #000; }
.mk { position: fixed; inset: 0; display: flex; flex-direction: column; background: #000; color: #fff; touch-action: none; user-select: none; -webkit-user-select: none; }
.mk-top, .mk-tools { display: flex; align-items: center; gap: .4rem; padding: .5rem .6rem; background: rgba(20, 20, 24, .96); }
.mk-top { padding-top: calc(.5rem + env(safe-area-inset-top)); justify-content: space-between; }
.mk-tools { flex-wrap: wrap; justify-content: center; padding-bottom: calc(.5rem + env(safe-area-inset-bottom)); }
.mk button { min-height: 40px; color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); }
.mk button.on { background: #ffe000; color: #120a00; border-color: #ffe000; }
.mk button.primary { background: #ffe000; color: #120a00; }
.mk-tool { display: inline-flex; flex-direction: column; align-items: center; gap: 0; min-width: 52px; padding: .2rem .4rem; font-size: .7rem; }
.mk-tool svg { width: 20px; height: 20px; }
.mk-color { width: 34px; height: 34px; min-height: 34px; padding: 0; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .3) !important; }
.mk-color.on { border-color: #fff !important; box-shadow: 0 0 0 2px #ffe000; }
.mk-stage { position: relative; flex: 1; overflow: hidden; }
.mk-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.mk-hint { position: absolute; left: 50%; bottom: .6rem; transform: translateX(-50%); padding: .2rem .7rem; border-radius: 999px; background: rgba(0, 0, 0, .6); font-size: .78rem; pointer-events: none; }
.pv-mark { position: absolute; top: calc(.75rem + env(safe-area-inset-top)); right: 3.7rem; z-index: 3; display: inline-flex; align-items: center; gap: .3rem; color: #fff; background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .25); }
.pv-quote { position: absolute; top: calc(.75rem + env(safe-area-inset-top)); left: .75rem; z-index: 3; color: #fff; background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .25); }
.marked-tag { position: absolute; left: 4px; bottom: 4px; padding: 0 .35rem; border-radius: 6px; background: #ffe000; color: #120a00; font-size: .66rem; font-weight: 700; }
.job-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .45rem; }
.job-files button { position: relative; padding: 0; aspect-ratio: 1; overflow: hidden; border-radius: 10px; min-height: 0; }
.job-files img { width: 100%; height: 100%; object-fit: cover; display: block; }
.quote-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; margin: .5rem 0; }
.quote-photos figure { margin: 0; position: relative; }
.quote-photos img { width: 100%; border-radius: 10px; display: block; }
.quote-photos figure button { position: absolute; top: 4px; right: 4px; min-height: 28px; padding: 0 .5rem; }

/* --- Driving report --- */
.drive-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.2rem; align-items: center; }
.score-ring { position: relative; width: 120px; height: 120px; }
.score-ring svg { width: 120px; height: 120px; transform: rotate(-90deg); }
.score-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2rem; font-weight: 800; }
.score-ring small { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; font-size: .68rem; color: var(--ink-soft); }
.drive-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.drive-stats div { text-align: center; padding: .5rem; border-radius: 12px; background: var(--surface-2); }
.drive-stats b { display: block; font-size: 1.3rem; }
.drive-chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem; position: relative; }
.drive-chart .bar-plot { height: 130px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; font-size: .72rem; color: var(--ink-soft); }
.drive-chart .bar-day { display: block; height: 1.2rem; margin-top: .2rem; text-align: center; font-size: .72rem; color: var(--ink-soft); }
.drive-chart .bar { width: 70%; min-height: 2px; border-radius: 6px 6px 0 0; background: var(--primary); }
.drive-chart .bar.over { background: #ef4444; }
.drive-limit { position: absolute; left: 0; right: 0; border-top: 2px dashed #ef4444; pointer-events: none; }
.drive-limit span { position: absolute; right: 0; top: -1.1rem; font-size: .68rem; color: #ef4444; }
.drive-event { display: flex; gap: .7rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.drive-event:last-child { border-bottom: 0; }
.drive-event .over { color: #ef4444; font-weight: 800; white-space: nowrap; }
.consent-box { border: 1.5px solid var(--border); border-radius: 14px; padding: .8rem 1rem; background: var(--surface-2); }
.consent-box li { margin-bottom: .3rem; }
/* (max-width: 600px) */
  :where(:root.layout-phone) .drive-top{ grid-template-columns: 1fr; justify-items: center; }
  :where(:root.layout-phone) .drive-stats{ width: 100%; }

.now-line.v { top: 0; bottom: 0; right: auto; width: 2px; height: auto; }
.now-line.v::before { left: -4px; top: -4px; }
.hgrid-col, .hline-track { position: relative; }
.more-row svg { flex: none; }
.chat-list-card .card-head { flex-wrap: wrap; gap: .5rem; }
.chat-list-card h1 { font-size: 1.35rem; }
.chat-list-card .head-actions button, .timer-card button, .chat-thread-head button { display: inline-flex; align-items: center; gap: .35rem; }
.chat-list-card .head-actions svg, .timer-card button svg { width: 16px; height: 16px; }
.chat-compose { padding-right: 4.4rem; }.timer-card .card-head button, .head-actions button, .head-actions .btn, .visit-actions button, .visit-actions .btn, .tabs button { display: inline-flex; align-items: center; gap: .35rem; }
.timer-card .card-head button > svg, .head-actions button > svg, .head-actions .btn > svg, .visit-actions button > svg, .visit-actions .btn > svg, .hours-actions button > svg { width: 17px; height: 17px; flex: none; }.phone-top a.bell[href="#/messages"] { margin-left: auto; }
/* Chat and notifications sit together at the right, as far apart as notifications and help. */
.phone-top > a.bell ~ a.bell { margin-left: 0; }
/* Practice: Missions right beside the tag. */
.practice-missions { min-height: 0; margin-left: .35rem; padding: .12rem .55rem; color: #1a1100; font-size: .68rem; font-weight: 800; letter-spacing: .02em; vertical-align: middle; background: #fff3cc; border: 1px solid #ffc21a; border-radius: 999px; }
.more-hero .practice-missions { margin: .5rem 0 0 .35rem; }
/* Help chat: questions to tap. */
.assist-choices { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; }
.assist-choices button { min-height: 0; padding: .4rem .75rem; font-size: .88rem; text-align: left; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--border); border-radius: 14px; }
/* On a phone an open chat fills the whole screen. */
/* (max-width: 760px) */
  :where(:root.layout-760) .msg-layout.in-chat > .chat-thread{ position: fixed; inset: 0; z-index: 70; height: auto; min-height: 0; margin: 0; border: 0; border-radius: 0; box-shadow: none; background: var(--bg); padding-top: env(safe-area-inset-top); }
  :where(:root.layout-760) .msg-layout.in-chat .chat-compose{ padding-right: .6rem; padding-bottom: calc(.6rem + env(safe-area-inset-bottom)); }
  :where(:root.layout-760) body:has(.msg-layout.in-chat) .assist-open{ display: none; }
.phone-top { flex-wrap: nowrap; }
.layout.is-practice .phone-top .brand-name { display: none; }
.phone-top .brand { flex: 0 1 auto; min-width: 0; white-space: nowrap; }
/* Scan card sits at the start of the bottom row, apart from Cancel and Save. */
.modal-foot .foot-lead { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; margin-right: auto; color: var(--accent); background: var(--accent-soft); border: 1.5px solid var(--accent); font-weight: 700; }
.modal-foot .foot-lead svg { width: 19px; height: 19px; flex: none; }
.card-found { margin-bottom: .9rem; }
/* (max-width: 600px) */
  :where(:root.layout-phone) dialog:not(.fan-dialog) .modal-foot.with-lead{ display: grid; grid-template-columns: 1fr 1fr; }
  :where(:root.layout-phone) .modal-foot.with-lead .foot-lead{ grid-column: 1 / -1; margin: 0; }
  :where(:root.layout-phone) .modal-foot.with-lead > .primary{ grid-column: 1 / -1; }

/* Dragging a visit on a phone: the week strip stays at the top to drop it on a day, and holding never selects text. */
[data-move-visit] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
body.dragging-visit .week-strip { position: sticky; top: 0; z-index: 60; background: var(--bg); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
body.dragging-visit .week-day { outline: 1.5px dashed var(--border); outline-offset: -3px; }
.week-day.drop-over { background: var(--primary) !important; color: var(--primary-ink) !important; transform: scale(1.08); }
.drag-ghost { opacity: .92; box-shadow: 0 12px 30px rgba(0, 0, 0, .45); border-radius: 12px; pointer-events: none; }
.drag-hint { margin: -.2rem 0 .6rem; }
/* The tools on a job in the calendar: stopwatch, photo and note. */
.visit-tools { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: .5rem; margin-bottom: .6rem; }
.visit-tools button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; min-height: 64px; padding: .4rem; font-size: .82rem; border-radius: 14px; }
.visit-tools button svg { width: 22px; height: 22px; flex: none; }
.visit-tools .stopwatch { flex-direction: row; gap: .55rem; color: var(--primary-ink); background: var(--primary); border-color: var(--primary); }
.visit-tools .stopwatch svg { width: 28px; height: 28px; }
.visit-tools .stopwatch span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; text-align: left; }
.visit-tools .stopwatch b { font-size: 1.05rem; }
.visit-tools .stopwatch small { font-size: .72rem; opacity: .85; }
.visit-tools .stopwatch.running { color: #fff; background: #dc2626; border-color: #dc2626; }
.visit-total { margin-top: 0; }.cal-line.solid .cal-line-time { color: inherit; font-weight: 700; }
.cal-line.solid .badge { color: inherit; background: rgba(0, 0, 0, .18); }
/* Terms of Service page and agreeing to it */
.legal-body { background: #f6f6f8; color: #15151a; }
.legal-page { max-width: 760px; margin: 0 auto; padding: 1.5rem 1.2rem 3rem; line-height: 1.6; }
.legal-page h1 { font-size: 1.8rem; margin: .8rem 0 .2rem; }
.legal-page h2 { font-size: 1.1rem; margin: 1.6rem 0 .4rem; }
.legal-page ul { padding-left: 1.2rem; }
.legal-page li { margin-bottom: .35rem; }
.legal-page a { color: #c45f00; }
.legal-date { color: #5b5b66; margin-bottom: 1.2rem; }
.legal-caps { font-weight: 600; }
.legal-back { font-weight: 600; text-decoration: none; }
.terms-check { align-items: flex-start; margin: .6rem 0; }
.terms-check input { flex: none; margin-top: .2rem; }
.terms-points li { margin-bottom: .3rem; }
/* The Terms page: the way back stays at the top, below the iPhone's clock, and again at the end. */
.legal-bar { position: sticky; top: 0; z-index: 5; padding: calc(.6rem + env(safe-area-inset-top)) 1.2rem .6rem; background: rgba(246, 246, 248, .96); border-bottom: 1px solid #e3e3e8; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.legal-bar .legal-back { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; color: #120a00; background: #ff8a00; border-radius: 999px; }
.legal-done { display: block; margin-top: 2rem; padding: .9rem; text-align: center; color: #120a00 !important; font-weight: 700; text-decoration: none; background: #ff8a00; border-radius: 14px; }
.legal-page { padding-bottom: calc(3rem + env(safe-area-inset-bottom)); }
.danger-card { border-color: rgba(239, 68, 68, .5); }.stripe-button { background: #635bff !important; border-color: #635bff !important; color: #fff !important; }
.stripe-own summary { cursor: pointer; font-weight: 600; }
.stripe-own form { margin-top: .8rem; }
/* TV mode: the computer version fills the whole TV and stays still. */
html.tv-mode, html.tv-mode body { overflow-x: hidden; overscroll-behavior: none; width: 100%; }
html.tv-mode .main { max-width: none; padding-left: 2.5rem; padding-right: 2.5rem; }
html.tv-mode .topbar, html.tv-mode .nav, html.tv-mode .subnav { padding-left: 2.5rem; padding-right: 2.5rem; }
/* Unscheduled jobs: beside the calendar on a computer, a row under the days on a phone, ready to drag onto a day. */
[data-drag-job] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; cursor: grab; }
.cal-panel .event.unscheduled { cursor: grab; border-left: 4px dashed var(--accent); }
.unsched-strip { margin: .2rem 0 .7rem; }
.unsched-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .35rem; }
.unsched-row { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; padding-bottom: .2rem; }
.unsched-chip { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; max-width: 220px; min-height: 0; padding: .5rem .75rem; text-align: left; border: 1.5px dashed var(--accent); border-radius: 12px; background: var(--accent-soft); }
.unsched-chip strong { font-size: .85rem; }
.unsched-chip span { font-size: .75rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
/* The job tools in the calendar: stopwatch, photo, note and route. */
.visit-tools { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
.visit-tools .route-tool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; min-height: 64px; padding: .4rem; font-size: .82rem; font-weight: 600; border-radius: 14px; text-decoration: none; }
.visit-tools .route-tool svg { width: 22px; height: 22px; }
@media (max-width: 380px) { .visit-tools { grid-template-columns: 1fr 1fr; } }
/* --- Field: work link page, work links, subcontractors, profiles, truck checks, safety --- */
a.team-who { text-decoration: none; }
.person-photo { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; font-weight: 700; background: var(--accent); color: var(--primary-ink); flex: none; }
.person-photo.big { width: 72px; height: 72px; font-size: 1.4rem; }
.contractor-row { color: inherit; text-decoration: none; grid-template-columns: auto minmax(0, 1fr) auto auto; }
.contractor-row svg { width: 18px; height: 18px; color: var(--ink-soft); }
.profile-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.profile-head > div:nth-child(2) { flex: 1; min-width: 180px; }
.profile-head h1 { margin: 0; }
/* Team: a card per person; invites and inactive people look quieter. */
button.people-card { width: 100%; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--border); cursor: pointer; }
.people-card.inactive { opacity: .55; }
.people-card.pending { border-style: dashed; }
.people-card .person-photo.invite { background: var(--accent-soft); color: var(--accent); }
.people-card .person-photo.invite svg { width: 26px; height: 26px; }
.people-actions { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: center; margin-top: .2rem; }
.people-actions button { min-height: 0; padding: .35rem .6rem; font-size: .8rem; }
.people-actions button svg { width: 15px; height: 15px; }
/* The profile opens with the person's photo large and centered, the name and buttons under it. */
.profile-head:has(.person-photo.hero) { flex-direction: column; text-align: center; gap: .7rem; }
.profile-head:has(.person-photo.hero) > div { flex: none; min-width: 0; }
.profile-head:has(.person-photo.hero) .head-actions { justify-content: center; }
.person-photo.hero { width: min(200px, 55vw); height: min(200px, 55vw); font-size: 4rem; border: 3px solid var(--primary); box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
.profile-info p { margin: .3rem 0; }
.week-nav { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 1rem 0 .5rem; }
.week-nav h2 { margin: 0; font-size: 1.05rem; text-align: center; }
.week-nav button { min-width: 44px; font-size: 1.3rem; }
.day-bars { display: grid; gap: .45rem; }
.day-bar-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 90px; align-items: center; gap: .6rem; }
.day-bar-track { height: 12px; border-radius: 6px; background: var(--muted-soft); overflow: hidden; }
.day-bar { display: block; height: 100%; width: 0; border-radius: 0 4px 4px 0; background: var(--primary); }
.day-bar-row > span:last-child { text-align: right; }
.work-links-card .card-head h2 svg, .heat-card h2 svg, .hospital-card h2 svg { width: 18px; height: 18px; vertical-align: -3px; }
.work-link-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .4rem .75rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.work-link-actions { grid-column: 1 / -1; display: flex; gap: .5rem; }
.segmented { border: 0; padding: 0; margin: 0 0 .9rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.segmented legend { width: 100%; font-weight: 500; margin-bottom: .35rem; padding: 0; }
.segmented label { margin: 0; flex: 1 1 0; min-width: 60px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; text-align: center; padding: .55rem .4rem; border: 1px solid var(--input-border); border-radius: 9px; cursor: pointer; font-weight: 500; }
.segmented input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.truck-form .primary { width: 100%; min-height: 48px; font-size: 1.05rem; }
.crew-tools { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .9rem; }
/* The crew's home: a greeting over a faded map of where they are, the time clock card, then Up next. */
.crew-hero { position: relative; margin: 0 0 1rem; padding: 1rem 16px 1.6rem; overflow: hidden; min-height: 300px; border-radius: 22px; }
:where(:root.layout-860) .crew-hero { margin: -1rem -1rem 1rem; border-radius: 0; }
.crew-map { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.crew-map .maplibregl-canvas { outline: none; }
/* The map's colors are light; on the dark themes it is turned dark to match. */
.crew-map.shown { opacity: .45; filter: invert(1) hue-rotate(180deg) brightness(.85) saturate(.8); }
:root[data-theme="brillo-claro"] .crew-map.shown, :root[data-theme="light"] .crew-map.shown { opacity: .55; filter: none; }
.crew-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, var(--bg) 0%, transparent 28%, transparent 62%, var(--bg) 100%); }
.crew-hero-in { position: relative; z-index: 1; }
.crew-hero-top { display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 44px; }
.crew-hero-top .eyebrow { font-size: 1rem; color: var(--ink-soft); }
.crew-hero h1 { font-size: 2.2rem; line-height: 1.1; margin: .6rem 0 1.1rem; }
.crew-clock { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.2rem; margin: 0 0 .8rem; box-shadow: 0 8px 28px rgba(0, 0, 0, .25); }
.crew-clock > div { display: flex; flex-direction: column; gap: .15rem; }
.crew-clock strong { font-size: 1.15rem; }
.crew-clock button { display: inline-flex; align-items: center; gap: .45rem; padding: .7rem 1.1rem; font-size: 1.05rem; font-weight: 700; }
.crew-clock button svg { width: 20px; height: 20px; }
.crew-you { width: 18px; height: 18px; border-radius: 50%; background: #2f7cf6; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(47, 124, 246, .25); }
/* Translator (iPhone app): the translation under a message, the language on the chat's button, a translated email. */
.bubble-tr { margin-top: .35rem; padding-top: .35rem; border-top: 1px dashed var(--border); font-size: .92em; color: var(--ink-soft); white-space: pre-wrap; }
.chat-translate { position: relative; }
.chat-translate.on { color: var(--accent); }
.chat-translate small { position: absolute; bottom: -2px; right: -4px; font-size: .55rem; font-weight: 800; color: var(--accent); }
.gm-translated { margin: 0 0 1rem; padding: .9rem 1rem; border: 1px solid var(--accent); border-radius: 14px; background: var(--surface); }
.gm-translated-head { display: flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 700; color: var(--accent); margin-bottom: .5rem; }
.gm-translated-head svg { width: 16px; height: 16px; }
.gm-translated-head .link { margin-left: auto; font-size: .8rem; }
.gm-translated h2 { font-size: 1.1rem; margin: 0 0 .6rem; }
.gm-translated p { margin: 0 0 .6rem; line-height: 1.5; }
/* The translator screen: two languages in one card with a swap button between, and the three tabs at the bottom. */
/* The tabs sit at the end of the screen in the page flow, so they never cover the microphones or the text. */
.translator-screen { display: flex; flex-direction: column; gap: 1rem; min-height: calc(100dvh - 300px); padding-bottom: .5rem; }
/* Full screen: Proliox's top bar, menus and bottom bar step aside while the translator is open. */
html.tr-full .topbar, html.tr-full .nav, html.tr-full .subnav, html.tr-full #assist-open { display: none !important; }
html.tr-full .main { max-width: none; padding: 0; }
html.tr-full .translator-screen { position: fixed; inset: 0; z-index: 30; min-height: 0; overflow-y: auto; padding: calc(env(safe-area-inset-top) + .8rem) 16px calc(env(safe-area-inset-bottom) + 1rem); background: var(--bg); }
.tr-head { gap: .6rem; }
.tr-head h1 { flex: 1; }
.tr-close svg { width: 22px; height: 22px; }
.tr-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.tr-head h1 { margin: 0; font-size: 2.1rem; }
.translator-screen, .tr-card, .tr-talk { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; overflow-x: hidden; }
.tr-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: .3rem; padding: 1.1rem 1.2rem; border-radius: 22px; }
.tr-box > textarea, .tr-box > .tr-result { width: auto; min-width: 0; max-width: 100%; box-sizing: border-box; }
.tr-lang svg { width: 14px; height: 14px; vertical-align: -2px; margin-left: .25rem; }
.tr-lang { justify-self: start; min-height: 0; padding: .2rem 0; border: 0; background: none; color: var(--ink); font-weight: 700; font-size: 1rem; }
.tr-lang.to { color: var(--accent); }
.tr-lang span { font-size: .7rem; opacity: .7; margin-left: .2rem; }
.tr-box { display: flex; align-items: flex-start; gap: .6rem; }
.tr-box textarea { flex: 1; min-height: 90px; border: 0; background: transparent; box-shadow: none; padding: .2rem 0; font-size: 1.6rem; font-weight: 700; color: var(--ink); resize: none; outline: none; }
.tr-box textarea::placeholder { color: var(--ink-soft); opacity: .6; }
.tr-result { flex: 1; min-height: 90px; margin: 0; padding: .2rem 0; font-size: 1.6rem; font-weight: 700; color: var(--accent); white-space: pre-wrap; }
.tr-mic { flex: none; width: 44px; height: 44px; min-height: 0; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--ink); }
.tr-mic svg { width: 28px; height: 28px; }
.tr-mic.on, .tr-talk-mic.on { color: var(--primary-ink); background: var(--primary); box-shadow: 0 0 22px rgba(255, 138, 0, .6); }
.tr-mid { position: relative; height: 1px; margin: 1rem 0; background: var(--line); }
.tr-swap { width: 46px; height: 46px; min-height: 0; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); background: var(--bg); color: var(--accent); }
.tr-mid .tr-swap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.tr-swap svg { width: 22px; height: 22px; }
.tr-swap.small { width: 36px; height: 36px; }
.tr-tools { display: flex; gap: .5rem; justify-content: flex-end; }
.tr-tools button { display: inline-flex; align-items: center; gap: .35rem; }
.tr-tools svg { width: 18px; height: 18px; }
.tr-tabs { margin: auto auto 0; padding: .35rem; display: flex; gap: .2rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }

.tr-tabs button { display: flex; flex-direction: column; align-items: center; gap: .1rem; min-height: 0; padding: .45rem 1.1rem; border: 0; border-radius: 999px; background: none; color: var(--ink); font-size: .75rem; font-weight: 700; }
.tr-tabs button svg { width: 24px; height: 24px; }
.tr-tabs button.on { background: var(--bg); color: var(--accent); }
.tr-pair { display: flex; align-items: center; justify-content: center; gap: .8rem; margin-bottom: .6rem; }
.tr-photo { width: 100%; max-height: 320px; object-fit: contain; border-radius: 14px; background: #000; }
.tr-read p, .tr-out p { margin: .2rem 0 .6rem; font-size: 1.05rem; }
.tr-camera .tr-out { padding: .8rem 1rem; border: 1px solid var(--accent); border-radius: 14px; }
.tr-shoot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-top: .8rem; }
.tr-shoot > button:first-child { justify-self: start; width: 52px; height: 52px; min-height: 0; padding: 0; display: grid; place-items: center; border-radius: 50%; }
.tr-shoot svg { width: 24px; height: 24px; }
.tr-shutter { width: 72px; height: 72px; min-height: 0; padding: 0; border-radius: 50%; border: 4px solid var(--ink); background: var(--surface); box-shadow: inset 0 0 0 4px var(--bg); }
.tr-talk { display: flex; flex-direction: column; gap: .8rem; flex: 1; }
.tr-log { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: .7rem; min-height: 200px; }
.tr-talk-hint { text-align: center; margin: auto 1rem; }
.tr-bubble { max-width: 85%; padding: .8rem 1rem; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); }
.tr-bubble.from { align-self: flex-start; border-bottom-left-radius: 6px; }
.tr-bubble.to { align-self: flex-end; border-bottom-right-radius: 6px; }
.tr-bubble p { margin: .15rem 0 0; font-size: 1.15rem; font-weight: 700; }
.tr-bubble .tr-bubble-out { color: var(--accent); font-weight: 600; font-size: 1rem; }
.tr-talk-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .6rem; }
.tr-talk-mic { display: flex; flex-direction: column; align-items: center; gap: .2rem; min-height: 0; padding: .7rem .4rem; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font-weight: 700; font-size: .85rem; }
.tr-talk-mic svg { width: 30px; height: 30px; color: var(--accent); }
.tr-talk-mic.on svg { color: var(--primary-ink); }
.tr-listening { text-align: center; }
.tr-sheet .modal-body { display: grid; gap: .1rem; }
.tr-sheet-row { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: .4rem .2rem; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; color: var(--ink); font-size: 1.05rem; text-align: left; }
.tr-sheet-row.on { color: var(--accent); font-weight: 700; }
.tr-get svg { width: 24px; height: 24px; color: var(--accent); }
.translator { display: grid; gap: .8rem; }
.tr-to { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.tr-to button.on { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.translator textarea { width: 100%; font-size: 1.05rem; }
.tr-out { padding: 1rem; border: 1px solid var(--accent); border-radius: 14px; font-size: 1.15rem; line-height: 1.5; white-space: pre-wrap; }
/* Google in the iPhone app, above Clerk's box (whose own Google button is hidden there). */
.native-google { margin-bottom: .6rem; }
.native-google-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: .6rem; min-height: 48px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: #1f1f1f; font-weight: 600; font-size: 1rem; }
.native-google-btn:disabled { opacity: .6; }
.native-or { display: flex; align-items: center; gap: .7rem; margin: .9rem 0 .2rem; color: var(--ink-soft); font-size: .85rem; }
.native-or::before, .native-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.crew-chat-tab { position: relative; }
.crew-chat-tab .bell-count { position: absolute; top: .2rem; left: calc(50% + 4px); }
.crew-next { font-size: 1.6rem; margin: .4rem 0 .7rem; }
.crew-empty { text-align: center; padding: 2rem 1.2rem; color: var(--ink-soft); font-size: 1.05rem; }
/* The crew's tools on More: round buttons in rows of three, like the + menu. */
.crew-round { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); justify-items: center; gap: 1rem .5rem; margin: .4rem 0 1.4rem; }
:where(:root:not(.layout-phone)) .crew-round { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.crew-round .fan-item { position: static; margin: 0; width: min(100px, 27vw); height: min(100px, 27vw); text-decoration: none; text-align: center; line-height: 1.1; }
.crew-round .fan-item span { font-size: .8rem; padding: 0 .3rem; }
.crew-tools .btn svg, .head h1 svg { width: 20px; height: 20px; vertical-align: -3px; }
.safety-help { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: .6rem; margin-bottom: 1rem; }
.safety-help button { min-height: 56px; font-weight: 600; }
.safety-sos, .work-sos { background: var(--bad); border-color: var(--bad); color: #fff; }
.safety-sos:hover, .work-sos:hover { background: #9f1239; }
.safety-sos svg, .work-sos svg { width: 20px; height: 20px; vertical-align: -4px; }
a.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.heat-card { border-left: 5px solid var(--ok); }
.heat-card.heat-caution { border-left-color: var(--primary); }
.heat-card.heat-moderate { border-left-color: #eab308; }
.heat-card.heat-high, .heat-card.heat-extreme { border-left-color: var(--bad); }
.tips { margin: .4rem 0 .6rem; padding-left: 1.2rem; }
.tips li { margin: .25rem 0; }
.hospital-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.hospital-actions { display: flex; gap: .4rem; }
.hospital-actions .btn svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: .25rem; }
.work-page { max-width: 560px; margin: 0 auto; padding: 1rem 16px 2rem; }
.work-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.work-hi { font-size: 1.15rem; font-weight: 600; margin: .6rem 0; }
.work-status { font-weight: 600; justify-content: flex-start; }
.work-status svg { width: 20px; height: 20px; }
.work-job h1 { margin: 0 0 .2rem; font-size: 1.35rem; }
.work-job p { margin: .35rem 0; }
.work-map { display: inline-flex; align-items: center; gap: .4rem; margin-top: .3rem; }
.work-map svg { width: 18px; height: 18px; }
.work-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin: 1rem 0 .6rem; }
.work-big { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem; min-height: 104px; font-size: 1.08rem; font-weight: 600; border-radius: 14px; }
.work-big svg { width: 30px; height: 30px; }
.work-big.primary { grid-column: 1 / -1; min-height: 84px; flex-direction: row; font-size: 1.25rem; }
.work-big.finish { background: var(--ok); border-color: var(--ok); color: #fff; }
.work-big.finish:hover { background: #065f46; }
.work-share { margin-bottom: 1rem; }
.work-help { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1.2rem; }
.work-help button { min-height: 52px; font-weight: 600; }
.work-page .job-files span { aspect-ratio: 1; overflow: hidden; border-radius: 10px; display: block; }
body.work-view .toast { bottom: 1rem; }
/* (max-width: 600px) */
  :where(:root.layout-phone) .safety-help{ grid-template-columns: 1fr 1fr; }
  :where(:root.layout-phone) .safety-help .safety-sos{ grid-column: 1 / -1; }
  :where(:root.layout-phone) .day-bar-row{ grid-template-columns: 56px minmax(0, 1fr) 76px; }
.modal-foot a.btn { display: inline-flex; align-items: center; gap: .35rem; }
.modal-foot a.btn svg { width: 18px; height: 18px; }
.work-big.finish { grid-column: 1 / -1; min-height: 72px; flex-direction: row; }
.work-view .modal-body textarea { width: 100%; box-sizing: border-box; }
/* (max-width: 600px) */ :where(:root.layout-phone) .stats.two{ grid-template-columns: 1fr 1fr; } 
.safety-help svg { width: 20px; height: 20px; vertical-align: -4px; }
.safety-sos, .work-sos, a.btn.danger { background: #dc2626; border-color: #dc2626; color: #fff; }
.safety-sos:hover, .work-sos:hover, a.btn.danger:hover { background: #b91c1c; border-color: #b91c1c; }

/* --- Browser and Inbox --- */
.browser-bar { display: flex; gap: .5rem; margin-bottom: .8rem; }
.browser-bar input { flex: 1; min-width: 0; font-size: 1.05rem; }
.browser-bar button { min-width: 64px; }
.clip-row { align-items: flex-start; }
.clip-open { text-align: left; padding: 0; font-weight: 600; overflow-wrap: anywhere; }
/* (max-width: 600px) */
  /* Full screen on the phone, above the app's bars, with its own way back. */
  :where(:root.layout-phone) .inbox-screen{ position: fixed; inset: 0; z-index: 40; overflow-y: auto; background: var(--bg); padding: calc(env(safe-area-inset-top) + 12px) 16px calc(env(safe-area-inset-bottom) + 24px); }
  :where(:root.layout-phone) .inbox-back{ display: inline-block; margin-bottom: .4rem; }
  :where(:root.layout-phone) .inbox-head{ flex-wrap: wrap; }
.legal-summary { background: #fff4e6; border: 1px solid #ffd8a8; border-radius: 12px; padding: .2rem 1.1rem .6rem; margin: 1rem 0 1.4rem; }
.legal-page h3 { font-size: 1rem; margin: 1rem 0 .3rem; }
.optional-tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; vertical-align: middle; margin-left: .4rem; }
.settings-nav-label { margin: .9rem .6rem .2rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.settings-nav a.settings-extra { display: flex; align-items: center; gap: .45rem; }
.settings-nav a.settings-extra svg { width: 16px; height: 16px; }
.settings-team-card { display: none; }
/* (max-width: 600px) */
  :where(:root.layout-phone) .settings-team-card{ display: block; }
  :where(:root.layout-phone) .settings-nav .settings-extra{ display: none; }

/* (max-width: 600px) */ :where(:root.layout-phone) .settings-nav a.settings-extra, :where(:root.layout-phone) .settings-nav span.settings-extra{ display: none; } 

.tag-link { border: 0; cursor: pointer; min-height: 0; font: inherit; font-size: .75rem; font-weight: 600; }
.tag-link:hover { text-decoration: underline; background: var(--accent-soft); }
.person-link { display: inline-flex; text-decoration: none; }
.person-name { color: inherit; text-decoration: none; }
.person-name:hover strong { text-decoration: underline; }
.team-strip { display: flex; gap: .9rem; overflow-x: auto; padding: .2rem .1rem .4rem; scrollbar-width: thin; }
.team-person { display: flex; flex-direction: column; align-items: center; gap: .2rem; min-width: 64px; color: inherit; text-decoration: none; text-align: center; }
.team-person:hover .team-person-name { text-decoration: underline; }
.team-person-photo { border-radius: 50%; padding: 2px; border: 2px solid transparent; }
.team-person-photo.working { border-color: var(--ok); }
.team-person-photo .person-photo { width: 52px; height: 52px; }
.team-person-name { font-weight: 600; font-size: .9rem; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .8rem; }
.people-card { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; color: inherit; text-decoration: none; padding: 1.1rem .8rem; margin: 0; }
.people-card:hover { background: var(--hover); }
.people-name { font-size: 1.02rem; overflow-wrap: anywhere; }
.ok-text { color: var(--ok); font-weight: 600; }
/* (max-width: 600px) */ :where(:root.layout-phone) .people-grid{ grid-template-columns: 1fr 1fr; } 
/* An email to read: Proliox's own look, bigger text and room between lines. */
.mail-read { font-size: 1.04rem; line-height: 1.65; overflow-wrap: anywhere; max-width: 72ch; }
.mail-read p { margin: 0 0 .9em; }
.mail-read div + div { margin-top: .35em; }
.mail-read h1, .mail-read h2, .mail-read h3, .mail-read h4, .mail-read h5, .mail-read h6 { font-size: 1.15rem; line-height: 1.35; margin: 1em 0 .5em; }
.mail-read a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.mail-read img { display: block; max-width: 100%; height: auto; margin: .8em 0; border-radius: 8px; }
.mail-read ul, .mail-read ol { padding-left: 1.4em; margin: 0 0 .9em; }
.mail-read li { margin: .25em 0; }
.mail-read hr { border: 0; border-top: 1px solid var(--line); margin: 1.2em 0; }
.mail-read pre, .mail-read code { white-space: pre-wrap; font-size: .92rem; }
.mail-read blockquote { margin: .6em 0; padding-left: .9em; border-left: 3px solid var(--line); color: var(--ink-soft); }
.mail-fold { margin-top: 1em; }
.mail-fold summary { display: inline-block; cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--ink-soft); padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 999px; list-style: none; }
.mail-fold summary::-webkit-details-marker { display: none; }
.mail-fold[open] summary { margin-bottom: .6em; }
/* --- Inbox, laid out like the Gmail app --- */
/* The inbox in Proliox's own colors; they follow the chosen theme, light or dark. */
.gm-avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; font-size: 1.15rem; font-weight: 500; background: #5f6368; }
.gm-search { display: flex; align-items: center; gap: .5rem; background: var(--gm-surface); border: 1px solid var(--border); border-radius: 999px; padding: .35rem .45rem .35rem .6rem; margin: .2rem 0 1rem; }
.gm-search input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--gm-text); font-size: 1.05rem; padding: .55rem .2rem; outline: none; box-shadow: none; }
.gm-search input::placeholder { color: var(--gm-muted); }
.gm-search-back, .gm-search-refresh { display: grid; place-items: center; width: 36px; height: 36px; min-height: 0; padding: 0; border: 0; background: none; color: var(--gm-muted); border-radius: 50%; }
.gm-search-back svg, .gm-search-refresh svg { width: 22px; height: 22px; }
.gm-me { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; font-size: .85rem; }
.gm-section { margin: 0 0 .5rem .2rem; font-size: .95rem; font-weight: 500; color: var(--gm-muted); letter-spacing: .02em; }
.gm-list { display: grid; gap: 4px; padding-bottom: 6rem; }
.gm-row { display: flex; gap: .9rem; align-items: flex-start; padding: .85rem .9rem; background: var(--gm-row); border: 1px solid var(--border); border-radius: 18px; color: inherit; text-decoration: none; }
.gm-row:hover { filter: brightness(1.1); }
.gm-main { flex: 1; min-width: 0; display: grid; gap: .1rem; }
.gm-line { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.gm-from { flex: 1; min-width: 0; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-when { flex: none; font-size: .8rem; color: var(--gm-muted); }
.gm-subj { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-snip { color: var(--gm-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
.gm-row.unread .gm-from, .gm-row.unread .gm-subj, .gm-row.unread .gm-when { font-weight: 700; color: var(--gm-text); }
.gm-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gm-blue); flex: none; }
.gm-empty { padding: 2rem 1rem; text-align: center; color: var(--gm-muted); }
.gm-note { margin-top: .5rem; }
.gm-compose { position: fixed; right: 18px; bottom: calc(env(safe-area-inset-bottom) + 24px); z-index: 45; display: inline-flex; align-items: center; gap: .6rem; padding: .95rem 1.4rem; border: 0; border-radius: 18px; background: var(--primary); color: var(--primary-ink); font-size: 1.05rem; font-weight: 700; box-shadow: 0 0 20px rgba(255, 138, 0, .45); }
.gm-compose svg { width: 22px; height: 22px; }
.gm-compose:hover { background: var(--primary); filter: brightness(1.08); }
.gm-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: 1rem; }
.gm-round, .gm-tool { display: grid; place-items: center; width: 46px; height: 46px; min-height: 0; padding: 0; border-radius: 50%; border: 1px solid var(--border); background: var(--gm-surface); color: var(--accent); }
.gm-round svg, .gm-tool svg { width: 24px; height: 24px; }
.gm-tools { display: flex; gap: .3rem; background: var(--gm-surface); border: 1px solid var(--border); border-radius: 999px; padding: 0 .3rem; }
.gm-tools .gm-tool { background: none; }
.gm-subject { font-size: 1.55rem; font-weight: 400; line-height: 1.3; margin: 0 0 1.1rem; overflow-wrap: anywhere; }
.gm-chip { display: inline-block; vertical-align: middle; font-size: .8rem; font-weight: 500; padding: .15rem .45rem; border-radius: 6px; background: var(--primary); color: var(--primary-ink); }
.gm-sender { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.gm-sender-text { min-width: 0; flex: 1; }
.gm-sender-line { display: flex; align-items: baseline; gap: .6rem; }
.gm-sender-line strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-time { color: var(--gm-muted); font-size: .85rem; flex: none; }
.gm-to { color: var(--gm-muted); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-to a { color: var(--gm-blue); }
.gm-body { border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); max-width: 100%; }
.gm { max-width: 100vw; overflow-x: hidden; }
.gm-body .mail-read { padding: .9rem 1rem; }
/* The email's sealed box: nothing inside can reach outside it, even something placed "fixed" on the screen. */
.mail-sealed { position: relative; overflow: hidden; contain: layout paint; transform: translateZ(0); max-width: 100%; }
.gm-files { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.gm-files p { width: 100%; margin: 0; }
.gm-file { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .8rem; border-radius: 10px; background: var(--gm-surface); font-size: .9rem; }
.gm-file svg { width: 18px; height: 18px; }
.gm-file small { color: var(--gm-muted); }
.gm-open { padding-bottom: 6.5rem !important; }
.gm-actions { position: sticky; bottom: calc(env(safe-area-inset-bottom) + 8px); display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1.2rem; }
.gm-action { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 54px; border: 0; border-radius: 999px; background: var(--gm-blue); color: var(--gm-blue-ink); font-size: 1.1rem; font-weight: 500; }
.gm-action svg { width: 22px; height: 22px; }
.gm-action:hover { filter: brightness(1.08); background: var(--gm-blue); }
/* (min-width: 601px) */ :where(:root:not(.layout-phone)) .gm-compose{ bottom: 28px; right: 28px; } :where(:root:not(.layout-phone)) .gm-open{ max-width: 900px; } 
/* (max-width: 600px) */ :where(:root.layout-phone) .gm-actions{ position: fixed; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 12px); z-index: 46; margin: 0; } 

/* Writing an email, full screen like Gmail */
dialog.gm-dialog { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: var(--bg); }
dialog.gm-dialog::backdrop { background: rgba(0, 0, 0, .6); }
/* (min-width: 701px) */ :where(:root:not(.layout-700)) dialog.gm-dialog{ width: 680px; height: min(760px, 92vh); margin: auto; border-radius: 22px; } 
.gm-sheet { display: flex; flex-direction: column; height: 100%; padding: calc(env(safe-area-inset-top) + 10px) 16px calc(env(safe-area-inset-bottom) + 10px); background: var(--bg); color: var(--gm-text); }
.gm-sheet-top { display: flex; align-items: center; gap: .7rem; margin-bottom: .6rem; }
.gm-sheet-title { flex: 1; font-size: 1.05rem; font-weight: 500; color: var(--gm-muted); }
.gm-send svg { width: 24px; height: 24px; }
.gm-send:disabled { opacity: .5; }
.gm-field { display: flex; align-items: center; gap: .8rem; margin: 0; padding: .9rem .3rem; border-bottom: 1px solid var(--line); font-weight: 400; }
.gm-field > span:first-child { color: var(--gm-muted); min-width: 3.2rem; }
.gm-field input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--gm-text); font-size: 1.05rem; padding: 0; box-shadow: none; outline: none; }
.gm-field input::placeholder, .gm-compose-text::placeholder { color: var(--gm-muted); }
.gm-from-address { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-suggest { padding: .8rem .3rem .4rem; border-bottom: 1px solid var(--line); }
.gm-suggest-title { margin: 0 0 .7rem; font-weight: 600; }
.gm-suggest-row { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: .4rem; }
.gm-person { display: flex; flex-direction: column; align-items: center; gap: .4rem; width: 84px; flex: none; min-height: 0; padding: 0; border: 0; background: none; color: var(--gm-text); font-weight: 400; }
.gm-person .gm-avatar { width: 64px; height: 64px; font-size: 1.6rem; }
.gm-person span:last-child { width: 100%; font-size: .85rem; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: center; overflow-wrap: anywhere; }
.gm-compose-text { flex: 1; min-height: 200px; margin-top: .4rem; padding: .9rem .3rem; border: 0; background: transparent; color: var(--gm-text); font: inherit; font-size: 1.05rem; line-height: 1.5; resize: none; box-shadow: none; outline: none; }
.gm-sheet .form-error { margin: .4rem 0; }
/* Permission switches */
.perm-list { display: grid; gap: 0; margin-top: .6rem; }
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: .9rem; padding: .65rem 0; border-top: 1px solid var(--line); margin: 0; font-weight: 400; cursor: pointer; }
.perm-row:first-child { border-top: 0; }
.perm-text { display: grid; gap: .1rem; min-width: 0; }
.perm-text strong { font-size: .98rem; }
input.switch { appearance: none; -webkit-appearance: none; flex: none; width: 50px; height: 30px; margin: 0; padding: 0; border-radius: 999px; border: 0; background: var(--muted-soft); position: relative; cursor: pointer; transition: background .15s; box-shadow: inset 0 0 0 1px var(--line); }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .15s; }
input.switch:checked { background: var(--ok); box-shadow: none; }
input.switch:checked::after { transform: translateX(20px); }
input.switch:disabled { opacity: .55; cursor: default; }
input.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.perm-person { border: 1px solid var(--line); border-radius: 12px; padding: .6rem .9rem .3rem; margin: .8rem 0; }
.perm-person legend { font-weight: 600; padding: 0 .3rem; }
.team-perm-note { margin: -.2rem 0 .7rem; }

/* --- Computer (wider than 899px): the menu stays across the top, with larger titles and figures like the iPhone's. --- */
:root:not(.layout-899) .layout .main { padding: 2rem 2.25rem 3rem; }
:root:not(.layout-899) .layout h1 { font-size: 2rem; letter-spacing: -.025em; }
:root:not(.layout-899) .layout .stats { gap: 1rem; margin-bottom: 1.25rem; }
:root:not(.layout-899) .layout .stat { padding: 1.15rem 1.35rem; }
:root:not(.layout-899) .layout .stat .value { font-size: 2.1rem; font-weight: 700; }
:root:not(.layout-899) .layout .card { padding: 1.2rem 1.4rem; margin-bottom: 1.25rem; }
:root[data-theme^="brillo"]:not(.layout-phone) .layout > .nav:not(.phone-nav) { border-bottom: 1.5px solid var(--border); box-shadow: 0 4px 18px rgba(var(--glow-rgb), .12); }

/* --- Night glow and Light glow on a computer: the glow also reaches search, fields, tables, windows, menus and buttons --- */
:root[data-theme^="brillo"]:not(.layout-phone) { --halo: 0 0 12px rgba(var(--glow-rgb), .24); --halo-strong: 0 0 24px rgba(var(--glow-rgb), .4); }
:root[data-theme="brillo-claro"]:not(.layout-phone) { --halo: 0 0 10px rgba(255, 138, 0, .18); --halo-strong: 0 0 18px rgba(255, 138, 0, .3); }
:root[data-theme^="brillo"]:not(.layout-phone) .searchbox input { border: 1.5px solid var(--border); box-shadow: var(--halo); }
:root[data-theme^="brillo"]:not(.layout-phone) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(.switch), select, textarea) { transition: border-color .15s, box-shadow .15s; }
:root[data-theme^="brillo"]:not(.layout-phone) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(.switch), select, textarea):hover { box-shadow: var(--halo); }
:root[data-theme^="brillo"]:not(.layout-phone) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(.switch), select, textarea):focus { border-color: var(--primary); box-shadow: var(--halo-strong); }
:root[data-theme^="brillo"]:not(.layout-phone) th { border-bottom: 1.5px solid var(--border); }
:root[data-theme^="brillo"]:not(.layout-phone) tbody tr { transition: background .15s; }
:root[data-theme^="brillo"]:not(.layout-phone) tbody tr:hover { background: var(--accent-soft); }
:root[data-theme^="brillo"]:not(.layout-phone) dialog:not(.fan-dialog):not(.viewer-dialog):not(.markup-dialog):not(.gm-dialog) { border: 1.5px solid var(--border); box-shadow: var(--halo-strong), var(--shadow); }
:root[data-theme^="brillo"]:not(.layout-phone) .modal-title { border-bottom: 1px solid var(--border); }
:root:is([data-theme="brillo"], [data-theme^="brillo-"]:not([data-theme="brillo-claro"])):not(.layout-phone) dialog::backdrop { background: rgba(0, 0, 0, .6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
:root[data-theme^="brillo"]:not(.layout-phone) :is(.account-menu, .results) { border-width: 1.5px; box-shadow: var(--halo-strong), var(--shadow); }
:root[data-theme^="brillo"]:not(.layout-phone) .tabs { border: 1.5px solid var(--border); box-shadow: var(--halo); }
:root[data-theme^="brillo"]:not(.layout-phone) .icon-button { border: 1.5px solid var(--border); box-shadow: var(--halo); }
:root[data-theme^="brillo"]:not(.layout-phone) :is(.head-actions, .modal-foot, .card-head) :is(button, .btn):not(.primary):not(.spark):not(.link) { border: 1.5px solid var(--border); }
:root[data-theme^="brillo"]:not(.layout-phone) :is(.head-actions, .modal-foot, .card-head) :is(button, .btn):hover { box-shadow: var(--halo-strong); }
:root[data-theme^="brillo"]:not(.layout-phone) :is(a.stat, button.stat, a.card) { transition: box-shadow .2s, transform .2s; }
:root[data-theme^="brillo"]:not(.layout-phone) :is(a.stat, button.stat, a.card):hover { box-shadow: var(--halo-strong); transform: translateY(-2px); }
:root[data-theme^="brillo"]:not(.layout-phone) .settings-nav a.on { border: 1.5px solid var(--border); box-shadow: var(--halo); }
/* ---- Computer (option Q): a header, one row of tabs with every screen, and round orange icons on the figures ---- */
:root:not(.layout-phone) .layout.has-tabs > .topbar { padding: .7rem 2rem; border-bottom: 1px solid var(--line); }
:root:not(.layout-phone) .layout.has-tabs > .nav { gap: 1.5rem; padding: 0 2rem; background: var(--top-bg); border-bottom: 1px solid var(--line); box-shadow: none; }
:root:not(.layout-phone) .layout.has-tabs > .nav a { padding: .7rem 0 .6rem; font-size: .9rem; font-weight: 600; border-bottom-width: 2px; }
:root:not(.layout-phone) .layout.has-tabs > .nav a.on { font-weight: 700; }
:root:not(.layout-phone) .layout.has-tabs > .main { width: 100%; max-width: 1320px; }
.stat-ic { display: none; }
:root:not(.layout-phone) .stat-ic { order: -2; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; margin-bottom: .6rem; color: var(--accent); background: var(--accent-soft); border-radius: 50%; }
:root:not(.layout-phone) .stat-ic svg { width: 19px; height: 19px; }
:root:not(.layout-phone) .layout .stat .value { order: 0; margin: .15rem 0 0; }
:root:not(.layout-phone) .figure { display: flex; flex-direction: column; align-items: flex-start; }
/* Calmer surfaces on the dark and light glow looks: a thin orange edge instead of a glow on everything. */
:root[data-theme^="brillo"]:not(.layout-899) { --border: rgba(var(--glow-rgb), .26); --line: rgba(255, 255, 255, .07); --lift: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px rgba(0, 0, 0, .35); --radius: 14px; --halo: 0 0 0 3px rgba(var(--glow-rgb), .12); --halo-strong: 0 0 0 3px rgba(var(--glow-rgb), .22); }
:root[data-theme="brillo-claro"]:not(.layout-899) { --border: rgba(255, 138, 0, .3); --line: #ececf0; --lift: 0 1px 2px rgba(18, 18, 20, .05), 0 6px 20px rgba(18, 18, 20, .05); }
:root[data-theme^="brillo"]:not(.layout-899) :is(.card, .stat, .visit-card) { border-width: 1px; }
:root[data-theme^="brillo"]:not(.layout-899) :is(.bell, .avatar) { border-width: 1px; box-shadow: none; }
:root[data-theme^="brillo"]:not(.layout-899) :is(.bell, .avatar):hover { border-color: var(--primary); }
:root[data-theme^="brillo"]:not(.layout-899) :is(.spark, button.primary) { box-shadow: 0 4px 14px rgba(var(--glow-rgb), .28); }
:root[data-theme^="brillo"]:not(.layout-899) :is(a.stat, button.stat, a.card):hover { border-color: rgba(var(--glow-rgb), .6); box-shadow: var(--lift); transform: translateY(-1px); }
:root[data-theme^="brillo"]:not(.layout-899) .searchbox input { border-width: 1px; box-shadow: none; }
:root:not(.layout-899) .layout .stat .title { color: var(--ink-soft); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
:root:not(.layout-899) .layout .card h2 { font-size: 1rem; }
:root:not(.layout-899) .layout h1 { font-weight: 800; }
/* Team hours inside Team on a computer */
.team-hours-part { margin: 2rem 0; padding: 1.5rem 0 .5rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.part-title { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: 1.3rem; }
.part-title > svg { width: 22px; height: 22px; flex: none; color: var(--accent); }

/* Today on a computer (option 5): the map fills the screen and the cards float on it */
.today-stage { position: relative; height: max(600px, calc(100vh - 150px)); margin-bottom: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.today-stage #today-map, .today-stage .map-box { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; }
.today-stage :is(.map-heading, .map-stops, .map-note, #today-map > p) { display: none; }
.today-stage .maplibregl-ctrl-top-right { top: 130px; }
.stage-top, .stage-left, .stage-right { position: absolute; z-index: 2; }
.stage-top { top: 1rem; left: 1rem; right: 1rem; display: flex; gap: .75rem; align-items: stretch; }
.stage-top .figures { flex: 1; margin: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stage-left { left: 1rem; bottom: 1rem; width: min(440px, 42%); }
.stage-right { right: 1rem; bottom: 1rem; width: min(380px, 34%); }
.today-stage :is(.figure, .card, .weather-chip) { margin: 0; background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.today-stage .figure { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: .6rem; padding: .7rem .9rem; border-radius: 12px; }
.today-stage .figure .stat-ic { margin: 0; width: 32px; height: 32px; }
.today-stage .figure-label { flex: 1; }
.today-stage .figure b { width: 100%; font-size: 1.3rem; }
.today-stage .figure .small { display: none; }
.today-stage .card { max-height: 300px; overflow-y: auto; padding: .9rem 1.1rem; }
.today-stage .weather-chip { flex: none; border-radius: 12px; }
:root:is([data-theme="brillo"], [data-theme^="brillo-"]:not([data-theme="brillo-claro"])) .today-stage .maplibregl-canvas { filter: invert(.92) hue-rotate(180deg) brightness(.85) contrast(.95); }
.today-stage .stage-right .card { max-height: 360px; }
/* The visit opened from a pin on Today's map: a panel that always stays inside the map */
.stage-pin { position: absolute; z-index: 4; top: 112px; left: 1rem; width: min(360px, 40%); max-height: calc(100% - 112px - 1rem); display: flex; flex-direction: column; overflow: hidden; background: color-mix(in srgb, var(--surface) 96%, transparent); border: 1px solid rgba(255, 138, 0, .55); border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: stage-pin-in .18s ease-out; }
.stage-pin-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
.stage-pin-head .icon-button { width: 32px; height: 32px; }
.stage-pin-head .icon-button svg { width: 16px; height: 16px; }
.stage-pin-body { overflow-y: auto; }
.stage-pin .map-card-head { background: var(--accent-soft); }
.stage-pin .map-card-body { font-size: .88rem; }
.today-stage .map-pin.picked .map-pin-drop { background: var(--primary); box-shadow: 0 0 0 4px rgba(255, 138, 0, .35), 0 2px 6px rgba(0, 0, 0, .5); }
.today-stage .map-pin { cursor: pointer; }
@keyframes stage-pin-in { from { opacity: 0; transform: translateY(6px); } }
/* On a computer the logo opens the same page as More on the phone, in a panel at the right */
.more-drawer { position: fixed; top: 64px; right: 1rem; left: auto; width: 380px; max-height: calc(100vh - 80px); padding: 1rem; overflow-y: auto; background: var(--bg); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); z-index: 40; }
.more-drawer .card { margin-bottom: .9rem; }
.more-drawer .more-logo { width: 104px; height: 104px; }
.more-drawer .more-hero h1 { font-size: 1.25rem; }
.more-drawer .more-row { min-height: 52px; padding: .5rem 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--ink); }
.more-drawer .more-row:last-child { border-bottom: 0; }
.more-drawer .more-row:hover { color: var(--accent); }
.more-drawer .more-row span { font-size: .98rem; }
.more-drawer .danger-text, .more-drawer .danger-text svg { color: var(--bad); }
.more-drawer .legal-note { margin: .25rem 0 0; text-align: center; font-size: .78rem; color: var(--ink-soft); }
/* Today on a computer fits the window: the map takes whatever height is left under the header and tabs */
:root:not(.layout-phone) .layout:has(.today-stage) { display: flex; flex-direction: column; height: 100vh; min-height: 0; overflow: hidden; }
:root:not(.layout-phone) .layout:has(.today-stage) > .main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-top: 1rem; padding-bottom: 1rem; }
:root:not(.layout-phone) .layout:has(.today-stage) .today-stage { flex: 1; height: auto; min-height: 420px; }
:root:not(.layout-phone) .layout:has(.today-stage) .stage-left .card, :root:not(.layout-phone) .layout:has(.today-stage) .stage-right .card { max-height: calc(100vh - 420px); }:root:not(.layout-phone) .layout:has(.today-stage) > .main { max-width: none; padding-left: 1.5rem; padding-right: 1.5rem; }

/* The logo panel on a computer: smaller and tighter (beats the page heading and glow-theme sizes) */
:root .layout .more-drawer .more-hero { padding: 1rem .75rem .9rem; }
:root .layout .more-drawer .more-hero h1 { margin-top: .45rem; font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
:root .layout .more-drawer .more-hero .small { font-size: .8rem; }
:root .layout .more-drawer .more-logo { width: 76px; height: 76px; margin: 6px; outline-width: 3px; outline-offset: 3px; }
:root .layout .more-drawer .card { padding: .35rem .9rem; margin-bottom: .7rem; }
:root .layout .more-drawer .more-hero.card { padding: 1rem .75rem .9rem; }
:root[data-theme] .layout .more-drawer .more-row, :root[data-theme] .layout .more-drawer .more-row:first-child { min-height: 42px; padding: .4rem 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
:root[data-theme] .layout .more-drawer .more-row:last-child { border-bottom: 0; }
:root .layout .more-drawer .more-row span { font-size: .9rem; }
:root .layout .more-drawer .more-row svg { width: 18px; height: 18px; }
:root .layout .more-drawer { width: 330px; padding: .8rem; }.today-stage .maplibregl-ctrl-attrib.maplibregl-compact:not(.maplibregl-compact-show) { opacity: .45; }

/* Lists on a computer (Clients, Quotes, Jobs): title, filter pills, search and the main button on one line, then a clean table */
.list-head { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-bottom: 1rem; }
.list-head h1 { margin-right: .25rem; }
.list-head .head-actions { margin-left: auto; align-items: center; }
.list-head .head-actions .search, .list-head .head-actions input[type="search"] { min-width: 220px; }
.pill-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.pill-filter { min-height: 0; padding: .32rem .8rem; color: var(--ink-soft); font-size: .85rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; box-shadow: none; }
.pill-filter b { margin-left: .2rem; color: var(--ink); font-weight: 700; }
.pill-filter:hover { color: var(--ink); border-color: var(--border); }
.pill-filter.on { color: var(--accent); background: var(--accent-soft); border-color: rgba(255, 138, 0, .45); }
.pill-filter.on b { color: var(--accent); }
.list-filters { align-items: flex-end; margin-bottom: .75rem; }
.list-count { margin-left: auto; align-self: center; }
.list-strip { display: flex; margin-bottom: 1rem; padding: .7rem 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.list-strip > div { flex: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .5rem; padding: 0 1.1rem; border-right: 1px solid var(--line); }
.list-strip > div:last-child { border-right: 0; }
.list-strip span:first-child { width: 100%; color: var(--ink-soft); font-size: .76rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.list-strip b { color: var(--accent); font-size: 1.3rem; font-weight: 700; }
.bad-text { color: var(--bad) !important; }
.row-who { display: flex; align-items: center; gap: .65rem; color: inherit; text-decoration: none; }
.row-who .name { color: var(--ink); font-weight: 600; }
.row-who:hover .name { color: var(--accent); }
.row-av { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; color: var(--accent); font-size: .78rem; font-weight: 700; background: var(--accent-soft); border-radius: 50%; }
.owes-cell { font-weight: 600; }
.owes-cell.late { color: var(--bad); }
:root:not(.layout-phone) .table-wrap td { padding-top: .6rem; padding-bottom: .6rem; vertical-align: middle; }

/* Calendar on a computer: a column at the left with + Add, crews and people, and the jobs with no visit */
.cal-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.cal-side { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: .5rem; max-height: calc(100vh - 2rem); padding: 1rem; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.cal-add { width: 100%; }
.cal-side-head { margin-top: .6rem; color: var(--ink-soft); font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.cal-side .cal-chips { display: flex; flex-direction: column; align-items: stretch; gap: .25rem; margin: 0; }
.cal-side .cal-chip { justify-content: flex-start; width: 100%; }
.cal-side .event.unscheduled { width: 100%; text-align: left; }
.cal-content { min-width: 0; }
.cal-top { margin-bottom: .5rem; }
.cal-top .segmented { margin-left: auto; }
.cal-tools { margin-bottom: .75rem; }
/* The visit card on a computer (calendar and Today's map) */
.visit-card { width: min(520px, 94vw); }
.vc-head { display: flex; align-items: center; gap: .8rem; padding: 1.1rem 1.25rem .6rem; background: linear-gradient(180deg, var(--accent-soft), transparent); }
.vc-av { width: 44px; height: 44px; font-size: .95rem; }
.vc-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vc-title strong { font-size: 1.1rem; line-height: 1.25; overflow-wrap: anywhere; }
.vc-title span { color: var(--ink-soft); font-size: .9rem; }
.vc-when { display: flex; align-items: center; gap: .45rem; padding: 0 1.25rem .8rem; color: var(--ink-soft); font-size: .88rem; border-bottom: 1px solid var(--line); }
.vc-when svg { width: 16px; height: 16px; color: var(--accent); }
.visit-card .modal-body { display: flex; flex-direction: column; gap: .9rem; }
.visit-card .visit-tools { margin: 0; }
.visit-card .visit-total { margin: -.4rem 0 0; }
.vc-done { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.vc-done input { width: 18px; height: 18px; accent-color: var(--ok); }
.vc-done.on { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.vc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1rem; padding: .9rem 1rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.vc-grid > div { display: flex; flex-direction: column; gap: .2rem; min-width: 0; overflow-wrap: anywhere; }
.vc-grid .link { padding: 0; text-align: left; }
.vc-label { color: var(--ink-soft); font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.vc-lines { display: flex; flex-direction: column; gap: .2rem; }
.vc-total { padding-top: .4rem; border-top: 1px solid var(--line); }
.stage-pin-visit { display: block; width: 100%; padding: .7rem .9rem; color: var(--ink); text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.stage-pin-visit:hover { background: var(--accent-soft); }
dialog:has(.visit-card) { width: min(520px, 94vw); max-width: 94vw; overflow-x: hidden; }
.modal-form.visit-card { width: 100%; max-width: 100%; }
.visit-card label.vc-done { display: flex !important; flex-direction: row; min-height: 0; margin: 0; }
.visit-card label.vc-done span { margin: 0; }
.visit-card .vc-head .badge { flex: none; }
/* Team on a computer (option 2): big cards with the photo, who is working, the week's hours and buttons */
:root:not(.layout-phone) .people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.people-card.big-card { gap: .45rem; padding: 1.4rem 1rem 1.1rem; }
.people-card.big-card:hover { background: var(--surface); border-color: rgba(255, 138, 0, .55); }
.people-card.big-card.is-working { border-color: rgba(52, 211, 153, .55); }
.big-card .team-person-photo { padding: 3px; border-width: 3px; }
.big-card .team-person-photo .person-photo { width: 84px; height: 84px; font-size: 1.6rem; }
.big-card .people-name { margin-top: .25rem; font-size: 1.1rem; }
.pc-hours { width: 100%; display: flex; flex-direction: column; gap: .3rem; margin-top: .35rem; }
.pc-bar { height: 7px; overflow: hidden; background: var(--surface-2); border-radius: 4px; }
.pc-bar i { display: block; height: 100%; width: 0; background: var(--primary); border-radius: 4px; }
.pc-bar.warn i { background: #eab308; }
.pc-bar.bad i { background: var(--bad); }
.pc-actions { display: flex; gap: .45rem; justify-content: center; width: 100%; margin-top: .45rem; }
.pc-actions .btn, .pc-actions button { flex: 1; min-height: 34px; padding: .3rem .6rem; font-size: .85rem; }
.people-card.invite-card { justify-content: center; min-height: 260px; color: var(--ink-soft); font-weight: 600; background: transparent; border: 1.5px dashed var(--border); box-shadow: none; cursor: pointer; }
.people-card.invite-card:hover { color: var(--accent); background: var(--accent-soft); }
.invite-plus { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-bottom: .3rem; color: var(--accent); background: var(--accent-soft); border-radius: 50%; }
.invite-plus svg { width: 24px; height: 24px; }
/* Who sees what on a computer: one table, a row per part of Proliox and a column per role */
.perm-table-card { padding: 0; overflow: hidden; }
.perm-table { width: 100%; border-collapse: collapse; }
.perm-table th { padding: .75rem 1rem; text-align: left; background: var(--surface-2); }
.perm-table th.center, .perm-table td.center { width: 120px; text-align: center; }
.perm-table td { padding: .7rem 1rem; border-top: 1px solid var(--line); vertical-align: middle; }
.perm-table tbody tr:hover { background: var(--accent-soft); }
.perm-table td strong { font-weight: 600; }
.perm-always svg { width: 20px; height: 20px; color: var(--ok); }
.perm-table .switch { margin: 0 auto; }
/* Today's map: the visit sheet that slides up from the bottom (option M3) */
.visit-sheet { position: absolute; z-index: 5; left: 1rem; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .5rem; max-height: 46%; padding: .9rem 3rem .9rem 1rem; overflow-y: auto; background: color-mix(in srgb, var(--surface) 96%, transparent); border: 1px solid rgba(255, 138, 0, .55); border-radius: 16px; box-shadow: 0 -10px 40px rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: sheet-up .22s ease-out; }
@keyframes sheet-up { from { opacity: 0; transform: translateY(24px); } }
.today-stage.sheet-open .stage-left, .today-stage.sheet-open .stage-right { display: none; }
.sheet-x { position: absolute; top: .6rem; right: .6rem; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; min-height: 0; padding: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 50%; }
.sheet-x svg { width: 16px; height: 16px; }
.sheet-row { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.sheet-row + .sheet-row { padding-top: .6rem; border-top: 1px solid var(--line); }
.sheet-av { width: 46px; height: 46px; font-size: .95rem; }
.sheet-info { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: .1rem; }
.sheet-info strong { font-size: 1.02rem; }
.sheet-tools { display: flex; flex-wrap: wrap; gap: .4rem; }
.sheet-tools button, .sheet-tools .btn { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; padding: .35rem .8rem; font-size: .88rem; }
.sheet-tools svg { width: 16px; height: 16px; }
/* Who sees what on a computer (option P1): one role at a time, as pills */
.perm-pills-card { padding: 1.1rem 1.25rem; }
.perm-pills-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.perm-count { color: var(--ink-soft); font-weight: 600; }
.perm-count b { color: var(--accent); font-size: 1.15rem; }
.perm-pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.perm-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem .45rem .7rem; color: var(--ink-soft); font-size: .9rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; user-select: none; transition: background .15s, border-color .15s, color .15s; }
.perm-pill input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.perm-tick { display: inline-flex; width: 16px; height: 16px; opacity: .25; }
.perm-tick svg { width: 16px; height: 16px; }
.perm-pill:hover { border-color: var(--border); color: var(--ink); }
.perm-pill:has(input:checked) { color: var(--accent); background: var(--accent-soft); border-color: rgba(255, 138, 0, .55); }
.perm-pill:has(input:checked) .perm-tick { opacity: 1; }
.perm-pill:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.perm-pill.fixed { cursor: default; }
.perm-hint { margin: .9rem 0 0; }
/* Who sees what on a computer (option B): roles at the left, the chosen role's switches at the right */
.perm-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 1rem; align-items: start; }
.perm-roles { display: flex; flex-direction: column; gap: .6rem; position: sticky; top: 1rem; }
.perm-role { display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 0; padding: .85rem 1rem; color: var(--ink); text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: none; }
.perm-role:hover { border-color: rgba(255, 138, 0, .55); }
.perm-role.on { background: var(--accent-soft); border-color: var(--primary); }
.perm-role .row-av { width: 40px; height: 40px; font-size: .95rem; }
.perm-role.on .row-av { color: var(--primary-ink); background: var(--primary); }
.perm-role-text { display: flex; flex-direction: column; gap: .1rem; }
.perm-role-text strong { font-size: 1rem; }
.perm-role-text b { color: var(--accent); }
.perm-switches { padding: .3rem 1.2rem; }
.perm-line { display: flex; align-items: center; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.perm-line:last-child { border-bottom: 0; }
.perm-line .perm-text { flex: 1; display: flex; flex-direction: column; gap: .1rem; }
.perm-line .perm-text strong { font-weight: 600; }
.perm-line .switch { flex: none; margin: 0; }
.perm-owner-note { margin: .8rem 0 .2rem; }
/* Today's map cards (style 9): low cards with the round icon at the left and the number beside it */
.today-stage .stage-top { gap: .6rem; }
.today-stage .stage-top .figures { gap: .6rem; }
:root:not(.layout-phone) .today-stage .stage-top .figure { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "ic val" "ic lab"; align-items: center; column-gap: .65rem; row-gap: 0; padding: .55rem .8rem; border-radius: 12px; }
:root:not(.layout-phone) .today-stage .stage-top .figure .stat-ic { grid-area: ic; width: 38px; height: 38px; margin: 0; }
.today-stage .figure .stat-ic svg { width: 19px; height: 19px; }
:root .today-stage .stage-top .figure b { grid-area: val; width: auto; font-size: 1.2rem; line-height: 1.15; }
:root .today-stage .stage-top .figure-label { grid-area: lab; font-size: .72rem; letter-spacing: .04em; }
.today-stage .figure:hover { border-color: rgba(255, 138, 0, .6); }
.today-stage .weather-chip { align-self: stretch; padding: .55rem .9rem .55rem .55rem; border-radius: 12px; }
.today-stage .stage-left .card, .today-stage .stage-right .card { padding: .75rem 1rem; border-radius: 12px; }
.today-stage .stage-left h2, .today-stage .stage-right h2 { font-size: .95rem; margin-bottom: .4rem; }
.today-stage .stage-right .card-head { margin-bottom: .4rem; }
.today-stage .stage-right .card-head .btn { min-height: 32px; padding: .25rem .7rem; font-size: .85rem; }
.today-stage .stage-right .day-totals { margin-bottom: .3rem; }
.today-stage .attention-row { padding: .45rem 0; }
.today-stage .maplibregl-ctrl-top-right { top: 86px; }
/* The visit card with tabs (style T1) */
.visit-card .vc-head { padding-bottom: .9rem; }
.vc-actions { display: flex; gap: .5rem; padding: 0 1.25rem .9rem; }
.vc-actions .vc-start { flex: 1; display: flex; align-items: center; gap: .6rem; min-height: 48px; padding: .45rem .9rem; color: var(--primary-ink); text-align: left; background: var(--primary); border: 0; border-radius: 12px; }
.vc-actions .vc-start svg { width: 22px; height: 22px; }
.vc-actions .vc-start span { display: flex; flex-direction: column; line-height: 1.15; }
.vc-actions .vc-start small { font-size: .75rem; opacity: .8; }
.vc-actions .vc-start.running { color: #fff; background: var(--bad); }
.vc-actions .btn, .vc-done-btn { display: inline-flex; align-items: center; gap: .4rem; min-height: 48px; padding: .45rem .9rem; border-radius: 12px; }
.vc-actions svg { width: 18px; height: 18px; }
.vc-done-btn.on { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.vc-tabs { display: flex; gap: 1.4rem; padding: 0 1.25rem; border-bottom: 1px solid var(--line); }
.vc-tabs button { min-height: 0; padding: .55rem 0 .5rem; color: var(--ink-soft); font-weight: 600; background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; box-shadow: none; }
.vc-tabs button.on { color: var(--accent); border-bottom-color: var(--primary); }
.vc-tabs b { color: var(--ink); font-weight: 700; }
.visit-card .modal-body { min-height: 190px; }
.vc-row { display: flex; align-items: center; gap: .7rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.vc-row:last-child { border-bottom: 0; }
.vc-ic { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; color: var(--accent); background: var(--accent-soft); border-radius: 9px; }
.vc-ic svg { width: 16px; height: 16px; }
.vc-row-label { flex: 1; color: var(--ink-soft); font-size: .9rem; }
.vc-row-value { text-align: right; font-weight: 600; overflow-wrap: anywhere; max-width: 60%; }
.vc-row-value .link { padding: 0; font-weight: 600; }
.vc-file-tools { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .8rem; }
.vc-file-tools button { display: flex; align-items: center; justify-content: center; gap: .45rem; min-height: 64px; border-radius: 12px; }
.vc-file-tools svg { width: 20px; height: 20px; color: var(--accent); }
/* The visit's Details on a computer: same header and tabs as the card, notes as cards with a box to write */
.visit-details .modal-body { max-height: min(60vh, 560px); overflow-y: auto; }
.vd-instructions { margin-bottom: .4rem; padding: .7rem .9rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.vd-instructions p { margin: .3rem 0 0; }
.vd-lines { margin-top: .6rem; }
.vd-compose { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .9rem; padding: .7rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.vd-compose textarea { min-height: 70px; resize: vertical; background: var(--surface); }
.vd-compose-foot { display: flex; justify-content: space-between; gap: .5rem; }
.vd-compose-foot button { display: inline-flex; align-items: center; gap: .4rem; }
.vd-compose-foot svg { width: 16px; height: 16px; }
.vd-note.team { margin-bottom: .7rem; padding: .7rem .9rem; background: var(--accent-soft); border-left: 3px solid var(--primary); border-radius: 0 10px 10px 0; }
.vd-notes { display: flex; flex-direction: column; gap: .6rem; }
.vd-notes > * { margin: 0; padding: .75rem .9rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.vd-empty { text-align: center; padding: 1rem 0; }
/* The visit card, style V1: a small map on top with the client on it, facts in two columns, one row of buttons */
dialog:has(.v1-card) { width: min(480px, 94vw); padding: 0; overflow: hidden; }
.v1-card .v1-top { position: relative; height: 150px; overflow: hidden; background: linear-gradient(135deg, #1d1d22, #2a1a05); }
.v1-map { position: absolute; inset: 0; }
:root:is([data-theme="brillo"], [data-theme^="brillo-"]:not([data-theme="brillo-claro"])) .v1-map .maplibregl-canvas { filter: invert(.92) hue-rotate(180deg) brightness(.85) contrast(.95); }
.v1-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .78)); }
.v1-top .badge { position: absolute; top: .8rem; right: .8rem; z-index: 2; }
.v1-name { position: absolute; left: 1.1rem; right: 1.1rem; bottom: .8rem; z-index: 2; display: flex; flex-direction: column; color: #fff; }
.v1-name strong { font-size: 1.2rem; line-height: 1.2; }
.v1-name a { color: rgba(255, 255, 255, .85); font-size: .85rem; text-decoration: none; }
.v1-name a:hover { color: var(--primary); }
.v1-pin { display: block; width: 18px; height: 18px; background: var(--primary); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 6px rgba(255, 138, 0, .3); }
.v1-card .modal-body { display: flex; flex-direction: column; gap: .9rem; padding: 1rem 1.1rem; }
.v1-title { font-size: 1rem; font-weight: 700; }
.v1-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1rem; }
.v1-fact { display: flex; flex-direction: column; gap: .15rem; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.v1-fact .link { padding: 0; text-align: left; font-weight: 600; }
.v1-actions { display: flex; gap: .45rem; }
.v1-actions .v1-start { flex: 1; display: flex; align-items: center; gap: .55rem; min-height: 50px; padding: .4rem .8rem; color: var(--primary-ink); text-align: left; background: var(--primary); border: 0; border-radius: 12px; }
.v1-actions .v1-start svg { width: 20px; height: 20px; }
.v1-actions .v1-start span { display: flex; flex-direction: column; line-height: 1.15; }
.v1-actions .v1-start small { font-size: .72rem; opacity: .8; }
.v1-actions .v1-start.running { color: #fff; background: var(--bad); }
.v1-tool { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; width: 58px; min-height: 50px; padding: .3rem; font-size: .72rem; border-radius: 12px; }
.v1-tool svg { width: 18px; height: 18px; color: var(--accent); }
.v1-tool.on { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.v1-tool.on svg { color: var(--ok); }.v1-top .v1-map, .v1-top .v1-map.maplibregl-map { position: absolute !important; inset: 0; width: 100%; height: 100%; }

/* Proliox colors: one dark glow theme per color (Settings > Look). Made from the orange Night glow. */
[data-theme="brillo-naranja"] { --bg: #0b0b0d; --surface: #141417; --surface-2: #1d1d22; --hover: #25252b; --border: rgba(255, 138, 0, .62); --input-border: rgba(255, 138, 0, .45); --ink: #f6f6f8; --ink-soft: #a9a9b3; --accent: #ffa033; --accent-dark: #ffa033; --accent-soft: rgba(255, 138, 0, .16); --primary: #ff8a00; --primary-hover: #ffa033; --primary-ink: #120a00; --spark: #ff8a00; --spark-hover: #ffa033; --spark-ink: #120a00; --bar: #0b0b0d; --bar-2: #1d1d22; --bar-ink: #ffffff; --bar-soft: #a9a9b3; --info: #ffa033; --info-soft: rgba(255, 138, 0, .16); --glass: #141417; --top-bg: #0b0b0d; --nav-bg: rgba(11, 11, 13, .92); --subnav-bg: #0b0b0d; --glow-1: rgba(255, 138, 0, .3); --glow-2: rgba(255, 138, 0, .1); --grid: rgba(255, 138, 0, .07); --radius: 16px; --lift: 0 0 16px rgba(255, 138, 0, .26), inset 0 0 14px rgba(255, 138, 0, .05); --glow-rgb: 255, 138, 0; }
.t-brillo-naranja { background: #0b0b0d; box-shadow: inset 0 0 0 1.5px #ff8a00, 0 0 10px rgba(255, 138, 0, .45); } .t-brillo-naranja i { background: #ff8a00; }
[data-theme="brillo-azul"] { --bg: #0b0b0d; --surface: #141417; --surface-2: #1d1d22; --hover: #25252b; --border: rgba(59, 130, 246, .62); --input-border: rgba(59, 130, 246, .45); --ink: #f6f6f8; --ink-soft: #a9a9b3; --accent: #60a5fa; --accent-dark: #60a5fa; --accent-soft: rgba(59, 130, 246, .16); --primary: #3b82f6; --primary-hover: #60a5fa; --primary-ink: #ffffff; --spark: #3b82f6; --spark-hover: #60a5fa; --spark-ink: #ffffff; --bar: #0b0b0d; --bar-2: #1d1d22; --bar-ink: #ffffff; --bar-soft: #a9a9b3; --info: #60a5fa; --info-soft: rgba(59, 130, 246, .16); --glass: #141417; --top-bg: #0b0b0d; --nav-bg: rgba(11, 11, 13, .92); --subnav-bg: #0b0b0d; --glow-1: rgba(59, 130, 246, .3); --glow-2: rgba(59, 130, 246, .1); --grid: rgba(59, 130, 246, .07); --radius: 16px; --lift: 0 0 16px rgba(59, 130, 246, .26), inset 0 0 14px rgba(59, 130, 246, .05); --glow-rgb: 59, 130, 246; }
.t-brillo-azul { background: #0b0b0d; box-shadow: inset 0 0 0 1.5px #3b82f6, 0 0 10px rgba(59, 130, 246, .45); } .t-brillo-azul i { background: #3b82f6; }
[data-theme="brillo-verde"] { --bg: #0b0b0d; --surface: #141417; --surface-2: #1d1d22; --hover: #25252b; --border: rgba(34, 197, 94, .62); --input-border: rgba(34, 197, 94, .45); --ink: #f6f6f8; --ink-soft: #a9a9b3; --accent: #4ade80; --accent-dark: #4ade80; --accent-soft: rgba(34, 197, 94, .16); --primary: #22c55e; --primary-hover: #4ade80; --primary-ink: #04140a; --spark: #22c55e; --spark-hover: #4ade80; --spark-ink: #04140a; --bar: #0b0b0d; --bar-2: #1d1d22; --bar-ink: #ffffff; --bar-soft: #a9a9b3; --info: #4ade80; --info-soft: rgba(34, 197, 94, .16); --glass: #141417; --top-bg: #0b0b0d; --nav-bg: rgba(11, 11, 13, .92); --subnav-bg: #0b0b0d; --glow-1: rgba(34, 197, 94, .3); --glow-2: rgba(34, 197, 94, .1); --grid: rgba(34, 197, 94, .07); --radius: 16px; --lift: 0 0 16px rgba(34, 197, 94, .26), inset 0 0 14px rgba(34, 197, 94, .05); --glow-rgb: 34, 197, 94; }
.t-brillo-verde { background: #0b0b0d; box-shadow: inset 0 0 0 1.5px #22c55e, 0 0 10px rgba(34, 197, 94, .45); } .t-brillo-verde i { background: #22c55e; }
[data-theme="brillo-rojo"] { --bg: #0b0b0d; --surface: #141417; --surface-2: #1d1d22; --hover: #25252b; --border: rgba(239, 68, 68, .62); --input-border: rgba(239, 68, 68, .45); --ink: #f6f6f8; --ink-soft: #a9a9b3; --accent: #f87171; --accent-dark: #f87171; --accent-soft: rgba(239, 68, 68, .16); --primary: #ef4444; --primary-hover: #f87171; --primary-ink: #ffffff; --spark: #ef4444; --spark-hover: #f87171; --spark-ink: #ffffff; --bar: #0b0b0d; --bar-2: #1d1d22; --bar-ink: #ffffff; --bar-soft: #a9a9b3; --info: #f87171; --info-soft: rgba(239, 68, 68, .16); --glass: #141417; --top-bg: #0b0b0d; --nav-bg: rgba(11, 11, 13, .92); --subnav-bg: #0b0b0d; --glow-1: rgba(239, 68, 68, .3); --glow-2: rgba(239, 68, 68, .1); --grid: rgba(239, 68, 68, .07); --radius: 16px; --lift: 0 0 16px rgba(239, 68, 68, .26), inset 0 0 14px rgba(239, 68, 68, .05); --glow-rgb: 239, 68, 68; }
.t-brillo-rojo { background: #0b0b0d; box-shadow: inset 0 0 0 1.5px #ef4444, 0 0 10px rgba(239, 68, 68, .45); } .t-brillo-rojo i { background: #ef4444; }
[data-theme="brillo-morado"] { --bg: #0b0b0d; --surface: #141417; --surface-2: #1d1d22; --hover: #25252b; --border: rgba(139, 92, 246, .62); --input-border: rgba(139, 92, 246, .45); --ink: #f6f6f8; --ink-soft: #a9a9b3; --accent: #a78bfa; --accent-dark: #a78bfa; --accent-soft: rgba(139, 92, 246, .16); --primary: #8b5cf6; --primary-hover: #a78bfa; --primary-ink: #ffffff; --spark: #8b5cf6; --spark-hover: #a78bfa; --spark-ink: #ffffff; --bar: #0b0b0d; --bar-2: #1d1d22; --bar-ink: #ffffff; --bar-soft: #a9a9b3; --info: #a78bfa; --info-soft: rgba(139, 92, 246, .16); --glass: #141417; --top-bg: #0b0b0d; --nav-bg: rgba(11, 11, 13, .92); --subnav-bg: #0b0b0d; --glow-1: rgba(139, 92, 246, .3); --glow-2: rgba(139, 92, 246, .1); --grid: rgba(139, 92, 246, .07); --radius: 16px; --lift: 0 0 16px rgba(139, 92, 246, .26), inset 0 0 14px rgba(139, 92, 246, .05); --glow-rgb: 139, 92, 246; }
.t-brillo-morado { background: #0b0b0d; box-shadow: inset 0 0 0 1.5px #8b5cf6, 0 0 10px rgba(139, 92, 246, .45); } .t-brillo-morado i { background: #8b5cf6; }
[data-theme="brillo-turquesa"] { --bg: #0b0b0d; --surface: #141417; --surface-2: #1d1d22; --hover: #25252b; --border: rgba(20, 196, 184, .62); --input-border: rgba(20, 196, 184, .45); --ink: #f6f6f8; --ink-soft: #a9a9b3; --accent: #4fe0d6; --accent-dark: #4fe0d6; --accent-soft: rgba(20, 196, 184, .16); --primary: #14c4b8; --primary-hover: #4fe0d6; --primary-ink: #041413; --spark: #14c4b8; --spark-hover: #4fe0d6; --spark-ink: #041413; --bar: #0b0b0d; --bar-2: #1d1d22; --bar-ink: #ffffff; --bar-soft: #a9a9b3; --info: #4fe0d6; --info-soft: rgba(20, 196, 184, .16); --glass: #141417; --top-bg: #0b0b0d; --nav-bg: rgba(11, 11, 13, .92); --subnav-bg: #0b0b0d; --glow-1: rgba(20, 196, 184, .3); --glow-2: rgba(20, 196, 184, .1); --grid: rgba(20, 196, 184, .07); --radius: 16px; --lift: 0 0 16px rgba(20, 196, 184, .26), inset 0 0 14px rgba(20, 196, 184, .05); --glow-rgb: 20, 196, 184; }
.t-brillo-turquesa { background: #0b0b0d; box-shadow: inset 0 0 0 1.5px #14c4b8, 0 0 10px rgba(20, 196, 184, .45); } .t-brillo-turquesa i { background: #14c4b8; }
[data-theme="brillo-rosa"] { --bg: #0b0b0d; --surface: #141417; --surface-2: #1d1d22; --hover: #25252b; --border: rgba(236, 72, 153, .62); --input-border: rgba(236, 72, 153, .45); --ink: #f6f6f8; --ink-soft: #a9a9b3; --accent: #f472b6; --accent-dark: #f472b6; --accent-soft: rgba(236, 72, 153, .16); --primary: #ec4899; --primary-hover: #f472b6; --primary-ink: #ffffff; --spark: #ec4899; --spark-hover: #f472b6; --spark-ink: #ffffff; --bar: #0b0b0d; --bar-2: #1d1d22; --bar-ink: #ffffff; --bar-soft: #a9a9b3; --info: #f472b6; --info-soft: rgba(236, 72, 153, .16); --glass: #141417; --top-bg: #0b0b0d; --nav-bg: rgba(11, 11, 13, .92); --subnav-bg: #0b0b0d; --glow-1: rgba(236, 72, 153, .3); --glow-2: rgba(236, 72, 153, .1); --grid: rgba(236, 72, 153, .07); --radius: 16px; --lift: 0 0 16px rgba(236, 72, 153, .26), inset 0 0 14px rgba(236, 72, 153, .05); --glow-rgb: 236, 72, 153; }
.t-brillo-rosa { background: #0b0b0d; box-shadow: inset 0 0 0 1.5px #ec4899, 0 0 10px rgba(236, 72, 153, .45); } .t-brillo-rosa i { background: #ec4899; }
[data-theme="brillo-dorado"] { --bg: #0b0b0d; --surface: #141417; --surface-2: #1d1d22; --hover: #25252b; --border: rgba(212, 167, 44, .62); --input-border: rgba(212, 167, 44, .45); --ink: #f6f6f8; --ink-soft: #a9a9b3; --accent: #e6c25a; --accent-dark: #e6c25a; --accent-soft: rgba(212, 167, 44, .16); --primary: #d4a72c; --primary-hover: #e6c25a; --primary-ink: #140e00; --spark: #d4a72c; --spark-hover: #e6c25a; --spark-ink: #140e00; --bar: #0b0b0d; --bar-2: #1d1d22; --bar-ink: #ffffff; --bar-soft: #a9a9b3; --info: #e6c25a; --info-soft: rgba(212, 167, 44, .16); --glass: #141417; --top-bg: #0b0b0d; --nav-bg: rgba(11, 11, 13, .92); --subnav-bg: #0b0b0d; --glow-1: rgba(212, 167, 44, .3); --glow-2: rgba(212, 167, 44, .1); --grid: rgba(212, 167, 44, .07); --radius: 16px; --lift: 0 0 16px rgba(212, 167, 44, .26), inset 0 0 14px rgba(212, 167, 44, .05); --glow-rgb: 212, 167, 44; }
.t-brillo-dorado { background: #0b0b0d; box-shadow: inset 0 0 0 1.5px #d4a72c, 0 0 10px rgba(212, 167, 44, .45); } .t-brillo-dorado i { background: #d4a72c; }
[data-theme="brillo-plata"] { --bg: #0b0b0d; --surface: #141417; --surface-2: #1d1d22; --hover: #25252b; --border: rgba(192, 196, 204, .62); --input-border: rgba(192, 196, 204, .45); --ink: #f6f6f8; --ink-soft: #a9a9b3; --accent: #dfe2e8; --accent-dark: #dfe2e8; --accent-soft: rgba(192, 196, 204, .16); --primary: #c0c4cc; --primary-hover: #dfe2e8; --primary-ink: #0e0f12; --spark: #c0c4cc; --spark-hover: #dfe2e8; --spark-ink: #0e0f12; --bar: #0b0b0d; --bar-2: #1d1d22; --bar-ink: #ffffff; --bar-soft: #a9a9b3; --info: #dfe2e8; --info-soft: rgba(192, 196, 204, .16); --glass: #141417; --top-bg: #0b0b0d; --nav-bg: rgba(11, 11, 13, .92); --subnav-bg: #0b0b0d; --glow-1: rgba(192, 196, 204, .3); --glow-2: rgba(192, 196, 204, .1); --grid: rgba(192, 196, 204, .07); --radius: 16px; --lift: 0 0 16px rgba(192, 196, 204, .26), inset 0 0 14px rgba(192, 196, 204, .05); --glow-rgb: 192, 196, 204; }
.t-brillo-plata { background: #0b0b0d; box-shadow: inset 0 0 0 1.5px #c0c4cc, 0 0 10px rgba(192, 196, 204, .45); } .t-brillo-plata i { background: #c0c4cc; }

/* Today on a phone: today's map fills the screen from under the top bar to the tab bar, and the cards float on it.
   The top fades from the page color into the map, so the day and the figures stay easy to read. */
.today-phone { position: relative; display: flex; flex-direction: column; gap: .65rem; margin: -1rem -1rem 1rem; padding: .85rem .85rem .9rem; min-height: 520px; overflow: hidden; isolation: isolate; }
.today-phone::before { content: ""; position: absolute; inset: 0 0 auto; z-index: 1; height: 190px; background: linear-gradient(var(--bg) 0, var(--bg) 120px, transparent 100%); pointer-events: none; }
.today-phone > .tp-map { position: absolute; inset: 0; z-index: 0; background: #e8ebe6; }
.today-phone > :not(.tp-map) { position: relative; z-index: 2; }
.tp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.tp-head > div:first-child { min-width: 0; }
.tp-head .eyebrow { color: var(--ink-soft); font-weight: 600; }
.tp-head h1 { margin: .1rem 0 0; font-size: clamp(1.45rem, 7vw, 2rem); line-height: 1.1; }
.tp-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
.tp-fig { display: flex; flex-direction: column; align-items: center; gap: .1rem; min-width: 0; padding: .55rem .2rem .5rem; color: var(--ink); text-align: center; text-decoration: none; background: var(--surface); border: 1.5px solid var(--border); border-radius: 14px; box-shadow: var(--lift); }
.tp-fig-label { font-size: .6rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.tp-fig b { max-width: 100%; overflow: hidden; font-size: clamp(.95rem, 4.7vw, 1.45rem); font-weight: 800; color: var(--accent); white-space: nowrap; text-overflow: ellipsis; }
.tp-fig-note { max-width: 100%; overflow: hidden; font-size: .68rem; color: var(--ink-soft); white-space: nowrap; text-overflow: ellipsis; }
.tp-alert { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; color: var(--ink); text-decoration: none; background: var(--surface); border: 1.5px solid var(--border); border-radius: 18px; box-shadow: var(--lift); }
.tp-alert-text { flex: 1; min-width: 0; }
.tp-alert-text strong { display: block; }
.tp-alert-text span { display: block; overflow: hidden; font-size: .85rem; color: var(--ink-soft); white-space: nowrap; text-overflow: ellipsis; }
.tp-alert-action { flex: none; font-weight: 700; color: var(--accent); }
/* The open band lets touches through to the map, so it can be pinched and dragged there. */
.tp-gap { flex: 1; min-height: 110px; pointer-events: none; }
.tp-day { padding: .85rem 1rem .9rem; background: var(--surface); border: 1.5px solid var(--border); border-radius: 18px; box-shadow: var(--lift); }
.tp-day-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .55rem; }
.tp-day-head h2 { margin: 0; font-size: 1.3rem; }
.tp-day .day-totals { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.tp-day .day-totals b { font-size: clamp(1.1rem, 5.4vw, 1.5rem); }
.tp-route { display: block; padding: .9rem 1rem; font-weight: 800; color: var(--accent); text-align: center; text-decoration: none; background: var(--surface); border: 1.5px solid var(--border); border-radius: 999px; box-shadow: var(--lift); }
.tp-pin { display: flex; flex-direction: column; align-items: center; min-height: 0; padding: 0; font: inherit; color: inherit; text-decoration: none; cursor: pointer; background: none; border: 0; box-shadow: none; -webkit-tap-highlight-color: transparent; }
/* A tap leaves no dark box: buttons' hover and focus backgrounds would stick around the house on a phone. */
.tp-pin:hover, .tp-pin:focus, .tp-pin:active, .tp-pin:focus-visible { background: none; outline: none; box-shadow: none; }
.tp-pin-dot { display: grid; place-items: center; width: 38px; height: 38px; color: #ffffff; background: #1d1d22; border: 2px solid #34343c; border-radius: 50%; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.tp-pin-dot svg { width: 18px; height: 18px; }
.tp-pin.next .tp-pin-dot { color: var(--primary-ink); background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 5px rgba(var(--glow-rgb, 255, 138, 0), .28), 0 2px 8px rgba(0, 0, 0, .35); }
.tp-pin.done .tp-pin-dot { background: #4a4a52; border-color: #5a5a62; }
.tp-pin-name { max-width: 130px; margin-top: 4px; padding: 2px 10px; overflow: hidden; font-size: .76rem; font-weight: 700; color: #ffffff; white-space: nowrap; text-overflow: ellipsis; background: #141417; border-radius: 999px; }
.tp-more > .card { margin-bottom: 1rem; }

/* Phone header and Today figures (2026-11-20): a bigger logo that overhangs the header's padding, so the header
   and the rest of the screen keep their size; the figures show the whole amount (fitTodayFigures() makes the font
   smaller when an amount would not fit). */
.phone-top .brand { gap: .6rem; font-size: 1.4rem; font-weight: 800; }
.phone-top .brand img { width: 44px; height: 44px; margin: -4.4px 0; border-radius: 10px; }
.tp-fig b { overflow: visible; text-overflow: clip; }

/* --- Mail, as on the phone design (2026-11-20): back, title with the unread count, search, filters, rows --- */
.mail2 { padding-bottom: 6rem; }
.mail-head { display: flex; align-items: center; gap: .8rem; margin: .2rem 0 .9rem; }
.mail-head h1 { flex: 1; display: flex; align-items: center; gap: .55rem; margin: 0; font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.mail-round, .chat2-round, .wx2-back { flex: none; display: grid; place-items: center; width: 42px; height: 42px; min-height: 0; padding: 0; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--ink); text-decoration: none; }
.mail-round svg, .chat2-round svg, .wx2-back svg { width: 20px; height: 20px; }
.mail-count { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 7px; background: var(--primary); color: var(--primary-ink); font-size: .8rem; font-weight: 800; letter-spacing: 0; }
.mail-me { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--primary); color: var(--primary); background: var(--bg); font-size: .85rem; font-weight: 800; object-fit: cover; }
.mail-search { display: flex; align-items: center; gap: .55rem; margin: 0 0 .85rem; padding: 0 .4rem 0 .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; color: var(--ink-soft); }
.mail-search > svg { flex: none; width: 18px; height: 18px; }
.mail-search input { flex: 1; min-width: 0; padding: .75rem 0; background: transparent; border: 0; color: var(--ink); font-size: 1rem; outline: none; box-shadow: none; }
.mail-refresh { flex: none; display: grid; place-items: center; width: 34px; height: 34px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink-soft); }
.mail-refresh svg { width: 18px; height: 18px; }
.mail-filters { display: flex; gap: .45rem; margin-bottom: 1.1rem; overflow-x: auto; scrollbar-width: none; }
.mail-filters button { flex: none; min-height: 0; padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font-size: .9rem; font-weight: 600; }
.mail-filters button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.mail-section { margin: 0 0 .3rem; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.mail-list { display: grid; }
.mail-row { display: flex; align-items: center; gap: .65rem; padding: .8rem 0; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.mail-row:last-child { border-bottom: 0; }
.mail-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.mail-row.unread .mail-dot { background: var(--primary); }
.mail-row .gm-avatar { width: 42px; height: 42px; font-size: 1rem; font-weight: 700; }
.mail-main { flex: 1; min-width: 0; display: grid; gap: .15rem; }
.mail-line { display: flex; align-items: baseline; gap: .6rem; min-width: 0; }
.mail-from { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.mail-when { flex: none; font-size: .78rem; color: var(--ink-soft); }
.mail-subj { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .92rem; color: var(--ink-soft); }
.mail-row.unread .mail-from { font-weight: 800; }
.mail-row.unread .mail-subj { font-weight: 700; color: var(--ink); }
.mail-row.unread .mail-when { font-weight: 700; color: var(--primary); }
.mail-compose { position: fixed; right: 18px; bottom: calc(env(safe-area-inset-bottom) + 24px); z-index: 45; display: inline-flex; align-items: center; gap: .55rem; min-height: 0; padding: .95rem 1.35rem; border: 0; border-radius: 16px; background: var(--primary); color: var(--primary-ink); font-size: 1.02rem; font-weight: 800; box-shadow: 0 8px 28px color-mix(in srgb, var(--primary) 45%, transparent); }
.mail-compose svg { width: 20px; height: 20px; }
.mail-compose:hover { background: var(--primary); filter: brightness(1.06); }
:where(:root:not(.layout-phone)) .mail-compose { right: 28px; bottom: 28px; }

/* --- Weather, as on the phone design: a big card in the main color, small tiles, bars and columns --- */
.wx2 { padding: calc(env(safe-area-inset-top) + .9rem) 16px calc(env(safe-area-inset-bottom) + 2rem); background: var(--bg); }
.wx2.wx-night, .wx2.wx-cloud, .wx2.wx-rain { background: var(--bg); }
.wx2-top { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.wx2-top h1 { flex: 1; min-width: 0; display: flex; align-items: center; gap: .3rem; margin: 0; font-size: 1.45rem; font-weight: 800; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wx2-top h1 svg { flex: none; width: 17px; height: 17px; color: var(--ink-soft); }
.wx2-clock { flex: none; font-size: .85rem; color: var(--ink-soft); }
.wx2-card, .wx2-tile, .wx2-mini { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; }
.wx2-card { padding: .9rem 1rem; margin-bottom: .75rem; }
.wx2 .wx-where { display: flex; align-items: center; gap: .8rem; }
.wx2-hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: .6rem; margin-bottom: .75rem; }
.wx2-now { display: flex; flex-direction: column; min-height: 100%; padding: 1rem; border-radius: 20px; background: var(--primary); color: var(--primary-ink); }
.wx2-now-icon svg { width: 30px; height: 30px; }
.wx2-temp { margin-top: auto; font-size: 3.6rem; font-weight: 800; line-height: 1; letter-spacing: -.04em; }
.wx2-kind { margin-top: .4rem; font-size: .88rem; font-weight: 700; }
.wx2-minis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.wx2-mini { display: flex; flex-direction: column; justify-content: space-between; gap: .35rem; min-width: 0; padding: .7rem .75rem; }
.wx2-mini span, .wx2-label { font-size: .64rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); }
.wx2-mini span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wx2-mini b { font-size: 1.5rem; font-weight: 800; line-height: 1.05; white-space: nowrap; }
.wx2-mini b small, .wx2-tile b small { font-size: .75rem; font-weight: 700; }
.wx2-card > .wx2-label { display: block; margin-bottom: .7rem; }
.wx2-hours, .wx2-days { display: grid; grid-auto-flow: column; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }
.wx2-hours { grid-auto-columns: calc(100% / 6); }
.wx2-days { grid-auto-columns: calc(100% / 5); }
.wx2-hours::-webkit-scrollbar, .wx2-days::-webkit-scrollbar { display: none; }
.wx2-hour, .wx2-day { display: flex; flex-direction: column; align-items: center; gap: .45rem; scroll-snap-align: start; }
.wx2-hour-time, .wx2-day-name { font-size: .82rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.wx2-hour:first-child .wx2-hour-time, .wx2-day:first-child .wx2-day-name { color: var(--ink); }
.wx2-bar { position: relative; display: block; width: 8px; height: 64px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.wx2-bar i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 999px; background: var(--primary); }
.wx2-hour b { font-size: .95rem; font-weight: 800; }
.wx2-day em { min-height: .9rem; }
.wx2-hour em, .wx2-day em { font-size: .72rem; font-style: normal; font-weight: 700; color: #4aa8ff; }
.wx2-day-icon { display: grid; place-items: center; color: var(--ink-soft); }
.wx2-day-icon.wet { color: #4aa8ff; }
.wx2-day-icon svg { width: 24px; height: 24px; }
.wx2-day-temps { font-size: .85rem; color: var(--ink-soft); white-space: nowrap; }
.wx2-day-temps b { color: var(--ink); font-weight: 800; }
.wx2-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.wx2-tile { display: flex; flex-direction: column; gap: .3rem; padding: .85rem 1rem; }
.wx2-tile b { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.wx2-tile > small { font-size: .78rem; color: var(--ink-soft); }

/* --- Messages, as on the phone design --- */
.msg2.card { padding: 1rem 1rem 1.2rem; }
.msg2-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.msg2-eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--primary); }
.msg2-actions { display: flex; gap: .5rem; }
.msg2-btn { display: grid; place-items: center; width: 42px; height: 42px; min-height: 0; padding: 0; border-radius: 13px; border: 1px solid var(--border); background: var(--surface-2); color: var(--ink); }
.msg2-btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.msg2-btn svg { width: 20px; height: 20px; }
.msg2-title { margin: .35rem 0 .9rem; font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; }
.msg2-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 4px; margin-bottom: 1.1rem; border-radius: 14px; background: var(--surface-2); }
.msg2-seg button { min-height: 0; padding: .55rem .4rem; border: 0; border-radius: 10px; background: none; color: var(--ink-soft); font-size: .9rem; font-weight: 700; }
.msg2-seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.msg2-section { margin: 0 0 .25rem; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.msg2-row { gap: .8rem; padding: .75rem 0; }
.msg2-row:hover, .msg2-row.on { background: none; }
.msg2-row .chat-avatar { width: 46px; height: 46px; border-radius: 14px; font-size: 1rem; }
.msg2-main { flex: 1; min-width: 0; display: grid; gap: .2rem; }
.msg2-line { display: flex; align-items: center; gap: .45rem; min-width: 0; }
.msg2-line strong { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 1.02rem; }
.msg2-role { flex: none; padding: .1rem .4rem; border-radius: 5px; background: var(--accent-soft); color: var(--accent); font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.msg2-when { flex: none; margin-left: auto; font-size: .78rem; color: var(--ink-soft); }
.msg2-preview { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .92rem; color: var(--ink-soft); }
.msg2-row.unread .msg2-preview { color: var(--ink); font-weight: 600; }
.msg2-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); }
.msg2-invite { display: flex; flex-direction: column; align-items: center; gap: .45rem; margin-top: 1.6rem; padding: 0 1rem; text-align: center; }
.msg2-invite-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: .3rem; border-radius: 15px; border: 1px solid var(--border); background: var(--surface-2); color: var(--primary); }
.msg2-invite-icon svg { width: 22px; height: 22px; }
.msg2-invite p { margin: 0 0 .4rem; max-width: 19rem; font-size: .88rem; color: var(--ink-soft); }
.msg2-invite button, .msg2-invite .btn { min-height: 0; padding: .6rem 1.3rem; border-radius: 12px; border: 1.5px solid var(--primary); background: none; color: var(--primary); font-weight: 700; }
/* On a phone the list is the whole screen, not a card. */
:where(:root.layout-760) .msg2.card { padding: .4rem 0 1rem; background: none; border: 0; box-shadow: none; }

/* The open chat: centered name with online and role, day dividers, bubbles with the time under them. */
.chat2 .chat-thread-head { gap: .6rem; padding: .7rem .8rem; border-bottom: 1px solid var(--line); }
.chat2-who { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.chat2-who strong { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 1.08rem; }
.chat2-who span { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .78rem; color: var(--ink-soft); }
.chat2-who span.online { color: #3ccf7a; }
.chat2-who span.online::before { content: "\25CF  "; }
.chat2 .chat-scroll { gap: .55rem; padding: .9rem .8rem; }
.chat2 .chat-day { display: flex; align-items: center; gap: .7rem; align-self: stretch; margin: .5rem 0; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.chat2 .chat-day::before, .chat2 .chat-day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.bubble-row { display: flex; align-items: flex-end; gap: .45rem; max-width: 84%; }
.bubble-row.mine { align-self: flex-end; justify-content: flex-end; }
.bubble-row.theirs { align-self: flex-start; }
.bubble-row .chat-avatar { width: 26px; height: 26px; margin-bottom: 1.15rem; border-radius: 8px; font-size: .62rem; }
.bubble-stack { display: flex; flex-direction: column; min-width: 0; }
.bubble-row.mine .bubble-stack { align-items: flex-end; }
.bubble-row .bubble { max-width: 100%; padding: .6rem .85rem; border-radius: 18px; }
.bubble-row .bubble.mine { background: color-mix(in srgb, var(--surface-2) 75%, #5b7bb0); color: var(--ink); border-bottom-right-radius: 6px; }
.bubble-row .bubble.theirs { background: var(--surface-2); border-bottom-left-radius: 6px; }
.bubble-row .bubble-time { margin-top: .2rem; padding: 0 .2rem; font-size: .68rem; color: var(--ink-soft); opacity: 1; }
.bubble-ticks { letter-spacing: -.15em; }
.bubble-ticks.seen { color: #4aa8ff; }
.chat2 .chat-compose { flex-direction: column; align-items: stretch; gap: .55rem; padding: .6rem 4.4rem .6rem .7rem; }
.chat2-chips { display: flex; gap: .45rem; overflow-x: auto; scrollbar-width: none; }
.chat2-chips button { flex: none; display: inline-flex; align-items: center; gap: .35rem; min-height: 0; padding: .45rem .75rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font-size: .85rem; font-weight: 600; }
.chat2-chips svg { width: 16px; height: 16px; }
.chat2-write { display: flex; align-items: flex-end; gap: .5rem; }
.chat2-write textarea { flex: 1; min-height: 44px; max-height: 120px; resize: none; padding: .65rem .9rem; border-radius: 14px; }
.chat2 .chat-send { width: 46px; height: 46px; min-height: 0; border-radius: 13px; }
:where(:root.layout-760) .msg-layout.in-chat .chat2 .chat-compose { padding-right: .7rem; }
/* A person's profile photo in place of their initial, in Messages. */
img.chat-avatar.photo { object-fit: cover; background: var(--surface-2); padding: 0; }

/* The weather fits one screen, no scrolling (2026-11-21): the screen is a column as tall as the window; the next
   hours card takes whatever height is left, and its bars grow or shrink with it. */
dialog:has(.wx2) { overflow: hidden; }
.wx2 { display: flex; flex-direction: column; gap: .55rem; height: 100%; min-height: 0; overflow: hidden; padding-top: calc(env(safe-area-inset-top) + .6rem); padding-bottom: calc(env(safe-area-inset-bottom) + .5rem); }
.wx2 > * { flex: none; margin: 0; }
.wx2-top { margin: 0; }
.wx2-hero { margin: 0; height: clamp(128px, 21dvh, 178px); }
.wx2-now { padding: .8rem .9rem; }
.wx2-now-icon svg { width: 26px; height: 26px; }
.wx2-temp { font-size: clamp(2.5rem, 7dvh, 3.5rem); }
.wx2-kind { margin-top: .25rem; font-size: .82rem; }
.wx2-minis { gap: .5rem; }
.wx2-mini { padding: .5rem .65rem; gap: .15rem; }
.wx2-mini b { font-size: clamp(1.1rem, 3dvh, 1.45rem); }
.wx2-card { margin: 0; padding: .65rem .9rem; }
.wx2-card > .wx2-label { margin-bottom: .45rem; }
.wx2 .wx2-hours-card { flex: 1 1 0; min-height: 96px; display: flex; flex-direction: column; }
.wx2-hours-card .wx2-hours { flex: 1; min-height: 0; }
.wx2-hours-card .wx2-hour { min-height: 0; gap: .3rem; }
.wx2-hours-card .wx2-bar { flex: 1 1 0; height: auto; min-height: 18px; max-height: 120px; }
.wx2-days .wx2-day { gap: .3rem; }
.wx2-day-icon svg { width: 22px; height: 22px; }
.wx2-tiles { gap: .5rem; }
.wx2-tile { padding: .55rem .85rem; gap: .1rem; }
.wx2-tile b { font-size: clamp(1.15rem, 3.2dvh, 1.5rem); }
.wx2 .wx-foot { margin: 0; font-size: .66rem; }
.wx2-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.wx2-mini { padding: .5rem .55rem; }
.wx2-mini span { font-size: .58rem; letter-spacing: .04em; text-overflow: clip; }
.wx2 .wx2-hours-card { min-height: 128px; }
/* Short phones (iPhone SE): the four detail tiles go in one row, without their notes, so the bars keep room. */
@media (max-height: 740px) {
  .wx2-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
  .wx2-tile { padding: .45rem .45rem; border-radius: 14px; }
  .wx2-tile .wx2-label { font-size: .52rem; letter-spacing: .03em; overflow: hidden; white-space: nowrap; }
  .wx2-tile b { font-size: .98rem; white-space: nowrap; }
  .wx2-tile b small { font-size: .58rem; }
  .wx2-tile > small { display: none; }
}
/* Every hour keeps a line for the chance of rain, so all the bars are the same height. */
.wx2-hour em { min-height: .9rem; }
@media (max-height: 740px) { .wx2-tile b { font-size: .9rem; letter-spacing: -.01em; } .wx2-tile b small { font-size: .52rem; } }
.wx2-hour em { height: .9rem; line-height: .9rem; }

/* Web Today (2026-11-21): houses on the map like the iPhone, and Details / Notes in a small panel above the sheet. */
.map-pin.map-house { width: auto; height: auto; }
.today-stage .stage-panel { position: absolute; z-index: 6; right: 1rem; bottom: calc(1rem + var(--sheet-h, 120px) + .6rem); width: min(380px, calc(100% - 2rem)); max-height: 55%; overflow-y: auto; padding: .8rem 1rem 1rem; background: color-mix(in srgb, var(--surface) 96%, transparent); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: sheet-up .18s ease-out; }
.stage-panel-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .7rem; }
.stage-panel-head strong { font-size: 1rem; }
.stage-panel-head .sheet-x { position: static; }
.stage-panel .v1-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 1rem; }
.stage-panel .v1-fact { display: flex; flex-direction: column; gap: .15rem; font-size: .88rem; font-weight: 600; }
.stage-panel .vd-compose textarea { width: 100%; }
.stage-panel .vd-compose-foot { display: flex; justify-content: flex-end; margin-top: .4rem; }
.stage-panel .vd-notes { display: grid; gap: .5rem; margin-top: .7rem; }

/* Web messages: the chat is wide and as tall as the window; the list on the left is narrower. */
:where(:root:not(.layout-760)) .msg-layout { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); }
:where(:root:not(.layout-760)) .msg-layout > .chat-thread { height: calc(100dvh - 190px); min-height: 460px; }
/* The phone's Today fits the screen and doesn't scroll (2026-11-21). */
:root:has(.today-phone:not(.crew-today)) body, :root:has(.today-phone:not(.crew-today)) { overflow: hidden; overscroll-behavior: none; }
:root:has(.today-phone:not(.crew-today)) main, :root:has(.today-phone:not(.crew-today)) .content { padding-bottom: 0; }
.tp-alert-more { align-self: center; min-height: 0; margin-top: -.25rem; padding: .35rem .9rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--accent); font-size: .82rem; font-weight: 700; box-shadow: var(--lift); }
:root:has(.today-phone:not(.crew-today)) .layout { padding-bottom: 0; }
@media (max-height: 740px) { .tp-gap { min-height: 40px; } }
:where(:root:not(.layout-760)) .msg-layout { grid-template-columns: minmax(280px, 330px) minmax(0, 1fr); }
:where(:root:not(.layout-760)) .msg-layout > .chat-thread { height: calc(100dvh - 215px); }
/* The Details panel is just the facts (2026-11-21). */
.today-stage .stage-panel.details { width: min(420px, calc(100% - 2rem)); padding: .8rem 2.8rem .85rem 1rem; }
.stage-panel .stage-x { position: absolute; top: .45rem; right: .45rem; width: 28px; height: 28px; }
.stage-panel.details .v1-facts { gap: .55rem .9rem; }
.stage-panel.details .v1-fact { font-size: .84rem; }

/* --- Web chat full screen (2026-11-21): with a chat open, the list becomes a narrow column of photos and the
   chat takes the rest; the page doesn't scroll, only the messages do (fitChat sets the height). --- */
.chat2-head-av { display: none; }
.loc-card { width: min(300px, 100%); overflow: hidden; border-radius: 14px; border: 1.5px solid var(--primary); background: var(--surface); }
.loc-map { height: 130px; background: var(--surface-2); }
.loc-map[data-drawn="skip"] { display: none; }
.loc-foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .55rem .75rem; }
.loc-foot span { display: flex; flex-direction: column; min-width: 0; }
.loc-foot b { font-size: .88rem; }
.loc-foot small { font-size: .72rem; color: var(--ink-soft); }
.loc-foot a { flex: none; font-size: .82rem; font-weight: 800; color: var(--primary); text-decoration: none; }
.bubble-row .bubble:has(> .loc-card) { padding: 0; background: none; }
.chat2-chips button span { white-space: nowrap; }

:where(:root:not(.layout-760)):has(.msg-layout.in-chat) body { overflow: hidden; }
:where(:root:not(.layout-760)) .msg-layout.in-chat { grid-template-columns: 64px minmax(0, 1fr); gap: .75rem; align-items: stretch; }
:where(:root:not(.layout-760)) .msg-layout.in-chat > .chat-thread { min-height: 0; }
/* The rail: write and new-group buttons on top, then one photo per chat. */
:where(:root:not(.layout-760)) .msg-layout.in-chat > .msg2 { display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: .7rem 0; overflow-y: auto; scrollbar-width: none; }
:where(:root:not(.layout-760)) .msg-layout.in-chat > .msg2 :is(.msg2-eyebrow, .msg2-title, .msg2-seg, .msg2-section, .msg2-main, .msg2-invite, .empty) { display: none; }
:where(:root:not(.layout-760)) .msg-layout.in-chat .msg2-top { flex-direction: column; gap: .5rem; }
:where(:root:not(.layout-760)) .msg-layout.in-chat .msg2-actions { flex-direction: column-reverse; gap: .5rem; }
:where(:root:not(.layout-760)) .msg-layout.in-chat .msg2-btn { width: 40px; height: 40px; border-radius: 12px; }
:where(:root:not(.layout-760)) .msg-layout.in-chat .msg2-row { justify-content: center; width: auto; padding: 0; border: 0; }
:where(:root:not(.layout-760)) .msg-layout.in-chat .msg2-row .chat-avatar { width: 42px; height: 42px; border-radius: 50%; }
:where(:root:not(.layout-760)) .msg-layout.in-chat .msg2-row.on .chat-avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--primary); }
:where(:root:not(.layout-760)) .msg-layout.in-chat .msg2-row { position: relative; }
:where(:root:not(.layout-760)) .msg-layout.in-chat .msg2-row.unread::after { content: ""; position: absolute; top: 0; right: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); border: 2px solid var(--surface); }
/* The chat's head: photo, name and role at the left, options at the right; back isn't needed beside the rail. */
:where(:root:not(.layout-760)) .chat2 .chat-thread-head { padding: .65rem 1rem; }
:where(:root:not(.layout-760)) .chat2 .chat-thread-head > .chat2-round:first-child { display: none; }
:where(:root:not(.layout-760)) .chat2-head-av { display: block; }
:where(:root:not(.layout-760)) .chat2-head-av .chat-avatar { width: 40px; height: 40px; border-radius: 50%; }
:where(:root:not(.layout-760)) .chat2-who { align-items: flex-start; text-align: left; }
/* The bar: photo, gallery and location as icons beside the box, then send. */
:where(:root:not(.layout-760)) .chat2 .chat-compose { flex-direction: row; align-items: flex-end; gap: .5rem; padding: .65rem 4.4rem .75rem 1rem; }
:where(:root:not(.layout-760)) .chat2-chips { flex: none; gap: .35rem; overflow: visible; }
:where(:root:not(.layout-760)) .chat2-chips button { width: 40px; height: 44px; justify-content: center; padding: 0; border-radius: 12px; }
:where(:root:not(.layout-760)) .chat2-chips button span { display: none; }
:where(:root:not(.layout-760)) .chat2-chips svg { width: 18px; height: 18px; }
:where(:root:not(.layout-760)) .chat2-write { flex: 1; min-width: 0; }
:where(:root:not(.layout-760)):has(.msg-layout.in-chat) { overflow: hidden; }
:where(:root:not(.layout-760)):has(.msg-layout.in-chat) :is(.layout, main) { padding-bottom: 0; }

/* Web only (2026-11-21): Note panel the size of Details, the open chat across the whole window, and an open email
   across the whole window. None of these apply to the phone layout. */
.today-stage .stage-panel.notes { height: 190px; display: flex; flex-direction: column; overflow: hidden; }
.stage-panel.notes .vd-compose { display: flex; align-items: flex-end; gap: .5rem; flex: none; }
.stage-panel.notes .vd-compose textarea { flex: 1; min-width: 0; min-height: 38px; resize: none; }
.stage-panel.notes .vd-compose button { flex: none; min-height: 38px; padding: .35rem .8rem; }
.stage-panel.notes .stage-notes { flex: 1; min-height: 0; overflow-y: auto; margin-top: .55rem; }
.stage-panel.notes .vd-notes { margin-top: 0; }
:root:not(.layout-phone) .layout:has(.msg-layout.in-chat) > .main { max-width: none; padding: 1rem 1.25rem 0; }
:root:not(.layout-phone) .layout:has(.inbox-screen.gm-open) > .main { max-width: none; }
:root:not(.layout-phone) .inbox-screen.gm-open { max-width: none; }

/* Phone chat only (2026-11-21), as in the design: the time sits at the left under the other person's message, and
   the header has no ⋯ button; tapping the name opens the chat's options instead. The web version doesn't change. */
:where(:root.layout-760) .chat2 .bubble-row.theirs .bubble-time { text-align: left; }
:where(:root.layout-760) .chat2 .chat-thread-head > [data-act="chatMenu"].chat2-round { display: none; }
:where(:root.layout-760) .chat2-who { cursor: pointer; }
:where(:root:not(.layout-760)) .chat2-who { pointer-events: none; }
/* Without the translate button the name stays centered: the same room on the right as the back button takes. */
:where(:root.layout-760) .chat2 .chat-thread-head:not(:has(.chat-translate)) { padding-right: calc(.8rem + 42px + .6rem); }
/* The Note panel is as tall as the room between the figures and the sheet (its top is set in showStagePanel). */
.today-stage .stage-panel.notes { height: auto; max-height: none; }

/* --- Browser, as on the phone design (2026-11-21) --- */
.browser2 { max-width: 760px; margin: 0 auto; padding-bottom: 1rem; }
.br-head h1 { margin: .2rem 0 .25rem; font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; }
.br-head p { margin: 0 0 1rem; color: var(--ink-soft); }
.br-search { display: flex; gap: .55rem; margin-bottom: 1.2rem; }
.br-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: .6rem; padding: 0 .9rem; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; color: var(--ink-soft); }
.br-field svg { flex: none; width: 19px; height: 19px; }
.br-field input { flex: 1; min-width: 0; padding: .85rem 0; background: transparent; border: 0; color: var(--ink); font-size: 1rem; outline: none; box-shadow: none; }
.br-search button { flex: none; min-width: 60px; min-height: 0; padding: 0 1.1rem; border-radius: 14px; font-weight: 800; font-size: 1rem; }
.br-section { margin: 0 0 .6rem; font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); }
.br-kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin-bottom: 1.1rem; }
.br-kind { display: flex; align-items: center; gap: .75rem; min-height: 58px; padding: .6rem .85rem; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; color: var(--ink); font-size: .92rem; font-weight: 700; line-height: 1.2; }
.br-kind:hover { border-color: var(--primary); }
.br-ic { flex: none; display: grid; place-items: center; color: var(--primary); }
.br-ic svg { width: 22px; height: 22px; }
.br-tools { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.br-tools button { display: inline-flex; align-items: center; gap: .4rem; }
.br-tools svg { width: 16px; height: 16px; }
.br-saved { padding: .9rem 1rem; margin-bottom: 1rem; border: 1.5px dashed var(--border); border-radius: 16px; background: var(--surface); }
.br-saved-head { display: flex; align-items: center; gap: .9rem; }
.br-saved-head strong { font-size: 1.05rem; }
.br-saved-head p { margin: .15rem 0 0; font-size: .88rem; color: var(--ink-soft); }
.br-saved-ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--primary); }
.br-saved-ic svg { width: 20px; height: 20px; }
.br-saved .clip-row { margin-top: .6rem; }
.br-note { font-size: .82rem; color: var(--ink-soft); line-height: 1.45; }
.br-note b { color: var(--ink); }

/* Web only (2026-11-21): the weather fills the whole window, in two columns: now and the next hours at the left,
   the next days and the four details at the right. The phone keeps its one column. */
:where(:root:not(.layout-phone)) dialog:has(.wx-screen) { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
:where(:root:not(.layout-phone)) .wx2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  grid-template-areas: "top top" "where where" "hero days" "hours tiles" "foot foot"; gap: .9rem 1.1rem;
  padding: 1.1rem max(24px, calc((100vw - 1400px) / 2)) 1rem; }
:where(:root:not(.layout-phone)) .wx2-top { grid-area: top; }
:where(:root:not(.layout-phone)) .wx2 .wx-where { grid-area: where; }
:where(:root:not(.layout-phone)) .wx2-hero { grid-area: hero; height: clamp(170px, 26dvh, 250px); }
:where(:root:not(.layout-phone)) .wx2-days-card { grid-area: days; display: flex; flex-direction: column; justify-content: center; }
:where(:root:not(.layout-phone)) .wx2 .wx2-hours-card { grid-area: hours; min-height: 0; }
:where(:root:not(.layout-phone)) .wx2-tiles { grid-area: tiles; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); min-height: 0; }
:where(:root:not(.layout-phone)) .wx2-tile { justify-content: center; }
:where(:root:not(.layout-phone)) .wx2-tile b { font-size: clamp(1.4rem, 3.4dvh, 2rem); }
:where(:root:not(.layout-phone)) .wx2-tile > small { display: block; }
:where(:root:not(.layout-phone)) .wx2 .wx-foot { grid-area: foot; }
:where(:root:not(.layout-phone)) .wx2-temp { font-size: clamp(3rem, 9dvh, 5rem); }
:where(:root:not(.layout-phone)) .wx2-mini b { font-size: clamp(1.3rem, 3.4dvh, 1.9rem); }
:where(:root:not(.layout-phone)) .wx2-hours-card .wx2-bar { max-height: none; }
:where(:root:not(.layout-phone)) .wx2-hours { grid-auto-columns: calc(100% / 8); }
:where(:root:not(.layout-phone)) .wx2-days { grid-auto-columns: calc(100% / 7); }

/* --- Browser on the phone: full screen and minimal (design "Option I") --- */
html.br-full .topbar, html.br-full .nav, html.br-full .subnav, html.br-full #assist-open { display: none !important; }
html.br-full .main { max-width: none; padding: 0; }
html.br-full, html.br-full body { background: #0A0A0B; overflow: hidden; }
.nav2 { --nv-bg: #0A0A0B; --nv-card: #151517; --nv-line: #262629; --nv-round: #1E1E21; --nv-orange: #FF8A00; --nv-link: #FF9A1F; --nv-yellow: #FFC23A; --nv-sel: #2A1A08; --nv-sel-line: #5A3510; --nv-ink: #F2F2F4; --nv-soft: #9C9CA3; --nv-red: #FF6B5A;
  position: relative; background: var(--nv-bg); color: var(--nv-ink); font-family: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif; font-weight: 700; min-height: 100dvh; box-sizing: border-box; }
html.br-full .nav2 { position: fixed; inset: 0; z-index: 30; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.nav2 button { font: inherit; color: inherit; cursor: pointer; }
.nav2 button:hover, .nav2 button:focus { box-shadow: none; }
.nav2 svg { width: 24px; height: 24px; stroke-width: 2; }
.nv-home { padding: 0 24px; overflow: hidden !important; }
.nv-glow { position: absolute; left: 50%; top: calc(env(safe-area-inset-top) + 70px); width: 360px; height: 220px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(255,138,0,.22), rgba(255,138,0,0)); filter: blur(20px); pointer-events: none; }
.nv-search { position: relative; margin: calc(env(safe-area-inset-top) + 106px) 0 0; height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 8px 0 20px; border-radius: 30px; background: #1A1A1C; box-shadow: 0 12px 30px rgba(0,0,0,.6); }
.nv-search > svg { color: var(--nv-ink); flex: none; width: 20px; height: 20px; }
.nv-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--nv-ink); font: inherit; font-size: 17px; outline: none; padding: 0; box-shadow: none; margin: 0; }
.nv-search input:focus { box-shadow: none; outline: none; }
.nv-search input::placeholder { color: #8E8E95; }
.nv-search input::-webkit-search-cancel-button { display: none; }
.nv-px { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--nv-orange); background: var(--nv-round); display: grid; place-items: center; padding: 0; }
.nv-px svg { width: 26px; height: 26px; }
.nv-grid { position: relative; margin-top: 48px; display: grid; grid-template-columns: repeat(4, 1fr); row-gap: 24px; justify-items: center; }
.nv-row-end { grid-column: 1 / -1; height: 0; margin-top: -24px; }
.nv-cell { display: flex; flex-direction: column; align-items: center; gap: 8px; background: none !important; border: 0; padding: 0; width: 76px; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; user-select: none; }
.nv-label { font-size: 12px; font-weight: 800; color: var(--nv-ink); max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-tile { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; box-sizing: border-box; background: var(--nv-card); border: 1px solid var(--nv-line); overflow: hidden; flex: none; }
.nv-tile svg { width: 24px; height: 24px; }
.nv-tile.small { width: 42px; height: 42px; border-radius: 12px; }
.nv-tile.small svg { width: 20px; height: 20px; }
.nv-logo.white { background: #fff; border-color: #fff; }
.nv-logo.white img, .nv-logo.dark img { width: 64%; height: 64%; object-fit: contain; }
.nv-logo.dark { background: #1A1A1C; }
.nv-logo.full { padding: 0; border: 0; background: #fff; }
.nv-logo.full img { width: 100%; height: 100%; object-fit: cover; }
.nv-letter { font-size: 24px; font-weight: 900; color: var(--nv-ink); background: var(--nv-round); }
.nv-add { background: var(--nv-card); border: 1px solid #3A3A3F; color: #8E8E95; }
.nv-cat { color: var(--nv-orange); }
.nv-tile.small.nv-cat { background: var(--nv-sel); border-color: transparent; }
.nv-saved { background: var(--nv-sel); border-color: var(--nv-sel-line); color: var(--nv-orange); }
.nv-tool { color: #C9C9CF; }
.nv-bottom { position: fixed; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 34px); display: flex; justify-content: center; gap: 42px; z-index: 5; pointer-events: none; }
.nv-bottom > * { pointer-events: auto; }
.nv-round { width: 62px; height: 62px; border-radius: 50%; border: 0; background: var(--nv-round) !important; display: grid; place-items: center; padding: 0; color: var(--nv-ink); -webkit-tap-highlight-color: transparent; box-shadow: 0 6px 18px rgba(0,0,0,.5); }
.nv-round.nv-hot { border: 1.5px solid var(--nv-orange); color: var(--nv-orange); background: #1A1208 !important; box-shadow: 0 0 20px rgba(255,138,0,.4) !important; }
.nv-round.small { width: 44px; height: 44px; flex: none; box-shadow: none; }
.nv-round.small svg { width: 20px; height: 20px; }
/* Panels that rise from the bottom (Add shortcut, Proliox, the menu). */
.nv-shade { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.6); }
.nv-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 88dvh; overflow-y: auto; background: #141416; border-radius: 28px 28px 0 0; border-top: 1.5px solid var(--nv-orange); box-shadow: 0 -10px 40px rgba(255,138,0,.18); padding: 10px 18px calc(env(safe-area-inset-bottom) + 22px); box-sizing: border-box; animation: nv-up .22s ease-out; }
@keyframes nv-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.nv-grip { display: block; width: 36px; height: 5px; border-radius: 3px; background: #4A4A50; margin: 0 auto 14px; }
.nv-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.nv-sheet-head h2 { margin: 0; font-size: 20px; font-weight: 900; color: var(--nv-ink); }
.nv-sheet-head p { margin: 2px 0 0; color: var(--nv-soft); font-size: 13px; }
.nv-px-head, .nv-menu-head { justify-content: flex-start; }
.nv-px-tile { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--nv-orange); background: var(--nv-sel); display: grid; place-items: center; flex: none; }
.nv-px-tile svg { width: 30px; height: 30px; }
.nv-x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--nv-round) !important; display: grid; place-items: center; padding: 0; color: var(--nv-ink); flex: none; }
.nv-x svg { width: 16px; height: 16px; }
.nv-preview { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.nv-preview p { margin: 0; color: #C9C9CF; font-size: 13px; line-height: 1.4; }
.nv-new-tile { background: var(--nv-sel); border: 1.5px solid var(--nv-sel-line); color: var(--nv-orange); font-size: 24px; font-weight: 900; }
.nv-field { display: block; margin-bottom: 16px; }
.nv-field span, .nv-label-orange { display: block; font-size: 11px; font-weight: 900; letter-spacing: .08em; color: var(--nv-soft); margin: 0 0 8px; }
.nv-label-orange { color: var(--nv-orange); }
.nv-field input { width: 100%; box-sizing: border-box; height: 48px; border-radius: 14px; border: 1px solid var(--nv-line); background: var(--nv-card); color: var(--nv-ink); font: inherit; font-size: 16px; padding: 0 14px; margin: 0; }
.nv-field input:focus { outline: none; border-color: var(--nv-orange); box-shadow: none; }
.nv-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.nv-chip { height: 32px; padding: 0 13px; border-radius: 16px; border: 1px solid var(--nv-line); background: var(--nv-card) !important; color: var(--nv-ink); font-size: 12px; font-weight: 800; }
.nv-chip.on { background: var(--nv-orange) !important; border-color: var(--nv-orange); color: #1A0E00 !important; }
.nv-wide { width: 100%; height: 54px; border-radius: 16px; border: 0; background: var(--nv-orange) !important; color: #1A0E00 !important; font-size: 16px; font-weight: 900; box-shadow: 0 0 20px rgba(255,138,0,.4) !important; }
.nv-wide:disabled { opacity: .6; }
.nv-options { display: grid; gap: 10px; }
.nv-option { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 10px 14px; border-radius: 16px; border: 1px solid var(--nv-line); background: var(--nv-card) !important; text-align: left; }
.nv-option-text { flex: 1; display: flex; flex-direction: column; }
.nv-option-text strong { font-size: 15px; font-weight: 900; }
.nv-option-text span { font-size: 12px; color: var(--nv-soft); }
.nv-option > svg { width: 16px; height: 16px; color: var(--nv-soft); }
.nv-option-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--nv-sel); display: grid; place-items: center; color: var(--nv-orange); flex: none; }
.nv-option-ic.hot { background: var(--nv-orange); color: #1A0E00; }
.nv-option-ic svg { width: 20px; height: 20px; }
.nv-menu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 6px; }
.nv-menu-cell { display: flex; flex-direction: column; align-items: center; gap: 7px; background: none !important; border: 0; padding: 0; font-size: 11px; font-weight: 800; text-align: center; }
.nv-menu-ic { width: 56px; height: 56px; border-radius: 16px; background: var(--nv-round); display: grid; place-items: center; color: var(--nv-ink); }
/* The browser's own pages: categories, Saved, Bookmarks, History and Settings. */
.nv-page { padding: calc(env(safe-area-inset-top) + 20px) 16px calc(env(safe-area-inset-bottom) + 32px); }
.nv-page.with-bottom { padding-bottom: calc(env(safe-area-inset-bottom) + 130px); }
.nv-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.nv-top h1 { flex: 1; min-width: 0; margin: 0; font-size: 22px; font-weight: 900; color: var(--nv-ink); }
.nv-count { font-size: 13px; font-weight: 900; color: var(--nv-soft); }
.nv-edge { height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--nv-sel-line); background: var(--nv-sel) !important; color: var(--nv-link) !important; font-size: 12px; font-weight: 900; }
.nv-edge.bad { border-color: #5A1F1A; background: #2A0E0B !important; color: var(--nv-red) !important; }
.nv-place { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; border-radius: 10px; border: 0; background: var(--nv-sel) !important; color: var(--nv-link) !important; font-size: 12px; font-weight: 900; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.nv-place svg { width: 14px; height: 14px; flex: none; }
.nv-hint { color: #C9C9CF; font-size: 12px; margin: -4px 2px 10px; }
.nv-find { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 23px; background: var(--nv-card); margin-bottom: 14px; }
.nv-find svg { color: var(--nv-soft); width: 18px; height: 18px; }
.nv-find input { flex: 1; min-width: 0; border: 0; background: none; color: var(--nv-ink); font: inherit; font-size: 15px; outline: none; padding: 0; box-shadow: none; margin: 0; }
.nv-find input:focus { box-shadow: none; }
.nv-filter { margin: 0 0 14px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nv-filter .nv-chip { flex: none; }
.nv-list { display: grid; gap: 10px; }
.nv-card { background: var(--nv-card); border: 1px solid var(--nv-line); border-radius: 16px; padding: 12px; }
.nv-card[hidden], .nv-line[hidden] { display: none; }
.nv-card-top { display: flex; align-items: center; gap: 12px; }
.nv-card-text { display: flex; flex-direction: column; min-width: 0; }
.nv-name { color: var(--nv-ink) !important; font-size: 15px; font-weight: 900; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-card-text span { color: var(--nv-soft); font-size: 12px; }
.nv-card-acts { display: flex; gap: 8px; margin-top: 12px; }
.nv-btn { flex: 1; height: 40px; border-radius: 12px; border: 1px solid var(--nv-line); background: var(--nv-round); color: var(--nv-ink) !important; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 900; text-decoration: none; padding: 0 10px; }
.nv-btn svg { width: 16px; height: 16px; }
.nv-btn.line { background: none !important; border-color: var(--nv-sel-line); color: var(--nv-link) !important; }
.nv-btn.hot { background: var(--nv-orange) !important; border-color: var(--nv-orange); color: #1A0E00 !important; }
.nv-btn.off, .nv-btn:disabled { opacity: .4; }
.nv-btn.icon-only { flex: none; width: 40px; padding: 0; }
.nv-biz { display: flex; align-items: center; gap: 12px; padding: 12px; }
.nv-biz-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; background: none !important; border: 0; padding: 0; text-align: left; }
.nv-biz-text strong { font-size: 14px; font-weight: 900; color: var(--nv-ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-biz-text span { font-size: 12px; color: var(--nv-soft); }
.nv-save { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--nv-orange); background: var(--nv-orange) !important; color: #1A0E00 !important; font-size: 12px; font-weight: 900; }
.nv-save svg { width: 14px; height: 14px; }
.nv-save.done { background: none !important; border-color: var(--nv-sel-line); color: var(--nv-link) !important; }
.nv-google { margin: 16px auto 0; flex: none; width: auto; padding: 0 18px; }
.nv-box { background: var(--nv-card); border: 1px solid var(--nv-line); border-radius: 16px; overflow: hidden; }
.nv-line { display: flex; align-items: center; border-bottom: 1px solid var(--nv-line); }
.nv-line:last-child { border-bottom: 0; }
.nv-line-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: none !important; border: 0; text-align: left; color: var(--nv-ink); }
.nv-line-main > svg { width: 16px; height: 16px; color: var(--nv-soft); flex: none; }
.nv-globe { width: 32px; height: 32px; border-radius: 9px; background: var(--nv-round); display: grid; place-items: center; color: #C9C9CF; flex: none; }
.nv-globe svg { width: 17px; height: 17px; }
.nv-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nv-row-text strong { font-size: 14px; font-weight: 900; color: var(--nv-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-row-text span { font-size: 12px; color: var(--nv-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-time { font-size: 11px; color: var(--nv-soft); flex: none; font-weight: 800; }
.nv-del { border: 0; background: none !important; color: var(--nv-red) !important; padding: 10px 14px; }
.nv-group { margin: 18px 4px 8px; font-size: 11px; font-weight: 900; letter-spacing: .1em; color: var(--nv-soft); }
.nv-group.orange { color: var(--nv-orange); }
.nv-top + .nv-group { margin-top: 4px; }
.nv-empty { color: var(--nv-soft); text-align: center; padding: 28px 12px; margin: 0; display: flex; flex-direction: column; align-items: center; }
.nv-tip { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; padding: 14px; border-radius: 14px; background: var(--nv-sel); color: var(--nv-link); font-size: 13px; font-weight: 800; line-height: 1.35; }
.nv-tip svg { width: 18px; height: 18px; flex: none; }
.nv-set { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; padding: 0 14px; box-sizing: border-box; background: none !important; border: 0; border-bottom: 1px solid var(--nv-line); font-size: 14px; font-weight: 800; color: var(--nv-ink); text-align: left; margin: 0; }
.nv-box > .nv-set:last-child { border-bottom: 0; }
.nv-set.bad { color: var(--nv-red) !important; }
.nv-val { display: inline-flex; align-items: center; gap: 6px; color: var(--nv-soft); font-weight: 700; font-size: 13px; }
.nv-val svg { width: 15px; height: 15px; }
.nv-hidden-select { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; }
.nv-switch { appearance: none; -webkit-appearance: none; width: 51px; height: 31px; border-radius: 16px; background: #3A3A3F; position: relative; flex: none; margin: 0; cursor: pointer; transition: background .2s; border: 0; box-shadow: none; padding: 0; }
.nv-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; transition: transform .2s; }
.nv-switch:checked { background: var(--nv-orange); }
.nv-switch:checked::after { transform: translateX(20px); }
.nv-first { grid-column-start: 1; }
.nv-looking { gap: 14px; padding-top: 60px; }
.nv-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--nv-sel-line); border-top-color: var(--nv-orange); animation: nv-spin .8s linear infinite; }
@keyframes nv-spin { to { transform: rotate(360deg); } }
.nv-list { grid-template-columns: minmax(0, 1fr); }
.nav2.nv-page { overflow-x: hidden; }
.nv-filter { scrollbar-width: none; }
.nv-filter::-webkit-scrollbar { display: none; }

/* Houses on the Today maps: every job orange, a finished job green, the next one lit with a glow. */
.tp-pin .tp-pin-dot { color: #1A0E00; background: #FF8A00; border-color: #FFB054; }
.tp-pin.next .tp-pin-dot { color: #1A0E00; background: #FF8A00; border-color: #fff; box-shadow: 0 0 0 5px rgba(255, 138, 0, .32), 0 2px 8px rgba(0, 0, 0, .35); }
.tp-pin.done .tp-pin-dot { color: #fff; background: #22A447; border-color: #5BD27E; }
/* The crew's Today: the same map stage as the Owner's, and it scrolls down to their visit cards. */
.crew-today .crew-clock { margin: 0; }
.crew-today .callout { margin: 0; }
.crew-today .tp-day .day-totals b { font-size: 1.3rem; }
.crew-home .visit-card { scroll-margin-top: 12px; transition: box-shadow .3s ease; }
.crew-home .visit-card.flash { box-shadow: 0 0 0 3px #FF8A00, 0 0 24px rgba(255, 138, 0, .45); }

/* Who sees what on a phone: Owner / Admin / Crew as tabs and one short line per switch (all 13 on one screen). */
.perm-phone { display: grid; gap: .6rem; }
.perm-seg { display: flex; gap: 3px; padding: 3px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.perm-seg button { flex: 1; min-height: 0; padding: .5rem .2rem; font-size: .8rem; font-weight: 700; color: var(--muted); background: none; border: 0; border-radius: 9px; box-shadow: none; white-space: nowrap; }
.perm-seg button span { font-weight: 600; opacity: .8; }
.perm-seg button.on { color: var(--primary-ink); background: var(--primary); }
.perm-seg button.on span { opacity: 1; }
.perm-seg button span, .perm-seg button b { color: inherit; }
.perm-seg button:hover:not(.on) { background: none; }
.perm-compact { padding: .1rem .85rem; }
.perm-compact .perm-line { gap: .6rem; padding: .42rem 0; }
.perm-compact .perm-text { display: block; font-size: .82rem; line-height: 1.25; }
.perm-compact .perm-text strong { font-size: .86rem; font-weight: 700; }
.perm-compact .perm-text .muted { font-size: .76rem; }
.perm-compact input.switch { width: 40px; height: 24px; min-height: 0; }
.perm-compact input.switch::after { width: 18px; height: 18px; }
.perm-compact input.switch:checked::after { transform: translateX(16px); }
.perm-compact .perm-owner-note { margin: .7rem 0; }

/* --- Team, profile and Safety on the phone (2026-11-28) --- */
.tm-phone, .pf-phone, .sf-phone { display: flex; flex-direction: column; gap: 14px; padding-bottom: 24px; }
.tm-head { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.tm-head h1 { margin: 0; font-size: 2rem; font-weight: 800; }
.tm-count { padding: 4px 11px; border-radius: 999px; font-size: .82rem; font-weight: 800; color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.tm-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tm-act { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 0; padding: 0; color: var(--ink); font-size: .78rem; font-weight: 700; text-decoration: none; background: none !important; border: 0; box-shadow: none; }
.tm-act-ic { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 18px; color: var(--accent); background: var(--surface-2); border: 1px solid var(--line); }
.tm-act-ic.hot { color: #1a0f00; background: var(--accent); border-color: transparent; box-shadow: 0 6px 22px color-mix(in srgb, var(--accent) 45%, transparent); }
.tm-act-ic svg { width: 26px; height: 26px; }
.tm-label { margin: 8px 0 -4px; font-size: .74rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.tm-list, .pf-card { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); border-radius: 18px; }
.tm-row, .sf-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 0; padding: 12px 14px; color: var(--ink); text-align: left; text-decoration: none; background: none !important; border: 0; border-radius: 0; box-shadow: none; }
.tm-row + .tm-row, .sf-row + .sf-row { border-top: 1px solid var(--line); }
.tm-row.inactive { opacity: .55; }
.tm-av { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; }
.tm-av .person-photo, .pf-photo .person-photo { display: grid; place-items: center; width: 100%; height: 100%; margin: 0; border-radius: 50%; color: var(--accent) !important; background: color-mix(in srgb, var(--accent) 16%, var(--surface)) !important; box-shadow: 0 0 0 2.5px var(--accent); object-fit: cover; }
.tm-av.working .person-photo { box-shadow: 0 0 0 2.5px #22a447; }
.tm-av.dashed { color: var(--accent); border: 2px dashed color-mix(in srgb, var(--accent) 60%, transparent); }
.tm-av.dashed svg { width: 20px; height: 20px; }
.tm-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tm-text strong { font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-text > span { font-size: .84rem; color: var(--ink-soft); }
.tm-invite .tm-text strong { color: var(--accent); }
.tm-row .role-tag, .pf-hero .role-tag { border-radius: 999px; color: var(--accent); border-color: color-mix(in srgb, var(--accent) 70%, transparent); }
.tm-chev { flex: none; display: grid; color: var(--ink-soft); }
.tm-chev svg { width: 18px; height: 18px; }
.tm-empty { margin: 14px; }

.pf-back { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; color: var(--accent); font-weight: 800; text-decoration: none; }
.pf-back svg { width: 18px; height: 18px; }
.pf-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.pf-photo { display: grid; width: 104px; height: 104px; border-radius: 50%; box-shadow: 0 0 26px color-mix(in srgb, var(--accent) 40%, transparent); }
.pf-photo .person-photo { font-size: 2.2rem; box-shadow: 0 0 0 3px var(--accent); }
.pf-hero h1 { margin: 8px 0 0; font-size: 1.7rem; font-weight: 800; }
.pf-hero p { margin: 0; }
.pf-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pf-act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 76px; padding: 10px 4px; color: var(--ink); font-size: .8rem; font-weight: 700; text-decoration: none; background: var(--surface) !important; border: 1px solid var(--line); border-radius: 16px; box-shadow: none; }
.pf-act svg { width: 22px; height: 22px; color: var(--accent); }
.pf-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 0; padding: 15px 16px; color: var(--ink-soft); font-size: .95rem; text-align: left; background: none !important; border: 0; border-radius: 0; box-shadow: none; }
.pf-line + .pf-line { border-top: 1px solid var(--line); }
.pf-line b { color: var(--ink); font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-line b.hot { color: var(--accent); }
.pf-about p { margin: 14px 16px; }
.pf-week { display: flex; align-items: flex-end; justify-content: space-between; }
.pf-week > span { display: flex; gap: 4px; }
.pf-week button { display: grid; place-items: center; width: 30px; height: 26px; min-height: 0; padding: 0; color: var(--accent); background: none !important; border: 0; box-shadow: none; }
.pf-week button svg { width: 18px; height: 18px; }
.pf-report { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 0; padding: 13px 16px; color: var(--ink); text-align: left; background: none !important; border: 0; border-radius: 0; box-shadow: none; }
.pf-report + .pf-report { border-top: 1px solid var(--line); }
.pf-report > svg { flex: none; width: 24px; height: 24px; color: var(--accent); }
.pf-report-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pf-report-text strong { font-size: 1rem; }
.pf-report-text span { font-size: .84rem; color: var(--ink-soft); }
.pf-modal .modal-title { display: flex; align-items: center; justify-content: space-between; }
.pf-modal .modal-body > .card { margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
.pf-modal .modal-body > .card > h2:first-child, .pf-modal .modal-body > .card > .card-head h2 { display: none; }

.sf-hero { display: flex; flex-direction: column; align-items: center; gap: 18px; margin: -1rem -1rem 0; padding: 22px 18px 24px; background: linear-gradient(180deg, #2a0d0d, #1c0909); border-bottom: 1px solid rgba(255, 80, 70, .25); }
.sf-hero h1 { align-self: flex-start; display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.8rem; font-weight: 800; color: #fff; }
.sf-hero h1 svg { width: 28px; height: 28px; }
.sf-sos-ring { display: grid; place-items: center; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(230, 57, 46, .28) 55%, rgba(230, 57, 46, .08) 70%, transparent 72%); }
.sf-sos { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 172px; height: 172px; min-height: 0; padding: 0; color: #fff; background: #e6392e !important; border: 0; border-radius: 50%; box-shadow: 0 0 0 10px rgba(230, 57, 46, .25), 0 10px 40px rgba(230, 57, 46, .5); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; transition: transform .2s; }
.sf-sos strong { font-size: 3.2rem; font-weight: 900; letter-spacing: .04em; line-height: 1; }
.sf-sos span { font-size: .85rem; font-weight: 700; }
.sf-sos.holding { transform: scale(.94); box-shadow: 0 0 0 24px rgba(230, 57, 46, .35), 0 10px 40px rgba(230, 57, 46, .6); transition: transform 2s linear, box-shadow 2s linear; }
.sf-help { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; width: 100%; }
.sf-help button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 6px; color: #fff; font-size: .9rem; font-weight: 800; white-space: nowrap; background: rgba(0, 0, 0, .18) !important; border: 1.5px solid rgba(255, 90, 80, .45); border-radius: 14px; box-shadow: none; }
.sf-help svg { flex: none; width: 19px; height: 19px; }
.sf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; font-size: .9rem; font-weight: 800; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.sf-chip svg { width: 16px; height: 16px; }
.sf-chip.level { color: #4ade80; background: rgba(34, 164, 71, .18); border-color: transparent; }
.sf-chip.level.info { color: #fde047; background: rgba(234, 179, 8, .18); }
.sf-chip.level.warn { color: #fb923c; background: rgba(249, 115, 22, .2); }
.sf-chip.level.bad { color: #f87171; background: rgba(239, 68, 68, .2); }
.sf-tips, .sf-note { margin: 0; }
.sf-head { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.sf-head h2 { margin: 0; font-size: 1.3rem; font-weight: 800; }
.sf-head .primary { display: inline-flex; align-items: center; gap: 6px; border-radius: 14px; font-weight: 800; }
.sf-head .primary svg { width: 18px; height: 18px; }
.sf-dot { flex: none; width: 11px; height: 11px; border-radius: 50%; background: #facc15; }
.sf-dot.bad { background: #ef4444; }

/* Safety on the phone fits the screen: the page doesn't scroll, only the reports list (2026-11-28). */
:root:has(.sf-phone) body, :root:has(.sf-phone) { overflow: hidden; overscroll-behavior: none; }
:root:has(.sf-phone) main, :root:has(.sf-phone) .content, :root:has(.sf-phone) .layout { padding-bottom: 0; }
.sf-phone { gap: 10px; margin: -1rem -1rem 0; padding: 0 1rem 10px; overflow-y: auto; overscroll-behavior: contain; }
.sf-phone .sf-hero { margin: 0 -1rem; }
.sf-phone > * { flex: none; }
.sf-phone > .sf-list { flex: 1 1 auto; min-height: 64px; overflow-y: auto; }
.sf-phone .sf-hero { gap: 12px; padding: 14px 16px 16px; }
.sf-phone .sf-hero h1 { font-size: 1.5rem; }
.sf-phone .sf-sos-ring { width: 184px; height: 184px; }
.sf-phone .sf-sos { width: 144px; height: 144px; }
.sf-phone .sf-sos strong { font-size: 2.7rem; }
.sf-phone .sf-head { margin-top: 0; }
.sf-phone .sf-head h2 { font-size: 1.15rem; }
.sf-phone .sf-head .primary { min-height: 40px; padding: 0 14px; }
.sf-phone .sf-row { padding: 10px 14px; }
.sf-phone .sf-chip { padding: 6px 12px; font-size: .84rem; }
.sf-phone.short .sf-sos-ring { width: 140px; height: 140px; }
.sf-phone.short .sf-sos { width: 112px; height: 112px; box-shadow: 0 0 0 7px rgba(230, 57, 46, .25), 0 8px 28px rgba(230, 57, 46, .5); }
.sf-phone.short .sf-sos strong { font-size: 2.1rem; }
.sf-phone.short .sf-sos span { font-size: .72rem; }
.sf-phone.short .sf-hero { gap: 8px; padding: 10px 14px 12px; }
.sf-phone.short .sf-help button { min-height: 40px; }
.sf-phone.short .sf-tips { display: none; }

/* Any window on a phone sits exactly over what is visible (fitModalToScreen sets top and height); the page behind
   is hidden and doesn't scroll, and the window scrolls inside itself. */
/* The wide shadow paints the dark background all around the window, also under the see-through keyboard. */
:root.modal-open-phone dialog#modal:not(:has(.action-menu)) { bottom: auto; overscroll-behavior: contain; box-shadow: 0 0 0 100vmax var(--bg); }
:root.modal-open-phone dialog#modal:not(:has(.action-menu))::backdrop { background: var(--bg); }
/* A window on a phone never moves: it doesn't scroll itself or sideways; only its middle part scrolls, up and down. */
:root.layout-phone dialog#modal { overflow-x: hidden; overscroll-behavior: none; touch-action: pan-y; }
:root.layout-phone dialog#modal:has(> .modal-form) { overflow: hidden; }
:root.layout-phone dialog#modal > .modal-form { min-height: 0; max-width: 100%; overflow: hidden; }
:root.layout-phone dialog#modal .modal-body { min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; }
:root.modal-open-phone, :root.modal-open-phone body { overflow: hidden; overscroll-behavior: none; }
.gm-dialog .gm-compose-text { min-height: 80px; }

/* Action menus (Quote actions, Job, Client...): a sheet with round icon tiles (2026-11-28). */
dialog:has(.am-sheet) { width: min(460px, calc(100vw - 24px)); background: var(--surface); }
:root.layout-phone dialog:has(.am-sheet) { top: auto; bottom: 0; width: 100vw; max-width: none; height: auto; max-height: 88dvh; margin: 0; border-radius: 24px 24px 0 0; border-top: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
:root.layout-phone dialog:has(.am-sheet) > .am-sheet { height: auto; max-height: 88dvh; }
:root.layout-phone dialog:has(.am-sheet) .am-sheet .modal-body { flex: 0 1 auto; }
.am-sheet { display: flex; flex-direction: column; padding: 8px 20px calc(16px + env(safe-area-inset-bottom)); background: var(--surface); }
.am-sheet .modal-body { padding: 0; overflow-y: auto; }
.am-sheet .modal-foot { padding: 16px 0 0; background: none; border: 0; }
.am-grip { align-self: center; width: 40px; height: 5px; margin: 2px 0 16px; border-radius: 99px; background: var(--line); }
.am-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.am-head-ic { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); }
.am-head-ic svg { width: 24px; height: 24px; }
.am-head-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.am-head-text strong, .am-head.plain strong { font-size: 1.12rem; font-weight: 800; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-head-text span { font-size: .86rem; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-status { flex: none; padding: 5px 12px; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); background: var(--surface-2); border-radius: 999px; }
.am-status.ok { color: #4ade80; background: rgba(34, 164, 71, .16); }
.am-status.warn, .am-status.accent { color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.am-status.bad { color: #f87171; background: rgba(239, 68, 68, .16); }
.am-status.info { color: #60a5fa; background: rgba(59, 130, 246, .16); }
.am-label { margin: 2px 0 12px; font-size: .72rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.am-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 6px; }
.am-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 0; padding: 0; color: var(--ink); font-size: .8rem; font-weight: 700; text-align: center; background: none !important; border: 0; box-shadow: none; }
.am-ic { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; color: var(--accent); background: var(--surface-2); }
.am-ic svg { width: 24px; height: 24px; }
.am-tile.hot .am-ic { color: #1a0f00; background: var(--accent); box-shadow: 0 6px 22px color-mix(in srgb, var(--accent) 45%, transparent); }
.am-tile.danger .am-ic { color: #f87171; background: rgba(239, 68, 68, .14); }
.am-tile.danger .am-name { color: #f87171; }
.am-line { margin: 18px 0; border: 0; border-top: 1px solid var(--line); }
.am-rows { display: flex; flex-direction: column; gap: 8px; }
.am-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 50px; padding: 0 14px; color: var(--ink); font-weight: 700; text-align: left; background: var(--surface-2) !important; border: 0; border-radius: 14px; box-shadow: none; }
.am-row svg { flex: none; width: 18px; height: 18px; color: var(--ink-soft); }
.am-cancel { width: 100%; min-height: 54px; font-size: 1.02rem; font-weight: 800; color: var(--ink); background: var(--surface-2) !important; border: 0 !important; border-radius: 16px; box-shadow: none; }

/* Sheet forms: Invite team member and Add subcontractor (2026-11-28). */
.ff-form .ff-head { display: flex; align-items: flex-start; gap: 12px; }
.ff-form .ff-head h2 { margin: 0; font-size: 1.25rem; font-weight: 800; color: var(--ink); }
.ff-form .ff-head p { margin: 2px 0 0; font-size: .82rem; font-weight: 500; color: var(--ink-soft); }
.ff-x { flex: none; display: grid; place-items: center; width: 36px; height: 36px; min-height: 0; padding: 0; color: var(--ink); background: var(--surface-2) !important; border: 0; border-radius: 50%; box-shadow: none; }
.ff-x svg { width: 16px; height: 16px; }
.ff-form .modal-body { display: flex; flex-direction: column; gap: 12px; }
.ff-photo { display: flex; align-items: center; gap: 14px; margin: 0; cursor: pointer; font-weight: 400; }
.ff-photo-ic { flex: none; display: grid; place-items: center; width: 64px; height: 64px; overflow: hidden; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); border: 2px dashed color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 50%; }
.ff-photo-ic svg { width: 24px; height: 24px; }
.ff-photo-ic img { width: 100%; height: 100%; object-fit: cover; }
.ff-photo-text { display: flex; flex-direction: column; }
.ff-photo-text strong { font-size: .92rem; color: var(--ink); }
.ff-photo-text span { font-size: .78rem; color: var(--ink-soft); }
.ff-sec { display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.ff-label { margin: 0; font-size: .72rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.ff-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.ff-name { font-size: .8rem; font-weight: 700; color: var(--ink); }
.ff-input { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s; }
.ff-input > svg { flex: none; width: 18px; height: 18px; color: var(--ink-soft); }
.ff-input input { flex: 1; min-width: 0; min-height: 0; height: 48px; margin: 0; padding: 0; font-size: 1rem; color: var(--ink); background: transparent !important; border: 0 !important; box-shadow: none !important; outline: none; }
.ff-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.ff-input:focus-within > svg { color: var(--accent); }
.ff-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
.ff-seg label { margin: 0; cursor: pointer; }
.ff-seg label { position: relative; }
.ff-seg input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; pointer-events: none; }
.ff-seg span { display: block; padding: 10px 4px; font-size: .86rem; font-weight: 800; text-align: center; color: var(--ink-soft); border-radius: 10px; }
.ff-seg input:checked + span { color: #1a0f00; background: var(--accent); }
.ff-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.ff-notes { width: 100%; min-height: 88px; padding: 12px 14px; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 14px; resize: vertical; }
.ff-notes:focus { border-color: var(--accent); outline: none; }
.ff-hint { margin: 0; font-size: .82rem; color: var(--ink-soft); }
.ff-foot-note { padding: 0 4px; }
.ff-form .modal-foot { display: flex; gap: 10px; }
.ff-form .modal-foot > button { min-height: 50px; border-radius: 14px; font-weight: 800; }
.ff-form .modal-foot > [data-close] { flex: 1; }
.ff-form .modal-foot > .primary { flex: 1.6; }

/* Today's phone map: other open jobs (not today) are quieter houses; addresses not found get a small note. */
.tp-pin.other { opacity: .78; transform: scale(.86); }
.tp-pin.other .tp-pin-dot { background: #3f3f46; color: #f4f4f5; box-shadow: none; }
.tp-pin.other .tp-pin-name { opacity: .85; }
.tp-gap { position: relative; }
.tp-lost { position: absolute; left: 0; bottom: 6px; pointer-events: auto; min-height: 0; padding: 6px 12px; font-size: 12px; font-weight: 800; color: #fbbf24; background: rgba(11, 11, 13, .82) !important; border: 1px solid rgba(251, 191, 36, .45); border-radius: 999px; box-shadow: none; }

/* Client (D), invoice (2) and quote (1) on the phone (2026-11-28). */
.px-page { display: flex; flex-direction: column; gap: 0; margin: -1rem -1rem 0; }
.px-head { padding: 14px 16px 0; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 12%, var(--bg)), var(--bg)); border-bottom: 1px solid var(--line); }
.px-round { flex: none; display: grid; place-items: center; width: 44px; height: 44px; min-height: 0; padding: 0; color: var(--accent); background: var(--surface-2) !important; border: 0; border-radius: 50%; box-shadow: none; text-decoration: none; }
.px-round svg { width: 19px; height: 19px; }
.px-head > .px-round { width: 40px; height: 40px; }
.px-title { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.px-avatar { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; font-weight: 900; font-size: 18px; color: #1a0f00; background: var(--accent); }
.px-title h1, .px-bar h1 { flex: 1; min-width: 0; margin: 0; font-size: 1.6rem; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-sub { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.px-sub-text { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; overflow: hidden; }
.px-create { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; font-weight: 800; color: #1a0f00; background: var(--accent) !important; border: 0; border-radius: 999px; box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 40%, transparent); }
.px-create svg { width: 18px; height: 18px; }
.px-tabs { display: flex; gap: 20px; margin-top: 16px; overflow-x: auto; scrollbar-width: none; }
.px-tabs button { flex: none; min-height: 0; padding: 0 0 12px; font-size: 15px; font-weight: 700; color: var(--ink-soft); background: none !important; border: 0; border-bottom: 3px solid transparent; border-radius: 0; box-shadow: none; }
.px-tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.px-count { font-size: 12px; color: var(--accent); }
.px-body { display: flex; flex-direction: column; gap: 12px; padding: 16px 16px 24px; }
.px-body > .card { margin: 0; }
.px-card { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.px-line { display: flex; align-items: center; gap: 12px; padding: 13px 16px; font-weight: 600; }
.px-line + .px-line { border-top: 1px solid var(--line); }
.px-line > svg { flex: none; width: 18px; height: 18px; color: var(--accent); }
.px-line > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.px-line a, .px-line .link { color: var(--accent); font-weight: 700; text-decoration: none; }
.px-next { flex-direction: row; align-items: center; gap: 12px; padding: 14px 16px; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.px-date { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 46px; height: 50px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 15%, transparent); }
.px-date span { font-size: 10px; font-weight: 800; color: var(--accent); }
.px-date strong { font-size: 20px; line-height: 1.1; }
.px-next-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.px-next-text a { color: inherit; text-decoration: none; }
.px-kicker { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.px-done { flex: none; min-height: 40px; padding: 0 14px; font-weight: 800; color: #1a0f00; background: var(--accent) !important; border: 0; border-radius: 12px; }
.px-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.px-stats > div { display: flex; flex-direction: column; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.px-stats span { font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.px-stats strong { font-size: 18px; font-weight: 900; }
.hot { color: var(--accent); }
.px-last { gap: 4px; padding: 14px 16px; text-align: left; color: var(--ink); background: var(--surface) !important; box-shadow: none; min-height: 0; }
.px-last-top { display: flex; justify-content: space-between; font-size: 12px; }
.px-last-body { font-size: 14px; color: var(--ink-soft); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.px-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.px-add { min-height: 0; padding: 7px 12px; font-size: 13px; font-weight: 800; color: var(--accent); background: none !important; border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 999px; box-shadow: none; }
.px-label { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; font-size: 12px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.px-label a, .px-label .link { font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--accent); text-decoration: none; }
.px-items { gap: 0; }
.px-item { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.px-item.text { color: var(--ink-soft); font-size: 14px; }
.px-item-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.px-item-ic svg { width: 20px; height: 20px; }
.px-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.px-item-text span { font-size: 13px; color: var(--ink-soft); line-height: 1.4; }
.px-item-amt { flex: none; display: flex; flex-direction: column; align-items: flex-end; }
.px-item-amt span { font-size: 12px; color: var(--ink-soft); }
.px-sums { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 12px 8px; text-align: center; }
.px-sums span { display: flex; flex-direction: column; font-size: 12px; color: var(--ink-soft); }
.px-sums strong { font-size: 15px; color: var(--ink); }
.px-sums strong.hot { color: var(--accent); }
.px-pad { margin: 14px 16px; }
.px-bar { display: flex; align-items: center; gap: 8px; padding: 14px 16px 0; }
.px-bar h1 { font-size: 1.35rem; flex: 0 1 auto; }
.px-bar > .badge { flex: none; }
.px-bar > .px-round:nth-last-child(-n+2) { margin-left: auto; }
.px-bar > .px-round + .px-round { margin-left: 0; }
.px-hero { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 22px 18px 18px; text-align: center; background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--accent) 28%, transparent), var(--surface) 65%); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 26px; }
.px-hero-sub { font-size: 14px; color: var(--ink-soft); }
.px-hero-sub a { color: var(--accent); text-decoration: none; }
.px-total { font-size: 2.8rem; font-weight: 900; line-height: 1; }
.px-ring { position: relative; width: 150px; height: 150px; color: var(--accent); }
.px-ring svg { width: 150px; height: 150px; }
.px-ring-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink); }
.px-ring-in strong { font-size: 1.7rem; font-weight: 900; }
.px-ring-in > span:last-child { font-size: 12px; color: var(--ink-soft); }
.px-big { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 54px; font-size: 16px; font-weight: 800; color: #1a0f00; background: var(--accent) !important; border: 0; border-radius: 16px; box-shadow: 0 8px 26px color-mix(in srgb, var(--accent) 40%, transparent); text-decoration: none; }
.px-big.ghost { min-height: 46px; color: var(--accent); background: transparent !important; border: 1.5px solid var(--accent); box-shadow: none; }
.px-tiles { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; width: 100%; }
.px-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 60px; padding: 0; font-size: 12px; font-weight: 700; color: var(--ink); background: rgba(0, 0, 0, .35) !important; border: 0; border-radius: 14px; box-shadow: none; text-decoration: none; }
.px-tile svg { width: 22px; height: 22px; color: var(--accent); }
.px-strip { display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-size: 13px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); }
.px-strip > svg { flex: none; width: 20px; height: 20px; color: var(--accent); }
.px-strip > span { flex: 1; }
.px-strip .link { font-weight: 800; }
.px-strip.ok { background: rgba(34, 164, 71, .1); border-color: rgba(34, 164, 71, .35); }
.px-strip.ok > svg, .px-strip.ok .link { color: #4ade80; }
.px-doc-title { margin: -4px 0 0; font-size: 14px; }
.px-steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; width: 100%; }
.px-steps > div { display: flex; flex-direction: column; gap: 5px; }
.px-steps i { height: 6px; border-radius: 3px; background: var(--line); }
.px-steps .done i { background: var(--accent); }
.px-steps .now i { box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent); }
.px-steps span { font-size: 11px; font-weight: 800; color: var(--ink-soft); }
.px-steps .now span { color: var(--accent); }
.px-dates { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.px-dates > div { display: flex; flex-direction: column; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.px-dates > div.hot { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.px-dates span { font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.px-dates strong { font-size: 14px; color: var(--ink); }
.px-dates .link { align-self: flex-start; min-height: 0; padding: 0; font-size: 12px; font-weight: 800; }
.px-timeline { display: flex; flex-direction: column; padding-left: 8px; }
.px-step { display: flex; gap: 14px; padding-bottom: 12px; }
.px-step > i { flex: none; width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; background: #60a5fa; }
.px-step > i.ok { background: #22a447; }
.px-step > i.bad { background: #ef4444; }
.px-step > i.empty { background: none; border: 2px dashed var(--ink-soft); box-sizing: border-box; }
.px-step > span { display: flex; flex-direction: column; font-size: 14px; }
.px-step > span > span { font-size: 12px; color: var(--ink-soft); }
.px-step-acts { display: flex; gap: 10px; }
.px-details summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 800; list-style: none; }
.px-details summary::-webkit-details-marker { display: none; }
.px-read { font-size: 13px; color: var(--accent); }
.px-details[open] .px-read { display: none; }
.px-details p { margin-top: 10px; }

/* The job on the phone ("Job 1", 2026-11-28). */
.px-address { display: flex; align-items: center; gap: 6px; margin: -2px 0 0; }
.px-address svg { flex: none; width: 15px; height: 15px; color: var(--accent); }
.px-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.px-box { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.px-box > span:first-child { font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.px-box strong { font-size: 22px; font-weight: 900; }
.px-box.gain { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.px-box.gain strong, .px-box.gain .px-box-note { color: var(--accent); }
.px-box.loss { background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .35); }
.px-box.loss strong, .px-box.loss .px-box-note { color: #f87171; }
.px-box-note { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.px-mini { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 8px; font-size: 13px; font-weight: 800; color: var(--accent); background: none !important; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 10px; box-shadow: none; }
.px-mini svg { width: 15px; height: 15px; }
.px-mini.on { color: #1a0f00; background: var(--accent) !important; border-color: transparent; }
.px-line > b { margin-left: auto; }
.px-visits { gap: 0; }
.px-visit { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 0; padding: 12px 16px; color: var(--ink); text-align: left; background: none !important; border: 0; border-radius: 0; box-shadow: none; }
.px-visit + .px-visit { border-top: 1px solid var(--line); }
.px-visit > svg { flex: none; width: 18px; height: 18px; color: var(--ink-soft); }
.px-date.ok { background: var(--accent); color: #1a0f00; }
.px-date.ok span { color: #1a0f00; }
.px-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.px-row-text strong { font-size: 15px; }
.px-row-text > span { font-size: 12px; color: var(--ink-soft); }
.px-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 0; padding: 13px 16px; color: var(--ink); text-align: left; text-decoration: none; background: none !important; border: 0; border-radius: 0; box-shadow: none; }
.px-row + .px-row { border-top: 1px solid var(--line); }
.px-row > svg:first-child { flex: none; width: 20px; height: 20px; color: var(--accent); }
.px-row > svg:last-child { flex: none; width: 18px; height: 18px; color: var(--ink-soft); }
.px-profit { gap: 10px; padding: 14px 16px; }
.px-profit-bar { display: flex; height: 12px; overflow: hidden; border-radius: 6px; background: var(--accent); }
.px-profit-bar i { display: block; height: 100%; }
.px-profit-bar i.cost, .px-profit-keys i.cost { background: #ef4444; }
.px-profit-bar i.labor, .px-profit-keys i.labor { background: #60a5fa; }
.px-profit-keys { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-soft); }
.px-profit-keys i { display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 50%; }
.px-profit-keys b { color: var(--ink); }

/* Menus of actions on a phone as round buttons over the dimmed page, like the + menu (bubbleMenu in app.js).
   Every menu starts at the same height so the buttons line up from one menu to the next. */
dialog.bub-dialog::backdrop { background: rgba(5, 6, 9, .72); }
dialog.bub-dialog:focus { outline: none; }
.bub-menu { position: absolute; inset: 0; background: rgba(5, 6, 9, .8); display: flex; flex-direction: column; align-items: center; gap: 26px; padding: max(120px, calc(env(safe-area-inset-top) + 96px)) 12px calc(130px + env(safe-area-inset-bottom)); overflow-y: auto; }
.bub-head { display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 100%; text-align: center; }
.bub-label { font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.bub-label b { font-weight: 800; }
.bub-status.ok { color: #4ade80; } .bub-status.bad { color: #f87171; } .bub-status.info { color: #60a5fa; }
.bub-head strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.25rem; font-weight: 800; color: var(--ink); }
.bub-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; width: calc(3 * min(106px, 27vw) + 36px); max-width: 100%; }
.bub-grid.bub-danger { width: 100%; }
.bub { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: min(106px, 27vw); height: min(106px, 27vw); min-height: 0; padding: 0; font-size: .92rem; font-weight: 800; line-height: 1.1; color: var(--ink); background: var(--surface) !important; border: 2px solid var(--accent); border-radius: 50%; box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 40%, transparent); animation: fan-pop .22s cubic-bezier(.2, 1.3, .5, 1) backwards; -webkit-tap-highlight-color: transparent; }
.bub svg { width: 28px; height: 28px; color: var(--accent); }
.bub.lit { color: var(--primary-ink, #1a0f00); background: var(--accent) !important; border-color: color-mix(in srgb, var(--accent) 60%, #fff); box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 55%, transparent); }
.bub.lit svg { color: var(--primary-ink, #1a0f00); }
.bub.danger { color: #ff6b5e; background: #1e1012 !important; border-color: #e0574c; box-shadow: 0 0 14px rgba(255, 90, 79, .4); }
.bub.danger svg { color: #ff6b5e; }
.bub:active { transform: scale(.94); }
.bub-close { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); display: grid; place-items: center; width: 64px; height: 64px; min-height: 0; margin-left: -32px; padding: 0; color: var(--primary-ink, #1a0f00); background: var(--accent) !important; border: 0; border-radius: 50%; box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 50%, transparent); }
.bub-close svg { width: 26px; height: 26px; }
@media (prefers-reduced-motion: reduce) { .bub { animation: none; } }

/* A client's Notes tab on a phone (notesPhone in app.js): write a note right away at the top, then every note in
   full (who, when, what it is about, the text and its photos). Nothing opens another page. */
.nh { display: flex; flex-direction: column; gap: 14px; }
.nh-new { display: flex; flex-direction: column; gap: 10px; }
.nh-bar { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; }
.nh-bar:focus-within { border-color: var(--accent); }
.nh-bar textarea { flex: 1; min-height: 36px; max-height: 160px; padding: 8px 0; font: inherit; font-size: 16px; line-height: 1.35; color: var(--ink); background: none; border: 0; outline: none; resize: none; field-sizing: content; box-shadow: none; }
.nh-cam { display: grid; place-items: center; flex: none; width: 38px; height: 38px; min-height: 0; padding: 0; color: var(--primary-ink, #1a0f00); background: var(--accent) !important; border: 0; border-radius: 50%; box-shadow: none; }
.nh-cam svg { width: 19px; height: 19px; }
.nh-more { display: none; align-items: center; justify-content: space-between; gap: 10px; }
.nh-more select { flex: 1; min-width: 0; }
.nh-more .primary { min-width: 96px; }
.nh-new:focus-within .nh-more, .nh-new:has(textarea:not(:placeholder-shown)) .nh-more, .nh-new:has(#note-files:not(:empty)) .nh-more { display: flex; }
.nh-note { display: flex; flex-direction: column; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.nh-note:last-child { border-bottom: 0; }
.nh-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-size: .78rem; color: var(--ink-soft); }
.nh-head strong { font-size: .95rem; font-weight: 800; color: var(--ink); }
.nh-about { font-weight: 700; color: var(--accent); text-decoration: none; }
.nh-edit { margin-left: auto; min-height: 0; padding: 2px 4px; font-size: .84rem; color: var(--ink-soft); background: none !important; border: 0; box-shadow: none; }
.nh-body { font-size: .95rem; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.nh-photos { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.nh-photos::-webkit-scrollbar { display: none; }
.nh-photo { position: relative; flex: none; width: 116px; height: 116px; min-height: 0; padding: 0; overflow: hidden; background: var(--surface-2) !important; border: 0; border-radius: 12px; box-shadow: none; }
.nh-photo img { width: 100%; height: 100%; object-fit: cover; }
.nh-photo b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.2rem; color: #fff; background: rgba(0, 0, 0, .55); }
.nh-empty { margin: 0; color: var(--ink-soft); }

/* Top of an invoice, quote or job on a phone (pxTop in app.js): the same head as a client's (px-head), with an
   icon in place of the initials, a line with who it is for, and three figures under it (px-stats). */
.pk-icon svg { width: 24px; height: 24px; }
.pk-for { margin: 6px 0 0; font-size: .92rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-for a { font-weight: 800; color: var(--accent); text-decoration: none; }
.pk-late { font-weight: 700; color: #f87171; }
.pk-head .px-sub { padding-bottom: 14px; }
a.px-create { text-decoration: none; }
/* Phone pages use Proliox orange instead of green for "done" states (Invoiced, Completed, Paid, Active). */
.px-page .badge.ok { color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
