/* WoofPack CRM */
/* Dark look: follows the phone/computer unless the login picked "Always light" or "Always dark" (html[data-theme]). */
:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #f0ede6;
  --border: #e3ded3;
  --text: #1f2421;
  --muted: #6b716c;
  --accent: #cc0000;
  --accent-ink: #ffffff;
  --accent-soft: #fbe6e6;
  --warn: #9a5b00;
  --warn-soft: #fdf1dc;
  --danger: #b3261e;
  --danger-soft: #fbe7e5;
  --ok: #1f6f5c;
  --ok-soft: #e2f0eb;
  --shadow: 0 1px 2px rgba(31, 36, 33, .06), 0 2px 8px rgba(31, 36, 33, .04);
  --radius: 10px;
  --sidebar: 228px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-ws="tech-services"] { --accent: #2b55a3; --accent-soft: #e5ecf8; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151816; --surface: #1d211f; --surface-2: #242926; --border: #323833;
    --text: #e8ebe8; --muted: #9aa29c; --accent: #ff5c5c; --accent-ink: #1a0d0d; --accent-soft: #3a1c1c;
    --warn: #f0b45a; --warn-soft: #3a2e1a; --danger: #f2877f; --danger-soft: #3d2120; --ok: #4fb397; --ok-soft: #1f342d;
    --shadow: none; color-scheme: dark;
  }
  :root[data-ws="tech-services"]:not([data-theme="light"]) { --accent: #7aa2ea; --accent-soft: #1f2a40; }
}
:root[data-theme="dark"] {
    --bg: #151816; --surface: #1d211f; --surface-2: #242926; --border: #323833;
    --text: #e8ebe8; --muted: #9aa29c; --accent: #ff5c5c; --accent-ink: #1a0d0d; --accent-soft: #3a1c1c;
    --warn: #f0b45a; --warn-soft: #3a2e1a; --danger: #f2877f; --danger-soft: #3d2120; --ok: #4fb397; --ok-soft: #1f342d;
    --shadow: none; color-scheme: dark;
  }
