/* Navigation, personal settings, and interactive project progress. */
.subbar { display: grid; grid-template-columns: 1fr minmax(280px, 520px) 1fr; gap: 20px; }
.subbar-admin, .subbar-status { display: flex; align-items: center; gap: 18px; font-size: 12px; }
.subbar-status { justify-content: flex-end; color: var(--muted); }
.search-launcher { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid #b8c8d5; background: white; color: var(--ink); border-radius: 9px; padding: 12px 16px; text-align: left; }
.search-launcher span { flex: 1; }
.search-launcher kbd { color: var(--muted); font-size: 10px; }
.inbox-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 12px; background: #d92d41; color: white; font-size: 11px; font-weight: 700; }
.inbox-count.dot-only { min-width: 9px; width: 9px; height: 9px; padding: 0; }
[hidden] { display: none !important; }
.avatar { position: relative; overflow: visible; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.availability-dot { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid white; background: #299b69; z-index: 1; }
.availability-dot.out_of_office { background: #c99415; }
.availability-dot.in_meeting { background: #d34d5b; }
.workspace-search { width: min(580px, calc(100vw - 24px)); max-height: 82vh; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: white; color: var(--ink); margin: 90px auto auto; box-shadow: 0 20px 80px #10233235; }
.workspace-search::backdrop { background: #10233238; }
.search-dialog-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.workspace-search .search-form { margin: 16px 0; }
.workspace-search .search-form input[type=search] { width: 100%; min-width: 0; }
.quick-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 7px; }
.quick-links .search-result { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; background: var(--paper); color: var(--ink); text-align: center; font-size: 12px; padding: 14px 5px; }
.quick-link-icon { width: 26px; height: 26px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.quick-links .search-result:hover, .quick-links .search-result:focus-visible { background: var(--brand-soft); color: var(--brand); }
.search-result { display: block; padding: 9px 12px; border-radius: 7px; overflow-wrap: anywhere; }
.search-result:hover, .search-result:focus { background: var(--brand-soft); color: var(--brand); }
.workspace-search h3 { font-size: 13px; margin: 18px 0 8px; }
.settings-page .avatar { width: 54px; height: 54px; }
.settings-page h2 { margin-bottom: 18px; }
.settings-page fieldset { padding: 22px 0 0; margin: 24px 0 0; border: 0; border-top: 1px solid var(--line); }
.settings-page legend { font-size: 20px; font-weight: 700; padding-right: 16px; }
.settings-page .settings-check { display: flex; align-items: center; gap: 10px; font-weight: 400; margin: 15px 0 6px; }
.settings-check input { flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--brand); }
.work-days { display: flex; flex-wrap: wrap; gap: 6px; }
.work-days label { position: relative; }
.settings-page .form-stack .work-days input[type=checkbox] { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; opacity: 0; }
.work-days span { display: block; padding: 7px 12px; border: 1px solid var(--line); border-radius: 7px; }
.work-days input:checked + span { background: #143554; color: white; border-color: #143554; }
.work-days input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.project-metrics { margin: 14px 0; }
.project-metrics > summary { font-size: 16px; }
.project-metrics > summary .small { margin-left: 12px; }
.project-metrics > .report-metrics { margin-bottom: 22px; }
.hill-svg { width: 100%; overflow: visible; margin: 20px 0; }
.hill-svg text { font: 13px var(--app-font); fill: currentColor; }
.hill-svg circle { stroke: white; stroke-width: 2px; }
.hill-svg [data-hill-dot] { cursor: grab; touch-action: none; }
.hill-svg [data-hill-dot]:active { cursor: grabbing; }
.hill-control { display: grid; grid-template-columns: minmax(160px, 1fr) 2fr 80px; align-items: center; gap: 15px; padding: 12px 0; border-top: 1px solid var(--line); }
.hill-control label { display: flex; gap: 8px; align-items: center; margin: 0; }
.hill-control input[type=checkbox] { width: 18px; height: 18px; }
.hill-control input[type=range] { accent-color: #143554; padding: 0; }
.hill-control output { font-size: 12px; text-align: right; }
.hill-history summary .avatar { vertical-align: middle; margin-right: 8px; }
@media(max-width: 900px) { .subbar { grid-template-columns: 1fr auto; } .search-launcher { grid-row: 1; grid-column: 1 / -1; } .subbar-admin, .subbar-status { grid-row: 2; } .topbar { flex-wrap: wrap; height: auto; padding-top: 15px; padding-bottom: 15px; } }
@media(max-width: 600px) { .search-launcher kbd { display: none; } .hill-control { grid-template-columns: 1fr 65px; } .hill-control label { grid-column: 1 / -1; } .workspace-search { margin-top: 20px; padding: 16px; } .top-actions { flex-wrap: wrap; } }

/* Dark mode follows the saved preference or changes with the OS in system mode. */
html[data-color-scheme=dark] { color-scheme: dark; --paper: #101c22; --white: #19282f; --ink: #e3ebef; --muted: #abbac4; --line: #34464f; --brand: #92c2ec; --brand-soft: #263e50; }
[data-color-scheme=dark] :is(.panel,.project-card,.tool-card,.document-card,.login-card,.workspace-search,.search-launcher,.search-form,.board-card,.calendar-detail-dialog,.task-status-dialog) { background: #19282f; color: var(--ink); border-color: var(--line); }
[data-color-scheme=dark] :is(input:not([type=submit]):not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea,.filter-form input[type=search]) { background-color: #122027; color: var(--ink); border-color: #52656e; }
[data-color-scheme=dark] :is(.button,.button.secondary,.purple-button,.google-button,input[type=file]::file-selector-button) { background: #225982; color: white; border-color: #3977a6; }
[data-color-scheme=dark] :is(.button,.button.secondary,.google-button):hover { background: #2e6e9d; }
[data-color-scheme=dark] :is(.nav-link,.quiet,.calendar-note,.project-schedule) { color: var(--muted); }
[data-color-scheme=dark] :is(.nav-link.selected,.filter-tabs .active) { background: var(--brand-soft); color: var(--brand); }
[data-color-scheme=dark] :is(.calendar-day.outside,.editor-toolbar,.editor-hint,.board-column,.overview-strip,.count,.document-thumbnail,.attachment-card,.comment-edit-form) { background: #15232a; color: var(--ink); border-color: var(--line); }
[data-color-scheme=dark] :is(.tiptap,.rich-editor,.editor-shell) { background: #19282f; color: var(--ink); border-color: var(--line); }
[data-color-scheme=dark] :is(.task-row,.message-row,.comment,.report-entry,.project-card-bottom,.project-nav,.filter-tabs,.task-facts) { border-color: var(--line); }
[data-color-scheme=dark] .flash { background: #183c32; color: #c6f1db; border-color: #396753; }
[data-color-scheme=dark] .flash.alert { background: #4b2929; color: #ffd2cf; }
[data-color-scheme=dark] .calendar-status-todo { --calendar-bg: #453b17; --calendar-ink: #f9e897; --calendar-accent: #e1bd3b; }
[data-color-scheme=dark] .calendar-status-in_progress { --calendar-bg: #1e3656; --calendar-ink: #b8d9ff; --calendar-accent: #70a6ee; }
[data-color-scheme=dark] .calendar-status-blocked { --calendar-bg: #482e22; --calendar-ink: #ffd1ae; --calendar-accent: #e99a64; }
[data-color-scheme=dark] .calendar-status-in_review { --calendar-bg: #372c4c; --calendar-ink: #ddc5ff; --calendar-accent: #b693e3; }
[data-color-scheme=dark] .calendar-status-complete { --calendar-bg: #213c2d; --calendar-ink: #b9e8c7; --calendar-accent: #73bf8b; }
[data-color-scheme=dark] .calendar-status-google { --calendar-bg: #482333; --calendar-ink: #f4c3d0; --calendar-accent: #d77a94; }
[data-color-scheme=dark] .calendar-status-google-grape { --calendar-bg: #392448; --calendar-ink: #e3ccf6; --calendar-accent: #bd98e8; }
[data-color-scheme=dark] .calendar-status .calendar-google-grape-swatch { background: #bd98e8; }
[data-color-scheme=dark] .avatar img { background: #19282f; }
[data-color-scheme=dark] .brand-mark img { mix-blend-mode: screen; filter: invert(1) hue-rotate(180deg); }

/* Compact choice controls; hidden Rails checkbox companions must not occupy space. */
.form-stack input[type=hidden] { display: none; }
.settings-page .form-stack .settings-check input[type=checkbox],
.settings-page .form-stack .settings-check input[type=radio],
.form-stack .hill-control input[type=checkbox] {
  flex: 0 0 18px; width: 18px; height: 18px; padding: 0; margin: 0;
}
.settings-page fieldset { min-width: 0; }
.settings-page .settings-check { justify-content: flex-start; }

.profile-photo-editor { display: flex; align-items: flex-start; gap: 20px; margin: 20px 0 28px; }
.profile-photo-editor > .avatar { flex: 0 0 72px; width: 72px; height: 72px; }
.profile-photo-editor > div { min-width: 0; flex: 1; }
@media(max-width: 600px) { .profile-photo-editor { flex-direction: column; } }

.inbox-load-more { text-align: center; padding: 24px 0; }
.inbox-load-more [aria-disabled=true] { opacity: .65; cursor: wait; }
.inbox-load-more p { margin-top: 12px; }

.project-search { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.project-search input[type=search] { flex: 1; min-width: 180px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; }
.project-pause-action { margin: 18px 0; }
.badge.paused { background: #fff2cc; color: #775b13; }
[data-color-scheme=dark] .badge.paused { background: #453b17; color: #f9e897; }

.hill-carousel { margin: 24px 0; }
.hill-carousel .hill-svg { max-height: 300px; }
.hill-slide-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.hill-slide-footer > div { min-width: 0; }
.hill-slide-footer p, .hill-update-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.hill-carousel-controls { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 20px 0 12px; }
.hill-carousel button:disabled { opacity: .4; cursor: default; }
.hill-add { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 20px 0; padding: 16px; border: 1px dashed var(--line); border-radius: 10px; }
.form-stack .hill-enable-choice { display: flex; align-items: flex-start; gap: 12px; }
.form-stack .hill-enable-choice input[type=checkbox] { width: 18px; height: 18px; flex: 0 0 18px; padding: 0; margin-top: 3px; }
.reply-context { font-size: 12px; padding: 8px 12px; border-left: 3px solid var(--line); color: var(--muted); }
@media(max-width: 600px) { .hill-slide-footer, .hill-add { align-items: flex-start; flex-direction: column; } .hill-carousel-controls { gap: 8px; } }
.settings-workspace { max-width: 1240px; margin: 0 auto; }
.settings-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.settings-navigation { position: sticky; top: 24px; padding: 18px; }
.settings-navigation a { display: block; padding: 14px 12px; border-radius: 9px; margin: 6px 0; }
.settings-navigation a[aria-current=page] { background: var(--brand-soft); box-shadow: inset 3px 0 var(--brand); }
.settings-navigation small { margin-top: 4px; }
.settings-content { min-width: 0; }
.settings-content h3 { margin: 24px 0 14px; }
@media(max-width: 760px) { .settings-layout { grid-template-columns: 1fr; } .settings-navigation { position: static; } .settings-navigation a { padding: 10px; } }

.message-type-emoji { font-size: 22px; line-height: 1.2; }
[data-message-field] > [data-message-display] { cursor: text; border-radius: 6px; }
[data-message-field] > [data-message-display]:hover,
[data-message-field] > [data-message-display]:focus-visible { outline: 1px dashed var(--line); outline-offset: 5px; }
.message-inline-field { margin-bottom: 20px; }
.comment-replies { margin-left: 24px; padding-left: 16px; border-left: 2px solid var(--line); }
@media (max-width: 600px) { .comment-replies { margin-left: 8px; padding-left: 8px; } }
.team-member-picker { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 16px; max-height: 320px; overflow-y: auto; }
.team-member-picker legend { font-weight: 700; padding: 0 8px; }
.form-stack .team-member-picker .settings-check { display: flex; align-items: flex-start; justify-content: flex-start; gap: 10px; margin: 10px 0; }
.form-stack .team-member-picker .settings-check input[type=checkbox] { flex: 0 0 18px; width: 18px; height: 18px; padding: 0; margin: 3px 0 0; }
.team-member-picker .settings-check > span { min-width: 0; overflow-wrap: anywhere; }
.team-member-picker .settings-check small { font-weight: 400; }

.browser-notification-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
.browser-notification-actions .button { margin: 0; min-height: 40px; }
.browser-permission-badge { color: var(--muted); font-size: 12px; padding: 8px 0; }
.browser-notification-help { margin: 12px 0 22px; font-size: 12px; color: var(--muted); }
.browser-notification-help summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.browser-notification-help p { max-width: 65ch; line-height: 1.6; }

.assignee-picker-label { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.assignee-picker-label button { padding:0; white-space:nowrap; }
.assignee-picker input[type=search] { margin-bottom:6px; }

.subbar.subbar-contractor { display:flex; justify-content:flex-end; }
.subbar-contractor .subbar-admin { display:none; }
.subbar-contractor .subbar-status { margin-left:auto; }

.brand-mark { position: relative; }
.brand-unread { position: absolute; z-index: 1; top: 0; right: 0; width: 13px; height: 13px; border: 2px solid var(--paper); border-radius: 50%; background: #ef4444; }
.brand-unread[hidden] { display: none; }

.crm-conversation-dock.crm-dock-unread { border-color: var(--link, #2563eb); box-shadow: 0 0 0 2px var(--link, #2563eb); }
.crm-dock-unread-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.4rem; height: 1.4rem; margin-left: .5rem; padding: 0 .3rem; border-radius: 999px; background: #b42318; color: #fff; font-size: .75rem; }

.message-delete-dialog { width:min(480px,calc(100% - 32px)); max-height:calc(100dvh - 32px); padding:28px; border:1px solid var(--line); border-radius:12px; background:var(--white); color:var(--ink); }
.message-delete-dialog::backdrop { background:#101c2280; }
.message-delete-dialog p { margin:18px 0 24px; overflow-wrap:anywhere; }
.message-delete-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:12px; }

.notification-drawer { position:fixed; inset:0 0 0 auto; margin:0; padding:0; width:min(500px,100vw); max-width:100vw; height:100dvh; max-height:100dvh; border:0; border-left:1px solid var(--line); background:var(--paper); color:var(--ink); box-shadow:-10px 0 40px #0002; }
.notification-drawer[open] { display:flex; flex-direction:column; }
.notification-drawer::backdrop { background:#0005; }
.notification-drawer-header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:20px; border-bottom:1px solid var(--line); }
.notification-drawer-header h2 { margin:0; font-size:21px; }
.notification-drawer-header button { font-size:25px; }
.notification-drawer-tools { display:flex; justify-content:space-between; padding:12px 20px; gap:12px; font-size:12px; }
.notification-drawer-body { overflow-y:auto; overscroll-behavior:contain; min-height:0; flex:1; padding:0 16px; }
.notification-row { align-items:flex-start; position:relative; }
.notification-row > div { min-width:0; }
.notification-title { overflow-wrap:anywhere; }
.notification-dot { flex:none; margin-top:8px; }
.notification-row > .notification-row-actions { flex:0 0 auto; display:flex; flex-direction:column; align-items:flex-end; gap:8px; }
.notification-menu summary { list-style:none; width:30px; height:28px; text-align:center; font-size:22px; line-height:22px; border-radius:5px; }
.notification-menu summary::-webkit-details-marker { display:none; }
.notification-menu-options { position:absolute; right:8px; top:48px; z-index:5; width:min(280px,calc(100vw - 55px)); padding:6px; border:1px solid var(--line); border-radius:8px; background:var(--paper); box-shadow:0 8px 24px #0002; }
.notification-menu-options button { display:block; width:100%; text-align:left; border:0; background:transparent; color:var(--ink); padding:12px; font-size:12px; }
.notification-menu-options button:hover { background:var(--brand-soft); }
.notification-undo { position:fixed; bottom:24px; right:24px; z-index:1000; max-width:calc(100vw - 32px); display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:14px 18px; border:1px solid var(--line); border-radius:8px; background:var(--paper); color:var(--ink); box-shadow:0 8px 24px #0003; font-size:13px; }
.notification-undo[hidden] { display:none; }
.notification-undo button { border:0; background:transparent; color:var(--brand); padding:4px; }
.notification-category-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:0 20px; }
.silenced-item { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 0; border-bottom:1px solid var(--line); }
.silenced-item > div { min-width:0; overflow-wrap:anywhere; }
.silenced-item .button { flex:none; }
.notification-menu { position:relative; }
.notification-menu-options { right:0; top:100%; }
.notification-undo { max-width:min(450px,calc(100vw - 32px)); }
.notification-drawer-tools button { border:0; background:transparent; color:var(--brand); font:inherit; padding:4px 0; cursor:pointer; }
.silenced-item-title { border:0; background:transparent; color:var(--brand); padding:0; text-align:left; font-weight:600; overflow-wrap:anywhere; }
[data-silenced-settings] { margin-top:24px; }
[data-silenced-settings] > label { display:block; margin:18px 0 8px; font-size:13px; font-weight:600; }
[data-silenced-search] { display:block; box-sizing:border-box; width:100%; padding:12px 14px; border:1px solid var(--line); border-radius:6px; background:var(--paper); color:var(--ink); font:inherit; }
.silenced-item-title { font:inherit; font-weight:600; }

.notification-filters { display:flex; gap:8px; margin:0 0 20px; padding:8px 0; }
.notification-filters a { padding:7px 16px; border-radius:20px; font-weight:600; font-size:14px; color:var(--ink); }
.notification-filters a[aria-current=page] { color:#0866d8; background:#e5f0ff; }
[data-color-scheme=dark] .notification-filters a[aria-current=page] { color:#9ac8ff; background:#1f3f60; }
.notification-drawer .notification-filters { position:sticky; top:0; z-index:3; background:var(--paper); }
.notification-group[hidden] { display:none; }
.notification-row .notification-dot { order:3; width:10px; height:10px; background:#0866ff; }
.notification-row.unread .notification-dot { background:#0866ff; }
.notification-row:not(.unread) .notification-title, .notification-row:not(.unread) small { color:var(--muted); font-weight:400; }
.notification-row .notification-title::after { content:""; position:absolute; inset:0; border-radius:8px; }
.notification-row:hover { background:var(--brand-soft); border-radius:8px; }
.notification-row .notification-row-actions { z-index:2; }
.notification-row:focus-within { outline:2px solid var(--brand); outline-offset:2px; border-radius:8px; }
.notification-drawer-tools { flex-wrap:wrap; }

.notification-row.unread small { color:#0866d8; }
[data-color-scheme=dark] .notification-row.unread small { color:#9ac8ff; }

/* Shared success/error feedback, including the notification Undo action. */
.app-feedback {
  position: fixed; inset: auto 24px 24px auto; z-index: 10000;
  display: flex; align-items: center; gap: 16px;
  width: max-content; max-width: min(440px, calc(100vw - 32px));
  margin: 0; padding: 12px 18px; border: 1px solid transparent;
  border-radius: 8px; background: #143554; color: #fff;
  box-shadow: 0 4px 20px #0004; font-size: 14px; line-height: 1.5;
  overflow-wrap: anywhere;
}
.app-feedback.is-error { background: #873e30; }
.app-feedback[hidden] { display: none; }
.app-feedback button, .app-feedback a { color: #fff; }
.app-feedback button { flex-shrink: 0; border: 0; background: transparent; padding: 4px; }
.app-feedback a { text-decoration: underline; }
.app-feedback button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 600px) {
  .app-feedback { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
}

.follow-up-sidebar { position:fixed; inset:0 0 0 auto; margin:0; width:min(860px,100vw); max-width:100vw; height:100dvh; max-height:100dvh; padding:0; border:0; border-left:1px solid var(--line); background:var(--paper); color:var(--ink); box-shadow:-12px 0 40px #0002; }
.follow-up-sidebar[open] { display:flex; flex-direction:column; }
.follow-up-sidebar::backdrop { background:#0005; }
.follow-up-sidebar-header { display:flex; align-items:center; justify-content:space-between; padding:24px; border-bottom:1px solid var(--line); }
.follow-up-sidebar-header h2 { margin:0; }
.follow-up-sidebar-body { padding:24px; overflow-y:auto; min-height:0; }
.follow-up-timeline { list-style:none; margin:32px 0; padding:0; }
.follow-up-timeline-step { display:grid; grid-template-columns:130px 40px minmax(0,1fr); column-gap:16px; }
.follow-up-timeline-date { padding-top:9px; font-size:12px; text-align:right; color:var(--muted); }
.follow-up-timeline-track { display:flex; justify-content:center; position:relative; }
.follow-up-timeline-track::after { content:""; position:absolute; top:38px; bottom:0; width:2px; background:var(--line); }
.follow-up-timeline-step:last-child .follow-up-timeline-track::after { display:none; }
.follow-up-timeline-marker { z-index:1; display:grid; place-items:center; width:38px; height:38px; border:2px solid var(--line); border-radius:50%; background:var(--paper); font-weight:700; color:var(--muted); }
.follow-up-timeline-step.is-complete .follow-up-timeline-marker { background:#247f87; color:white; border-color:#247f87; }
.follow-up-timeline-step.is-complete .follow-up-timeline-track::after { background:#247f87; }
.follow-up-timeline-step.is-current .follow-up-timeline-marker { border-color:#247f87; color:#247f87; }
.follow-up-timeline-content { padding:4px 0 32px; min-width:0; }
.follow-up-timeline-content h3 { margin:6px 0; }
.follow-up-timeline-content .eyebrow { margin:0; }
.follow-up-timeline-step.is-complete .eyebrow { color:#247f87; }
.follow-up-message { white-space:pre-wrap; overflow-wrap:anywhere; }
.follow-up-outcome .form-actions { margin-top:8px; justify-content:flex-start; }
@media(max-width:600px) {
  .follow-up-sidebar-header,.follow-up-sidebar-body { padding:16px; }
  .follow-up-timeline-step { grid-template-columns:40px minmax(0,1fr); column-gap:12px; }
  .follow-up-timeline-date { grid-column:2; text-align:left; padding:0 0 8px; }
  .follow-up-timeline-track { grid-column:1; grid-row:1 / span 2; }
  .follow-up-timeline-content { grid-column:2; }
}

/* Business targets: open cards, visible pace, and a focused editor. */
.target-section-heading,.target-history-toolbar { display:flex; justify-content:space-between; align-items:center; gap:1.5rem; flex-wrap:wrap; }
.target-section-heading h2 { margin:0 0 .5rem; }
.target-section-heading p { margin:.35rem 0; }
.target-workspace { margin-top:2rem; padding:1.75rem; }
.target-history-toolbar { margin:1.5rem 0; }
.target-history-toolbar label { display:flex; align-items:center; gap:.75rem; font-size:.8rem; }
.target-card-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr)); gap:1rem; }
.target-card { --target-accent:#24828a; background:var(--paper); border:1px solid var(--line); border-radius:14px; padding:1.5rem; min-width:0; }
.target-card[data-state=behind_pace],.target-card[data-state=missed] { --target-accent:#b56b22; }
.target-card[data-state=upcoming],.target-card[data-state=data_incomplete] { --target-accent:var(--muted); }
.target-card-heading { display:flex; align-items:center; gap:.75rem; }
.target-kind { display:grid; place-items:center; width:34px; height:34px; border-radius:10px; color:var(--target-accent); background:color-mix(in srgb,var(--target-accent) 12%,transparent); font-weight:700; }
.target-status { font-size:.75rem; font-weight:700; color:var(--target-accent); }
.target-edit { margin-left:auto; display:grid; place-items:center; min-width:36px; min-height:36px; }
.target-card h3 { font-size:1rem; margin:1.25rem 0 .35rem; }
.target-card .target-dates { font-size:.78rem; color:var(--muted); margin:0; }
.target-card .target-actual { display:flex; align-items:baseline; gap:.6rem; flex-wrap:wrap; margin:1.5rem 0 1rem; }
.target-actual strong { font-size:2rem; letter-spacing:-.04em; line-height:1.1; }
.target-actual>span { color:var(--muted); font-size:.85rem; }
.target-progress-track { position:relative; height:8px; margin:1.2rem 0; }
.target-progress-track progress { display:block; appearance:none; border:0; border-radius:8px; width:100%; height:8px; overflow:hidden; background:var(--line); }
.target-progress-track progress::-webkit-progress-bar { background:var(--line); }
.target-progress-track progress::-webkit-progress-value { background:var(--target-accent); border-radius:8px; }
.target-progress-track progress::-moz-progress-bar { background:var(--target-accent); }
.target-pace-marker { position:absolute; top:-4px; height:16px; border-left:2px solid var(--ink); max-width:100%; }
.target-card-footer { display:flex; justify-content:space-between; gap:.5rem; font-size:.78rem; }
.target-card .target-pace { font-size:.75rem; color:var(--muted); margin:1rem 0 0; }
.target-empty { border:1px dashed var(--line); border-radius:14px; padding:2.5rem; text-align:center; color:var(--muted); }
.target-editor { background:var(--paper); color:var(--ink); border:1px solid var(--line); border-radius:18px; padding:2rem; width:min(560px,calc(100vw - 2rem)); max-height:90vh; overflow:auto; }
.target-editor::backdrop { background:rgb(10 25 35 / .55); backdrop-filter:blur(3px); }
.target-editor form { margin-top:1.5rem; }
.target-editor input,.target-editor select { width:100%; }
.target-editor .form-actions { margin-top:1.5rem; }
.target-date-fields { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
.performance-summary { margin:1.5rem 0; }
.performance-totals { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); background:var(--paper); border:1px solid var(--line); border-radius:14px; margin:1.5rem 0 1rem; overflow:hidden; }
.performance-total { padding:1.5rem; border-right:1px solid var(--line); }
.performance-total:last-child { border:0; }
.performance-total p { color:var(--muted); font-size:.8rem; margin:0 0 .8rem; }
.performance-total strong { font-size:clamp(1.15rem,2vw,1.8rem); letter-spacing:-.035em; }
.performance-expenses { display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin:1rem 0 1.5rem; }
.performance-expenses article { background:var(--paper); border:1px solid var(--line); border-radius:14px; padding:1.5rem; }
.performance-expenses h3 { font-size:1rem; margin:.5rem 0; }
.performance-expenses strong { font-size:1.4rem; }
.target-status-summary { display:flex; gap:1.5rem; flex-wrap:wrap; font-size:.8rem; margin:1.5rem 0; }
.target-status-summary strong { margin-right:.3rem; font-size:1.2rem; }
.target-status-summary [data-state=done],.target-status-summary [data-state=on_track] { color:#24828a; }
.target-status-summary [data-state=missed],.target-status-summary [data-state=behind_pace] { color:#b56b22; }
@media(max-width:700px) { .performance-totals { grid-template-columns:1fr 1fr; } .performance-total { border-bottom:1px solid var(--line); } .performance-expenses,.target-date-fields { grid-template-columns:1fr; } .target-workspace,.target-editor { padding:1.25rem; } }
html[data-color-scheme=dark] .target-card { --target-accent:#69c7cb; }
html[data-color-scheme=dark] .target-card[data-state=behind_pace],html[data-color-scheme=dark] .target-card[data-state=missed] { --target-accent:#e5ae73; }
html[data-color-scheme=dark] .target-card[data-state=upcoming],html[data-color-scheme=dark] .target-card[data-state=data_incomplete] { --target-accent:var(--muted); }
html[data-color-scheme=dark] .target-status-summary [data-state=done],html[data-color-scheme=dark] .target-status-summary [data-state=on_track] { color:#69c7cb; }
html[data-color-scheme=dark] .target-status-summary [data-state=missed],html[data-color-scheme=dark] .target-status-summary [data-state=behind_pace] { color:#e5ae73; }
/* Quarterly review: numbered wins and a concise outlook, inspired by the review deck. */
.quarter-story { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(280px,1fr); gap:2rem; background:var(--white); border:1px solid var(--line); border-radius:18px; padding:2rem; margin:1.5rem 0; }
.quarter-story-wins>h2 { color:#227451; font-size:clamp(1.8rem,3vw,2.5rem); letter-spacing:-.04em; margin:.5rem 0; }
.quarter-story-intro { color:var(--muted); font-size:.85rem; max-width:45ch; }
.quarter-wins { list-style:none; counter-reset:wins; padding:0; margin:1.8rem 0 0; }
.quarter-wins>li { counter-increment:wins; display:flex; gap:1rem; padding:1rem 0; border-bottom:1px solid var(--line); }
.quarter-wins>li::before { content:counter(wins,decimal-leading-zero); color:#227451; font-size:1.1rem; font-weight:800; min-width:1.6rem; }
.quarter-wins h3 { font-size:.9rem; letter-spacing:.015em; }
.quarter-wins p { font-size:.85rem; color:var(--muted); margin:.4rem 0; white-space:pre-line; overflow-wrap:anywhere; }
.quarter-story-outlook { display:grid; gap:1rem; align-content:start; }
.quarter-outlook-panel { padding:1.5rem; border-radius:12px; }
.quarter-outlook-panel.promising { background:#236a4e; color:#fff; }
.quarter-outlook-panel.needs-work { background:#faf1e6; color:#72471f; border:1px solid #e9d7c0; }
.quarter-outlook-panel>h3 { text-transform:uppercase; font-size:.9rem; letter-spacing:.07em; }
.quarter-outlook-intro,.quarter-outlook-empty { font-size:.75rem; opacity:.9; }
.quarter-outlook-row { padding:1rem 0; border-top:1px solid currentColor; border-color:color-mix(in srgb,currentColor 25%,transparent); }
.quarter-outlook-row h4 { margin:0 0 .5rem; font-size:.9rem; overflow-wrap:anywhere; }
.quarter-outlook-row strong { font-size:1.7rem; line-height:1.2; }
.quarter-outlook-row p { margin:.4rem 0 0; font-size:.78rem; white-space:pre-line; overflow-wrap:anywhere; }
.quarter-outlook-missed { font-weight:700; }
.quarter-story-empty { padding:2rem 0; color:var(--muted); font-size:.85rem; }
.quarter-highlights-editor { border-top:1px solid var(--line); padding-top:1.5rem; margin-top:1.5rem; }
.quarter-win-edit-list { list-style:none; padding:0; margin:1rem 0; }
.quarter-win-edit-list li { display:flex; justify-content:space-between; align-items:start; gap:1rem; border-bottom:1px solid var(--line); padding:1rem 0; }
.quarter-win-edit-list p { margin:.4rem 0; font-size:.85rem; color:var(--muted); white-space:pre-line; }
.target-quarter { font-size:.75rem; font-weight:700; color:var(--brand); margin:.4rem 0; }
.target-progress-note { border-top:1px solid var(--line); padding-top:.8rem; margin-top:.8rem; font-size:.8rem; white-space:pre-line; overflow-wrap:anywhere; }
.custom-target-progress { background:var(--paper); padding:1rem; border:1px solid var(--line); border-radius:12px; display:grid; gap:.75rem; }
.custom-target-progress[hidden] { display:none; }
html[data-color-scheme=dark] .quarter-story-wins>h2,html[data-color-scheme=dark] .quarter-wins>li::before { color:#80d9aa; }
html[data-color-scheme=dark] .quarter-outlook-panel.needs-work { background:#392d22; color:#f0cda3; border-color:#63503c; }
@media(max-width:760px) { .quarter-story { grid-template-columns:1fr; padding:1.25rem; gap:1.25rem; } }

[data-target-removal-dialog] .button[data-target-removal-confirm] { background: #b42318; border-color: #b42318; color: #fff; }
[data-target-removal-dialog] .button[data-target-removal-confirm]:hover { background: #912018; border-color: #912018; }
[data-target-removal-dialog] .button[data-target-removal-cancel] { background: #eef2f6; border-color: #bcc8d3; color: #18364d; }
[data-target-removal-dialog] .button[data-target-removal-cancel]:hover { background: #dfe7ee; }
[data-color-scheme=dark] [data-target-removal-dialog] .button[data-target-removal-cancel] { background: #293b45; border-color: #607681; color: #edf3f6; }
[data-color-scheme=dark] [data-target-removal-dialog] .button[data-target-removal-cancel]:hover { background: #354c58; }

.target-time-badge { display:inline-flex; align-self:flex-start; width:fit-content; padding:3px 10px; border-radius:999px; font-size:12px; font-weight:700; margin-bottom:10px; }
.target-time-badge[data-timing=current] { background:#d9f3e6; color:#155b3a; }
.target-time-badge[data-timing=future] { background:#e3edff; color:#214c86; }
.target-time-badge[data-timing=past] { background:#e9e9ec; color:#505461; }
[data-color-scheme=dark] .target-time-badge[data-timing=current] { background:#214b3a; color:#a4edc6; }
[data-color-scheme=dark] .target-time-badge[data-timing=future] { background:#243f60; color:#b5d6ff; }
[data-color-scheme=dark] .target-time-badge[data-timing=past] { background:#3b4048; color:#d7dbe3; }

.target-pagination { display:flex; align-items:center; gap:6px; }
.target-page-icon { display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; border:1px solid var(--line); border-radius:7px; background:var(--paper); color:var(--ink); }
.target-page-icon:hover { background:var(--brand-soft); color:var(--ink); }
.target-page-icon:focus-visible { outline:2px solid var(--brand); outline-offset:3px; }

/* Timing sits under the actions; each status has its own calendar-inspired hue. */
.target-card-heading { display:grid; grid-template-columns:34px minmax(0,1fr) auto; column-gap:8px; row-gap:4px; }
.target-card-actions { display:flex; align-items:center; gap:4px; grid-column:3; }
.target-card-actions button { display:grid; place-items:center; width:30px; height:30px; min-width:30px; min-height:30px; padding:4px; margin:0; }
.target-card-heading .target-time-badge { grid-column:3; justify-self:end; margin:0; }
.target-status { line-height:1.35; }
.target-time-badge[data-timing=current] { background:#e8f1ff; color:#174a8b; }
html[data-color-scheme=dark] .target-time-badge[data-timing=current] { background:#1e3656; color:#b8d9ff; }
.target-time-badge[data-timing=future] { background:#f0e7f8; color:#6f2da8; }
html[data-color-scheme=dark] .target-time-badge[data-timing=future] { background:#392448; color:#e3ccf6; }
.target-time-badge[data-timing=past] { background:#e9edf1; color:#505c6a; }
html[data-color-scheme=dark] .target-time-badge[data-timing=past] { background:#343e49; color:#cbd3df; }
.target-card[data-state=on_track] { --target-accent:#18777c; }
html[data-color-scheme=dark] .target-card[data-state=on_track] { --target-accent:#69c7cb; }
.target-status-summary [data-state=on_track] { color:#18777c; }
html[data-color-scheme=dark] .target-status-summary [data-state=on_track] { color:#69c7cb; }
.target-card[data-state=done] { --target-accent:#256238; }
html[data-color-scheme=dark] .target-card[data-state=done] { --target-accent:#73bf8b; }
.target-status-summary [data-state=done] { color:#256238; }
html[data-color-scheme=dark] .target-status-summary [data-state=done] { color:#73bf8b; }
.target-card[data-state=upcoming] { --target-accent:#800020; }
html[data-color-scheme=dark] .target-card[data-state=upcoming] { --target-accent:#f4a8c0; }
.target-status-summary [data-state=upcoming] { color:#800020; }
html[data-color-scheme=dark] .target-status-summary [data-state=upcoming] { color:#f4a8c0; }
.target-card[data-state=behind_pace] { --target-accent:#8c390e; }
html[data-color-scheme=dark] .target-card[data-state=behind_pace] { --target-accent:#e99a64; }
.target-status-summary [data-state=behind_pace] { color:#8c390e; }
html[data-color-scheme=dark] .target-status-summary [data-state=behind_pace] { color:#e99a64; }
.target-card[data-state=missed] { --target-accent:#b42318; }
html[data-color-scheme=dark] .target-card[data-state=missed] { --target-accent:#ff9292; }
.target-status-summary [data-state=missed] { color:#b42318; }
html[data-color-scheme=dark] .target-status-summary [data-state=missed] { color:#ff9292; }
.target-card[data-state=data_incomplete] { --target-accent:#695000; }
html[data-color-scheme=dark] .target-card[data-state=data_incomplete] { --target-accent:#e1bd3b; }
.target-status-summary [data-state=data_incomplete] { color:#695000; }
html[data-color-scheme=dark] .target-status-summary [data-state=data_incomplete] { color:#e1bd3b; }
.target-card[data-state=superseded] { --target-accent:#74543a; }
html[data-color-scheme=dark] .target-card[data-state=superseded] { --target-accent:#cba884; }
.target-status-summary [data-state=superseded] { color:#74543a; }
html[data-color-scheme=dark] .target-status-summary [data-state=superseded] { color:#cba884; }

.mercury-entry-form { max-width: 760px; margin-top: 24px; gap: 18px; }
.mercury-entry-form label { display: flex; flex-direction: column; gap: 8px; }
.mercury-entry-form [hidden] { display: none !important; }
.mercury-entry-form textarea { min-height: 96px; resize: vertical; }
.mercury-entry-form .vendor-rule-choice label { flex-direction: row; align-items: center; }
.mercury-entry-form .vendor-rule-choice input { width: auto; }
.mercury-entry-form > .small { margin: 0; }

.mercury-record-panel { margin-top: 24px; padding: 28px 32px; }
.mercury-record-heading { display: flex; justify-content: space-between; gap: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.mercury-record-heading .eyebrow { margin-bottom: 8px; }
.mercury-record-heading h2 { font-size: 22px; }
.mercury-record-heading p:last-child { margin: 8px 0 0; font-size: 13px; }
.mercury-record-amount { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.mercury-record-amount > span { font-size: 12px; color: var(--muted); }
.mercury-record-amount strong { font-size: 26px; letter-spacing: -.6px; line-height: 1.4; }
.mercury-record-amount small { display: inline; font-size: 11px; font-weight: 500; letter-spacing: 0; }
.mercury-record-panel .mercury-entry-form { max-width: none; gap: 22px; }
.mercury-entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.mercury-entry-form label { position: relative; margin: 0; }
.mercury-field-optional { position: absolute; right: 0; top: 0; font-size: 11px; color: var(--muted); font-weight: 400; }
.mercury-record-panel .mercury-entry-form :is(select, textarea) { font-size: 14px; }
.mercury-record-panel .mercury-entry-form select { min-height: 46px; }
.mercury-record-panel .mercury-entry-form textarea { min-height: 112px; }
.mercury-income-hint { padding: 12px 16px; border-left: 3px solid var(--brand); background: var(--paper); border-radius: 4px; }
.mercury-record-actions { display: flex; align-items: center; justify-content: space-between; gap: 28px; border-top: 1px solid var(--line); padding-top: 22px; }
.mercury-record-actions p { max-width: 560px; margin: 0; line-height: 1.6; }
.mercury-record-actions .button { flex-shrink: 0; min-height: 44px; }
@media (max-width: 640px) {
  .mercury-record-panel { padding: 22px 18px; }
  .mercury-record-heading { flex-direction: column; gap: 18px; }
  .mercury-record-amount { align-items: flex-start; }
  .mercury-entry-grid { grid-template-columns: 1fr; gap: 18px; }
  .mercury-record-actions { flex-direction: column; align-items: stretch; gap: 16px; }
}

.follow-up-scheduled-time { margin: 10px 0 6px; font-size: 14px; font-weight: 650; color: var(--ink); }
.follow-up-scheduled-time > span { display: block; margin-top: 3px; font-weight: 400; }

.follow-up-status-line { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:16px 0; }
.follow-up-badge { --follow-up-color:#23834b; display:inline-flex; align-items:center; width:fit-content; padding:4px 10px; border:0; border-radius:5px; background:color-mix(in srgb, var(--follow-up-color) 12%, var(--paper)); color:color-mix(in srgb, var(--follow-up-color) 75%, var(--ink)); font-size:12px; font-weight:650; line-height:1.4; white-space:nowrap; }
[data-color-scheme=dark] .follow-up-badge { color:color-mix(in srgb, var(--follow-up-color) 50%, var(--ink)); background:color-mix(in srgb, var(--follow-up-color) 20%, var(--paper)); }
.follow-up-badge--green { --follow-up-color:#23834b; }
.follow-up-badge--amber { --follow-up-color:#d58a12; }
.follow-up-badge--red { --follow-up-color:#d34242; }
.follow-up-badge--teal { --follow-up-color:#25838d; }
.follow-up-badge--blue { --follow-up-color:#327fce; }
.follow-up-badge--purple { --follow-up-color:#914fc2; }
.follow-up-badge--orange { --follow-up-color:#d56620; }
.follow-up-badge--rose { --follow-up-color:#c53978; }
.follow-up-badge--cyan { --follow-up-color:#138fa5; }
.follow-up-badge--indigo { --follow-up-color:#6262bf; }
.follow-up-badge--gray { --follow-up-color:#78818b; }

.follow-up-hold-actions { display:flex; flex-wrap:wrap; gap:16px; margin:18px 0; }
.follow-up-hold-form { padding:20px; margin:20px 0; border:1px solid var(--line); border-radius:12px; background:var(--paper); }
.follow-up-hold-form h3 { margin:0; }
.follow-up-hold-form fieldset { border:0; padding:0; margin:0; min-width:0; }
.follow-up-hold-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.follow-up-hold-form label { display:grid; gap:8px; }
.follow-up-hold-form textarea, .follow-up-hold-form select { width:100%; min-width:0; }
.follow-up-hold-schedule { padding:16px; border-left:3px solid #914fc2; background:color-mix(in srgb, #914fc2 7%, var(--paper)); border-radius:6px; }
.follow-up-hold-schedule p { margin:8px 0; }
@media(max-width:480px) { .follow-up-hold-fields { grid-template-columns:1fr; } }

.member-search { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.member-search > div { flex: 1; min-width: 180px; }
.member-search label { display: block; font-size: 12px; margin-bottom: 6px; }
.member-search input[type=search] { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink); }
.workspace-members .member-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 14px; align-items: center; }
.member-details { overflow-wrap: anywhere; }
.member-access-action { display: grid; gap: 8px; text-align: right; }
.workspace-members .member-access-action form { margin: 0; }
.member-access-action button { padding: 0; text-align: right; }
.member-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.member-pagination a { display: inline-flex; padding: 6px 12px; }
@media(max-width:600px) { .workspace-members .member-row { grid-template-columns: auto minmax(0,1fr); } .member-access-action { grid-column: 2; justify-self: end; } }

.notification-row .notification-select { width:20px; height:20px; margin:4px; cursor:pointer; accent-color:var(--brand); }
.notification-selection { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:12px 0; border-bottom:1px solid var(--line); }
.notification-selection[hidden] { display:none; }
.notification-selection-actions { display:flex; align-items:center; gap:4px; }
.notification-selection-action { display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; padding:9px; border:0; border-radius:50%; background:transparent; color:var(--ink); cursor:pointer; }
.notification-selection-action svg { display:block; width:22px; height:22px; pointer-events:none; }
.notification-selection-action:hover { background:var(--brand-soft); color:var(--brand); }
.notification-selection-action:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
.notification-selection-action:disabled { opacity:.45; cursor:wait; }
.notification-selection-clear { margin-left:8px; }
.notification-selection [data-selection-count] { font-size:12px; color:var(--muted); }
