/*
 * pinion.css — shared design tokens, layout shell, and sidebar
 *
 * Included by every app page (index, insights, account, admin).
 * Each page's own <style> block contains only that page's
 * component-level CSS and overrides anything here via cascade order.
 *
 * NOT included by the auth pages (login, reset-password, request-account)
 * which have their own self-contained styles.
 */


/* ─────────────────────────────────────────────
   Reset
───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }


/* ─────────────────────────────────────────────
   Design tokens
   Superset of all variables used across any
   app page — unused vars on a given page are
   simply ignored by the browser.
───────────────────────────────────────────── */
:root {
  /* Brand */
  --navy:      #0F1F3D;
  --gold:      #C9A84C;

  /* Surface & text */
  --gray-bg:   #F4F5F7;
  --border:    #E0E2E6;
  --text-sec:  #6B7280;
  --white:     #FFFFFF;

  /* Investment status colours */
  --active-bg: #EAF3DE; --active-tx: #3B6D11;
  --watch-bg:  #FAEEDA; --watch-tx:  #854F0B;
  --exited-bg: #E6F1FB; --exited-tx: #185FA5;
  --off-bg:    #F1EFE8; --off-tx:    #5F5E5A;

  /* Semantic aliases (account/admin pages use ok-* naming) */
  --ok-bg:     #EAF3DE; --ok-tx:     #3B6D11;

  /* Feedback */
  --error:     #991B1B; --error-bg:  #FEF2F2;

  /* Shared primitives */
  --radius:    12px;
  --font:      'Inter', system-ui, sans-serif;
}


/* ─────────────────────────────────────────────
   Base
───────────────────────────────────────────── */
html, body {
  height: 100%;
  font-family: var(--font);
  font-size: 14px;
  color: var(--navy);
  background: var(--gray-bg);
  -webkit-font-smoothing: antialiased;
}


/* ─────────────────────────────────────────────
   App shell
───────────────────────────────────────────── */
.app { display: flex; height: 100vh; overflow: hidden; }


/* ─────────────────────────────────────────────
   Sidebar
───────────────────────────────────────────── */
.sidebar {
  width: 212px;
  flex-shrink: 0;
  background: var(--navy);
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 24px 20px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-decoration: none;
}

/* Georgia with Times New Roman fallback — used consistently across all pages */
.logo-wordmark { font-family: Georgia, 'Times New Roman', serif; font-size: 18px; color: var(--white); }

.sidebar-nav { flex: 1; padding: 16px 0; }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.58);
  text-decoration: none;
  transition: background 0.15s;
}
.nav-item:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.85); }
.nav-item.active { background: rgba(201,168,76,0.14); color: var(--white); font-weight: 500; }
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gold);
  border-radius: 0 2px 2px 0;
}
.nav-item.active .nav-icon { opacity: 1; color: var(--gold); }
.nav-icon { width: 15px; height: 15px; opacity: 0.55; flex-shrink: 0; }

.sidebar-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-user-name  { font-size: 12.5px; color: var(--white); font-weight: 500; margin-bottom: 2px; }
.sidebar-user-email { font-size: 11.5px; color: rgba(255,255,255,0.4); }
.sidebar-office     { font-size: 11px;   color: rgba(255,255,255,0.25); margin-top: 1px; }

.sidebar-footer-actions { display: flex; gap: 6px; margin-top: 10px; }
.footer-btn {
  flex: 1;
  padding: 6px 0;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  color: rgba(255,255,255,0.5);
  font-family: var(--font);
  font-size: 11.5px;
  cursor: pointer;
  transition: background 0.15s;
  text-align: center;
  text-decoration: none;
  display: block;
}
.footer-btn:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.sidebar-copyright { font-size: 10px; color: rgba(255,255,255,0.2); margin-top: 10px; text-align: center; }


/* ─────────────────────────────────────────────
   Main content area
───────────────────────────────────────────── */
.main { flex: 1; overflow-y: auto; padding: 32px 36px; }
.main::-webkit-scrollbar { width: 6px; }
.main::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }


/* ─────────────────────────────────────────────
   Loading skeleton
   Used on index, insights, admin. Harmless on
   pages that don't render skeleton elements.
───────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, #ebebec 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 4px;
  height: 14px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }


/* ─────────────────────────────────────────────
   Cancel button
   Shared by index.html (modal) and admin.html
   (invite modal). Values are identical on both.
───────────────────────────────────────────── */
.btn-cancel {
  padding: 9px 18px;
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-cancel:hover { background: var(--gray-bg); }
