/* VENTURES HARBOR — ASSET DASHBOARD & FOUNDER HUB (venture-dashboard.css)
 * Loaded by venture-detail.php (and so by founder-hub.php, which includes it).
 * Everything is scoped to .vd-dash / body.vd-dash-mode, so the public listing is
 * untouched for visitors. */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Dashboard mode: the dashboard replaces the listing's header and tab layout. The
   page's own sections are moved into the rows' folds when a row is opened. */
body.vd-dash-mode #vdHero,
body.vd-dash-mode #vdSampleBanner { display: none; }
body.vd-dash-mode .vd-layout { display: none; }
body.vd-dash-mode .vd-tabs-bar,
body.vd-dash-mode #vdSidebar { display: none; }

.vd-dash {
  padding: calc(var(--navbar-height, 68px) + 1.75rem) 0 2rem;
  background: linear-gradient(160deg, #EEF4FF 0%, #F7F9FC 45%, #EEF9F3 100%);
  min-height: 60vh;
}
.vd-dash.hidden { display: none; }

/* Shimmer placeholders the server puts in the dashboard while its figures load, so a
   dashboard URL paints as a dashboard from the first frame. Each block sits where the
   real content lands and is replaced wholesale by venture-dashboard.js. */
.vd-dash-skel { min-height: 118px; border: 0; border-radius: 16px; }
.vd-dash-skel--fin { grid-column: 1 / -1; min-height: 220px; border-radius: 12px; }
.vd-dash-skel--row { min-height: 64px; border-radius: 14px; }
.vd-dash-skel--row + .vd-dash-skel--row { margin-top: .6rem; }

.vd-dash-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.vd-dash-title { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.vd-dash-logo {
  flex: none; width: 52px; height: 52px; border-radius: 14px; overflow: hidden;
  display: grid; place-items: center; background: #fff; border: 1px solid #E3E9F2;
  color: #2563EB; font-size: 1.4rem; font-weight: 800;
}
.vd-dash-logo img { width: 100%; height: 100%; object-fit: cover; }
.vd-dash-eyebrow { margin: 0; font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #2563EB; }
.vd-dash-title h1 { margin: .15rem 0 0; font-size: clamp(1.35rem, 2.6vw, 1.85rem); line-height: 1.2; color: #081421; }
.vd-dash-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.vd-dash-exit { color: #B91C1C; border-color: #FCA5A5; }
.vd-dash-exit:hover { background: #FEF2F2; }

.vd-dash-card {
  background: #fff;
  border: 1px solid #E3E9F2;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(8, 20, 33, .04);
  padding: 1.1rem 1.25rem;
  min-width: 0;
}
.vd-dash-label { margin: 0; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5A6B85; }
.vd-dash-value { margin: .35rem 0 0; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -.02em; color: #081421; font-variant-numeric: tabular-nums; }
.vd-dash-sub { margin: .3rem 0 0; font-size: .82rem; color: #5A6B85; line-height: 1.45; }
/* Founder Hub: "Your equity" / "Your sweat equity" under Total founder ownership. */
.vd-dash-split { list-style: none; margin: .45rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .2rem; font-size: .9rem; color: #33415C; }
.vd-dash-split strong { color: #081421; font-variant-numeric: tabular-nums; }
.vd-dash-tag { margin-left: .35rem; padding: 2px 7px; border-radius: 999px; background: #EFF4FF; color: #1D4ED8; font-size: .66rem; letter-spacing: .04em; }
.vd-dash-muted { color: #7A8AA3; font-size: .88rem; margin: .5rem 0; }
.vd-dash-note { margin: .6rem 0 0; font-size: .75rem; color: #7A8AA3; line-height: 1.5; }
.vd-dash-intro { color: #5A6B85; font-size: .88rem; margin: 0 0 1rem; }

.vd-dash-stats { display: grid; grid-template-columns: 1.1fr .8fr 1.4fr; gap: 1rem; margin-bottom: 1rem; }
.vd-dash-bar { margin-top: .75rem; height: 8px; border-radius: 999px; background: #E4E9F0; overflow: hidden; }
.vd-dash-bar span { display: block; height: 100%; border-radius: 999px; background: #16A34A; }
.vd-dash-scale { display: flex; justify-content: space-between; margin-top: .35rem; font-size: .68rem; color: #94A3B8; }

.vd-dash-fin { margin-bottom: 1rem; }
.vd-dash-h { margin: 0 0 .9rem; font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #33415C; }
.vd-dash-fin-grid { display: grid; grid-template-columns: .9fr 1.6fr 1.2fr; gap: 1rem; align-items: stretch; }
.vd-dash-fin .vd-dash-card { box-shadow: none; }
.vd-dash-headline { display: flex; flex-direction: column; justify-content: center; }
.vd-dash-empty { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .5rem 0; }
.vd-dash-empty p { margin: 0; color: #5A6B85; font-size: .9rem; }

/* chart */
.vd-chart { position: relative; margin-top: .5rem; }
.vd-chart svg { display: block; width: 100%; height: 190px; overflow: visible; }
.vd-chart-grid { stroke: #EEF1F5; stroke-width: 1; vector-effect: non-scaling-stroke; }
.vd-chart-grid.is-zero { stroke: #C9D2DE; }
.vd-chart-axis { fill: #7A8AA3; font-size: 11px; font-family: inherit; }
.vd-chart-line { fill: none; stroke: #2563EB; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.vd-chart-area { fill: #2563EB; opacity: .08; }
.vd-chart-dot { fill: #2563EB; stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.vd-chart-dot.is-on { r: 6; }
.vd-chart-cross { visibility: hidden; stroke: #94A3B8; stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.vd-chart-hit { fill: transparent; cursor: crosshair; }
.vd-chart-tip {
  position: absolute; transform: translate(-50%, calc(-100% - 12px)); pointer-events: none; z-index: 2;
  display: flex; flex-direction: column; gap: 2px; white-space: nowrap;
  padding: .45rem .65rem; border-radius: 8px; background: #081421; color: #fff; font-size: .75rem;
  box-shadow: 0 6px 18px rgba(8, 20, 33, .25);
}
.vd-chart-tip[hidden] { display: none; }
.vd-chart-tip span { color: #CBD5E1; }

/* month table */
.vd-dash-table { width: 100%; border-collapse: collapse; font-size: .82rem; font-variant-numeric: tabular-nums; }
.vd-dash-table th { text-align: left; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #7A8AA3; padding: .35rem .5rem; border-bottom: 1px solid #EEF1F5; }
.vd-dash-table td { padding: .5rem; border-bottom: 1px solid #F3F5F8; color: #1F2A3D; }
.vd-dash-table td:not(:first-child), .vd-dash-table th:not(:first-child) { text-align: right; }
.vd-dash-table tbody tr:first-child td { background: #F0FDF4; font-weight: 600; }
.vd-dash-table td.is-neg { color: #B91C1C; }
.vd-dash-table tfoot th { color: #081421; font-size: .8rem; border-top: 2px solid #E3E9F2; border-bottom: 0; padding-top: .6rem; }
.vd-dash-table--wide tbody tr:first-child td { background: none; font-weight: 400; }
.vd-table-scroll { overflow-x: auto; }
.vd-link { background: none; border: 0; padding: 0; color: #2563EB; font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.vd-link:hover { text-decoration: underline; }

/* rows */
.vd-dash-rows { display: flex; flex-direction: column; gap: .6rem; }
.vd-dash-row {
  display: flex; align-items: center; gap: 1rem; width: 100%; text-align: left;
  padding: .85rem 1.1rem; background: #fff; border: 1px solid #E3E9F2; border-radius: 14px;
  font: inherit; color: inherit; cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.vd-dash-row:hover { border-color: #93B4F5; box-shadow: 0 6px 18px rgba(37, 99, 235, .1); transform: translateY(-1px); }
.vd-dash-row:focus-visible { outline: 3px solid #2563EB; outline-offset: 2px; }
.vd-dash-row-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #EAF7EF; color: #15803D; }
.vd-dash-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vd-dash-row-text strong { font-size: .95rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: #081421; }
.vd-dash-row-text small { font-size: .82rem; color: #5A6B85; }
.vd-dash-row-badge { flex: none; padding: 3px 10px; border-radius: 999px; background: #FEF3C7; color: #92400E; font-size: .72rem; font-weight: 700; }
.vd-dash-row-badge.hidden { display: none; }
.vd-dash-row-go { flex: none; color: #94A3B8; line-height: 0; }


/* governance */
.vd-gov-form { display: flex; flex-direction: column; gap: .6rem; padding: 1rem; margin-bottom: 1.25rem; border: 1px solid #E3E9F2; border-radius: 14px; background: #F8FAFD; }
.vd-gov-form.hidden { display: none; }
.vd-gov-form h4 { margin: 0 !important; }
.vd-gov-form-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; font-size: .85rem; color: #33415C; }
.vd-gov-form-row select { width: auto; }
.vd-gov-list { display: flex; flex-direction: column; gap: .8rem; }
.vd-gov-card { padding: 1rem 1.1rem; border: 1px solid #E3E9F2; border-radius: 14px; background: #fff; }
.vd-gov-card.is-open { border-left: 4px solid #2563EB; }
.vd-gov-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.vd-gov-head h4 { margin: 0 !important; flex: 1; min-width: 12rem; font-size: 1rem; }
.vd-gov-status { font-size: .75rem; font-weight: 700; color: #5A6B85; }
.vd-gov-verdict { padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; background: #F1F5F9; color: #475569; }
.vd-gov-verdict.is-yes { background: #DCFCE7; color: #15803D; }
.vd-gov-verdict.is-no { background: #FEE2E2; color: #B91C1C; }
.vd-gov-desc { margin: .5rem 0 0; font-size: .88rem; color: #33415C; white-space: pre-line; }
.vd-gov-result { margin-top: .8rem; }
.vd-gov-bars { display: flex; gap: 2px; height: 10px; border-radius: 999px; overflow: hidden; background: #EEF1F5; }
.vd-gov-bars span.is-yes { background: #16A34A; }
.vd-gov-bars span.is-no { background: #DC2626; }
.vd-gov-legend { display: flex; gap: 1rem; margin-top: .4rem; font-size: .78rem; color: #33415C; }
.vd-gov-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.vd-gov-legend i.is-yes { background: #16A34A; }
.vd-gov-legend i.is-no { background: #DC2626; }
.vd-gov-turnout { margin: .45rem 0 0; font-size: .75rem; color: #7A8AA3; }
.vd-gov-actions { display: flex; gap: .5rem; margin-top: .8rem; }
.vd-gov-mine { margin: .7rem 0 0; font-size: .85rem; color: #15803D; }
.vd-gov-card > .btn--outline { margin-top: .7rem; }

/* meetups */
.vd-meet-form { display: flex; flex-direction: column; gap: .6rem; padding: 1rem; margin-bottom: 1.25rem; border: 1px solid #E3E9F2; border-radius: 14px; background: #F8FAFD; }
.vd-meet-form h4 { margin: 0 !important; }
.vd-meet-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: .6rem; }
.vd-meet-grid input[name="location"], .vd-meet-grid input[name="meeting_link"] { grid-column: 1 / -1; }
.vd-meet-grid .hidden { display: none; }
.vd-meet-form .btn { align-self: flex-start; }
.vd-meet-list { display: flex; flex-direction: column; gap: .75rem; }
.vd-meet-card { padding: 1rem; }
.vd-meet-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.vd-meet-top h4 { margin: 0 0 .3rem !important; font-size: .95rem; }
.vd-meet-top p { margin: .15rem 0 0; font-size: .8rem; color: #64748B; }
.vd-meet-notes { color: #33415C !important; }
.vd-meet-going { font-weight: 600; }
.vd-meet-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }

@media (max-width: 960px) {
  .vd-dash-stats { grid-template-columns: 1fr 1fr; }
  .vd-dash-stats .vd-dash-stat:last-child { grid-column: 1 / -1; }
  .vd-dash-fin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .vd-dash-stats { grid-template-columns: 1fr; }
  .vd-dash-row { padding: .75rem .85rem; gap: .75rem; }
  .vd-dash-row-icon { width: 38px; height: 38px; }
  .vd-dash-row-text strong { font-size: .86rem; }
  .vd-dash-row-text small { font-size: .76rem; }
  .vd-meet-grid { grid-template-columns: 1fr 1fr; }
  .vd-meet-grid input[name="title"] { grid-column: 1 / -1; }
}
.vd-chart-cross.is-on { visibility: visible; }

/* ---------- accordion: a row and its fold read as one card ---------- */
.vd-dash-item { border-radius: 14px; background: #fff; border: 1px solid #E3E9F2; transition: border-color .2s, box-shadow .2s; }
.vd-dash-item .vd-dash-row { border: 0; background: transparent; }
.vd-dash-item .vd-dash-row:hover { box-shadow: none; transform: none; }
.vd-dash-item:hover,
.vd-dash-item.is-open { border-color: #93B4F5; box-shadow: 0 6px 18px rgba(37, 99, 235, .08); }
.vd-dash-row-go { transition: transform .42s cubic-bezier(.4, 0, .2, 1); }
.vd-dash-item.is-open .vd-dash-row-go { transform: rotate(90deg); color: #2563EB; }
/* Height animates both ways: a 0fr -> 1fr grid row grows to the content's natural
   height and shrinks back, which a hidden/display toggle cannot do. 420ms matches
   ACC_MS in venture-dashboard.js, which keeps the content until closing finishes. */
.vd-dash-acc {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .42s cubic-bezier(.4, 0, .2, 1), opacity .32s ease;
}
.vd-dash-item.is-open .vd-dash-acc { grid-template-rows: 1fr; opacity: 1; }
.vd-dash-acc-inner { min-height: 0; overflow: hidden; }
.vd-dash-acc-body {
  padding: .25rem 1.25rem 1.25rem;
  border-top: 1px solid #EEF1F5;
  transform: translateY(-6px);
  transition: transform .42s cubic-bezier(.4, 0, .2, 1);
}
.vd-dash-item.is-open .vd-dash-acc-body { transform: none; }
.vd-dash-acc-body > .tab-panel { padding-top: 1rem; animation: none; }
@media (max-width: 560px) { .vd-dash-acc-body { padding: .25rem .85rem 1rem; } }
@media (prefers-reduced-motion: reduce) {
  .vd-dash-acc, .vd-dash-acc-body, .vd-dash-row-go { transition: none; }
}