:root[data-theme="dark"][data-ws="tech-services"] { --accent: #7aa2ea; --accent-soft: #1f2a40; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-text-size-adjust: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.5rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
small, .muted { color: var(--muted); }
.inline { display: inline; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }

/* Layout */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex: none; background: var(--surface); border-right: 1px solid var(--border);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 16px 12px;
}
.brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; padding: 4px 8px 16px; color: var(--text); }
.brand-logo { display: block; width: 130px; height: auto; margin: 0 auto; }
.brand-mark-img { display: block; width: 26px; height: auto; }
.brand:hover { text-decoration: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-logo, :root:not([data-theme="light"]) .brand-mark-img { filter: brightness(1.25); } }
:root[data-theme="dark"] .brand-logo, :root[data-theme="dark"] .brand-mark-img { filter: brightness(1.25); }
.ws-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 8px; margin-bottom: 14px; }
.ws-switch a { text-align: center; font-size: 13px; padding: 6px 4px; border-radius: 6px; color: var(--muted); font-weight: 600; }
.ws-switch a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.ws-switch a:hover { text-decoration: none; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); font-weight: 500; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.on { background: var(--accent-soft); color: var(--accent); }
.nav svg { width: 18px; height: 18px; flex: none; }
.sidebar .spacer { flex: 1; }
.sidebar .who { font-size: 13px; color: var(--muted); padding: 8px 10px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.main { flex: 1; min-width: 0; padding: 24px 28px 48px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.crumb a { color: var(--muted); }

.topbar, .tabbar { display: none; }

@media (max-width: 860px) {
  .app { flex-direction: column; }
  .sidebar { display: none; }
  .main { padding: 14px 16px 96px; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: 0; z-index: 20;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px 16px;
  }
  .topbar .ws-switch { margin: 0; width: 220px; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
    background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 4px 0; }
  .tabbar a.on { color: var(--accent); }
  .tabbar a:hover { text-decoration: none; }
  .tabbar svg { width: 22px; height: 22px; }
  h1 { font-size: 1.3rem; }
  /* "More": the full menu slides in from the left */
  .nav-open .sidebar { display: flex; position: fixed; top: 0; left: 0; bottom: 0; height: auto; z-index: 40; width: min(300px, 86vw);
    padding: 16px 12px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; box-shadow: 0 0 40px rgba(0,0,0,.25); }
  .nav-open .sidebar .lbl { display: inline; }
  .nav-open .sidebar .short, .nav-open .sidebar .side-search-btn, .nav-open .sidebar .side-mark { display: none; }
  .nav-open .sidebar .side-search { display: flex; }
  .nav-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 35; }
  .nav-backdrop[hidden] { display: none; }
  .nav-open body { overflow: hidden; }
}

/* Cards and panels */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.card-head h2 { margin: 0; font-size: 1rem; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.stack > * + * { margin-top: 16px; }

/* Buttons and forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); padding: 8px 14px; border-radius: 8px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
.linkish.danger { color: var(--danger); }

label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=search], input[type=date], input[type=time], input[type=url], input[type=number], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
textarea { min-height: 90px; resize: vertical; }
.field { margin-bottom: 14px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 3px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; }
.check input { width: 16px; height: 16px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }
fieldset { border: 0; padding: 0; margin: 0 0 8px; }
legend { font-weight: 700; margin-bottom: 8px; font-size: 14px; }

/* Flash */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.warn { background: var(--warn-soft); color: var(--warn); }
.flash.err { background: var(--danger-soft); color: var(--danger); }
.flash form, .flash button { display: inline; }

/* Tables and lists */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
.table-wrap { overflow-x: auto; }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.list > li:last-child { border-bottom: 0; }

.contact-row { display: flex; gap: 12px; align-items: center; color: var(--text); }
.contact-row:hover { text-decoration: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.contact-row .name { font-weight: 600; }
.contact-row .sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-row .grow { flex: 1; min-width: 0; }

/* Pills, tags, badges */
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.status-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.tag form { display: inline; }
.tag button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 0 0 2px; font-size: 14px; line-height: 1; }
.tag.red { background: #fde8e6; border-color: #f6c9c4; } .tag.orange { background: #fdeedd; border-color: #f7d4ae; }
.tag.yellow { background: #fdf6d6; border-color: #f1e2a0; } .tag.green { background: #e3f3e6; border-color: #bfe1c6; }
.tag.teal { background: #def2ef; border-color: #b4e0d9; } .tag.blue { background: #e3ecfb; border-color: #bdd0f2; }
.tag.purple { background: #efe7fb; border-color: #d6c4f2; } .tag.pink { background: #fbe7f2; border-color: #f2c2dc; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag[class*=" "] { color: #1f2421; } :root:not([data-theme="light"]) .tag.gray { color: var(--text); } }
:root[data-theme="dark"] .tag[class*=" "] { color: #1f2421; }
:root[data-theme="dark"] .tag.gray { color: var(--text); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { font-size: 13px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 500; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip:hover { text-decoration: none; }
.chip .n { opacity: .7; margin-left: 4px; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar input[type=search] { flex: 1; min-width: 200px; }
.toolbar select { width: auto; max-width: 100%; min-width: 0; }
select { max-width: 100%; text-overflow: ellipsis; }

/* Contact detail */
.profile { display: flex; gap: 14px; align-items: center; }
.profile h1 { margin: 0; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); padding: 0 8px; overflow-x: auto; }
.tabs a { padding: 12px 12px 10px; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tab-panel { display: none; }
.tab-panel.on { display: block; }

.pet { display: flex; gap: 12px; align-items: flex-start; }
.pet-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 20px; flex: none; }
.pet.dim { opacity: .6; }
.pet .meta { font-size: 13px; color: var(--muted); }

.note-body { white-space: pre-wrap; }
.timeline li { font-size: 13px; color: var(--muted); padding: 8px 16px; }

/* Pipelines board */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; scroll-snap-type: x mandatory; }
.column { flex: 0 0 272px; background: var(--surface-2); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 210px); scroll-snap-align: start; }
.column-head { padding: 10px 12px; font-weight: 700; font-size: 13px; display: flex; justify-content: space-between; gap: 8px; }
.column-body { padding: 0 8px 8px; overflow-y: auto; min-height: 60px; flex: 1; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin-bottom: 8px; cursor: grab; box-shadow: var(--shadow); font-size: 14px; }
.kcard a { color: var(--text); font-weight: 600; }
.kcard .sub { font-size: 12px; color: var(--muted); }
.kcard.sortable-ghost { opacity: .35; }
.kcard.sortable-chosen { cursor: grabbing; }
.kcard .move { margin-top: 6px; display: none; }
@media (max-width: 860px) {
  .column { flex-basis: 82vw; max-height: none; }
  .kcard .move { display: block; }
  .kcard .move select { font-size: 13px; padding: 4px 6px; }
}

/* Picker */
.picker { position: relative; }
.picker-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); margin-top: 4px; max-height: 280px; overflow-y: auto; }
.picker-results button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 12px; font: inherit; color: var(--text); cursor: pointer; }
.picker-results button:hover, .picker-results button.active { background: var(--surface-2); }
.picker-results small { display: block; }

/* Import */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.stat .v { font-size: 1.5rem; font-weight: 700; }
.stat .l { font-size: 13px; color: var(--muted); }
.flags { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: var(--warn); }
.household { border-bottom: 1px solid var(--border); padding: 14px 16px; }
.household:last-child { border-bottom: 0; }
.pet-edit { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr 140px auto; gap: 8px; align-items: center; margin-top: 8px; }
.pet-edit .raw { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
@media (max-width: 860px) { .pet-edit { grid-template-columns: 1fr 1fr; } }
details > summary { cursor: pointer; font-weight: 600; }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid var(--border); margin-top: 16px; z-index: 5; }
@media (max-width: 860px) { .sticky-actions { bottom: 64px; } }

/* Auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth .card { width: 100%; max-width: 380px; }
.auth .brand { justify-content: center; font-size: 18px; }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 16px; font-size: 14px; }
.per-page { margin-left: 12px; display: inline-flex; gap: 8px; align-items: center; }
.only-mobile { display: none; }
@media (max-width: 860px) { .hide-mobile { display: none !important; } .only-mobile { display: initial; } }

/* Phase 2 */
.nav-badge { margin-left: auto; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; line-height: 1.5; }
.tabbar a { position: relative; }
.tabbar .nav-badge { position: absolute; top: 0; left: 50%; margin-left: 6px; font-size: 10px; padding: 0 5px; }
.msg-body { white-space: pre-wrap; background: var(--surface-2); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin: 8px 0; }
.msg-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.msg-actions form { display: inline; }
.rule { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.rule:last-child { border-bottom: 0; }
.rule ol { margin: 6px 0 0; padding-left: 20px; font-size: 14px; }
.rule.off { opacity: .6; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px; white-space: pre-wrap; word-break: break-all; }
.placeholder-list { display: flex; flex-wrap: wrap; gap: 6px; }
.placeholder-list button { font: 12px ui-monospace, Menlo, Consolas, monospace; border: 1px solid var(--border); background: var(--surface-2); border-radius: 6px; padding: 3px 6px; cursor: pointer; color: var(--text); }

/* Dashboard, tasks, appointments */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .dash-grid { grid-template-columns: 1fr; } }
.stat-link { color: var(--text); display: block; }
.stat-link:hover { text-decoration: none; border-color: var(--accent); }
/* Home: the four tiles always sit on one line, compact */
.stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stat-row .stat { padding: 8px 10px; }
.stat-row .v { font-size: 1.25rem; line-height: 1.2; }
.stat-row .l { font-size: 12px; line-height: 1.25; }
.stat-row .l .sh { display: none; }
.stat-row .l .od { color: var(--danger); }
@media (max-width: 640px) {
  .stat-row { gap: 6px; }
  .stat-row .stat { padding: 6px 4px; text-align: center; }
  .stat-row .v { font-size: 1.1rem; }
  .stat-row .l { font-size: 11px; }
  .stat-row .l .lg { display: none; }
  .stat-row .l .sh { display: inline; }
  .stat-row .l .od { display: block; }
  .stat-row .l .od .dot { display: none; }
  .stat-row .l .od2 { display: block; }
}
.task-group { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px 16px 4px; }
.task-group.overdue { color: var(--danger); }
.tasks > li { padding: 10px 16px; }
.task-row { display: flex; gap: 12px; align-items: flex-start; }
.task-check button { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--border); background: var(--surface); cursor: pointer; color: var(--accent-ink); font-size: 13px; line-height: 1; padding: 0; margin-top: 1px; }
.task-check button:hover { border-color: var(--accent); }
.task-row.done .task-check button { background: var(--accent); border-color: var(--accent); }
.task-row.done .task-title { text-decoration: line-through; color: var(--muted); }
.task-main { flex: 1; min-width: 0; }
.task-title { color: var(--text); font-weight: 500; }
.task-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); margin-top: 2px; }
.task-meta .overdue { color: var(--danger); font-weight: 600; }
.task-checklist { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.task-checklist li { display: flex; gap: 8px; align-items: flex-start; }
.task-checklist button { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--border); background: var(--surface); cursor: pointer; color: var(--accent-ink); font-size: 11px; line-height: 1; padding: 0; flex: none; margin-top: 1px; }
.task-checklist button:hover { border-color: var(--accent); }
.task-checklist li.on button { background: var(--accent); border-color: var(--accent); }
.task-checklist li.on > span { color: var(--muted); text-decoration: line-through; }
.task-checklist .tc-remove { margin-left: auto; }
.task-checklist .tc-remove button, .task-checklist li.on .tc-remove button { border: 0; background: none; width: auto; height: auto; color: var(--muted); font-size: 13px; padding: 0 4px; }
.task-checklist .tc-remove button:hover { color: var(--danger, #b00020); }
.task-acts { margin-top: 6px; }
.ob-panel { border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-top: 10px; }
.ob-choices { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.quick-add { display: grid; gap: 8px; }
.quick-add-row { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-add-row input, .quick-add-row select { width: auto; flex: 1 1 120px; min-width: 0; }
.add-appt > summary { list-style: none; display: inline-flex; }
.add-appt > summary::-webkit-details-marker { display: none; }
.add-appt[open] > summary { margin-bottom: 4px; }
.day-head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 16px 4px !important; border-bottom: 0 !important; }
.appt { display: flex; gap: 12px; }
.appt-time { width: 64px; flex: none; font-size: 13px; font-weight: 600; }
.badge.ws-tech-services { background: #e5ecf8; color: #2b55a3; }
.badge.ws-pet-care { background: #fbe6e6; color: #cc0000; }
.nav svg, .tasks svg, .list svg { width: 16px; height: 16px; vertical-align: -3px; }
.nav svg { width: 18px; height: 18px; }

.setup-steps { padding-left: 20px; font-size: 14px; }
.setup-steps > li { margin-bottom: 10px; }
.setup-steps ul { margin: 6px 0; padding-left: 18px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }

/* --- Contact list: saved searches + bulk actions --- */
[hidden] { display: none !important; }
.saved-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.chip.saved { display: inline-flex; align-items: center; gap: 2px; padding: 0 4px 0 0; background: var(--accent-soft); border-color: transparent; }
.chip.saved a { color: var(--accent); padding: 5px 4px 5px 12px; font-weight: 600; }
.chip.saved a:hover { text-decoration: none; }
.chip.saved.on { outline: 2px solid var(--accent); }
.chip.saved form { display: inline; }
.chip.saved button { border: 0; background: none; color: var(--accent); cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 6px; border-radius: 999px; opacity: .6; }
.chip.saved button:hover { opacity: 1; background: var(--surface); }
.save-search { margin: -4px 0 12px; }
.save-search summary { cursor: pointer; width: max-content; }
.bulk-bar { position: sticky; top: 8px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--text); color: var(--surface); padding: 8px 12px; border-radius: 10px; margin-bottom: 10px; box-shadow: var(--shadow); font-size: 14px; }
.bulk-bar .linkish { color: inherit; text-decoration: underline; font-size: 13px; }
.bulk-bar input[type=text] { padding: 5px 8px; font-size: 13px; }
.bulk-bar [data-bulk-count] { font-weight: 700; }
@media (max-width: 860px) { .bulk-bar { top: auto; bottom: 72px; position: sticky; } }
.list-head { display: flex; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--border); }
.list > li.contact-li { display: flex; align-items: center; gap: 12px; }
.contact-li > input[type=checkbox] { width: 18px; height: 18px; flex: none; accent-color: var(--accent); margin: 0; }
.list-head input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.contact-li .contact-row { flex: 1; min-width: 0; }
.contact-li.picked { background: var(--accent-soft); }

/* --- Form & application notes --- */
.note-form { border-left: 3px solid var(--accent); padding: 2px 0 2px 12px; }
.nf-title { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.nf-section { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 10px 0 4px; }
.nf-text { margin: 8px 0 0; font-size: 14px; }
.nf { display: grid; grid-template-columns: minmax(140px, 38%) 1fr; margin: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; font-size: 14px; }
.nf dt, .nf dd { margin: 0; padding: 7px 10px; border-top: 1px solid var(--border); }
.nf dt:first-of-type, .nf dt:first-of-type + dd { border-top: 0; }
.nf dt { font-weight: 600; color: var(--muted); background: var(--surface-2); }
.nf dd { font-weight: 600; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.nf dd.yes { color: var(--ok); }
.nf dd.no { color: var(--danger); }
@media (max-width: 600px) {
  .nf { grid-template-columns: 1fr; }
  .nf dt { border-top: 1px solid var(--border); padding-bottom: 2px; font-size: 12px; }
  .nf dd { border-top: 0; padding-top: 2px; }
}

/* --- Messages tab --- */
.composer { padding: 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.composer form { display: grid; gap: 8px; }
.composer-top { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.composer-to { font-size: 13px; }
.composer-tpl { width: auto; margin-left: auto; max-width: 100%; }
.composer textarea { min-height: 120px; background: var(--surface); }
.composer input[type=text] { background: var(--surface); }
.composer-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 3px; gap: 2px; }
.seg label { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--muted); margin: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--accent); color: var(--accent-ink); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg label.disabled { opacity: .45; cursor: not-allowed; }
.convo .msg { padding: 12px 16px; }
.convo .msg.hl { background: var(--accent-soft); }
.convo .msg.skipped, .convo .msg.failed { opacity: .65; }
.msg-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.msg-who { font-weight: 600; }
.msg-time { margin-left: auto; font-size: 12px; }
.msg-subject { font-weight: 600; font-size: 14px; margin-top: 6px; }
.msg-meta { font-size: 12px; margin-bottom: 6px; }
.badge.st-todo { background: var(--warn-soft); color: var(--warn); }
.badge.st-sent { background: var(--ok-soft); color: var(--ok); }
.badge.st-failed { background: var(--danger-soft); color: var(--danger); }

/* --- Collapsible left menu --- */
.side-top { position: relative; }
.side-mark { display: none; width: 30px; }
.nav-toggle { position: absolute; top: 0; right: -4px; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; padding: 0; }
.nav-toggle:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.nav-toggle svg { width: 18px; height: 18px; }
.ws-switch .short { display: none; }
.signout { display: inline-flex; align-items: center; gap: 6px; }
.signout svg { width: 16px; height: 16px; display: none; }
.sidebar { transition: width .15s ease, padding .15s ease; }
.nav-collapsed .sidebar { width: 68px; padding: 16px 8px; }
.nav-collapsed .sidebar .lbl { display: none; }
.nav-collapsed .side-top { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-bottom: 12px; }
.nav-collapsed .brand { padding: 0; }
.nav-collapsed .brand-logo { display: none; }
.nav-collapsed .side-mark { display: block; }
.nav-collapsed .nav-toggle { position: static; transform: scaleX(-1); }
.nav-collapsed .nav a { justify-content: center; padding: 9px 0; position: relative; }
.nav-collapsed .nav-badge { position: absolute; top: 3px; right: 6px; margin: 0; padding: 0 4px; font-size: 9px; min-width: 14px; text-align: center; }
.nav-collapsed .ws-switch { grid-template-columns: 1fr; }
.nav-collapsed .ws-switch .short { display: inline; }
.nav-collapsed .who { justify-content: center; padding: 8px 0; }
.nav-collapsed .signout svg { display: block; width: 18px; height: 18px; }
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

/* --- Documents --- */
.docs-send { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.docs-send select { width: auto; flex: 1 1 160px; min-width: 0; }
.docs-list { list-style: none; margin: 12px 0 0; padding: 0; }
.docs-list li { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; }
.docs-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.docs-actions form { display: inline; }
.doc-preview { border: 1px solid var(--border); border-radius: 10px; padding: 24px 28px; background: #fff; color: #1f2421; }
.doc-preview .lh { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 18px; font-size: 13px; }
.doc-preview .lh img { width: 120px; }
.doc-preview h1 { font-size: .85rem; text-align: center; text-decoration: underline; }
.doc-preview p { text-align: justify; }
.doc-preview .opt { display: flex; gap: 10px; align-items: center; margin: 6px 0; }
.doc-preview .box { width: 16px; height: 16px; border: 1.5px solid #cc0000; border-radius: 3px; flex: none; }
.doc-preview .sigbox { border: 2px dashed #e3a5a5; border-radius: 8px; padding: 22px; text-align: center; color: #b07a7a; margin: 16px 0 8px; max-width: 340px; }
.markup-help { font-size: 13px; }
.markup-help code { font-size: 12px; }
.markup-help td { padding: 3px 8px 3px 0; vertical-align: top; }

/* --- Universal search --- */
.side-search { position: relative; margin: 4px 0 10px; z-index: 40; }
.side-search input { width: 100%; padding: 8px 10px 8px 32px; font-size: 14px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
.side-search input:focus { background: var(--surface); }
.side-search-icon { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); margin: 0; display: flex; }
.side-search-icon svg, .side-search-btn svg { width: 16px; height: 16px; }
.side-search-btn { display: none; }
.nav-collapsed .side-search input, .nav-collapsed .side-search-icon { display: none; }
.nav-collapsed .side-search-btn { display: flex; justify-content: center; padding: 9px 0; border-radius: 8px; color: var(--text); }
.nav-collapsed .side-search-btn:hover { background: var(--surface-2); }
.nav-collapsed .side-search-btn svg { width: 18px; height: 18px; }
.search-results { display: grid; gap: 14px; }
.search-results .card-head h2 { font-size: 15px; }
mark { background: #ffe38a; color: inherit; border-radius: 2px; padding: 0 1px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) mark { background: #6b5a14; } }
:root[data-theme="dark"] mark { background: #6b5a14; }

.msg-track { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; margin: -2px 0 6px; }

.held-card { border-color: var(--warn); }
.held-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .held-row { grid-template-columns: 1fr; } }
.held-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.held-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; font-size: 13px; }

/* --- Collapsible sections (Automations) --- */
.fold-tools { font-size: 13px; margin: -4px 0 10px; color: var(--muted); }
details.fold > summary { list-style: none; cursor: pointer; user-select: none; }
details.fold > summary::-webkit-details-marker, .rule-sum::-webkit-details-marker { display: none; }
details.fold > summary h2 { display: flex; align-items: center; gap: 8px; }
details.fold:not([open]) > summary { border-bottom: 0; }
.fold-n { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 1px 8px; }
.fold-chev { width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; flex: none; margin: 0 4px; }
details[open] > summary .fold-chev { transform: rotate(45deg); }
.rule-fold { border-bottom: 1px solid var(--border); }
.rule-fold:last-child { border-bottom: 0; }
.rule-fold.off .rule-sum { opacity: .65; }
.rule-sum { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.rule-sum:hover { background: var(--surface-2); }
.rule-sum-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rule-sum-when { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rule-sum-n { font-size: 12px; white-space: nowrap; }
.rule-fold .rule { border-bottom: 0; padding-top: 0; padding-left: 40px; }
@media (max-width: 600px) { .rule-fold .rule { padding-left: 16px; } .rule-sum-n { display: none; } }

/* --- Search as you type --- */
.qs-panel { position: absolute; left: 0; top: calc(100% + 6px); width: 340px; max-width: calc(100vw - 24px); max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.18); z-index: 50; padding: 6px 0; }
.qs-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 12px 2px; }
.qs-item { display: block; padding: 6px 12px; color: var(--text); }
.qs-item:hover, .qs-item.on { background: var(--accent-soft); text-decoration: none; }
.qs-title { display: block; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs-sub { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs-empty { padding: 8px 12px; color: var(--muted); font-size: 13px; }
.qs-all { display: block; border-top: 1px solid var(--border); margin-top: 6px; padding: 8px 12px 4px; font-size: 13px; font-weight: 600; }
.nav-collapsed .qs-panel { display: none; }

.kstatus { display: inline-block; margin: 4px 0 2px; font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 2px 8px; line-height: 1.35; }
.status-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.status-form select, .status-form input { width: auto; flex: 1 1 140px; min-width: 0; font-size: 13px; padding: 5px 8px; }
.status-box { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }

/* --- Fold any page section by its title --- */
.afold-head { cursor: pointer; user-select: none; }
.card-head.afold-head { justify-content: flex-start; }
.card-head.afold-head > h2, .card-head.afold-head > h3 { margin-right: auto; }
h2.afold-head, h3.afold-head { display: flex; align-items: center; gap: 8px; }
h2.afold-head .fold-chev, h3.afold-head .fold-chev { margin-left: auto; }
.afold-head .fold-chev { transform: rotate(45deg); }
.afold.afolded .afold-head .fold-chev { transform: rotate(-45deg); }
.afold.afolded > :not(.afold-head) { display: none !important; }
.afold.afolded > .card-head { border-bottom: 0; }
.afold.afolded > h2.afold-head, .afold.afolded > h3.afold-head { margin: 0; }
.afold-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* Cards side by side in a grid line up at the top (no stacked-card gap). */
.grid-2 > .card + .card { margin-top: 0; }
.import-grid { align-items: stretch; }
.import-grid > .card { display: flex; flex-direction: column; }
.import-grid > .card > form { margin-top: auto; }

/* ---------- Marketing ---------- */
.mk-tabs { margin: 0 0 16px; padding: 0; }
.mk-media-tools h3 svg, .mk-ai svg { width: 18px; height: 18px; vertical-align: -3px; }
.mk-dow-m { display: none; font-style: normal; font-weight: 500; color: var(--muted); font-size: 12px; margin: 0 auto 0 8px; }
.mk-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.mk-dot.mk-pet { background: #cc0000; }
.mk-dot.mk-tech { background: #2b55a3; }
.mk-setup ul { margin: 6px 0 0; padding-left: 0; list-style: none; font-size: 14px; }
.mk-setup li { margin: 3px 0; }
.mk-setup, .mk-ready { margin-bottom: 16px; }
.mk-ready { border-left: 4px solid var(--warn); }
.mk-cal-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.mk-cal-head h2 { margin: 0 6px; min-width: 150px; text-align: center; }
.mk-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--border); gap: 1px; }
.mk-dow { background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--muted); padding: 6px 8px; text-transform: uppercase; letter-spacing: .04em; }
.mk-day { background: var(--surface); min-height: 112px; padding: 4px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mk-day.out { background: var(--surface-2); }
.mk-day.out .mk-day-num span { opacity: .5; }
.mk-day.today .mk-day-num span { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 7px; }
.mk-day.drop { outline: 2px dashed var(--accent); outline-offset: -3px; background: var(--accent-soft); }
.mk-day-num { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; padding: 2px 4px; }
.mk-add button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; border-radius: 6px; opacity: 0; }
.mk-day:hover .mk-add button, .mk-add button:focus { opacity: 1; }
.mk-add button:hover { background: var(--surface-2); color: var(--accent); }
@media (hover: none) { .mk-add button { opacity: .6; } }
.mk-post { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 6px; align-items: center; font-size: 12px; line-height: 1.3; padding: 4px 6px; border-radius: 6px; color: var(--text); border: 1px solid transparent; border-left: 4px solid; background: var(--surface-2); cursor: grab; }
.mk-post:hover { text-decoration: none; filter: brightness(.97); }
.mk-post img { grid-row: 1 / 3; width: 30px; height: 30px; object-fit: cover; border-radius: 4px; }
.mk-post-t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-post-s { color: var(--muted); font-size: 11px; }
.mk-post.mk-pet { border-left-color: #cc0000; background: #fbe6e6; }
.mk-post.mk-tech { border-left-color: #2b55a3; background: #e5ecf8; }
.mk-post.st-draft { background: var(--surface); border-style: dashed; border-left-style: solid; border-color: var(--border); }
.mk-post.mk-pet.st-draft { border-left-color: #cc0000; }
.mk-post.mk-tech.st-draft { border-left-color: #2b55a3; }
.mk-post.st-ready { box-shadow: 0 0 0 2px var(--warn); }
.mk-post.st-posted { opacity: .65; cursor: pointer; }
.mk-post.dragging { opacity: .4; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mk-post.mk-pet { background: #3a1c1c; }
  :root:not([data-theme="light"]) .mk-post.mk-tech { background: #1f2a40; }
  :root:not([data-theme="light"]) .mk-post.st-draft { background: var(--surface); }
}
:root[data-theme="dark"] .mk-post.mk-pet { background: #3a1c1c; }
:root[data-theme="dark"] .mk-post.mk-tech { background: #1f2a40; }
:root[data-theme="dark"] .mk-post.st-draft { background: var(--surface); }
@media (max-width: 860px) {
  .mk-cal { grid-template-columns: minmax(0, 1fr); background: none; border: 0; gap: 6px; }
  .mk-dow, .mk-day.out:not(:has(.mk-post)), .mk-day.past:not(:has(.mk-post)) { display: none; }
  .mk-day { min-height: 0; border: 1px solid var(--border); border-radius: 8px; }
  .mk-day:not(:has(.mk-post)) { flex-direction: row; }
  .mk-add button { opacity: .7; }
  .mk-dow-m { display: inline; }
  .mk-post { font-size: 14px; }
  .mk-post img { width: 40px; height: 40px; }
}

/* Post editor */
.mk-edit { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.mk-side { display: flex; flex-direction: column; gap: 16px; }
.mk-img { display: block; width: 100%; max-height: 320px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.mk-img-empty { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 120px; padding: 12px; border: 2px dashed var(--border); border-radius: 8px; color: var(--muted); font-size: 13px; }
.mk-ai { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.mk-ai .btn { align-self: flex-start; }
.mk-preview img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; margin-bottom: 8px; }
.mk-prev-text { white-space: pre-wrap; font-size: 14px; line-height: 1.45; max-height: 320px; overflow: auto; overflow-wrap: anywhere; }
.mk-prev-btn { display: inline-block; margin-top: 10px; padding: 6px 16px; border: 1px solid var(--border); border-radius: 999px; color: #1a73e8; font-weight: 600; font-size: 14px; }
.mk-prev-btn:empty { display: none; }
.mk-ready-panel { border-left: 4px solid var(--warn); margin-bottom: 16px; }
.mk-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.warn-text { color: var(--danger); font-weight: 600; }
.btn.busy { opacity: .75; cursor: progress; }
.btn.busy::before { content: ""; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: -2px; animation: mk-spin .8s linear infinite; }
@keyframes mk-spin { to { transform: rotate(360deg); } }
@media (max-width: 1000px) { .mk-edit { grid-template-columns: minmax(0, 1fr); } }

/* Batch review */
.mk-batch { display: flex; flex-direction: column; gap: 14px; }
.mk-draft.is-draft { border-style: dashed; }
.mk-draft-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; padding: 14px 16px; }
.mk-draft-title { font-weight: 600; margin-bottom: 6px; }
.mk-draft-side { display: flex; flex-direction: column; gap: 8px; }
.mk-draft-side .mk-img { max-height: 180px; }
.mk-rewrite { display: flex; gap: 6px; }
.mk-rewrite input { flex: 1; min-width: 0; }
@media (max-width: 860px) { .mk-draft-body { grid-template-columns: minmax(0, 1fr); } }

/* Images */
.mk-media-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mk-media-tools .card { margin: 0; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 1000px) { .mk-media-tools { grid-template-columns: minmax(0, 1fr); } }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.mk-tile { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mk-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.mk-tile-meta { font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mk-tile .btn { align-self: flex-start; }

/* Settings */
.mk-conn-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 20px; }
.mk-conn { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; border: 1px solid var(--border); border-radius: 8px; }
.mk-pick { flex-basis: 100%; display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
.mk-pick .btn { align-self: flex-start; }
.mk-howto { margin-top: 16px; border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; background: var(--surface-2); }
.mk-howto summary { cursor: pointer; }
.mk-howto ol { padding-left: 22px; margin: 12px 0; }
.mk-howto li { margin: 0 0 10px; }
.mk-howto code { font-size: 13px; background: var(--surface); padding: 2px 6px; border-radius: 4px; word-break: break-all; }

/* ---------- Texts ---------- */
.tx-wrap { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.tx-list { max-height: calc(100vh - 160px); overflow: auto; }
.tx-item { display: block; padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); }
.tx-item:hover { text-decoration: none; background: var(--surface-2); }
.tx-item.on { background: var(--accent-soft); }
.tx-item.unread strong, .tx-item.unread .tx-prev { font-weight: 700; color: var(--text); }
.tx-top { display: flex; justify-content: space-between; gap: 8px; }
.tx-time { font-size: 12px; white-space: nowrap; }
.tx-prev { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 2px 0 4px; }
.tx-meta { display: flex; gap: 6px; align-items: center; }
.tx-thread { display: flex; flex-direction: column; min-height: 420px; max-height: calc(100vh - 160px); }
.tx-head { display: flex; align-items: center; gap: 10px; justify-content: flex-start; }
.tx-back { display: none; font-size: 20px; color: var(--text); }
.tx-msgs { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 78%; padding: 8px 12px; border-radius: 16px; font-size: 14.5px; line-height: 1.4; }
.bubble.in { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.bubble.out { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.bubble.out a { color: inherit; text-decoration: underline; }
.bubble.waiting { opacity: .65; }
.bubble.failed { background: var(--danger-soft); color: var(--danger); }
.bubble-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble-meta { font-size: 11px; opacity: .75; margin-top: 3px; }
.tx-reply { display: flex; gap: 8px; padding: 10px; border-bottom: 1px solid var(--border); align-items: flex-end; }
.tx-reply textarea { flex: 1; resize: vertical; min-height: 44px; }
.msg-in { border-left: 3px solid var(--accent); }
@media (max-width: 860px) {
  .tx-wrap { grid-template-columns: minmax(0, 1fr); }
  .tx-wrap.has-thread .tx-list { display: none; }
  .tx-wrap:not(.has-thread) .tx-thread { display: none; }
  .tx-back { display: inline; }
  .tx-thread { max-height: none; min-height: 60vh; }
}
.top-texts { position: relative; color: var(--muted); width: 22px; height: 22px; display: block; }
.top-texts .nav-badge { position: absolute; top: -6px; right: -9px; margin: 0; }
@media (max-width: 860px) { .tx-thread { margin-bottom: 76px; } }
.tx-wrap > .card { margin: 0; }

/* ---------- Sign-in security ---------- */
.auth-or { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: var(--muted); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.auth-or[hidden] { display: none; }
.sec-list > li { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; }
.sec-steps { padding-left: 20px; margin: 0; display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.sec-qr { width: 200px; height: 200px; margin: 10px 0; background: #fff; padding: 6px; border-radius: 8px; border: 1px solid var(--border); }
.sec-qr svg { width: 100%; height: 100%; display: block; }
.sec-key { font-size: 15px; letter-spacing: .08em; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; word-break: break-all; }
.sec-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: 360px; }
.sec-codes code { font-size: 16px; letter-spacing: .06em; background: var(--surface-2); padding: 6px 10px; border-radius: 6px; text-align: center; }

/* Scheduling */
.sch-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.sch-when { flex: 0 0 170px; font-size: 14px; }
.sch-what { flex: 1 1 260px; min-width: 0; }
.sch-act { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sch-act form, form.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.sch-h { font-size: 1rem; margin: 22px 0 8px; }
.sch-h:first-child { margin-top: 0; }
.sch-plain { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; font-size: 14px; }
.sch-fs { border: 0; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.sch-fs legend { font-weight: 600; font-size: 13px; margin-bottom: 4px; width: 100%; }
.sch-fs .hint { width: 100%; }
.sch-fs input[type=time] { width: auto; display: inline-block; }
.sch-add { margin: 6px 0 4px; }
.sch-hours { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; align-items: center; }
.sch-meet { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin: 0 0 8px; font-size: 14px; }
.sch-meet.off { opacity: .7; }
.sch-meet details { margin-top: 6px; }
@media (max-width: 600px) { .sch-when { flex-basis: 100%; } .sch-hours { grid-template-columns: 1fr; } }
.sch-sec { border-bottom: 1px solid var(--border); }
.sch-sec:last-child { border-bottom: 0; }
.sch-sec > summary { padding: 14px 16px; }
.sch-sec > summary h2 { font-size: 1rem; margin: 0; }
.sch-sec > summary:hover { background: var(--surface-2); }
.sch-sec > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sch-sec-body { padding: 0 16px 16px; }
.sch-tools { padding: 10px 16px 0; margin: 0; }

/* Email attachments */
.attach { margin-top: 8px; }
.attach-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.attach-pick { cursor: pointer; }
.attach-hint { font-size: 13px; }
.attach-own { position: relative; }
.attach-own-list { position: absolute; z-index: 5; background: var(--surface, #fff); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-top: 4px; max-height: 240px; overflow: auto; min-width: 260px; box-shadow: 0 6px 18px rgba(0,0,0,.12); display: grid; gap: 4px; }
.attach-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.attach-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.attach-item img { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); }
.attach-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.too-big { color: var(--danger); }
.attach-total { font-size: 12px; }
form[data-composer].dropping { outline: 2px dashed var(--accent); outline-offset: 4px; }
.msg-files { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0; font-size: 13px; }
.bubble.email { max-width: 92%; }
.bubble-subj { font-weight: 600; font-size: 13px; margin-bottom: 2px; }

/* Business signature (Documents) and document preview additions */
.sig-tabs { display: inline-flex; gap: 2px; border: 1px solid var(--border); border-radius: 8px; padding: 3px; margin: 4px 0 8px; }
.sig-tabs button { font: inherit; font-size: 13px; font-weight: 600; border: 0; background: none; padding: 4px 12px; border-radius: 6px; color: var(--muted); cursor: pointer; }
.sig-tabs button.on { background: var(--accent); color: #fff; }
.sig-pad-wrap { position: relative; background: #fff; border: 2px dashed #e3a5a5; border-radius: 8px; max-width: 560px; }
.sig-pad-wrap.has-error { border-color: var(--danger); }
.sig-pad { display: block; width: 100%; height: 150px; touch-action: none; cursor: crosshair; }
.sig-pad-hint { position: absolute; left: 0; right: 0; bottom: 26px; text-align: center; color: #b9a5a5; pointer-events: none; font-size: 14px; }
.sig-pad-hint.hide { visibility: hidden; }
.sig-clear { position: absolute; top: 6px; right: 6px; }
.doc-sig-now { margin: 0 0 12px; }
.doc-sig-now img { display: block; max-width: 240px; max-height: 64px; border-bottom: 1px solid #333; }
.pv-li { display: flex; gap: 6px; }
.pv-li-1 { margin-left: 22px; }
.pv-li > span:first-child { flex: 0 0 20px; text-align: right; }
.pv-break { border: 0; border-top: 2px dashed var(--border); margin: 18px 0; }
.pv-counter { margin: 12px 0; }
.pv-counter img { display: block; max-width: 200px; max-height: 54px; border-bottom: 1px solid #333; }
.ttpp-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 10px; }
.ttpp-table th, .ttpp-table td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.ttpp-table th { font-size: 12px; color: var(--muted); font-weight: 600; }

/* Website chat bubble icon picker (Forms) */
.chat-icons { display: flex; flex-wrap: wrap; gap: 12px; }
.chat-icon-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-weight: 400; cursor: pointer; }
.chat-icon-opt input { margin: 0; }
.chat-icon-prev { display: inline-flex; align-items: center; gap: 8px; background: #cc0000; color: #fff; border-radius: 999px; padding: 9px 16px 9px 11px; font-weight: 600; font-size: 15px; }
.chat-icon-prev svg { width: 24px; height: 24px; }
.chat-icon-prev.logo { background: #fff; color: #cc0000; border: 2px solid #cc0000; padding: 5px 14px 5px 8px; }
.chat-icon-prev img { width: 30px; height: 30px; object-fit: contain; }

/* Email icon in message lists */
.mail-ic { display: inline-flex; vertical-align: -2px; color: #0063a5; }
.mail-ic svg { width: 15px; height: 15px; }

/* Pipeline layout switch and the "Rows" layout: stages stacked, cards side by side */
.layout-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.layout-seg a { padding: 7px 12px; font-size: 14px; font-weight: 600; color: var(--muted); background: var(--surface); text-decoration: none; }
.layout-seg a + a { border-left: 1px solid var(--border); }
.layout-seg a.on { background: var(--surface-2); color: var(--text); }
.board.rows { display: block; overflow: visible; scroll-snap-type: none; }
.board.rows .column { max-height: none; margin-bottom: 12px; }
.board.rows .column-head { font-size: 14px; }
.board.rows .column-body { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; min-height: 56px; overflow: visible; }
.board.rows .kcard { width: 260px; margin: 0; }
@media (max-width: 640px) { .board.rows .kcard { width: 100%; } }
.badge.email { background: #0063a5; color: #fff; }
.badge.email .mail-ic { color: #fff; }
.badge .mail-ic svg { width: 13px; height: 13px; }

/* Contact page → Meetings: the "Send scheduling link" / "Schedule it yourself" forms open full width,
   stacked (they were being laid out in one row and cut off by the card). */
.sch-act details[open] { flex-basis: 100%; }
.sch-act details form { display: block; }
.sch-act details .row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.sch-act details input, .sch-act details select { max-width: 100%; }

/* Pop-up forms */
dialog.dlg { border: 0; border-radius: 12px; padding: 18px 20px; width: min(520px, calc(100vw - 24px)); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog.dlg::backdrop { background: rgba(0,0,0,.35); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.dlg-head h2 { margin: 0; font-size: 1.1rem; }
.dlg-x { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; }
.dlg .form-actions { justify-content: flex-end; gap: 8px; }
.card-head .btn.small svg { width: 14px; height: 14px; }

/* Contact page: resizable columns */
.grid-2.contact-cols { grid-template-columns: minmax(0, var(--left, 340px)) 8px minmax(0, 1fr); gap: 0 8px; }
.col-resizer { align-self: stretch; cursor: col-resize; border-radius: 4px; position: relative; min-height: 200px; touch-action: none; }
.col-resizer::after { content: ''; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; border-radius: 2px; background: var(--border); transition: background .15s; }
.col-resizer:hover::after, .col-resizer:focus-visible::after, .contact-cols.resizing .col-resizer::after { background: var(--accent); }
.contact-cols.resizing { user-select: none; cursor: col-resize; }
@media (max-width: 1000px) { .grid-2.contact-cols { grid-template-columns: minmax(0, 1fr); gap: 16px; } .col-resizer { display: none; } }
.head-btns { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.dlg .picker-results { position: absolute; }

/* Birthday messages */
.bq { display: grid; gap: 6px; }
.bq-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.bq textarea, .bq-lib textarea { width: 100%; font-size: 14px; }
.bq-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.bq-actions select { width: auto; }
.bq.sent, .bq.missed { opacity: .75; }
.bq-lib { display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 8px; align-items: center; }
@media (max-width: 700px) { .bq-lib { grid-template-columns: 1fr; } }

/* Proposal form */
dialog.dlg.dlg-wide { width: min(760px, calc(100vw - 24px)); }
.pr-items { width: 100%; border-collapse: collapse; }
.pr-items th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 4px; }
.pr-items td { padding: 3px 4px; }
.pr-items td:nth-child(2) input { width: 100px; }
.pr-items td:nth-child(3) input { width: 60px; }
.pr-items .pr-sub { text-align: right; white-space: nowrap; font-size: 14px; }
.pr-totals { font-size: 14px; margin: 4px 0 12px; }
.addr-links { margin-top: 4px; font-size: 13px; }
.team-map { height: 380px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); z-index: 0; }
.flash.came-back { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.flash.came-back form { display: inline-flex; gap: 6px; }
.other-staff { display: grid; gap: 4px; max-height: 260px; overflow: auto; }
#appointments, #leads { scroll-margin-top: 16px; }
.list-status { display: inline-block; margin-top: 4px; font-size: 12px; }
.sms-preview { white-space: pre-wrap; font: inherit; font-size: 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin: 0; }
.checklist .cl-section { border: 0; padding: 0; margin: 0 0 18px; }
.checklist legend { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.checklist .cl-item { display: flex; gap: 10px; align-items: flex-start; padding: 7px 4px; border-radius: 8px; cursor: pointer; font-size: 15px; }
.checklist .cl-item:hover { background: var(--surface-2); }
.checklist .cl-item input { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.checklist .cl-item input:checked + span { color: var(--ok); }
/* Checklist: notes in a tall column to the right that stays in view while scrolling (stacked on phones) */
.cl-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.cl-notes { position: sticky; top: 16px; margin: 0; display: flex; flex-direction: column; }
.cl-notes textarea { min-height: 360px; height: calc(100vh - 220px); resize: vertical; }
@media (max-width: 860px) {
  .cl-grid { grid-template-columns: minmax(0, 1fr); }
  .cl-notes { position: static; }
  .cl-notes textarea { height: auto; min-height: 180px; }
}
.cl-grid.cl-notes-only { grid-template-columns: minmax(0, 1fr); }
.cl-grid.cl-notes-only .cl-notes { position: static; }
/* A button that looks like a link (e.g. "Save to Google Contacts" next to the phone number) */
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.linklike:hover { text-decoration: underline; }
/* Alerts page */
.alert-list { list-style: none; margin: 0; padding: 0; }
.alert-day { padding: 10px 16px 4px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.alert-row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--border); }
.alert-row.new { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.alert-main { min-width: 0; }
.alert-body { font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.alert-meta { font-size: 13px; margin-top: 4px; }
/* Notes fold open and closed (newest open) */
.note-tools { padding: 0 16px 8px; font-size: 13px; text-align: right; }
.note-fold > summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
.note-fold > summary::-webkit-details-marker { display: none; }
.note-fold > summary::before { content: '▸'; color: var(--muted); margin-right: -4px; transition: transform .15s; }
.note-fold[open] > summary::before { transform: rotate(90deg); }
.note-fold > summary .note-title { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-fold[open] > summary .note-title { white-space: normal; }
.note-fold > summary .note-when { font-size: 12px; white-space: nowrap; }
.note-fold[open] > summary { margin-bottom: 6px; }
/* Interview questions on the checklist */
.cl-qstate { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-bottom: 14px; }
.cl-questions { border: 0; padding: 0; margin: 18px 0 0; }
.cl-items .cl-qstate { margin-top: 18px; padding: 12px 14px; border: 1px dashed var(--border); border-radius: var(--radius); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cl-questions legend { font-weight: 700; font-size: 17px; margin-bottom: 8px; }
.cl-q { padding: 12px 0; border-top: 1px solid var(--border); }
.cl-q-text { display: block; font-size: 15px; line-height: 1.45; }
.cl-q-num { color: var(--accent); font-weight: 700; }
.cl-q-why { font-size: 12.5px; font-style: italic; margin: 3px 0 6px; }
.cl-q textarea { width: 100%; margin-top: 4px; }
.cl-grid.cl-notes-only.has-q .cl-notes textarea { height: auto; min-height: 160px; }
.note-fold[open] > summary .note-title { visibility: hidden; }
/* Nov 12 2026: lists whose line isn't repeated in the body keep their title when open */
.al-fold[open] > summary .note-title, .tk-fold[open] > summary .note-title, .pjm-fold[open] > summary .note-title, .txm-fold[open] > summary .note-title, .out-fold[open] > summary .note-title { visibility: visible; }
/* Contacts list: compact header (title + saved searches, then types + search + Filters) */
.cl-head { align-items: center; gap: 12px; }
.cl-head h1 { margin-right: 4px; }
.cl-head .saved-row { flex: 1; margin: 0; min-width: 0; }
.cl-head .save-search { margin: 0; position: relative; }
.save-search-form { position: absolute; z-index: 20; top: 26px; left: 0; display: flex; gap: 8px; width: 380px; max-width: 80vw; background: var(--card, #fff); padding: 10px; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.cl-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.cl-bar .chips { margin: 0; }
.cl-search { display: flex; gap: 8px; align-items: center; flex: 1; min-width: 260px; justify-content: flex-end; }
.cl-search input[type=search] { flex: 1; max-width: 420px; min-width: 0; }
.cl-filters { position: relative; }
.cl-filters > summary { list-style: none; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.cl-filters > summary::-webkit-details-marker { display: none; }
.cl-filter-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 300px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.cl-filter-panel label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.cl-filter-panel select { width: 100%; }
@media (max-width: 860px) {
  .cl-head { flex-wrap: wrap; }
  .cl-head .saved-row { flex-basis: 100%; order: 3; }
  .cl-bar .chips { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: 2px; }
  .cl-search { min-width: 0; flex-basis: 100%; }
  .cl-search input[type=search] { max-width: none; }
  .cl-filter-panel { width: min(300px, calc(100vw - 32px)); }
}
.cl-head .save-search > summary { list-style: none; }
.cl-head .save-search > summary::-webkit-details-marker { display: none; }
.field-error { color: var(--danger); font-size: 12.5px; margin-top: 4px; }
/* Message history folds (one line each: type, status, who, when, preview) */
.msg-fold > summary { list-style: none; cursor: pointer; }
.msg-fold > summary::-webkit-details-marker { display: none; }
.msg-fold > summary .msg-head::before { content: '▸'; color: var(--muted); margin-right: 2px; display: inline-block; transition: transform .15s; }
.msg-fold[open] > summary .msg-head::before { transform: rotate(90deg); }
.msg-preview { font-size: 13px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-fold[open] > summary .msg-preview { display: none; }
/* Support tickets */
.tk-new { position: relative; }
.tk-new > summary { list-style: none; cursor: pointer; }
.tk-new > summary::-webkit-details-marker { display: none; }
.tk-new-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(460px, calc(100vw - 32px)); box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.tk-p-emergency { background: #fde4e4; color: #a31515; } .tk-p-high { background: #fff1d6; color: #8a5300; } .tk-p-low { background: #eee; color: #555; }
.tk-s-new { background: #fde4e4; color: #a31515; } .tk-s-in_progress { background: #e7f0fe; color: #1a4fa0; } .tk-s-waiting { background: #fff4d6; color: #8a5a00; }
.tk-s-resolved { background: #e6f4ea; color: #1e6b34; } .tk-s-closed { background: #eee; color: #555; }
.tk-late { color: var(--danger); font-weight: 600; }
.tk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.tk-side { display: flex; flex-direction: column; gap: 12px; }
.tk-side .card { margin: 0; }
.tk-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; }
.tk-meta select { width: auto; }
.tk-ev { padding: 10px 0; border-bottom: 1px solid var(--border); }
.tk-ev:last-child { border-bottom: 0; }
.tk-ev-head { font-size: 13px; margin-bottom: 4px; }
.tk-ev-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.tk-ev-note, .tk-ev-time { background: color-mix(in srgb, #fff4d6 50%, transparent); padding: 10px; border-radius: 8px; border-bottom: 0; margin: 6px 0; }
.tk-ev-reply_in { border-left: 3px solid var(--accent); padding-left: 10px; }
.tk-ev-status .tk-ev-body, .tk-ev-priority .tk-ev-body { color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .tk-grid { grid-template-columns: minmax(0, 1fr); } }
/* Campaigns */
.cp-form .card { margin-bottom: 12px; }
.cp-who { margin-top: 6px; padding: 10px 12px; background: var(--bg, #f6f4ef); border-radius: 8px; }
.cp-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.cp-thumb { padding: 0; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; aspect-ratio: 1; overflow: hidden; }
.cp-thumb:hover, .cp-thumb:focus-visible { border-color: var(--accent); }
.cp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cp-actions input[type=datetime-local] { width: auto; }
.cp-spacer { flex: 1; }
.cp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cp-tiles .card { margin: 0; }
.cp-tiles strong { font-size: 22px; }
.cp-sent-body { white-space: pre-wrap; font-size: 14px; overflow-wrap: anywhere; }
.cp-draft { } .badge.cp-sending, .badge.cp-scheduled { background: #e7f0fe; color: #1a4fa0; } .badge.cp-sent { background: #e6f4ea; color: #1e6b34; } .badge.cp-paused { background: #fff4d6; color: #8a5a00; } .badge.cp-cancelled { background: #eee; color: #555; }
.badge.rp-missing, .badge.rp-late { background: #fde4e4; color: #a31515; } .badge.rp-soon { background: #fff4d6; color: #8a5a00; }
/* Task attachments */
.tf-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.tf-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; display: block; }
.tf-icon { width: 56px; text-align: center; font-size: 26px; }
.tf-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
/* Supplies */
.sup-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 8px 12px; }
.sup-row .sup-name { flex: 2 1 180px; } .sup-row .sup-qty { flex: 0 1 90px; } .sup-row .sup-notes { flex: 3 1 200px; } .sup-row .sup-sizes { flex: 1 1 120px; }
.sup-row .check { white-space: nowrap; font-size: 13px; }
.sup-btns { display: flex; gap: 6px; align-items: center; }
.sup-give { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.sup-line { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.sup-line .check { flex: 1 1 180px; margin: 0; }
.sup-line input[type=number] { width: 72px; }
.sup-line select { width: auto; }

/* Sidebar folders (Arrange the menu) */
.nav-folder > summary { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); font-weight: 500; cursor: pointer; list-style: none; }
.nav-folder > summary::-webkit-details-marker { display: none; }
.nav-folder > summary:hover { background: var(--surface-2); }
.nav-folder > summary.has-on { color: var(--accent); }
.nav-folder > summary svg { width: 18px; height: 18px; flex: none; }
.nav-folder > summary .chev { margin-left: auto; display: flex; transition: transform .15s; color: var(--muted); }
.nav-folder > summary .chev svg { width: 14px; height: 14px; }
.nav-folder[open] > summary .chev { transform: rotate(90deg); }
.nav-folder[open] > summary .nav-badge { display: none; }
.nav-folder > summary .nav-badge + .chev { margin-left: 6px; }
.nav-folder-items { padding-left: 14px; border-left: 1px solid var(--border); margin-left: 18px; }
.nav-collapsed .nav-folder-items { padding-left: 0; margin-left: 0; border-left: 0; }
.nav-collapsed .nav-folder > summary .chev { display: none; }
/* Pipelines: the word opens the overview, the arrow shows each pipeline */
.nav-sub > summary { padding: 0 10px 0 0; gap: 0; }
.nav .nav-sub > summary > a.nav-sub-link { flex: 1; min-width: 0; }
.nav .nav-sub > summary > a.nav-sub-link:hover { background: none; }
.nav-sub > summary .chev { padding: 6px 2px 6px 8px; }
.nav-sub .nav-folder-items a { padding: 6px 10px; font-size: 14px; }
.nav .lbl { min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
/* Drag the menu's right edge to resize it (desktop; remembered on this device) */
.side-resize { position: absolute; top: 0; right: -4px; width: 8px; height: 100%; cursor: col-resize; z-index: 5; }
.side-resize:hover, .side-resize.dragging { background: linear-gradient(to right, transparent 3px, var(--accent) 3px, var(--accent) 5px, transparent 5px); }
.nav-collapsed .side-resize { display: none; }
html.side-resizing, html.side-resizing * { cursor: col-resize !important; user-select: none; }
html.side-resizing .sidebar { transition: none; }
@media (max-width: 860px) { .side-resize { display: none; } }
.nav-collapsed .nav-sub .nav-folder-items { display: none; }
.menu-edit { color: var(--muted) !important; font-size: 13px; }
.menu-tree, .mt-kids { list-style: none; margin: 0; padding: 0; }
.mt-kids { margin-left: 22px; border-left: 2px solid var(--border); padding-left: 8px; }
.mt-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); margin: 4px 0; flex-wrap: wrap; }
.mt-folder > .mt-row { background: var(--surface-2); font-weight: 600; }
.mt-grip { cursor: grab; color: var(--muted); font-size: 16px; user-select: none; }
.mt-label { flex: 1; min-width: 120px; }
.mt-name { flex: 1; min-width: 120px; padding: 4px 8px; }
.mt-acts { display: flex; gap: 4px; align-items: center; margin-left: auto; }
.mt-acts select { max-width: 170px; padding: 4px 6px; font-size: 13px; }
.mt-empty { color: var(--muted); font-size: 13px; padding: 8px; border: 1px dashed var(--border); border-radius: 8px; margin: 4px 0; }
.mt-over > .mt-row, li.mt-empty.mt-over { outline: 2px solid var(--accent); }

/* The menu scrolls between the top (logo, search, business switch) and the bottom (your name, Sign out). */
.sidebar .side-menu { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -6px; padding: 0 6px 8px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.sidebar .side-menu::-webkit-scrollbar { width: 6px; }
.sidebar .side-menu::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.sidebar .spacer { flex: 0 0 0; }
.sidebar .side-top, .sidebar .side-search, .sidebar .ws-switch, .sidebar .who { flex: none; }

/* Contact page: foldable sections */
.cfold-head { cursor: pointer; user-select: none; }
.card-head.cfold-head { justify-content: flex-start; gap: 8px; }
.card-head.cfold-head > h2 { margin-right: 0; }
.card-head.cfold-head > .head-btns, .card-head.cfold-head > a, .card-head.cfold-head > span.muted { margin-left: auto; }
.cfold-head .fold-chev { transform: rotate(45deg); margin-left: 6px; }
[data-cfold].cfolded > .cfold-head .fold-chev, [data-cfold].cfolded > * > .cfold-head .fold-chev { transform: rotate(-45deg); }
[data-cfold].cfolded > [data-cfold-body] { display: none !important; }
.cfold-count { display: none; font-size: 12px; font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-cfold].cfolded > .cfold-head .cfold-count { display: inline; }
.status-box .cfold-head { display: flex; align-items: center; gap: 8px; }
.status-box .cfold-head .fold-chev { margin-left: auto; }
.status-box.cfolded .cfold-count { margin-left: 4px; }
.profile.cfold-head { position: relative; }
.profile.cfold-head .fold-chev { position: absolute; right: 2px; top: 8px; }

/* Process map */
.pm-pipes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.pm-pipe { color: var(--text); display: block; }
.pm-pipe:hover { text-decoration: none; border-color: var(--accent); }
.pm-mini { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 10px; font-size: 12px; }
.pm-mini span { background: var(--surface-2); border-radius: 6px; padding: 2px 6px; color: var(--muted); }
.pm-mini span.busy { color: var(--text); }
.pm-mini b { color: var(--muted); font-weight: 400; }
.pm-flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; margin: 12px 0 4px; }
.pm-stage { display: flex; flex-direction: column; gap: 2px; min-width: 130px; max-width: 200px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.pm-stage:hover { text-decoration: none; border-color: var(--accent); }
.pm-stage.busy { border-left: 4px solid var(--accent); }
.pm-stage.on { background: var(--accent-soft); border-color: var(--accent); }
.pm-stage-name { font-weight: 600; font-size: 14px; }
.pm-stage-meta { font-size: 12px; color: var(--muted); }
.pm-stage-to { font-size: 12px; color: var(--accent); }
.pm-arrow { align-self: center; color: var(--muted); font-size: 18px; }
.pm-panel { margin-top: 12px; }
.pm-group { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 0 6px; }
.pm-group:first-child { margin-top: 0; }
.pm-rule { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.pm-rule.off { opacity: .6; }
.pm-rule-head { font-size: 14px; display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; }
.pm-edit { margin-left: auto; font-size: 12px; }
.pm-steps { margin: 8px 0 0; padding-left: 22px; display: grid; gap: 4px; }
.pm-steps li { font-size: 14px; }
.pm-step { font: inherit; text-align: left; background: none; border: 0; padding: 2px 4px; margin: -2px -4px; border-radius: 6px; color: var(--accent); cursor: pointer; }
.pm-step:hover { background: var(--accent-soft); }
.pm-step.plain { color: var(--text); cursor: default; }
.pm-wait .pm-step { color: var(--muted); }
.pm-from { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.pm-frame { width: 100%; height: 60vh; border: 1px solid var(--border); border-radius: 8px; margin-top: 8px; background: #fff; }
.pm-print-detail { font-size: 13px; color: var(--muted); margin: 2px 0 6px; }
@media (max-width: 860px) {
  .pm-flow { flex-direction: column; }
  .pm-stage { max-width: none; }
  .pm-arrow { transform: rotate(90deg); }
}
@media print {
  .sidebar, .topbar, .tabbar, .no-print, .fold-tools { display: none !important; }
  .pm-panel { break-inside: avoid; }
  .pm-step { color: inherit; }
}
[data-cfold].cfolded > .cfold-head > .head-btns { display: none; }
.status-box .cfold-head { flex-wrap: wrap; }
.status-box .cfold-head .fold-chev { order: 2; }
.status-box.cfolded .cfold-count { order: 3; flex-basis: 100%; margin-left: 0; font-weight: 500; }

/* Marketing calendar: status pills and filter */
.mk-pill { display: inline-block; font-size: 10.5px; font-weight: 600; line-height: 1.5; padding: 0 6px; border-radius: 999px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mk-pill-draft { background: #ececec; color: #555; }
.mk-pill-scheduled { background: #dfe9fb; color: #1f4a99; }
.mk-pill-failed { background: #fde2e2; color: #b42318; }
.mk-pill-posted { background: #dff3e4; color: #1b6b34; }
.mk-post.st-ready { outline: 2px solid #e5484d; outline-offset: -1px; }
.mk-status-chips { margin: 8px 0 10px; }
.mk-chip-failed .n { background: #fde2e2; color: #b42318; }
.mk-legend .mk-pill { vertical-align: 1px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mk-pill-draft { background: #3a3a3a; color: #ddd; }
  :root:not([data-theme="light"]) .mk-pill-scheduled { background: #1d2f52; color: #b9cdf5; }
  :root:not([data-theme="light"]) .mk-pill-failed { background: #4a1f1f; color: #f5b5b5; }
  :root:not([data-theme="light"]) .mk-pill-posted { background: #1c3a26; color: #b5e3c2; }
}
:root[data-theme="dark"] .mk-pill-draft { background: #3a3a3a; color: #ddd; }
:root[data-theme="dark"] .mk-pill-scheduled { background: #1d2f52; color: #b9cdf5; }
:root[data-theme="dark"] .mk-pill-failed { background: #4a1f1f; color: #f5b5b5; }
:root[data-theme="dark"] .mk-pill-posted { background: #1c3a26; color: #b5e3c2; }

/* Process map: folding boxes */
details.pm-rule > summary { list-style: none; cursor: pointer; }
details.pm-rule > summary::-webkit-details-marker { display: none; }
details.pm-rule > summary .fold-chev { transform: rotate(-45deg); margin: 0 6px 0 0; align-self: center; }
details.pm-rule[open] > summary .fold-chev { transform: rotate(45deg); }
.pm-nsteps { margin-left: auto; font-size: 12px; }
details.pm-rule .pm-edit { display: inline-block; margin-top: 6px; }
details.pm-other > summary { list-style: none; cursor: pointer; }
details.pm-other > summary::-webkit-details-marker { display: none; }
details.pm-other > summary .fold-chev { transform: rotate(-45deg); margin-left: auto; }
details.pm-other[open] > summary .fold-chev { transform: rotate(45deg); }
.pm-all { margin-left: 12px; font-size: 13px; }
.mk-post img { grid-column: 1; }
.mk-post .mk-post-t, .mk-post .mk-pill { grid-column: 2; justify-self: start; }
.mk-post .mk-pill { margin-top: 2px; }
.mk-failed-panel { border-left-color: #e5484d !important; }
.pm-pipes > .card { margin-top: 0; }
/* Reports → AI usage */
.au-meter { height: 6px; border-radius: 3px; background: var(--surface-2); margin-top: 8px; overflow: hidden; }
.au-meter span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.au-chart { width: 100%; height: auto; display: block; }
.au-base { stroke: var(--border); stroke-width: 1; }
.au-fill { fill: var(--accent); }
.au-bar.est .au-fill { fill: var(--accent); opacity: .45; }
.au-hit { fill: transparent; }
.au-bar:hover .au-hit { fill: var(--surface-2); }
.au-tick { font-size: 11px; fill: var(--muted); }
/* Stop & close out */
.co-list { margin: 0 0 14px; padding-left: 18px; font-size: 14px; display: grid; gap: 6px; }
.co-list ul { margin: 2px 0 0; padding-left: 18px; color: var(--muted); }
.co-msg { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px 12px; margin: 12px 0 0; }
.co-msg legend { padding: 0 6px; }
.pp-past { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 8px; font-size: 13px; }
.pp-past summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.pp-trail { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.pp-trail .end { color: var(--muted); }
/* Settings → Logins: rights */
#logins { grid-column: 1 / -1; } /* room for the rights table */
.rights-box .check { align-items: flex-start; }
.rights-box .check input { flex: none; margin-top: 2px; }
.rights-box { margin-top: 10px; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; }
.rights-box > summary { cursor: pointer; }
.rights-table td:not(:first-child), .rights-table th:not(:first-child) { text-align: center; width: 90px; }
/* Onsite evaluation (phone) */
.ev-score { position: sticky; top: 0; z-index: 3; margin-bottom: 12px; }
.ev-section { border: 0; padding: 0; margin: 0 0 18px; }
.ev-section legend { font-weight: 700; font-size: 17px; margin-bottom: 6px; }
.ev-q { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; scroll-margin-top: 70px; }
.ev-q-text { font-weight: 600; margin-bottom: 8px; }
.ev-answers { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ev-opt { flex: 1 1 0; min-width: 72px; }
.ev-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ev-opt span { display: block; text-align: center; padding: 12px 6px; border: 2px solid var(--border); border-radius: 10px; font-weight: 600; cursor: pointer; }
.ev-opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.ev-opt.na input:checked + span { border-color: var(--muted); background: var(--surface-2); color: var(--text); }
.ev-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.ev-q textarea { width: 100%; min-height: 38px; }
.ev-photos { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.ev-photos img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.sf-entry { border-left: 4px solid var(--border); padding-left: 10px; }
.sf-entry.k-verbal_warning, .sf-entry.k-written_warning, .sf-entry.k-final_warning, .sf-entry.k-suspension { border-left-color: var(--danger, #b00020); }
.sf-entry.k-commendation { border-left-color: #2e7d32; }
.sf-entry.k-evaluation, .sf-entry.k-appraisal { border-left-color: var(--accent); }
.sf-amend { margin: 8px 0 0 12px; padding-left: 10px; border-left: 2px dashed var(--border); font-size: 13px; }

/* Copy buttons left of email / phone on the contact page */
.copy-btn { background: none; border: 1px solid var(--line, #ddd); border-radius: 6px; padding: 0 5px; margin-right: 6px; font-size: 12px; line-height: 20px; min-width: 26px; cursor: pointer; vertical-align: 1px; }
/* Nov 14 2026: copy the contact's name / business name; the name itself can be selected (it sits in the fold header). */
.name-copy { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.name-copy .copy-btn { margin-right: 0; padding: 0 7px; }
.cfold-head h1 { user-select: text; -webkit-user-select: text; cursor: text; }
.copy-btn:hover { background: var(--hover, #f4f1ec); }
.kv dd.kv-copy { display: flex; align-items: flex-start; }
.kv dd.kv-copy > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.kv dd.kv-copy .copy-btn { flex: none; margin-top: 1px; }

/* History line linked from a message status icon */
.timeline li.hl { background: var(--accent-soft); border-radius: 6px; }
.timeline li[id^="act-"], .convo .msg { scroll-margin-top: 90px; }
.badge.msg-opened { text-decoration: none; }
a.badge { text-decoration: none; }

/* About page */
.about-news { border-top: 1px solid var(--border); padding: 8px 0; }
.about-news > summary { cursor: pointer; }
.about-news ul { margin: 6px 0 0; padding-left: 20px; font-size: 14px; }
.about-glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.about-cost { border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.about-cost h3 { margin: 0; font-size: 15px; }
.about-cost .v { font-size: 1.4rem; font-weight: 700; }
.about-cost .v span { font-size: 13px; font-weight: 500; color: var(--muted); }
.about-cost .b { font-size: 14px; }
.about-cost.ok { border-left-color: #2e7d4f; }
.about-cost.warn { border-left-color: #c98a00; }
.about-cost.bad { border-left-color: var(--danger, #cc0000); }
.stat.warn { border-color: #c98a00; }

/* Onboarding progress (contact page and pipeline cards) */
.ob-bar { flex: 1; max-width: 220px; height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-left: auto; }
.ob-bar > span { display: block; height: 100%; background: #2e7d4f; border-radius: 999px; }
.ob-steps { list-style: none; margin: 0; padding: 6px 14px 12px; }
.ob-steps li { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.ob-steps li:last-child { border-bottom: 0; }
.ob-ic { flex: none; width: 20px; text-align: center; }
.ob-label { flex: 1; min-width: 0; }
.ob-when { flex: none; font-size: 12px; color: var(--muted); text-align: right; }
.ob-when.overdue { color: var(--danger, #cc0000); font-weight: 600; }
.ob-steps .ob-done .ob-label { color: var(--muted); }
.ob-steps .ob-current { font-weight: 600; }
.ob-steps .ob-todo .ob-label, .ob-steps .ob-scheduled .ob-label { color: var(--muted); }
.ob-steps .ob-warn .ob-label { color: var(--danger, #cc0000); }
.kcard .ob-card { margin-top: 6px; font-size: 12px; }
.kcard .ob-card .ob-bar { display: block; max-width: none; margin: 3px 0 0; height: 6px; }
.kcard .ob-card .overdue { color: var(--danger); font-weight: 600; }
.ob-steps a { color: inherit; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.ob-steps a:hover { text-decoration-color: currentColor; }
.tr-invite { font-size: 13px; margin: 4px 0 2px; color: var(--text); }
.tr-invite .overdue { color: var(--danger); font-weight: 600; }
.kcard a.ob-next { color: inherit; text-decoration: underline; text-decoration-color: var(--border); }
.kcard a.ob-next.overdue { color: var(--danger); }
/* Contact page right column: the tabs section (collapsible), then Onboarding */
.col-right { min-width: 0; }
.tabs-card { position: relative; }
.tabs-card > nav.tabs { padding-right: 44px; }
.tabs-fold { position: absolute; top: 8px; right: 6px; z-index: 2; background: var(--surface); border: 0; border-radius: 6px; width: 34px; height: 34px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.tabs-fold:hover { background: var(--surface-2); }
.tabs-fold .fold-chev { transform: rotate(45deg); }
.tabs-card.tabs-closed .tabs-fold .fold-chev { transform: rotate(-45deg); }
.tabs-card.tabs-closed > :not(nav.tabs):not(.tabs-fold) { display: none; }
/* About → Full history */
.hist-search { width: 100%; max-width: 420px; margin: 0 0 10px; }
.hist-day { border-top: 1px solid var(--border); padding: 8px 0; }
.hist-day > summary { cursor: pointer; }
.hist-v { margin: 8px 0 4px 14px; }
.hist-vh { font-size: 13px; }
.hist-v ul { margin: 4px 0 0; padding-left: 20px; font-size: 14px; }

/* A task shown inside a pop-up (iframe): just the page, no menus */
body.embed .sidebar, body.embed .topbar, body.embed .tabbar, body.embed .nav-backdrop, body.embed .crumb { display: none !important; }
body.embed .app { display: block; }
body.embed .main { padding: 14px; max-width: none; margin: 0; }
dialog.task-pop { width: min(760px, 96vw); height: min(88vh, 900px); padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; }
dialog.task-pop::backdrop { background: rgba(0,0,0,.35); }
.task-pop-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface); }
.task-pop iframe { width: 100%; height: calc(100% - 46px); border: 0; display: block; background: var(--bg, #f6f3ee); }
@media (max-width: 640px) { dialog.task-pop { width: 100vw; height: 100dvh; max-width: none; max-height: none; border-radius: 0; } }

/* Settings → Appearance */
.theme-pick { display: grid; gap: 8px; margin-bottom: 4px; }
.theme-opt { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.theme-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.theme-hint { font-size: 13px; flex-basis: 100%; padding-left: 24px; margin-top: -4px; }

/* Home → Appointments: one-line header (short "Add" button on phones) */
.head-sub { font-size: 12px; font-weight: 400; margin-left: 6px; }
.ph-only { display: none; }
@media (max-width: 640px) { .ph-only { display: inline; } .ph-hide { display: none; } }

/* Phone home screen: tiles only (the computer keeps the dashboard sections) */
.phone-only { display: none; }
@media (max-width: 640px) {
  .phone-only { display: block; }
  .desk-only { display: none !important; }
}
.dt-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; }
.dt-grid { display: block; }
.dt-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin-bottom: 6px; }
.dash-tiles.arranging .dt-row { outline: 1px dashed var(--border); outline-offset: 2px; border-radius: 10px; min-height: 74px; }
.dt-row.dt-full { animation: dt-shake .3s; }
@keyframes dt-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.dt-newrow { border: 2px dashed var(--accent); border-radius: 10px; color: var(--accent); text-align: center; padding: 18px 8px; font-size: 13px; margin-bottom: 6px; }
.dt-newrow.over { background: var(--accent-soft, rgba(204,0,0,.06)); }
.dt-grid .dt { position: relative; min-height: 74px; display: flex; flex-direction: column; justify-content: center; text-align: center; padding: 6px 4px; user-select: none; -webkit-user-select: none; }
.dt-grid .dt[hidden] { display: none; }
.dt-grid .v { font-size: 1.1rem; font-weight: 700; line-height: 1.2; }
.dt-grid .v svg { width: 22px; height: 22px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dt-grid .l { font-size: 11px; line-height: 1.25; color: var(--muted); }
.dt-grid .dt-l, .dt-grid .dt-sub { display: block; }
.dt-grid .dt-sub.red { color: var(--danger); }
.dt-x, .dt-grip { display: none; position: absolute; top: 2px; font-size: 12px; line-height: 1; }
.dt-x { left: 4px; color: var(--danger); padding: 2px 4px; cursor: pointer; }
.dt-grip { right: 3px; color: var(--muted); }
.dt-grip svg { width: 12px; height: 12px; stroke: currentColor; fill: currentColor; }
.dash-tiles.arranging .dt { border-style: dashed; border-color: var(--accent); touch-action: none; cursor: grab; }
.dash-tiles.arranging .dt-x, .dash-tiles.arranging .dt-grip { display: block; }
.dash-tiles .dt.dragging { box-shadow: 0 8px 20px rgba(0, 0, 0, .25); transform: scale(1.06) rotate(-2deg); z-index: 2; background: var(--surface); }
.dt-chips { display: flex; gap: 6px; flex-wrap: wrap; }
/* Spacers (Nov 10 2026): blank rows (full / half a row high) and blank spaces inside a row; empty space except in Arrange. */
.dt-gap { position: relative; height: 74px; margin-bottom: 6px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 13px; color: var(--muted); }
.dt-gap[data-dt-gap="half"], .dt-gap[data-dt-gap="fill"] { height: 34px; }
.dash-tiles.arranging .dt-gap[data-dt-gap="fill"] { border-style: dotted; }
.dt-hello { min-width: 0; font-size: 15px; }
.dt-hello strong { font-weight: 700; }
.dt-hello .muted { font-size: 13px; margin-left: 4px; white-space: nowrap; }
.dt-gap > * { visibility: hidden; }
.dash-tiles.arranging .dt-gap { border: 1px dashed var(--muted); border-radius: 10px; background: var(--surface); touch-action: none; cursor: grab; }
.dash-tiles.arranging .dt-gap > * { visibility: visible; }
.dt-gap .dt-x { display: none; }
.dash-tiles.arranging .dt-gap .dt-x { display: block; top: 50%; transform: translateY(-50%); }
.dash-tiles.arranging .dt-gap .dt-grip { display: block; top: 50%; transform: translateY(-50%); }
.dt-gap[data-dt-gap="half"] .btn.small, .dt-gap[data-dt-gap="fill"] .btn.small { padding: 2px 10px; }
.dt-gap.dragging { opacity: .6; }
.dt-grid .dt-blank { background: transparent; border-color: transparent; box-shadow: none; }
.dt-blank-l { display: none; font-size: 12px; color: var(--muted); }
.dash-tiles.arranging .dt-grid .dt-blank { border: 1px dashed var(--muted); }
.dash-tiles.arranging .dt-blank-l { display: block; }
.dt-chip { border: 1px dashed var(--border); border-radius: 999px; padding: 6px 12px; font-size: 14px; background: var(--surface); color: var(--text); cursor: pointer; }
/* Campaign: schedule for later (date + time boxes that work on every phone) */
.cp-sched { flex-basis: 100%; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px; }
.cp-sched-l { font-size: 14px; margin-bottom: 6px; }
.cp-sched-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cp-sched-row input[type=date], .cp-sched-row input[type=time] { width: auto; min-width: 9.5em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Meetings: the "Other length" minutes box only shows when Other is picked */
[data-sch-other][hidden] { display: none; }

/* Client folder (OneDrive) on the contact Files tab */
.cf-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 8px; }
.cf-row input[type=text], .cf-row select { flex: 1 1 220px; min-width: 0; }
.cf-path { display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: baseline; margin-bottom: 10px; font-size: 14px; }
.cf-links { margin-left: auto; font-size: 13px; }
.cf-list { margin: 4px -16px 0; }
.cf-list li { display: flex; gap: 10px; align-items: center; }
.cf-ic { font-size: 18px; width: 24px; text-align: center; }

/* Client pages (Tech Services write-ups) */
.pg-head { flex-wrap: wrap; gap: 8px; }
.pg-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pg-actions form { margin: 0; }
.pg-meta { font-size: 12px; margin: -4px 0 10px; }
.pg-doc { font-size: 15px; line-height: 1.6; max-width: 860px; }
.pg-doc > :first-child, .pg-doc .pg-print-sub + * { margin-top: 0; }
.pg-doc h2 { font-size: 20px; margin: 22px 0 6px; }
.pg-doc h3 { font-size: 16px; margin: 18px 0 4px; }
.pg-doc p { margin: 0 0 10px; }
.pg-doc ul, .pg-doc ol { margin: 0 0 10px; padding-left: 24px; }
.pg-doc ul ul, .pg-doc ol ol, .pg-doc ul ol, .pg-doc ol ul { margin: 2px 0; }
.pg-doc hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.pg-doc .pg-checks { list-style: none; padding-left: 2px; }
.pg-doc .pg-checks label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; font-weight: 400; margin: 0; }
.pg-doc .pg-checks input { width: 18px; height: 18px; margin-top: 3px; flex: none; }
.pg-doc .pg-checks li.done span { color: var(--muted); text-decoration: line-through; }
.pg-table { overflow-x: auto; margin: 0 0 12px; }
.pg-doc table { border-collapse: collapse; width: 100%; font-size: 14px; }
.pg-doc th, .pg-doc td { border: 1px solid var(--border); padding: 6px 8px; text-align: left; vertical-align: top; }
.pg-doc th { background: rgba(127, 127, 127, .1); }
.pg-print-title, .pg-print-sub { display: none; }
.pg-tools { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.pg-text { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; line-height: 1.55; }
@media print {
  .crumb, .pg-head, .pg-meta, .pg-doc ~ form, .flash, .bottom-nav { display: none !important; }
  .pg-doc { border: 0 !important; box-shadow: none !important; padding: 0 !important; max-width: none; }
  .pg-print-title { display: block; font-size: 24px; margin: 0 0 2px; }
  .pg-print-sub { display: block; color: #666; font-size: 12px; margin-bottom: 14px; }
}

/* Pet Care pipelines at a glance (Dashboard under Tasks; phone Pipelines page). Nov 7 2026 */
.pipe-table td { padding-top: 8px; padding-bottom: 8px; }
.pipe-table th:first-child, .pipe-table td:first-child { padding-left: 16px; }
.pipe-more { padding: 8px 16px 12px; font-size: 13px; border-top: 1px solid var(--border); }
@media (min-width: 641px) { .pipe-table td:last-child { white-space: nowrap; } }

/* Formatting toolbar extras (campaigns, blog, Google posts; Nov 8 2026) */
.fmt-tools { align-items: center; }
.fmt-tools .fmt-size { width: auto; min-width: 0; padding: 4px 6px; font-size: 13px; height: auto; }
.fmt-color { position: relative; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.fmt-color input[type=color] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.fmt-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0,0,0,.25); background: #cc0000; }
.fmt-emoji { position: relative; }
.fmt-emoji > summary { list-style: none; }
.fmt-emoji > summary::-webkit-details-marker { display: none; }
.fmt-emoji-grid { position: absolute; z-index: 30; top: 100%; left: 0; margin-top: 4px; display: grid; grid-template-columns: repeat(8, 34px); gap: 2px;
  padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.15); }
.fmt-emoji-grid button { font-size: 20px; line-height: 1; padding: 5px 0; background: none; border: 0; border-radius: 6px; cursor: pointer; }
.fmt-emoji-grid button:hover { background: var(--surface-2); }
@media (max-width: 640px) { .fmt-emoji-grid { grid-template-columns: repeat(6, 36px); } }

/* Google post: live check */
.mk-check { margin-top: 8px; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.mk-check.ok { background: var(--ok-soft); color: var(--ok); }
.mk-check.bad { background: var(--danger-soft); }
.mk-check ul { margin: 4px 0 0; padding-left: 18px; }
.mk-check li { margin: 3px 0; }
.mk-check li.error::marker { color: var(--danger); }
.mk-check .lvl { font-weight: 600; }
.mk-check li.error .lvl { color: var(--danger); }
.mk-check li.warn .lvl { color: var(--warn); }
.mk-check button { margin-left: 6px; }
.cp-ai { margin: 4px 0 12px; padding: 10px 12px; background: var(--surface-2); border-radius: 8px; }
.mk-preview-draft { border: 1px solid var(--border); border-radius: 10px; padding: 10px; background: var(--surface); margin-bottom: 4px; }
.mk-preview-draft .mk-pv-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.mk-preview-draft .mk-img-empty { margin-bottom: 8px; }
.mk-preview-draft .mk-prev-text { max-height: 260px; font-size: 13.5px; }

/* Tech Services Billing tab (Nov 8 2026) */
.bl-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bl-sum > div { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.bl-sum strong { font-size: 1.25rem; }
.bl-sum .bl-due { border-color: var(--danger); }
.bl-sum .bl-due strong { color: var(--danger); }
.bl-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin-top: 12px; }
.bl-act { flex: 0 0 auto; }
.bl-act[open] { flex: 1 1 100%; }
.bl-act > summary { list-style: none; }
.bl-act > summary::-webkit-details-marker { display: none; }
.bl-act > form { margin-top: 8px; }
.bl-inv { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bl-inv-acts { display: flex; gap: 6px; flex-wrap: wrap; }
/* Bill hours (Nov 10 2026) */
.bh-line { padding: 12px 16px; border-top: 1px solid var(--line, #eee); }
.bh-line:first-of-type { border-top: 0; }
.bh-line-head { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.bh-desc { flex: 1 1 280px; margin: 0; }
.bh-fig { display: flex; flex-direction: column; align-items: flex-end; min-width: 80px; padding-bottom: 8px; }
.bh-fig span { font-size: 12px; }
.bh-entries { margin-top: 6px; font-size: 14px; }
.bh-entries summary { cursor: pointer; font-size: 13px; }
.bh-entries ul { list-style: none; margin: 6px 0 0; padding: 0; }
.bh-entries li { padding: 2px 0; }
.bh-date { display: inline-block; min-width: 90px; }
.bh-off .bh-desc input, .bh-off .bh-fig strong { opacity: .45; }
.bh-total { font-size: 1.2rem; margin: 12px 0; text-align: right; }
.bh-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.pj-billed { font-size: 11px; }
.bl-rate { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.bl-rate input { margin: 0; }
.pr-desc { font-size: 12px; margin-top: 4px; }
.pr-save { font-size: 12px; display: inline-flex; gap: 4px; align-items: center; margin-top: 4px; white-space: nowrap; }
.pr-save[hidden] { display: none; }
.pr-items td input.pr-desc { display: block; width: 100%; }
@media (max-width: 640px) { .bl-sum { grid-template-columns: 1fr; } }

/* Nov 9 2026: task statuses, your own checklists, repeating tasks, Personal list */
.badge.ws-personal { background: #ece6f6; color: #4b2f7a; }
.badge.prog-in_progress { background: #e3eefc; color: #1d4f91; }
.badge.prog-on_hold { background: #fbefd9; color: #7a4a00; }
.badge.prog-idea { background: #eef0e6; color: #4d5a1f; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge.ws-personal { background: #3a2f4f; color: #e2d6f7; }
  :root:not([data-theme="light"]) .badge.prog-in_progress { background: #22344f; color: #cfe0fb; }
  :root:not([data-theme="light"]) .badge.prog-on_hold { background: #4a3a1c; color: #f7e1b5; }
  :root:not([data-theme="light"]) .badge.prog-idea { background: #34391f; color: #e3e9c8; }
}
:root[data-theme="dark"] .badge.ws-personal { background: #3a2f4f; color: #e2d6f7; }
:root[data-theme="dark"] .badge.prog-in_progress { background: #22344f; color: #cfe0fb; }
:root[data-theme="dark"] .badge.prog-on_hold { background: #4a3a1c; color: #f7e1b5; }
:root[data-theme="dark"] .badge.prog-idea { background: #34391f; color: #e3e9c8; }
details.ulist { margin-top: 6px; font-size: 13px; }
details.ulist > summary { cursor: pointer; font-weight: 600; }
details.ulist .task-checklist { margin-left: 2px; }
.ulist-edit { border-top: 1px solid var(--border); padding: 10px 0; }
.ulist-edit:first-of-type { border-top: 0; padding-top: 0; }
.ulist-name { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.ulist-name input[type=text] { flex: 1 1 180px; font-weight: 600; }
.ulist-items { font-size: 14px; }
.ulist-items li > span:first-of-type { flex: 1; }
.ulist-acts { display: inline-flex; gap: 6px; }
.ulist-acts form { display: inline; }
.ulist-add { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; }
.ulist-add textarea { flex: 1; min-height: 38px; }
.wd-picks { display: flex; gap: 6px 12px; flex-wrap: wrap; }
.wd-pick, .radio-line { display: inline-flex; gap: 6px; align-items: center; font-weight: normal; }
.radio-line { display: flex; flex-wrap: wrap; margin: 4px 0; }
.repeat-fields fieldset { border: 0; padding: 0; margin: 0 0 10px; }
.repeat-fields legend { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.task-checklist .ulist-acts button, .task-checklist .ulist-acts button:hover { width: auto; height: auto; border: 0; background: none; color: var(--muted); font-size: 15px; padding: 0 4px; border-radius: 4px; }
.task-checklist li.on .ulist-acts button { background: none; }
.task-checklist .ulist-acts button:hover { color: var(--ink, inherit); background: var(--surface-2, rgba(0,0,0,.05)); }

/* Automations page: grouped rules with their messages (Nov 9) */
.auto-search { margin: 4px 0 14px; max-width: 520px; }
.auto-search input { width: 100%; }
.auto-group { margin-top: 16px; }
.auto-group:first-of-type { margin-top: 0; }
.rule-tpls { margin: 0 14px 12px 34px; border-left: 3px solid var(--border); padding-left: 10px; }
.rule-tpls-h { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 8px 0 2px; }
.tpl-group { padding: 0 14px 6px; }
.tpl-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.tpl-main { min-width: 0; }
.tpl-prev { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 560px; }
.tpl-also { font-size: 12px; margin-left: 4px; }
.tpl-row.tpl-hit { background: var(--accent-soft, rgba(204,0,0,.06)); }
.tpl-row[hidden], .tpl-group[hidden], .auto-group[hidden], .rule-fold[hidden] { display: none; }
/* Task groups split by list (Nov 9) */
.task-place { font-size: 13px; font-weight: 600; padding: 6px 16px 2px 24px; color: var(--text); display: flex; align-items: center; gap: 6px; }
.task-place::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.task-place.ws-pet-care::before { background: #cc0000; }
.task-place.ws-tech-services::before { background: #2b55a3; }
.task-place.ws-personal::before { background: #7a5ab8; }

/* Folding task groups (Nov 9): Overdue / Today / Upcoming / No due date / Ideas, then each list */
.task-fold > summary { list-style: none; cursor: pointer; user-select: none; }
.task-fold > summary::-webkit-details-marker { display: none; }
.tf-chev { display: inline-block; width: 0; height: 0; margin-right: 7px; border-left: 5px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .15s; vertical-align: 1px; }
.task-fold[open] > summary .tf-chev { transform: rotate(90deg); }
.task-fold-place > summary.task-place .tf-chev { order: -1; margin-right: 1px; color: var(--muted); }
.task-fold-place > summary.task-place { padding-left: 28px; }
.task-group.ideas { color: #7a5ab8; }
.task-fold:last-of-type { padding-bottom: 6px; }

/* Projects (Nov 9 2026) */
.btn.tiny { padding: 2px 7px; font-size: 12px; min-height: 0; line-height: 1.4; }
.pj-filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 12px; }
.pj-filter input[type=search] { flex: 1; min-width: 180px; max-width: 360px; }
.badge.pj-s-idea { background: #f1ecfb; color: #5b3fa0; }
.badge.pj-s-not_started { background: #eef0f3; color: #4a5260; }
.badge.pj-s-in_progress { background: #e6f0fd; color: #1c5bb8; }
.badge.pj-s-on_hold { background: #fdf3e1; color: #8a5a00; }
.badge.pj-s-completed { background: #e5f5ea; color: #1f7a3e; }
.pj-tasks, .pj-subs { list-style: none; margin: 0; padding: 0; }
.pj-tasks > .pj-task { border-bottom: 1px solid var(--line, #e6e8eb); }
.pj-subs { margin: 6px 0 2px; }
.pj-subs .task-row { padding: 4px 0; border: 0; }
.pj-line { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.pj-move { display: inline-flex; gap: 2px; opacity: .45; }
.pj-task:hover > .task-main .pj-move, .pj-subs li:hover .pj-move { opacity: 1; }
.pj-move form { margin: 0; }
.pj-addsub summary { cursor: pointer; font-size: 13px; margin-top: 4px; }
.pj-addrow { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
.pj-addrow input[type=text] { flex: 1; min-width: 180px; }
.pj-entries td { padding: 6px 10px; font-size: 14px; }
.pj-desc { white-space: normal; }
.pj-edit summary { cursor: pointer; }
.task-proj { text-decoration: none; }
/* Dashboard Projects card (Nov 10 2026): one fold per project. */
#projects-due .proj-head { font-size: 14px; padding: 10px 16px 6px; color: var(--text); border-top: 1px solid var(--line, #e6e8eb); }
#projects-due .proj-fold:first-of-type .proj-head { border-top: 0; }
#projects-due .proj-head .tf-chev { color: var(--muted); }
#projects-due .proj-fold .overdue { color: var(--danger); font-weight: 600; }
#projects-due .proj-fold-foot { padding: 4px 16px 12px; font-size: 13px; }
.pj-picker { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 8px; }
.pj-trail { font-size: 13px; margin-bottom: 6px; overflow-wrap: anywhere; }
.pj-use-here { margin: 0 0 6px; }
.pj-folders { list-style: none; margin: 0 0 6px; padding: 0; max-height: 280px; overflow: auto; }
.pj-folders li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.pj-folders li form { margin: 0; }
.pj-folders a { overflow-wrap: anywhere; }
/* Project add-task: task · due · assigned · Add on one line (stacks on phones) */
.pj-addrow.pj-addtask { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; flex-wrap: nowrap; }
.pj-addrow.pj-addtask input[type=text] { min-width: 0; }
@media (max-width: 640px) { .pj-addrow.pj-addtask { grid-template-columns: 1fr 1fr; } .pj-addrow.pj-addtask input[type=text] { grid-column: 1 / -1; } }
.pj-addrow.pj-addtask input[type=date], .pj-addrow.pj-addtask select { width: auto; }

/* Customize Dashboard (Nov 10 2026) */
.dash-customize { position: relative; }
.dash-customize > summary { list-style: none; cursor: pointer; }
.dash-customize > summary::-webkit-details-marker { display: none; }
/* Dashboard cards arranged per login (Nov 10 2026) */
.dash-customize { display: flex; align-items: center; gap: 8px; }
.dash-arrange-btns { display: inline-flex; align-items: center; gap: 8px; }
.dash-arrange-btns[hidden] { display: none; }
.stack[data-dash-col] { display: flex; flex-direction: column; gap: 16px; }
.stack[data-dash-col] > * + * { margin-top: 0; }
.dash-arranging .stack[data-dash-col] { gap: 8px; }
.dash-slot.is-hidden, .dash-slot.is-empty { display: none; }
.dash-slot-bar { display: none; }
.dash-arranging .dash-slot { display: block; }
.dash-arranging .dash-slot > :not(.dash-slot-bar) { display: none; }
.dash-arranging .dash-slot-bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.dash-arranging .dash-slot.is-hidden .dash-slot-bar, .dash-arranging .dash-slot.is-empty .dash-slot-bar { opacity: .6; border-style: dashed; }
.dash-slot-bar .dash-slot-note { font-size: 13px; flex: 1; }
.dash-slot-bar .btn { margin-left: auto; }
.dash-grip { cursor: grab; display: inline-flex; color: var(--muted); touch-action: none; padding: 4px; margin: -4px 0 -4px -4px; }
.dash-grip svg { width: 18px; height: 18px; }
.dash-arranging .dash-slot-bar { user-select: none; }
.dash-arranging [data-dash-col] { min-height: 80px; border: 1px dashed var(--border); border-radius: 12px; padding: 6px; }
.dash-slot.sortable-ghost .dash-slot-bar { opacity: .4; }
.dash-customize-box { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 260px; padding: 14px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }

/* Project page: checklist items on tasks and subtasks, ticked and added in place; checkboxes in notes (Nov 10 2026) */
.ulist .ulist-add, .ulist-new .ulist-add { display: flex; gap: 6px; align-items: center; margin: 6px 0 2px; }
.ulist-add input[type=text] { flex: 1; min-width: 0; padding: 4px 8px; font-size: 13px; }
/* Editing a checklist item's words (✎, Nov 10 2026) */
.ulist-edit-box { flex: 1; min-width: 0; padding: 3px 8px; font: inherit; font-size: 14px; }
.task-checklist .ulist-pen, .task-checklist .ulist-pen:hover { width: auto; height: auto; border: 0; background: none; color: var(--muted); font-size: 14px; padding: 0 4px; border-radius: 4px; cursor: pointer; }
.task-checklist .ulist-pen:hover { color: var(--ink, inherit); background: var(--surface-2, rgba(0,0,0,.05)); }
details.ulist-new { margin-top: 4px; font-size: 13px; }
details.ulist-new > summary { cursor: pointer; list-style: none; }
details.ulist-new > summary::-webkit-details-marker { display: none; }
.pj-note-checks { font-size: 14px; line-height: 1.5; }
.pj-note-checks p { margin: 4px 0; }
/* Project conversation (Nov 10 2026) */
.pj-compose textarea { width: 100%; }
.pj-compose .chip { cursor: pointer; }
.pj-convo .pj-msg { padding: 10px 16px; }
.pj-convo .pj-msg.in { background: var(--surface-2, rgba(0,0,0,.03)); }
.pj-msg-html { white-space: normal !important; }
.pj-msg-html p, .pj-msg-html ul, .pj-msg-html ol { margin: 0 0 8px !important; }
.pj-compose .attach { margin-top: 8px; }
.pj-compose .attach[hidden] { display: none; }
.pj-msg-body { white-space: pre-wrap; font-size: 14px; margin-top: 2px; max-height: 18em; overflow: auto; }
/* Outbox → Scheduled (Nov 10 2026) */
.sched-item { padding: 12px 16px; }

/* Held submissions: sitters by drive time (Nov 10 2026) */
.held-sitters { border-collapse: collapse; margin-top: 6px; }
.held-sitters td { padding: 3px 14px 3px 0; vertical-align: top; }

/* Task page → Projects card (Nov 10 2026) */
.tp-fold > summary { list-style: none; display: inline-flex; }
.tp-fold > summary::-webkit-details-marker { display: none; }
.tp-what { font-size: 13px; padding-left: 18px; margin: 4px 0 10px; }
.tp-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.tp-add select { flex: 1 1 220px; width: auto; }

/* Project page: each task folds (Nov 10 2026) */
.pj-tfold > summary.pj-tsum { font-size: 13px; padding: 2px 0; display: flex; align-items: center; }
.pj-tfold[open] > summary.pj-tsum { margin-bottom: 4px; }

/* Project notes fold to their title (Nov 11 2026). */
.pj-note-title { width: 100%; margin-bottom: 6px; }
.pj-notes { padding: 6px 16px 14px; }
details.pj-nfold { border: 1px solid var(--line, #e5e0d8); border-radius: 8px; margin: 8px 0; background: var(--card, #fff); }
details.pj-nfold > summary { list-style: none; cursor: pointer; padding: 9px 12px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
details.pj-nfold > summary::-webkit-details-marker { display: none; }
details.pj-nfold > summary::before { content: "▸"; color: var(--muted, #888); }
details.pj-nfold[open] > summary::before { content: "▾"; }
.pj-ntitle { font-weight: 600; flex: 1 1 auto; min-width: 0; }
.pj-nmeta { font-size: 12px; margin-left: auto; }
.pj-nbody { padding: 0 12px 12px 30px; }
.pj-nacts { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; flex-wrap: wrap; }
.pj-nacts > form { margin: 0; }
details.pj-nedit > summary { list-style: none; display: inline-block; }
details.pj-nedit > summary::-webkit-details-marker { display: none; }
details.pj-nedit[open] { flex: 1 1 100%; }
details.pj-nedit[open] > form { margin-top: 8px; }
details.pj-nedit .when-open, details.pj-nedit[open] .when-closed { display: none; }
details.pj-nedit[open] .when-open { display: inline; }
details.pj-nedit textarea { width: 100%; }

/* Interview checklist with the candidate's papers (Nov 11 2026): questions | notes | papers on wide screens
   (Steve's 49" screen); questions on the left with notes over papers on the right below that; stacked on phones. */
.cl-grid.has-papers { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-areas: "items notes" "items papers"; }
.cl-grid.has-papers > .cl-items { grid-area: items; }
.cl-grid.has-papers > .cl-notes { grid-area: notes; position: static; }
.cl-grid.has-papers > .cl-notes textarea { height: 32vh; min-height: 200px; }
.cl-grid.has-papers > .papers { grid-area: papers; height: 70vh; }
@media (min-width: 1800px) {
  .cl-grid.has-papers { grid-template-columns: minmax(0, 1.15fr) minmax(0, .8fr) minmax(0, 1.25fr); grid-template-areas: "items notes papers"; }
  .cl-grid.has-papers > .cl-notes { position: sticky; top: 16px; }
  .cl-grid.has-papers > .cl-notes textarea { height: calc(100vh - 230px); }
  .cl-grid.has-papers > .papers { position: sticky; top: 16px; height: calc(100vh - 150px); }
}
@media (max-width: 860px) {
  .cl-grid.has-papers { grid-template-columns: minmax(0, 1fr); grid-template-areas: "items" "notes" "papers"; }
  .cl-grid.has-papers > .cl-notes textarea { height: auto; min-height: 180px; }
}
.papers { border: 1px solid var(--line, #e5e0d8); border-radius: 10px; background: var(--card, #fff); display: flex; flex-direction: column; min-height: 320px; overflow: hidden; }
.papers .pp-radio { position: absolute; opacity: 0; pointer-events: none; }
.pp-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line, #eee); flex-wrap: wrap; }
.pp-tab { padding: 6px 12px; border-radius: 7px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--muted, #555); }
.pp-tab:hover { background: rgba(0,0,0,.05); }
.pp-pop { margin-left: auto; }
.pp-body { display: none; flex: 1; min-height: 0; overflow: auto; }
.pp-body-r { flex-direction: column; }
.pp-body iframe { flex: 1; width: 100%; border: 0; min-height: 300px; background: #fff; }
.pp-foot { font-size: 12px; padding: 6px 10px; border-top: 1px solid var(--line, #eee); }
.pp-text { padding: 12px 16px; font-size: 14px; line-height: 1.55; }
.pp-label { font-weight: 700; font-size: 13px; margin: 10px 0 4px; }
.pp-qa dt { font-weight: 600; margin-top: 10px; }
.pp-qa dd { margin: 2px 0 0; white-space: pre-wrap; }
.pp-extra { white-space: pre-wrap; }
.pp-r:checked ~ .pp-head .pp-tab-r, .pp-a:checked ~ .pp-head .pp-tab-a, .pp-i:checked ~ .pp-head .pp-tab-i { background: #cc0000; color: #fff; }
.pp-r:checked ~ .pp-body-r { display: flex; }
.pp-a:checked ~ .pp-body-a, .pp-i:checked ~ .pp-body-i { display: block; }
.pp-radio:focus-visible ~ .pp-head { outline: 2px solid #cc0000; outline-offset: -2px; }
.papers-page { padding: 12px 16px; height: 100vh; box-sizing: border-box; display: flex; flex-direction: column; }
.papers-title { font-size: 20px; margin: 0 0 10px; }
.papers.papers-window { flex: 1; }

/* System log + Background jobs (Nov 14 2026) */
.sl-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.sl-filters input[type=search] { flex: 1 1 220px; max-width: 340px; }
.sl-card { overflow: hidden; }
.sl-day { padding: 8px 14px; font-size: 13px; font-weight: 700; background: var(--surface-2); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1; }
.sl-line { display: grid; grid-template-columns: 92px 150px 1fr auto; gap: 10px; align-items: baseline; padding: 6px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.sl-line:last-child { border-bottom: 0; }
.sl-line.lvl-error { background: #fdf2f2; }
.sl-line.lvl-warn { background: #fff8e8; }
.sl-time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; white-space: nowrap; }
.sl-area { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-text { min-width: 0; overflow-wrap: anywhere; }
.sl-meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.sl-flag { color: #a30000; font-weight: 700; }
.sl-flag.warn { color: #9a6700; }
@media (max-width: 760px) {
  .sl-line { grid-template-columns: auto 1fr; gap: 2px 8px; }
  .sl-text { grid-column: 1 / -1; }
  .sl-meta { grid-column: 1 / -1; }
}
.jb-card { margin-bottom: 14px; }
.jb-group { margin: 0; padding-bottom: 6px; font-size: 17px; }
.jb-table td { vertical-align: top; font-size: 14px; }
.jb-name { min-width: 260px; max-width: 460px; }
.jb-sum { font-size: 13px; margin-top: 2px; }
.jb-when { min-width: 170px; max-width: 240px; font-size: 13px; }
.jb-last { min-width: 180px; font-size: 13px; }
.jb-next { white-space: nowrap; font-size: 13px; }
.jb-stats { white-space: nowrap; font-size: 13px; }
.jb-err { color: #a30000; }
tr.jb-bad td { background: #fdf2f2; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sl-line.lvl-error, :root:not([data-theme="light"]) tr.jb-bad td { background: #3a2222; }
  :root:not([data-theme="light"]) .sl-line.lvl-warn { background: #3a3220; }
  :root:not([data-theme="light"]) .sl-flag, :root:not([data-theme="light"]) .jb-err { color: #ff9b9b; }
}
:root[data-theme="dark"] .sl-line.lvl-error, :root[data-theme="dark"] tr.jb-bad td { background: #3a2222; }
:root[data-theme="dark"] .sl-line.lvl-warn { background: #3a3220; }
:root[data-theme="dark"] .sl-flag, :root[data-theme="dark"] .jb-err { color: #ff9b9b; }
.sl-filters select, .sl-filters input[type=search], .sl-keep select { width: auto; }
.sl-filters input[type=search] { width: 280px; max-width: 100%; }
.sl-text a { color: inherit; }
.sl-text a:hover { color: var(--accent); text-decoration: underline; }
.sl-keep-note { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.sl-waiting { border: 1px solid var(--border); border-left: 3px solid #d97706; border-radius: 8px; padding: 8px 12px; margin: 8px 0; font-size: 14px; }
.sl-days { list-style: none; margin: 0; padding: 0; columns: 2 260px; font-size: 14px; }
.sl-days li { padding: 2px 0; break-inside: avoid; }
.sl-group > summary { list-style: none; cursor: pointer; }
.sl-group > summary::-webkit-details-marker { display: none; }
.sl-group-body { padding-left: 18px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.sl-group-body .sl-line { font-size: 13px; }

/* Image register (Nov 15, 2026) */
.rg-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; display: block; }
.rg-table td { vertical-align: top; }
.rg-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .rg-grid { grid-template-columns: 1fr; } }
.rg-big { width: 100%; max-height: 420px; object-fit: contain; border-radius: 8px; background: var(--surface-2); display: block; }
.rg-cred { margin-top: 8px; font-size: 13px; padding: 8px 10px; border-radius: 8px; background: var(--ok-soft); color: var(--text); }
.rg-retire > summary { list-style: none; cursor: pointer; }
.rg-retire > summary::-webkit-details-marker { display: none; }
.rg-proof { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--border); }
.rg-sheet-top { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.rg-sheet-top img { width: 100%; border-radius: 6px; }
.rg-sheet-top th { width: 170px; text-align: left; vertical-align: top; }
@media (max-width: 640px) { .rg-sheet-top { grid-template-columns: 1fr; } .rg-sm-hide { display: none; } }
@media print {
  .rg-sheet { border: 0 !important; box-shadow: none !important; padding: 0 !important; }
  .mk-tabs { display: none !important; }
}
/* Nov 15 2026: images belong to a business; originals in each business's OneDrive */
.mk-ws { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 13px; }
.mk-ws select { width: auto; }
.rg-od { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.rg-orig { overflow-wrap: anywhere; }
.sl-parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.sl-part { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.rg-od > .card { margin-top: 0; }
/* Nov 15 2026: Marketing → Reviews */
.rv-head, .rv-site { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-bottom: 12px; }
.rv-site > div { flex: 1; min-width: 260px; }
.rv-big { font-size: 28px; font-weight: 700; }
.rv-stars { color: #e7a500; letter-spacing: 1px; }
.rv-bulk { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.rv-list { display: grid; gap: 10px; }
.rv-item.on-site { border-left: 4px solid var(--accent); }
.rv-item.gone { opacity: .6; }
.rv-top { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.rv-top form { display: flex; gap: 6px; flex-wrap: wrap; }
.rv-badge { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none; }
.rv-text { margin: 8px 0 0; white-space: pre-wrap; }
.rv-reply { margin-top: 8px; padding: 8px 10px; background: var(--surface-2); border-radius: 6px; font-size: 14px; white-space: pre-wrap; }
.rv-more { margin-top: 8px; font-size: 14px; }
.rv-more summary { cursor: pointer; color: var(--accent); }
.rv-match { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
/* Nov 15 2026: the AI picture maker */
.ai-shapes { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0; font-size: 14px; }
.ai-shapes label { display: inline-flex; gap: 4px; align-items: center; margin: 0; }
.ai-versions { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.ai-versions.ai-wide { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.ai-version img { width: 100%; height: auto; border-radius: 6px; display: block; background: var(--surface-2); }
.ai-versions > .card, .rv-list > .card { margin-top: 0; }
.ai-adjust-row > .btn { flex: none; }
