/* Nectar LP portal styles. Ported from the approved prototype. */
/* Layout: investor-portal shell. Dark honeycomb-green side nav on desktop; on phones it becomes a top bar with a scrolling nav row. */
:root {
  --bg: #f4f6f3; --surface: #ffffff; --raised: #eef1ed; --ink: #16211b; --muted: #59645d; --line: #dce2dd;
  --nav: #13251c; --nav-ink: #d9e3dc; --nav-muted: #8fa597; --nav-hi: #1f3a2c;
  --accent: #c58a1e; --accent-ink: #855a0e; --accent-soft: #f7ecd6; --area: #f3e5c6;
  --group: #1b3326; --group-ink: #f1f5f2;
  --good: #23704a; --good-soft: #e1f0e6; --warn: #a1500a; --warn-soft: #fbead8; --bad: #b42318; --bad-soft: #fbe3e0;
  --font-display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", system-ui, sans-serif;
  --r: 10px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0e1310; --surface: #151c17; --raised: #1c251f; --ink: #e5ebe6; --muted: #9ba79f; --line: #29332c;
  --nav: #0a110d; --nav-ink: #d9e3dc; --nav-muted: #7f9587; --nav-hi: #18291f;
  --accent: #e2a640; --accent-ink: #ecbb64; --accent-soft: #33280f; --area: #2e2512;
  --group: #1e3527; --group-ink: #eef3ef;
  --good: #6cc895; --good-soft: #15301f; --warn: #f0a35a; --warn-soft: #36230e; --bad: #f08a7e; --bad-soft: #3a1a16;
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0e1310; --surface: #151c17; --raised: #1c251f; --ink: #e5ebe6; --muted: #9ba79f; --line: #29332c;
  --nav: #0a110d; --nav-ink: #d9e3dc; --nav-muted: #7f9587; --nav-hi: #18291f;
  --accent: #e2a640; --accent-ink: #ecbb64; --accent-soft: #33280f; --area: #2e2512;
  --group: #1e3527; --group-ink: #eef3ef;
  --good: #6cc895; --good-soft: #15301f; --warn: #f0a35a; --warn-soft: #36230e; --bad: #f08a7e; --bad-soft: #3a1a16;
  color-scheme: dark; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--nav); }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; font-weight: 650; letter-spacing: -0.01em; }
.num, td.n, .tile b, .hero b { font-variant-numeric: tabular-nums; }
.label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pos { color: var(--good); } .neg { color: var(--bad); }

