/* ============================================================
   CoreRoom — Project Overview (home)
   The landing page for a project: hero, key stats, milestones,
   notes, team messages, and the project team. Matches app tokens.
   ============================================================ */
.overview-pane { position: absolute; inset: 0; overflow-y: auto; background: var(--bg); z-index: 600; }
.overview-pane[hidden] { display: none; }
.overview-pane::-webkit-scrollbar { width: 10px; }
.overview-pane::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 5px; border: 2px solid var(--bg); }

.ov-wrap { max-width: 1180px; margin: 0 auto; padding: 26px 32px 60px; }

/* ---- hero ---- */
.ov-hero { display: flex; align-items: flex-start; gap: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--hairline); margin-bottom: 22px; }
.ov-hero-badge { width: 56px; height: 56px; border-radius: 15px; background: var(--accent-soft); border: 1px solid rgba(180,83,9,0.22); display: grid; place-items: center; flex: none; }
.ov-hero-badge svg { width: 28px; height: 28px; color: var(--accent); }
.ov-hero-main { flex: 1; min-width: 0; }
.ov-eyebrow { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.ov-title { font-size: 27px; font-weight: 600; letter-spacing: -0.015em; margin: 5px 0 0; }
.ov-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 9px; font-size: 13.5px; color: var(--muted); }
.ov-sub .dotsep { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.ov-stage { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; color: var(--accent-ink); background: var(--accent-soft); border: 1px solid rgba(180,83,9,0.2); border-radius: 100px; padding: 4px 12px; }
.ov-stage .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.ov-hero-actions { display: flex; gap: 9px; flex: none; }
.ov-btn { font-family: var(--sans); font-size: 13px; font-weight: 500; padding: 9px 15px; border-radius: 10px; border: 1px solid var(--hairline); background: var(--surface); color: var(--ink); cursor: pointer; transition: 0.15s; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.ov-btn svg { width: 15px; height: 15px; }
.ov-btn:hover { border-color: var(--faint); background: var(--surface-warm); }
.ov-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.ov-btn.primary:hover { background: var(--accent-ink); }

/* ---- stat strip ---- */
.ov-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; border: 1px solid var(--hairline); border-radius: 14px; background: var(--surface); overflow: hidden; margin-bottom: 22px; }
.ov-stat .v { white-space: nowrap; }
.ov-stat { padding: 16px 18px; border-right: 1px solid var(--hairline-soft); cursor: default; }
.ov-stat:last-child { border-right: none; }
.ov-stat .k { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.ov-stat .v { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; margin-top: 6px; }
.ov-stat .v small { font-size: 13px; font-weight: 500; color: var(--muted); }
.ov-stat .d { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.ov-stat .d.up { color: var(--ok); }

/* ---- layout grid ---- */
.ov-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; align-items: start; }
.ov-col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

.ov-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden; }
.ov-card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px 13px; border-bottom: 1px solid var(--hairline-soft); }
.ov-card-h h3 { margin: 0; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.ov-card-h h3 svg { width: 16px; height: 16px; color: var(--accent); }
.ov-card-h .ov-count { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.ov-link { font-size: 12.5px; color: var(--accent-ink); cursor: pointer; background: none; border: none; font-family: var(--sans); padding: 0; }
.ov-link:hover { text-decoration: underline; }
.ov-h-right { display: flex; align-items: center; gap: 12px; }
.ov-donut { display: inline-flex; flex: none; }
/* milestone-progress tile in the top metrics bar */
.ov-stat-prog .ov-prog { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.ov-stat-prog .ov-count { font-family: var(--mono); font-size: 11px; color: var(--muted); line-height: 1.3; }

/* empty-states — shown when a section has no real data (never fake demo content) */
.ov-empty { padding: 18px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.ov-empty b { color: var(--accent-ink); font-weight: 600; }
.ov-empty-stat { border-right: none; }
.ov-soon { font-style: italic; opacity: 0.8; }

/* editable milestone controls */
.ov-mile-dot { cursor: pointer; padding: 0; }
.ov-mile-name[contenteditable], .ov-mile-date[contenteditable], .ov-mile-desc[contenteditable] { outline: none; border-radius: 5px; transition: box-shadow 0.14s, background 0.14s; }
.ov-mile-name[contenteditable]:hover, .ov-mile-date[contenteditable]:hover, .ov-mile-desc[contenteditable]:hover { background: var(--surface-warm); }
.ov-mile-name[contenteditable]:focus, .ov-mile-date[contenteditable]:focus, .ov-mile-desc[contenteditable]:focus { background: #fff; box-shadow: 0 0 0 2px var(--accent-soft); }
.ov-mile-name:empty::before, .ov-mile-date:empty::before, .ov-mile-desc:empty::before { content: attr(data-ph); color: var(--faint); }
.ov-mile-del { flex: none; width: 20px; height: 20px; border-radius: 5px; border: none; background: transparent; color: var(--faint); cursor: pointer; display: grid; place-items: center; opacity: 0; transition: 0.14s; }
.ov-mile-del svg { width: 12px; height: 12px; }
.ov-mile:hover .ov-mile-del { opacity: 1; }
.ov-mile-del:hover { background: rgba(176,0,32,0.08); color: #b00020; }

/* ---- milestones ---- */
.ov-miles { padding: 6px 18px 14px; }
.ov-mile { display: flex; gap: 14px; padding: 11px 0; cursor: pointer; }
.ov-mile-rail { position: relative; flex: none; width: 22px; display: flex; justify-content: center; }
.ov-mile-rail::before { content: ""; position: absolute; top: 22px; bottom: -11px; width: 2px; background: var(--hairline); }
.ov-mile:last-child .ov-mile-rail::before { display: none; }
.ov-mile-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--hairline); background: var(--surface); display: grid; place-items: center; z-index: 1; transition: 0.16s; }
.ov-mile-dot svg { width: 12px; height: 12px; color: #fff; opacity: 0; }
.ov-mile.done .ov-mile-dot { background: var(--ok); border-color: var(--ok); }
.ov-mile.done .ov-mile-dot svg { opacity: 1; }
.ov-mile.active .ov-mile-dot { position: relative; border-color: var(--accent); background: var(--surface); }
.ov-mile.active .ov-mile-dot svg { opacity: 0; }
.ov-mile.active .ov-mile-dot::after { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.ov-mile-body { flex: 1; min-width: 0; padding-top: 1px; }
.ov-mile-top { display: flex; align-items: baseline; gap: 10px; }
.ov-mile-name { font-size: 13.5px; font-weight: 500; color: var(--ink); flex: 1; min-width: 0; }
.ov-mile.done .ov-mile-name { color: var(--muted); }
.ov-mile-date { font-family: var(--mono); font-size: 10.5px; color: var(--faint); white-space: nowrap; flex: none; }
.ov-mile-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.ov-mile-tag { display: inline-block; white-space: nowrap; font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; padding: 1px 7px; border-radius: 100px; margin-top: 6px; }
.ov-mile.active .ov-mile-tag { background: var(--accent-soft); color: var(--accent-ink); }

/* ---- notes ---- */
.ov-note-add { display: flex; gap: 9px; padding: 13px 18px; border-bottom: 1px solid var(--hairline-soft); }
.ov-note-input { flex: 1; font-family: var(--sans); font-size: 13px; color: var(--ink); background: var(--surface-warm); border: 1px solid var(--hairline); border-radius: 9px; padding: 9px 12px; resize: none; min-height: 38px; line-height: 1.4; transition: 0.15s; }
.ov-note-input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
.ov-note-send { flex: none; align-self: flex-end; width: 38px; height: 38px; border-radius: 9px; border: none; background: var(--accent); color: #fff; cursor: pointer; display: grid; place-items: center; transition: 0.15s; }
.ov-note-send:hover { background: var(--accent-ink); }
.ov-note-send svg { width: 16px; height: 16px; }
.ov-notes { padding: 4px 18px 8px; max-height: 360px; overflow-y: auto; }
.ov-notes::-webkit-scrollbar { width: 6px; }
.ov-notes::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 3px; }
.ov-note { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--hairline-soft); }
.ov-note:last-child { border-bottom: none; }
.ov-avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: #fff; flex: none; }
.ov-note-main { flex: 1; min-width: 0; }
.ov-note-meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.ov-note-author { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.ov-note-time { font-family: var(--mono); font-size: 10px; color: var(--faint); }
.ov-note-text { font-size: 13px; color: var(--ink); line-height: 1.5; text-wrap: pretty; }
.ov-note-text .tag { color: var(--accent-ink); font-weight: 500; }
.ov-note-pin { font-family: var(--mono); font-size: 9.5px; color: var(--accent); margin-top: 5px; display: inline-flex; align-items: center; gap: 5px; }
.ov-note-pin svg { width: 11px; height: 11px; }

/* ---- messages ---- */
.ov-msgs { padding: 12px 18px 6px; max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.ov-msgs::-webkit-scrollbar { width: 6px; }
.ov-msgs::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 3px; }
.ov-msg { display: flex; gap: 10px; }
.ov-msg-main { min-width: 0; }
.ov-msg-meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.ov-msg-author { font-size: 12.5px; font-weight: 600; }
.ov-msg-time { font-family: var(--mono); font-size: 10px; color: var(--faint); }
.ov-msg-bubble { font-size: 13px; color: var(--ink); line-height: 1.45; background: var(--surface-warm); border: 1px solid var(--hairline-soft); border-radius: 11px; border-top-left-radius: 4px; padding: 8px 12px; display: inline-block; text-wrap: pretty; }
.ov-msg.me { flex-direction: row-reverse; }
.ov-msg.me .ov-msg-meta { flex-direction: row-reverse; }
.ov-msg.me .ov-msg-bubble { background: var(--ink); color: #F5F2EC; border: none; border-radius: 11px; border-top-right-radius: 4px; }
.ov-msg-compose { display: flex; gap: 9px; padding: 13px 18px; border-top: 1px solid var(--hairline-soft); }
.ov-msg-input { flex: 1; font-family: var(--sans); font-size: 13px; color: var(--ink); background: var(--surface-warm); border: 1px solid var(--hairline); border-radius: 100px; padding: 9px 15px; transition: 0.15s; }
.ov-msg-input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
.ov-msg-send { flex: none; width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--accent); color: #fff; cursor: pointer; display: grid; place-items: center; transition: 0.15s; }
.ov-msg-send:hover { background: var(--accent-ink); }
.ov-msg-send svg { width: 16px; height: 16px; }

/* ---- team roster ---- */
.ov-team { padding: 6px 18px 12px; }
.ov-member { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--hairline-soft); }
.ov-member:last-child { border-bottom: none; }
.ov-mem-id { flex: 1; min-width: 0; }
.ov-mem-name { font-size: 13px; font-weight: 500; }
.ov-mem-role { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.ov-presence { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ov-presence.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(63,98,18,0.15); }
.ov-presence.off { background: var(--faint); }

/* ---- quick links ---- */
.ov-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 18px; }
.ov-quick-btn { display: flex; align-items: center; gap: 11px; padding: 12px 13px; border: 1px solid var(--hairline); border-radius: 11px; background: var(--surface-warm); cursor: pointer; transition: 0.15s; text-align: left; font-family: var(--sans); }
.ov-quick-btn:hover { border-color: var(--accent); background: #fff; }
.ov-quick-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--accent-soft); display: grid; place-items: center; flex: none; }
.ov-quick-ic svg { width: 16px; height: 16px; color: var(--accent); }
.ov-quick-tx { min-width: 0; }
.ov-quick-tx b { display: block; font-size: 13px; font-weight: 600; color: var(--ink); }
.ov-quick-tx span { font-size: 11.5px; color: var(--muted); }

@media (max-width: 980px) {
  .ov-grid { grid-template-columns: 1fr; }
  .ov-stats { grid-template-columns: repeat(2, 1fr); }
  .ov-stat:nth-child(2n) { border-right: none; }
}

/* ── Regional-research home: research call-to-action (replaces empty data metrics) ── */
.ov-research { display: grid; grid-template-columns: 1fr auto; gap: 22px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 16px; padding: 22px 24px; margin-bottom: 18px; }
.ov-research-eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.ov-rdot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.ov-research-h { margin: 10px 0 7px; font-size: 19px; line-height: 1.28; font-weight: 700; color: var(--ink); max-width: 40ch; }
.ov-research-lead { margin: 0 0 16px; font-size: 13.5px; line-height: 1.55; color: var(--muted); max-width: 62ch; }
.ov-research-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ov-rchip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border: 1px solid var(--hairline); border-radius: 999px; background: var(--bg, #fff); color: var(--ink); font-size: 12.5px; line-height: 1.2; cursor: pointer; transition: .14s; text-align: left; }
.ov-rchip svg { width: 14px; height: 14px; color: var(--accent); flex: none; }
.ov-rchip:hover { border-color: var(--accent); background: rgba(180, 83, 9, .06); }
.ov-research-side { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; min-width: 154px; padding-left: 22px; border-left: 1px solid var(--hairline); }
.ov-research-mile { text-align: center; line-height: 1.35; }
.ov-research-mile b { display: block; font-size: 12.5px; color: var(--ink); }
.ov-research-mile span { font-size: 11px; color: var(--muted); }
.ov-research-map { margin-top: 10px; }
@media (max-width: 720px) {
  .ov-research { grid-template-columns: 1fr; }
  .ov-research-side { border-left: 0; border-top: 1px solid var(--hairline); padding-left: 0; padding-top: 16px; flex-direction: row; justify-content: space-between; }
  .ov-research-map { margin-top: 0; }
}

/* Regional-research: Area-of-interest card form */
.ov-aoi-note { margin: 0 0 12px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.ov-aoi-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 8px; align-items: center; }
.ov-aoi-in { padding: 8px 10px; border: 1px solid var(--hairline); border-radius: 8px; font-size: 13px; background: var(--bg, #fff); color: var(--ink); outline: none; width: 100%; box-sizing: border-box; }
.ov-aoi-in:focus { border-color: var(--accent); }
.ov-aoi-save { white-space: nowrap; }
@media (max-width: 600px) { .ov-aoi-form { grid-template-columns: 1fr 1fr; } .ov-aoi-save { grid-column: 1 / -1; } }

/* ══ Overview life pass (H9c) — satellite hero, activity feed, motion ══ */

/* hero over satellite imagery: rounded banner, light text, soft glow */
.ov-hero.sat {
  border-radius: 18px; border: 1px solid rgba(24, 20, 12, 0.35);
  background-size: cover; background-position: center;
  padding: 22px 24px; margin-bottom: 22px; border-bottom: none;
  box-shadow: 0 10px 34px rgba(24, 20, 12, 0.16);
}
.ov-hero.sat .ov-title { color: #F7F3EA; }
.ov-hero.sat .ov-eyebrow { color: #E8B98A; }
.ov-hero.sat .ov-sub, .ov-hero.sat .ov-sub span { color: rgba(247, 243, 234, 0.82); }
.ov-hero.sat .ov-stage { color: #F3D9BE; }
.ov-hero.sat .ov-hero-badge { background: rgba(247, 243, 234, 0.12); border-color: rgba(247, 243, 234, 0.28); }
.ov-hero.sat .ov-hero-badge svg { color: #F3D9BE; }
.ov-hero.sat .ov-btn { background: rgba(247, 243, 234, 0.92); border-color: transparent; }
.ov-hero.sat .ov-btn:hover { background: #fff; }
.ov-hero.sat .ov-btn.primary { background: var(--accent); color: #fff; }

/* recent activity feed */
.ov-acts { display: flex; flex-direction: column; }
.ov-act { display: flex; align-items: center; gap: 11px; padding: 9px 2px; border-bottom: 1px solid var(--hairline-soft); }
.ov-act:last-child { border-bottom: none; }
.ov-act-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.ov-act.agent .ov-act-ic { background: rgba(30, 58, 95, 0.1); color: #1E3A5F; }
.ov-act-ic svg { width: 15px; height: 15px; }
.ov-act-main { flex: 1; min-width: 0; }
.ov-act-t { font-size: 12.8px; font-weight: 570; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-act-s { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.ov-act-time { font-size: 10.5px; color: var(--faint); flex: none; font-family: var(--mono); }

/* cards breathe: entrance + hover lift (motion-safe) */
.ov-card { transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease; }
.ov-card:hover { box-shadow: 0 8px 26px rgba(24, 20, 12, 0.08); transform: translateY(-1px); border-color: var(--hairline); }
@media (prefers-reduced-motion: no-preference) {
  .ov-wrap .ov-card, .ov-wrap .ov-stats, .ov-wrap .ov-hero { animation: ovRise 0.45s cubic-bezier(0.22, 0.9, 0.3, 1) both; }
  .ov-wrap .ov-stats { animation-delay: 0.05s; }
  .ov-wrap .ov-col:first-child .ov-card:nth-child(1) { animation-delay: 0.1s; }
  .ov-wrap .ov-col:first-child .ov-card:nth-child(2) { animation-delay: 0.16s; }
  .ov-wrap .ov-col:last-child .ov-card:nth-child(1) { animation-delay: 0.13s; }
  .ov-wrap .ov-col:last-child .ov-card:nth-child(2) { animation-delay: 0.19s; }
  .ov-wrap .ov-col:last-child .ov-card:nth-child(3) { animation-delay: 0.25s; }
}
@keyframes ovRise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

/* KPI tiles: warm top edge + hover */
.ov-stat { position: relative; transition: background 0.15s ease; border-radius: 10px; }
.ov-stat:hover { background: rgba(180, 83, 9, 0.035); }
.ov-stat .v small { font-size: 12px; color: var(--muted); font-weight: 550; }

/* milestones read as a timeline: connecting rail between dots */
.ov-miles { position: relative; }
.ov-mile { position: relative; }
.ov-mile .ov-mile-rail { position: relative; }
.ov-mile:not(:last-child) .ov-mile-rail::after {
  content: ""; position: absolute; left: 50%; top: 26px; bottom: -14px;
  width: 2px; transform: translateX(-50%); background: var(--hairline-soft); border-radius: 2px;
}
.ov-mile.done:not(:last-child) .ov-mile-rail::after { background: rgba(63, 98, 18, 0.35); }

/* fixups: activity rows flex horizontally (a broader rule forces column); stage chip readable on satellite */
.ov-acts .ov-act { flex-direction: row; }
.ov-hero.sat .ov-stage { background: rgba(247, 243, 234, 0.14); border: 1px solid rgba(247, 243, 234, 0.3); color: #F3D9BE; }
.ov-hero.sat .ov-stage .dot { background: #F3D9BE; }
