/* Casa Orders: one class system for every screen. The markup never changes between looks;
   each look (looks/modern.css, looks/classic.css) sets the tokens below and re-arranges the
   same classes. No inline styles anywhere in the app (owner, 2026-11-14). */

:root {
  --brand: #DD4032;
  --brand-press: #C2362A;
  --error-bg: #FDECEC;
  --error-ink: #A3261B;
  --ink: #000000;
  --ink-2: #666666;
  --muted: #999999;
  --faint: #B5B5B0;
  --line: #DDDDDD;
  --line-soft: #EEEEEE;
  --page: #FFFFFF;
  --surface: #FFFFFF;
  --field: #F4F4F4;
  --field-line: transparent;
  --inverse: #000000;
  --on-inverse: #FFFFFF;
  --warning: #FAAD14;
  --check: #CCCCCC;

  --font: "Source Sans 3", "Source Sans Pro", system-ui, sans-serif;
  --font-head: var(--font);
  --mono: ui-monospace, "SF Mono", Menlo, monospace;

  --r-sm: 6px;
  --r-md: 10px;
  --r-card: 10px;
  --r-field: 6px;
  --r-full: 999px;
  --card-shadow: 0 0 20px rgba(0, 0, 0, .08);
  --card-line: transparent;

  --rail-w: 188px;
  --side-w: 240px;
  --gutter: 48px;
  --pad: 48px;

  --t-body: 18px;
  --t-small: 16px;
  --t-cap: 14px;
  --t-title: 36px;
  --t-row: 24px;
  --t-card: 24px;
  --tap: 44px;

  /* the App Kit's account, team and billing pages read these */
  --appkit-ink: var(--ink);
  --appkit-accent: var(--brand);
  --appkit-surface: var(--surface);
  --appkit-radius: var(--r-field);
  --appkit-font: var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 var(--t-body)/1.5 var(--font); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-family: var(--font-head); }
p { margin: 0 0 1em; }
:focus, :focus-visible { outline: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -10000px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 24px; height: 24px; }

/* Content that only one look shows (a word or a block that differs) */
[data-look="modern"] .only-classic, [data-look="classic"] .only-modern { display: none !important; }

/* ---------- Shell ---------- */
.shell { min-height: 100dvh; display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--side-w); grid-template-rows: auto 1fr; column-gap: var(--gutter); padding: 0 var(--pad) 80px; max-width: none; }
.rail { grid-column: 1; grid-row: 1 / span 2; display: flex; flex-direction: column; }
.top { grid-column: 2 / span 2; grid-row: 1; display: grid; grid-template-columns: minmax(0, 1fr) var(--side-w); column-gap: var(--gutter); }
.main { grid-column: 2; grid-row: 2; min-width: 0; }
.side { grid-column: 3; grid-row: 2; min-width: 0; }

.brand { display: flex; align-items: flex-start; gap: 12px; padding-top: 43px; height: 120px; }
.brand-icon { width: 40px; height: 40px; }
.brand-full { height: 34px; width: auto; display: none; }
.rail-toggle { display: none; }

.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 100px; }
.nav-group { display: contents; }
.nav-label { display: none; }
/* A line between the app's pages and the Learn links (Help center, Porch videos). */
.nav-group:last-child::before { content: ""; display: block; height: 1px; background: var(--line); margin: 12px 0; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 32px; font-size: 17px; line-height: 1.1; color: var(--ink); }
.nav a[aria-current="page"] { color: var(--brand); }
.nav .count { display: none; margin-left: auto; font: 500 11.5px/1 var(--mono); color: inherit; opacity: .55; }
.rail-user { display: none; }

.greet { padding-top: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.greet-hello { font-size: 24px; line-height: 1.1; color: var(--muted); margin-bottom: 14px; }
.greet-line { font: 700 36px/1.1 var(--font-head); margin: 0; }
.me { padding-top: 41px; display: flex; flex-direction: column; align-items: flex-end; gap: 22px; }
.me-row { display: flex; align-items: center; justify-content: flex-end; gap: 10px; width: 100%; }
.me-who { display: inline-flex; align-items: center; flex: none; margin-left: 6px; }
.me-name { font-size: 18px; line-height: 1.1; }
.me-role { font-size: 14px; line-height: 1.1; color: var(--muted); }
.me-tools { display: flex; align-items: center; gap: 22px; padding-right: 22px; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); border: 0; background: none; padding: 0; cursor: pointer; color: var(--ink); border-radius: var(--r-md); }
.badge { position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--r-full); background: var(--brand); color: #fff; font: 600 12px/20px var(--font); text-align: center; }

.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--inverse); color: var(--on-inverse); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }

/* page head */
.head-search { display: none; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-top: 60px; margin-bottom: 40px; }
.page-head h1 { font: 700 var(--t-title)/1 var(--font-head); }
.page-head h1 .crumb { color: var(--brand); }
.page-sub { display: none; }
.page-actions { display: flex; gap: 12px; align-items: center; flex: none; }
.page-head.has-tabs h1 { display: none; }

.tabs { display: flex; flex-direction: column; }
.tab { font: 400 var(--t-title)/1 var(--font-head); color: var(--muted); }
.tab[aria-current="page"] { font-weight: 700; color: var(--ink); }
.tab-count { display: none; }

/* side column */
.date-card { background: var(--inverse); color: var(--on-inverse); border-radius: var(--r-card); text-align: center; padding: 36px 20px 30px; margin-top: 0; }
.date-day, .date-month { font-size: 18px; line-height: 1; }
.date-num { font-size: 144px; line-height: .9; margin: 18px 0 14px; letter-spacing: -2px; }
.side-title { font: 600 30px/1.1 var(--font-head); margin: 60px 0 30px; display: flex; justify-content: space-between; align-items: center; }
.side-title a { font: 400 16px var(--font); color: var(--muted); }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { font-size: 16px; line-height: 1.4; color: var(--ink-2); padding: 20px 0; border-bottom: 1px solid var(--line); }
.side-list li:first-child { padding-top: 0; }

/* ---------- Buttons and fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 24px; border-radius: var(--r-sm); border: 1px solid transparent; font-size: var(--t-body); line-height: 1.2; cursor: pointer; white-space: nowrap; background: var(--surface); color: var(--ink); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-press); }
.btn-dark { background: var(--inverse); color: var(--on-inverse); }
.btn-line { border-color: var(--line); }
.btn-link { background: none; border: 0; padding: 0 8px; color: var(--muted); font-size: var(--t-cap); min-height: 44px; }
.btn-danger { background: none; border: 0; color: var(--brand); padding: 0; min-height: 44px; }
.btn .icon { width: 18px; height: 18px; }
.btn-plus { display: none; }

.form { display: grid; gap: 30px; }
.form-card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--card-shadow); border: 1px solid var(--card-line); padding: 30px; }
.form-card h2 { font: 700 var(--t-card)/1.2 var(--font-head); margin-bottom: 24px; }
.form-card .lead { color: var(--ink-2); font-size: var(--t-small); margin: -10px 0 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.span-2 { grid-column: span 2; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label, .field .label { font-size: var(--t-cap); font-weight: 600; }
.req { color: var(--brand); margin-left: 4px; }
.input, .select, .textarea { width: 100%; min-height: 50px; padding: 12px 16px; border-radius: var(--r-field); border: 1px solid var(--field-line); background: var(--field); font-size: 16px; }
.textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; }
.hint { font-size: var(--t-cap); color: var(--muted); }
.error { font-size: var(--t-cap); color: var(--brand); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.form-actions .spacer { flex: 1; }
/* "Nevermind" links sit level with the button and match its text size. */
html[data-look] .form-actions > .btn-link { display: inline-flex; align-items: center; font-size: 14px; }

/* ---------- Search and filters ---------- */
.toolbar { margin-bottom: 20px; }
.search { display: flex; align-items: center; gap: 14px; background: var(--field); border-radius: var(--r-md); padding: 0 12px 0 24px; min-height: 52px; }
.search .icon { width: 18px; height: 18px; }
.search input { flex: 1; min-width: 0; border: 0; background: none; font-size: 16px; padding: 14px 0; }
.search summary, .filter-toggle { list-style: none; cursor: pointer; border: 0; background: none; padding: 0; color: inherit; display: inline-flex; width: var(--tap); height: var(--tap); align-items: center; justify-content: center; }
.search summary::-webkit-details-marker { display: none; }
.filter-panel { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.filter-panel .select { width: auto; min-height: 40px; padding: 6px 40px 6px 16px; font-size: 15px; border-radius: var(--r-full); background-color: var(--surface); border: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; font-size: 13px; font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 10px; background: var(--inverse); color: var(--on-inverse); border-radius: var(--r-full); padding: 3px 14px; font-weight: 400; font-size: 13px; }
.chip .x { opacity: .9; }
.sort { display: none; }

.notice { background: var(--warning); color: #fff; border-radius: var(--r-md); text-align: center; padding: 14px 20px; font-size: 20px; margin: 30px 0 20px; }

/* ---------- Lists (work orders, tasks, properties, people) ---------- */
.list-card { display: block; }
.list-head { display: none; }
.list { display: grid; gap: 14px; }
.row { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; column-gap: 12px; align-items: center; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--card-shadow); padding: 22px 30px; min-height: 0; }
.row-check { position: relative; z-index: 2; padding: 0; border: 0; background: none; cursor: pointer; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--check); display: inline-flex; align-items: center; justify-content: center; margin-top: 2px; }
.row-check .icon { width: 14px; height: 14px; stroke-width: 3; color: #fff; opacity: 0; }
/* The circle sits level with the title line, not the middle of the card. */
.row > .row-check-form { align-self: start; height: calc(var(--t-row) * 1.2); display: flex; align-items: center; }
.row > .row-check-form .row-check { margin-top: 0; }
.row.is-done .row-check { background: var(--brand); box-shadow: none; }
.row.is-done .row-check .icon { opacity: 1; }
.row-check-static { cursor: default; }
.row-main { min-width: 0; }
.row-title { font: 700 var(--t-row)/1.2 var(--font-head); display: block; }
.row.is-done .row-title { text-decoration: line-through; }
.row-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.row-meta { display: flex; flex-wrap: wrap; gap: 0; margin-top: 6px; color: var(--muted); font-size: var(--t-body); line-height: 1.2; }
/* Each item carries its "|" in front; the one that starts a line is clipped off, so a wrapped line never begins with "|". */
.row-meta { --sep: 49px; margin-left: calc(-1 * var(--sep)); clip-path: inset(0 0 0 var(--sep)); }
.row-meta > span::before { content: "|"; display: inline-block; width: var(--sep); text-align: center; }
.row-cols { display: none; }
.row-action { display: flex; flex-direction: row-reverse; align-items: center; gap: 16px; }
.row-action .btn { min-width: 117px; }
.comment-ico { position: relative; color: var(--faint); }
.comment-ico.has-new { color: var(--ink); }
.comment-ico.has-new::after { content: ""; position: absolute; top: -3px; right: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.row-more { display: none; }
.status { display: inline-flex; align-items: center; gap: 8px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.status-urgent { color: var(--brand); }
.status-urgent::before { background: var(--brand); }
.status-in_progress::before, .status-scheduled::before { background: var(--ink); }
.status-scheduled::before { background: var(--faint); }
.status-waiting::before { background: none; box-shadow: inset 0 0 0 1.5px var(--ink); }
.status-done::before { background: var(--ink); }
.is-late { color: var(--brand); }

.empty { text-align: center; padding: 60px 30px; color: var(--ink-2); }
.empty h2 { font: 700 var(--t-card)/1.2 var(--font-head); color: var(--ink); margin-bottom: 8px; }
.empty .btn { margin-top: 20px; }

.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 30px; color: var(--ink-2); font-size: var(--t-small); }
.pager-links { display: flex; gap: 10px; }

/* ---------- Detail card ---------- */
.card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--card-shadow); border: 1px solid var(--card-line); padding: 30px; }
.card + .card { margin-top: 30px; }
.card-head { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; column-gap: 12px; align-items: center; padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.card-head h2 { font: 700 var(--t-card)/1.2 var(--font-head); }
.card-title { font: 700 var(--t-card)/1.2 var(--font-head); margin-bottom: 24px; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; padding-left: 52px; }
.prose { color: var(--ink-2); font-size: 16px; line-height: 1.5; white-space: pre-line; }
.section-title { font: 700 22px/1.2 var(--font-head); margin: 40px 0 20px; }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 10px; margin: 0 0 30px; font-size: 16px; align-content: start; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 4px; }
.photos img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; border-radius: 2px; }
.upload { margin-top: 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: var(--t-cap); }

.notes-form { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px 10px; }
.notes-form .textarea { min-height: 58px; }
.notes-tip { grid-column: 2; font-size: 13px; color: var(--ink-2); }
.notes-tip b { font-weight: 600; }
.notes-tip { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.notes-share { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.notes-share input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }
.note-shared { margin-left: 8px; font-size: 13px; font-weight: 400; color: var(--muted); }
.note { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.note-who { font-size: 14px; font-weight: 600; display: flex; gap: 18px; align-items: baseline; }
.note-when { font-weight: 400; }
.note-body { font-size: 14px; color: var(--ink-2); margin-top: 6px; white-space: pre-line; }
/* Notes thread (every record): composer, notes, replies, attachments. No focus rings or tints. */
.section-count { margin-left: 10px; font: 400 16px var(--font); color: var(--muted); }
.comments { margin-top: 10px; }
.c-compose { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
.c-compose.is-reply { grid-template-columns: 32px minmax(0, 1fr); margin-top: 16px; }
.c-compose .notes-tip { grid-column: 2; }
.c-box { background: var(--field); border-radius: var(--r-field); min-width: 0; }
.c-input { display: block; width: 100%; min-height: 58px; padding: 14px 16px 6px; border: 0; background: none; resize: none; field-sizing: content; max-height: 320px; font-size: 16px; line-height: 1.5; outline: none; }
.c-input::placeholder { color: var(--muted); }
.c-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 8px 8px 10px; }
.c-bar-end { display: inline-flex; align-items: center; gap: 6px; }
.c-attach { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 8px; border-radius: var(--r-sm); color: var(--ink-2); font-size: 14px; cursor: pointer; }
.c-attach:hover { color: var(--ink); }
.c-attach .icon { width: 18px; height: 18px; }
.c-post { min-height: 36px; padding: 6px 18px; font-size: 15px; }
.btn-text { background: none; border: 0; padding: 6px 10px; min-height: 36px; color: var(--ink-2); font-size: 15px; cursor: pointer; }
.btn-text:hover { color: var(--ink); }
.c-files, .c-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 12px 6px; margin: 0; list-style: none; }
.c-files[hidden] { display: none; }
.c-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 34px; padding: 4px 4px 4px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 13px; color: var(--ink-2); }
.c-chip img { width: 26px; height: 26px; object-fit: cover; border-radius: 3px; margin-left: -4px; }
.c-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.c-chip-x { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; border-radius: 3px; }
.c-chip-x:hover { color: var(--ink); }
.c-chip-x .icon { width: 14px; height: 14px; }
.c-list { margin-top: 6px; }
.c-empty { padding: 18px 0 0 50px; }
.c-item { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.c-item.is-reply { grid-template-columns: 32px minmax(0, 1fr); padding: 14px 0 0; border-bottom: 0; }
.c-main { min-width: 0; }
.c-item .note-who { flex-wrap: wrap; row-gap: 2px; }
.c-tag { font-size: 13px; font-weight: 400; color: var(--muted); }
.c-item .note-body { overflow-wrap: anywhere; }
.c-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 4px; margin-top: 10px; max-width: 360px; }
.c-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; background: var(--field); }
.c-docs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.c-doc { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 14px; max-width: 360px; }
.c-doc:hover { border-color: var(--ink-2); }
.c-doc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.c-doc-size { color: var(--muted); font-size: 12px; }
.c-actions { display: flex; flex-wrap: wrap; gap: 2px; margin: 8px 0 0 -8px; }
.c-actions form { display: contents; }
.c-act { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 8px; border: 0; background: none; color: var(--muted); font-size: 13px; cursor: pointer; border-radius: var(--r-sm); }
.c-act:hover { color: var(--ink); }
.c-act .icon { width: 15px; height: 15px; }
.c-edit { margin-top: 8px; }
.c-replies { margin-top: 4px; padding-left: 0; border-left: 0; }
.c-view[hidden], .c-edit[hidden], .c-compose[hidden] { display: none; }

.inline-select { display: grid; gap: 8px; margin-bottom: 20px; font-size: 16px; }
.inline-select > span { font-weight: 600; font-size: 14px; }

.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 30px; font-size: 16px; }
.kv div span { display: block; color: var(--muted); font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); background: var(--inverse); color: var(--on-inverse); padding: 12px 22px; border-radius: var(--r-md); font-size: 16px; z-index: 60; animation: toast 4s forwards; }
@keyframes toast { 0%, 85% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* Look picker (Account): selection shows with the radio only, never a colored border */
.looks { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.look { display: grid; gap: 16px; border: 1px solid var(--line); border-radius: var(--r-card); padding: 10px 10px 20px; cursor: pointer; }
.look img { border-radius: calc(var(--r-card) - 4px); width: 100%; aspect-ratio: 236 / 170; object-fit: cover; object-position: top left; border: 1px solid var(--line-soft); }
.look-text { display: grid; grid-template-columns: 24px 1fr; gap: 2px 12px; align-items: center; padding: 0 12px; }
.look input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); }
.look b { font: 700 20px/1.2 var(--font-head); }
.look small { grid-column: 2; color: var(--muted); font-size: 15px; }

/* ---------- Mobile top bar and menu sheet ---------- */
.mbar { display: none; }
.menu-sheet { display: none; }