/* shell */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100%; }
.side { background: var(--nav); color: var(--nav-ink); display: flex; flex-direction: column; gap: 18px; padding: 20px 14px; padding-left: max(14px, env(safe-area-inset-left, 0px)); position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand b { font-family: var(--font-display); font-size: 1.15rem; font-weight: 650; display: block; line-height: 1.1; color: #f4efe2; }
.brand small { color: var(--nav-muted); font-size: 0.74rem; }
.nav { display: grid; gap: 2px; }
.nav .sec { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--nav-muted); padding: 12px 10px 4px; }
.nav button { display: flex; align-items: center; gap: 10px; background: none; border: 0; color: var(--nav-ink); padding: 9px 10px; border-radius: 8px; cursor: pointer; text-align: left; font-weight: 500; white-space: nowrap; }
.nav button svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; }
.nav button:hover { background: var(--nav-hi); }
.nav button[aria-current=page] { background: var(--nav-hi); color: #ffd98f; box-shadow: inset 3px 0 0 var(--accent); }
.me { margin-top: auto; display: grid; gap: 8px; border-top: 1px solid var(--nav-hi); padding: 14px 6px 0; }
.me .who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #241703; display: grid; place-items: center; font-weight: 600; font-size: 0.85rem; flex: none; }
.me .who b { display: block; font-weight: 600; font-size: 0.9rem; line-height: 1.2; }
.role { display: inline-block; font-size: 0.7rem; padding: 0 7px; border-radius: 99px; background: var(--nav-hi); color: #ffd98f; }
.me label { font-size: 0.72rem; color: var(--nav-muted); }
.me select { background: var(--nav-hi); color: var(--nav-ink); border: 1px solid #2c4636; border-radius: 8px; padding: 6px 8px; width: 100%; }

.main { min-width: 0; }
.banner { background: var(--accent-soft); color: var(--accent-ink); font-size: 0.82rem; padding-block: 7px; }
.pad { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 900px) { .pad { padding-left: 32px; padding-right: max(32px, env(safe-area-inset-right, 0px)); } }
#view { padding-block: 26px 56px; display: grid; gap: 22px; max-width: 1240px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 8px 16px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.page-head h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.page-head p { margin: 2px 0 0; color: var(--accent-ink); }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
  .brand { padding: 0; margin-right: auto; }
  .me { margin: 0; border: 0; padding: 0; display: flex; align-items: center; }
  .me .who, .me label { display: none; }
  .me select { width: auto; max-width: 52vw; }
  .nav { order: 3; width: 100%; display: flex; overflow-x: auto; scrollbar-width: none; gap: 0; }
  .nav .sec { display: none; }
  .nav button { border-radius: 0; padding: 10px 12px; }
  .nav button svg { display: none; }
  .nav button[aria-current=page] { box-shadow: inset 0 -2px 0 var(--accent); background: none; }
}

/* panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; min-width: 0; }
.hero-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 20px; align-items: start; }
.hero b { font-family: var(--font-display); font-weight: 650; font-size: clamp(2rem, 5vw, 2.7rem); line-height: 1.1; display: block; margin-top: 2px; }
.hero .chg { font-size: 0.9rem; margin-top: 4px; }
.ranges { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ranges button { background: var(--surface); border: 0; border-right: 1px solid var(--line); padding: 5px 10px; font-size: 0.8rem; cursor: pointer; color: var(--muted); font-weight: 600; }
.ranges button:last-child { border-right: 0; }
.ranges button[aria-pressed=true] { background: var(--group); color: var(--group-ink); }
.chart { position: relative; margin-top: 14px; height: 260px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 0.8rem; padding: 6px 9px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, -110%); }
.tip b { display: block; font-variant-numeric: tabular-nums; }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--ink); border-radius: 8px; padding: 12px 14px; display: grid; gap: 2px; min-width: 0; }
.tile.hl { border-top-color: var(--accent); }
.tile .t { display: flex; justify-content: space-between; gap: 8px; font-size: 0.84rem; font-weight: 600; }
.tile .t span { font-size: 0.7rem; color: var(--muted); font-weight: 500; }
.tile b { font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; }
.tile small { color: var(--muted); font-size: 0.78rem; }
.info { display: inline-grid; place-items: center; width: 15px; height: 15px; border: 1px solid var(--muted); border-radius: 50%; font-size: 0.62rem; color: var(--muted); font-weight: 600; margin-left: 4px; cursor: help; vertical-align: 1px; }

/* holdings */
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.toolbar button { background: none; border: 0; padding: 4px 6px; color: var(--muted); font-size: 0.84rem; cursor: pointer; font-weight: 500; }
.toolbar button:hover { color: var(--ink); }
.group { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.ghead { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; background: var(--group); color: var(--group-ink); border: 0; padding: 14px 16px; cursor: pointer; text-align: left; }
.ghead .chev { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform .15s; flex: none; }
.ghead[aria-expanded=false] .chev { transform: rotate(-90deg); }
.ghead .gname { font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.86rem; margin-right: auto; }
.ghead .gstat { display: grid; text-align: right; line-height: 1.2; }
.ghead .gstat span { font-size: 0.68rem; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.06em; }
.ghead .gstat b { font-variant-numeric: tabular-nums; font-size: 1.02rem; }
.ghead .gcount { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; }
.tablebox { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th { text-align: left; font-size: 0.74rem; color: var(--muted); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; white-space: nowrap; }
tfoot td { font-weight: 600; border-top: 1px solid var(--line); border-bottom: 0; }
td .sub { display: block; color: var(--muted); font-size: 0.8rem; }
.inv { color: var(--accent-ink); font-weight: 600; }
.pill { display: inline-block; font-size: 0.74rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.pill.paid { background: var(--good-soft); color: var(--good); }
.pill.open { background: var(--warn-soft); color: var(--warn); }
.pill.late { background: var(--bad-soft); color: var(--bad); }
.pill.kind { background: var(--raised); color: var(--muted); }
.callout { border-left: 3px solid var(--warn); background: var(--warn-soft); padding: 12px 14px; border-radius: 0 var(--r) var(--r) 0; display: grid; gap: 4px; }
.callout b { color: var(--warn); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid var(--line); background: var(--surface); padding: 5px 12px; border-radius: 99px; cursor: pointer; font-weight: 500; font-size: 0.86rem; }
.seg button[aria-pressed=true] { background: var(--group); color: var(--group-ink); border-color: var(--group); }
form.f { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
form.f .field { display: grid; gap: 4px; min-width: 0; }
form.f .field label { font-size: 0.8rem; color: var(--muted); font-weight: 500; }
select, input[type=text], input[type=number], input[type=date] { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-width: 0; width: 100%; }
.btn { background: var(--group); color: var(--group-ink); border: 0; border-radius: 8px; padding: 9px 14px; font-weight: 600; cursor: pointer; }
.btn.sm { padding: 4px 10px; font-size: 0.82rem; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.toast { font-size: 0.88rem; color: var(--good); min-height: 1.3em; margin: 8px 0 0; }
.note { font-size: 0.85rem; color: var(--muted); margin: 0; }
textarea { width: 100%; min-height: 160px; font: 0.8rem/1.45 ui-monospace, "SF Mono", Menlo, monospace; background: var(--raised); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* live-site additions */
[hidden] { display: none !important; }
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }
.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--nav); }
.signin .card { width: min(420px, 100%); background: var(--surface); border-radius: 14px; padding: 28px 24px; display: grid; gap: 14px; }
.signin .brand b { color: var(--ink); }
.signin .brand small { color: var(--muted); }
.signin h1 { font-size: 1.5rem; }
.signin p { margin: 0; color: var(--muted); }
.signin form { display: grid; gap: 10px; }
.signin input[type=email] { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; }
.msg { font-size: 0.9rem; margin: 0; min-height: 1.3em; }
.msg.err, .toast.err { color: var(--bad); }
.msg.ok { color: var(--good); }
.signout { background: none; border: 1px solid #2c4636; color: var(--nav-ink); border-radius: 8px; padding: 6px 8px; cursor: pointer; font-size: 0.82rem; }
.signout:hover { background: var(--nav-hi); }
input[type=email], input[type=file] { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-width: 0; width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn.danger { background: transparent; color: var(--bad); border: 1px solid var(--line); }
.panel h3 { margin-bottom: 8px; }
.stack { display: grid; gap: 12px; }
.span-all { grid-column: 1 / -1; }
.flush { padding: 6px 8px; }
.empty { padding: 28px 20px; text-align: center; color: var(--muted); }
@media (max-width: 860px) { .signout { order: 2; } }
