:root {
  /* New-Found Technology Ventures Corp. — colours taken from the logo */
  --nc-accent: #177a34;        /* NF green (buttons, links, active states) */
  --nc-accent-600: #10622a;    /* hover / pressed */
  --nc-lime: #7dc905;          /* highlight green from the N */
  --nc-navy: #14202e;          /* wordmark navy */
  --nc-slate: #314256;         /* the F */
  --nc-globe: #1f78b4;         /* globe blue */
  --nc-ink: #0f1a26;
  --nc-sidebar: #14202e;
  --nc-sidebar-muted: #8c9aab;
  --nc-bg: #f3f6f4;
  --bs-primary: #177a34;
  --bs-primary-rgb: 23, 122, 52;
  --bs-link-color: #177a34;
  --bs-link-color-rgb: 23, 122, 52;
  --bs-link-hover-color: #10622a;
  --bs-link-hover-color-rgb: 16, 98, 42;
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.btn-primary { --bs-btn-bg: var(--nc-accent); --bs-btn-border-color: var(--nc-accent); --bs-btn-hover-bg: var(--nc-accent-600); --bs-btn-hover-border-color: var(--nc-accent-600); --bs-btn-active-bg: #0c4f22; --bs-btn-disabled-bg: var(--nc-accent); --bs-btn-disabled-border-color: var(--nc-accent); }
.btn-outline-primary { --bs-btn-color: var(--nc-accent); --bs-btn-border-color: var(--nc-accent); --bs-btn-hover-bg: var(--nc-accent); --bs-btn-hover-border-color: var(--nc-accent); --bs-btn-active-bg: var(--nc-accent-600); }
.text-accent { color: var(--nc-accent) !important; }
.bg-accent { background: var(--nc-accent) !important; color: #fff; }
.page-link { color: var(--nc-accent); }
.active > .page-link, .page-link.active { background: var(--nc-accent); border-color: var(--nc-accent); }
.form-check-input:checked { background-color: var(--nc-accent); border-color: var(--nc-accent); }
.nav-pills .nav-link.active { background: var(--nc-accent); }
.min-w-0 { min-width: 0; }

body { background: var(--nc-bg); color: var(--nc-ink); }
.card { border: 1px solid #e5e9f0; border-radius: .75rem; }
.card-header { background: #fff; border-bottom-color: #eef1f5; font-weight: 600; }
.table > :not(caption) > * > * { padding: .6rem .75rem; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: #64748b; font-weight: 600; background: #f8fafc; white-space: nowrap; }
.table td { vertical-align: middle; }
.table-card { margin-bottom: 0; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }

/* Admin shell */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 252px; background: var(--nc-sidebar) !important; color: #fff; flex-shrink: 0; }
.admin-sidebar .offcanvas-body, .admin-sidebar .sidebar-nav { background: transparent; }
@media (min-width: 992px) { .admin-sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; } }
.admin-sidebar.offcanvas-lg { --bs-offcanvas-bg: var(--nc-sidebar); --bs-offcanvas-width: 260px; }
.sidebar-brand { padding: 1.1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.06); }
.sidebar-nav { padding: .5rem .5rem 2rem; width: 100%; }
.nav-group-label { color: var(--nc-sidebar-muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; padding: 1rem .75rem .35rem; }
.sidebar-nav .nav-link { color: #cbd5e1; border-radius: .5rem; padding: .45rem .75rem; display: flex; align-items: center; gap: .65rem; font-size: .92rem; }
.sidebar-nav .nav-link i { font-size: 1rem; opacity: .85; width: 1.1rem; margin-right: .15rem; }
.sidebar-nav .nav-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar-nav .nav-link.active { color: #fff; background: var(--nc-accent); }
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar { background: #fff; border-bottom: 1px solid #e5e9f0; padding: .6rem 1.25rem; position: sticky; top: 0; z-index: 1020; }
.admin-content { padding: 1.5rem 1.25rem 3rem; }
@media (min-width: 1200px) { .admin-content { padding: 1.75rem 2rem 3rem; } }

.stat-card .stat-icon { width: 44px; height: 44px; border-radius: .65rem; display: grid; place-items: center; font-size: 1.25rem; flex-shrink: 0; }

/* Member portal */
.member-nav { background: #fff; border-bottom: 1px solid #e5e9f0; }
.member-nav .nav-link { color: #475569; font-size: .92rem; }
.member-nav .nav-link.active, .member-nav .nav-link:hover { color: var(--nc-accent); }
.hero-card { background: linear-gradient(120deg, var(--nc-navy) 0%, #183a2a 55%, var(--nc-accent) 100%); color: #fff; border: 0; position: relative; overflow: hidden; }
.hero-card::after { content: ''; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; border: 18px solid rgba(125, 201, 5, .18); pointer-events: none; }
.hero-card .text-muted { color: rgba(255,255,255,.75) !important; }
.product-card img, .product-thumb { aspect-ratio: 1 / 1; object-fit: cover; background: #eef2f5; }
.product-placeholder { aspect-ratio: 1 / 1; display: grid; place-items: center; background: linear-gradient(135deg,#e6f3f1,#f4f6f9); color: var(--nc-accent); font-size: 2.5rem; border-radius: .75rem .75rem 0 0; }

/* Auth */
.auth-body { background: radial-gradient(1200px 600px at 10% 0%, #d7efe9 0%, transparent 60%), var(--nc-bg); }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card.wide { max-width: 760px; }

/* Genealogy tree */
.tree { overflow-x: auto; padding-bottom: 1rem; }
.tree ul { padding-top: 18px; position: relative; display: flex; justify-content: center; margin: 0; padding-left: 0; }
.tree li { list-style: none; text-align: center; position: relative; padding: 18px 6px 0; flex: 1 1 0; min-width: 130px; }
.tree li::before, .tree li::after { content: ''; position: absolute; top: 0; right: 50%; border-top: 1px solid #cbd5e1; width: 50%; height: 18px; }
.tree li::after { right: auto; left: 50%; border-left: 1px solid #cbd5e1; }
.tree li:only-child::after, .tree li:only-child::before { display: none; }
.tree li:only-child { padding-top: 0; }
.tree li:first-child::before, .tree li:last-child::after { border: 0 none; }
.tree li:last-child::before { border-right: 1px solid #cbd5e1; border-radius: 0 5px 0 0; }
.tree li:first-child::after { border-radius: 5px 0 0 0; }
.tree ul ul::before { content: ''; position: absolute; top: 0; left: 50%; border-left: 1px solid #cbd5e1; height: 18px; }
.tree .node { display: inline-block; background: #fff; border: 1px solid #dbe2ea; border-radius: .6rem; padding: .45rem .6rem; font-size: .78rem; min-width: 118px; }
.tree .node a { text-decoration: none; }
.tree .node.empty { border-style: dashed; color: #94a3b8; background: transparent; }
.tree .node.CAPPED { border-color: #f59e0b; }
.tree .node.SUSPENDED, .tree .node.INACTIVE { opacity: .6; }

/* Print */
.print-body { background: #fff; }
.receipt { max-width: 760px; margin: 0 auto; }
.code-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.code-sheet .code-card { border: 1px dashed #94a3b8; border-radius: .5rem; padding: .75rem; page-break-inside: avoid; }
@media print {
  .admin-sidebar, .admin-topbar, .member-nav, footer, .d-print-none { display: none !important; }
  body { background: #fff; }
}
.table a, .list-group a.text-decoration-none { text-decoration: none; }
.member-nav .nav-link { white-space: nowrap; }
@media (min-width: 1400px) { .member-nav .nav-link { padding-left: .55rem; padding-right: .55rem; } }
.tree a.node.slot-link { color: var(--nc-accent); border-color: currentColor; text-decoration: none; background: #f1f9ec; }
.tree a.node.slot-link:hover, .tree a.node.slot-link:focus { background: #dff1cf; }

/* Branding */
.brand-tile { display: inline-flex; align-items: center; gap: .6rem; background: #fff; border-radius: .6rem; padding: .35rem .65rem; text-decoration: none; }
.brand-tile img { height: 30px; width: auto; }
.brand-tile .brand-name { color: var(--nc-navy); font-weight: 700; letter-spacing: .02em; font-size: .95rem; line-height: 1.05; }
.brand-tile .brand-name small { display: block; color: var(--nc-accent); font-weight: 600; font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; }
.member-nav .navbar-brand img { height: 34px; width: auto; }
.member-nav .navbar-brand .brand-name { color: var(--nc-navy); font-weight: 700; letter-spacing: .02em; }
.member-nav { border-top: 3px solid var(--nc-accent); }
.auth-logo { display: block; width: min(260px, 70%); height: auto; margin: 0 auto 1.25rem; }
.auth-body { background: radial-gradient(1200px 600px at 100% 0%, rgba(125, 201, 5, .12), transparent 60%), radial-gradient(900px 500px at 0% 100%, rgba(31, 120, 180, .10), transparent 60%), var(--nc-bg); }
.print-logo { height: 46px; width: auto; flex-shrink: 0; }
.sidebar-nav .nav-link.active { box-shadow: inset 3px 0 0 var(--nc-lime); }
.admin-topbar { border-top: 3px solid var(--nc-accent); }
