@font-face { font-family: "Instrument Sans"; src: url("/fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("/fonts/montserrat-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
/* ParkPilot CRM – brand palette from the ParkPilot brand profile. Warm creams for CRM surfaces,
   navy for text and dark bands, Forest Green for every primary action. */
:root {
  --bg: #FAF6EE;          /* CRM cream */
  --surface: #ffffff;
  --surface-2: #F7F2E8;
  --line: #E6D9BF;        /* cream deep */
  --line-soft: #F1E9DA;   /* cream dark */
  --ink: #0E1A2B;         /* navy */
  --ink-2: #3E4A5C;
  --ink-3: #6B7280;
  --navy: #0E1A2B;
  --navy-deep: #09121F;
  --sea: #2D7A4F;         /* forest green: primary action */
  --sea-dark: #2A6650;
  --sea-tint: #E5F1EA;
  --sun: #D9C7A3;         /* sand: warm accent */
  --sun-deep: #B89A62;
  --sun-tint: #F6EEDD;
  --forest-light: #4FA374;
  --red: #B42318;
  --red-tint: #FBE9E7;
  --amber: #B7791F;
  --amber-tint: #FCF1D9;
  --green: #2D7A4F;
  --green-tint: #E5F1EA;
  --radius-s: 8px;
  --radius: 12px;
  --radius-l: 16px;
  --font: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --rail: 224px;
  --shadow: 0 1px 2px rgba(14,26,43,.05), 0 4px 14px rgba(14,26,43,.06);
  /* appointment type colours */
  --t-demo: #2D7A4F;
  --t-discovery: #5B6B80;
  --t-followup: #8A6D3B;
  --t-visit: #1F5F8B;
  --t-onboard: #7A4FA3;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--sea-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--sea) 55%, transparent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100vh; }
.rail { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.rail .brand { padding: 4px 8px 20px; }
.rail .brand .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; font-weight: 500; }
/* "ParkPilot [CRM]" lockup: mark + Montserrat ExtraBold + Forest Green badge */
.wordmark { display: inline-flex; align-items: center; gap: 9px; color: var(--navy); text-decoration: none; }
.wordmark:hover { text-decoration: none; }
.wordmark img { width: 30px; height: 30px; display: block; }
.wordmark .wm { font-family: 'Montserrat', var(--font); font-weight: 800; font-size: 19px; letter-spacing: -0.01em; line-height: 1; }
.wordmark .crm { font-family: 'Montserrat', var(--font); font-weight: 800; font-size: 10.5px; letter-spacing: .14em; background: var(--sea); color: #fff; border-radius: 999px; padding: 4px 8px 3px 9px; line-height: 1; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-s); color: var(--ink-2); font-weight: 600; position: relative; }
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.nav a.active { background: var(--sea-tint); color: var(--sea-dark); }
.nav a.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--sea); }
.nav svg { width: 19px; height: 19px; flex: none; }
.nav .count { margin-left: auto; font-size: 12px; background: var(--red); color: #fff; border-radius: 10px; padding: 0 7px; font-weight: 700; }
.rail .foot { margin-top: auto; font-size: 12px; color: var(--ink-3); padding: 8px; }
.sync-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); display: inline-block; flex: none; }
.dot.ok { background: var(--green); } .dot.warn { background: var(--amber); } .dot.bad { background: var(--red); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--line); }
.search { position: relative; flex: 1; max-width: 520px; }
.search input { width: 100%; padding: 9px 12px 9px 36px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--ink-3); }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(14,26,43,.14); max-height: 420px; overflow: auto; z-index: 50; }
.search-results a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; color: var(--ink); border-bottom: 1px solid var(--line-soft); }
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover, .search-results a.sel { background: var(--sea-tint); text-decoration: none; }
.topbar .spacer { flex: 1; }
.page { padding: 8px 28px 48px; max-width: 1440px; width: 100%; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; white-space: nowrap; color: var(--ink); }
.btn:hover { border-color: #d3c3a2; background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--sea); border-color: var(--sea); color: #fff; }
.btn.primary:hover { background: var(--sea-dark); border-color: var(--sea-dark); }
.btn.danger { color: var(--red); }
.btn.danger.solid { background: var(--red); color: #fff; border-color: var(--red); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { padding: 5px 10px; font-size: 13.5px; }
.btn.icon { padding: 6px; width: 32px; height: 32px; }
.btn svg { width: 17px; height: 17px; }
.btn:disabled { opacity: .55; cursor: default; }
.new-btn { font-size: 15px; padding: 9px 16px; }

label.field { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea, input.input, select.input, textarea.input {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); font-weight: 400; color: var(--ink); width: 100%; }
.field textarea, textarea.input { resize: vertical; min-height: 70px; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--sea); outline: none; box-shadow: 0 0 0 3px var(--sea-tint); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 14px; }
.span2 { grid-column: span 2; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--sea); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); padding: 5px 11px; border-radius: 99px; font-size: 13.5px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.chip:hover { border-color: var(--sea); color: var(--ink); }
.chip.on { background: var(--sea); border-color: var(--sea); color: #fff; }

/* ---------- panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-l); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px 10px; }
.panel-head .spacer { flex: 1; }
.panel-body { padding: 0 18px 16px; }
.empty { padding: 22px 18px; color: var(--ink-2); text-align: center; }
.empty strong { display: block; color: var(--ink); margin-bottom: 2px; }

/* ---------- dashboard ---------- */
.today-head { display: flex; align-items: flex-end; gap: 18px; margin: 12px 0 18px; flex-wrap: wrap; }
.today-head .date { display: flex; align-items: center; gap: 14px; }
.today-head .date img { width: 44px; height: 44px; }
.today-head .day-sub { font-size: 15px; color: var(--ink-2); margin-top: 4px; }
.today-head .spacer { flex: 1; }
.dash { display: grid; grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); gap: 20px; align-items: start; }
.group-title { display: flex; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink-2); padding: 14px 18px 6px; }
.group-title .n { font-weight: 600; color: var(--ink-3); }
.group-title.late { color: var(--red); }

