/* Fahy Advisory client dashboard — minimal brand styling (navy / gold). */
:root {
  --navy: #0f2233;
  --navy-soft: #1c3a52;
  --gold: #c9a227;
  --ink: #1a1a1a;
  --muted: #6b7280;
  --bg: #f6f7f9;
  --card: #ffffff;
  --green: #1f9d57;
  --amber: #d6920a;
  --red: #c0392b;
  --line: #e5e7eb;
}
* { box-sizing: border-box; }
/* The [hidden] attribute must win over element display rules (e.g. .nav{display:flex}),
   so the nav/sign-out/sections stay hidden until the right view is shown. */
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: var(--navy); color: #fff;
}
.brand { font-weight: 700; letter-spacing: .02em; }
.brand::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px;
  background: var(--gold); border-radius: 50%; vertical-align: middle; }
main { max-width: 980px; margin: 0 auto; padding: 24px 16px 48px; }
h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
.muted { color: var(--muted); margin: .25rem 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.center { text-align: center; }
.login { max-width: 440px; margin: 8vh auto 0; }
.login form { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
input[type=email] { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 1rem; }
button { cursor: pointer; font-size: .95rem; border-radius: 8px; padding: 12px 14px; border: 0;
  background: var(--navy); color: #fff; font-weight: 600; }
button:hover { background: var(--navy-soft); }
button.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); padding: 8px 12px; }
.msg { margin-top: 12px; font-size: .92rem; }
.msg.ok { color: var(--green); }
.msg.err { color: var(--red); }
.dash-head { margin-bottom: 18px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px;
  border-left: 6px solid var(--line); }
.kpi.green { border-left-color: var(--green); }
.kpi.amber { border-left-color: var(--amber); }
.kpi.red { border-left-color: var(--red); }
.kpi .label { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.kpi .value { font-size: 1.7rem; font-weight: 700; margin-top: 6px; }
.tag { display: inline-block; margin-top: 8px; font-size: .72rem; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; color: #fff; background: var(--muted); }
.tag.green { background: var(--green); }
.tag.amber { background: var(--amber); }
.tag.red { background: var(--red); }
.tag.none { background: var(--muted); }
.footnote { color: var(--muted); font-size: .82rem; margin-top: 24px; }

/* Nav tabs */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--navy-soft); padding: 0 12px; overflow-x: auto; }
.nav .tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.selectors { display: flex; align-items: center; gap: 14px; }
.period-wrap { color: #cdd7e0; font-size: .8rem; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.period { background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 8px; font-size: .85rem; }
.period:disabled { opacity: .5; }
.nav .tab { background: transparent; color: #cdd7e0; border: 0; border-bottom: 3px solid transparent;
  border-radius: 0; padding: 12px 14px; font-weight: 600; white-space: nowrap; }
.nav .tab:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav .tab.active { color: #fff; border-bottom-color: var(--gold); }

/* Tables */
h2 { font-size: 1.1rem; margin: 28px 0 10px; }
table { width: 100%; border-collapse: collapse; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: .9rem; }
th { background: #f0f2f5; color: var(--muted); text-transform: uppercase; font-size: .72rem; letter-spacing: .04em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }

/* Strategic objective cards */
.obj { margin-bottom: 14px; border-left: 6px solid var(--line); }
.obj-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.obj-head h3 { margin: 0; font-size: 1.05rem; }
.small { font-size: .8rem; }

/* ---- B6: charts, dual badges, snapshots, scoreboards ---- */
.subtags { margin-top: 8px; }
.subtag { font-size: .68rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 4px; vertical-align: middle; }
.dot.green{background:var(--green)} .dot.amber{background:var(--amber)} .dot.red{background:var(--red)} .dot.none{background:var(--muted)}
.delta { font-size: .72rem; font-weight: 600; margin-left: 6px; white-space: nowrap; }
.delta.up { color: var(--green); } .delta.down { color: var(--red); } .delta.flat { color: var(--muted); }
.chart-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 14px 0; }
.chart-card h3 { margin: 0 0 10px; font-size: .95rem; }
.chart-wrap { position: relative; height: 280px; }
.below-note { background:#fbf4e6; border-left:4px solid var(--amber); padding:10px 12px; border-radius:8px; font-size:.85rem; margin:14px 0; }
.rocks { background:#eef4fa; border-left:4px solid var(--navy); padding:12px 14px; border-radius:8px; font-size:.9rem; margin:14px 0; }
.rocks ul { margin:6px 0 0; padding-left:18px; } .rocks li { margin:2px 0; }
.clarify { color: var(--muted); font-size: .85rem; margin: 4px 0 12px; }
.snapshot { background:linear-gradient(180deg,#0f2233,#1c3a52); color:#fff; border-radius:12px; padding:18px 20px; margin-bottom:16px; }
.snapshot .s-kicker { font-size:.7rem; text-transform:uppercase; letter-spacing:.06em; color:var(--gold); margin-bottom:6px; }
.snapshot .s-head { font-size:1.15rem; font-weight:700; margin:0 0 8px; }
.snapshot ul { margin:0; padding-left:18px; } .snapshot li { margin:3px 0; font-size:.92rem; color:#dfe7ee; }
.scoreboard { display:flex; gap:10px; flex-wrap:wrap; margin:0 0 12px; }
.score { display:flex; align-items:center; gap:8px; background:var(--card); border:1px solid var(--line); border-radius:10px; padding:8px 14px; font-weight:600; font-size:.9rem; color:var(--muted); }
.score .n { font-size:1.3rem; font-weight:800; } .score.green .n{color:var(--green)} .score.amber .n{color:var(--amber)} .score.red .n{color:var(--red)}
.goal-list { display:flex; flex-direction:column; gap:14px; }
.goal { background:var(--card); border:1px solid var(--line); border-left:6px solid var(--line); border-radius:12px; padding:16px; }
.goal.green{border-left-color:var(--green)} .goal.amber{border-left-color:var(--amber)} .goal.red{border-left-color:var(--red)}
.goal .g-head { display:flex; justify-content:space-between; gap:10px; align-items:baseline; }
.goal .g-title { font-weight:600; font-size:1.02rem; } .goal .g-due { color:var(--muted); font-size:.78rem; white-space:nowrap; }
.goal .g-metrics { display:flex; align-items:flex-end; gap:14px; margin:10px 0 4px; }
.goal .g-metric { display:flex; flex-direction:column; gap:2px; }
.goal .g-label { font-size:.66rem; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); }
.goal .g-now { font-size:1.6rem; font-weight:800; line-height:1; font-variant-numeric:tabular-nums; }
.goal .g-now.green{color:var(--green)} .goal .g-now.amber{color:var(--amber)} .goal .g-now.red{color:var(--red)}
.goal .g-target { font-size:1.6rem; font-weight:800; line-height:1; color:var(--navy); font-variant-numeric:tabular-nums; }
.goal .g-arrow { color:var(--muted); font-size:1.2rem; padding-bottom:2px; }
.goal .g-narr { margin:8px 0 10px; color:var(--ink); font-size:.92rem; line-height:1.4; }
.bar { height:8px; background:#eef0f3; border-radius:999px; margin:10px 0 8px; overflow:hidden; }
.bar > span { display:block; height:100%; border-radius:999px; }
.bar > span.green{background:var(--green)} .bar > span.amber{background:var(--amber)} .bar > span.red{background:var(--red)}
.seg { display:inline-flex; border:1px solid var(--line); border-radius:8px; overflow:hidden; margin:6px 0 2px; }
.seg-btn { background:#fff; color:var(--navy); border:0; border-radius:0; padding:8px 16px; font-weight:600; font-size:.85rem; cursor:pointer; }
.seg-btn.active { background:var(--navy); color:#fff; }
.report-actions { margin:0 0 14px; }
.dl-btn { display:inline-block; background:var(--navy); color:#fff; padding:10px 16px; border-radius:8px; font-weight:600; font-size:.9rem; text-decoration:none; }
.dl-btn:hover { background:var(--navy-soft); }
.pdf-embed { width:100%; height:780px; border:1px solid var(--line); border-radius:10px; background:#e9edf1; }
