:root {
  --ink: #364650;
  --muted: #6d8291;
  --line: #e8ecf0;
  --bg: #f1f4f8;
  --card: #fff;
  --blue: #4eaddd;
  --blue-soft: #f5fafd;
  --gold: #f3b942;
  --green: #137a4b;
  --red: #b43333;
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
}

/* Owned single-value Inquiry Address suggestions; no search text is saved on dismissal. */
#shell .inquiry-row { position: relative; }
#shell #p-inquiry + .inquiry-menu { position: absolute; left: 0; right: auto; top: calc(100% + 4px); width: min(320px, calc(100vw - 48px)); min-width: 0; max-width: calc(100vw - 48px); max-height: 260px; overflow-y: auto; z-index: 40; padding: 4px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 5px 18px #0002; }
#shell #p-inquiry + .inquiry-menu button { display: block; width: 100%; padding: 9px 10px; text-align: left; white-space: normal; overflow-wrap: anywhere; border: 0; border-radius: 3px; background: transparent; color: inherit; }
#shell #p-inquiry + .inquiry-menu button:is(:hover,[aria-selected="true"]) { background: var(--blue-soft); color: var(--ink); }
#inquiry-address-save { display: block; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.previous-inquiry-field { margin: 12px 14px 4px; font-size: 12px; color: var(--muted); }
.previous-inquiry-field .detail-row > span { color: var(--muted); font-size: 12px; }
.previous-inquiry-field input { max-width: 100%; min-width: 0; font-size: 12px; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, p { margin: 0; }
.muted, small, em { color: var(--muted); font-style: normal; }
.mark { font-weight: 750; letter-spacing: -0.04em; font-size: 28px; }
.gate { min-height: 100vh; display: grid; place-items: center; background: #f3f5f7; }
.gate-card { width: min(400px, calc(100% - 32px)); background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: 0 10px 30px rgba(28,36,48,.06); display: grid; gap: 12px; }
.gate-card h1 { font-size: 22px; font-weight: 650; }
#passcode-form { display: grid; gap: 12px; }
#passcode-form input { width: 100%; border: 1px solid #d5dbe3; border-radius: 8px; padding: 10px 12px; }
.or { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  background: #fff; color: #1f1f1f; border: 1px solid #dadce0; border-radius: 8px; padding: 10px 12px; font-weight: 600;
}
.google-btn:hover { background: #f8f9fa; }
#google-btn { display: flex; justify-content: center; min-height: 0; }
#google-btn:empty { display: none; }

#shell { min-height: 100vh; display: flex; flex-direction: column; background: #f3f5f7; }
.top {
  display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 12px 0 16px; flex: none;
  background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
}
.rail {
  background: transparent; border: 0; display: flex; flex-direction: row; align-items: stretch;
  gap: 0; padding: 0; position: static; height: 56px; flex: none; min-width: 0;
}
.rail-mark { font-size: 18px; letter-spacing: -0.04em; margin: 0 8px 0 0; color: var(--ink); }
button.rail-mark { border: 0; background: transparent; padding: 0; line-height: 1; }
button.rail-mark.is-on { color: var(--blue); }
.nav-btn {
  width: auto; min-height: 56px; border: 0; background: transparent; border-radius: 0; color: #5c6773;
  display: flex; flex-direction: row; align-items: center; gap: 6px; position: relative; padding: 0 11px;
}
.nav-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-btn span { font-size: 14px; font-weight: 600; }
.nav-btn.is-on, .nav-btn:hover { background: transparent; color: var(--ink); }
.nav-btn.is-on { color: var(--blue); box-shadow: inset 0 -2px 0 var(--blue); }
.nav-btn .badge { position: absolute; top: 8px; right: 0; margin: 0; }
.maincol { min-width: 0; display: flex; flex-direction: column; min-height: 0; flex: 1; }
.version-tag { position: fixed; left: 12px; bottom: 12px; z-index: 40; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 650; box-shadow: 0 2px 8px rgba(28, 36, 48, .12); }
.version-tag.is-on { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.changelog { position: fixed; left: 50%; top: 24px; bottom: 68px; transform: translateX(-50%); z-index: 40; width: min(850px, calc(100vw - 32px)); }
.changelog-card { height: 100%; background: #f4f5f7; color: #344552; border: 1px solid #dce2e7; border-radius: 12px; box-shadow: 0 12px 40px rgba(28, 36, 48, .2); display: flex; flex-direction: column; overflow: hidden; }
.changelog-head { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; background: #fff; border-bottom: 1px solid #e8ecf0; }
.changelog-head h2 { margin: 0; font-size: 26px; font-weight: 500; }
.changelog-head button { border: 1px solid #d5dbe3; border-radius: 6px; padding: 8px 14px; background: #fff; color: #344552; font-size: 14px; }
.changelog-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; overflow-wrap: anywhere; padding: 24px; }
.changelog-body:focus-visible { outline: 2px solid #0876bb; outline-offset: -2px; }
.changelog-body h3 { margin: 0 0 10px; font-size: 19px; font-weight: 600; }
.changelog-body p, .changelog-body li { font-size: 14px; line-height: 1.6; }
.changelog-summary, .changelog-entry { margin: 0 0 20px; padding: 24px; background: #fff; border: 1px solid #e0e5ea; border-radius: 8px; }
.changelog-summary .changelog-current { margin: 0; font-size: 16px; font-weight: 600; }
.changelog-body .changelog-date, .changelog-body .changelog-summary-date { margin: 10px 0 18px; font-size: 13px; line-height: 1.6; color: #445466; }
.changelog-body time + br + time { font-size: 12px; color: #596b7b; }
.changelog-entry > .muted { color: #596b7b; }
.changelog-description { margin: 16px 0 0; }
.changelog-intro { margin: 0 0 20px; color: #596b7b; }
.changelog-details { border-top: 1px solid #e8ecf0; padding-top: 12px; font-size: 13px; }
.changelog-details summary { cursor: pointer; color: #0876bb; line-height: 1.6; }
.changelog-details p { margin: 12px 0 0; }
.changelog-body code { font-size: 12px; }
.changelog-body ul { margin: 0 0 8px; padding-left: 18px; }
.changelog-body li { margin: 0 0 6px; }
@media (max-width: 600px) {
  .changelog { top: 12px; bottom: 76px; width: calc(100vw - 24px); }
  .changelog-head { padding: 16px; }
  .changelog-head h2 { font-size: 24px; }
  .changelog-body { padding: 16px; }
  .changelog-summary, .changelog-entry { padding: 16px; margin-bottom: 16px; }
}
.badge { background: #e25555; color: #fff; border-radius: 99px; padding: 0 6px; font-size: 11px; }
.search { flex: 1; min-width: 120px; }
.search input, .stack input, .stack select, .stack textarea, .filters select, .panel input, .panel textarea, .composer input, .composer select, .composer textarea, label select, label textarea, .side select, .profile select, .profile textarea {
  width: 100%; border: 1px solid #d5dbe3; border-radius: 8px; padding: 8px 10px; background: #fff;
}
.search { max-width: 360px; margin-left: auto; }
.search input { border: 1px solid #e3e7ee; border-radius: 999px; background: #f4f6f8; color: var(--ink); padding: 8px 14px; }
input[type="checkbox"] { width: auto; }
.top-actions { position: relative; display: flex; align-items: center; gap: 6px; }
.icon-btn, .who {
  background: transparent; border: 0; border-radius: 8px; padding: 7px 10px;
}
.icon-btn { width: 36px; height: 36px; border: 1px solid #d5dbe3; color: var(--ink); background: #fff; font-size: 20px; line-height: 1; }
.who, .avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #6b4c9a; color: #fff; font-size: 12px; font-weight: 700;
}
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.menu { position: absolute; right: 0; top: 42px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.12); min-width: 180px; padding: 6px; z-index: 6; }
.add-menu { right: 42px; }
.menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 8px; padding: 8px; }
.menu button:hover { background: #f3f4f6; }
#app { flex: 1; min-height: 0; }
.btn { background: var(--blue); color: #fff; border: 0; border-radius: 8px; padding: 8px 12px; white-space: nowrap; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid #d5dbe3; }
.btn.gold { background: var(--gold); color: #3a2a08; }
.btn.small { padding: 6px 10px; }
.btn.wide { width: 100%; }
.layout { display: grid; grid-template-columns: 196px minmax(260px, 340px) minmax(0,1fr) 280px; height: calc(100vh - 56px); min-height: 0; background: #fff; }
.pane { background: #fff; border-right: 1px solid var(--line); min-height: 0; overflow: auto; }
.layout .list { background: #f7f8fa; }
.pane h2, .group-label { margin: 0; padding: 8px 12px 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.folder, .conv, .people-nav button { display: flex; width: 100%; gap: 8px; text-align: left; border: 0; background: transparent; padding: 6px 12px; color: var(--ink); }
.folder { justify-content: space-between; align-items: center; border-radius: 8px; }
.folder small, .people-nav small { color: var(--muted); }
.folder.is-on, .conv.is-on, .people-nav button.is-on { background: var(--blue-soft); color: var(--blue); }
.folder.is-on small, .people-nav button.is-on small { color: inherit; }
.conv { border-bottom: 1px solid var(--line); align-items: flex-start; padding: 8px 10px; }
.conv-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.conv-top { display: flex; justify-content: space-between; gap: 8px; }
.conv-top time, .conv em { color: var(--muted); font-size: 13px; }
.conv em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv.unread strong { font-weight: 750; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); margin-top: 6px; flex: none; }
.thread { display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: #fff; }
.side, .page, .profile { padding: 10px 12px 24px; }
.side { overflow: auto; min-height: 0; background: #fbfbfc; border-left: 1px solid var(--line); }
.kv { display: grid; grid-template-columns: 88px 1fr; gap: 8px 10px; font-size: 14px; }
.kv button { justify-self: start; text-align: left; }
.thread-head, .profile-head { padding: 10px 12px 0; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.thread-scroll { overflow: auto; flex: 1; min-height: 0; padding: 0 12px 8px; }
.thread h1, .side h2, .profile h1 { font-size: 18px; }
.tabs, .seg { display: flex; gap: 4px; flex-wrap: wrap; padding: 10px 0; }
.tabs button, .seg button { border: 0; background: transparent; border-radius: 999px; padding: 6px 10px; color: var(--muted); }
.tabs button.is-on, .seg button.is-on { background: var(--blue-soft); color: var(--blue); }
.mail { border-top: 1px solid var(--line); padding: 12px 0; display: grid; gap: 6px; }
.mail header { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.mail p { white-space: pre-wrap; }
.composer { border-top: 1px solid var(--line); padding: 12px 18px 16px; display: grid; gap: 8px; background: #fff; }
.hint { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.who-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 10px; row-gap: 8px; align-items: start; }
.stack { display: grid; gap: 8px; }
.people { display: grid; grid-template-columns: 248px minmax(0, 1fr); height: calc(100vh - 56px); min-height: 0; }
.people-nav { background: #fff; border-right: 1px solid var(--line); overflow: auto; padding-bottom: 24px; }
.people-nav button { justify-content: space-between; align-items: center; border-radius: 6px; padding: 3px 10px; font-size: 13px; }
.people-nav form.row input { min-width: 0; flex: 1; }
.people-main .table-wrap { border-radius: 0; margin: 0; border-left: 0; border-right: 0; }
.people-main th { padding: 4px 8px; }
.people-main td { padding: 3px 8px; white-space: nowrap; }
.people-main th { white-space: nowrap; }
/* Report/source-supported table header/type;44px body rows are a readability proposal. */
.people { font-family: Helvetica, Arial, sans-serif; color: #364650; }
.people-main th { height: 50px; padding: 8px; font-size: 14px; line-height: 20px; font-weight: 400; color: #617685; border-bottom-color: #e8ecf0; }
.people-main td { height: 44px; padding: 8px; font-size: 14px; line-height: 20px; border-bottom-color: #e8ecf0; }
/* Reuse measured70px FUB desktop chrome; existing mobile wrapping is unchanged. */
@media (min-width: 801px) {
  #shell:is(:has(.people), :has(.profile-grid)) .top { height: 70px; background: #364650; border-bottom: 0; font-family: Helvetica, Arial, sans-serif; }
  #shell:is(:has(.people), :has(.profile-grid)) .rail { height: 70px; }
  #shell:is(:has(.people), :has(.profile-grid)) .nav-btn { min-height: 70px; color: #aeb3b8; font-weight: 400; }
  #shell:is(:has(.people), :has(.profile-grid)) .nav-btn span { font-size: 16px; line-height: 20px; font-weight: 400; }
  #shell:is(:has(.people), :has(.profile-grid)) .nav-btn.is-on { color: #fff; box-shadow: none; }
  #shell:is(:has(.people), :has(.profile-grid)) .nav-btn:hover, #shell:is(:has(.people), :has(.profile-grid)) .rail-mark { color: #fff; }
  #shell:is(:has(.people), :has(.profile-grid)) .people, #shell:is(:has(.people), :has(.profile-grid)) .profile-grid { height: calc(100vh - 70px); }
}
.people-name-trigger, .people-created-trigger { border: 0; padding: 0; background: transparent; font: inherit; font-weight: inherit; text-align: left; }
.people-name-trigger:focus-visible, .people-created-trigger:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.people-sort-arrow { color: var(--ink); }
.people-header-menu { position: fixed; z-index: 50; width: min(240px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow: auto; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.15); }
.people-header-menu[hidden] { display: none; }
.people-header-menu-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.people-header-menu-title button { border: 0; background: transparent; padding: 0 4px; }
.people-header-menu h2 { margin: 12px 0 8px; color: var(--muted); font-size: 12px; }
.people-header-menu p { margin: 8px 0; font-size: 12px; color: var(--muted); }
.people-header-menu > button, .people-header-sort button { padding: 6px 8px; border: 1px solid var(--line); background: #fff; border-radius: 4px; }
.people-header-sort { display: flex; gap: 8px; }

/* Observed Name menu geometry; capabilities remain limited to dismissal. */
.people-header-menu[data-column="name"] { width: min(272px, calc(100vw - 16px)); padding: 0; border-color: #e8ecf0; border-radius: 5px; box-shadow: 0 0 3px #e8ecf0; overflow: visible; }
.people-header-menu[data-column="name"]::before { content: ""; position: absolute; left: 10px; top: -17px; border: 8px solid transparent; border-bottom-color: #e8ecf0; pointer-events: none; }
.people-header-menu[data-column="name"]::after { content: ""; position: absolute; left: 11px; top: -15px; border: 7px solid transparent; border-bottom-color: #fff; pointer-events: none; }
.people-name-menu-body { max-height: calc(100vh - 18px); overflow: auto; border-radius: 4px; }
.people-header-menu[data-column="name"] .people-header-menu-title { position: absolute; right: 10px; top: 10px; }
.people-header-menu[data-column="name"] .people-header-menu-title strong { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.people-header-menu[data-column="name"] .people-header-menu-title button { color: #6d8291; font-size: 14px; line-height: 14px; }
.people-header-menu[data-column="name"] h2 { margin: 0; color: #6d8291; font-size: 11px; line-height: 11px; font-weight: 700; }
.people-name-menu-sort { height: 77px; padding: 15px 15px 0; }
.people-header-menu[data-column="name"] .people-header-sort { margin-top: 10px; gap: 0; width: 125.25px; height: 30px; }
.people-header-menu[data-column="name"] .people-header-sort button { flex: 1; padding: 0 14px; min-width: 0; border: 1px solid #d7dee2; border-radius: 0; font-size: 12px; line-height: 14px; font-weight: 400; color: #6d8291; background: #fff; white-space: nowrap; }
.people-header-menu[data-column="name"] .people-header-sort button:first-child { border-radius: 4px 0 0 4px; }
.people-header-menu[data-column="name"] .people-header-sort button:last-child { border-left: 0; border-radius: 0 4px 4px 0; }
.people-name-menu-filter { height: 46px; padding: 15px 15px 10px; border-bottom: 1px solid #e8ecf0; }
.people-name-menu-field { height: 44px; padding: 12px 15px; color: #364650; font-size: 14px; line-height: 20px; }
.people-name-menu-unavailable { height: 75px; padding: 0 15px; }
.people-header-menu[data-column="name"] .people-name-menu-unavailable p { margin: 0; padding-bottom: 5px; color: #6d8291; font-size: 12px; line-height: 20px; }
.people-name-menu-footer { height: 45px; background: #fcfdfd; border-top: 1px solid #e8ecf0; }
.people-name-menu-footer button { width: 100%; height: 44px; padding: 15px; text-align: left; border: 0; background: transparent; color: #93a5b2; font-size: 14px; line-height: 14px; }

.people-main .table-wrap table { min-width: 920px; }
.people-main .name-cell { gap: 8px; }
.people-main .name-cell .avatar { width: 22px; height: 22px; font-size: 10px; }
.people-main { min-width: 0; overflow: hidden; background: var(--bg); }
.people-body { display: grid; grid-template-columns: minmax(0, 1fr) 250px; height: 100%; min-height: 0; }
.people-body > div { min-width: 0; overflow: auto; }
.filter-card { background: #fff; border-left: 1px solid var(--line); padding: 14px; overflow: auto; }
.filter-card h2 { font-size: 14px; margin-bottom: 10px; }
.filter-card .dir-filters { display: grid; padding: 0; }
.filter-card select, .filter-card input { width: 100%; }
.report-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px 8px; background: #f4f6f8; position: sticky; top: 0; z-index: 4; }
.report-more { padding: 0 16px 8px; }
.people-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px 8px; position: sticky; top: 0; z-index: 3; background: #f4f6f8; }
.people-bar.new-list-bar { top: 48px; padding-top: 0; }
.task-filter-anchor { display: inline-flex; }
.task-type-popup { position: fixed; z-index: 40; width: 232px; background: #fff; border: 1px solid #e4e9ee; border-radius: 5px; box-shadow: 0 3px 10px #2333431a; overflow-y: auto; color: #384a59; }
.task-filter-choice { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #edf0f3; }
.task-filter-choice:last-child { border-bottom: 0; }
.task-filter-choice:hover { background: #f5f9fc; }
.task-filter-choice input { width: 19px; height: 19px; margin: 0; accent-color: #4daed7; }
.task-filter-choice:focus-within { outline: 2px solid #2188bc; outline-offset: -2px; }
.people-bar.new-list-bar input { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px 8px; min-width: 160px; }
.people-bar h1, .task-board h1, .cal-head h1, .page > h1 { font-size: 20px; font-weight: 650; }
.people-bar select { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px 8px; }
.dir-filters { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 12px 8px; }
.dir-filters select, .dir-filters input, .profile-col select, .profile-col input, .profile-col textarea { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px 8px; }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin: 0 12px 12px; overflow: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 650; padding: 6px 8px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
td { padding: 5px 8px; border-bottom: 1px solid #f0f2f5; font-size: 13px; vertical-align: middle; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #f5f8ff; }
.stage {
  display: inline-block; border-radius: 999px; padding: 2px 8px; font-size: 12px; background: #e8ecf0; color: #364650; white-space: nowrap;
}
.stage-lead { background: #f5fafd; color: #0076a4; }
.stage-action-plan, .stage-hot-prospect { background: #fffcf6; color: #8a6116; }
.stage-showing { background: #f4f6ff; color: #4c5fd6; }
.stage-nurture { background: #f5fafd; color: #0076a4; }
.stage-applied { background: #fff6ee; color: #a15a2a; }
.stage-closed, .stage-past-client { background: #f3fcf8; color: #1c7a56; }
.stage-tenant { background: #f3fcf8; color: #1c7a56; }
.stage-inactive, .stage-trash, .stage-garbage { background: #e8ecf0; color: #6d8291; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.page { max-width: 1100px; }
.page.cal-page { max-width: none; }
.cal-split { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 12px; align-items: start; }
.cal-agenda { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; max-height: calc(100vh - 150px); overflow: auto; }
.cal-agenda h2 { margin: 0 0 8px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cal-agenda .cal-switch { justify-content: flex-start; margin: 0 0 8px; }
.cal-filters { display: flex; flex-direction: column; gap: 8px; }
.cal-filters label { display: flex; gap: 8px; align-items: center; }
.cal-day em.google, .day-board em.google { color: #4eaddd; }
.stage-chips { padding: 0 12px 8px; }
.board { display: flex; gap: 12px; overflow: auto; padding: 16px; height: calc(100vh - 56px); align-items: flex-start; background: #f4f6f8; }
.col { width: 260px; flex: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; box-shadow: 0 1px 2px rgba(28, 36, 48, .04); }
.col h2 { font-size: 13px; margin-bottom: 8px; }
.col .cards { max-height: calc(100vh - 150px); overflow: auto; }
.deal { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 8px; }
.cal-head, .cal-week, .cal-grid { display: grid; }
.cal-head { grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin-bottom: 12px; }
.cal-head select { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px 8px; margin-top: 8px; }
.cal-week, .cal-grid { grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-week span { font-size: 12px; color: var(--muted); }
.cal-day { min-height: 88px; border: 1px solid var(--line); background: #fff; border-radius: 8px; text-align: left; padding: 6px; display: grid; align-content: start; gap: 2px; }
.cal-day em { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-day.mute { background: transparent; border-color: transparent; }
.admin { min-height: calc(100vh - 56px); background: var(--bg); }
.admin-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; background: #fff; border-bottom: 1px solid var(--line); padding: 0 12px; }
.admin-nav button { text-align: left; border: 0; border-bottom: 2px solid transparent; background: transparent; border-radius: 0; padding: 12px 10px; color: #5c6773; font-weight: 600; white-space: nowrap; }
.admin-nav button.is-on { background: transparent; color: var(--blue); border-bottom-color: var(--blue); }
.admin-more { position: relative; }
.admin-more summary { list-style: none; cursor: pointer; padding: 12px 10px; color: #5c6773; font-weight: 600; }
.admin-more summary::-webkit-details-marker { display: none; }
.admin-more.is-on summary, .admin-more[open] summary { color: var(--blue); }
.admin-more .admin-pop { position: absolute; top: calc(100% + 4px); left: 0; z-index: 6; display: grid; min-width: 220px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(28, 36, 48, .12); }
.admin-more .admin-pop button { border: 0; border-radius: 8px; padding: 8px 10px; font-weight: 550; }
.admin-more .admin-pop button.is-on { background: var(--blue-soft); border-bottom-color: transparent; }
.admin-body { padding: 22px 28px 48px; max-width: 1180px; }
.admin-section { margin: 0 0 26px; }
.admin-section h2 { margin: 0 0 12px; font-size: 15px; font-weight: 650; letter-spacing: 0; text-transform: none; color: var(--ink); }
.admin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.admin-card { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 2px 12px; align-items: start; width: 100%; min-height: 112px; padding: 16px; text-align: left; background: #fff; border: 1px solid #e7ebf0; border-radius: 12px; box-shadow: 0 1px 2px rgba(28, 36, 48, .04); }
button.admin-card:hover { border-color: #c5d4ea; box-shadow: 0 6px 18px rgba(28, 36, 48, .06); }
button.admin-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.admin-card.is-na { background: #f3f4f6; border-style: dashed; border-color: #d5dbe3; box-shadow: none; cursor: default; }
.admin-card.is-na .admin-card-copy strong { color: #6b7280; }
.admin-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.admin-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.admin-ico.blue { background: #f5fafd; color: #4eaddd; }
.admin-ico.green { background: #e5f6ee; color: #137a4b; }
.admin-ico.gold { background: #fff4d6; color: #92600a; }
.admin-ico.purple { background: #f3e8ff; color: #7e22ce; }
.admin-ico.gray { background: #e5e7eb; color: #6b7280; }
.admin-card-copy { display: grid; gap: 4px; min-width: 0; }
.admin-card-copy strong { font-size: 15px; font-weight: 650; }
.admin-card-copy > span:last-child { color: var(--muted); font-size: 13px; line-height: 1.45; }
.admin-card .pill { justify-self: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 8px; margin-bottom: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; }
.page.dash-page { max-width: 1280px; margin: 0 auto; padding-bottom: 32px; }
.dash-page .people-bar h2 { font-size: 16px; font-weight: 650; }
.dash-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 8px 16px 16px; }
.dash-cards article { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.dash-cards h2 { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.dash-cards b { font-size: 28px; line-height: 1.1; }
.dash-cards .up { color: var(--green); font-weight: 650; }
.dash-cards .down { color: var(--red); font-weight: 650; }
.dash-cards .muted { font-size: 12px; }
.dash-cards .btn { white-space: normal; justify-self: start; }
.dash-cards .btn.is-on { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.dash-bars { display: flex; align-items: flex-end; gap: 1px; height: 36px; min-width: 0; }
.dash-bars i { flex: 1 1 0; min-width: 0; background: var(--blue); border-radius: 2px 2px 0 0; display: block; opacity: .8; }
.report-chart { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; }
.report-chart h2 { font-size: 13px; margin: 0 0 8px; }
.report-bars { display: flex; align-items: flex-end; gap: 2px; height: 120px; }
.report-bars i { flex: 1 1 0; min-width: 2px; background: var(--blue); border-radius: 2px 2px 0 0; display: block; opacity: .85; }
.stats div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; }
.stats b { font-size: 28px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 36px; gap: 8px; align-items: center; margin: 6px 0; font-size: 13px; }
.bar { height: 8px; background: #eef1f5; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--blue); }
.pill { display: inline-block; border-radius: 99px; padding: 2px 8px; background: #dcfce7; color: var(--green); font-size: 12px; }
.pill.warn { background: #fff6d8; color: #8a5a00; }
.pill.off { background: #f3f4f6; color: var(--muted); }
.tag { display: inline-flex; gap: 4px; align-items: center; background: #e8ecf0; color: #364650; border-radius: 99px; padding: 2px 8px; margin: 0 6px 6px 0; font-size: 12px; }
.tag button { border: 0; background: transparent; color: #93a5b2; }
.tag.hot { background: #e8ecf0; color: #364650; }
.mini { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.plan-name { margin: 10px 0 0; font-size: 13px; }
.mini li, .step { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.mini li.appt-line, .mini li.task-line { flex-wrap: wrap; }
.appt-move input, .gcal-move input, .gcal-title input, .task-move input, .task-title input, .task-who select, .task-type select, .task-repeat select, .appt-outcome, .appt-title input { border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; background: #fff; }
.gcal-move { margin-top: 4px; }
.task-done span { text-decoration: line-through; color: var(--muted); }
.due { color: var(--red); }
.linkish { border: 0; background: transparent; color: var(--blue); padding: 0; text-align: left; }
.watch { margin: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 4px; font-size: 13px; }
.empty { padding: 24px; color: var(--muted); }
.note-line { margin: 0 16px 10px; color: var(--muted); font-size: 13px; }

/* Measured FUB email-template frame; other app screens retain their styles. */
#shell:has(.email-template-admin) { background: #f1f4f8; font-family: Helvetica, Arial, sans-serif; color: #364650; }
#shell:has(.email-template-admin) .top { height: 70px; background: #364650; border-bottom: 0; }
#shell:has(.email-template-admin) .rail { height: 70px; }
#shell:has(.email-template-admin) .nav-btn { min-height: 70px; color: #9a9ea1; font-weight: 400; }
#shell:has(.email-template-admin) .nav-btn span { font-size: 16px; line-height: 20px; font-weight: 400; }
#shell:has(.email-template-admin) .nav-btn.is-on { color: #fff; box-shadow: none; }
#shell:has(.email-template-admin) .rail-mark { color: #fff; }
.email-template-admin { min-height: calc(100vh - 70px); background: #f1f4f8; }
.email-template-admin .admin-nav { position: relative; height: auto; min-height: 60px; padding: 0 25px; gap: 30px; flex-wrap: wrap; overflow: visible; }
.email-template-admin .admin-more { position: static; }
.email-template-admin .admin-more .admin-pop { top: calc(100% + 4px); left: auto; right: 25px; z-index: 12; min-width: min(220px, calc(100vw - 50px)); max-width: calc(100vw - 50px); }
.email-template-admin .admin-nav > button, .email-template-admin .admin-more > summary { padding: 20px 0 17px; font-size: 16px; line-height: 20px; font-weight: 400; border-bottom: 3px solid transparent; }
.email-template-admin .admin-nav > button.is-on { color: #364650; border-bottom-color: #4eaddd; }
.email-template-admin .admin-body { max-width: none; padding: 20px 25px 60px; }
.email-template-admin .admin-nav > .template-root-help { position: static; flex: none; margin-left: auto; display: flex; align-items: center; gap: 5px; width: 188.1875px; height: 30px; padding: 8px 14px; border: 1px solid #bfe0f2; border-radius: 15px; background: #f5fafd; color: #4eaddd; font-size: 12px; line-height: 12px; font-weight: 400; white-space: nowrap; cursor: not-allowed; }
.email-template-admin .template-help-icon { width: 12px; height: 14px; line-height: 14px; flex: none; }
.email-template-root > h1 { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:is(.email-template-root, .text-template-root) .template-root-toolbar { position: relative; height: 70px; }
:is(.email-template-root, .text-template-root) .template-root-count { position: absolute; top: 15px; left: 0; font-size: 14px; line-height: 14px; font-weight: 400; color: #364650; }
:is(.email-template-root, .text-template-root) .template-root-tools { position: absolute; right: 0; top: 15px; display: flex; gap: 15px; }
:is(.email-template-root, .text-template-root) .template-root-tools input { width: 171px; height: 40px; border: 1px solid #d7dee2; border-radius: 4px; padding: 12px 10px; font-size: 14px; line-height: 14px; background: #fff; }
:is(.email-template-root, .text-template-root) .template-root-create { display: flex; gap: 1px; background: #bfe0f2; border-radius: 22px; }
:is(.email-template-root, .text-template-root) .template-root-create .btn { width: 151.66px; height: 40px; padding: 0; border-radius: 22px 0 0 22px; background: #4eaddd; color: #fff; font-size: 14px; }
:is(.email-template-root, .text-template-root) .template-root-create .btn:last-child { width: 98.39px; border-radius: 0 22px 22px 0; }
:is(.email-template-root, .text-template-root) .template-root-create .btn:only-child { width: 151.66px; border-radius: 22px; }
.email-template-root .template-root-table { overflow-x: auto; border: 1px solid #e8ecf0; border-radius: 4px; box-shadow: 0 0 3px #e8ecf0; background: #fff; }
.email-template-root .template-root-table table { width: 100%; min-width: 1128px; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.email-template-root .template-root-table th { height: 51px; padding: 0 10px; border-bottom: 1px solid #f1f4f8; background: #fcfdfd; color: #6d8291; font-size: 14px; line-height: 20px; font-weight: 400; position: static; white-space: nowrap; }
.email-template-root .template-root-table td { height: 50px; padding: 0 10px; border-bottom: 1px solid #f1f4f8; color: #364650; font-size: 14px; line-height: 20px; }
.email-template-root .template-root-table tbody tr:last-child td { border-bottom: 0; }
.email-template-root .template-root-table .linkish { color: #4eaddd; }
.email-template-root .template-root-table td:first-child .linkish { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email-template-root .template-data-details { margin-top: 16px; color: #6d8291; font-size: 14px; }
.email-template-root .template-root-status { font-size: 14px; color: #6d8291; }
.email-template-results .template-results-toolbar { position: relative; height: 101px; }
.email-template-results .template-breadcrumb { position: absolute; top: 15px; left: 0; font-size: 16px; line-height: 16px; font-weight: 500; }
.email-template-results .template-breadcrumb .linkish { color: #4eaddd; }
.email-template-results .template-results-tools { position: absolute; right: 0; top: 15px; display: flex; gap: 15px; }
.email-template-results .template-results-tools input { width: 171px; height: 40px; border: 1px solid #d7dee2; border-radius: 4px; padding: 12px 10px; font-size: 14px; line-height: 14px; background: #fff; }
.email-template-results .template-results-tools .btn { width: 151.66px; height: 40px; padding: 0; border-radius: 20px; background: #4eaddd; font-size: 14px; }
.email-template-results .template-results-tools .btn:disabled { cursor: not-allowed; }
.admin .btn:disabled { opacity: .45; cursor: not-allowed; }
.email-template-results .template-result-actions { position: absolute; top: 46px; left: 0; height: 40px; display: flex; align-items: center; font-size: 14px; line-height: 14px; }
.email-template-results .template-count-detail { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.email-template-results .template-results-table { width: 100%; overflow-x: auto; border: 1px solid #e8ecf0; border-radius: 4px; box-shadow: 0 0 3px #e8ecf0; background: #fff; }
.email-template-results table { width: 100%; min-width: 1128px; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.email-template-results th { height: 51px; padding: 0 10px; border-bottom: 1px solid #f1f4f8; background: #fcfdfd; color: #6d8291; font-size: 14px; line-height: 20px; font-weight: 400; position: static; white-space: nowrap; }
.email-template-results td { height: 60px; padding: 0 10px; border-bottom: 1px solid #f1f4f8; background: #fff; color: #364650; font-size: 14px; line-height: 20px; }
.email-template-results tbody tr:last-child td { border-bottom: 0; }
.email-template-results .template-record { display: flex; align-items: center; gap: 12px; }
.email-template-results .template-record input { width: 13px; height: 13px; margin: 0; flex: none; }
.email-template-results .template-record-text { min-width: 0; max-width: 161px; }
.email-template-results .template-result-name, .email-template-results .template-result-subject, .email-template-results .template-cell-text { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email-template-results .template-result-name { color: #4eaddd; font-size: 14px; line-height: 14px; }
.email-template-results .template-result-subject { color: #93a5b2; font-size: 14px; line-height: 20px; }
.email-template-results .template-result-action { border: 0; padding: 0; background: transparent; color: #93a5b2; cursor: not-allowed; }
.email-template-results .template-data-details { margin-top: 16px; color: #6d8291; font-size: 14px; }
.template-results-mine .template-breadcrumb { width: calc((100% - 30px) / 2); }
.template-results-mine .template-result-actions > span > [aria-hidden="true"] { display: block; }
.template-results-mine .template-results-table { container-type: inline-size; }
.template-results-mine table { min-width: 1113px; }
.template-results-mine th:last-child, .template-results-mine td:last-child { padding: 0; }
.template-results-mine .template-empty-row td { position: relative; height: 206px; padding: 0; vertical-align: middle; text-align: center; }
.template-results-mine .template-empty-state { position: absolute; top: 50%; left: 50cqw; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; width: max-content; max-width: calc(100cqw - 40px); }
.template-results-mine .template-empty-decoration { height: 42px; flex: none; }
.template-results-mine .template-empty-message { margin: 10px 0 0; color: #364650; font-size: 16px; line-height: 20px; font-weight: 700; }
.template-results-mine .template-empty-across { margin: 5px 0 0; color: #364650; font-size: 14px; line-height: 20px; font-weight: 400; }
.template-results-mine .template-empty-link { display: flex; align-items: center; justify-content: center; margin-top: 15px; height: 14px; line-height: 14px; }
.template-results-mine .template-empty-link .linkish { display: flex; align-items: center; height: 20px; color: #4eaddd; font-size: 14px; line-height: 14px; font-weight: 400; }
@media (max-width: 1179px) {
  .email-template-admin .admin-nav { height: auto; min-height: 60px; flex-wrap: wrap; column-gap: 20px; row-gap: 0; }
  .email-template-admin .admin-nav > .template-root-help { position: static; flex: none; margin-left: auto; }
}
@media (max-width: 700px) {
  .email-template-admin .admin-nav > button, .email-template-admin .admin-more > summary { padding: 12px 0 9px; font-size: 14px; }
  .email-template-admin .admin-body { padding: 16px 12px 32px; }
  :is(.email-template-root, .text-template-root) .template-root-toolbar { height: 105px; }
  :is(.email-template-root, .text-template-root) .template-root-tools { left: 0; right: auto; top: 40px; flex-wrap: wrap; gap: 10px; }
  :is(.email-template-root, .text-template-root) .template-root-tools input { width: 130px; }
  :is(.email-template-root, .text-template-root) .template-root-create .btn { width: 133px; }
  :is(.email-template-root, .text-template-root) .template-root-create .btn:last-child { width: 80px; }
  .text-template-root .template-root-create .btn:only-child { width: 133px; }
  .email-template-root .template-root-create .btn:only-child { width: 133px; }
}
@media (max-width: 450px) {
  :is(.email-template-root, .text-template-root) .template-root-toolbar { height: 150px; }
  :is(.email-template-root, .text-template-root) .template-root-tools { max-width: 100%; }
}
@media (max-width: 700px) {
  .email-template-results .template-results-toolbar { height: auto; min-height: 145px; }
  .email-template-results .template-breadcrumb { position: static; padding-top: 15px; }
  .email-template-results .template-results-tools { top: 45px; left: 0; right: auto; }
  .email-template-results .template-result-actions { top: 95px; }
}
.profile-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr) 240px; height: calc(100vh - 56px); min-height: 0; background: #f3f5f7; }
.profile-col { border-right: 1px solid var(--line); padding: 10px 12px 18px; background: #fff; overflow: auto; min-height: 0; }
.profile-col:last-child { border-right: 0; border-left: 1px solid var(--line); background: #f4f6f8; }
.who-row > div:nth-child(2) { flex: 1; min-width: 0; }
.profile-col h1 { font-size: 18px; margin: 2px 0 4px; }
.profile-mid { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #f3f5f7; }
.profile-mid .scroll { flex: 1; overflow: auto; min-height: 0; padding: 4px 0 16px; }
.composer.card { margin: 12px 12px 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.text-template-root .text-template-form { max-width: 36rem; margin: 16px 0 8px; }
.text-template-root textarea[name="body"] { width: 100%; box-sizing: border-box; min-height: 160px; line-height: 1.45; font: inherit; white-space: pre-wrap; }
.text-template-root .template-root-table { overflow-x: auto; border: 1px solid #e8ecf0; border-radius: 4px; background: #fff; margin-top: 12px; }
.text-template-root .template-root-table th, .text-template-root .template-root-table td { text-align: left; padding: 10px; border-bottom: 1px solid #f1f4f8; }
.text-template-preview { white-space: pre-wrap; font: inherit; margin: 0 0 12px; }
.fmt { display: flex; gap: 4px; }
.fmt button { border: 1px solid var(--line); background: #fff; border-radius: 6px; min-width: 28px; padding: 2px 8px; }
.rich-box { min-height: 88px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 8px; white-space: pre-wrap; }
.rich-box.mail-box { min-height: 120px; }
.file-line { display: block; margin: 6px 0; font-size: 13px; color: var(--muted); }
.live-mail { margin: 8px 16px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.live-mail h2 { font-size: 14px; margin: 0 0 4px; }
.live-rows { list-style: none; margin: 6px 0 0; padding: 0; }
.live-rows li { display: block; padding: 6px 0; border-top: 1px solid #f0f2f5; }
.live-rows li:first-child { border-top: 0; }
.live-rows strong, .live-rows p { display: block; }
.live-rows p { margin: 2px 0 0; }
.live-body { white-space: pre-wrap; }
.live-body-rich { white-space: normal; overflow-wrap: anywhere; }
.live-body-rich p { margin: 0 0 12px; }
.live-body-rich blockquote { margin: 12px 0; padding-left: 12px; border-left: 3px solid #c8d3dc; }
.rich-box:empty:before { content: attr(data-placeholder); color: var(--muted); }
.note-rich p { margin: 0 0 6px; }
.note-rich ul, .note-rich ol { margin: 4px 0 4px 1.2em; }
.name-cell { display: flex; gap: 10px; align-items: center; }
.mass-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 16px 10px; }
.mass-bar select, .mass-bar input { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px 8px; }
.timeline { display: grid; gap: 6px; padding: 8px 12px; }
.bubble { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 8px 10px; max-width: min(640px, 100%); }
.bubble.us { margin-left: auto; background: #e7eefc; }
.bubble.activity { max-width: 100%; background: #f7f8fa; }
.bubble header, .inquiry header { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.bubble p, .inquiry p { white-space: pre-wrap; margin-top: 4px; }
.inquiry { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px; }
.danger { color: var(--red); background: transparent; border: 0; padding: 10px 0; }
.avatar.xl { width: 48px; height: 48px; font-size: 16px; }
.modal { position: fixed; inset: 0; background: rgba(20, 24, 32, .35); display: grid; place-items: center; z-index: 20; padding: 16px; }
.dialog { width: min(480px, 100%); background: #fff; border-radius: 14px; padding: 18px; display: grid; gap: 10px; }
.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: #1c2430; color: #fff; border-radius: 999px; padding: 8px 14px; z-index: 30; }
.clock { font-size: 32px; font-variant-numeric: tabular-nums; }
.check { display: flex; gap: 8px; align-items: center; }
.flow { display: grid; gap: 8px; }
.mail-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: grid; gap: 8px; max-width: 760px; margin-bottom: 16px; }
.mail-card h2 { margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mail-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; font-size: 14px; }
.mail-line > span:first-child { color: var(--muted); min-width: 42px; }
.share-url { margin: 2px 0 0; font-size: 13px; word-break: break-all; }
.menu-who { margin: 0; padding: 8px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); }
.col-menu { position: absolute; right: 16px; top: 52px; z-index: 4; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 10px 12px; display: grid; gap: 6px; min-width: 180px; }
.people-bar { position: sticky; top: 0; }
.people-body.filters-off { grid-template-columns: minmax(0, 1fr); }
.side-sec { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.side-sec header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.side-sec header button.linkish { font-weight: 700; color: var(--ink); }
.contact-grid { display: grid; gap: 8px; margin-top: 12px; }
.extra-lines { margin: 8px 0 0; }
.extra-lines p { margin: 0 0 4px; font-size: 13px; }
.contact-grid label { display: grid; gap: 2px; font-size: 12px; color: var(--muted); }
.contact-grid input, .contact-grid select, .contact-grid textarea { width: 100%; border-color: transparent; background: transparent; }
.contact-grid input:hover, .contact-grid select:hover, .contact-grid textarea:hover,
.contact-grid input:focus, .contact-grid select:focus, .contact-grid textarea:focus { border-color: #d5dbe3; background: #fff; }
.profile-col:last-child .side-sec { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; margin-top: 10px; }
/* Contact-sidecard visual proposal from current reports; pane/composer geometry is retained. */
.profile-grid > .profile-col { --ink: #364650; --muted: #536b7a; --line: #e8ecf0; color: var(--ink); background: #fff; font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; border-color: var(--line); }
.profile-grid > .profile-col:last-child { background: #f1f4f8; }
.profile-grid > .profile-col h1 { font-size: 22px; line-height: 28px; font-weight: 600; overflow-wrap: anywhere; }
.profile-grid > .profile-col h1 .linkish { font-size: 12px; line-height: 16px; font-weight: 400; }
.profile-grid > .profile-col label, .profile-grid > .profile-col .muted { font-size: 12px; line-height: 16px; color: var(--muted); }
.profile-grid > .profile-col .contact-grid input, .profile-grid > .profile-col .contact-grid select, .profile-grid > .profile-col .contact-grid textarea { font-size: 14px; line-height: 20px; color: var(--ink); }
.profile-grid > .profile-col .side-sec { border-color: var(--line); }
.profile-grid > .profile-col:last-child .side-sec { background: #fff; border-radius: 6px; box-shadow: none; padding: 12px; }
.profile-grid > .profile-col .side-sec header { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
.profile-grid > .profile-col input, .profile-grid > .profile-col select, .profile-grid > .profile-col textarea, .profile-grid > .profile-col .btn { border-radius: 4px; }
.profile-grid > .profile-col a, .profile-grid > .profile-col .linkish { color: #4eaddd; }
.profile-grid > .profile-col .side-sec header .linkish { color: var(--ink); }
#new-list { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; padding: 8px 12px 16px; }
#new-list input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: #fff; }
.share-url a { display: inline-block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.report-board { max-width: 1180px; margin: 0 auto; padding: 18px 24px 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.report-board > h1, .report-board > p, .report-board > .stats { grid-column: 1 / -1; }
.report-board > .split { display: contents; }
.report-board .panel { margin-bottom: 0; }
.cal-page { max-width: 1080px; margin: 0 auto; padding: 16px 20px 36px; }
.task-board { margin: 0 auto; }
.nav-note { margin: 0 14px 16px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.who-tools { grid-column: 1 / -1; margin-left: 0; position: relative; }
.more-pop { position: absolute; right: 0; top: 36px; z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 6px; min-width: 160px; }
.more-pop button { display: block; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 6px; padding: 8px; }
.more-pop .danger { color: var(--red); }
.bubble-tools { margin: 6px 0 0; font-size: 12px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.conv.unread { background: #f4f8ff; }
.conv-row { display: flex; align-items: stretch; gap: 4px; }
.conv-row .pick { margin: 14px 0 0 8px; }
.conv-row .conv { flex: 1; }
.who-tools { display: flex; gap: 6px; align-items: flex-start; }
.col-menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 6px; padding: 4px 6px; }
.col-menu button.is-on { background: var(--blue-soft); }
.btn.ghost.is-on { background: var(--blue-soft); color: var(--blue); }
.search { position: relative; }
.search > input { width: 100%; }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); width: auto; background: #fff; color: var(--ink); border: 1px solid #d7dee2; border-radius: 8px; box-shadow: 0 8px 24px rgba(16, 42, 67, .12); z-index: 40; display: grid; max-height: 400px; overflow: auto; }
.search-results[hidden] { display: none; }
.search-group { margin: 0; padding: 8px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #6d8291; }
.search-results button { display: grid; gap: 2px; width: 100%; min-height: 47px; text-align: left; border: 0; background: #fff; padding: 6px 12px; border-bottom: 1px solid var(--line); color: var(--ink); }
.search-results button strong { font-size: 14px; line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-results button.is-active { background: #eaf3ff; }
.search-results button span { color: var(--muted); font-size: 12px; line-height: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-status { margin: 0; padding: 12px; font-size: 12px; color: var(--muted); }
.cal-switch { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
.cal-switch button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; }
.cal-switch button.is-on { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.cal-day em.task, .day-board em.task { background: #ffe08a; color: #5c4300; border-radius: 3px; padding: 0 3px; }
.week-wrap { overflow-x: auto; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 6px; }
.day-col, .day-board { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-height: 180px; }
.day-col { display: grid; align-content: start; gap: 4px; }
.day-col em, .day-board em { font-size: 12px; }
.share-url a { color: var(--blue); }
.send-status { color: var(--red); min-height: 0; }
.steps { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.table-wrap { overflow: auto; max-width: 100%; }
.grid-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); }
.grid-table th, .grid-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid-table th { font-size: 12px; color: var(--muted); font-weight: 600; }
.sample-banner { margin: 0; padding: 8px 16px; background: #fff8e8; color: #6b4e12; border-bottom: 1px solid #f0e2bc; font-size: 13px; }
.task-board { max-width: 1100px; padding-bottom: 28px; }
.task-group h2 { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 6px 16px 8px; }
.task-rows { list-style: none; margin: 0 12px 12px; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.task-row { display: flex; gap: 10px; align-items: center; padding: 7px 10px; border-bottom: 1px solid #f0f2f5; flex-wrap: wrap; }
.task-row .task-title { flex: 1 1 220px; min-width: 180px; }
.task-row .task-title input { flex: 1; min-width: 0; }
.task-row form.task-who { flex: 1 1 200px; min-width: 180px; overflow: visible; white-space: normal; }
.task-row:last-child { border-bottom: 0; }
.task-main { display: grid; flex: 1.4; min-width: 0; text-align: left; border: 0; background: transparent; padding: 0; }
.task-main strong, .task-person, .task-when, .task-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-person { flex: 1; min-width: 0; text-align: left; }
.task-when { flex: 0 0 148px; }
.task-who { flex: 0.7; min-width: 0; }
/* Tasks visual proposal from supplied palette/type reports and the public Tasks reference. */
.task-board { --ink: #364650; --muted: #536b7a; --line: #e8ecf0; --task-header-height: 109px; color: var(--ink); background: #f1f4f8; font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; padding: 12px 16px 40px; }
.task-board > .people-bar { top: var(--task-header-height); padding: 8px 0 12px; margin-bottom: 8px; background: #f1f4f8; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.task-board > .people-bar h1 { font-size: 22px; line-height: 28px; font-weight: 600; }
.task-board > .people-bar > .row { gap: 8px; max-width: 100%; }
.task-board > .note-line, .task-board > p.muted { padding: 0; margin: 0 0 10px; }
.task-board .muted, .task-board .task-group h2, .task-board .task-group h3 { color: var(--muted); font-size: 12px; line-height: 16px; }
.task-board .task-group h2, .task-board .task-group h3 { margin: 12px 0 8px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.task-board .task-rows { margin: 0 0 16px; border-color: var(--line); border-radius: 6px; }
.task-board .task-row { padding: 12px; gap: 8px 12px; border-bottom-color: var(--line); }
.task-board .task-row form { max-width: 100%; min-width: 0; }
.task-board .task-row .task-title { flex: 1 1 280px; min-width: 0; }
.task-board .task-row .task-title input { flex: 1 1 140px; min-width: 0; width: 180px; }
.task-board .task-row form.task-who { flex: 1 1 240px; min-width: 0; }
.task-board .task-row form.task-who select { flex: 1 1 140px; min-width: 0; }
.task-board .task-row .task-person { flex: 1 1 180px; min-width: 140px; max-width: 100%; }
.task-board input:not([type="hidden"]), .task-board select { max-width: 100%; min-height: 34px; padding: 6px 8px; border: 1px solid #d5dbe3; border-radius: 4px; background: #fff; color: var(--ink); font-size: 14px; line-height: 20px; }
.task-board .btn { min-height: 34px; border-radius: 4px; padding: 6px 8px; }
.task-board .btn.ghost.is-on { color: #4eaddd; background: #f5fafd; border-color: #bfe0f2; }
.task-board .linkish { color: #4eaddd; }
@media (min-width: 801px) {
  #shell:has(.task-board) .top { height: 70px; background: #364650; border-bottom: 0; font-family: Helvetica, Arial, sans-serif; }
  #shell:has(.task-board) .rail { height: 70px; }
  #shell:has(.task-board) .nav-btn { min-height: 70px; color: #aeb3b8; font-weight: 400; }
  #shell:has(.task-board) .nav-btn span { font-size: 16px; line-height: 20px; font-weight: 400; }
  #shell:has(.task-board) .nav-btn.is-on { color: #fff; box-shadow: none; }
  #shell:has(.task-board) .nav-btn:hover, #shell:has(.task-board) .rail-mark { color: #fff; }
  .task-board { --task-header-height: 70px; }
}
#shell:has(.task-board) .nav-btn .badge { color: #fff; background: #b43333; }
/* Observed desktop Future card/controls; existing edit forms may grow vertically. */
@media (min-width: 801px) {
  .task-board:has(> .people-bar [data-act="task-tab"][data-focus="future"].is-on) > .people-bar { min-height: 60px; }
  .task-board:has(> .people-bar [data-act="task-tab"][data-focus="future"].is-on) [data-act="toggle-task-filter"] { width: 100px; min-height: 40px; }
  .task-board:has(> .people-bar [data-act="task-tab"][data-focus="future"].is-on) #task-agent { min-width: 82px; min-height: 40px; }
  .task-board:has(> .people-bar [data-act="task-tab"][data-focus="future"].is-on) #task-agent:has(option[value="all"]):has(option:checked[value=""]) { width: 82px; }
  .task-board:has(> .people-bar [data-act="task-tab"][data-focus="future"].is-on) > .task-group { width: 750px; max-width: 100%; margin: 20px auto 0; background: #fff; border: 1px solid #e8ecf0; border-radius: 5px; }
  .task-board:has(> .people-bar [data-act="task-tab"][data-focus="future"].is-on) > .task-group > .task-rows { margin: 0; border: 0; border-radius: 0; }
  .task-board:has(> .people-bar [data-act="task-tab"][data-focus="future"].is-on) > .task-group > :is(h2,h3,.note-line) { padding-left: 10px; padding-right: 10px; }
  .task-board:has(> .people-bar [data-act="task-tab"][data-focus="future"].is-on) .task-row { padding: 10px; }
}
.chips { display: flex; gap: 6px; margin: 0 0 12px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 13px; }
.chips button.is-on { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
td .muted { font-size: 12px; }
@media (max-width: 1100px) {
  .layout { grid-template-columns: 200px minmax(0, 1fr); }
  .layout .side { display: none; }
  .profile-grid { grid-template-columns: 240px minmax(0, 1fr) 220px; }
  .stats, .split, .dash-cards { grid-template-columns: 1fr 1fr; }
  .admin-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .top { height: auto; flex-wrap: wrap; padding: 8px 10px; }
  .rail { order: 3; width: 100%; height: auto; overflow-x: auto; }
  .search { max-width: none; flex: 1 1 140px; margin-left: 0; }
  .nav-btn { min-height: 44px; flex: none; }
  .people, .layout, .admin, .profile-grid, .people-body, .cal-split { grid-template-columns: 1fr; height: auto; }
  .admin-nav { flex-wrap: nowrap; overflow-x: auto; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-body { padding: 16px 12px 32px; }
  .admin-body, .mail-card, .table-wrap { min-width: 0; max-width: 100%; }
  .table-wrap { overflow-x: auto; }
  .filter-card { border-left: 0; border-top: 1px solid var(--line); }
  .people-nav { display: flex; overflow-x: auto; }
  .people-nav button { width: auto; white-space: nowrap; }
  .layout .pane.list { max-height: 280px; background: #fff; }
  .stats, .split, .dash-cards, .report-board { grid-template-columns: 1fr; }
  .report-board > h1, .report-board > p, .report-board > .stats { grid-column: auto; }
  .table-wrap { margin: 0 8px 16px; }
  .task-row { align-items: flex-start; }
  .task-row .task-title, .task-row form.task-who, .task-main { flex: 1 1 100%; }
  .task-when, .task-who { flex: 0 1 auto; }
}

.people-header-sort button[aria-pressed="true"] { background: #e8ecf0; }
.people-directory-status { padding: 8px 16px 64px; min-height: 1px; }

/* Measured profile activity toolbar; counts retain the existing loaded-event meaning. */
.profile-activity-tabs { min-height: 51px; padding: 0 16px; gap: 0; }
.profile-activity-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-height: 51px; padding: 0 6px; border: 0; border-bottom: 1px solid #f1f4f8; border-radius: 0; background: #fcfdfd; color: #bbc8d2; }
.profile-activity-tabs button[data-kind="all"] { width: 54.11px; }
.profile-activity-tabs button[data-kind="note"] { width: 46.42px; }
.profile-activity-tabs button.is-on { background: #fff; color: #364650; border-bottom-color: transparent; }
.profile-activity-tabs svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.profile-activity-tabs .activity-count { display: inline-block; min-width: 16px; padding: 0 2px; border-radius: 9px; color: inherit; font-size: 11px; line-height: 18px; }
.profile-activity-tabs button:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }

/* Keep desktop activity controls reachable beside a long email composer. */
@media (min-width: 801px) {
  .profile-mid > #profile-log:has([name="kind"][value="email"]) {
    max-height: calc(100% - 172px);
    grid-auto-rows: max-content;
    align-content: start;
    min-height: 0;
    flex-shrink: 0;
    overflow-y: auto;
  }
}

.people-header-menu[data-column="name"][data-arrow-visible="false"]::before, .people-header-menu[data-column="name"][data-arrow-visible="false"]::after { display: none; }

/* Inbox visual proposal; retain existing pane widths, visibility and message handlers. */
.layout:has(> .thread) { --ink: #364650; --muted: #536b7a; --line: #e8ecf0; color: var(--ink); font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; }
.layout:has(> .thread) .pane, .layout:has(> .thread) .thread { border-color: var(--line); }
.layout:has(> .thread) .list { background: #fff; }
.layout:has(> .thread) .side { background: #f1f4f8; border-color: var(--line); }
.layout:has(> .thread) .pane h2, .layout:has(> .thread) .group-label { padding: 12px 12px 6px; font-size: 12px; line-height: 16px; letter-spacing: 0; font-weight: 600; color: var(--muted); }
.layout:has(> .thread) .folder { padding: 8px 12px; border-radius: 4px; }
.layout:has(> .thread) .folder.is-on { color: #364650; background: #f7f9fa; }
.layout:has(> .thread) .conv.is-on { color: #364650; background: rgba(78, 173, 221, .05); }
.layout:has(> .thread) .chips button.is-on, .layout:has(> .thread) .seg button.is-on { color: #4eaddd; background: #f5fafd; border-color: #bfe0f2; }
.layout:has(> .thread) .conv { padding: 12px 10px; border-color: var(--line); }
.layout:has(> .thread) .conv-top strong { font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.layout:has(> .thread) .conv-top time, .layout:has(> .thread) .conv em, .layout:has(> .thread) .muted, .layout:has(> .thread) .hint, .layout:has(> .thread) .folder small { font-size: 12px; line-height: 16px; color: var(--muted); }
.layout:has(> .thread) .thread-head { padding: 12px 12px 0; flex-wrap: wrap; }
.layout:has(> .thread) .thread-head > div { min-width: 0; max-width: 100%; }
.layout:has(> .thread) .thread-head h1 { font-size: 22px; line-height: 28px; font-weight: 600; overflow-wrap: anywhere; }
.layout:has(> .thread) .thread-head .row { gap: 6px; }
.layout:has(> .thread) .thread-scroll { padding: 0 12px 12px; }
.layout:has(> .thread) .thread-scroll .bubble { overflow-wrap: anywhere; }
.layout:has(> .thread) .btn, .layout:has(> .thread) .chips button, .layout:has(> .thread) .seg button { border-radius: 4px; }
.layout:has(> .thread) .linkish { color: #4eaddd; }
.layout:has(> .thread) .side h2 { font-size: 14px; line-height: 20px; font-weight: 600; }
.layout:has(> .thread) .side .kv { font-size: 14px; line-height: 20px; }
.layout:has(> .thread) .side .kv > span { color: var(--muted); font-size: 12px; line-height: 16px; }
.layout:has(> .thread) .composer.card { border-color: var(--line); border-radius: 6px; }
@media (min-width: 801px) {
  #shell:has(.layout > .thread) .top { height: 70px; background: #364650; border-bottom: 0; font-family: Helvetica, Arial, sans-serif; }
  #shell:has(.layout > .thread) .rail { height: 70px; }
  #shell:has(.layout > .thread) .nav-btn { min-height: 70px; color: #aeb3b8; font-weight: 400; }
  #shell:has(.layout > .thread) .nav-btn span { font-size: 16px; line-height: 20px; font-weight: 400; }
  #shell:has(.layout > .thread) .nav-btn.is-on { color: #fff; box-shadow: none; }
  #shell:has(.layout > .thread) .nav-btn:hover, #shell:has(.layout > .thread) .rail-mark { color: #fff; }
  .layout:has(> .thread) { height: calc(100vh - 70px); }
}
#shell:has(.layout > .thread) .nav-btn .badge { color: #fff; background: #b43333; }

/* Calendar consistency proposal; keep native source grid, ranges and edit controls. */
.cal-page { --ink: #364650; --muted: #536b7a; --line: #e8ecf0; color: var(--ink); font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; }
.cal-page .cal-head h1 { font-size: 22px; line-height: 28px; font-weight: 600; }
.cal-page .cal-agenda, .cal-page .day-board { border-color: var(--line); border-radius: 6px; }
.cal-page .cal-day { border-color: var(--line); border-radius: 4px; }
.cal-page .cal-day.mute { border-color: transparent; }
.cal-page .cal-head select, .cal-page .btn, .cal-page .cal-switch button { border-radius: 4px; }
.cal-page .cal-switch button.is-on { color: #4eaddd; background: #f5fafd; }
.cal-page .muted, .cal-page .cal-week span { color: var(--muted); font-size: 12px; line-height: 16px; }
.cal-page .cal-day em { font-size: 12px; line-height: 16px; }
.cal-page .linkish { color: #4eaddd; }
.cal-page .row input:not([type="hidden"]), .cal-page .row select { font-size: 14px; line-height: 20px; border-radius: 4px; }
@media (min-width: 801px) {
  #shell:has(.cal-page) .top { height: 70px; background: #364650; border-bottom: 0; font-family: Helvetica, Arial, sans-serif; }
  #shell:has(.cal-page) .rail { height: 70px; }
  #shell:has(.cal-page) .nav-btn { min-height: 70px; color: #aeb3b8; font-weight: 400; }
  #shell:has(.cal-page) .nav-btn span { font-size: 16px; line-height: 20px; font-weight: 400; }
  #shell:has(.cal-page) .nav-btn.is-on { color: #fff; box-shadow: none; }
  #shell:has(.cal-page) .nav-btn:hover, #shell:has(.cal-page) .rail-mark { color: #fff; }
}
#shell:has(.cal-page) .nav-btn .badge { color: #fff; background: #b43333; }

/* Reporting Overview consistency proposal; preserve every datum, grid and drill-down. */
.report-board { --ink: #364650; --muted: #536b7a; --line: #e8ecf0; color: var(--ink); font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; row-gap: 12px; }
.report-board > h1 { font-size: 22px; line-height: 28px; font-weight: 600; }
.report-board > .stats { margin: 0; }
.report-board .stats b { line-height: 34px; }
.report-board .stats > div, .report-board .panel { background: #fff; border-color: var(--line); border-radius: 6px; }
.report-board .panel h2 { font-size: 14px; line-height: 20px; font-weight: 600; }
.report-board .muted, .report-board .stats span { font-size: 12px; line-height: 16px; color: var(--muted); }
.report-board .btn { border-radius: 4px; }
.report-board .linkish { color: #4eaddd; }
.report-board .bar-row .linkish { max-width: 100%; white-space: normal; text-align: left; overflow-wrap: anywhere; }
.report-board > p:first-of-type { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
@media (min-width: 801px) {
  #shell:has(.report-board) .top { height: 70px; background: #364650; border-bottom: 0; font-family: Helvetica, Arial, sans-serif; }
  #shell:has(.report-board) .rail { height: 70px; }
  #shell:has(.report-board) .nav-btn { min-height: 70px; color: #aeb3b8; font-weight: 400; }
  #shell:has(.report-board) .nav-btn span { font-size: 16px; line-height: 20px; font-weight: 400; }
  #shell:has(.report-board) .nav-btn.is-on { color: #fff; box-shadow: none; }
  #shell:has(.report-board) .nav-btn:hover, #shell:has(.report-board) .rail-mark { color: #fff; }
}
#shell:has(.report-board) .nav-btn .badge { color: #fff; background: #b43333; }

/* Keep Calendar's existing two-dimensional grid inside its own scroll area. */
.cal-page .cal-main { min-width: 0; overflow-x: auto; }
.cal-page .cal-head { grid-template-columns: auto minmax(0, 1fr) auto; }
.cal-page .cal-head > div { min-width: 0; }
.cal-page .cal-head select { max-width: 100%; }

.cal-page .cal-nav { display: flex; align-items: center; gap: 4px; }
.cal-page .cal-nav .btn { min-width: 36px; padding: 6px 10px; }
.cal-page .cal-add { min-width: 36px; font-size: 20px; line-height: 1; padding: 4px 10px; }
.cal-page .cal-day-layout { display: grid; grid-template-columns: minmax(160px, 220px) minmax(0, 1fr); gap: 12px; align-items: start; }
.cal-page .cal-mini { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-page .cal-mini-label { grid-column: 1 / -1; font-weight: 650; margin-bottom: 4px; }
.cal-page .cal-mini-dow { color: var(--muted); font-size: 11px; text-align: center; }
.cal-page .cal-mini-day, .cal-page .cal-mini-pad { border: 0; background: transparent; min-height: 28px; border-radius: 6px; font-size: 12px; color: inherit; }
.cal-page .cal-mini-day.is-focus { background: #e7f4fb; color: #1d6f96; font-weight: 700; }
.cal-page .cal-mini-day.is-today { box-shadow: inset 0 0 0 1px #4eaddd; }
@media (max-width: 800px) {
  .cal-page .cal-day-layout { grid-template-columns: minmax(0, 1fr); }
}

/* Verified FUB People header Search control; other views/mobile retain their layouts. */
@media (min-width: 801px) {
  .top:has(.nav-btn[data-view="people"].is-on) .search { flex: 0 1 300px; max-width: 300px; }
  .top:has(.nav-btn[data-view="people"].is-on) #q { height: 40px; border-radius: 20px; font-size: 16px; line-height: 20px; }
}

/* Legacy people list: allow the grid pane to shrink around its scrolling table. */
.people > .page { min-width: 0; }
/* End legacy people list containment. */

/* Header rail containment: preserve all navigation controls at desktop breakpoints. */
@media (min-width: 801px) {
  #shell > .top > .rail { flex: 0 1 auto; overflow-x: auto; scrollbar-width: thin; }
  #shell > .top > .rail > .nav-btn { flex-shrink: 0; min-height: 44px; }
}
/* End header rail containment. */

/* Tasks read-first composition: scoped to the Tasks board, leaving other task-board pages intact. */
.task-read-first > .people-bar .btn, .task-read-first > .people-bar select, .task-read-first #task-type-filter { min-height: 40px; }
.task-read-first .task-group { width: 750px; max-width: 100%; margin: 20px auto 0; background: #fff; border: 1px solid #e8ecf0; border-radius: 6px; }
.task-read-first .task-group > h2 { padding: 14px 16px 10px; margin: 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.task-read-first .task-date-group > h3 { padding: 10px 16px; margin: 0; background: #fafbfc; font-size: 13px; }
.task-read-first .task-date-group > .task-rows { border: 0; border-radius: 0; margin: 0; }
.task-read-first .task-row { position: relative; display: block; padding: 12px; min-height: 80px; }
.task-read-first .task-row-read { display: grid; grid-template-columns: 20px 30px minmax(0,1fr) 100px 100px; gap: 12px; align-items: center; min-height: 56px; padding-right: 64px; }
.task-read-first .task-complete { width: 20px; height: 20px; padding: 0; border: 1px solid #a7b5bf; border-radius: 3px; background: #fff; cursor: pointer; }
.task-read-first .task-complete:focus-visible, .task-read-first summary:focus-visible { outline: 2px solid #4eaddd; outline-offset: 3px; }
.task-read-first .task-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #e5edf5; color: #364650; font-size: 12px; }
.task-read-first .task-read-main, .task-read-first .task-read-meta { display: grid; gap: 3px; min-width: 0; }
.task-read-first .task-person { padding: 0; min-width: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; font-size: 14px; font-weight: 500; }
.task-read-first .task-read-name, .task-read-first .task-read-meta span { overflow-wrap: anywhere; }
.task-read-first .task-when { min-width: 0; width: auto; white-space: normal; font-size: 12px; line-height: 17px; }
.task-read-first .task-row-editor > summary { position: absolute; top: 20px; right: 12px; display: grid; place-items: center; width: 52px; min-height: 40px; padding: 6px; border: 1px solid #d5dbe3; border-radius: 4px; background: #fff; color: #4eaddd; cursor: pointer; list-style: none; }
.task-read-first .task-row-editor > summary::-webkit-details-marker { display: none; }
.task-read-first .task-edit-controls { display: grid; gap: 12px; padding-top: 14px; margin-top: 12px; border-top: 1px solid var(--line); }
.task-read-first .task-row-editor:not([open]) .task-edit-controls { display: none; }
.task-read-first .task-edit-controls form { display: flex; flex-wrap: wrap; width: 100%; gap: 8px; margin: 0; }
.task-read-first .task-edit-controls input:not([type=hidden]), .task-read-first .task-edit-controls select { flex: 1 1 180px; width: auto; min-width: 0; }
.task-read-first .task-edit-controls button { flex: 0 0 auto; }
.task-read-first .task-edit-controls > button { justify-self: start; }
.task-read-first > .task-read-status { margin: 0; }
.task-read-first .task-group > .note-line { padding: 12px 16px; }
@media (max-width: 800px) {
  .task-read-first .task-row-read { grid-template-columns: 20px 30px minmax(0,1fr); gap: 8px 10px; }
  .task-read-first .task-read-main { grid-column: 3; }
  .task-read-first .task-read-meta, .task-read-first .task-when { grid-column: 3; }
  .task-read-first .task-read-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; }
  .task-read-first .task-row { min-height: 108px; }
  .task-read-first .task-complete, .task-read-first .task-avatar { align-self: start; margin-top: 4px; }
}
/* End Tasks read-first composition. */

.report-more-options { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex-basis: 100%; }
.report-more-options[hidden] { display: none; }
.report-goals-unavailable { flex-basis: 100%; }
.team-card .team-head { justify-content: space-between; align-items: center; }
.team-name { display: flex; gap: 8px; align-items: center; }
.team-ok { color: #1a8f4c; font-weight: 700; }
.team-warn { color: #b26a00; }

/* Searchable Add Person sources; the native required field remains the form value. */
.manual-source-wrap { position: relative; min-width: 0; }
.manual-source-wrap > select { width: 100%; }
.manual-source-popup { position: fixed; z-index: 40; width: 100%; min-width: 200px; max-width: calc(100vw - 24px); padding: 10px 0 0; border: 1px solid #d7dee2; border-radius: 4px; background: #fff; box-shadow: 0 3px 12px #23344024; }
.manual-source-popup > input { width: calc(100% - 20px); margin: 0 10px 10px; padding: 10px; border: 1px solid #d7dee2; border-radius: 4px; font: inherit; }
.manual-source-popup [role="listbox"] { max-height: 240px; overflow-y: auto; }
.manual-source-popup [role="option"] { display: block; width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-top: 1px solid #edf0f2; border-radius: 0; background: #fff; color: #364650; text-align: left; }
.manual-source-popup [role="option"][hidden] { display: none; }
.manual-source-popup [aria-selected="true"], .manual-source-popup [role="option"]:focus { background: #edf8fc; outline: 0; }
.manual-source-popup [role="status"] { margin: 0; padding: 10px; color: #6d8291; }

/* Saved-list counts and deletion are separate controls. */
.saved-list-nav-row { display: flex; align-items: center; gap: 4px; margin: 0 8px 4px; }
#shell:has(#app) .people-nav .saved-list-nav-row > button.saved-list-open[data-act="smart"] { flex: 1; width: 0; min-width: 0; margin: 0; }
#shell:has(#app) .people-nav .saved-list-nav-row > button.saved-list-open > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#shell:has(#app) .people-nav .saved-list-nav-row > button.saved-list-delete[data-act="smart-del"] { flex: none; width: 28px; min-width: 28px; height: 36px; margin: 0; padding: 0; justify-content: center; color: #6d8291; background: transparent; }
#shell:has(#app) .people-nav .saved-list-nav-row > button.saved-list-delete::before { display: none; }
.saved-list-nav-row .saved-list-count { flex: none; }
/* Category navigation and existing column choices; no table ordering changes. */
#shell:has(#app) .people .col-menu.grouped-columns { top: 100%; display: grid; grid-template-columns: 150px minmax(150px, 1fr); gap: 0; width: 410px; max-width: calc(100vw - 32px); max-height: min(440px, 70vh); padding: 0; overflow: hidden; }
.grouped-columns .column-group-nav { min-height: 0; overflow-y: auto; border-right: 1px solid #e7ecef; padding: 8px; }
.grouped-columns .column-group-panel { min-height: 0; overflow-y: auto; padding: 8px; }
#shell:has(#app) .people .grouped-columns .column-group-nav > button { min-height: 34px; }
#shell:has(#app) .people .grouped-columns .column-group-panel > button { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.column-option-mark { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border: 1px solid #cad7df; border-radius: 3px; }
[aria-checked="true"] > .column-option-mark { background: #55b4d3; border-color: #55b4d3; color: #fff; }
.grouped-columns [role="tab"]:focus-visible, .grouped-columns [role="checkbox"]:focus-visible { outline: 2px solid #55b4d3; outline-offset: -2px; }
@media (max-width: 600px) { #shell:has(#app) .people .col-menu.grouped-columns { position: fixed; left: 16px; right: 16px; top: 180px; width: auto; max-height: calc(100vh - 200px); } }
/* Existing automation state control, in its own Enabled column. */
.automation-table .automation-state { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #cad5db; border-radius: 16px; padding: 3px 8px; color: #fff; background: #8fa2ad; font-size: 12px; }
.automation-state::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.automation-table .automation-state[aria-checked="true"] { background: #4eaddd; border-color: #4eaddd; }
.automation-state:focus-visible { outline: 2px solid #287ead; outline-offset: 2px; }
/* Keep the existing group deletion action beside its named row. */
.group-table .group-row-delete { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 6px; color: #617685; }
.group-row-delete:focus-visible { outline: 2px solid #4eaddd; outline-offset: 2px; }
/* Inbox channel popup; the existing single-channel read contract is retained. */
.inbox-filter-anchor { position: relative; display: inline-flex; margin-left: auto; }
.inbox-filter-popup { position: absolute; z-index: 30; right: 0; top: calc(100% + 6px); width: 200px; max-width: 80vw; background: #fff; border: 1px solid #d7dee2; border-radius: 4px; box-shadow: 0 3px 12px #23344024; }
#shell:has(#app) .layout .pane.list .inbox-filter-popup [role="menuitemradio"] { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 0; background: #fff; color: #364650; text-align: left; }
.inbox-filter-popup [role="menuitemradio"]:focus-visible { outline: 2px solid #4eaddd; outline-offset: -2px; }
.inbox-filter-check { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; border: 1px solid #cad7df; border-radius: 4px; }
[aria-checked="true"] > .inbox-filter-check { background: #4eaddd; color: #fff; border-color: #4eaddd; }
.inbox-filter-divider, .inbox-filter-stage { border-top: 1px solid #e7ecef; }
.inbox-filter-stage { padding: 10px; }
.inbox-filter-stage label { display: grid; gap: 6px; color: #6d8291; font-size: 12px; }
.inbox-filter-stage select { max-width: 100%; }

/* Existing Agent Activity columns remain readable native sort controls. */
[data-agent-activity-table] .report-column-sort { display: inline-flex; align-items: center; gap: 3px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; }
[data-agent-activity-table] .report-column-sort:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
@media (max-width: 350px) {
  #shell:has(#app) > header.top div.top-actions { gap: 4px; }
}
/* CAL-02: accents sampled from the public FUB Calendar Filters reference. */
.cal-page .cal-main em.cal-event-appt, .cal-page .cal-main em.cal-event-task, .cal-page .cal-main em.cal-event-deal, .cal-page .cal-main em.cal-event-date { display: block; border-left: 3px solid; padding-left: 6px; font-style: normal; }
.cal-page .cal-main em.cal-event-appt { border-left-color: #3fa1d9; }
.cal-page .cal-main em.cal-event-task { border-left-color: #fac934; background: #ffe08a; color: #5c4300; }
.cal-page .cal-main em.cal-event-deal { border-left-color: #f68443; }
.cal-page .cal-main em.cal-event-date { border-left-color: #9a94f0; }
.cal-page .cal-filter-kind { display: flex; align-items: center; gap: 8px; }
.cal-page .cal-filter-kind > input { margin-left: auto; }
.cal-page .cal-kind-swatch { width: 4px; height: 22px; border-radius: 2px; flex: 0 0 4px; }
.cal-page .cal-kind-swatch.cal-kind-appt { background: #3fa1d9; }
.cal-page .cal-kind-swatch.cal-kind-task { background: #fac934; }
.cal-page .cal-kind-swatch.cal-kind-deal { background: #f68443; }
.cal-page .cal-kind-swatch.cal-kind-date { background: #9a94f0; }
.cal-page .cal-kind-swatch.cal-kind-google { background: #4eaddd; }
/* Keep existing Task titles readable in the responsive content column. */
.task-edit-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.task-edit-heading h2 { margin: 0; }
.task-edit-close { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #82909c; font-size: 26px; line-height: 1; cursor: pointer; }
.task-edit-close:hover { background: #f0f3f5; color: #364650; }
.task-edit-close:focus-visible { outline: 2px solid #287fae; outline-offset: 2px; }
@media (max-width: 800px) {
  #shell:has(#app) .task-board.task-read-first .task-row-read > .task-read-main {
    flex-direction: column;
    align-items: stretch;
  }
  #shell:has(#app) .task-board.task-read-first .task-row-read > .task-read-main > .task-read-name {
    min-width: 0;
    white-space: normal;
  }
}
/* Plan checks stay in the card, without a popup or a communication-draft repaint. */
.plan-checks{margin:8px 0;padding:10px 12px;border-left:3px solid #b7791f;background:#fff8e8;color:#573d13;font-size:13px;line-height:1.45;overflow-wrap:anywhere}
.plan-checks p{margin:5px 0}.plan-checks .linkish{color:#664500;text-align:left}
.plan-step-warning{flex-basis:100%;margin:4px 0;color:#765019;font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.plan-picker [data-plan-check]{flex-basis:100%;min-width:0}
.person-profile-links{display:flex;align-items:center;gap:18px;flex-wrap:wrap}.fub-profile-link{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:#326c9b;text-decoration:none}.fub-profile-link.is-unavailable{color:#75838d;cursor:default}.fub-profile-link:focus-visible,.fub-history-info:focus-visible{outline:2px solid #4285b4;outline-offset:3px}.fub-profile-mark{font-size:8px;font-weight:800;padding:3px;border-radius:3px;background:#e5f3fc;color:#36799e}.fub-history-info{display:inline-flex;width:16px;height:16px;align-items:center;justify-content:center;border:1px solid #aab4bd;border-radius:50%;font-size:11px;cursor:help}.people-main .plan-review-reasons{display:block;white-space:normal;overflow-wrap:anywhere;max-width:28rem;font-size:11px;color:#765019}
/* Name actions share the contact icons and keep one stable row for long names. */
#shell:has(#app) .fub-person .who-row>div{min-width:0;flex:1}
#shell:has(#app) .fub-person .who-row .name-hover{position:relative;display:flex;width:100%;min-width:0;gap:0}
#shell:has(#app) .fub-person .who-row .name-hover h1{min-width:0;max-width:100%;width:100%;box-sizing:border-box}
#shell:has(#app) .fub-person .who-row .name-edit{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#shell:has(#app) .fub-person .who-row .name-tools{position:absolute;right:0;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;gap:4px;visibility:hidden;opacity:0;pointer-events:none}
#shell:has(#app) .fub-person .who-row .name-hover:hover h1,#shell:has(#app) .fub-person .who-row .name-hover:focus-within h1{padding-right:56px}
.fub-person .person-file-list{list-style:none;margin:0;padding:0}
#shell [data-act="open-deal-report"],#shell [data-act="open-deals-leaderboard"],#shell [data-act="open-closed-sources"]{display:none}
.fub-person .person-file-row{display:flex;gap:12px;align-items:flex-start;padding:12px 0;min-width:0;border-bottom:1px solid #edf1f4}
.fub-person .person-file-row:last-child{border-bottom:0}
.fub-person .person-file-preview{display:flex;align-items:center;justify-content:center;flex:0 0 72px;width:72px;height:64px;border:1px solid #e4eaf0;border-radius:4px;background:#f6f8fa;overflow:hidden;color:#97a4af}
.fub-person .person-file-preview img{display:block;width:100%;height:100%;object-fit:cover}
.fub-person .person-file-preview>svg{width:28px;height:32px;fill:none;stroke:currentColor;stroke-width:1.5}
.fub-person .person-file-detail{min-width:0;flex:1;line-height:1.5}
.fub-person .person-file-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;text-decoration:none}
.fub-person .person-file-detail>time{display:block;color:#536474;font-size:13px}
.fub-person .person-file-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:2px;font-size:13px;color:#8293a1}
.fub-person .person-file-actions a,.fub-person .person-file-actions button{display:inline-flex;align-items:center;gap:4px;color:inherit;text-decoration:none;padding:2px 0;border:0;background:none;font:inherit}
.fub-person .person-file-actions svg{width:14px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7}
.fub-person .person-file-actions a:hover,.fub-person .person-file-actions button:hover{color:#347eb6}
.fub-person .person-file-actions :focus-visible,.fub-person .person-file-name:focus-visible{outline:2px solid #78acd3;outline-offset:2px}
body #modal .dialog:has(.edit-task-modal){width:min(560px,calc(100% - 24px));padding:0;border-radius:6px;overflow:hidden}
body #modal .task-edit-heading{display:flex;align-items:center;justify-content:space-between;padding:20px 22px;border-bottom:1px solid #f0f3f5}
body #modal .task-edit-heading h2{display:flex;align-items:center;gap:8px;margin:0;font-size:18px;font-weight:500}
body #modal .task-edit-heading h2 svg{width:18px;height:18px;fill:none;stroke:#99a8b8;stroke-width:1.8}
body #modal .task-edit-close{border:0;background:none;color:#99a8b8;font-size:24px;line-height:1;padding:2px}
body #modal #edit-task{padding:20px 22px}
body #modal #edit-task>label{display:block}
body #modal #edit-task input,body #modal #edit-task select{display:block;width:100%;box-sizing:border-box;border:1px solid #d5dde3;border-radius:4px;padding:0 10px;font:inherit;color:#445563;background:#fff}
body #modal #edit-task :is(input,select):focus-visible{outline:2px solid #a9cce8;outline-offset:1px}
body #modal #edit-task .task-edit-field-label{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
body #modal #edit-task>label>input{height:42px;margin-top:5px}
body #modal #edit-task .create-task-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;margin-top:16px}
body #modal #edit-task .create-task-row input,body #modal #edit-task .create-task-row select{height:40px}
body #modal #edit-task .create-task-row:nth-of-type(2){max-width:290px}
body #modal .edit-task-actions{margin:22px -22px -20px;padding:18px 22px;border-top:1px solid #f0f3f5;background:#fcfdfe}
body #modal .edit-task-right{align-items:center;gap:14px}
body #modal .edit-task-right .btn.ghost{border:0;background:transparent;padding:8px 0}
body #modal .edit-task-right button[type=submit]{border-radius:24px;padding:10px 22px;background:#6da4d2;border-color:#6da4d2;color:#fff}
@media(max-width:480px){body #modal .task-edit-heading{padding:16px}body #modal #edit-task{padding:16px}body #modal .edit-task-actions{margin:20px -16px -16px;padding:16px}body #modal #edit-task .create-task-row{gap:12px}body #modal .edit-task-right{gap:12px}}
#shell:has(#app) .fub-person .who-row .name-hover:hover .name-tools,#shell:has(#app) .fub-person .who-row .name-hover:focus-within .name-tools{visibility:visible;opacity:1;pointer-events:auto}
#shell:has(#app) .fub-person .who-row .name-icon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:3px;border:0;border-radius:4px;background:transparent;color:#647381;cursor:pointer;flex:none}
#shell:has(#app) .fub-person .who-row .name-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#shell:has(#app) .fub-person .who-row .name-icon:hover{background:#eef3f7;color:#294e6c}
#shell:has(#app) .fub-person .who-row .name-icon:focus-visible{outline:2px solid #4285b4;outline-offset:1px}
#shell:has(#app) .fub-person .who-row .name-save-status:not(:empty){flex-basis:100%;font-size:12px;line-height:1.4;color:#765019;overflow-wrap:anywhere}
#shell:has(#app) .fub-person .who-row:has(#p-name){height:auto;min-height:91px;align-items:start}
#shell:has(#app) .composer.card .text-recipient{min-width:0;flex:0 1 auto;overflow:hidden}
#shell:has(#app) .composer.card .text-recipient .to-name{min-width:0;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#shell:has(#app) .composer.card .text-recipient .to-num,#shell:has(#app) .composer.card .text-recipient .to-kind{flex:none}
@media(hover:none){#shell:has(#app) .fub-person .who-row .name-hover h1{padding-right:56px}#shell:has(#app) .fub-person .who-row .name-tools{visibility:visible;opacity:1;pointer-events:auto}}
.plan-recovery-dialog{max-width:680px;min-width:0;text-align:left}
.plan-recovery-dialog [hidden]{display:none!important}
.plan-recovery-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:16px}
.plan-recovery-dialog h2{margin:0;font-size:20px;font-weight:600}
.plan-recovery-dialog>header button{border:0;background:transparent;color:inherit;font-size:26px;padding:4px 8px;cursor:pointer}
.plan-recovery-dialog>label:not(.plan-recovery-ack){display:grid;gap:6px;margin:16px 0;font-size:13px;font-weight:500}
.plan-recovery-dialog select{max-width:100%;min-width:0;width:100%;padding:10px 12px;border-radius:6px;font:inherit}
.plan-recovery-dialog [data-recovery-review]{max-height:38vh;overflow:auto;overflow-wrap:anywhere}
.plan-recovery-dialog .plan-recovery-warning{font-size:13px;line-height:1.5}
.plan-recovery-dialog .plan-recovery-steps ol{list-style:none;padding:0;margin:10px 0}
.plan-recovery-dialog .plan-recovery-steps li{display:grid;grid-template-columns:72px minmax(0,1fr);gap:4px 10px;padding:10px 0;border-bottom:1px solid #80808040}
.plan-recovery-dialog .plan-recovery-steps small{grid-column:2;font-size:12px;opacity:.8}
.plan-recovery-dialog .plan-recovery-ack{display:flex;gap:10px;align-items:flex-start;font-size:13px;line-height:1.5;margin:14px 0}
.plan-recovery-dialog .plan-recovery-ack input{flex:0 0 auto;width:16px;height:16px;margin-top:3px}
.plan-recovery-dialog footer{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:18px}
@media(max-width:600px){.dialog:has(.plan-recovery-dialog){max-width:calc(100vw - 24px);width:100%;padding:16px}.plan-recovery-dialog h2{font-size:18px}.plan-recovery-dialog footer .btn{white-space:normal;min-height:40px}.plan-recovery-dialog .plan-recovery-steps li{grid-template-columns:56px minmax(0,1fr)}}

.plan-progress { margin: 8px 0; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.plan-progress p { margin: 3px 0; }

.plan-pill.is-review { color:#805000; background:#fff2d6; border:1px solid #dec28c; }
html[data-theme="dark"] .plan-pill.is-review { color:#f2d5a4; background:#3b342a; border-color:#776449; }
/* Shared email template editing: isolated modal, with a persistent owned draft. */
.email-template-editor{width:min(760px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:0;border:1px solid #d5dbe2;border-radius:9px;color:#283342;background:#fff;box-shadow:0 16px 60px #0004;overflow:auto}
.email-template-editor::backdrop{background:#17202c66}
.template-edit-form{display:flex;flex-direction:column;gap:14px;padding:22px;min-width:0}
.template-edit-form header,.template-edit-form footer,.template-rich-tools,.template-link-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.template-edit-form header h2{flex:1;margin:0;font-size:22px;font-weight:500}
.template-edit-form label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:500}
.template-edit-form input,.template-edit-form select{box-sizing:border-box;min-width:0;padding:8px;border:1px solid #cbd2da;border-radius:4px;background:#fff;color:inherit;font:inherit}
.template-rich-tools{padding:9px;background:#f6f8fa;border:1px solid #d9dfe5;border-radius:4px}
.template-rich-tools label{flex-direction:row;align-items:center}
.template-edit-form button{cursor:pointer;padding:7px 12px;border:1px solid #cbd2da;border-radius:4px;background:#fff;color:inherit}
.template-edit-form button:disabled{cursor:default;opacity:.55}
.template-edit-form footer span{flex:1}
.template-edit-form footer [type=submit]{background:#2b78c5;color:white;border-color:#2b78c5}
.template-rich-body{min-height:220px;max-height:45dvh;overflow:auto;padding:15px;border:1px solid #cbd2da;border-radius:4px;background:white;color:#333;font:13px/1.4 Arial,sans-serif;overflow-wrap:anywhere}
.template-rich-body p{margin:0 0 1em}.template-rich-body div{min-height:1em}
.template-link-tools label{flex:1}.template-link-tools input{width:100%}
.template-edit-status{margin:0;min-height:1.4em;font-size:13px;color:#6d4b00}
.template-format-limits{font-size:12px;color:#657181}.template-saved-review{border-top:1px solid #ccc;padding-top:10px;overflow-wrap:anywhere}
html[data-theme=dark] .email-template-editor{background:#202830;color:#e0e6eb;border-color:#56616d}
html[data-theme=dark] .template-edit-form input,html[data-theme=dark] .template-edit-form select,html[data-theme=dark] .template-edit-form button,html[data-theme=dark] .template-rich-tools{background:#303b45;color:#e0e6eb;border-color:#65717c}
html[data-theme=dark] .template-edit-status{color:#f3c67c}
@media(max-width:480px){.template-edit-form{padding:14px;gap:10px}.template-rich-tools{gap:6px}.template-rich-tools label{flex:1}.template-rich-tools select{max-width:150px}.template-edit-form header h2{font-size:19px}.template-edit-form footer{gap:6px}}