.task { display: grid; grid-template-columns: 5px 34px 1fr auto; align-items: center; gap: 0 10px; padding: 0 12px 0 0; margin: 0 12px 6px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); min-height: 50px; position: relative; }
.task .stripe { align-self: stretch; border-radius: var(--radius) 0 0 var(--radius); background: var(--line); }
.task.u-red .stripe { background: var(--red); }
.task.u-amber .stripe { background: var(--amber); }
.task.u-today .stripe { background: var(--sea); }
.task.u-future .stripe { background: #d9c7a3; }
.task.done { opacity: .62; }
.task.done .t-title { text-decoration: line-through; }
.tick { width: 22px; height: 22px; border-radius: 6px; border: 2px solid #b9ae98; background: var(--surface); cursor: pointer; display: grid; place-items: center; padding: 0; margin-left: 8px; }
.tick:hover { border-color: var(--sea); background: var(--sea-tint); }
.tick svg { width: 14px; height: 14px; color: #fff; opacity: 0; }
.task.done .tick { background: var(--green); border-color: var(--green); }
.task.done .tick svg { opacity: 1; }
.t-main { padding: 8px 0; min-width: 0; }
.t-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.t-meta { font-size: 13px; color: var(--ink-2); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.t-meta a { color: var(--ink-2); font-weight: 600; }
.t-side { display: flex; align-items: center; gap: 8px; }
.badge { font-size: 12.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-soft); }
.badge.red { background: var(--red-tint); color: var(--red); border-color: transparent; }
.badge.amber { background: var(--amber-tint); color: #8a5800; border-color: transparent; }
.badge.blue { background: var(--sea-tint); color: var(--sea-dark); border-color: transparent; }
.badge.green { background: var(--green-tint); color: var(--green); border-color: transparent; }
.badge.sun { background: var(--sun-tint); color: #8a5300; border-color: transparent; }

.pri { font-size: 12.5px; font-weight: 700; color: var(--ink-3); width: 54px; text-align: right; }
.pri.High { color: var(--red); }
.t-actions { display: flex; gap: 2px; opacity: .55; }
.task:hover .t-actions, .task:focus-within .t-actions { opacity: 1; }
.review { grid-column: 2 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 0 10px; font-size: 13.5px; }
.review strong { color: var(--ink); }

.diary-card { border: 1px solid var(--line); border-radius: var(--radius); margin: 0 18px 10px; padding: 11px 14px; border-left: 5px solid var(--t-demo); background: var(--surface); }
.diary-card.past { background: var(--surface-2); }
.diary-card .when { font-size: 13px; color: var(--ink-2); font-weight: 600; display: flex; gap: 8px; align-items: center; }
.diary-card .what { font-weight: 700; margin-top: 1px; }
.diary-card .where { font-size: 13px; color: var(--ink-2); }
.diary-card .row { display: flex; align-items: flex-start; gap: 10px; }
.diary-card .row > div:first-child { flex: 1; min-width: 0; }
.diary-card details { margin-top: 8px; font-size: 13.5px; }
.diary-card summary { cursor: pointer; color: var(--sea-dark); font-weight: 600; list-style: none; }
.diary-card summary::-webkit-details-marker { display: none; }
.prep { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin-top: 8px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-s); }
.prep dt { color: var(--ink-3); } .prep dd { margin: 0; }
.now-line { display: flex; align-items: center; gap: 8px; margin: 2px 18px 10px; color: var(--sun-deep); font-size: 12.5px; font-weight: 700; }
.now-line::after { content: ''; flex: 1; height: 2px; background: var(--sun); border-radius: 2px; }

.pipe-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 0 18px 16px; }
.pipe-strip a { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 10px 8px; text-align: center; color: var(--ink); background: var(--surface-2); }
.pipe-strip a:hover { border-color: var(--sea); text-decoration: none; }
.pipe-strip .n { font-size: 22px; font-weight: 800; display: block; line-height: 1.1; }
.pipe-strip .l { font-size: 12.5px; color: var(--ink-2); }
.mini-list { list-style: none; margin: 0; padding: 0 18px 14px; }
.mini-list li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.mini-list li:last-child { border-bottom: 0; }

/* ---------- tables ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0 14px; }
.toolbar .spacer { flex: 1; }
.toolbar select, .toolbar input { padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
table.list { width: 100%; border-collapse: collapse; background: var(--surface); }
table.list th { text-align: left; font-size: 13px; color: var(--ink-2); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); position: sticky; top: 64px; }
table.list td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; font-size: 14px; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: var(--sea-tint); }
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius-l); overflow: clip; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 2px; color: var(--ink-2); font-size: 14px; }
.name-cell strong { display: block; }
.status { font-size: 12.5px; font-weight: 700; }
.status.New { color: var(--sea-dark); } .status.Contacted { color: var(--green); } .status.Dormant { color: var(--ink-3); }
.status.Lost { color: var(--red); } .status.Customer { color: var(--sea-dark); font-weight: 700; } .status.Nurture { color: var(--t-onboard); }

/* ---------- contact view ---------- */
.c-head { display: flex; align-items: flex-start; gap: 18px; margin: 12px 0 16px; flex-wrap: wrap; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--navy) 0 48%, var(--sea) 52%); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 20px; flex: none; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.c-title { flex: 1; min-width: 260px; }
.c-title .line { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 6px; color: var(--ink-2); font-size: 14px; }
.c-title .line a { font-weight: 600; }
.consent { display: inline-flex; gap: 4px; }
.consent span { font-size: 12px; font-weight: 700; border-radius: 5px; padding: 1px 6px; background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line-soft); }
.consent span.on { background: var(--green-tint); color: var(--green); border-color: transparent; }
.actionbar { display: flex; gap: 8px; flex-wrap: wrap; }
.c-grid { display: grid; grid-template-columns: 270px minmax(0, 1fr) 310px; gap: 18px; align-items: start; }
.kv { display: grid; grid-template-columns: 112px 1fr; gap: 7px 10px; font-size: 14px; padding: 0 18px 16px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.note-box { padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.note-box textarea { min-height: 54px; }
.note-box .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.timeline { list-style: none; margin: 0; padding: 6px 18px 16px; }
.timeline li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.timeline li:last-child { border-bottom: 0; }
.timeline .ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.timeline .ic svg { width: 14px; height: 14px; }
.timeline .ic.Call { background: var(--green-tint); color: var(--green); }
.timeline .ic.Appointment, .timeline .ic.Meeting { background: var(--sea-tint); color: var(--sea-dark); }
.timeline .ic.Deal { background: var(--sun-tint); color: #8a5300; }
.timeline .when { font-size: 12.5px; color: var(--ink-3); }
.timeline .txt { white-space: pre-wrap; overflow-wrap: anywhere; }
.pinned { padding: 10px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.pinned .p { display: flex; gap: 8px; align-items: center; }
.stepper { display: flex; gap: 3px; margin: 10px 0 6px; }
.stepper button { flex: 1; height: 8px; border: 0; border-radius: 4px; background: var(--line); cursor: pointer; padding: 0; }
.stepper button.done { background: var(--sea); }
.stepper button.cur { background: var(--navy); }
.stepper button:hover { outline: 2px solid var(--sea-tint); }
.deal { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 12px 14px; margin: 0 18px 10px; }
.deal .top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.deal .money { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 13.5px; margin-top: 8px; }
.deal .money .net { font-weight: 800; border-top: 1px solid var(--line-soft); padding-top: 3px; }
.dup-banner { background: var(--amber-tint); border: 1px solid #f1d9a2; border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; font-size: 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ---------- diary ---------- */
.cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
.cal-head { display: grid; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cal-head div { padding: 8px 6px; text-align: center; font-size: 13px; font-weight: 700; color: var(--ink-2); border-left: 1px solid var(--line-soft); }
.cal-head div.today { color: var(--ink); background: var(--sun-tint); }
.cal-head div.closed { color: var(--ink-3); }
.cal-body { display: grid; position: relative; overflow-y: auto; max-height: calc(100vh - 210px); }
.cal-times { position: relative; }
.cal-times div { height: 48px; font-size: 11.5px; color: var(--ink-3); text-align: right; padding: 0 6px; transform: translateY(-7px); }
.cal-col { position: relative; border-left: 1px solid var(--line-soft); background-image: repeating-linear-gradient(to bottom, var(--line-soft) 0 1px, transparent 1px 24px, #f6f0e4 24px 25px, transparent 25px 48px); }
.cal-col.closed { background-color: #faf7f1; }
.cal-col.drop { background-color: var(--sea-tint); }
.slot-hint { position: absolute; left: 2px; right: 2px; height: 24px; border-radius: 4px; background: var(--sea-tint); border: 1px dashed var(--sea); pointer-events: none; font-size: 11.5px; color: var(--sea-dark); padding: 2px 6px; }
.ev { position: absolute; left: 3px; right: 3px; border-radius: 6px; padding: 3px 7px; font-size: 12.5px; line-height: 1.25; overflow: hidden; cursor: pointer; color: #fff; background: var(--t-demo); border: 1px solid rgba(0,0,0,.08); }
.ev:hover { filter: brightness(1.06); z-index: 3; }
.ev b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.outlook { background: #e6ebef; color: var(--ink-2); border: 1px dashed #b7c4cf; cursor: default; }
.ev.cancelled { opacity: .45; text-decoration: line-through; }
.ev.review { box-shadow: 0 0 0 2px var(--amber) inset; }
.ty-Demo { --tc: var(--t-demo); } .ty-Discovery-call { --tc: var(--t-discovery); } .ty-Follow-up-call { --tc: var(--t-followup); }
.ty-Site-visit { --tc: var(--t-visit); } .ty-Onboarding-call { --tc: var(--t-onboard); }
.ev[class*="ty-"] { background: var(--tc); }
.diary-card[class*="ty-"] { border-left-color: var(--tc); }
.now-bar { position: absolute; left: 0; right: 0; height: 2px; background: var(--sun-deep); z-index: 4; pointer-events: none; }
.now-bar::before { content: ''; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--sun-deep); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--tc); display: inline-block; }
.side-task { border: 1px solid var(--line-soft); border-radius: var(--radius-s); padding: 8px 10px; margin: 0 14px 8px; font-size: 13.5px; cursor: grab; background: var(--surface); }
.side-task:active { cursor: grabbing; }
.month { display: grid; grid-template-columns: repeat(7, 1fr); }
.month .d { min-height: 104px; border-left: 1px solid var(--line-soft); border-top: 1px solid var(--line-soft); padding: 4px 6px; font-size: 12.5px; cursor: pointer; }
.month .d.other { background: #fbf8f2; color: var(--ink-3); }
.month .d.today .num { background: var(--sun); color: var(--ink); border-radius: 50%; }
.month .num { font-weight: 700; display: inline-grid; place-items: center; width: 22px; height: 22px; }
.month .m-ev { border-radius: 4px; padding: 1px 5px; margin-top: 2px; color: #fff; background: var(--tc, var(--t-demo)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.month .m-ev.outlook { background: #e6ebef; color: var(--ink-2); }

/* ---------- pipeline ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: #F1E9DA; border-radius: var(--radius-l); padding: 10px; min-height: 200px; max-height: calc(100vh - 190px); overflow-y: auto; }
.col.drop { background: var(--sea-tint); outline: 2px dashed var(--sea); }
.col-head { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 4px 10px; }
.col-head .v { font-size: 12.5px; color: var(--ink-2); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; cursor: grab; font-size: 13.5px; }
.card:hover { border-color: #cdb98f; }
.card b { display: block; font-size: 14.5px; }
.card .meta { color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; }

/* ---------- modal, menu, toast ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(9,18,31,.42); z-index: 100; display: grid; place-items: start center; padding: 6vh 16px; overflow-y: auto; animation: fade .12s ease-out; }
.modal { background: var(--surface); border-radius: var(--radius-l); width: 100%; max-width: 560px; box-shadow: 0 24px 60px rgba(9,18,31,.28); animation: pop .14s ease-out; }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px 6px; }
.modal-head h2 { flex: 1; }
.modal-body { padding: 10px 22px 6px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px 18px; align-items: center; }
.modal-foot .spacer { flex: 1; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(6px) scale(.99); opacity: 0; } }
.menu { position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(14,26,43,.16); padding: 6px; z-index: 60; min-width: 190px; }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; border-radius: var(--radius-s); cursor: pointer; font-weight: 600; text-align: left; }
.menu button:hover, .menu button:focus-visible { background: var(--sea-tint); }
.menu button svg { width: 17px; height: 17px; color: var(--ink-2); }
.menu kbd { margin-left: auto; font-family: inherit; font-size: 12px; color: var(--ink-3); }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 200; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius); box-shadow: 0 10px 28px rgba(0,0,0,.2); display: flex; gap: 14px; align-items: center; font-weight: 500; animation: pop .15s ease-out; }
.toast.err { background: var(--red); }
.toast button { background: none; border: 0; color: var(--forest-light); font-weight: 700; cursor: pointer; padding: 0; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 10px; background: var(--surface); cursor: pointer; text-align: left; }
.slot:hover { border-color: var(--sea); }
.slot.on { border-color: var(--sea); background: var(--sea-tint); box-shadow: 0 0 0 1px var(--sea) inset; }
.slot b { display: block; font-size: 15px; }
.slot span { font-size: 13px; color: var(--ink-2); }
.picker { position: relative; }
.picker .opts { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: 0 10px 24px rgba(14,26,43,.14); max-height: 240px; overflow: auto; z-index: 120; }
.picker .opts button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; cursor: pointer; }
.picker .opts button:hover, .picker .opts button.sel { background: var(--sea-tint); }
.picked { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface-2); font-weight: 600; color: var(--ink); }
.callout { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 12px 14px; font-size: 14px; }
.callout.warn { background: var(--amber-tint); border-color: #f1d9a2; }
.callout.ok { background: var(--green-tint); border-color: #bfe3cc; }
.callout ol { margin: 6px 0 0; padding-left: 20px; }
.callout li { margin: 3px 0; }
code { background: var(--surface-2); border: 1px solid var(--line-soft); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 14px; }
.tabs button { border: 0; background: none; padding: 9px 14px; font-weight: 700; color: var(--ink-2); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--sea); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 18px; align-items: start; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 7px 13px; font-weight: 600; cursor: pointer; color: var(--ink-2); border-left: 1px solid var(--line); }
.seg button:first-child { border-left: 0; }
.seg button.on { background: var(--ink); color: #fff; }
.dropzone { border: 2px dashed var(--line); border-radius: var(--radius); padding: 20px; text-align: center; color: var(--ink-2); cursor: pointer; }
.dropzone.over { border-color: var(--sea); background: var(--sea-tint); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .c-grid { grid-template-columns: 1fr 1fr; }
  .c-grid > .col-timeline { grid-column: 1 / -1; order: 3; }
  .cal-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .dash { grid-template-columns: 1fr; }
  .pipe-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  :root { --rail: 0px; }
  .shell { grid-template-columns: 1fr; }
  .rail { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; padding: 6px; z-index: 40; border-right: 0; border-top: 1px solid var(--line); }
  .rail .brand, .rail .foot { display: none; }
  .nav { display: flex; width: 100%; justify-content: space-around; }
  .nav a { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 4px; }
  .nav a.active::before { display: none; }
  .nav .count { position: absolute; top: 0; right: 4px; margin: 0; }
  .nav a.opt { display: none; }
  .topbar { padding: 10px 14px; }
  .page { padding: 4px 14px 90px; }
  h1 { font-size: 24px; }
  .c-grid { grid-template-columns: 1fr; }
  .c-grid > .col-timeline { order: -1; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .slots { grid-template-columns: 1fr; }
  .pipe-strip { grid-template-columns: repeat(2, 1fr); }
  .task { grid-template-columns: 5px 34px 1fr; }
  .task .t-side { grid-column: 3; padding-bottom: 8px; }
  .hide-m { display: none; }
  table.list th { top: 0; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.linkbtn { background: none; border: 0; padding: 0; color: var(--sea-dark); font-weight: 600; cursor: pointer; font: inherit; }
.linkbtn:hover { text-decoration: underline; }

/* ---------- sales funnel ---------- */
.f-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 14px; }
.funnel { display: flex; flex-direction: column; gap: 4px; }
.f-row { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 18px; align-items: center; color: inherit; border-radius: var(--radius-s); }
.f-row:hover { text-decoration: none; }
.f-row:hover .f-band { filter: brightness(1.06) saturate(1.05); }
.f-row:focus-visible { outline-offset: 4px; }
.f-track { display: flex; justify-content: center; }
.f-band { height: 54px; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 14.5px; white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--inset)) 100%, var(--inset) 100%); transition: filter .15s; min-width: 0; overflow: hidden; }
.f-band b { font-size: 18px; font-weight: 800; }
.f-side { font-size: 14px; color: var(--ink-2); line-height: 1.35; }
.f-side b { color: var(--ink); font-size: 16px; }
.f-side span { display: block; font-size: 13px; color: var(--ink-3); }
.f-side .f-mname { display: none; }
.f-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: 14px; color: var(--ink-2); }
.f-foot b { color: var(--ink); }
@media (max-width: 760px) {
  /* On phones the stage names move beside the funnel so nothing is cut off. */
  .f-row { grid-template-columns: minmax(0, 1fr) 156px; gap: 12px; }
  .f-band { height: 48px; }
  .f-band .f-name { display: none; }
  .f-band b { font-size: 16px; }
  .f-side { font-size: 12.5px; line-height: 1.3; }
  .f-side .f-mname { display: block; color: var(--ink); font-weight: 700; font-size: 13.5px; }
  .f-side b { font-size: 13.5px; }
  .f-side span { font-size: 12px; }
  .f-head .seg button { padding: 6px 9px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .f-band { transition: none; } }

/* =====================================================================
   Phones and installed web app
   ===================================================================== */
.more-btn, .fab, .m-cards, .stage-tabs, .dup-cards { display: none; }
.dash-half { grid-template-columns: 1fr 1fr; }
.side-panel { max-height: calc(100vh - 200px); overflow: auto; position: sticky; top: 80px; }
.side-task { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-task .btn { flex: none; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.card-top .btn { padding: 2px 8px; margin: -2px -6px 0 0; }
.agenda .ag-day { margin-bottom: 16px; }
.ag-head { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 8px; }
.ag-head h3 { font-size: 16px; }
.agenda .diary-card { margin: 0 0 10px; }
.ag-busy { font-size: 13.5px; color: var(--ink-2); background: #f6f0e4; border: 1px dashed #d9c7a3; border-radius: var(--radius-s); padding: 8px 10px; margin-bottom: 8px; }
.menu button.danger { color: var(--red); }
.menu button.danger svg { color: var(--red); }
body { overflow-x: clip; }

@media (max-width: 760px) {
  html { -webkit-text-size-adjust: 100%; }
  body { padding-bottom: env(safe-area-inset-bottom); }
  .desk-only, .desk-only-inline { display: none !important; }
  .page { padding: 4px 14px calc(150px + env(safe-area-inset-bottom)); }
  .topbar { padding: calc(10px + env(safe-area-inset-top)) 14px 10px; gap: 10px; }
  .search { max-width: none; }
  .search input { padding: 11px 12px 11px 38px; font-size: 16px; } /* 16px stops iOS zooming in */
  #new-btn { display: none; }
  .today-head { margin: 8px 0 14px; gap: 10px; }
  .today-head .date img { width: 36px; height: 36px; }

  /* Bottom bar: five big targets, the More sheet holds the rest. */
  .rail { padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); }
  .nav a, .more-btn { flex: 1; min-width: 0; min-height: 52px; justify-content: center; }
  .more-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: none; font: inherit; font-size: 11px; font-weight: 600; color: var(--ink-2); padding: 6px 4px; border-radius: var(--radius-s); cursor: pointer; }
  .more-btn svg { width: 19px; height: 19px; }
  .more-btn.active { background: var(--sea-tint); color: var(--ink); }
  .nav a.active { background: var(--sea-tint); }

  /* Floating "new" button above the bottom bar. */
  .fab { display: grid; place-items: center; position: fixed; right: 16px; bottom: calc(72px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 50%;
    border: 0; background: var(--sea); color: #fff; box-shadow: 0 8px 22px rgba(35,103,158,.38); z-index: 45; cursor: pointer; }
  .fab svg { width: 26px; height: 26px; }
  .fab:active { transform: scale(.96); }
  body[data-route="settings"] .fab { display: none; }

  /* Menus become sheets that slide up from the bottom. */
  .sheet-backdrop { position: fixed; inset: 0; background: rgba(9,18,31,.42); z-index: 59; animation: fade .12s ease-out; }
  .menu.sheet { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); top: auto; min-width: 0; border-radius: 16px; padding: 8px; max-height: 75vh; overflow: auto; animation: rise .16s ease-out; }
  .menu.sheet button { padding: 14px 12px; font-size: 16px; }
  .menu.sheet .sheet-title { padding: 8px 12px 6px; font-size: 13px; color: var(--ink-3); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .menu.sheet .sheet-cancel { justify-content: center; margin-top: 6px; border-top: 1px solid var(--line-soft); border-radius: 0 0 10px 10px; color: var(--sea-dark); }

  /* Dialogs fill the screen from the bottom, with the buttons always in reach. */
  .backdrop { padding: 0; place-items: end stretch; }
  .modal, .modal.wide { max-width: none; width: 100%; border-radius: 16px 16px 0 0; max-height: 96dvh; display: flex; flex-direction: column; animation: rise .18s ease-out; }
  .modal .modal-form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
  .modal-head { padding: 16px 16px 4px; }
  .modal-body { padding: 10px 16px 6px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .modal-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft); background: var(--surface); flex-wrap: wrap; }
  .modal-foot .btn { flex: 1; min-height: 46px; }
  .modal-foot .spacer { display: none; }
  .field input, .field select, .field textarea, input.input, select.input, textarea.input { font-size: 16px; min-height: 44px; }
  .chip { padding: 9px 13px; font-size: 14.5px; }

  /* Bigger touch targets everywhere. */
  .btn { min-height: 42px; }
  .btn.small { min-height: 36px; }
  .btn.icon { width: 40px; height: 40px; }
  .tick { width: 26px; height: 26px; }
  .t-actions { opacity: 1; gap: 4px; }

  /* Today */
  .dash-half { grid-template-columns: 1fr; }
  .task { margin: 0 10px 8px; }
  .diary-card { margin: 0 12px 10px; }
  .mini-list { padding: 0 14px 12px; }
  .mini-list li { flex-wrap: wrap; }
  .panel-head { padding: 14px 14px 8px; flex-wrap: wrap; }
  .panel-body { padding: 0 14px 14px; }

  /* Lists become cards. */
  .m-cards { display: flex; flex-direction: column; gap: 8px; list-style: none; margin: 0; padding: 0; }
  .m-card { display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .m-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; color: var(--ink); text-align: left; background: none; border: 0; font: inherit; cursor: pointer; }
  .m-main:hover { text-decoration: none; background: var(--surface-2); }
  .m-main b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .m-sub { font-size: 13.5px; color: var(--ink-2); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .m-call { display: grid; place-items: center; width: 56px; flex: none; border-left: 1px solid var(--line-soft); color: var(--green); }
  .m-call svg { width: 22px; height: 22px; }
  .table-wrap.desk-only, table.desk-only { display: none; }
  .pager { padding: 14px 0; }

  /* Contacts filters fold away behind one button. */
  .contacts-filters { flex-direction: column; align-items: stretch; }
  .contacts-filters > * { width: 100% !important; min-width: 0 !important; }
  .contacts-filters > :not(.filter-toggle) { display: none; }
  .contacts-filters.open > * { display: block; }
  .contacts-filters.open > .spacer { display: none; }
  .contacts-filters label select { width: 100%; margin-top: 4px; }
  .filter-toggle { justify-content: center; }

  /* Contact page */
  .c-head { gap: 12px; }
  .avatar { width: 48px; height: 48px; font-size: 17px; }
  .c-title { min-width: 0; flex: 1 1 calc(100% - 70px); }
  .c-title .line { gap: 8px; }
  .actionbar { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; gap: 6px; }
  .actionbar .btn { flex-direction: column; gap: 2px; font-size: 12.5px; padding: 8px 4px; min-height: 58px; }
  .actionbar .btn svg { width: 20px; height: 20px; }
  .kv { grid-template-columns: 100px minmax(0, 1fr); padding: 0 14px 14px; }
  .note-box { padding: 12px 14px; }
  .note-box .row { flex-wrap: wrap; }
  .timeline { padding: 4px 14px 14px; }
  .deal { margin: 0 12px 10px; }
  .dup-banner { flex-direction: column; align-items: flex-start; }

  /* Diary */
  .cal-wrap { grid-template-columns: 1fr; }
  .side-panel { position: static; max-height: none; }
  .side-task { margin: 0 12px 8px; cursor: default; }
  .legend { display: none; }
  .today-head .seg { flex: 1; }
  .today-head .seg button { flex: 1; min-height: 40px; }
  .cal-body { max-height: 70vh; }

  /* Funnel page: one stage at a time. */
  .stage-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
  .stage-tabs .n { opacity: .7; margin-left: 2px; }
  .board.one { display: block; overflow: visible; }
  .board.one .col { max-height: none; min-height: 0; background: none; padding: 0; }
  .board.one .col-head { padding: 0 2px 8px; }
  .card { cursor: default; }

  /* Duplicates */
  .dup-cards { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
  .dup-card { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .dup-card input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--sea); flex: none; }
  .dup-card > span { min-width: 0; }

  /* Settings */
  .settings-grid { grid-template-columns: 1fr; }
  .today-head > .muted.small { flex-basis: 100%; }
  .toasts { bottom: calc(140px + env(safe-area-inset-bottom)); left: 12px; right: 12px; transform: none; }
  .toast { width: 100%; justify-content: space-between; }
}
@media (max-width: 760px) and (hover: none) { .f-row:hover .f-band { filter: none; } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.settings-grid { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
/* Grid children may shrink below their content's natural width (stops long words widening the page). */
.c-grid > *, .dash > *, .settings-grid > *, .cal-wrap > * { min-width: 0; }
.kv dd, .t-title, .timeline .txt, .c-title h1 { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .task { grid-template-columns: 5px 34px minmax(0, 1fr); }
  .task .t-side { flex-wrap: wrap; row-gap: 4px; }
  .t-meta { min-width: 0; }
  .btn { max-width: 100%; white-space: normal; text-align: center; }
  .seg { max-width: 100%; }
  .seg button { white-space: nowrap; }
  .today-head .seg { display: flex; }
}
@media (max-width: 760px) {
  .topbar .spacer { display: none; }
  .search { flex: 1; }
  .today-head .spacer { display: none; }
  .today-head .seg { flex: 1 1 auto; min-width: max-content; }
  .today-head .seg button { flex: 1; }
  .f-head .seg { width: 100%; }
  .f-head .seg button { flex: 1; }
}

/* ---------------------------------------------------- roles, team and Captain's Log */
.mgr-only { display: none !important; }
body.is-mgr .nav a.mgr-only { display: flex !important; }
.settings-grid .span2 { grid-column: 1 / -1; }

.log-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--sea-tint); color: var(--sea-dark); display: grid; place-items: center; flex: none; }
.log-mark svg { width: 24px; height: 24px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; color: var(--ink); }
a.kpi:hover { text-decoration: none; border-color: var(--line); background: var(--surface-2); }
.kpi.amber { border-color: #f1d9a2; }
.kpi.red { border-color: #f0c4be; }
.k-label { font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.k-flag { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; }
.k-flag svg { width: 12px; height: 12px; }
.k-flag.amber { background: var(--amber-tint); color: #8a5800; }
.k-flag.red { background: var(--red-tint); color: var(--red); }
.k-value { font-size: 28px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.k-sub { font-size: 12.5px; color: var(--ink-3); }
.log-top { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.team-table th.num, .team-table td.num, .src-table th.num, .src-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.team-table td { vertical-align: top; }
.m-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-2); margin: 4px 0 2px; }
.m-stats b { color: var(--ink); }
.team-cards { display: none; }

.pool-callout { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; background: var(--amber-tint); border-color: #f1d9a2; }
.pool-callout span { flex: 1 1 220px; }
.owner-line .linkbtn { font-size: 13.5px; }
.diary-for { margin-bottom: 4px; }
.diary-for select, .funnel-filters select { margin-left: 6px; }
.funnel-filters { gap: 14px; flex-wrap: wrap; }
.card .meta.owner { color: var(--ink-2); font-weight: 600; }

.owner-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.owner-chips select { font: inherit; font-size: 14px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink-2); max-width: 100%; }
.owner-chips select.on { border-color: var(--sea); color: var(--ink); background: var(--sea-tint); }
.select-bar { position: sticky; top: 64px; z-index: 5; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 8px 10px 8px 14px; margin-bottom: 12px; box-shadow: 0 6px 18px rgba(9, 18, 31, .18); }
.select-bar .btn { background: rgba(255, 255, 255, .12); color: #fff; border-color: transparent; }
.select-bar .btn.primary { background: var(--forest-light); color: #fff; }
.select-bar .btn:disabled { opacity: .5; }
.pick-col { width: 36px; }
input.pick { width: 18px; height: 18px; accent-color: var(--sea); }
.m-pick { display: flex; align-items: center; padding: 0 0 0 12px; }

.people { list-style: none; margin: 0; padding: 0; }
.person { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.person:last-child { border-bottom: 0; }
.person .who { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.person .acts { flex: none; white-space: nowrap; }
.person.gone .who b { color: var(--ink-3); }

@media (max-width: 980px) { .log-top { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  body.is-mgr .nav a.mgr-only[data-nav=log] { display: none !important; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px; }
  .k-value { font-size: 22px; }
  .team-cards { display: block; }
  .log-head .seg { flex: 1 1 100%; }
  .log-head .seg button { flex: 1; }
  .log-head label { flex: 1 1 100%; }
  .log-head label select { width: 100%; margin-top: 4px; }
  .select-bar { top: auto; bottom: calc(76px + env(safe-area-inset-bottom)); position: sticky; }
  .person { flex-wrap: wrap; }
  .person .acts { width: 100%; }
  .owner-chips select { flex: 1 1 100%; }
  .diary-for label, .funnel-filters label { flex: 1 1 100%; }
  .diary-for select, .funnel-filters select { width: 100%; margin: 4px 0 0; }
}

/* Funnel in a narrow panel (e.g. beside the allocation list): stage names move to the side column. */
.funnel-holder.compact .f-band .f-name { display: none; }
.funnel-holder.compact .f-side .f-mname { display: block; color: var(--ink); font-weight: 700; font-size: 13.5px; }
@media (max-width: 760px) {
  .nav a, .nav .more-btn { flex: 1 1 0; min-width: 0; }
  .nav a .lbl { text-align: center; line-height: 1.15; overflow-wrap: anywhere; }
  .src-table th, .src-table td { padding-left: 6px; padding-right: 6px; font-size: 13px; }
  .src-table th:first-child, .src-table td:first-child { padding-left: 12px; }
}
@media (max-width: 760px) {
  .log-head .seg { min-width: 0; }
  .log-head .seg button { min-width: 0; padding-left: 4px; padding-right: 4px; font-size: 13.5px; white-space: nowrap; }
}

/* ---------- ParkPilot additions ---------- */
.badge.navy { background: var(--navy); color: #fff; border-color: transparent; }
.badge.sand { background: var(--sun-tint); color: #6b5426; border-color: transparent; }
.badge.green { background: var(--green-tint); color: var(--sea-dark); border-color: transparent; }
.company-line { font-size: 15px; font-weight: 600; color: var(--ink-2); margin-top: 2px; }
.company-line .sep { color: var(--ink-3); font-weight: 400; margin: 0 6px; }
.gmail-link { font-size: 12.5px; font-weight: 600; }
.mrr { font-variant-numeric: tabular-nums; }
.google-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); }
.google-steps b { color: var(--ink); }
.lead-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--sea-dark); background: var(--sea-tint); border-radius: 99px; padding: 2px 10px; }
.plan-hint { font-size: 12.5px; color: var(--ink-3); font-weight: 400; }