/* ---------- Sign-in and public pages (no sidebar) ---------- */
.solo { min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; background: #FFFFFF; }
.solo-photo { background: #1A1A1A url(../images/sign-in.jpg) center / cover no-repeat; }
.solo-side { display: grid; place-items: center; padding: 48px 24px; }
.solo-inner { width: min(100%, 420px); }
.solo .brand { padding: 0; height: auto; margin-bottom: 24px; }
.solo .brand img { display: block; width: 182px; height: auto; }
/* The kit's sign-in, invite and email pages, in the Casa sign-in design: no card, no kit header. */
.solo .ak, .solo .ak.ak-auth { padding: 0; background: none; min-height: 0; font-size: 17px; }
.solo .ak-brand { display: none; }
.solo .ak .ak-card { background: none; border: 0; box-shadow: none; padding: 0; margin: 0; max-width: none; }
.solo .ak h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; padding: 0; }
.solo .ak .ak-card > p { margin: 0 0 24px; color: var(--muted); font-size: 17px; line-height: 1.4; }
.solo .ak label { margin: 16px 0 6px; font-size: 15px; font-weight: 600; }
.solo .ak .ak-actions { display: block; margin-top: 16px; }
.solo .ak .ak-actions > button, .solo .ak .ak-actions > .button { width: 100%; height: 49px; margin: 0; padding: 0 28px; font-size: 17px; }
.solo .ak .ak-card > a, .solo .ak .ak-auth-links a, .solo .ak .ak-auth-links .ak-link { min-height: 44px; margin-top: 8px; color: var(--muted); font-size: 15px; background: none; padding: 0; }
/* Sign-in form (kit 2): full-width button, tighter spacing. */
.solo .ak .ak-card > p { margin-bottom: 20px; }
.solo .ak .ak-auth-row { margin-top: 8px; }
.solo .ak .ak-auth-remember { min-height: 40px; margin: 0; font-size: 15px; }
.solo .ak .ak-auth-remember input { width: 20px; height: 20px; accent-color: var(--brand); }
.solo .ak .ak-auth-row > a { min-height: 0; margin: 0; font-size: 15px; }
.solo .ak .ak-auth-or { margin-top: 20px; }
.solo .ak .ak-auth-card .ak-auth-alt { justify-content: center; align-items: center; height: 49px; min-height: 0; margin-top: 20px; padding: 0 16px; font-size: 17px; }
.solo .ak .ak-auth-hint { margin-top: 12px; }
.solo .ak .ak-error { background: var(--error-bg); color: var(--error-ink); border: 0; border-radius: var(--r-sm); padding: 10px 16px; margin: 0 0 8px; text-align: center; }
.solo .ak .ak-error p { margin: 0; color: var(--error-ink); }
.kit-frame .ak div.ak-error, .kit-frame .ak p.ak-error[role=alert] { background: var(--error-bg); color: var(--error-ink); border-radius: var(--r-sm); padding: 10px 16px; }
.kit-frame .ak div.ak-error p { margin: 0; color: var(--error-ink); }
.solo .ak small.ak-error { display: block; background: none; color: var(--brand); border-radius: 0; padding: 0; margin: 6px 0 0; text-align: left; font-size: 13px; }
.solo .ak small.ak-error:empty { display: none; }
.solo .ak .notice { margin: 0 0 16px; }
.solo .ak .resend-note { margin: 0 0 16px; padding: 10px 16px; border-radius: var(--r-sm); border: 0; font-size: 15px; }
.solo .ak .ak-card > p.ak-error.resend-note { background: var(--error-bg); color: var(--error-ink); text-align: center; }
.solo .ak .notice.resend-note { background: #F3F3F3; color: var(--ink); }
.solo .ak .ak-auth-links button.ak-link:disabled { opacity: 1; cursor: default; text-decoration: none; }
.code-cells { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; max-width: 420px; }
.code-cell { position: relative; display: grid; place-items: center; height: 63px; border-radius: var(--r-sm); background: #F3F3F3; font-size: 22px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.code-cell.is-current::after { content: ""; position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 2px; height: 22px; background: var(--ink); animation: code-caret 1s steps(1) infinite; }
@keyframes code-caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .code-cell.is-current::after { animation: none; } }
/* The code field before the boxes are drawn: same 63px as the boxes, so nothing jumps on load. */
.solo .kit-frame .ak input.ak-code:not([type=hidden]) { height: 63px; min-height: 0; padding: 0 12px; font-size: 22px; letter-spacing: .3em; }
.solo .ak .code-cells input.ak-code:not([type=hidden]) { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; background: transparent; color: transparent; caret-color: transparent; font-size: 16px; letter-spacing: 0; opacity: 0.01; }
@media (max-width: 400px) { .code-cells { gap: 8px; } .code-cell { font-size: 20px; } }
@media (max-width: 900px) {
  .solo { grid-template-columns: 1fr; }
  .solo-photo { display: none; }
  .solo-side { place-items: start center; padding-top: 72px; }
}

/* ---------- Kit pages (account, team, billing) inside the shell ---------- */
.kit-frame .ak { padding: 0; background: none; font-size: var(--t-small); }
.kit-frame .ak h1 { font: 700 var(--t-title)/1 var(--font-head); letter-spacing: 0; margin-bottom: 40px; padding-top: 60px; }
.kit-frame .ak button:not(.ak-link):not(.ak-secondary):not(.ml-sort):not(.ml-icon):not(.ml-tile__del):not(.ml-views button):not(.ml-pager button), .kit-frame .ak .button:not(.ak-link):not(.ak-secondary) { background: var(--brand); color: #fff; border-radius: var(--r-sm); }
.kit-frame .ak input:not([type=checkbox]):not([type=radio]), .kit-frame .ak select, .kit-frame .ak textarea { background: var(--field); border-color: var(--field-line); border-radius: var(--r-field); }
.kit-frame .ak :focus-visible { outline: none; box-shadow: none; }
.kit-frame .ak-skip { display: none; }

/* ---------- Tablet and phone ---------- */
@media (max-width: 1199px) {
  :root { --t-title: 30px; --t-row: 20px; --t-card: 22px; }
  .shell { display: block; padding: 0 32px 60px; }
  .rail, .top, .side { display: none; }
  .mbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 72px; position: sticky; top: 0; z-index: 30; background: var(--page); border-bottom: 1px solid var(--line); margin: 0 -32px; padding: 0 32px; }
  .mbar .brand { padding: 0; height: auto; }
  .mbar-tools { display: flex; gap: 6px; align-items: center; }
  .menu-sheet.is-open { display: block; position: fixed; inset: 72px 0 0; z-index: 40; background: var(--page); overflow-y: auto; padding: 24px 32px 40px; }
  .menu-sheet .nav { margin-top: 0; }
  .menu-sheet .nav-label { display: block; font: 500 11px/14px var(--mono); letter-spacing: .5em; color: var(--muted); text-transform: uppercase; margin: 20px 0 6px; }
  .menu-sheet .nav-group:first-child .nav-label { margin-top: 0; }
  .menu-sheet .menu-foot { display: flex; gap: 12px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
  .page-head { padding-top: 32px; margin-bottom: 24px; }
  .detail { grid-template-columns: 1fr; padding-left: 0; }
}
@media (max-width: 767px) {
  :root { --t-title: 28px; --t-row: 18px; --t-card: 20px; --t-body: 17px; }
  .shell { padding: 0 16px 48px; }
  .mbar { margin: 0 -16px; padding: 0 16px; height: 64px; }
  .menu-sheet.is-open { inset: 64px 0 0; padding: 20px 16px 40px; }
  .page-head { flex-wrap: wrap; }
  .page-actions .btn-label { display: none; }
  .page-actions .btn-plus { display: block; }
  .page-actions .btn { padding: 10px 14px; }
  .row { grid-template-columns: 32px minmax(0, 1fr); padding: 20px; min-height: 0; row-gap: 14px; }
  .row-action { grid-column: 2; flex-direction: row; justify-content: space-between; }
  .row-meta { --sep: 21px; }
  .grid-2, .grid-3, .kv, .looks { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .form-card, .card { padding: 20px; }
  .card-head { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .notice { font-size: 17px; }
}
body.menu-open { overflow: hidden; }
[data-look="modern"] .filter-panel[data-filters-closed] { display: none; }
.btn[aria-disabled="true"] { opacity: .45; cursor: default; }
.row-check.is-on { background: var(--brand); box-shadow: none; }
.row-check.is-on .icon { opacity: 1; }
.danger-zone { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.card .row-check { margin-top: 0; }

/* Calendar week */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.week-day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px; min-height: 180px; display: grid; align-content: start; gap: 8px; }
.week-day.is-today { border-color: var(--ink); }
.week-head { display: flex; align-items: baseline; gap: 6px; font: 600 var(--t-cap)/1.2 var(--font); color: var(--muted); margin-bottom: 4px; }
.week-head b { font: 700 24px/1 var(--font-head); color: var(--ink); }
.week-item { display: grid; gap: 2px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--field); color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.3; }
.week-item small { color: var(--muted); font-size: 13px; }
.week-item.is-urgent { box-shadow: inset 3px 0 0 var(--brand); }
.week-item.is-done { color: var(--muted); text-decoration: line-through; }
.week-kind { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.week-empty { color: var(--muted); font-size: 14px; margin: 0; }
@media (max-width: 1199px) { .week { grid-template-columns: 1fr; } .week-day { min-height: 0; } }

/* Plain rows (reports): no check circle, no action */
.row-plain .row-check-form, .row-plain .row-action { display: none; }
.facts dd.is-late { color: var(--brand); font-weight: 700; }

/* ---------- Checklists ---------- */
:root { --ok: #2EB85C; --link: #1F6FEB; --pill-off: #E4E4E4; }
.cl-proof { margin-top: 10px; color: var(--muted); font-size: var(--t-body); }
.cl-row { min-height: 0; }

/* Checklist editor (owner 2026-11-15: everything inside cards, more premium): a details card, then one Steps card
   with each group as a section, numbered steps split by hairlines, and Save inside the card footer. */
.cl-form { gap: 24px; }
.cl-card-head { padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.cl-h2 { font: 700 20px/1.2 var(--font-head); letter-spacing: -.01em; margin: 0; }
.cl-items-hint { margin: 6px 0 0; }
.cl-error { margin: 0 0 16px; }
.cl-name-field { margin-bottom: 18px; }
.cl-settings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cl-groups { display: grid; }
.cl-group { counter-reset: cl-step; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cl-group + .cl-group { padding-top: 22px; }
.cl-group-head { display: flex; align-items: center; gap: 12px; padding-bottom: 8px; }
.cl-group-name { flex: 0 1 auto; min-width: 0; }
.cl-group-name input { border: 0; background: none; padding: 4px 0; font: 700 18px/1.2 var(--font-head); color: var(--ink); field-sizing: content; min-width: 6ch; max-width: 100%; }
.cl-count { padding: 3px 10px; border-radius: var(--r-full); background: var(--line-soft); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.cl-rename { margin-left: auto; }
.cl-items { display: grid; }
.cl-item { counter-increment: cl-step; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 56px; border-top: 1px solid var(--line-soft); }
.cl-group-title { margin: 0; font: 700 18px/1.2 var(--font-head); color: var(--ink); overflow-wrap: anywhere; }
.cl-items { margin: 0; padding: 0; list-style: none; }
.cl-step { padding: 16px 0; font-size: 16px; color: var(--ink); overflow-wrap: anywhere; }
.cl-proof-tag { padding: 4px 10px; border-radius: var(--r-full); background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); font-size: 12px; font-weight: 600; white-space: nowrap; }
.cl-edit-item { grid-template-columns: 30px minmax(0, 1fr) auto 36px; }
.cl-gm-steps { display: grid; gap: 4px; }
.cl-gm-steps [data-gm-items] { counter-reset: cl-step; }
.cl-gm-label { margin: 0; font-weight: 600; font-size: 15px; }
.cl-gm-steps .hint { margin: 0 0 8px; }
.cl-gm-steps .cl-add { justify-self: start; margin-top: 6px; }
.cl-num::before { content: counter(cl-step, decimal-leading-zero); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.cl-label input { width: 100%; border: 0; background: none; padding: 14px 0; font-size: 16px; color: var(--ink); }
.cl-photo { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; user-select: none; }
.cl-switch { position: relative; flex: none; width: 34px; height: 20px; margin-left: 2px; border-radius: 99px; background: var(--pill-off); transition: background .15s; }
.cl-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .2); transition: transform .15s; }
.cl-photo:has(input:checked) { color: var(--ink); }
.cl-photo:has(input:checked) .cl-switch { background: var(--brand); }
.cl-photo:has(input:checked) .cl-switch::after { transform: translateX(14px); }
@media (prefers-reduced-motion: reduce) { .cl-switch, .cl-switch::after { transition: none; } }
.cl-remove { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 44px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }
.cl-remove:hover { color: var(--brand); }
.cl-remove .icon { width: 18px; height: 18px; }
.cl-add { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--brand); font-size: 15px; font-weight: 600; cursor: pointer; }
.cl-add .icon { width: 16px; height: 16px; }
.cl-add-group { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; margin-top: 22px; border: 1.5px dashed var(--line); border-radius: var(--r-field); background: none; color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer; }
.cl-add-group:hover { border-color: var(--brand); color: var(--brand); }
.cl-add-group .icon { width: 16px; height: 16px; }
.cl-card-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.cl-card-foot .cl-delete { margin-left: auto; color: var(--brand); cursor: pointer; }

/* A job's checklist */
.cl-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px; padding-bottom: 28px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.cl-tally { color: var(--muted); font-size: 15px; }
.cl-tally b { color: var(--ink); font: 700 28px/1 var(--font-head); margin-right: 6px; }
.cl-bar { display: block; width: 100%; height: 8px; margin: 12px 0 16px; border: 0; border-radius: var(--r-full); background: var(--pill-off); overflow: hidden; appearance: none; }
.cl-bar::-webkit-progress-bar { background: var(--pill-off); border-radius: var(--r-full); }
.cl-bar::-webkit-progress-value { background: var(--ok); border-radius: var(--r-full); }
.cl-bar::-moz-progress-bar { background: var(--ok); border-radius: var(--r-full); }
.cl-why { max-width: 42ch; line-height: 1.5; }
.cl-facts { margin: 0; font-size: 15px; gap: 14px 18px; }
.cl-run-group { padding-top: 26px; }
.cl-run-title { font: 700 20px/1.2 var(--font-head); margin-bottom: 10px; }
.cl-run-item { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: start; gap: 8px; padding: 8px 0; }
.cl-run-item.has-need .cl-run-main { padding-right: 130px; }
.cl-run-item form { margin: 0; }
.cl-check { width: 24px; height: 24px; margin-top: 1px; }
.cl-check.is-on { background: var(--ok); }
.cl-run-main { min-width: 0; padding-top: 2px; }
.cl-run-label { font-size: 16px; }
.cl-run-item.is-done .cl-run-label { color: var(--muted); text-decoration: line-through; }
.cl-proof-row { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; }
.cl-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.cl-thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 3px; }
.cl-proof-when { font-size: 12px; color: var(--muted); }
.cl-upload { margin-top: 12px; }
.cl-add-photo { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1.5px dashed var(--link); border-radius: 4px; color: var(--link); font-size: 15px; font-weight: 600; cursor: pointer; background: color-mix(in srgb, var(--link) 4%, transparent); }
.cl-add-photo .icon { width: 18px; height: 18px; }
.cl-add-photo.is-small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.cl-need { position: absolute; top: 6px; right: 0; display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: var(--r-full); background: var(--warning); color: #000; font-size: 12px; font-weight: 600; white-space: nowrap; }
.cl-finish-error { margin-top: 20px; padding: 10px 16px; border-radius: var(--r-sm); background: var(--error-bg); color: var(--error-ink); text-align: center; }
.cl-job-actions { margin-top: 30px; }
.cl-job-actions form { margin: 0; }
.cl-form .btn-link, .cl-job-actions .btn-link { display: inline-flex; align-items: center; }

/* The checklist on a work order */
.cl-mini { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 20px; padding: 18px 20px; border-radius: var(--r-card); background: var(--field); }
.cl-mini-name { font-weight: 700; font-size: 17px; }
.cl-mini-tally { grid-column: 1; color: var(--muted); font-size: 15px; }
.cl-mini .cl-bar { grid-column: 1 / -1; margin: 12px 0 0; background: var(--surface); }
.cl-mini .btn { grid-column: 2; grid-row: 1 / span 2; }
.cl-pick { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cl-pick .select { flex: 1 1 220px; width: auto; }

@media (max-width: 700px) {
  .cl-settings { grid-template-columns: minmax(0, 1fr); }
  .cl-edit-item { grid-template-columns: 28px minmax(0, 1fr) 32px; gap: 0 8px; padding: 2px 0 10px; }
  .cl-item:not(.cl-edit-item) { grid-template-columns: 28px minmax(0, 1fr); gap: 0 8px; }
  .cl-item:not(.cl-edit-item) .cl-proof-tag { grid-column: 2; justify-self: start; margin: -8px 0 12px; }
  .cl-item .cl-photo { grid-column: 2; grid-row: 2; justify-self: start; min-height: 32px; font-size: 13px; }
  .cl-item .cl-remove { grid-column: 3; grid-row: 1; }
  .cl-label input { padding: 12px 0 4px; }
  .cl-summary { grid-template-columns: 1fr; gap: 20px; }
  .cl-run-item.has-need .cl-run-main { padding-right: 0; }
  .cl-need { position: static; display: flex; width: max-content; margin-top: 8px; }
  .cl-mini { grid-template-columns: 1fr; }
  .cl-mini .btn { grid-column: 1; grid-row: auto; margin-top: 12px; justify-self: start; }
}

/* ---------- Calendar day ---------- */
.cal-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }
.cal-bar > .tabs { display: none; }
.cal-arrow { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-full); background: var(--field); color: var(--ink); }
.cal-arrow .icon { width: 20px; height: 20px; }
.cal-title { font: 700 24px/1.2 var(--font-head); margin-left: 4px; }
.cal-today { font-size: 15px; color: var(--link, #1F6FEB); }
.cal-key { display: flex; gap: 16px; margin-left: auto; list-style: none; padding: 0; font-size: 13px; color: var(--muted); }
.cal-key li { display: inline-flex; align-items: center; gap: 6px; }
.cal-key li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.cal-key .is-turnover::before { background: var(--brand); }
.cal-key .is-task::before { background: #C4C4C4; }
.cal-day { padding: 6px 30px; }
.cal-item { display: grid; grid-template-columns: 112px 4px minmax(0, 1fr) auto; column-gap: 22px; align-items: start; padding: 24px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.cal-item:last-child { border-bottom: 0; }
.cal-item::before { content: ""; grid-column: 2; grid-row: 1; align-self: stretch; border-radius: 2px; background: var(--ink); }
.cal-item.is-turnover::before { background: var(--brand); }
.cal-item.is-task::before { background: #C4C4C4; }
.cal-time { grid-column: 1; grid-row: 1; display: grid; gap: 8px; font-size: 15px; color: var(--muted); }
.cal-time b { font-weight: 600; color: var(--ink); }
.cal-main { grid-column: 3; grid-row: 1; display: grid; gap: 6px; min-width: 0; }
.cal-name { font: 700 22px/1.2 var(--font-head); }
.cal-meta { font-size: 16px; line-height: 1.5; color: var(--muted); }
.cal-meta > span + span::before { content: "|"; margin: 0 8px; color: #C4C4C4; }
.cal-pill { grid-column: 4; grid-row: 1; padding: 8px 14px; border-radius: var(--r-full); background: var(--pill-off, #E4E4E4); font-size: 13px; font-weight: 600; white-space: nowrap; }
.cal-item.is-turnover .cal-pill { background: var(--brand); color: #fff; }
.cal-item.is-task .cal-pill { background: var(--field); }
.cal-item.is-done .cal-name { color: var(--muted); text-decoration: line-through; }
.week-head a { display: inline-flex; align-items: baseline; gap: 6px; color: inherit; text-decoration: none; }
.week-item.is-turnover { box-shadow: inset 3px 0 0 var(--brand); }
@media (max-width: 700px) {
  .cal-bar { gap: 10px; margin-bottom: 24px; }
  .cal-title { font-size: 20px; flex: 1 0 100%; order: 5; margin: 4px 0 0; }
  .cal-key { margin-left: 0; order: 6; }
  .cal-day { padding: 0 16px; }
  .cal-item { grid-template-columns: 4px minmax(0, 1fr) auto; column-gap: 14px; row-gap: 6px; padding: 18px 0; }
  .cal-item::before { grid-column: 1; grid-row: 1 / span 2; }
  .cal-time { grid-column: 2; grid-row: 1; display: flex; gap: 6px; font-size: 14px; }
  .cal-time span::before { content: "to "; }
  .cal-main { grid-column: 2 / span 2; grid-row: 2; }
  .cal-pill { grid-column: 3; grid-row: 1; padding: 4px 10px; font-size: 12px; }
  .cal-name { font-size: 19px; }
  .cal-meta { font-size: 15px; }
}

/* ---------- Property page tabs ---------- */
.prop-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.prop-head h2 { font: 700 var(--t-card)/1.2 var(--font-head); }
.prop-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 26px 0; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.prop-tabs a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--pill-off, #E4E4E4); color: var(--ink); text-decoration: none; font-size: 17px; text-align: center; }
.prop-tabs a[aria-current="page"] { background: var(--inverse); color: var(--on-inverse); }
.prop-sum { font: 700 22px/1.3 var(--font-head); margin-bottom: 24px; }
.prop-card .notice { margin: 24px 0 28px; }
.prop-list { display: grid; gap: 18px; }
.prop-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 40px auto; column-gap: 18px; align-items: start; padding: 24px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--card-shadow); border: 1px solid var(--card-line); }
.prop-main { display: grid; gap: 6px; min-width: 0; }
.prop-title { font: 700 22px/1.25 var(--font-head); color: var(--ink); text-decoration: none; }
.prop-meta { font-size: 16px; color: var(--muted); }
.prop-meta > span + span::before { content: "|"; margin: 0 14px; color: #C4C4C4; }
.prop-meta .is-late { color: var(--brand); }
.prop-row.is-done .prop-title { color: var(--muted); text-decoration: line-through; }
.prop-notes { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; color: #B5B5B5; }
.prop-notes.has-notes { color: var(--ink); }
.prop-notes.has-notes::after { content: ""; position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.prop-view { white-space: nowrap; }
.prop-empty { padding: 12px 0; }
@media (max-width: 700px) {
  .prop-tabs { grid-template-columns: 1fr; gap: 8px; padding: 18px 0; margin-bottom: 24px; }
  .prop-tabs a { justify-content: flex-start; padding: 8px 16px; }
  .prop-sum { font-size: 19px; }
  .prop-row { grid-template-columns: 28px minmax(0, 1fr) 40px; row-gap: 14px; padding: 18px; column-gap: 12px; }
  .prop-view { grid-column: 2 / span 2; justify-self: start; }
  .prop-title { font-size: 19px; }
  .prop-meta { font-size: 15px; }
  .prop-meta > span { display: block; }
  .prop-meta > span + span::before { content: none; }
}

/* ---------- Notifications ---------- */
.notes { padding: 8px 30px; }
.notes > .tabs { display: none; }
.note-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 10px; column-gap: 20px; align-items: start; padding: 24px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.note-row:last-of-type { border-bottom: 0; }
.note-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--field); color: var(--ink); }
.note-row.is-unread .note-icon { background: var(--inverse); color: var(--on-inverse); }
.note-icon .icon { width: 22px; height: 22px; }
.note-main { display: grid; gap: 2px; align-content: start; min-width: 0; line-height: 1.35; }
.note-title { font-size: 17px; font-weight: 600; }
.note-body { font-size: 17px; color: var(--muted); }
.note-time { font-size: 13px; color: var(--muted); }
.note-dot { width: 10px; height: 10px; margin-top: 8px; border-radius: 50%; background: var(--brand); }
.notes .empty { padding: 40px 0; }
@media (max-width: 700px) {
  .notes { padding: 0 16px; }
  .note-row { grid-template-columns: 40px minmax(0, 1fr) 10px; column-gap: 14px; padding: 18px 0; }
  .note-icon { width: 40px; height: 40px; }
  .note-icon .icon { width: 18px; height: 18px; }
  .note-title, .note-body { font-size: 16px; }
}

/* ---------- Owner approval: staff box on the work order ---------- */
.ap { display: grid; gap: 16px; }
.ap-status { display: grid; gap: 8px; padding: 20px 22px; border-radius: var(--r-md); background: var(--field); }
.ap-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ap-money { font: 700 26px/1.1 var(--font-head); }
.ap-pill { padding: 6px 12px; border-radius: var(--r-full); background: var(--warning); color: #000; font-size: 13px; font-weight: 600; }
.ap-status.is-approved .ap-pill { background: var(--ok, #2EB85C); color: #fff; }
.ap-status.is-declined .ap-pill, .ap-status.is-expired .ap-pill { background: var(--error-bg); color: var(--error-ink); }
.ap-note { font-style: italic; }
.ap-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.ap-actions .btn-link { display: inline-flex; align-items: center; }
.ap-ask > summary { list-style: none; cursor: pointer; }
.ap-ask > summary::-webkit-details-marker { display: none; }
.ap-ask[open] > summary { display: none; }
.ap-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
@media (max-width: 700px) { .ap-form { grid-template-columns: 1fr; } }

/* ---------- Owner approval: the public page ---------- */
.pub { background: #F3F3F3; min-height: 100vh; }
/* Public and portal pages: a dark band with the app icon and the company's name, the page title in the band, and the
   white card rising into it (the Manage public page look). */
.pub-band { background: #111114; color: #FFFFFF; padding: 0 16px 120px; }
.pub-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 716px; margin: 0 auto; padding: 28px 0 0; }
.pub-brand { display: inline-flex; align-items: center; gap: 12px; color: #FFFFFF; text-decoration: none; font-size: 18px; }
.pub-brand img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.pub-brand b { font-weight: 600; }
.pub-contact { font-size: 16px; color: rgba(255, 255, 255, .7); }
.pub-band .btn-link { color: rgba(255, 255, 255, .8); display: inline-flex; align-items: center; text-decoration: none; }
.pub-hero { max-width: 716px; margin: 0 auto; padding-top: 30px; }
.pub-hero .pub-kicker { margin-bottom: 14px; color: #FF6B5E; }
.pub-hero .pub-kicker.is-ok { color: #4ADE80; }
.pub-hero .pub-h1 { font: 800 48px/1.05 var(--font-head); letter-spacing: -.02em; margin-bottom: 16px; color: #FFFFFF; }
.pub-hero .pub-lead { margin: 0; max-width: 620px; color: rgba(255, 255, 255, .72); }
.pub-hero .pub-back { margin-bottom: 20px; }
.pub-hero .pub-back a { color: rgba(255, 255, 255, .7); text-decoration: none; }
.pub-band + .pub-main { margin-top: -88px; padding-top: 0; }
.pub-contact > span + span::before { content: "|"; margin: 0 10px; color: #C4C4C4; }
.pub-main { max-width: 716px; margin: 0 auto; padding: 60px 0 80px; }
.pub-card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--card-shadow); padding: 40px; }
.pub-kicker { font-size: 15px; font-weight: 600; color: var(--brand); margin-bottom: 18px; }
.pub-kicker.is-ok { color: #1A7F37; }
.pub-h1 { font: 700 34px/1.1 var(--font-head); margin-bottom: 24px; }
.pub-lead { font-size: 18px; color: var(--muted); margin: -8px 0 24px; }
.pub-place { display: flex; align-items: center; gap: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.pub-place img { width: 80px; height: 64px; object-fit: cover; border-radius: 6px; flex: none; }
.pub-addr { font-size: 17px; font-weight: 600; }
.pub-sub { color: var(--muted); font-size: 16px; }
.pub-sub > span + span::before { content: "|"; margin: 0 8px; color: #C4C4C4; }
.pub-facts { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 0; padding: 28px 0 24px; font-size: 17px; }
.pub-card > .pub-facts:first-child { padding-top: 0; margin-top: 0; }
.pub-facts dt { font-weight: 600; }
.pub-facts dd { margin: 0; }
.pub-total { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-radius: var(--r-md); background: #F3F3F3; }
.pub-total div { display: grid; gap: 2px; color: var(--muted); font-size: 16px; }
.pub-total div span:first-child { font-size: 15px; font-weight: 600; }
.pub-total b { font: 700 32px/1 var(--font-head); white-space: nowrap; }
.pub-h2 { font-size: 17px; font-weight: 600; margin: 32px 0 14px; }
.pub-photos { display: flex; flex-wrap: wrap; gap: 10px; }
.pub-photos img { width: 120px; height: 90px; object-fit: cover; border-radius: 6px; display: block; }
.pub-note { font-size: 17px; }
.pub-form { display: grid; gap: 8px; margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.pub-form label { font-size: 15px; font-weight: 600; }
.pub-form .textarea { background: #F3F3F3; border-color: transparent; }
.pub-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; }
.pub-actions .btn { min-height: 54px; padding: 12px 24px; font-size: 19px; }
.pub-foot { text-align: center; color: var(--muted); font-size: 16px; margin-top: 36px; padding: 0 16px; }
@media (max-width: 760px) {
  .pub-band { padding-bottom: 96px; }
  .pub-top { padding-top: 18px; }
  .pub-hero { padding-top: 30px; }
  .pub-hero .pub-h1 { font-size: 32px; }
  .pub-band + .pub-main { margin-top: -72px; }
  .pub-main { padding: 20px 16px 48px; }
  .pub-card { padding: 20px; }
  .pub-h1 { font-size: 27px; }
  .pub-facts { grid-template-columns: 1fr; gap: 2px 0; }
  .pub-facts dd { margin-bottom: 12px; }
  .pub-total { padding: 16px 18px; }
  .pub-total b { font-size: 26px; }
  .pub-actions .btn { flex: 1 1 100%; }
}

/* Owner and client portal (signed in, same public look) */
.pub-me { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pub-list, .pub-updates { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pub-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-radius: var(--r-md); background: #F3F3F3; color: inherit; text-decoration: none; }
.pub-row > span:first-child { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.pub-row b { font-size: 17px; font-weight: 600; }
.pub-row .status { flex: none; font-size: 15px; }
.pub-row.is-ask { background: var(--surface); border: 1px solid var(--brand); }
.pub-amt { font: 700 22px/1 var(--font-head); white-space: nowrap; }
.pub-go { color: var(--muted); font-size: 20px; }
.pub-updates li { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.pub-updates li:last-child { border-bottom: 0; }
.pub-pre { white-space: pre-line; overflow-wrap: anywhere; }
.pub-back { margin: 0 0 16px; font-size: 16px; }
.pub-back a, .pub-foot-in a { color: var(--muted); }
.pub-foot-in { margin-top: 28px; font-size: 16px; }
.pub-total + .pub-total { margin-top: 10px; }
.pub-total .btn { flex: none; }
@media (max-width: 640px) {
  .pub-row { padding: 14px; }
  .pub-total { flex-wrap: wrap; }
}
.portal-card .form-actions { margin-top: 16px; }
.portal-done { margin-top: 12px; font-weight: 600; color: #1A7F37; }
.pub-updates li.is-reply { margin-left: 24px; padding-left: 14px; border-left: 2px solid var(--line); }
.pub-file { text-decoration: underline; text-underline-offset: 3px; }

/* Done means struck through, everywhere a title can be checked off. */
.card-head.is-done h2, .is-done > .card-head h2, .link-list .is-done .link-main { text-decoration: line-through; color: var(--muted); }
.card-head.is-done .row-check, .is-done > .card-head .row-check { background: var(--brand); box-shadow: none; }

/* Linked facts and short lists of related records */
.fact-link { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.fact-link:hover { text-decoration-color: currentColor; }
.link-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.link-list li { border-bottom: 1px solid var(--line); }
.link-list a { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; }
.link-main { font-size: 16px; font-weight: 600; color: var(--ink); }
.link-sub { font-size: 14px; color: var(--muted); }
.link-list a:hover .link-main { color: var(--brand); }

/* Providers on a property (picked from the company's one list) */
.prov-block { margin-bottom: 10px; }
.prov-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.prov-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.prov-row form { display: contents; }
.prov-main { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; min-width: 0; }
.prov-main:hover .link-main { color: var(--brand); }
.prov-acct { font: 13px var(--mono); color: var(--ink-2); white-space: nowrap; }
.prov-add { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; margin-top: 14px; align-items: start; }
.prov-add .input, .prov-add .select { min-height: 44px; padding: 10px 12px; font-size: 15px; }
.prov-add .btn { min-height: 44px; }
.prov-foot { margin-top: 10px; }
.prov-foot a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 767px) {
  .prov-add { grid-template-columns: 1fr; }
  .prov-row { grid-template-columns: minmax(0, 1fr) auto; }
  .prov-acct { grid-column: 1; grid-row: 2; margin-top: -8px; padding-bottom: 10px; }
}

/* A job's tasks on the work order: tick, title, who and when. Done ones strike. */
.task-mini { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 2px; }
.task-mini li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.task-mini li:last-child { border-bottom: 0; }
.task-mini a { display: grid; gap: 2px; color: inherit; text-decoration: none; min-width: 0; }
.task-mini .link-main { font-weight: 600; }
.task-mini .link-sub { color: var(--muted); font-size: .875rem; }
.task-mini .row-check.is-on { background: var(--brand); box-shadow: none; }
.task-mini .is-done .link-main { text-decoration: line-through; color: var(--muted); }
#wo-tasks { margin-bottom: 32px; }

/* Public repair request page */
.pub-alert { margin: 0 0 8px; padding: 14px 18px; border-radius: var(--r-md); background: var(--error-bg); color: var(--error-ink); font-size: 16px; }
.req-form { gap: 22px; }
.req-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.req-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 16px; }
.req-span { grid-column: span 2; }
.req-photos { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--r-md); border: 1px dashed var(--line); background: var(--field); cursor: pointer; }
.req-photos .icon { width: 26px; height: 26px; color: var(--brand); flex: none; }
.req-photos span { display: grid; gap: 2px; }
.req-photos small { color: var(--muted); font-size: 15px; font-weight: 400; }
.req-form .hint { margin-top: -10px; }
@media (max-width: 640px) { .req-grid { grid-template-columns: 1fr; } .req-span { grid-column: auto; } }

/* Requests inbox: the share link, the list, and the review page (both looks). */
.req-link { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px 30px; align-items: center; background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--r-card); padding: 20px 24px; margin: 20px 0 24px; }
.req-link-title { font: 700 18px/1.2 var(--font-head); margin: 0 0 6px; }
.req-link-row { display: flex; gap: 10px; }
.req-link-row .input { flex: 1; min-width: 0; font-size: 15px; }
.req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.req-item { background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--r-card); box-shadow: var(--card-shadow); }
.req-item.is-urgent { border-color: var(--brand); }
.req-item-link { display: flex; align-items: center; gap: 20px; padding: 18px 24px; color: inherit; text-decoration: none; }
.req-item-main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.req-item-title { font: 700 18px/1.3 var(--font-head); }
.req-item-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 15px; }
.req-item-side { display: flex; align-items: center; gap: 16px; flex: none; }
.req-ai { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.req-ai .icon, .req-ai-card .section-title .icon { width: 18px; height: 18px; }
.req-show { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.req-show > .card .section-title:first-child, .req-ai-card .section-title { margin-top: 0; }
.req-show-photos { margin: 20px 0; }
.req-show .facts { margin: 24px 0 0; }
.req-done { margin: 24px 0 0; font-size: 16px; }
.req-done a { color: inherit; font-weight: 700; }
.req-side { grid-row: span 2; }
.req-ai-card .section-title { display: flex; align-items: center; gap: 8px; font-size: 18px; margin-bottom: 14px; }
.req-ai-summary { font-size: 16px; line-height: 1.5; margin: 0 0 14px; }
.req-ai-label { font-weight: 700; margin: 14px 0 6px; }
.req-ai-q { margin: 0 0 14px; padding-left: 20px; line-height: 1.5; }
.req-accept .hint { display: block; margin: 16px 0; }
.req-accept, .req-decline { grid-column: 1; }
@media (max-width: 860px) {
  .req-link, .req-show { grid-template-columns: 1fr; }
  .req-side, .req-accept, .req-decline { grid-row: auto; grid-column: auto; }
  .req-item-link { flex-wrap: wrap; padding: 16px; }
  .req-item-side { width: 100%; justify-content: space-between; }
  .req-link-row { flex-wrap: wrap; }
  .req-link-row .input { flex-basis: 100%; }
}

/* AI helpers: quick add above the new work order form, draft chips under the note box. */
.ai-quick { background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--r-card); padding: 20px 24px; margin: 0 0 24px; display: grid; gap: 10px; }
.ai-quick-label, .ai-drafts-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.ai-quick-label .icon, .ai-drafts-label .icon { width: 18px; height: 18px; color: var(--brand); }
.ai-quick-row { display: flex; gap: 10px; }
.ai-quick-row .input { flex: 1; min-width: 0; }
.ai-filled { background-color: #FDF1EF; }
.ai-drafts { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 10px 0 0; font-size: 15px; }
.ai-chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-full); padding: 6px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.ai-chip:hover { border-color: var(--ink); }
.ai-chip[data-busy] { color: var(--muted); }
@media (max-width: 640px) { .ai-quick-row { flex-wrap: wrap; } .ai-quick-row .btn { width: 100%; } }
.req-newlink { margin-top: 14px; }
.req-decline .form-actions { margin-top: 14px; }

/* ---------- Invoices ---------- */
.inv-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 24px; }
.inv-stat { background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--r-card); box-shadow: var(--card-shadow); padding: 20px 24px; display: grid; gap: 6px; }
.inv-stat span { color: var(--muted); font-size: 15px; font-weight: 600; }
.inv-stat b { font: 700 30px/1 var(--font-head); }
.inv-stat.is-late b { color: var(--brand); }
.inv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.inv-list .is-paused { opacity: .6; }
.inv-row { display: flex; align-items: center; gap: 20px; padding: 18px 24px; background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--r-card); box-shadow: var(--card-shadow); color: inherit; text-decoration: none; }
.inv-row-main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.inv-row-title { font: 700 18px/1.3 var(--font-head); }
.inv-row-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 15px; }
.inv-row-side { display: flex; align-items: center; gap: 20px; flex: none; }
.inv-row-amt { font: 700 20px/1 var(--font-head); min-width: 96px; text-align: right; }
.inv-row-side.bk-page-actions { gap: 10px; }
.status-overdue { color: var(--brand); }
.status-overdue::before { background: var(--brand); }
.status-paid::before { background: #1A7F37; }
.status-partial::before { background: none; box-shadow: inset 0 0 0 1.5px var(--ink); }
.status-sent::before { background: var(--ink); }
.status-void { color: var(--muted); text-decoration: line-through; }

.inv-items { display: grid; gap: 12px; margin-bottom: 16px; }
.inv-item-head, .inv-item { display: grid; grid-template-columns: minmax(0, 1fr) 84px 130px 110px 44px; gap: 12px; align-items: start; }
.inv-item-head { color: var(--muted); font-size: var(--t-cap); font-weight: 600; }
.inv-item-head span:nth-child(n+2) { text-align: right; }
.inv-item-desc { display: grid; gap: 6px; }
.inv-item .input { text-align: left; }
.inv-item [data-qty], .inv-item [data-unit] { text-align: right; }
.input-sm { min-height: 40px; padding: 8px 14px; font-size: 16px; }
.inv-item-amt { align-self: center; text-align: right; font-weight: 700; padding-top: 2px; }
.inv-item:first-of-type:last-of-type [data-inv-remove] { visibility: hidden; }
.inv-sum { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.inv-tax { display: grid; gap: 8px; font-size: var(--t-cap); font-weight: 600; }
.inv-pct { display: flex; align-items: center; gap: 8px; }
.inv-pct .input { width: 96px; text-align: right; }
.inv-sum dl { display: grid; grid-template-columns: auto 130px; gap: 8px 24px; margin: 0; font-size: 16px; }
.inv-sum dd { margin: 0; text-align: right; }
.inv-sum .inv-sum-total { font: 700 22px/1.2 var(--font-head); }
.inv-pct .input, .inv-pct > span { font-weight: 400; }
/* Wide screens: qty, price, amount and remove sit on the description's line; details go under it. Totals line up under Amount. */
@media (min-width: 768px) {
  .inv-item { align-items: center; row-gap: 6px; }
  .inv-item-desc { display: contents; }
  .inv-item-desc > label + label { grid-column: 1; grid-row: 2; }
  .inv-item-amt { align-self: center; padding-top: 0; }
  .inv-sum dl { padding-right: 56px; }
}
/* Invoice numbers in Geist Mono, like a ledger: qty, price, amount, tax rate and totals. */
@font-face { font-family: 'Casa Geist Mono'; src: url('/site/fonts/geist-mono-var.woff2') format('woff2'); font-style: normal; font-weight: 100 900; font-display: swap; }
html[data-look] :is(.inv-item [data-qty], .inv-item [data-unit], .inv-item-amt, .inv-pct .input, .inv-sum dd) { font-family: 'Casa Geist Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; letter-spacing: 0; }
html[data-look] .inv-item-amt { font-size: 16px; }
/* Details belong to the description: one joined box, details in gray underneath, so it never reads as a second line. */
html[data-look] .inv-item-desc { gap: 0; }
html[data-look] .inv-item-desc > label:first-child .input { border-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; padding-bottom: 3px; }
html[data-look] .inv-item-desc > label + label .input { display: block; min-height: 0; height: auto; border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; padding-top: 0; padding-bottom: 10px; font-size: 11px; font-style: italic; line-height: 1.4; color: var(--muted); }
html[data-look] .inv-item-desc > label + label .input::placeholder { font-style: italic; }
html[data-look=modern] .inv-item-desc > label + label .input { padding-inline: 16px; }
/* Phones keep the details at 16px so iPhone doesn't zoom in when it's tapped. */
@media (max-width: 767px) { html[data-look] .inv-item-desc > label + label .input { font-size: 16px; } }
@media (min-width: 768px) { html[data-look] .inv-item { row-gap: 0; } }
.inv-check { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.inv-check input { width: 20px; height: 20px; flex: none; }

.inv-show { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.inv-side { display: grid; gap: 24px; }
.inv-side .card + .card { margin-top: 0; }
.inv-side .card-title { margin-bottom: 14px; font-size: 20px; }
.inv-side .hint { display: block; margin: 10px 0; }
.btn-block { width: 100%; }
.inv-side form + form { margin-top: 12px; }
.inv-link { margin-top: 12px; }
.inv-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.inv-kicker { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.inv-who { font: 700 var(--t-card)/1.2 var(--font-head); margin-bottom: 6px; }
.inv-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.inv-due { display: grid; gap: 4px; text-align: right; color: var(--muted); font-size: 15px; }
.inv-due b { font: 700 34px/1 var(--font-head); color: var(--ink); }
.inv-lines { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 16px; }
.inv-lines th, .inv-lines td { padding: 14px 8px; text-align: left; vertical-align: top; }
.inv-lines thead th { color: var(--muted); font-size: var(--t-cap); font-weight: 600; border-bottom: 1px solid var(--line); }
.inv-lines tbody td { border-bottom: 1px solid var(--line); }
.inv-lines tfoot th { text-align: right; font-weight: 400; padding: 8px; }
.inv-lines tfoot td { padding: 8px; }
.inv-lines .num { text-align: right; white-space: nowrap; }
.inv-lines .inv-total th, .inv-lines .inv-total td { font: 700 20px/1.2 var(--font-head); }
.inv-line-name { display: block; font-weight: 600; }
.inv-line-sub { display: block; color: var(--muted); font-size: 15px; margin-top: 2px; }
.inv-notes { margin: 0 0 20px; white-space: pre-line; }
.inv-paynote { white-space: pre-line; }
.inv-pay { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.inv-pay > div { display: grid; gap: 2px; }
.inv-pay .hint { margin: 0; }
.inv-payform { display: grid; gap: 14px; margin-top: 20px; }
.inv-payform h4 { font-size: 17px; font-weight: 700; }
.inv-danger { display: grid; gap: 12px; }
.inv-danger .hint { margin: 0; }
.inv-danger .btn-danger { justify-self: start; }
.pub-card .inv-lines { margin-top: 0; }
@media (max-width: 1199px) { .inv-show { grid-template-columns: 1fr; } .inv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .inv-item-head { display: none; }
  .inv-item { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto 44px; }
  .inv-item-desc { grid-column: 1 / -1; }
  .inv-row { flex-wrap: wrap; padding: 16px 18px; }
  .inv-row-side { width: 100%; justify-content: space-between; }
  .inv-row-side.bk-page-actions { justify-content: flex-start; }
  .inv-head { grid-template-columns: 1fr; }
  .inv-due { text-align: left; }
  .inv-lines thead th:nth-child(2), .inv-lines tbody td:nth-child(2), .inv-lines thead th:nth-child(3), .inv-lines tbody td:nth-child(3) { width: 0; padding: 0; font-size: 0; overflow: hidden; }
  .inv-lines th, .inv-lines td, .inv-lines tfoot th, .inv-lines tfoot td { padding-left: 0; padding-right: 0; }
  .inv-stat b { font-size: 24px; }
}
.wo-bill { margin-top: 8px; }
.wo-bill .section-title { margin: 28px 0 12px; font-size: 18px; }
.wo-bill-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; font-size: 15px; }
.wo-bill .btn { margin-top: 14px; }
.inv-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
@media (max-width: 720px) { .inv-settings { grid-template-columns: 1fr; } .inv-settings .span-2 { grid-column: auto; } }

/* Property details: house photos, the home in numbers and a description on the left; quick saves, facts and providers on the right. */
.prop-detail { grid-template-columns: minmax(0, 1.55fr) minmax(220px, 1fr); grid-template-rows: auto 1fr; column-gap: 36px; row-gap: 0; padding-left: 0; }
.prop-main-col { grid-column: 1; grid-row: 1; }
.prop-notes-col { grid-column: 1; grid-row: 2; }
.prop-side { grid-column: 2; grid-row: 1 / span 2; }
.prop-photos { display: grid; gap: 12px; }
.prop-cover { display: block; aspect-ratio: 16 / 10; border-radius: var(--r-card); overflow: hidden; background: var(--page); }
.prop-cover img { width: 100%; height: 100%; object-fit: cover; }
.prop-cover.is-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: var(--t-cap); }
.prop-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.prop-gallery li { display: grid; gap: 4px; }
.prop-gallery a { display: block; aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; }
.prop-gallery img { width: 100%; height: 100%; object-fit: cover; }
.prop-photo-acts { display: flex; align-items: center; justify-content: space-between; min-height: 32px; }
.prop-photo-acts form { display: contents; }
.photo-act { border: 0; background: none; padding: 4px 0; font-size: 13px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; }
.photo-act:hover { color: var(--ink); }
.photo-act .icon { width: 15px; height: 15px; }
.photo-del { width: 32px; justify-content: flex-end; }
.photo-tag { font-size: 13px; font-weight: 600; }
.prop-photos .upload { margin-top: 0; }
.prop-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 30px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.prop-stats > div { padding: 16px 16px 16px 0; }
.prop-stats > div + div { border-left: 1px solid var(--line); padding-left: 16px; }
.prop-stats .is-wide { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
.prop-stats .is-wide + div { border-left: 0; padding-left: 0; }
.prop-stats dt { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.prop-stats dd { margin: 0; font: 700 17px/1.3 var(--font-head); }
.prop-desc { display: grid; gap: 14px; color: var(--ink-2); font-size: 14px; line-height: 1.4; max-width: 68ch; }
.prop-desc p { margin: 0; }
.prop-good { margin: 16px 0 0; font-size: 15px; color: var(--ink-2); }
.prop-side .facts { grid-template-columns: 1fr; gap: 2px; margin-top: 10px; font-size: 15px; }
.prop-side .facts dt { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 12px; }
.prop-side .facts dt:first-child { margin-top: 0; }
.prop-side-title { font-size: 20px; margin: 10px 0 12px; }
.prov-compact .prov-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.prov-line { margin: 0; padding: 10px 0; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.prov-line a:hover { color: var(--brand); }
.prov-role { font-weight: 700; margin-right: 4px; }
.prov-compact .prov-acct { display: block; font-size: 12.5px; color: var(--muted); }
.prov-more { margin-top: 14px; }
.prov-more > summary { list-style: none; cursor: pointer; display: inline-flex; }
.prov-more > summary::-webkit-details-marker { display: none; }
.prov-more[open] > summary { display: none; }
.prov-compact .prov-add { grid-template-columns: 1fr; }
@media (max-width: 767px) {
  .prop-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prop-stats > div:nth-child(2n + 2) { border-left: 0; padding-left: 0; }
  .prop-stats > div:nth-child(n + 2) { border-top: 1px solid var(--line); }
  .prop-stats .is-wide + div { border-top: 0; }
  .prop-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1199px) {
  .prop-detail { grid-template-columns: 1fr; grid-template-rows: none; }
  .prop-main-col, .prop-side, .prop-notes-col { grid-column: 1; grid-row: auto; }
  .prop-side { margin-top: 40px; }
  .prop-notes-col { order: 3; }
}
.prov-compact .prov-acct { grid-column: auto; grid-row: auto; margin: 0; padding: 0; }
/* Property providers read like a table: one column of roles, one of names, all left edges lined up. */
.prov-compact .prov-list { display: grid; grid-template-columns: 45% minmax(0, 1fr) auto; column-gap: 16px; }
.prov-compact .prov-line a { display: block; }
.prov-compact .prov-phone { white-space: nowrap; }
.prov-compact .prov-row { grid-column: 1 / -1; grid-template-columns: subgrid; align-items: start; gap: 0 16px; }
.prov-compact .prov-role { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 0; font-size: 15px; line-height: 1.45; font-weight: 700; color: var(--ink); }
.prov-compact .prov-role .icon, .prop-side .facts-icons dt .icon { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--brand); }
/* House facts above use the same table: icon + black label in one column, the value lined up in the next, a line under each row. */
.prop-side .facts { grid-template-columns: calc(45% + 16px) minmax(0, 1fr); gap: 0; border-top: 1px solid var(--line); }
.prop-side .facts dt, .prop-side .facts dt:first-child { margin: 0; padding: 10px 16px 10px 0; font-size: 15px; line-height: 1.45; font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--line); align-items: flex-start; }
.prop-side .facts dd, .prop-side .facts-icons dd { margin: 0; padding: 10px 0; line-height: 1.45; border-bottom: 1px solid var(--line); }
.prov-compact .prov-row .c-act { align-self: center; }

/* Invoice: remove a payment (with a reason), removed payments, history */
.inv-pay { flex-wrap: wrap; }
.inv-unpay > summary { list-style: none; cursor: pointer; }
.inv-unpay > summary::-webkit-details-marker { display: none; }
.inv-unpay[open] { flex-basis: 100%; }
.inv-unpay[open] > summary { margin-left: auto; }
.inv-unpay form { display: grid; gap: 10px; margin-top: 10px; }
.inv-pay-removed s { color: var(--muted); }
.inv-history { display: grid; gap: 0; }
.inv-hist-row { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.inv-hist-row:last-child { border-bottom: 0; }
.inv-hist-row b { font-weight: 600; font-size: .95rem; }
.inv-hist-row .hint { margin: 0; }

/* Card payments setup (Settings → Payments): four processor tiles, then the open one's steps and the kit's connect panel. */
.pay-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 30px; }
.pay-tile { display: flex; flex-direction: column; gap: 8px; padding: 20px; background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--r-card); color: var(--ink); text-decoration: none; }
.pay-tile[aria-current="page"] { background: var(--inverse); border-color: var(--inverse); color: var(--on-inverse); }
.pay-tile-name { font: 700 18px/1.2 var(--font-head); }
.pay-tile-state { font-size: var(--t-cap); color: var(--muted); }
.pay-tile-state.is-ok { color: #1A7F37; }
.pay-tile-state.is-warn { color: var(--brand); }
.pay-tile[aria-current="page"] .pay-tile-state { color: inherit; opacity: .8; }
.pay-steps { list-style: none; counter-reset: pay-step; margin: 24px 0 0; padding: 0; overflow-wrap: anywhere; }
.pay-steps li { counter-increment: pay-step; position: relative; padding: 0 0 20px 44px; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.pay-steps li:last-child { padding-bottom: 0; }
.pay-steps li::before { content: counter(pay-step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--inverse); color: var(--on-inverse); font: 600 14px/28px var(--font); text-align: center; }
.pay-steps li:not(:last-child)::after { content: ''; position: absolute; left: 13.5px; top: 32px; bottom: 4px; width: 1px; background: var(--line); }
.pay-steps strong { color: var(--ink); font-weight: 600; }
.pay-steps a, .pay-more a { color: var(--ink); text-decoration: underline; }
.pay-connect { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.pay-intuit, .pay-more { margin-top: 16px; }
.pay-notes { margin: 0; padding-left: 20px; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.pay-notes li + li { margin-top: 8px; }
@media (max-width: 760px) { .pay-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .pay-tile { padding: 16px; } }

/* Pay by card on the invoice pages, and card details on payments. */
.inv-paid-note { margin: 0 0 24px; padding: 16px 20px; border-radius: var(--r-card); background: #EAF5EC; color: #1A7F37; font-size: 16px; }
.inv-paid-note.inv-pay-error { background: #FDECEC; color: #B4232A; }
/* The payment confirmation after paying an invoice (owner 2026-11-17): check, big amount, the facts in a row. */
.pay-done { display: grid; justify-items: center; gap: 6px; margin: 0 0 32px; padding: 36px 24px 28px; border-radius: var(--r-card); background: #EAF5EC; color: #0B3D1A; text-align: center; }
.pay-done-check { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 8px; border-radius: 50%; background: #1A7F37; color: #fff; }
.pay-done-check svg { width: 28px; height: 28px; }
.pay-done-kicker { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #1A7F37; }
.pay-done-amount { margin: 0; font-size: clamp(40px, 8vw, 56px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.pay-done-sub { margin: 0; max-width: 46ch; font-size: 16px; color: #2C5A39; }
.pay-done-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px 24px; width: 100%; margin: 20px 0 0; padding-top: 20px; border-top: 1px solid rgba(26, 127, 55, .2); text-align: left; }
.pay-done-facts div { min-width: 0; }
.pay-done-facts dt { font-size: 13px; color: #2C5A39; }
.pay-done-facts dd { margin: 2px 0 0; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.pay-done.is-waiting { background: var(--page, #F4F4F6); color: inherit; }
.pay-done.is-waiting .pay-done-check { background: var(--ink, #000); }
.pay-done.is-waiting .pay-done-kicker, .pay-done.is-waiting .pay-done-sub { color: inherit; }
.inv-intuit { margin-top: 12px; font-size: var(--t-cap); color: var(--muted); }
.inv-refunded { color: var(--muted); }
.inv-refund summary { cursor: pointer; }


/* Avatar menu in the top bar: My account and Sign out (owner, 2026-11-15) */
.me-menu { position: relative; flex: none; }
.me-menu > summary { list-style: none; cursor: pointer; }
.me-menu > summary::-webkit-details-marker { display: none; }
.me-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; display: grid; min-width: 180px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .28); }
.me-pop a, .me-pop button { display: block; width: 100%; padding: 11px 12px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 15px; line-height: 1.2; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; }
.me-pop a:hover, .me-pop button:hover { background: var(--line-soft); }
.me-pop form { margin: 0; }

/* ---------- Dark mode (sun/moon button in the top bar, like Studio; saved per device) ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #EDEDED;
  --ink-2: #B4B4B4;
  --muted: #8E8E8E;
  --faint: #5E5E5E;
  --line: #333333;
  --line-soft: #292929;
  --page: #151515;
  --surface: #1F1F1F;
  --field: #2A2A2A;
  --inverse: #EDEDED;
  --on-inverse: #111111;
  --check: #555555;
  --error-bg: #3A1D1A;
  --error-ink: #FF9C92;
  --card-shadow: 0 0 0 1px #2E2E2E;
  --pill-off: #2E2E2E;
  --link: #6EA8FF;
}
html[data-look="classic"][data-theme="dark"] {
  --ink: #EDEDED;
  --ink-2: #B4B4B4;
  --muted: #8E8E8E;
  --faint: #5E5E5E;
  --line: #2E2E2E;
  --line-soft: #262626;
  --page: #121212;
  --surface: #1C1C1C;
  --field: #232323;
  --field-line: #3A3A3A;
  --inverse: #EDEDED;
  --check: #4A4A4A;
  --rail: #000000;
}
html[data-theme="dark"] .ai-filled { background-color: #3A2420; }
html[data-theme="dark"] .inv-paid-note { background: #16301D; color: #7BD88F; }
html[data-theme="dark"] .inv-paid-note.inv-pay-error { background: #3A1D1A; color: #FF9C92; }
html[data-theme="dark"] .pay-done { background: #16301D; color: #E6F4EA; }
html[data-theme="dark"] .pay-done-sub, html[data-theme="dark"] .pay-done-facts dt { color: #9FD3AC; }
html[data-theme="dark"] .pay-done-kicker { color: #7BD88F; }
html[data-theme="dark"] .pay-done.is-waiting { background: #212121; color: inherit; }
html[data-theme="dark"] .status-paid::before { background: #3FB950; }
html[data-theme="dark"] .pay-tile-state.is-ok, html[data-theme="dark"] .portal-done { color: #3FB950; }
html[data-theme="dark"] .cal-key .is-task::before, html[data-theme="dark"] .cal-item.is-task::before { background: #5A5A5A; }
html[data-theme="dark"] .cal-meta > span + span::before, html[data-theme="dark"] .prop-meta > span + span::before { color: #555555; }
html[data-theme="dark"] .prop-notes { color: #777777; }
/* the button shows the moon in light mode and the sun in dark mode */
.theme-btn .theme-sun { display: none; }
html[data-theme="dark"] .theme-btn .theme-sun { display: block; }
html[data-theme="dark"] .theme-btn .theme-moon { display: none; }
.me-who .avatar { width: 40px; height: 40px; min-width: 40px; aspect-ratio: 1; }

/* In dark mode the black date card stays black (not the light --inverse) with a thin line so it still reads as a card. */
html[data-theme="dark"] .date-card { background: #000; color: #fff; box-shadow: 0 0 0 1px #333; }
/* Header icons match Studio's bar: Studio's icon set at 20px with a 2px stroke. */
.me-row .icon-lg { width: 20px; height: 20px; stroke-width: 2; }
/* The avatar menu is exactly the avatar's height (no line-box gap under it), so the header icons center on the avatar. */
.me-menu, .me-menu > summary { display: flex; align-items: center; }
.me-who .avatar { display: flex; }

/* Dashboard numbers and graphs (both looks; Classic tweaks in looks/classic.css). */
.dash-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 31px 0 16px; }
.dash-kpi { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 20px 22px; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--card-shadow); border: 1px solid var(--card-line); color: var(--ink); text-decoration: none; min-width: 0; }
.dash-kpi-icon { position: absolute; top: 18px; right: 18px; display: grid; place-items: center; color: var(--brand); }
.dash-kpi-icon .icon { width: 36px; height: 36px; stroke-width: 2.1; }
.dash-kpi-label { font-size: 14px; font-weight: 600; color: var(--ink-2); padding-right: 46px; }
.dash-kpi-num { font: 800 44px/1.05 var(--font-head); letter-spacing: -.02em; margin: 8px 0 6px; font-variant-numeric: tabular-nums; }
.dash-kpi-sub { font-size: 14px; color: var(--muted); }
.dash-kpi-sub .is-hot { color: var(--brand); font-weight: 700; }
.dash-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 0 24px; }
.dash-charts .dash-chart:last-child:nth-child(odd) { grid-column: 1 / -1; }
.dash-chart:last-child .dash-hbars { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.dash-chart { margin: 0; padding: 18px 20px 14px; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--card-shadow); border: 1px solid var(--card-line); min-width: 0; }
.dash-chart figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; margin-bottom: 10px; }
.dash-chart-title { font: 700 17px/1.2 var(--font-head); }
.dash-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.dash-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: 6px; }
.dash-legend .k-a { background: var(--line); }
.dash-legend .k-b { background: var(--brand); }
.dash-legend .k-la, .dash-legend .k-lb { width: 16px; height: 0 !important; border-radius: 0 !important; background: none !important; border-top: 1.5px dashed var(--muted); }
.dash-legend .k-lb { border-top: 2px solid var(--brand); }
.dash-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.dash-chart .bar-a { fill: var(--line); }
.dash-chart .bar-b { fill: var(--brand); }
.dash-chart .dash-grid { stroke: var(--line-soft); stroke-width: 1; }
.dash-chart .line-area { fill: var(--brand); opacity: .08; }
.dash-chart .line-a, .dash-chart .line-b { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.dash-chart .line-a { stroke: var(--muted); stroke-width: .8; stroke-dasharray: 3 3; }
.dash-chart .line-b { stroke: var(--brand); stroke-width: 1.2; }
.dash-chart .dot-a { fill: var(--surface); stroke: var(--muted); stroke-width: .8; }
.dash-chart .dot-b { fill: var(--surface); stroke: var(--brand); stroke-width: 1.2; }
.dash-axis { stroke: var(--line); stroke-width: 1; }
.dash-tick { font-size: 11px; fill: var(--muted); text-anchor: middle; font-family: var(--font); }
.dash-val { font-size: 10.5px; font-weight: 700; fill: var(--ink); text-anchor: middle; font-family: var(--font); }
.dash-hbars { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 11px; }
.dash-hbars li { display: grid; grid-template-columns: 96px minmax(0, 1fr) 52px; align-items: center; gap: 10px; font-size: 14px; }
.dash-hbar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.dash-hbar-track { height: 10px; border-radius: var(--r-full); background: var(--line-soft); overflow: hidden; }
.dash-hbar-fill { display: block; height: 100%; border-radius: inherit; background: var(--ink); }
.dash-hbars li:first-child .dash-hbar-fill { background: var(--brand); }
.dash-hbar-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 1279px) {
  .dash-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .dash-metrics { gap: 12px; }
  .dash-kpi { padding: 16px; }
  .dash-kpi-icon { top: 14px; right: 14px; }
  .dash-kpi-icon .icon { width: 30px; height: 30px; }
  .dash-kpi-num { font-size: 34px; }
  .dash-kpi-sub { font-size: 13px; }
  .dash-charts { grid-template-columns: 1fr; gap: 12px; }
  .dash-chart:last-child .dash-hbars { grid-template-columns: 1fr; }
}

/* Property details: an icon beside each label. Red icons in the details list, gray in the home facts strip. */
.facts-icons dt { display: flex; align-items: center; gap: 8px; }
.facts-icons dt .icon { flex: none; width: 16px; height: 16px; color: var(--brand); }
.prop-stats > div { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; }
.prop-stats .prop-stat-icon { grid-row: span 2; width: 22px; height: 22px; color: var(--muted); }
.prop-stats dt, .prop-stats dd { grid-column: 2; }
/* Home stats, premium: the address on its own row, then equal columns (three or four) with a big red icon,
   a large number and a small label under it. */
.prop-stats { grid-template-columns: repeat(var(--stat-cols, 3), minmax(0, 1fr)); margin-top: 36px; }
.prop-stats .is-wide { padding: 22px 0; column-gap: 16px; }
.prop-stats .is-wide .prop-stat-icon { width: 28px; height: 28px; color: var(--brand); }
.prop-stats .is-wide dd { font: 700 22px/1.3 var(--font-head); letter-spacing: -.01em; }
.prop-stats > div:not(.is-wide) { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 28px 24px 26px; }
.prop-stats .is-wide + div { padding-left: 0; }
.prop-stats > div:not(.is-wide) .prop-stat-icon { width: 32px; height: 32px; color: var(--brand); stroke-width: 1.8; margin-bottom: 18px; }
.prop-stats > div:not(.is-wide) dd { order: 1; font: 800 46px/1 var(--font-head); letter-spacing: -.03em; }
.prop-stats > div:not(.is-wide) dt { order: 2; margin: 10px 0 0; font-size: 15px; font-weight: 600; color: var(--muted); }
@media (max-width: 899px) {
  .prop-stats { grid-template-columns: repeat(var(--stat-cols, 3), minmax(0, 1fr)); }
  .prop-stats > div:nth-child(n + 2) { border-top: 0; }
  .prop-stats > div:not(.is-wide) + div:not(.is-wide) { border-left: 1px solid var(--line); }
  .prop-stats > div:not(.is-wide) { padding: 20px 12px 18px; }
  .prop-stats .is-wide + div { padding-left: 0; }
  .prop-stats > div:not(.is-wide) .prop-stat-icon { width: 26px; height: 26px; margin-bottom: 12px; }
  .prop-stats > div:not(.is-wide) dd { font-size: 30px; }
  .prop-stats > div:not(.is-wide) dt { font-size: 13px; }
  .prop-stats .is-wide dd { font-size: 18px; }
}

/* Calendar: Day / Week / Month sit side by side (other pages keep the stacked heading). */
.page-head .tabs { flex-direction: row; flex-wrap: wrap; row-gap: 4px; }
.page-head .tab + .tab::before { content: "/"; margin: 0 20px; font-weight: 400; color: color-mix(in srgb, var(--muted) 50%, var(--surface)); }

/* Calendar month: one card, a 7-column grid of days, items as small colored lines. */
.month { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--card-shadow); border: 1px solid var(--card-line); overflow: hidden; }
.month-names, .month-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month-names span { padding: 14px 12px 10px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
.month-day { min-height: 128px; padding: 8px 8px 10px; display: flex; flex-direction: column; gap: 4px; min-width: 0; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.month-week:last-child .month-day { border-bottom: 0; }
.month-day:nth-child(7) { border-right: 0; }
.month-day.is-out { background: color-mix(in srgb, var(--field) 50%, var(--surface)); }
.month-day.is-out .month-num { color: var(--muted); }
.month-num { align-self: flex-start; display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: var(--r-full); font: 700 15px/1 var(--font-head); color: var(--ink); text-decoration: none; }
.month-day.is-today .month-num { background: var(--brand); color: #fff; }
.month-item { display: block; padding: 4px 8px; border-radius: var(--r-sm); background: var(--field); box-shadow: inset 3px 0 0 var(--ink); font-size: 13px; line-height: 1.3; color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.month-item b { font-weight: 700; }
.month-item.is-turnover { box-shadow: inset 3px 0 0 var(--brand); }
.month-item.is-task { box-shadow: inset 3px 0 0 #C4C4C4; }
.month-item.is-done { color: var(--muted); text-decoration: line-through; }
.month-more { font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 2px 8px; }
@media (max-width: 900px) {
  .month-day { min-height: 92px; padding: 6px 4px; }
  .month-item { padding: 3px 5px; font-size: 12px; }
}
/* Phones: the day number with a dot per item; tap the day to see them. */
@media (max-width: 640px) {
  .month-names span { padding: 10px 0 8px; text-align: center; font-size: 12px; }
  .month-day { min-height: 64px; display: grid; grid-template-columns: repeat(3, 7px); grid-auto-rows: 7px; justify-content: center; align-content: start; gap: 4px; padding: 6px 2px; }
  .month-num { grid-column: 1 / -1; grid-row: auto; height: 30px; justify-self: center; margin-bottom: 2px; }
  .month-day > .month-num { grid-row-end: span 4; }
  .month-item { width: 7px; height: 7px; padding: 0; border-radius: 50%; font-size: 0; box-shadow: none; background: var(--ink); }
  .month-item.is-turnover { background: var(--brand); box-shadow: none; }
  .month-item.is-task { background: #C4C4C4; box-shadow: none; }
  .month-item:nth-of-type(n+4), .month-more { display: none; }
}

/* Modern / Classic switch under the menu, with a line above it (below Porch videos). */
.look-toggle { margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.look-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; font-size: 17px; line-height: 1.1; color: var(--ink); cursor: pointer; }
.look-switch-track { position: relative; flex: none; width: 46px; height: 26px; border-radius: var(--r-full); background: var(--line); transition: background .2s; }
.look-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.look-switch input:checked + .look-switch-track { background: var(--brand); }
.look-switch input:checked + .look-switch-track::after { transform: translateX(20px); }
.look-switch input:disabled + .look-switch-track { opacity: .6; }
@media (prefers-reduced-motion: reduce) { .look-switch-track, .look-switch-track::after { transition: none; } }
.menu-sheet .look-toggle { margin-top: 20px; }

/* At 1500px or less the side column is narrow, so each house fact and provider stacks: label on top, value under it. */
@media (max-width: 1500px) {
  .prop-side .facts { grid-template-columns: minmax(0, 1fr); }
  .prop-side .facts dt, .prop-side .facts dt:first-child { padding: 12px 0 2px; border-bottom: 0; }
  .prop-side .facts dd, .prop-side .facts-icons dd { padding: 0 0 12px 24px; }
  .prov-compact .prov-list { grid-template-columns: minmax(0, 1fr) auto; }
  .prov-compact .prov-role { grid-column: 1; grid-row: 1; padding: 12px 0 2px; }
  .prov-compact .prov-line { grid-column: 1; grid-row: 2; padding: 0 0 12px 24px; }
  .prov-compact .prov-row .c-act { grid-column: 2; grid-row: 1 / span 2; }
}

/* Home stats: the icon sits big in the top right corner of each column, the number and label down the left. */
.prop-stats > div:not(.is-wide) { position: relative; }
.prop-stats > div:not(.is-wide) .prop-stat-icon { position: absolute; top: 22px; right: 24px; width: 44px; height: 44px; margin: 0; stroke-width: 1.6; }
.prop-stats > div:not(.is-wide) dd { margin-top: 44px; }
@media (max-width: 899px) {
  .prop-stats > div:not(.is-wide) .prop-stat-icon { top: 14px; right: 12px; width: 28px; height: 28px; }
  .prop-stats > div:not(.is-wide) dd { margin-top: 30px; }
}
.nav a .icon { width: 18px; height: 18px; transform: translateY(-1px); }


/* A page whose tabs sit under their own title (Dashboard: "Work Orders", then "Recent / Completed"). */
.tabs-title { margin: 0 0 10px; font: 700 var(--t-title)/1 var(--font-head); color: var(--ink); }
.page-head.tabs-row .tabs-title + .tabs .tab { font-size: calc(var(--t-title) * .72); }

/* A page that opens with a title (not cards) sits as close to the header line as the dashboard cards do. */
.main > .page-head:first-child { padding-top: 31px; }
/* Desktop: "Work Orders  Recent / Completed" on one line; phones keep the title above the tabs. */
@media (min-width: 900px) {
  .page-head.tabs-row > div:first-child:has(.tabs-title) { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 36px; }
  .page-head.tabs-row .tabs-title { margin: 0; }
}
#main[aria-busy="true"] { opacity: .6; transition: opacity .15s .1s; }
@media (prefers-reduced-motion: reduce) { #main[aria-busy="true"] { transition: none; } }

/* Bulk picks: lists you don't check off (properties, providers, owners, clients, reminders) get a square checkbox,
   level with the title. Ticking any shows the bulk bar above the list. */
.row > .row-pick { align-self: start; height: calc(var(--t-row) * 1.2); display: flex; align-items: center; position: relative; z-index: 2; cursor: pointer; }
input.pick { appearance: none; -webkit-appearance: none; margin: 0; width: 20px; height: 20px; border-radius: 5px; box-shadow: inset 0 0 0 2px var(--check); background: var(--surface); cursor: pointer; flex: none; }
input.pick:checked { box-shadow: none; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; }
input.pick:indeterminate { box-shadow: none; background: var(--brand) linear-gradient(#fff, #fff) center / 10px 2.5px no-repeat; }
input.pick:focus, input.pick:focus-visible { outline: none; }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 0 0 16px; padding: 12px 16px 12px 20px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--card-shadow); }
.bulk-bar[hidden] { display: none; }
.pick-all { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-weight: 600; cursor: pointer; }
.bulk-count { color: var(--muted); }
.bulk-delete { margin-left: auto; }
[data-look="classic"] .has-picks .list-head, [data-look="classic"] .has-picks .row { grid-template-columns: 20px var(--cols); }
[data-look="classic"] .row > .row-pick { height: auto; align-self: center; }
@media (max-width: 767px) {
  [data-look="classic"] .has-picks .row { grid-template-columns: 20px minmax(0, 1fr) auto; }
}

/* Team page (vendor/appkit/account/team.blade.php): Casa rows instead of the kit's account cards. */
.team-page { display: grid; gap: 24px; }
.team-page .card + .card { margin-top: 0; }
.team-card .card-title { margin-bottom: 8px; }
.team-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.team-card-head .card-title { margin-bottom: 0; }
.team-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; height: 40px; min-width: min(280px, 100%); }
.team-search input { border: 0; background: none; outline: none; box-shadow: none; flex: 1; font: inherit; padding: 0; min-height: 0; height: 100%; }
.team-list { list-style: none; margin: 0; padding: 0; }
.team-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; align-items: center; column-gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.team-row:first-child { border-top: 0; }
.team-row form { margin: 0; }
.team-who { display: grid; min-width: 0; }
.team-who strong { font-weight: 600; overflow-wrap: anywhere; }
.team-who span { color: var(--muted); font-size: var(--t-small, 14px); overflow-wrap: anywhere; }
.team-you { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--line); color: var(--ink, inherit) !important; font-size: 12px !important; font-weight: 600; vertical-align: 1px; }
.team-role { display: flex; align-items: center; gap: 8px; }
.team-role select { width: auto; min-width: 140px; }
.team-role-label { color: var(--muted); font-size: var(--t-small, 14px); padding-right: 4px; }
.team-remove { min-width: 64px; text-align: right; }
.team-note { margin: 0 0 16px; max-width: 64ch; }
.team-invite { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.team-invite > div { display: grid; gap: 6px; flex: 1 1 200px; }
.team-invite > div:first-child { flex: 2 1 260px; }
.team-invite label { font-weight: 600; font-size: var(--t-small, 14px); }
.team-sub { margin: 28px 0 4px; font: 700 16px/1.3 var(--font-head); }
.avatar.is-pending { background: var(--line); color: var(--muted); }
.avatar.is-pending .icon { width: 18px; height: 18px; }
.team-links { list-style: none; padding: 0; margin: 16px 0 0; display: flex; gap: 20px; flex-wrap: wrap; }
.team-danger { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.team-danger summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.team-danger[open] summary { margin-bottom: 8px; }
.team-danger p { margin: 0 0 12px; }
@media (max-width: 640px) {
  .team-row { grid-template-columns: 40px minmax(0, 1fr); row-gap: 10px; }
  .team-row > form, .team-row > .team-role-label, .team-row > .team-remove { grid-column: 2; text-align: left; }
  .team-remove:empty { display: none; }
}
.ak-casa-page .team-card { padding: 30px; margin: 0; }
.ak-casa-page .team-row button, .ak-casa-page .team-invite button { white-space: nowrap; width: auto; min-width: 0; padding-inline: 18px; }
.ak-casa-page .team-row .ak-link { padding: 0; background: none; border: 0; color: var(--muted); text-decoration: none; font-weight: 500; }
.ak-casa-page .team-row .ak-link:hover { color: var(--brand); }
.ak-casa-page .team-role select { margin: 0; }
@media (max-width: 640px) {
  .ak-casa-page .team-card { padding: 20px; }
  .team-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .team-row > .team-role { grid-column: 2; }
  .team-row > .team-remove { grid-column: 3; grid-row: 2; align-self: center; text-align: right; min-width: 0; }
  .team-row > .team-role-label { grid-column: 2; }
  .team-role select { min-width: 0; flex: 1; }
}
@media (max-width: 640px) {
  .team-row { grid-template-columns: 40px minmax(0, 1fr); }
  .team-row > .team-role { width: 100%; }
  .team-row > .team-remove { grid-column: 2; grid-row: auto; text-align: left; }
  .team-row > .team-remove:empty { display: none; }
}

/* Invoice page: Record a payment is a button that opens a pop-up; the Send it card's link row keeps the link field wide
   and the Copy button its own width. */
.inv-pay-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.inv-pay-head .card-title { margin: 0; }
html[data-look] .inv-pay-head .inv-record { min-height: 34px; height: 34px; padding: 0 14px; font-size: 13px; gap: 6px; flex: none; }
html[data-look] .inv-pay-head .inv-record svg { width: 16px; height: 16px; }
#payments > .inv-pay-head + .hint { margin-top: 10px; }
#pay-modal .inv-check { margin-top: 18px; font-size: 15px; }
html[data-look] .premium-action .inv-link { flex-wrap: nowrap; margin-top: 10px; }
html[data-look] .premium-action .inv-link .input { flex: 1; min-width: 0; font-size: 14px; }
html[data-look] .premium-action .inv-link .btn { width: auto; flex: none; padding-inline: 20px; }


/* Reports (2026-11-17): two charts side by side, Repairs by trade full width with its bars in two columns, then
   status as one split bar with a legend and the busiest properties as a ranked list. */
html[data-look] .page-main.rep .dash-charts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; margin: 24px 0 20px; }
html[data-look] .page-main.rep .dash-charts .dash-chart { padding: 24px 26px 20px; }
html[data-look] .page-main.rep .dash-charts .dash-chart:last-child { grid-column: 1 / -1; }
html[data-look] .page-main.rep .dash-charts .dash-chart:last-child .dash-hbars { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); column-gap: 48px; row-gap: 14px; margin-top: 16px; }
html[data-look] .page-main.rep .dash-charts .dash-hbars li { grid-template-columns: 110px minmax(0, 1fr) 56px; font-size: 14px; }
.rep-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
html[data-look] .page-main.rep .rep-grid > .card { margin: 0; padding: 24px 26px; border: 1px solid var(--card-line); border-radius: 22px; background: var(--surface); }
html[data-look] .rep-grid .card-title { margin: 0 0 18px; }
/* Status: one bar split by share, then a legend with count and percent. */
.rep-split { display: flex; gap: 3px; height: 14px; border-radius: 999px; overflow: hidden; background: var(--line-soft); }
.rep-seg { flex: 0 0 var(--w); min-width: 4px; }
.rep-s-open { background: var(--brand); }
.rep-s-scheduled { background: var(--ink); }
.rep-s-in_progress { background: color-mix(in srgb, var(--brand) 55%, #fff); }
.rep-s-waiting { background: color-mix(in srgb, var(--ink) 35%, #fff); }
.rep-s-done { background: var(--line); }
.rep-legend { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px 20px; }
.rep-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr); grid-template-areas: 'dot name' '. num' '. pct'; align-items: center; column-gap: 10px; row-gap: 4px; font-size: 14px; color: var(--muted); }
.rep-legend i { grid-area: dot; width: 10px; height: 10px; border-radius: 50%; }
.rep-legend span { grid-area: name; }
.rep-legend b { grid-area: num; margin-top: 4px; font: 800 28px/1 var(--font-head); letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.rep-legend em { grid-area: pct; font-style: normal; font-size: 13px; }
/* Busiest properties: rank, address, a bar for work orders against the busiest one, the count and the cost. */
.rep-rank { list-style: none; margin: 0; padding: 0; }
.rep-rank li { display: grid; grid-template-columns: 28px minmax(0, 1.4fr) minmax(80px, 1fr) 92px 112px; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.rep-rank li:first-child { border-top: 0; padding-top: 4px; }
.rep-rank-n { font: 700 13px/1 'Casa Geist Mono', ui-monospace, monospace; color: var(--muted); }
.rep-rank-name { min-width: 0; color: inherit; text-decoration: none; }
.rep-rank-name b { display: block; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-rank-name span { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-rank-name:hover b { color: var(--brand); }
.rep-rank-bar { height: 6px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.rep-rank-bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--brand); }
.rep-rank-num { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.rep-rank-num b { font: 700 16px/1 'Casa Geist Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.rep-rank-num span { font-size: 12px; color: var(--muted); }
.rep-rank-cost { text-align: right; font: 500 14px/1 'Casa Geist Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 767px) {
  .rep-rank li { grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: 'n name cost' 'n bar num'; row-gap: 8px; column-gap: 12px; }
  .rep-rank-n { grid-area: n; align-self: start; padding-top: 3px; }
  .rep-rank-name { grid-area: name; }
  .rep-rank-cost { grid-area: cost; }
  .rep-rank-bar { grid-area: bar; }
  .rep-rank-num { grid-area: num; justify-content: flex-end; }
  html[data-look] .page-main.rep .rep-grid > .card { padding: 20px; }
  .rep-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Reports picker (2026-11-17): one gap everywhere on the page, the report dropdown and filters above the numbers,
   the daily briefing and Needs attention on Overview, and the shared bar list and table every other report uses. */
html[data-look] .page-main.rep { --rep-gap: 20px; display: flex; flex-direction: column; gap: var(--rep-gap); }
html[data-look] .page-main.rep > * { margin: 0; }
html[data-look] .page-main.rep .premium-report-stats { --stats-gap: var(--rep-gap); margin: 0; }
html[data-look] .page-main.rep .dash-charts { gap: var(--rep-gap); margin: 0; }
html[data-look] .page-main.rep .rep-grid { gap: var(--rep-gap); }
.premium-report-stats small { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); }
.premium-report-stats .is-urgent small { color: #fff; opacity: .85; }
.rep-bar { display: flex; align-items: center; }
.rep-bar label { margin: 0; }
html[data-look] .rep-bar .select { width: auto; min-width: 260px; min-height: 46px; padding: 8px 44px 8px 18px; font-size: 16px; font-weight: 700; border-radius: 999px; background-color: var(--surface); border: 1px solid var(--card-line); }
/* Search row: folded by default (Search, Filters (n), CSV icon); the filters sit inline only when the main column
   has room for all four on one line (about 640px: 1400px+ screens, or 960 to 1099px where the side column drops). */
html[data-look] .page-main.rep .rep-search { margin: 0; }
html[data-look] .page-main.rep .rep-tools { flex-wrap: nowrap; gap: 10px; }
html[data-look] .page-main.rep .rep-tools .search { flex: 1 1 180px; max-width: none; min-width: 0; }
html[data-look] .page-main.rep .rep-tools .rep-filter-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; min-height: 44px; padding: 0 16px; font-size: 14px; flex: none; border: 1px solid var(--field-line); background: var(--field); color: var(--ink); font-weight: 400; border-radius: var(--r-field); box-shadow: none; }
.rep-csv-slot { display: contents; }
html[data-look] .page-main.rep .rep-csv { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 44px; height: 44px; min-height: 44px; padding: 0; flex: none; font-size: 14px; border: 1px solid var(--field-line); background: var(--field); border-radius: var(--r-field); box-shadow: none; }
html[data-look] .page-main.rep .rep-csv svg { width: 18px; height: 18px; }
.rep-csv-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rep-active { font-size: 13px; color: var(--muted); }
html[data-look] .page-main.rep .rep-active { margin-top: calc(-1 * var(--rep-gap) + 8px); }
.rep-active:empty { display: none; }
@media (min-width: 1400px), (min-width: 960px) and (max-width: 1099px) {
  html[data-look] .page-main.rep .rep-tools .rep-filter-btn { display: none; }
  html[data-look] .page-main.rep .rep-filters:not([open]) { display: contents; }
  html[data-look] .page-main.rep .rep-filters:not([open]) :is(.filter-dialog-head, .filter-dialog-foot) { display: none; }
  html[data-look] .page-main.rep .rep-filters:not([open]) .filter-dialog-body { display: contents; }
  html[data-look] .page-main.rep .rep-filters:not([open]) .field { display: block; flex: 0 1 auto; min-width: 0; margin: 0; }
  html[data-look] .page-main.rep .rep-filters:not([open]) .field-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  html[data-look] .page-main.rep .rep-filters:not([open]) .select { width: auto; max-width: 220px; height: 44px; min-height: 44px; padding: 6px 40px 6px 14px; font-size: 14px; text-overflow: ellipsis; background-color: var(--field); border: 1px solid var(--field-line); border-radius: var(--r-field); }
  html[data-look] .page-main.rep .rep-active { display: none; }
}
/* Timeframe pop-up (owner 2026-11-17): the date pill in the title is a button with a calendar and a down arrow; it
   opens a list of timeframes. From and To show only when Custom dates is picked. */
html[data-look] .premium-status.is-action { cursor: pointer; border: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); gap: 8px; padding: 10px 12px 10px 14px; }
html[data-look=modern] .premium-status.is-action { border: 1px solid var(--line); }
.premium-status.is-action svg { width: 15px; height: 15px; flex: none; }
.premium-status.is-action svg:last-child { width: 14px; height: 14px; opacity: .6; transition: transform .15s; }
.premium-status.is-action:hover svg:last-child { transform: translateY(1px); opacity: 1; }
.rep-range-list { display: grid; gap: 2px; }
.rep-range { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: 14px; cursor: pointer; font-size: 16px; font-weight: 500; }
.rep-range input { position: absolute; opacity: 0; pointer-events: none; }
.rep-range span { flex: 1; }
.rep-range svg { width: 18px; height: 18px; color: var(--ink); visibility: hidden; }
.rep-range:hover { background: var(--line-soft); }
.rep-range:has(input:checked) { background: var(--line-soft); font-weight: 700; }
.rep-range:has(input:checked) svg { visibility: visible; }
.rep-custom { display: none; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.rep-dates:has(input[value=custom]:checked) .rep-custom { display: grid; }
.rep-dates .filter-dialog-foot { justify-content: flex-end; }
/* Overview has no search or filters: its row holds only the pop-up, so it takes no room. */
html[data-look] .page-main.rep .rep-search.rep-solo, html[data-look] .page-main.rep .rep-solo .rep-tools { display: contents; }
html[data-look] .page-main.rep .rep-solo ~ .rep-active { display: none; }
@media (min-width: 1700px) {
  html[data-look] .page-main.rep .rep-csv { width: auto; padding: 0 16px; }
  .rep-csv-text { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}
/* Phones: the filters open as a sheet from the bottom. */
@media (max-width: 767px) {
  html[data-look] .page-main.rep :is(.rep-filters, .rep-dates)[open] { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 22px 22px 0 0; }
}
.rep-today { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--rep-gap, 20px); }
html[data-look] .page-main.rep .rep-today > .card { margin: 0; padding: 24px 26px; border: 1px solid var(--card-line); border-radius: 22px; background: var(--surface); }
html[data-look] .rep-today .card-title { margin: 0 0 14px; }
.rep-brief ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rep-brief li { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.45; }
.rep-brief li::before { content: ''; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.rep-attn ul { list-style: none; margin: 0; padding: 0; }
.rep-attn li + li { border-top: 1px solid var(--line-soft); }
.rep-attn a { display: grid; grid-template-columns: 48px minmax(0, 1fr) 16px; align-items: center; gap: 14px; padding: 10px 0; color: inherit; text-decoration: none; }
.rep-attn li:first-child a { padding-top: 0; }
.rep-attn a b { font: 800 26px/1 var(--font-head); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rep-attn a.is-urgent b { color: var(--critical, #E5484D); }
.rep-attn strong { display: block; font-size: 15px; font-weight: 600; }
.rep-attn small { display: block; font-size: 13px; color: var(--muted); }
.rep-attn .icon { width: 16px; height: 16px; color: var(--muted); }
.rep-attn a:hover strong { color: var(--brand); }
.rep-bars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); column-gap: 48px; row-gap: 14px; }
.rep-bars li { display: grid; grid-template-columns: minmax(0, 140px) minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 14px; }
.rep-bars-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-bars-track { display: block; height: 6px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.rep-bars-track i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--brand); }
.rep-bars-val { font: 500 14px/1 'Casa Geist Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; min-width: 56px; }
.rep-table-wrap { overflow-x: auto; margin: -4px 0 0; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rep-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 12px 12px 0; white-space: nowrap; border-bottom: 1px solid var(--line); }
.rep-table td { padding: 13px 12px 13px 0; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.rep-table tr:last-child td { border-bottom: 0; }
.rep-table th.is-num { font-family: inherit; }
.rep-table .is-num { text-align: right; font-family: 'Casa Geist Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rep-table th:last-child, .rep-table td:last-child { padding-right: 0; }
.rep-table a { color: inherit; font-weight: 600; text-decoration: none; }
.rep-table a:hover { color: var(--brand); }
.rep-empty { margin: 0; color: var(--muted); font-size: 15px; }
.rep-note { margin: 16px 0 0; }
@media (max-width: 900px) {
  .rep-today { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  html[data-look] .page-main.rep { --rep-gap: 16px; }
  html[data-look] .page-main.rep .rep-today > .card { padding: 20px; }
  html[data-look] .rep-bar label, html[data-look] .rep-bar .select { flex: 1 1 100%; width: 100%; min-width: 0; }
  .rep-table { font-size: 13px; }
  .rep-table td { white-space: nowrap; }
}
/* Stat values shrink to fit their tile: --len is the longest value's character count in the row (one size for all),
   and the tile's width comes from the row's container width, --cols, --stats-gap and --tile-pad. */
html[data-look] .page-main.rep .premium-report-stats b.rep-fit { font-size: min(clamp(1.875rem, 1.2rem + 1.5vw, 2.875rem), max(1rem, calc(1.65 * ((100cqi - (var(--cols) - 1) * var(--stats-gap)) / var(--cols) - 2 * var(--tile-pad)) / var(--len)))); line-height: 1.05; white-space: normal; overflow-wrap: normal; }
.rep-body { display: flex; flex-direction: column; gap: var(--rep-gap, 20px); }
/* 1100 to 1399px: the side column leaves the main column narrow, so the four tiles sit two by two. */
@media (min-width: 1100px) and (max-width: 1399px) {
  html[data-look] .page-main.rep .premium-report-stats { --cols: 2; }
}

/* ---------- Settings (owner 2026-11-17): side menu + one section at a time, like Studio's settings. ---------- */
.set-page { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
.set-nav { position: sticky; top: 24px; display: grid; gap: 22px; }
.set-nav-group { display: grid; gap: 2px; }
.set-nav-label { margin: 0 0 6px 14px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.set-nav-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: 14px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.set-nav-link svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.set-nav-link:hover { background: var(--line-soft); }
.set-nav-link.is-on { background: var(--surface); font-weight: 700; box-shadow: 0 1px 2px rgba(11, 11, 15, .06), 0 4px 12px rgba(11, 11, 15, .05); }
.set-nav-link.is-on svg { color: var(--brand); }
html[data-look=modern] .set-nav-link.is-on { box-shadow: none; border: 1px solid var(--line); }
html[data-theme=dark] .set-nav-link.is-on { box-shadow: none; }
.set-panels { min-width: 0; }
.set-panel { display: grid; gap: 20px; }
.set-panel[hidden] { display: none; }
.set-panel-head { padding: 26px 0 22px; border-bottom: 1px solid var(--line-soft); }
.set-panel-head + .set-row, .set-panel-head + form > .set-row:first-of-type { border-top: 0; }
.set-panel-head h2 { margin: 0 0 6px; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.set-panel-head p { margin: 0; max-width: 62ch; color: var(--muted); font-size: 15px; }
.set-card { background: var(--surface); border: 1px solid var(--card-line); border-radius: 22px; padding: 4px 26px; }
.set-form { display: block; }
.set-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 340px); gap: 12px 32px; align-items: center; padding: 20px 0; border-top: 1px solid var(--line-soft); }
.set-card > .set-row:first-child, .set-form > .set-row:first-of-type, .set-card > form.set-row:first-child { border-top: 0; }
.set-row-text { min-width: 0; }
.set-row-text :is(label, b) { display: block; font-size: 16px; font-weight: 700; color: var(--ink); }
.set-row-text p { margin: 4px 0 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.set-row-control { min-width: 0; }
.set-row-control :is(.input, .select, .textarea) { width: 100%; }
.set-row-stack { grid-template-columns: minmax(0, 1fr); }
.set-row-switch { display: flex; justify-content: flex-end; }
.set-unit { display: flex; align-items: center; gap: 10px; }
.set-unit .input { max-width: 120px; }
.set-unit span { color: var(--muted); font-weight: 600; }
.set-foot { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 18px 0 22px; border-top: 1px solid var(--line-soft); }
.set-lock { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 0 18px; font-size: 14px; color: var(--muted); }
.set-foot .set-lock { padding: 0; margin-right: auto; }
.set-lock svg { width: 16px; height: 16px; }
.set-note { margin: 0; padding: 0 0 18px; font-size: 14px; color: var(--muted); }
/* Rows that open another page: the whole row is the link. */
.set-link { grid-template-columns: minmax(0, 1fr) auto auto; color: inherit; text-decoration: none; }
.set-link > svg { width: 18px; height: 18px; color: var(--muted); transition: transform .15s; }
.set-link:hover > svg { transform: translateX(3px); color: var(--ink); }
.set-pill { padding: 6px 12px; border-radius: 99px; background: var(--line-soft); font-size: 13px; font-weight: 700; }
.set-pill.is-on { background: #1A7F37; color: #fff; }
/* Switch: a real checkbox drawn as a pill; saves the moment it flips. */
.set-switch { appearance: none; -webkit-appearance: none; position: relative; width: 52px; height: 32px; margin: 0; border-radius: 99px; background: var(--line); cursor: pointer; transition: background .2s; flex: none; outline: none; }
.set-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.set-switch:checked { background: var(--brand); }
.set-switch:checked::after { transform: translateX(20px); }
.set-switch:disabled { opacity: .5; cursor: not-allowed; }
/* Categories editor */
/* Work order categories as chips: grip, name (click to rename), how many work orders use it, remove. */
@media (prefers-reduced-motion: reduce) { .set-switch, .set-switch::after, .set-link > svg { transition: none; } }
/* Under 960px the menu turns into a row of tabs that scrolls sideways. */
@media (max-width: 959px) {
  .set-page { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .set-nav { position: static; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; }
  .set-nav::-webkit-scrollbar { display: none; }
  .set-nav-group { display: contents; }
  .set-nav-label { display: none; }
  .set-nav-link { flex: none; min-height: 44px; border-radius: 99px; padding: 0 16px; white-space: nowrap; }
}
@media (max-width: 767px) {
  .set-card { padding: 2px 18px; border-radius: 20px; }
  .set-row { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 18px 0; }
  .set-row.set-link { grid-template-columns: minmax(0, 1fr) auto auto; }
  form.set-row:has(.set-row-switch), .set-card > .set-row:has(.set-row-switch) { grid-template-columns: minmax(0, 1fr) auto; }
  .set-foot .btn { width: 100%; }
}
.set-row-control .textarea.set-short { min-height: 0; height: auto; resize: vertical; }
/* Settings > Brand (owner 2026-11-17): logo tiles, color swatches and a small live preview. */
.brand-wrap { display: grid; gap: 20px; }
.brand-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.brand-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.brand-swatch { width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 0; background: var(--sw); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.brand-swatch.is-on { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--sw); }
.brand-swatch:disabled { cursor: not-allowed; opacity: .5; }
.brand-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.brand-pv-band, .brand-pv-sheet { display: grid; gap: 14px; align-content: start; justify-items: start; min-height: 150px; padding: 20px; border-radius: 16px; }
.brand-pv-band { background: #0B0B0F; color: #fff; }
.brand-pv-sheet { background: #fff; color: #111114; border: 1px solid var(--line); }
.brand-pv-logo { max-width: 160px; max-height: 40px; object-fit: contain; }
.brand-pv-name { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; }
.brand-pv-name img { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; }
.brand-pv-lines { display: grid; gap: 6px; width: 100%; }
.brand-pv-lines i { display: block; height: 8px; border-radius: 4px; background: #E6E6EB; }
.brand-pv-lines i:nth-child(2) { width: 70%; }
.brand-pv-lines i:nth-child(3) { width: 45%; }
.brand-pv-btn { margin-top: auto; padding: 10px 16px; border-radius: 99px; background: var(--bp); color: var(--bp-ink); font-size: 14px; font-weight: 700; }
@media (max-width: 767px) {
  .brand-preview { grid-template-columns: minmax(0, 1fr); }
}
/* Brand tiles, same layout as Studio's Branding > Workspace identity: one shared stage height so a square icon,
   a wide logo and a flat color carry equal weight. Nothing uploaded = the real fallback, not an empty box. */
.bi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 22px 0 26px; }
.bi-tile { display: flex; flex-direction: column; min-width: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.bi-stage { position: relative; height: 150px; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(180deg, var(--line-soft) 0%, var(--page) 100%); border-bottom: 1px solid var(--line); }
.bi-mark { width: 76px; height: 76px; border-radius: 18px; overflow: hidden; display: grid; place-items: center; background: var(--bp); color: var(--bp-ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 10px 20px -8px rgba(16, 24, 40, .22); }
.bi-mark img { width: 100%; height: 100%; object-fit: cover; background: var(--surface); }
.bi-initial { font-size: 34px; font-weight: 800; line-height: 1; }
.bi-lockup { width: 100%; height: 80px; display: flex; align-items: center; justify-content: center; }
.bi-lockup img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bi-lockup-fb { display: flex; align-items: center; gap: 10px; max-width: 100%; }
.bi-fb-mark { width: 38px; height: 38px; flex: none; display: inline-grid; place-items: center; border-radius: 9px; overflow: hidden; object-fit: cover; background: var(--bp); color: var(--bp-ink); font-size: 17px; font-weight: 800; }
.bi-fb-name { font-size: 19px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bi-tag { position: absolute; right: 12px; bottom: 10px; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--muted); background: var(--surface); border: 1px solid var(--line); pointer-events: none; }
.bi-tag-on { color: var(--bp-ink); background: rgba(0, 0, 0, .2); border-color: transparent; }
.bi-tag-plain { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .7); }
/* Light/Dark flip: the dark stage previews a public dark header, so it stays dark in either app theme. */
.bi-flip { position: absolute; top: 10px; right: 12px; z-index: 2; display: inline-flex; gap: 2px; padding: 2px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); }
.bi-flip-btn { border: 0; background: none; font: inherit; font-size: 11px; font-weight: 600; line-height: 1; padding: 5px 10px; border-radius: 99px; cursor: pointer; color: var(--muted); }
.bi-flip-btn.is-on { background: var(--ink); color: var(--surface); }
.bi-on-dark { display: none; }
.bi-stage.is-dark { background: #0B0B0F; border-bottom-color: #0B0B0F; }
.bi-stage.is-dark .bi-on-light { display: none; }
.bi-stage.is-dark .bi-on-dark { display: flex; }
.bi-stage-color { background: var(--bp); border-bottom-color: rgba(0, 0, 0, .08); }
.bi-color-input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; margin: 0; border: 0; opacity: 0; cursor: pointer; }
.bi-color-input:disabled { cursor: not-allowed; }
.bi-body { flex: 1; padding: 16px 18px 0; }
.bi-label { display: block; margin-bottom: 4px; font-size: 15px; font-weight: 700; color: var(--ink); }
.bi-hint { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.bi-hint span { opacity: .8; }
.bi-darkopt { margin: 12px 0 0; }
.bi-darkopt-label { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.bi-darkopt .select { width: 100%; }
.bi-body .brand-swatches { gap: 8px; margin-top: 12px; }
.bi-body .brand-swatch { width: 26px; height: 26px; }
.bi-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 18px 16px; }
.bi-actions form { margin: 0; }
.bi-actions label.btn { cursor: pointer; }
.bi-actions .btn-sm { min-height: 38px; padding: 8px 16px; font-size: 14px; }
.bi-hex { flex: 1 1 96px; min-width: 96px; min-height: 38px; padding: 8px 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; text-transform: uppercase; }
.bi-lock { padding-bottom: 4px; }
.brand-pv-band .brand-pv-lines i { background: rgba(255, 255, 255, .16); }
@media (max-width: 1180px) { .bi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .bi-grid { grid-template-columns: minmax(0, 1fr); } }
/* Settings > Invoices: fields beside a live preview invoice. */
.inv-set { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 0 36px; align-items: start; }
.inv-set > .set-foot { grid-column: 1 / -1; }
.inv-set-fields > .set-row:first-child { border-top: 0; }
.inv-due { display: grid; gap: 12px; margin-top: 12px; }
.inv-due-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.inv-pick { min-height: 40px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.inv-pick:hover { border-color: var(--muted); }
.inv-pick.is-on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.inv-affix { position: relative; display: inline-flex; align-items: center; width: 160px; margin-top: 0; }
.inv-affix-sm { width: 120px; margin-top: 12px; }
.inv-affix .input { width: 100%; padding-right: 52px; font-variant-numeric: tabular-nums; }
.inv-affix span { position: absolute; right: 16px; color: var(--muted); font-weight: 600; pointer-events: none; }
.set-row-stack .textarea { margin-top: 12px; }
.inv-pv { position: sticky; top: 24px; margin: 22px 0; padding: 18px; border-radius: 20px; background: var(--line-soft); }
.inv-pv-tag { margin: 0 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.inv-pv-sheet { display: grid; gap: 18px; padding: 22px; border-radius: 14px; background: #fff; color: #111114; box-shadow: 0 1px 2px rgba(11, 11, 15, .06), 0 12px 28px -12px rgba(11, 11, 15, .22); font-size: 13px; }
.inv-pv-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.inv-pv-logo { max-width: 140px; max-height: 34px; object-fit: contain; }
.inv-pv-co { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.inv-pv-num { color: #6B6B73; font-weight: 600; white-space: nowrap; }
.inv-pv-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.inv-pv-dates dt { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #6B6B73; }
.inv-pv-dates dd { margin: 2px 0 0; font-weight: 700; }
.inv-pv-lines { display: grid; border-top: 1px solid #E6E6EB; }
.inv-pv-lines div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #E6E6EB; font-variant-numeric: tabular-nums; }
.inv-pv-tax { color: #6B6B73; }
.inv-pv-total { font-size: 15px; font-weight: 800; border-bottom: 0 !important; }
.inv-pv-pay { padding: 12px 14px; border-radius: 10px; background: #F4F4F6; }
.inv-pv-pay b { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: #6B6B73; }
.inv-pv-pay p { margin: 4px 0 0; white-space: pre-line; line-height: 1.5; overflow-wrap: anywhere; }
.inv-pv-pay p.is-empty { color: #9A9AA3; }
@media (max-width: 1100px) { .inv-set { grid-template-columns: minmax(0, 1fr); } .inv-pv { position: static; margin-top: 0; } }
/* Settings > Card payments: status banner, then one card per processor (like Studio's payment settings). */
.pay-status { display: flex; align-items: center; gap: 14px; margin: 22px 0 0; padding: 16px 18px; border-radius: 16px; background: var(--line-soft); }
.pay-status-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #9A9AA3; box-shadow: 0 0 0 4px rgba(154, 154, 163, .2); }
.pay-status.is-on .pay-status-dot { background: #1A7F37; box-shadow: 0 0 0 4px rgba(26, 127, 55, .18); }
.pay-status.is-on { background: rgba(26, 127, 55, .09); box-shadow: inset 0 0 0 1px rgba(26, 127, 55, .22); }
.pay-status.is-on .pay-status-text b { color: #1A7F37; }
html[data-theme="dark"] .pay-status.is-on .pay-status-text b { color: #4CC26E; }
.pay-status-text { flex: 1; min-width: 0; }
.pay-status-text b { display: block; font-size: 16px; }
.pay-status-text p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.pay-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 18px 0 8px; }
.pay-opt { display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.pay-opt.is-using { border-color: #1A7F37; box-shadow: 0 0 0 1px #1A7F37 inset; }
.pay-opt-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.pay-opt-head b { flex: 1; font-size: 16px; }
.pay-opt-mark { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #fff; font-weight: 800; font-size: 17px; }
.pay-mark-stripe { background: #635BFF; }
.pay-mark-square { background: #111114; }
.pay-mark-quickbooks { background: #2CA01C; }
.pay-mark-authorize_net { background: #1C4C8C; }
.pay-opt-state { flex: none; padding: 4px 10px; border-radius: 99px; background: var(--line-soft); color: var(--muted); font-size: 12px; font-weight: 700; }
.pay-opt-state.is-ok { background: #1A7F37; color: #fff; }
.pay-opt-state.is-warn { background: #F5C451; color: #111114; }
.pay-opt-about { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink); }
.pay-opt-meta { margin: 0; font-size: 13px; color: var(--muted); }
.pay-opt-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: auto; padding-top: 10px; }
.pay-opt-foot .btn-sm, .pay-status .btn-sm { min-height: 38px; padding: 8px 16px; font-size: 14px; }
.pay-opt-link { font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; }
.pay-opt-link:hover { text-decoration: underline; }
.pay-note { margin: 0; padding: 4px 0 22px; font-size: 13px; color: var(--muted); }
@media (max-width: 860px) { .pay-grid { grid-template-columns: minmax(0, 1fr); } }
/* One Settings (owner 2026-11-17): the profile, sign-in, notifications, billing, data and help pages sit in the same
   Settings menu and their cards match the Settings cards, so every Settings screen lines up. */
.set-kit.ak, .set-kit .ak-content { padding: 0; margin: 0; max-width: none; width: auto; display: block; }
.set-page .set-kit .ak-card, .set-page .casa-settings .form-card { border: 1px solid var(--card-line); border-radius: 22px; padding: 26px; margin: 0 0 20px; background: var(--surface); box-shadow: none; }
.set-page .casa-settings { display: block; }
.set-page .ak.set-kit { background: transparent; }
.set-page .casa-settings .set-kit .ak-actions button:not(.ak-secondary) { background: var(--skin-ink); color: var(--skin-paper); }
.set-page .casa-settings .form { max-width: none; }

/* Settings > Work orders categories: an Add field on top, then a plain list with Edit and Delete (owner 2026-11-17). */
.cat-add { display: flex; gap: 10px; margin: 16px 0 0; max-width: 560px; }
.cat-add .input { flex: 1 1 auto; min-width: 0; }
.cat-add .btn svg { width: 16px; height: 16px; margin-right: 6px; }
.cat-error { margin: 8px 0 0; }
.cat-list { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line-soft); }
.cat-row { border-bottom: 1px solid var(--line-soft); }
.cat-view { display: grid; grid-template-columns: minmax(140px, 280px) minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: 58px; padding: 8px 0; }
.cat-editform { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 8px 0; }
.cat-view[hidden], .cat-editform[hidden] { display: none; }
.cat-label { font-weight: 600; font-size: 16px; min-width: 0; overflow-wrap: anywhere; }
.cat-count { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.cat-actions { display: flex; gap: 8px; flex: none; }
.cat-actions form { margin: 0; }
.cat-del { color: #E5484D; }
/* Same rounded-corner row buttons as the other lists (not pills). */
html[data-look] .cat-row .btn-sm, .cat-row .btn-sm { height: 34px; min-height: 34px; padding: 0 14px; font-size: 13px; font-weight: 600; border-radius: var(--r-field); border: 1px solid var(--field-line, var(--line)); box-shadow: none; }
html[data-look] .cat-row .btn-dark.btn-sm { border-color: var(--inverse); }
.cat-editform .input { flex: 1 1 auto; max-width: 420px; min-width: 0; }
@media (max-width: 560px) { .cat-view { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; } .cat-count { grid-row: 2; } .cat-actions { grid-row: 1 / span 2; grid-column: 2; } }

/* Card payments setup inside Settings (owner 2026-11-17): one card, the processor tiles inside it, and the numbered
   steps with room for their number (the kit skin's list padding was putting the number over the words). */
.set-crumb-title .head-section { color: var(--brand); text-decoration: none; }
.set-crumb-title .head-slash { color: var(--line); font-weight: 400; }
.pay-setup .pay-tiles { margin: 24px 0 8px; gap: 12px; }
.pay-setup .pay-tile { border-radius: var(--r-field, 14px); padding: 16px 18px; }
.pay-setup .pay-panel, .pay-setup .pay-good { padding: 22px 0 26px; border-top: 1px solid var(--line-soft); }
.pay-setup .pay-panel { border-top: 0; }
.pay-setup .pay-good h3 { font-size: 18px; margin: 0 0 10px; }
.casa-settings.casa-settings .pay-setup .pay-steps { padding-left: 0; margin: 20px 0 0; }
.casa-settings.casa-settings .pay-setup .pay-steps li { padding: 4px 0 20px 44px; border-bottom: 0; }
.casa-settings.casa-settings .pay-setup .pay-steps li::before { top: 2px; }
@media (max-width: 760px) { .pay-setup .pay-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Connect (owner 2026-11-17): no box, just the Connect button on the left. "Not connected" is already on the processor
   tile, so it only shows here once there is something to say (connected, almost ready, sign in again). */
.casa-settings.casa-settings .pay-setup .pay-connect { background: none; padding: 0; border: 0; border-radius: 0; margin: 4px 0 0; }
.pay-setup .pay-connect .ak-team-payment { background: none; border: 0; padding: 0; margin: 0; box-shadow: none; }
.pay-setup .pay-connect.is-off .ak-tp-status { display: none; }
.pay-setup .pay-connect .ak-tp-status { margin: 0 0 12px; }
.casa-settings.casa-settings .pay-setup .pay-connect .ak-actions { justify-content: flex-start; margin: 0; }

/* Card payments: connected status card (owner 2026-11-17 "make this premium"). Casa draws the status; the kit panel only gives the buttons. */
.casa-settings.casa-settings .pay-setup .pay-connect.is-on { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.casa-settings.casa-settings .pay-setup .pay-connect.is-ready { background: rgba(26, 127, 55, .09); border-color: rgba(26, 127, 55, .22); }
.pay-state { flex: 1 1 320px; min-width: 0; }
.pay-state p { margin: 0; }
.pay-state-label { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pay-state-label::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #1A7F37; box-shadow: 0 0 0 4px rgba(26, 127, 55, .14); }
.pay-connect.is-pending .pay-state-label::before { background: #D99A00; box-shadow: 0 0 0 4px rgba(217, 154, 0, .16); }
.pay-connect.is-broken .pay-state-label::before { background: #E5484D; box-shadow: 0 0 0 4px rgba(229, 72, 77, .14); }
.pay-state-name { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px !important; font-size: 24px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); overflow-wrap: anywhere; }
.pay-state-tag { font-size: 12px; font-weight: 600; letter-spacing: 0; padding: 4px 8px; border-radius: var(--r-field); background: var(--line-soft); color: var(--ink); }
.pay-state-note { margin-top: 6px !important; font-size: 14px; line-height: 1.5; color: var(--muted); }
.pay-setup .pay-connect.is-on .ak-team-payment { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pay-setup .pay-connect.is-on .ak-team-payment > p.ak-tp-status, .pay-setup .pay-connect.is-on .ak-team-payment > p.ak-tp-status + p.muted { display: none; }
.pay-setup .pay-connect.is-on .ak-team-payment > p { flex-basis: 100%; margin: 0; }
.casa-settings.casa-settings .pay-setup .pay-connect.is-on .ak-actions { margin: 0; gap: 10px; }
.pay-setup .pay-connect.is-on .ak-actions .button, .pay-setup .pay-connect.is-on .ak-actions button { height: 40px; min-height: 40px; padding: 0 16px; font-size: 14px; font-weight: 600; border-radius: var(--r-field); box-shadow: none; white-space: nowrap; }
.pay-setup .pay-connect.is-on form[action$="/disconnect"] button { color: #E5484D; }
@media (max-width: 640px) { .casa-settings.casa-settings .pay-setup .pay-connect.is-on { padding: 18px; } .pay-state-name { font-size: 20px; } }

/* Settings "You" pages share one look with the company pages (owner 2026-11-17 "they aren't consistent").
   Every section is the same white card; no gray, black or outlined odd ones out. */
html[data-look] .set-page .ak.casa-kit.set-kit :is(.ak-danger-card, .ak-signout-card, .casa-primary-card) { background: var(--surface); border: 1px solid var(--card-line); color: var(--ink); }
html[data-look] .set-page .ak.casa-kit.set-kit .casa-primary-card h2 { color: var(--ink); }
html[data-look] .set-page .ak.casa-kit.set-kit .casa-primary-card p { color: var(--muted); }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-danger-card .casa-setting-fields > p { margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.6; }
/* Buttons: dark for the main action, white outline for the rest, red outline for anything that removes */
html[data-look] .set-page .ak.casa-kit.set-kit .casa-primary-card .button { background: var(--skin-ink) !important; color: var(--skin-paper) !important; border-color: var(--skin-ink) !important; }
html[data-look] .set-page .ak.casa-kit.set-kit :is(button.ak-secondary, .button.ak-secondary) { background: var(--surface) !important; color: var(--ink) !important; border: 1px solid var(--line) !important; }
html[data-look] .set-page .ak.casa-kit.set-kit :is(button.danger, button.ak-danger-outline) { background: var(--surface) !important; color: #E5484D !important; border: 1px solid rgba(229, 72, 77, .45) !important; }
/* Search and sort sit in the card, not in a gray box */
html[data-look] .set-page .ak.casa-kit.set-kit .ak-filters { background: none; padding: 0; margin: 20px 0 0; border-radius: 0; }
html[data-look] .set-page .ak.casa-kit.set-kit [data-ak-list] > form:not(.ak-filters) { display: flex; align-items: flex-end; gap: 10px; margin: 12px 0 0; }
html[data-look] .set-page .ak.casa-kit.set-kit [data-ak-list] > form:not(.ak-filters) label { flex: 1 1 auto; margin: 0; }
html[data-look] .set-page .ak.casa-kit.set-kit [data-ak-result-count] { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-empty { text-align: left; padding: 8px 0 0; margin: 0; background: none; border: 0; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-empty h2 { margin: 0 0 12px; font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
/* Help: the attachment list's remove button stays a small round x, not a full button */
html[data-look] .set-page .ak.casa-kit.set-kit .ak-drop-files .ak-drop-remove { width: 28px !important; height: 28px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 50% !important; background: var(--line-soft, #F1F1F4) !important; color: var(--ink) !important; font-size: 18px !important; box-shadow: none !important; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-drop-zone { font-weight: 400; margin: 0; }
/* Danger zone: both sign-out buttons on one line */
html[data-look] .set-page .ak.casa-kit.set-kit .ak-signout-card .casa-setting-fields { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-signout-card .casa-setting-fields > form { margin: 0; padding: 0; border: 0; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-signout-card .ak-actions { margin: 0; padding: 0; border: 0; }
/* Same rounded button everywhere on these pages, the profile photo ones too */
html[data-look] .set-page .ak.casa-kit.set-kit :is(button, .button):not(.ak-link) { min-height: 44px; padding: 10px 20px; border-radius: 999px; font-size: 13px; font-weight: 600; box-shadow: none; }

/* Profile photo: photo, then one row of buttons with the note under it */
html[data-look] .set-page .ak.casa-kit.set-kit .ak-photo-row { display: flex; align-items: center; gap: 22px; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-photo-row .photo { width: 76px; height: 76px; flex: none; border-radius: 50%; object-fit: cover; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-photo-controls > form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-photo-controls .ak-file-button { order: 1; margin: 0; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-photo-controls .ak-actions { order: 2; display: flex; justify-content: flex-start; flex-wrap: nowrap; gap: 10px; margin: 0; padding: 0; border: 0; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-photo-controls form:not(:has(#photo:valid)) .ak-actions > button:not([name="remove"]) { display: none; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-photo-controls .ak-actions > button[name="remove"] { background: transparent !important; border-color: transparent !important; box-shadow: none !important; color: #E5484D !important; padding: 0 10px !important; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-photo-controls #photo-selection { order: 3; flex-basis: 100%; margin: 4px 0 0; font-size: 13px; color: var(--muted, #6B6B73); }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-photo-controls button { height: 40px !important; padding: 0 18px !important; font-size: 13px !important; }
@media (max-width: 700px) {
  html[data-look] .set-page .ak.casa-kit.set-kit .ak-photo-row { flex-wrap: nowrap; align-items: flex-start; gap: 16px; }
  html[data-look] .set-page .ak.casa-kit.set-kit .ak-photo-row .photo { width: 60px; height: 60px; }
  html[data-look] .set-page .ak.casa-kit.set-kit .ak-photo-controls { flex: 1 1 auto; flex-basis: auto; }
  html[data-look] .set-page .ak.casa-kit.set-kit .ak-photo-controls .ak-actions { justify-content: flex-start !important; width: auto; }
  html[data-look] .set-page .ak.casa-kit.set-kit .ak-photo-controls .ak-actions > button[name="remove"] { padding: 0 !important; }
  html[data-look] .set-page .ak.casa-kit.set-kit .ak-photo-controls #photo-selection { text-align: left; }
}

.casa-settings .casa-setting-description .profile-email { margin-top: 12px; }
.casa-settings .casa-setting-description .profile-email strong { color: var(--ink, #111114); font-weight: 600; word-break: break-all; }
.casa-settings .casa-setting-description .profile-email a { color: inherit; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

/* Passkeys: a quiet empty line, then name + button on one row */
html[data-look] .set-page .ak.casa-kit.set-kit #passkeys > .ak-list:has(> li:only-child:not(:has(*))) { margin: 18px 0 0; padding: 0; border: 0; }
html[data-look] .set-page .ak.casa-kit.set-kit #passkeys > .ak-list > li:only-child:not(:has(*)) { padding: 0; border: 0; font-size: 14px; color: var(--muted, #6B6B73); }
html[data-look] .set-page .ak.casa-kit.set-kit #passkeys [data-ak-passkey-add]:not([hidden]) { display: grid; grid-template-columns: minmax(0,1fr) auto; column-gap: 10px; align-items: center; margin-top: 20px; }
html[data-look] .set-page .ak.casa-kit.set-kit #passkeys [data-ak-passkey-add] > label { grid-column: 1 / -1; }
html[data-look] .set-page .ak.casa-kit.set-kit #passkeys [data-ak-passkey-add] > .ak-actions { margin: 0; padding: 0; border: 0; }
html[data-look] .set-page .ak.casa-kit.set-kit #passkeys [data-ak-passkey-add] > .ak-error { grid-column: 1 / -1; }
@media (max-width: 700px) { html[data-look] .set-page .ak.casa-kit.set-kit #passkeys [data-ak-passkey-add]:not([hidden]) { grid-template-columns: minmax(0,1fr); row-gap: 12px; } }

/* Choose a plan: compact month/year switch; Appearance cards */
html[data-look] .set-page .ak.casa-kit.set-kit .ak-choose-plan .ak-card-heading { align-items: flex-start; margin-bottom: 20px; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-theme-card { border-radius: 16px; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-theme-card small { font-weight: 400; }

/* Choose a plan as horizontal rows: name + trial | price | button, promo link underneath */
html[data-look] .set-page .ak.casa-kit.set-kit .ak-choose-plan .ak-plans { display: flex !important; flex-direction: column; gap: 12px; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-choose-plan .ak-plan { display: grid; grid-template-columns: minmax(0,1fr) auto auto; grid-template-areas: "name price act" "note price act" "promo price act"; column-gap: 32px; align-items: center; padding: 22px 24px; background: var(--surface, #fff); border: 1px solid var(--line, #E6E6EB); border-radius: 18px; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-choose-plan .ak-plan h3 { grid-area: name; margin: 0; font-size: 20px; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-choose-plan .ak-plan .ak-plan-note { grid-area: note; margin: 6px 0 0; font-size: 14px; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-choose-plan .ak-plan .ak-price { grid-area: price; margin: 0; font-size: 34px; line-height: 1; text-align: right; white-space: nowrap; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-choose-plan .ak-plan .ak-price span { display: block; margin-top: 6px; font-size: 13px; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-choose-plan .ak-plan .ak-actions { grid-area: act; margin: 0 !important; padding: 0 !important; border: 0; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-choose-plan .ak-plan .ak-actions button { min-width: 140px; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-choose-plan .ak-plan .ak-promo { grid-area: promo; margin: 10px 0 0; padding: 0; border: 0; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-choose-plan .ak-plan .ak-promo summary { font-size: 13px; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-choose-plan .ak-plan .ak-promo[open] input { max-width: 320px; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-choose-plan .ak-plan:hover { border-color: color-mix(in srgb, var(--ink, #111114) 30%, transparent); }
/* Month/year switch: two equal halves in a soft track, the picked one a white pill; the saving is green text, not a second pill */
html[data-look] .set-page .ak.casa-kit.set-kit .ak-interval { box-sizing: border-box; display: grid !important; grid-template-columns: 1fr 1fr; align-items: center; align-self: center; gap: 0; width: 248px; height: 44px !important; min-height: 0 !important; padding: 4px !important; margin: 0 !important; border: 0 !important; border-radius: 999px; background: var(--soft, #F1F1F4) !important; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-interval label { box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; margin: 0; padding: 0 12px !important; border-radius: 999px; font-size: 14px; font-weight: 600; line-height: 1; letter-spacing: 0; color: var(--muted, #6B6B73); background: transparent; box-shadow: none; transition: background .15s, color .15s; }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-interval input:checked + label { background: var(--surface, #fff) !important; color: var(--ink, #111114); box-shadow: 0 1px 2px rgba(11,11,15,.08), 0 0 0 1px var(--line, #E6E6EB); }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-interval label span { padding: 0; background: none; font-size: 12px; font-weight: 700; color: #1A7F37; }
@media (prefers-reduced-motion: reduce) { html[data-look] .set-page .ak.casa-kit.set-kit .ak-interval label { transition: none; } }
html[data-look] .set-page .ak.casa-kit.set-kit .ak-interval input { width: 0 !important; height: 0 !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; }
@media (max-width: 700px) {
  html[data-look] .set-page .ak.casa-kit.set-kit .ak-choose-plan .ak-plan { grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "name price" "note price" "promo promo" "act act"; column-gap: 16px; padding: 20px; }
  html[data-look] .set-page .ak.casa-kit.set-kit .ak-choose-plan .ak-plan .ak-price { font-size: 28px; }
  html[data-look] .set-page .ak.casa-kit.set-kit .ak-choose-plan .ak-plan .ak-actions { margin-top: 16px !important; }
  html[data-look] .set-page .ak.casa-kit.set-kit .ak-choose-plan .ak-plan .ak-actions button { width: 100%; }
}

/* Customer pages in the company's brand color: button text stays readable on light colors. */
.pub .btn-primary { color: var(--brand-ink, #fff); }
.pub-brand .pub-logo { width: auto; height: auto; max-width: 200px; max-height: 44px; border-radius: 0; object-fit: contain; }
.pub[style*="--brand-ink"] .pub-hero .pub-kicker:not(.is-ok) { color: color-mix(in srgb, var(--brand) 55%, #fff); }
/* Reports on paper (owner 2026-11-17): Print gives just the report under the company's logo, for sending to owners. */
.rep-print-head { display: none; }
@media print {
  @page { margin: 14mm; }
  html, body { background: #fff !important; }
  body:has(.rep-print-head) :is(.skip, .rail, .mbar, .menu-sheet, .top, .side, .page-side, .toast, .page-head, .rep-bar, .rep-search, .rep-active, dialog) { display: none !important; }
  body:has(.rep-print-head) :is(.shell, .main, .page-split, .page-main) { display: block !important; width: auto !important; max-width: none !important; margin: 0 !important; padding: 0 !important; box-shadow: none !important; border: 0 !important; background: none !important; }
  /* The feedback button, help guide and anything else floating on the page stay off paper. */
  body:has(.rep-print-head) > :not(.shell, svg) { display: none !important; }
  .rep-print-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 0 0 16px; margin: 0 0 20px; border-bottom: 2px solid #111114; color: #111114; }
  .rep-print-brand { display: flex; align-items: center; gap: 10px; font-size: 20px; }
  .rep-print-brand img { max-width: 220px; max-height: 56px; object-fit: contain; }
  .rep-print-brand .rep-print-icon { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
  .rep-print-meta { display: grid; gap: 2px; text-align: right; font-size: 12px; color: #6B6B73; }
  .rep-print-meta b { font-size: 18px; color: #111114; }
  .rep-body { break-inside: auto; }
  .rep-body :is(tr, .premium-report-stats > *) { break-inside: avoid; }
}
/* Reports Export menu (owner 2026-11-17): one button that always says Export, opening Print or save as PDF / Download CSV. */
html[data-look] .page-main.rep .rep-dl > .rep-csv { width: auto; padding: 0 14px 0 16px; gap: 8px; font-weight: 600; list-style: none; }
.rep-dl > summary::-webkit-details-marker { display: none; }
html[data-look] .page-main.rep .rep-dl > .rep-csv svg:last-child { width: 14px; height: 14px; color: var(--muted); }
.rep-dl .me-pop { min-width: 220px; }
/* Reports timeframe pill, beside the report picker (owner 2026-11-17). Same pill as the picker. */
.rep-bar { flex-wrap: wrap; gap: 12px; }
.rep-date { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 16px 8px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--card-line); font: inherit; font-size: 16px; font-weight: 700; color: var(--ink); cursor: pointer; white-space: nowrap; }
.rep-date svg { width: 17px; height: 17px; flex: none; }
.rep-date svg:last-child { width: 14px; height: 14px; color: var(--muted); }
@media (max-width: 767px) { .rep-date { flex: 1 1 100%; justify-content: flex-start; } .rep-date svg:last-child { margin-left: auto; } }
@media (max-width: 767px) {
  html[data-look] .page-main.rep .rep-dl > .rep-csv { padding: 0 10px 0 12px; gap: 4px; }
  .rep-dl > .rep-csv > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Invoice form > Payment options: settings rows with switches; minimum and deposit fields open under their row. */
.pay-set h2 { margin-bottom: 6px; }
.pay-set-head { padding-bottom: 4px; }
.pay-set-head p { color: var(--muted); font-size: 15px; }
.pay-set-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 0; border-top: 1px solid var(--line-soft); }
.pay-set-head + input + .pay-set-row { border-top: 0; }
.pay-set-text { min-width: 0; }
.pay-set-text :is(label, b) { display: block; font-size: 16px; font-weight: 700; color: var(--ink); }
.pay-set-text p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); max-width: 52ch; }
.pay-set-select { width: 220px; flex: none; }
.pay-set-note { display: flex; gap: 8px; align-items: flex-start; margin: -8px 0 16px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.pay-set-note .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.pay-set-sub { margin: -4px 0 20px; padding: 16px 18px; border-radius: 16px; background: var(--page); }
.pay-set-sub[hidden] { display: none; }
.pay-set-sub .hint { margin: 0; }
.pay-affix { position: relative; display: flex; align-items: center; width: 200px; max-width: 100%; }
.pay-affix .input { width: 100%; font-variant-numeric: tabular-nums; }
.pay-affix > span { position: absolute; color: var(--muted); font-weight: 600; pointer-events: none; }
.pay-affix-pre > span { left: 16px; }
.pay-set .pay-affix-pre .input { padding-left: 32px; }
.pay-affix-post > span { right: 16px; }
.pay-set .pay-affix-post .input { padding-right: 40px; }
.pay-set > .error { display: block; margin: -12px 0 16px; }
@media (max-width: 640px) {
  .pay-set-row:has(.pay-set-select) { flex-direction: column; align-items: stretch; gap: 12px; }
  .pay-set-select { width: 100%; }
}

/* Public invoice and portal: the pay box at the bottom of the invoice (owner 2026-11-17, from the circlesco.com pay form):
   a small "Payment details" label, Card / Bank boxes when both are on, a tinted note, a full-width Pay button. */
.pay-box { display: grid; gap: 16px; margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.pay-box-title { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pay-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 12px; }
.pay-tab { position: relative; cursor: pointer; }
.pay-tab input { position: absolute; opacity: 0; pointer-events: none; }
.pay-tab span { display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 16px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); font-size: 17px; font-weight: 700; color: var(--muted); transition: border-color .15s, background .15s, color .15s; }
.pay-tab input:checked + span { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); color: var(--brand); }
.pay-box-note { margin: 0; padding: 14px 18px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--page); color: var(--ink-2); font-size: 15px; }
.pay-box:has(.pay-tabs) [data-pay-note] { display: none; }
.pay-box:has(input[value="card"]:checked) [data-pay-note="card"],
.pay-box:has(input[value="us_bank_account"]:checked) [data-pay-note="us_bank_account"] { display: block; }
.pay-box .btn-block { min-height: 56px; margin-top: 8px; border-radius: 14px; font-size: 17px; }
.pay-box-safe { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; font-size: 14px; color: var(--muted); text-align: center; }
.pay-box-safe .icon { width: 15px; height: 15px; flex: none; }
/* Card fields on the invoice: the processor's secure fields sit inside Casa's own .input boxes. */
.pay-card { display: grid; gap: 12px; }
.pay-card-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pay-el { display: flex; flex-direction: column; justify-content: center; }
.pay-el > * { width: 100%; }
.pay-box-error { margin: 0; }
.pay-box:has(input[value="us_bank_account"]:checked) .pay-card { display: none; }
@media (prefers-reduced-motion: reduce) { .pay-tab span { transition: none; } }

/* Transactions: the refund pop-up's amount box with "Refund full" beside it. */
.refund-amount-row { display: flex; align-items: center; gap: 8px; }
.refund-amount-row .pay-affix { flex: 1; width: auto; }
.refund-amount-row .pay-affix-pre .input { padding-left: 32px; }

/* Paid invoice: a green circle check (the old "Paid" green) right before the "Paid in full" title. */
.pub-paid { display: flex; align-items: center; gap: 16px; }
.pub-paid-check { display: inline-grid; place-items: center; width: 1em; height: 1em; border-radius: 50%; background: #4ADE80; flex: none; }
.pub-paid-check svg { width: .6em; height: .6em; fill: none; stroke: #111114; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 767px) { .pub-paid { gap: 10px; } }

/* Public invoice: a small Download PDF button at the top right of the card, beside For / Property / Date. */
.pub-facts-row { display: flex; align-items: flex-start; gap: 16px; }
.pub-facts-row .pub-facts { flex: 1; min-width: 0; margin: 0; }
.pub-card > .pub-facts-row:first-child .pub-facts { padding-top: 0; }
.pub-card > .pub-facts-row:first-child .pub-pdf { margin-top: 0; }
.pub-pdf { flex: none; margin-top: 28px; min-height: 38px; padding: 8px 14px; font-size: 14px; gap: 6px; }
.pub-pdf .icon { width: 16px; height: 16px; }

/* Invoice details: a full-width green "Paid" band with a check at the top of a paid invoice. */
.inv-paid-band { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 24px; padding: 16px 20px; border-radius: var(--r-field, 14px); background: #1A7F37; color: #FFFFFF; font: 700 20px/1.2 var(--font-head); }
.inv-paid-check { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #FFFFFF; flex: none; }
.inv-paid-check svg { width: 20px; height: 20px; fill: none; stroke: #1A7F37; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* Transactions list: room for the amount, and money never breaks across lines. */
html[data-look] .list-head.tx-cols, html[data-look] .list.tx-cols { --cols: minmax(0, 1.8fr) minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.2fr) 76px; }
.tx-amt, .tx-cols .row-meta span:first-child { white-space: nowrap; }

/* Transactions: money right-aligned in the number font. */
html[data-look] .tx-cols .tx-amt { justify-self: end; text-align: right; padding-right: 24px; font-family: 'Casa Geist Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; letter-spacing: 0; }
html[data-look] .list-head.tx-cols .tx-amt { font-family: inherit; }

/* Refund pop-up: half width, tighter rows, "Refund full" shaped like the field next to it. */
#refund-modal .modal-body { gap: 18px; }
#refund-modal .field { gap: 6px; }
#refund-modal .hint { margin: 0; }
#refund-modal .modal-body > .hint:first-child { margin: 0; }
#refund-modal .refund-amount-row .btn { min-height: 50px; border-radius: var(--r-field); flex: none; }

/* Activity: a dotted timeline on invoice and payment details. Green = paid, red = refund/void, blue = client opened it. */
.page-main > .activity { margin-top: 24px; }
.act-list { list-style: none; margin: 12px 0 0; padding: 0; }
.act-row { position: relative; display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 14px; padding: 0 0 18px; }
.act-row:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.act-dot { width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; background: var(--muted); }
.act-paid .act-dot { background: #1A7F37; }
.act-refund .act-dot { background: #E5484D; }
.act-seen .act-dot { background: #3366FF; }
.act-row b { display: block; font-weight: 600; font-size: .95rem; overflow-wrap: anywhere; }
.act-row .hint { display: block; margin: 2px 0 0; }

/* Paid bands: green = paid in full, amber = partly paid or part refunded, red = refunded. */
.inv-paid-band.is-partial { background: #FFEEC6; color: #111114; }
.inv-paid-band.is-partial .inv-paid-check svg { stroke: #8A6100; }
.inv-paid-band.is-partial .inv-paid-check svg .fill { fill: #8A6100; stroke: none; }
.inv-paid-band.is-refunded { background: #E5484D; }
.inv-paid-band.is-refunded .inv-paid-check svg { stroke: #E5484D; }
@media (max-width: 640px) { .inv-paid-band { font-size: 16px; text-align: center; } }
/* Paid in full: light green to match the light amber partial bar (owner 2026-11-18). */
.inv-paid-band:not(.is-partial):not(.is-refunded) { background: #D9F7E1; color: #111114; }
/* Refunded, voided or a declined payment: light red, like the light green and amber bars. */
.inv-paid-band.is-refunded { background: #FDECEC; color: #111114; }
.inv-paid-band.is-refunded .inv-paid-check svg { stroke: #E5484D; }

/* Invoices / Recurring: one area, switched by tabs above the cards. */
.area-tabs { display: flex; gap: 28px; margin: 0 0 20px; border-bottom: 1px solid var(--line); }
.area-tabs a { position: relative; padding: 0 0 12px; font: 700 18px/1.2 var(--font-head); color: var(--muted); text-decoration: none; }
.area-tabs a[aria-current="page"] { color: var(--ink); }
.area-tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }
.inv-stat small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Owner portal: a home row opens the home's page; search on Jobs (owner 2026-11-17). */
body.premium-portal a.portal-home { color: inherit; text-decoration: none; }
body.premium-portal .portal-search { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 24px; }
body.premium-portal .portal-search .search { flex: 1 1 280px; }
body.premium-portal .portal-home-side .prose { margin: 0 0 24px; color: var(--muted); }
/* The home page's cards stand apart (owner 2026-11-17: Photos and Open jobs were touching). */
body.premium-portal .portal-home-main { display: grid; gap: 24px; align-content: start; }
body.premium-portal .portal-home-main > .pub-card { margin: 0; }
/* Open / Finished tabs on the portal's job lists (owner 2026-11-17). */
body.premium-portal .portal-tabs { display: flex; gap: 28px; margin: 0 0 8px; border-bottom: 1px solid var(--line); }
body.premium-portal .portal-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 0 0 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; font: 700 20px/1.2 var(--font-head); letter-spacing: -.01em; color: var(--muted); text-decoration: none; }
body.premium-portal .portal-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
body.premium-portal .portal-tabs a span { font: 600 13px/1 var(--font); color: var(--muted); }

/* Roles page (owner 2026-11-17): the Team page's card and rows, one row per role; add, edit and view open in pop-ups. */
.role-perms { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.role-perms legend { font-weight: 600; margin-bottom: 10px; padding: 0; }
.role-perms .check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.4; cursor: pointer; }
.role-perms .check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.role-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 15px; line-height: 1.4; color: var(--ink); }
.role-list li { display: flex; align-items: flex-start; gap: 10px; }
.role-list .icon { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--brand); }
/* The small links in a Team/Roles card head (owner 2026-11-17: "make them premium"): a quiet outlined pill with an icon. */
#appkit-main .team-page a.team-roles-link { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink); font: 600 14px/1 var(--font); text-decoration: none; white-space: nowrap; transition: border-color .15s, color .15s; }
#appkit-main .team-page a.team-roles-link .icon { width: 16px; height: 16px; flex: none; color: var(--muted); transition: color .15s, transform .15s; }
#appkit-main .team-page a.team-roles-link:hover { border-color: var(--ink-2); }
#appkit-main .team-page a.team-roles-link:hover .icon { color: var(--brand); }
#appkit-main .team-page a.team-roles-link:hover .icon:last-child:not(:first-child) { transform: translateX(2px); }
#appkit-main .team-page a.team-roles-link:hover .icon:first-child:only-of-type { transform: translateX(-2px); }
/* Roles rows: the button sits flush right (no empty trash column); a delete icon, when there is one, sits just before it. */
#appkit-main .team-page.roles-page .team-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
#appkit-main .team-page.roles-page .team-role-cell { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
#appkit-main .team-page.roles-page .team-role-cell form { margin: 0; }
#appkit-main .team-page.roles-page .team-role-cell button.team-btn { width: 200px; }
@media (max-width: 640px) {
  #appkit-main .team-page.roles-page .team-row { grid-template-columns: 40px minmax(0, 1fr); }
  #appkit-main .team-page.roles-page .team-role-cell { grid-column: 2; grid-row: 2; justify-content: flex-start; flex-direction: row-reverse; }
  #appkit-main .team-page.roles-page .team-role-cell button.team-btn { width: auto; flex: 1; }
}
@media (prefers-reduced-motion: reduce) { #appkit-main .team-page a.team-roles-link .icon { transition: none; } }

/* Launchpad in the account menu and the Cmd+J switcher (owner 2026-11-18), only for people with two or more places to go. */
.me-pop a.me-lp, .premium-portal .head-me .me-pop a.me-lp { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.me-lp kbd { font: 600 12px/1 var(--font); color: var(--muted); background: var(--line-soft); border-radius: 6px; padding: 4px 6px; }
.lpj { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; background: rgba(11, 11, 15, .45); }
.lpj[hidden] { display: none; }
.lpj-box { width: 100%; max-width: 520px; max-height: 70vh; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border-radius: 20px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .5); }
.lpj-search { position: relative; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.lpj-search .icon { width: 18px; height: 18px; color: var(--muted); flex: none; }
.lpj-search input { flex: 1; min-width: 0; border: 0; background: none; font: 400 16px/1.4 var(--font); color: var(--ink); outline: none; box-shadow: none; padding: 6px 0; }
.lpj-keys { font: 600 11px/1 var(--font); color: var(--muted); letter-spacing: .04em; white-space: nowrap; }
.lpj-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 8px; }
.lpj-list form { margin: 0; }
.lpj-item, .lpj-item button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: none; font: inherit; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; outline: none; }
form.lpj-item { padding: 0; }
.lpj-item.is-on, form.lpj-item.is-on button { background: var(--line-soft); }
form.lpj-item.is-on { background: none; }
.lpj-item[hidden] { display: none; }
.lpj-mark { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: #fff; font: 800 14px/1 var(--font-head); overflow: hidden; }
.lpj-mark img { width: 18px; height: 18px; }
.lpj-mark.is-casa { background: #FDECEA; }
.lpj-mark.is-logo { background: var(--surface); border: 1px solid var(--line); }
.lpj-mark.is-logo img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.lpj-name { flex: 1; min-width: 0; font: 600 15px/1.3 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lpj-role { font: 600 12px/1.4 var(--font); color: var(--muted); white-space: nowrap; }
.lpj-empty { margin: 0; padding: 24px; text-align: center; font-size: 14px; color: var(--muted); }
.lpj-foot { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 14px 16px; border-top: 1px solid var(--line); font: 600 14px/1 var(--font); color: var(--brand); text-decoration: none; }
.lpj-foot .icon { width: 15px; height: 15px; }
html[data-theme="dark"] .lpj-mark.is-casa { background: #3A2321; }

/* Photo or logo on an owner, client or provider page (owner 2026-11-18). */
.avatar-xl { width: 64px; height: 64px; font-size: 20px; }
.rec-who { display: flex; align-items: center; gap: 16px; min-width: 0; }
/* The photo is its own control (owner 2026-11-20: "Add photo text is bad ui"): a camera badge on the bottom corner
   adds or changes it, an x badge on the top corner removes it. Each badge is 28px with a 44px tap area. */
.rec-photo { position: relative; display: inline-grid; justify-items: start; flex: none; }
.rec-photo form { margin: 0; }
.rec-photo-add, .rec-photo-remove { position: absolute; right: -4px; }
.rec-photo-add { top: 40px; }
.rec-photo-remove { top: -4px; }
.rec-photo-badge { position: relative; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 2px 6px rgba(0, 0, 0, .12); cursor: pointer; }
.rec-photo-badge::before { content: ""; position: absolute; inset: -8px; }
.rec-photo-badge .icon { width: 15px; height: 15px; }
.rec-photo .error { margin-top: 8px; }
@media (max-width: 640px) { .rec-who { flex-direction: column; align-items: flex-start; gap: 12px; } }

/* Account: text alerts consent under Phone (2026-11-20). One row: small switch, title, the carrier disclosure under it. */
.text-alerts-field { grid-column: 1 / -1; }
.field .text-alerts, .casa-settings.casa-settings .field .text-alerts { display: flex; align-items: flex-start; gap: 14px; margin: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; font-weight: 400; cursor: pointer; }
.field .text-alerts .set-switch { width: 40px; height: 24px; margin: 1px 0 0; flex: none; }
.field .text-alerts .set-switch::after { top: 3px; left: 3px; width: 18px; height: 18px; }
.field .text-alerts .set-switch:checked::after { transform: translateX(16px); }
.text-alerts-text { display: grid; gap: 4px; min-width: 0; }
.text-alerts-text b { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.text-alerts-text small { font-size: var(--t-cap); line-height: 1.55; color: var(--muted); }
.text-alerts-text a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Direct booking (2026-11-20): Bookings list, a home's Public Page tab and the guest portal. Scoped classes only. */
.bk-alerts { display: grid; gap: 8px; margin: 0 0 16px; }
.bk-alert { margin: 0; padding: 12px 16px; border-radius: var(--r-md); background: var(--error-bg); color: var(--error-ink); font-size: 15px; }
.bk-form .form-card + .form-card { margin-top: 16px; }
.bk-h3 { margin: 16px 0 8px; font-size: 15px; font-weight: 700; }
.bk-feed { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.bk-feed > div { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.bk-block { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; margin-top: 12px; }
.bk-lines { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 0; }
.bk-lines dt { color: var(--muted); }
.bk-lines dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.guest-trip { display: grid; gap: 12px; }
.guest-eyebrow { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.guest-title { margin: 0; }
.guest-h3 { margin: 8px 0 4px; font-size: 17px; font-weight: 700; }
.guest-prose { font-size: 17px; line-height: 1.55; overflow-wrap: anywhere; }
.guest-codes dd b { font-family: var(--mono); font-size: 17px; letter-spacing: .04em; }
.guest-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.guest-cards li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
/* Messages (owner 2026-11-20): the live unread badge on the Messages nav item hides at zero. */
.nav .count[data-ak-unread-badge][hidden] { display: none !important; }

/* ---------- Bell (owner 2026-11-20: "bell notifications") ----------
   The App Kit's live bell (appkit::account.bell) inside Casa's icon button. Scoped to .casa-bell only. New items land
   while the page is open; no focus rings or tints. */
.casa-bell { position: relative; display: inline-flex; }
.casa-bell > summary { position: relative; display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); border-radius: var(--r-md); color: var(--ink); list-style: none; cursor: pointer; }
.casa-bell > summary::-webkit-details-marker { display: none; }
.casa-bell-lg .icon { width: 20px; height: 20px; stroke-width: 2; }
.casa-bell .ak-inbox-count { position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--r-full); background: var(--brand); color: #fff; font: 600 12px/20px var(--font); text-align: center; }
.casa-bell .ak-inbox-count[hidden] { display: none; }
.casa-bell .ak-inbox-count.is-new { animation: casa-bell-pop .4s ease-out; }
@keyframes casa-bell-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }
.casa-bell .ak-bell-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 45; width: min(380px, calc(100vw - 32px)); max-height: min(70vh, 560px); overflow: auto; padding: 16px 0 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 32px #0b0b0f1f; color: var(--ink); text-align: left; }
.casa-bell .ak-bell-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px 8px; }
.casa-bell .ak-bell-head h2 { margin: 0; font: 700 17px/1.3 var(--font-head); }
.casa-bell .ak-link { border: 0; background: none; padding: 0; color: var(--ink-2); font: 600 14px/1.3 var(--font); cursor: pointer; }
.casa-bell .ak-link:hover { color: var(--ink); }
.casa-bell .ak-link[hidden] { display: none; }
.casa-bell .ak-bell-status { margin: 0; padding: 12px 20px; color: var(--ink-2); font-size: 15px; }
.casa-bell .ak-bell-status[hidden] { display: none; }
.casa-bell .ak-bell-items { list-style: none; margin: 0; padding: 0; }
.casa-bell .ak-bell-item { display: flex; align-items: flex-start; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line-soft); }
.casa-bell .ak-bell-link { display: flex; align-items: flex-start; gap: 12px; flex: 1; min-width: 0; color: var(--ink); text-decoration: none; }
.casa-bell .ak-bell-icon { flex: none; width: 32px; height: 32px; padding: 7px; border-radius: 50%; background: var(--field); color: var(--ink); }
.casa-bell .is-unread .ak-bell-icon { background: var(--inverse); color: var(--on-inverse); }
.casa-bell .ak-bell-text { display: grid; gap: 2px; min-width: 0; }
.casa-bell .ak-bell-text b { font: 600 15px/1.35 var(--font); overflow-wrap: anywhere; }
.casa-bell .ak-bell-body { color: var(--ink-2); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.casa-bell .ak-bell-when { color: var(--muted); font-size: 13px; }
.casa-bell .ak-bell-read { flex: none; font-size: 13px; padding-top: 2px; }
.casa-bell .ak-bell-all { display: block; padding: 12px 20px 6px; border-top: 1px solid var(--line-soft); color: var(--ink); font: 600 15px/1.3 var(--font); text-decoration: none; }
.casa-bell :focus, .casa-bell :focus-visible, .casa-bell > summary:focus-visible { outline: none; box-shadow: none; }
@media (max-width: 1199px) {
  html[data-look] .head-tools .casa-bell { display: none; }
}
@media (max-width: 600px) {
  .casa-bell .ak-bell-panel { position: fixed; top: 72px; left: 16px; right: 16px; width: auto; max-height: calc(100dvh - 96px); }
}
@media (prefers-reduced-motion: reduce) {
  .casa-bell .ak-inbox-count.is-new { animation: none; }
}

/* Settings > Public site: the address field with the casaspace.co ending. */
.site-slug { display: flex; align-items: stretch; border: 1px solid var(--field-line); border-radius: var(--r-field); overflow: hidden; background: var(--field); }
.site-slug .input { border: 0; border-radius: 0; flex: 1; min-width: 0; }
.site-slug span { display: flex; align-items: center; padding: 0 16px; color: var(--muted); border-left: 1px solid var(--field-line); font-size: 15px; white-space: nowrap; }
/* Settings > Public site > Your own domain (like Studio's domain card): status dot and badge, tools, record table. */
.dom-card { margin: 0 24px 24px; border: 1px solid var(--line); border-left: 4px solid var(--dom-c, #E5484D); border-radius: var(--r-field); overflow: hidden; }
.dom-card.is-ok { --dom-c: #1A7F37; --dom-bg: rgba(26, 127, 55, .1); }
.dom-card.is-info { --dom-c: #3366FF; --dom-bg: rgba(51, 102, 255, .1); }
.dom-card.is-wait { --dom-c: #C2410C; --dom-bg: rgba(194, 65, 12, .1); }
.dom-head { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dom-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--dom-c); flex: none; }
.dom-card.is-ok .dom-dot { box-shadow: 0 0 0 4px rgba(26, 127, 55, .18); }
.dom-host { font-size: 16px; font-weight: 700; word-break: break-all; }
.dom-badge { padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--dom-c); background: var(--dom-bg); }
.dom-secured { display: inline-flex; align-items: center; gap: 5px; color: #1A7F37; font-size: 13px; font-weight: 700; }
.dom-secured svg, .dom-live svg { width: 16px; height: 16px; flex: none; }
.dom-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dom-tools form { margin: 0; }
.dom-remove { color: #E5484D; }
.dom-live { display: flex; align-items: center; gap: 8px; margin: 0; padding: 14px 20px; color: #1A7F37; font-size: 15px; }
.dom-live a { color: var(--accent, #3366FF); }
.dom-body { padding: 16px 20px 18px; display: grid; gap: 10px; }
.dom-msg { margin: 0; font-size: 15px; color: var(--muted); }
.dom-msg b { color: var(--ink); }
.dom-msg.is-warn { color: #C2410C; font-weight: 600; }
.dom-table-wrap { overflow-x: auto; margin-top: 4px; }
.dom-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.dom-table th { text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.dom-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dom-table tr:last-child td { border-bottom: 0; }
.dom-copy { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; cursor: pointer; color: inherit; font: inherit; }
.dom-copy code { font-size: 15px; font-weight: 700; }
.dom-copy svg { width: 14px; height: 14px; color: var(--muted); }
.dom-purpose { color: var(--muted); }
.dom-checked { margin: 0; font-size: 13px; color: var(--muted); }
.dom-err { padding: 0 24px 16px; }
@media (max-width: 640px) { .dom-card { margin: 0 16px 16px; } .dom-tools { margin-left: 0; width: 100%; } }
