/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #060b14;
  color: #e2e8f0;
  min-height: 100vh;
  overflow-x: hidden;
}
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select {
  font-family: inherit;
  background: #1a2235;
  border: 1.5px solid #2a3448;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
}
input:focus, textarea:focus, select:focus { border-color: #22c55e; }
select option { background: #1a2235; }
a { color: #22c55e; text-decoration: none; }

/* ── CSS Variables ───────────────────────────────────────────── */
:root {
  --green:   #22c55e;
  --green-d: #16a34a;
  --green-bg: rgba(34,197,94,.12);
  --blue:    #3b82f6;
  --blue-bg: rgba(59,130,246,.12);
  --purple:  #a855f7;
  --purple-bg: rgba(168,85,247,.12);
  --gold:    #f59e0b;
  --gold-bg: rgba(245,158,11,.12);
  --teal:    #06b6d4;
  --teal-bg: rgba(6,182,212,.12);
  --red:     #ef4444;
  --red-bg:  rgba(239,68,68,.12);
  --orange:  #f97316;
  --orange-bg: rgba(249,115,22,.12);
  --lime:    #84cc16;
  --lime-bg: rgba(132,204,22,.12);
  --card-bg: #0d1526;
  --card-border: #1e2d45;
  --sidebar-w: 220px;
  --topbar-h: 60px;
  --radius: 12px;
  --radius-sm: 8px;
}

/* ── LOGIN ─────────────────────────────────────────────────────── */
.login-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  background: #060b14;
}
.login-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 30% 20%, rgba(34,197,94,.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 70% 80%, rgba(59,130,246,.06) 0%, transparent 70%);
  pointer-events: none;
}
.login-card {
  position: relative;
  background: #0d1526;
  border: 1.5px solid #1e2d45;
  border-radius: 20px;
  padding: 48px 48px 44px;
  width: 420px;
  max-width: 95vw;
  box-shadow: 0 40px 80px rgba(0,0,0,.6);
  animation: slideUp .4s ease;
}
@keyframes slideUp {
  from { opacity:0; transform: translateY(20px); }
  to   { opacity:1; transform: translateY(0); }
}
.login-logo {
  display: block;
  height: 60px;
  width: auto;
  margin: 0 auto 24px;
}
.login-title {
  font-size: 1.5rem; font-weight: 800;
  text-align: center; margin-bottom: 6px;
  background: linear-gradient(135deg, #e2e8f0, #94a3b8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.login-sub {
  font-size: .82rem; color: #475569;
  text-align: center; margin-bottom: 32px;
  letter-spacing: .04em; text-transform: uppercase;
}
.login-form { display: flex; flex-direction: column; gap: 16px; }
.field-group label {
  display: block; font-size: .78rem; font-weight: 600;
  color: #64748b; letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 7px;
}
.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; padding-right: 42px; }
#pw-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: #475569; font-size: 1rem;
  transition: color .2s;
}
#pw-toggle:hover { color: #94a3b8; }
.login-error {
  background: var(--red-bg);
  border: 1px solid rgba(239,68,68,.3);
  color: #fca5a5;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .85rem;
}
.owner-picker {
  display: flex; gap: 8px;
}
.owner-pick-btn {
  flex: 1; padding: 10px 8px;
  border-radius: 10px;
  border: 1.5px solid #1e2d45;
  background: #0d1829;
  color: #475569; font-size: .9rem; font-weight: 600;
  transition: border-color .15s, color .15s, background .15s;
  cursor: pointer;
}
.owner-pick-btn:hover {
  border-color: #2a3f5a;
  color: #94a3b8;
  background: #111d30;
}
.owner-pick-btn.active {
  border-color: #22c55e !important;
  color: #22c55e !important;
  background: rgba(34,197,94,.15) !important;
}

.btn-login {
  background: var(--green);
  color: #000;
  font-weight: 700;
  font-size: .95rem;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .2s, transform .1s;
  margin-top: 4px;
}
.btn-login:hover { background: #16a34a; }
.btn-login:active { transform: scale(.98); }

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

/* ── SIDEBAR ─────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: #0a1120;
  border-right: 1px solid #1a2438;
  display: flex; flex-direction: column;
  height: 100vh;
  flex-shrink: 0;
  transition: transform .3s;
  z-index: 50;
}
.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid #1a2438;
}
.sidebar-logo img {
  height: 44px; width: auto;
  display: block;
}
.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex; flex-direction: column; gap: 3px;
  overflow-y: auto;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px;
  border-radius: 8px;
  font-size: .88rem; font-weight: 500;
  color: #64748b;
  transition: all .15s;
  text-align: left; width: 100%;
}
.nav-item i { font-size: 1.1rem; flex-shrink: 0; }
.nav-item:hover { background: #1a2438; color: #94a3b8; }
.nav-item.active { background: var(--green-bg); color: var(--green); font-weight: 600; }
.nav-item.active i { color: var(--green); }
.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid #1a2438;
  display: flex; align-items: center; gap: 8px;
}
.owner-chip {
  flex: 1; display: flex; align-items: center; gap: 9px;
  overflow: hidden;
}
.owner-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; flex-shrink: 0;
}
#owner-name-sidebar { font-size: .82rem; font-weight: 600; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-upload-row {
  padding: 0 10px 10px;
}
.btn-upload-financial {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 9px 13px;
  border-radius: 8px; font-size: .88rem; font-weight: 500;
  color: #64748b;
  transition: all .15s;
}
.btn-upload-financial:hover { background: #1a2438; color: #94a3b8; }
.btn-upload-financial i { font-size: 1.1rem; flex-shrink: 0; }
.btn-signout {
  color: #475569; font-size: 1rem; padding: 6px; border-radius: 6px;
  transition: color .2s, background .2s; flex-shrink: 0;
}
.btn-signout:hover { color: var(--red); background: var(--red-bg); }

/* ── TOPBAR ──────────────────────────────────────────────────────── */
.main {
  flex: 1; display: flex; flex-direction: column;
  height: 100vh; overflow: hidden;
}
.topbar {
  height: var(--topbar-h);
  background: #0a1120;
  border-bottom: 1px solid #1a2438;
  display: flex; align-items: center;
  padding: 0 24px; gap: 16px;
  flex-shrink: 0;
}
.topbar-menu {
  color: #64748b; font-size: 1.3rem;
  padding: 6px; border-radius: 6px;
  display: none;
  transition: color .2s;
}
.topbar-menu:hover { color: #e2e8f0; }
.topbar-title {
  font-size: 1rem; font-weight: 700; color: #e2e8f0;
  flex: 1;
}
.topbar-owner {
  font-size: .82rem; color: #475569;
}

/* ── VIEWS ───────────────────────────────────────────────────────── */
.view {
  display: none;
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 24px 24px 40px;
  scroll-behavior: smooth;
}
.view.active { display: block; }
.view-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.view-header h2 {
  font-size: 1.6rem; font-weight: 800;
  background: linear-gradient(135deg, #e2e8f0, #94a3b8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.view-sub { font-size: .85rem; color: #475569; margin-top: 3px; }
.view-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── OVERVIEW HEADER META ────────────────────────────────────────── */
.overview-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 5px;
}
.header-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 11px; border-radius: 99px;
  font-size: .78rem; font-weight: 600;
  border: 1.5px solid;
  white-space: nowrap;
}
.pill-team  { background: var(--blue-bg);  color: var(--blue);  border-color: rgba(59,130,246,.25); }
.pill-years { background: var(--teal-bg);  color: var(--teal);  border-color: rgba(6,182,212,.25); }

/* ── KPI STRIP ──────────────────────────────────────────────────── */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.kpi-card {
  background: #0d1526;
  border: 1.5px solid #1e2d45;
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  display: flex; align-items: flex-start; gap: 14px;
  transition: transform .2s, border-color .2s;
  position: relative; overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.kpi-card:hover { transform: translateY(-2px); }
.kpi-green::before { background: var(--green); }
.kpi-blue::before  { background: var(--blue); }
.kpi-purple::before { background: var(--purple); }
.kpi-gold::before  { background: var(--gold); }
.kpi-teal::before   { background: var(--teal); }
.kpi-orange::before { background: var(--orange); }
.kpi-lime::before   { background: var(--lime); }
.kpi-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.kpi-green .kpi-icon { background: var(--green-bg); color: var(--green); }
.kpi-blue .kpi-icon  { background: var(--blue-bg);  color: var(--blue); }
.kpi-purple .kpi-icon { background: var(--purple-bg); color: var(--purple); }
.kpi-gold .kpi-icon  { background: var(--gold-bg);  color: var(--gold); }
.kpi-teal .kpi-icon   { background: var(--teal-bg);   color: var(--teal); }
.kpi-orange .kpi-icon { background: var(--orange-bg); color: var(--orange); }
.kpi-lime .kpi-icon   { background: var(--lime-bg);   color: var(--lime); }
.kpi-label { font-size: .75rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.kpi-value { font-size: 1.35rem; font-weight: 800; color: #f1f5f9; line-height: 1; margin-bottom: 5px; }
.kpi-delta { font-size: .72rem; color: #475569; line-height: 1.4; }
.kpi-delta .up   { color: var(--green); }
.kpi-delta .down { color: var(--red); }
.kpi-delta.up   { color: var(--green); }
.kpi-delta.down { color: var(--red); }

/* ── CHARTS ──────────────────────────────────────────────────────── */
.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.charts-row-equal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.chart-card {
  background: #0d1526;
  border: 1.5px solid #1e2d45;
  border-radius: var(--radius);
  padding: 22px 22px 18px;
}
.chart-card-wide { grid-column: span 2; }
.chart-card-header { margin-bottom: 16px; }
.chart-card-title { font-size: .95rem; font-weight: 700; color: #e2e8f0; display: flex; align-items: center; gap: 8px; }
.chart-card-title i { color: var(--green); }
.chart-card-sub { font-size: .78rem; color: #475569; margin-top: 4px; }
.chart-wrap { position: relative; height: 240px; }
.chart-wrap-sm { height: 220px; }

/* ── EXPENSE LIST ────────────────────────────────────────────────── */
.expense-list { display: flex; flex-direction: column; gap: 6px; }
.expense-group-header {
  display: flex; align-items: center; gap: 6px;
  font-size: .68rem; font-weight: 700; color: #3a4e6a;
  text-transform: uppercase; letter-spacing: .07em;
  padding: 8px 0 3px;
  border-bottom: 1px solid #131f35;
  margin-top: 4px;
}
.expense-group-header:first-child { margin-top: 0; padding-top: 2px; }
.expense-group-header i { font-size: .78rem; color: #2a3f5a; }
.expense-row {
  display: flex; align-items: center; gap: 10px; padding: 1px 0;
}
.expense-name { font-size: .81rem; color: #94a3b8; flex: 1; }
.expense-bar-wrap { flex: 2; background: #1a2438; border-radius: 99px; height: 5px; overflow: hidden; }
.expense-bar { height: 100%; border-radius: 99px; background: var(--green); transition: width .6s ease; }
.expense-val { font-size: .81rem; font-weight: 600; color: #e2e8f0; text-align: right; min-width: 80px; }

/* ── PDF QUICK VIEW MODAL ─────────────────────────────────────────── */
.pdf-preview-card {
  width: 88vw; max-width: 1100px;
  height: 88vh; max-height: 88vh;
}
.pdf-preview-body {
  flex: 1; display: flex; overflow: hidden;
  border-radius: 0 0 16px 16px;
}
.pdf-preview-body iframe {
  width: 100%; height: 100%; border: none;
  border-radius: 0 0 16px 16px;
  background: #fff;
}

/* ── QUICK STATS GRID ────────────────────────────────────────────── */
.quick-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.qs-section-header {
  grid-column: span 2;
  font-size: .72rem; font-weight: 700; color: #475569;
  text-transform: uppercase; letter-spacing: .07em;
  padding: 10px 2px 6px;
  border-bottom: 1px solid #1a2438;
  margin-top: 6px;
  display: flex; align-items: center; gap: 7px;
}
.qs-section-header:first-child { margin-top: 0; padding-top: 4px; }
.qs-section-header i { color: var(--green); font-size: .85rem; }
.qs-section-header .qs-through {
  margin-left: auto;
  font-size: .65rem; font-weight: 700;
  background: var(--orange-bg); color: var(--orange);
  padding: 2px 9px; border-radius: 99px;
  text-transform: uppercase; letter-spacing: .04em;
}
.qs-card {
  background: #111d30;
  border: 1px solid #1e2d45;
  border-radius: 10px;
  padding: 13px 15px;
}
.qs-card.qs-ytd {
  border-color: rgba(249,115,22,.2);
  background: linear-gradient(135deg, #111d30, #1a1408);
}
.qs-card.qs-positive { border-color: rgba(34,197,94,.2); }
.qs-card.qs-negative { border-color: rgba(239,68,68,.2); }
.qs-label { font-size: .7rem; color: #475569; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.qs-value { font-size: 1.1rem; font-weight: 700; color: #e2e8f0; }
.qs-sub   { font-size: .72rem; color: #64748b; margin-top: 3px; }
.qs-delta { font-size: .72rem; margin-top: 3px; font-weight: 600; }
.qs-delta.up   { color: var(--green); }
.qs-delta.down { color: var(--red); }
.qs-no-data { color: #2a3448 !important; font-style: italic; font-size: .85rem !important; }

/* ── Revenue Mix 2-chart layout ─────────────────────────────────── */
.mix-charts-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px;
}
.mix-chart-label {
  font-size: .68rem; font-weight: 700; color: #475569;
  text-transform: uppercase; letter-spacing: .07em;
  margin-bottom: 6px; display: flex; align-items: center; gap: 5px;
}
.mix-chart-label i { color: var(--green); }

/* ── Revenue Mix Legend ──────────────────────────────────────────── */
.mix-legend {
  padding: 12px 4px 2px;
  display: flex; flex-direction: column; gap: 6px;
}
.mix-legend-row {
  display: flex; align-items: center; gap: 8px;
}
.mix-legend-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}
.mix-legend-name {
  flex: 1; font-size: .76rem; color: #64748b;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mix-legend-pct {
  font-size: .76rem; color: #94a3b8; font-weight: 700;
  min-width: 38px; text-align: right;
}
.mix-legend-val {
  font-size: .74rem; color: #e2e8f0; font-weight: 600;
  min-width: 68px; text-align: right;
}
.mix-legend-val-2026 {
  font-size: .74rem; color: var(--blue); font-weight: 600;
  min-width: 68px; text-align: right;
}
.mix-legend-pct-2026 {
  font-size: .74rem; color: #6b8aaa; font-weight: 700;
  min-width: 38px; text-align: right;
}

/* ── Distribution Paid Checkbox ─────────────────────────────────── */
.dist-paid-btn {
  margin-top: 10px;
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: .72rem; font-weight: 600;
  border: 1.5px solid #2a3448;
  color: #475569;
  background: transparent;
  cursor: pointer;
  transition: all .15s;
  width: 100%;
  justify-content: center;
}
.dist-paid-btn:hover { border-color: #3a4e6a; color: #94a3b8; }
.dist-paid-btn.paid {
  border-color: rgba(34,197,94,.4);
  background: rgba(34,197,94,.08);
  color: var(--green);
}
.dist-paid-btn.paid:hover { background: rgba(34,197,94,.15); }
.bonus-month.paid-month {
  border-color: rgba(34,197,94,.25) !important;
}
.bonus-month.paid-month .bonus-month-name { color: var(--green); }

/* ── TEAM ────────────────────────────────────────────────────────── */
.filter-tabs { display: flex; gap: 5px; }
.filter-tab {
  padding: 6px 14px;
  border-radius: 99px;
  font-size: .8rem; font-weight: 600;
  color: #64748b;
  border: 1.5px solid #1e2d45;
  background: transparent;
  transition: all .15s;
}
.filter-tab:hover { color: #94a3b8; border-color: #2a3448; }
.filter-tab.active { background: var(--green-bg); color: var(--green); border-color: rgba(34,197,94,.3); }
.sort-tabs { display: flex; gap: 3px; }
.sort-tab {
  width: 32px; height: 32px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; color: #64748b;
  border: 1.5px solid #1e2d45;
  background: transparent;
  transition: all .15s; position: relative;
}
.sort-tab:hover { color: #94a3b8; border-color: #2a3448; }
.sort-tab.active { background: var(--green-bg); color: var(--green); border-color: rgba(34,197,94,.3); }
.sort-tab .sort-dir {
  position: absolute; bottom: 1px; right: 2px;
  font-size: .5rem; line-height: 1;
}

.employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.emp-card {
  background: #0d1526;
  border: 1.5px solid #1e2d45;
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer;
  transition: all .2s;
  position: relative;
}
.emp-card:hover { border-color: #2a3f5a; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.emp-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.emp-avatar {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800; flex-shrink: 0;
  background: var(--green-bg); color: var(--green);
}
.emp-avatar.ft  { background: var(--blue-bg); color: var(--blue); }
.emp-avatar.ct  { background: var(--purple-bg); color: var(--purple); }
.emp-avatar.pt  { background: var(--purple-bg); color: var(--purple); }
.emp-info { flex: 1; min-width: 0; }
.emp-name { font-size: 1rem; font-weight: 700; color: #e2e8f0; }
.emp-title { font-size: .78rem; color: #64748b; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emp-badge {
  font-size: .68rem; font-weight: 600;
  padding: 2px 9px; border-radius: 99px;
  letter-spacing: .04em; text-transform: uppercase;
}
.badge-ft    { background: var(--blue-bg);   color: var(--blue); }
.badge-ct    { background: var(--purple-bg); color: var(--purple); }
.badge-pt    { background: var(--purple-bg); color: var(--purple); }
.badge-sp    { background: var(--teal-bg);   color: var(--teal); }
.badge-owner { background: rgba(239,68,68,.12); color: #f87171; border: 1px solid rgba(239,68,68,.25); }
.emp-avatar.sp    { background: var(--teal-bg);  color: var(--teal); }
.emp-avatar.owner { background: rgba(239,68,68,.12); color: #f87171; }

/* Team filter select */
.team-filter-select {
  padding: 6px 12px; border-radius: 8px;
  font-size: .82rem; font-weight: 600;
  border: 1.5px solid #1e2d45;
  background: #0d1526; color: #94a3b8;
  cursor: pointer; transition: border-color .15s;
}
.team-filter-select:focus { border-color: var(--green); outline: none; }
.team-filter-select option { background: #0d1526; }

/* Team section headers */
.team-section-header {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 8px;
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: #334155;
  padding: 6px 0 4px;
  border-bottom: 1px solid #131f35;
  margin-top: 6px;
}
.team-section-header:first-child { margin-top: 0; }
.team-section-header i { font-size: .85rem; color: #2a3d55; }

/* Salary toggle button */
.salary-toggle {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px;
  border: 1.5px solid #1e2d45; color: #475569;
  background: transparent; font-size: .82rem; font-weight: 600;
  transition: all .15s; flex-shrink: 0; white-space: nowrap;
}
.salary-toggle:hover { color: #94a3b8; border-color: #2a3448; }
.salary-toggle.active { color: var(--green); border-color: rgba(34,197,94,.3); background: var(--green-bg); }
.salary-toggle i { font-size: 1rem; }

/* Avatar upload overlay */
/* Team page photos — black & white */
.emp-photo,
.tl-photo,
.tl-face-img {
  filter: none;
  transition: filter .35s ease;
}

.emp-avatar-wrap {
  position: relative; flex-shrink: 0; display: flex; cursor: pointer;
}
.emp-avatar-upload-overlay {
  position: absolute; inset: 0; border-radius: 12px;
  background: rgba(0,0,0,.55); display: flex; align-items: center;
  justify-content: center; opacity: 0; transition: opacity .15s;
  color: #fff; font-size: .9rem;
}
.emp-avatar-wrap:hover .emp-avatar-upload-overlay { opacity: 1; }

/* Owner distribution cards in Ownership Hub */
.owner-dist-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.owner-dist-card {
  background: #0d1526;
  border: 1.5px solid #1e2d45;
  border-radius: var(--radius);
  padding: 18px 20px;
}
.owner-dist-name { font-size: .88rem; font-weight: 700; color: #e2e8f0; margin-bottom: 4px; }
.owner-dist-total { font-size: 1.4rem; font-weight: 800; color: var(--gold); line-height: 1; margin-bottom: 4px; }
.owner-dist-sub { font-size: .72rem; color: #475569; }
.emp-bottom { display: flex; align-items: center; justify-content: space-between; }
.emp-salary { font-size: 1.05rem; font-weight: 700; color: var(--green); }
.emp-meta   { font-size: .75rem; color: #475569; }

.team-timeline {
  margin-top: 32px;
  background: #0d1526;
  border: 1.5px solid #1e2d45;
  border-radius: var(--radius);
  padding: 24px 24px 12px;
  overflow: hidden;
}
.tl-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.tl-header h3 { font-size: 1.1rem; font-weight: 700; color: #e2e8f0; }
.tl-header p  { font-size: .82rem; color: #475569; margin-top: 4px; }
.tl-controls {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.tl-zoom-btn {
  width: 30px; height: 30px; border-radius: 7px;
  border: 1.5px solid #1e2d45; background: #111d30;
  color: #64748b; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.tl-zoom-btn:hover { color: #e2e8f0; border-color: #2a3448; }
.tl-zoom-label {
  font-size: .78rem; font-weight: 700; color: #64748b;
  min-width: 28px; text-align: center;
}
.tl-today-badge {
  font-size: .78rem; color: #94a3b8; background: #111d30;
  border: 1px solid #1a2438; border-radius: 99px; padding: 6px 14px; white-space: nowrap;
}

/* Scroll wrapper — draggable */
.tl-scroll-wrap {
  overflow-x: auto; overflow-y: visible;
  padding: 20px 48px 20px;
  cursor: grab;
  user-select: none;
}
.tl-scroll-wrap::-webkit-scrollbar { height: 5px; }
.tl-scroll-wrap::-webkit-scrollbar-thumb { background: #1e2d45; border-radius: 99px; }

/* Canvas — fills container at 1x, grows on zoom */
.tl-canvas {
  position: relative;
  width: 100%;
  min-width: 100%;
  height: 240px;
  transition: none;
}

/* All nodes absolutely placed */
.tl-nodes-layer { position: absolute; inset: 0; }

/* Axis sits at vertical center */
.tl-axis {
  position: absolute;
  left: 0; right: 0;
  top: 50%; transform: translateY(-50%);
  height: 40px;
  display: flex; align-items: center;
}
.tl-axis-line {
  position: absolute; left: 0; right: 22px; height: 3px;
  background: linear-gradient(to right, rgba(34,197,94,.9), rgba(34,197,94,.25));
  border-radius: 99px;
}
.tl-axis-cap {
  position: absolute; right: 0;
  color: var(--green); font-size: .95rem;
  display: flex; align-items: center;
}

/* Year markers — more prominent */
.tl-yr {
  position: absolute; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  bottom: 0;
  pointer-events: none;
}
.tl-yr-tick {
  width: 1px; height: 10px;
  background: #4a6080;
}
.tl-yr span {
  font-size: .72rem; font-weight: 700; color: #94a3b8;
  margin-top: 3px; white-space: nowrap; letter-spacing: .04em;
}

/* Node */
.tl-node {
  position: absolute;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  width: 56px;
  z-index: 2;
}
.tl-top {
  top: 0;
  flex-direction: column;
  height: 50%;
  justify-content: flex-start;
}
.tl-bottom {
  bottom: 0;
  flex-direction: column-reverse;
  height: 50%;
  justify-content: flex-start;
}

.tl-face-wrap {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.tl-face {
  width: 46px; height: 46px; border-radius: 50%;
  border: 2.5px solid #1e2d45;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  background: #111d30;
  flex-shrink: 0;
}
.tl-face-img {
  width: 46px; height: 46px;
  object-fit: cover; object-position: top;
  border-radius: 50%;
  display: block;
}
.tl-face-init {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 800;
}
.tl-launch-face {
  background: var(--gold-bg); color: var(--gold);
  font-size: 1.2rem; border-color: rgba(245,158,11,.5);
}
.tl-node:hover .tl-face {
  border-color: var(--green);
  transform: scale(1.15);
  box-shadow: 0 0 0 4px rgba(34,197,94,.15), 0 4px 16px rgba(0,0,0,.4);
  z-index: 10;
}

.tl-connector {
  width: 2px; flex: 1; min-height: 6px;
  background: #1e2d45;
  transition: background .2s;
}
.tl-node:hover .tl-connector { background: rgba(34,197,94,.4); }

.tl-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #1a2d45; border: 2px solid #2a4060;
  flex-shrink: 0;
  transition: background .2s, border-color .2s, transform .2s;
}
.tl-dot-launch { background: var(--gold); border-color: rgba(245,158,11,.6); }
.tl-node:hover .tl-dot { background: var(--green); border-color: var(--green); transform: scale(1.3); }

/* Tooltip — exact date, no title */
.tl-tooltip {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  background: #0a1120;
  border: 1.5px solid #1e2d45;
  border-radius: 10px; padding: 9px 14px;
  display: flex; flex-direction: column; gap: 3px;
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .15s;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,.6);
  min-width: 160px;
}
.tl-top .tl-tooltip    { top: 52px; }
.tl-bottom .tl-tooltip { bottom: 52px; }
.tl-tooltip strong { font-size: .85rem; font-weight: 700; color: #e2e8f0; }
.tl-tooltip span   { font-size: .75rem; color: #64748b; }
.tl-node:hover .tl-tooltip { opacity: 1; }
.tl-node:hover { z-index: 100; }


/* ── DOCUMENTS ─────────────────────────────────────────────────── */
.docs-filter-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.docs-search-wrap {
  position: relative; margin-bottom: 16px;
}
.docs-search-wrap i {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: #475569; font-size: 1rem; pointer-events: none;
}
#docs-search {
  width: 100%; padding: 10px 14px 10px 38px;
  background: #0d1526;
  border: 1.5px solid #1e2d45;
  border-radius: 10px;
  color: #e2e8f0; font-size: .88rem;
  transition: border-color .2s;
}
#docs-search:focus { border-color: var(--green); outline: none; }
#docs-search::placeholder { color: #334155; }
.docs-grid { display: flex; flex-direction: column; gap: 10px; }
.doc-card {
  background: #0d1526; border: 1.5px solid #1e2d45;
  border-radius: var(--radius); padding: 16px 20px;
  display: flex; align-items: center; gap: 16px;
  transition: border-color .2s;
}
.doc-card:hover { border-color: #2a3f5a; }
.doc-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.doc-info { flex: 1; min-width: 0; }
.doc-name { font-size: .95rem; font-weight: 600; color: #e2e8f0; display: flex; align-items: center; gap: 6px; }
.doc-rename-btn {
  flex-shrink: 0; background: none; border: none; cursor: pointer;
  color: #334155; font-size: .8rem; padding: 2px 4px; border-radius: 4px;
  transition: color .15s;
}
.doc-rename-btn:hover { color: var(--green); }
.doc-meta { font-size: .75rem; color: #475569; margin-top: 3px; }
.doc-uploader { font-size: .72rem; color: #334155; margin-top: 2px; }
.doc-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Upload dropzone */
.upload-dropzone {
  border: 2px dashed #1e2d45; border-radius: 10px;
  padding: 32px 20px; text-align: center;
  cursor: pointer; color: #475569;
  transition: border-color .2s, background .2s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.upload-dropzone i { font-size: 2rem; color: #334155; }
.upload-dropzone:hover, .upload-dropzone.drag-over {
  border-color: var(--green); background: var(--green-bg);
}
.upload-filename { font-size: .82rem; color: var(--green); font-weight: 600; }
.upload-progress-bar {
  background: #111d30; border-radius: 99px; height: 6px; overflow: hidden; margin-top: 8px;
}
.upload-progress-fill {
  height: 100%; border-radius: 99px;
  background: var(--green); transition: width .3s ease;
}
.upload-progress-label { font-size: .75rem; color: #64748b; margin-top: 6px; text-align: center; }


/* ── EMPLOYEE MODAL ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.75);
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
  backdrop-filter: blur(4px);
  animation: fadeIn .2s;
}
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.modal-card {
  background: #0d1526;
  border: 1.5px solid #1e2d45;
  border-radius: 18px;
  width: 680px;
  max-width: 95vw;
  max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 40px 80px rgba(0,0,0,.6);
  animation: slideUp .25s ease;
}
.modal-lg { width: 780px; }

/* Bulk Edit */
.bulk-edit-card { width: 900px; max-width: 96vw; }
.bulk-edit-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.bulk-edit-table thead tr { background: #0d1526; position: sticky; top: 0; z-index: 1; }
.bulk-edit-table th { padding: 10px 14px; text-align: left; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #64748b; border-bottom: 1px solid #1e2d45; white-space: nowrap; }
.bulk-edit-table td { padding: 7px 10px; border-bottom: 1px solid #131f33; vertical-align: middle; }
.bulk-edit-table tbody tr:hover td { background: rgba(255,255,255,.025); }
.bulk-edit-table td:first-child { font-weight: 600; color: #e2e8f0; }
.be-input { background: #0d1526; border: 1px solid #1e2d45; border-radius: 6px; color: #e2e8f0; padding: 5px 9px; font-size: .82rem; font-family: inherit; width: 100%; min-width: 0; transition: border-color .15s; }
.be-input:focus { border-color: var(--green); outline: none; }
.be-select { background: #0d1526; border: 1px solid #1e2d45; border-radius: 6px; color: #e2e8f0; padding: 5px 8px; font-size: .82rem; font-family: inherit; width: 100%; cursor: pointer; }
.be-select:focus { border-color: var(--green); outline: none; }
.be-sep-wrap { display: flex; align-items: center; justify-content: center; gap: 8px; }
.be-sep-wrap input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--purple); cursor: pointer; flex-shrink: 0; }
.be-sep-amt { background: #0d1526; border: 1px solid #1e2d45; border-radius: 6px; color: #94a3b8; padding: 5px 9px; font-size: .78rem; font-family: inherit; width: 80px; text-align: right; }
.be-sep-amt.active { color: var(--purple); border-color: rgba(168,85,247,.35); }
.modal-sm { width: 420px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #1a2438;
  flex-shrink: 0;
}
.modal-title { font-size: 1.1rem; font-weight: 700; color: #e2e8f0; }
.modal-close {
  color: #475569; font-size: 1.1rem; padding: 6px; border-radius: 6px;
  transition: color .2s;
}
.modal-close:hover { color: #e2e8f0; }
.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid #1a2438;
  flex-shrink: 0;
}
.modal-footer-right { display: flex; gap: 10px; }

/* ── MODAL FORM ──────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-col-2 { grid-column: span 2; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label {
  font-size: .75rem; font-weight: 600;
  color: #64748b; text-transform: uppercase; letter-spacing: .05em;
}
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
}
.form-field textarea { resize: vertical; min-height: 80px; }
.comp-support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.comp-support-grid .form-col-2 { grid-column: span 2; }

.form-section-title {
  grid-column: span 2;
  font-size: .78rem; font-weight: 700;
  color: #475569; text-transform: uppercase; letter-spacing: .07em;
  padding-bottom: 8px; border-bottom: 1px solid #1a2438;
  margin-top: 8px;
}

/* ── RAISE & BONUS HISTORY TABLES ───────────────────────────────── */
.history-table-wrap { margin-bottom: 6px; overflow-x: auto; }
.history-edit-table {
  width: 100%; border-collapse: collapse; font-size: .82rem;
}
.history-edit-table thead th {
  text-align: left; padding: 5px 8px;
  color: #475569; font-weight: 600; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid #1a2438;
}
.history-edit-table tr.history-row { border-bottom: 1px solid #1a2438; }
.history-edit-table tr.history-row:last-child { border-bottom: none; }
.history-edit-table td { padding: 4px 4px; vertical-align: middle; }
.hist-input {
  padding: 5px 8px; font-size: .8rem;
  background: #0f1929; border: 1px solid #1a2438;
  color: #e2e8f0; border-radius: 6px; width: 100%;
  font-family: inherit;
}
.hist-input:focus { outline: none; border-color: #22c55e; }
.hist-del-btn {
  padding: 4px 7px; border-radius: 6px;
  color: #475569; font-size: .85rem;
  transition: all .15s;
}
.hist-del-btn:hover { background: rgba(239,68,68,.15); color: #ef4444; }
.btn-add-row {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 7px;
  font-size: .78rem; font-weight: 600;
  color: #22c55e; border: 1px dashed rgba(34,197,94,.35);
  background: rgba(34,197,94,.06);
  transition: all .15s; margin-top: 4px;
}
.btn-add-row:hover { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.6); }
/* Detail view raise rows */
.raise-detail-list { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.raise-detail-row {
  display: flex; align-items: center; gap: 10px;
  font-size: .82rem;
}
.raise-year {
  min-width: 38px; font-weight: 700; color: #64748b;
  font-size: .75rem; padding: 1px 6px; background: #0f1929;
  border-radius: 4px; text-align: center;
}
.raise-arrow { color: #94a3b8; }

/* ── EMPLOYEE VIEW DETAIL ────────────────────────────────────────── */
.emp-detail-header {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 22px;
}
.emp-detail-avatar {
  width: 58px; height: 58px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 800;
}
.emp-detail-meta { flex: 1; }
.emp-detail-name { font-size: 1.3rem; font-weight: 800; color: #e2e8f0; }
.emp-detail-title { font-size: .88rem; color: #64748b; margin-top: 3px; }
.emp-detail-badges { display: flex; gap: 7px; margin-top: 8px; flex-wrap: wrap; }
.detail-badge {
  font-size: .72rem; font-weight: 600;
  padding: 3px 10px; border-radius: 99px;
  letter-spacing: .03em;
}
.emp-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.emp-detail-item {
  background: #111d30;
  border: 1px solid #1a2438;
  border-radius: 10px;
  padding: 13px 16px;
}
.emp-detail-label { font-size: .72rem; color: #475569; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.emp-detail-value { font-size: .92rem; color: #e2e8f0; font-weight: 500; white-space: pre-wrap; line-height: 1.5; }
.emp-detail-value.money { color: var(--green); font-weight: 700; font-size: 1.1rem; }

/* ── FINANCIALS ──────────────────────────────────────────────────── */
/* ── Financials year tabs ── */
.fin-year-tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.fin-ytab {
  padding: 6px 16px; border-radius: 20px; font-size: .8rem; font-weight: 600;
  background: #0d1526; border: 1.5px solid #1e2d45; color: #64748b;
  cursor: pointer; transition: all .18s;
}
.fin-ytab:hover { border-color: var(--green); color: #e2e8f0; }
.fin-ytab.active { background: var(--green); border-color: var(--green); color: #0d1526; }

/* ── Annual P&L report ── */
.ar-hero { display: flex; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.ar-kpi { flex: 1; min-width: 140px; background: #0d1526; border: 1.5px solid #1e2d45; border-radius: var(--radius); padding: 16px 18px; }
.ar-kpi-label { font-size: .75rem; color: #64748b; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.ar-kpi-val { font-size: 1.6rem; font-weight: 800; }
.ar-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .ar-cols { grid-template-columns: 1fr; } }
.ar-panel { background: #0d1526; border: 1.5px solid #1e2d45; border-radius: var(--radius); padding: 18px; }
.ar-panel-title { font-size: .8rem; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }
.ar-panel-title i { font-size: 1rem; }
.ar-bar-row { display: grid; grid-template-columns: 130px 1fr 72px; align-items: center; gap: 8px; margin-bottom: 8px; }
.ar-bar-label { font-size: .76rem; color: #94a3b8; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-bar-track { height: 8px; background: #1e2d45; border-radius: 4px; overflow: hidden; }
.ar-bar-fill { height: 100%; border-radius: 4px; transition: width .4s ease; }
.ar-bar-val { font-size: .75rem; font-weight: 600; color: #e2e8f0; text-align: right; }
.fin-empty { color: #64748b; padding: 40px; text-align: center; font-size: .9rem; }

.fin-section {
  background: #0d1526;
  border: 1.5px solid #1e2d45;
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
  scroll-margin-top: 64px;
}

/* Financials quick-nav */
.fin-quicknav {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 20px;
}
.fin-qn-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 99px;
  background: #0d1526; border: 1.5px solid #1e2d45;
  color: #64748b; font-size: .75rem; font-weight: 600;
  text-decoration: none; transition: all .15s;
  white-space: nowrap;
}
.fin-qn-pill:hover { border-color: var(--green); color: var(--green); background: var(--green-bg); }
.fin-qn-pill i { font-size: .8rem; }
.fin-section-title {
  font-size: .92rem; font-weight: 700; color: #e2e8f0;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px;
}
.fin-section-title i { color: var(--green); }
.fin-section-sub {
  font-size: .75rem; color: #475569;
  margin-bottom: 16px; padding-left: 2px;
}
.yoy-table-wrap { overflow-x: auto; }
.yoy-table { width: 100%; border-collapse: collapse; }
.yoy-table th {
  text-align: left; padding: 8px 14px;
  font-size: .75rem; font-weight: 600; color: #475569;
  text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1px solid #1a2438;
}
.yoy-table td {
  padding: 10px 14px;
  font-size: .9rem; color: #e2e8f0;
  border-bottom: 1px solid #111d30;
}
.yoy-table tr:last-child td { border-bottom: none; }
.yoy-table tr:hover td { background: #111d30; }
.yoy-year { font-weight: 700; }
.yoy-rev  { font-weight: 700; color: var(--green); }
.yoy-growth { font-weight: 600; }
.yoy-growth.up   { color: var(--green); }
.yoy-growth.down { color: var(--red); }
.yoy-bar-wrap { width: 120px; }
.yoy-bar-bg { background: #1a2438; border-radius: 99px; height: 5px; overflow: hidden; }
.yoy-bar    { height: 100%; border-radius: 99px; background: var(--green); transition: width .6s; }
.fin-add-year {
  display: flex; gap: 10px; margin-top: 16px; align-items: center; flex-wrap: wrap;
}
.fin-add-year input { flex: 1; min-width: 120px; }
.streams-grid, .expenses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.stream-card, .expense-card {
  background: #111d30;
  border: 1.5px solid #1a2438;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px;
  position: relative;
}
.stream-dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0;
}
.stream-name, .expense-cat { font-size: .85rem; font-weight: 600; color: #94a3b8; }
.expense-cat-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.stream-val, .expense-val-lg { font-size: 1.05rem; font-weight: 700; color: #e2e8f0; }
.stream-monthly, .expense-monthly { font-size: .75rem; color: #475569; }
.dual-year-row { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.dual-year-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dual-year-label { font-size: .68rem; font-weight: 600; color: #475569; text-transform: uppercase; letter-spacing: .05em; }
.dual-year-val { font-size: .9rem; font-weight: 700; }
.dual-year-val.actual { color: var(--green); }
.dual-year-val.projected { color: var(--blue); }
.dual-year-val.na { color: #2a3448; font-size: .75rem; font-weight: 400; }
.dual-year-delta { font-size: .7rem; font-weight: 600; }
.dual-year-delta.up { color: var(--green); }
.dual-year-delta.down { color: var(--red); }

/* ── ANNIVERSARY BADGE ───────────────────────────────────────── */
/* Anniversary + birthday pills */
.emp-anniversary {
  font-size: .72rem; padding: 3px 9px; border-radius: 99px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px; border: 1px solid transparent;
}
.ann-soon   { background: var(--gold-bg); color: var(--gold); border-color: rgba(245,158,11,.25); font-weight: 700; }
.ann-normal { background: rgba(30,45,70,.6); color: #4e6585; border-color: #263547; }
.bday-today { background: rgba(236,72,153,.15); color: #f472b6; border-color: rgba(236,72,153,.3); font-weight: 700; }
.bday-month { background: rgba(236,72,153,.07); color: #9d5577; border-color: rgba(236,72,153,.15); }

/* SEP tag — subtle dark */
.emp-sep-tag {
  font-size: .7rem; font-weight: 500; letter-spacing: .03em;
  color: #64748b; background: none; border: none;
  padding: 0; line-height: 1;
}

/* ── BONUS SCHEDULE ──────────────────────────────────────────── */
.bonus-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.bonus-kpi {
  background: #0d1526;
  border: 1.5px solid #1e2d45;
  border-radius: var(--radius);
  padding: 16px 18px;
  position: relative; overflow: hidden;
}
.bonus-kpi::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--gold);
}
.bonus-kpi-label { font-size: .72rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.bonus-kpi-value { font-size: 1.2rem; font-weight: 800; color: var(--gold); }
.bonus-kpi-sub { font-size: .72rem; color: #475569; margin-top: 4px; }

.bonus-calendar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 0;
}
.bonus-month {
  background: #0d1526;
  border: 1.5px solid #1e2d45;
  border-radius: var(--radius);
  padding: 16px 18px;
  position: relative;
  transition: transform .2s, border-color .2s;
}
.bonus-month.has-dist {
  border-color: rgba(245,158,11,.4);
  background: linear-gradient(135deg, #0d1526, #1a1200);
}
.bonus-month.has-dist::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gold); border-radius: var(--radius) var(--radius) 0 0;
}
.bonus-month:hover { transform: translateY(-2px); }
.bonus-month-name { font-size: .78rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 10px; }
.bonus-month.has-dist .bonus-month-name { color: var(--gold); }
.bonus-dist-amount { font-size: 1.3rem; font-weight: 800; color: #e2e8f0; }
.bonus-month.has-dist .bonus-dist-amount { color: var(--gold); }
.bonus-dist-amount-wrap { display: flex; align-items: center; gap: 6px; }
.dist-edit-btn {
  background: none; border: none; cursor: pointer; padding: 2px 4px;
  color: #2a3d55; font-size: .8rem; border-radius: 4px; transition: color .15s;
  flex-shrink: 0;
}
.dist-edit-btn:hover { color: var(--gold); }
.dist-edit-wrap { display: flex; align-items: center; gap: 5px; margin: 4px 0; }
.dist-edit-input {
  width: 100%; max-width: 110px; background: #0a111e; border: 1.5px solid #2a3d55;
  color: #e2e8f0; border-radius: 6px; padding: 4px 8px; font-size: .85rem;
}
.bonus-month-empty { font-size: .8rem; color: #1e2d45; font-style: italic; }
.bonus-per-partner { font-size: .75rem; color: #64748b; margin-top: 4px; }
.bonus-month.has-dist .bonus-per-partner { color: #94a3b8; }
.bonus-tax-note { font-size: .7rem; color: var(--purple); margin-top: 6px; font-weight: 600; }
.edit-inline { position: absolute; top: 10px; right: 10px; color: #2a3448; font-size: .85rem; transition: color .2s; }
.edit-inline:hover { color: var(--green); }

/* Bonus progress bar */
.bonus-progress-wrap {
  margin: 0 0 20px;
  background: #0d1526;
  border: 1.5px solid #1e2d45;
  border-radius: var(--radius);
  padding: 14px 18px;
}
.bonus-progress-label {
  display: flex; justify-content: space-between;
  font-size: .78rem; color: #64748b;
  margin-bottom: 8px;
}
.bonus-progress-track {
  background: #111d30;
  border-radius: 99px; height: 8px; overflow: hidden;
}
.bonus-progress-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(to right, var(--gold), #f97316);
  transition: width .8s ease;
}

/* Bonus month state variants */
.bonus-month.bm-past  { opacity: 0.55; }
.bonus-month.bm-current {
  border-color: rgba(34,197,94,.5) !important;
  background: linear-gradient(135deg, #0d1526, #0a1a10) !important;
}
.bonus-month.bm-current::before {
  background: var(--green) !important;
}
.bm-now-badge {
  display: inline-block;
  background: var(--green-bg); color: var(--green);
  font-size: .6rem; font-weight: 700;
  padding: 1px 7px; border-radius: 99px;
  letter-spacing: .06em; text-transform: uppercase;
  margin-left: 5px; vertical-align: middle;
}
.bonus-net-note {
  font-size: .7rem; color: var(--green); margin-top: 3px; font-weight: 600;
}

/* ── ACTUALS VS PROJECTED ─────────────────────────────────────── */
.avp-summary {
  display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 4px;
}
.avp-kpi {
  background: #111d30; border: 1px solid #1a2438;
  border-radius: 10px; padding: 12px 16px; min-width: 150px; flex: 1;
}
.avp-kpi-label { font-size: .7rem; font-weight: 600; color: #475569; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.avp-kpi-val   { font-size: 1.15rem; font-weight: 800; color: #e2e8f0; }
.avp-kpi-sub   { font-size: .72rem; color: #475569; margin-top: 3px; }
.avp-kpi-sub.up   { color: var(--green); }
.avp-kpi-sub.down { color: var(--red); }
.avp-future td { opacity: .35; }
.avp-table-wrap { overflow-x: auto; margin-top: 8px; }
.avp-empty {
  display: flex; align-items: center; gap: 12px;
  padding: 24px 0; color: #2a3448; font-size: .88rem; font-style: italic;
}
.avp-empty i { font-size: 1.6rem; }
.pl-confirm-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; font-size: .9rem; color: #94a3b8;
}
.pl-parsed-note {
  margin-top: 12px; font-size: .8rem; padding: 8px 12px;
  background: #111d30; border-radius: 8px;
  display: flex; align-items: center; gap: 8px;
}

/* ── FINANCIAL UPLOAD MODAL ─────────────────────────────────────── */
.fin-steps {
  display: flex; align-items: center; gap: 0;
  padding: 16px 24px 0;
  border-bottom: 1px solid #1a2438;
  margin-bottom: 0;
}
.fin-step {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex-shrink: 0;
}
.fin-step span {
  width: 26px; height: 26px; border-radius: 50%;
  background: #1a2438; color: #475569;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700;
  transition: background .2s, color .2s;
}
.fin-step label { font-size: .68rem; color: #475569; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.fin-step.active span { background: var(--blue); color: #fff; }
.fin-step.active label { color: var(--blue); }
.fin-step.done span { background: var(--green); color: #fff; }
.fin-step.done label { color: var(--green); }
.fin-step-line { flex: 1; height: 2px; background: #1a2438; min-width: 20px; margin-bottom: 16px; }
.doc-type-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.doc-type-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 14px; border-radius: 10px;
  border: 1.5px solid #1a2438; background: #111d30;
  cursor: pointer; transition: border-color .2s, background .2s;
  position: relative;
}
.doc-type-card input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.doc-type-card i { font-size: 1.4rem; color: #475569; transition: color .2s; }
.doc-type-card strong { font-size: .85rem; font-weight: 700; color: #94a3b8; transition: color .2s; }
.doc-type-card span { font-size: .74rem; color: #475569; line-height: 1.4; }
.doc-type-card.active, .doc-type-card:hover {
  border-color: var(--blue); background: rgba(59,130,246,.08);
}
.doc-type-card.active i, .doc-type-card.active strong { color: var(--blue); }
.fin-period-row { display: flex; gap: 12px; }
/* Review section */
.fin-review-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0 14px; font-size: .9rem; color: #94a3b8;
}
.fin-review-kpis {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px;
}
.fin-review-kpi {
  background: #111d30; border: 1px solid #1a2438; border-radius: 10px;
  padding: 12px 14px;
}
.fin-review-kpi label { font-size: .7rem; font-weight: 600; color: #475569; text-transform: uppercase; letter-spacing: .05em; display: block; margin-bottom: 4px; }
.fin-review-kpi input[type=number] {
  width: 100%; background: transparent; border: none; outline: none;
  color: #e2e8f0; font-size: .95rem; font-weight: 700; font-family: inherit;
  padding: 0;
}
.fin-review-kpi input[type=number]:focus { color: var(--blue); }
.fin-review-section { margin-top: 14px; }
.fin-review-section-title { font-size: .72rem; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.fin-review-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.fin-review-table th { text-align: left; padding: 5px 8px; font-size: .68rem; color: #475569; font-weight: 600; border-bottom: 1px solid #1a2438; }
.fin-review-table th:not(:first-child) { text-align: right; }
.fin-review-table td { padding: 6px 8px; border-bottom: 1px solid #0f1929; color: #94a3b8; }
.fin-review-table td:not(:first-child) { text-align: right; color: #e2e8f0; font-weight: 600; }
.fin-review-table tr:last-child td { border-bottom: none; font-weight: 700; color: #e2e8f0; }
.fin-parsed-note { margin-top: 12px; font-size: .78rem; padding: 8px 12px; background: #111d30; border-radius: 8px; }
/* projection review */
.proj-review-table-wrap { overflow-x: auto; margin-top: 10px; }
/* YTD breakdown */
.ytd-breakdown-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.ytd-breakdown-table { min-width: 700px; }
.ytd-breakdown-table td.cat-name { color: #94a3b8; font-weight: 600; }
.ytd-breakdown-table td.cat-ytd { color: #e2e8f0; font-weight: 700; }
.ytd-breakdown-table tr.total-row td { border-top: 1px solid #1a2438; color: #e2e8f0; font-weight: 700; }

/* ── CASHFLOW ────────────────────────────────────────────────────── */
.cashflow-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 4px;
}
.cf-kpi {
  background: #111d30;
  border: 1px solid #1a2438;
  border-radius: 10px;
  padding: 12px 15px;
}
.cf-kpi-label { font-size: .7rem; font-weight: 600; color: #475569; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.cf-kpi-value { font-size: 1.05rem; font-weight: 700; color: #e2e8f0; }
.cf-kpi-sub   { font-size: .72rem; color: #64748b; margin-top: 3px; }
.cashflow-months-wrap { overflow-x: auto; margin-top: 8px; }
.cashflow-table { width: 100%; border-collapse: collapse; font-size: .78rem; min-width: 860px; }
.cashflow-table th {
  text-align: right; padding: 6px 10px;
  font-size: .68rem; font-weight: 600; color: #475569;
  text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid #1a2438;
  white-space: nowrap;
}
.cashflow-table th:first-child { text-align: left; }
.cashflow-table td {
  text-align: right; padding: 7px 10px;
  font-size: .78rem; color: #94a3b8;
  border-bottom: 1px solid #0f1929;
  white-space: nowrap;
}
.cashflow-table td:first-child { text-align: left; font-weight: 600; color: #64748b; }
.cashflow-table tr.cf-rev td { color: #22c55e; font-weight: 600; }
.cashflow-table tr.cf-exp td { color: #f97316; }
.cashflow-table tr.cf-net td { color: #e2e8f0; font-weight: 700; border-top: 1px solid #1a2438; }
.cashflow-table tr.cf-bank td { color: #3b82f6; font-weight: 600; }
.cashflow-table tr.cf-tax td { color: #a855f7; font-size: .72rem; }
.cashflow-table tr.cf-dist td { color: #f59e0b; font-size: .72rem; }
.cashflow-table tr:hover td { background: #0f1929; }
.cf-zero { color: #1e2d45 !important; }

/* ── COMPANY ──────────────────────────────────────────────────────── */
.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.company-field {
  background: #0d1526;
  border: 1.5px solid #1e2d45;
  border-radius: var(--radius);
  padding: 18px 20px;
}
.company-field-label {
  font-size: .72rem; font-weight: 600;
  color: #475569; text-transform: uppercase; letter-spacing: .07em;
  margin-bottom: 8px; display: flex; align-items: center; gap: 7px;
}
.company-field-label i { color: var(--green); font-size: .9rem; }
.company-field-value {
  font-size: 1rem; font-weight: 500; color: #e2e8f0;
  white-space: pre-wrap; line-height: 1.6;
  text-align: left;
}
.company-field-value.empty { color: #2a3448; font-style: italic; }
.company-notes { grid-column: span 2; }

.company-grid.company-view-mode {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.company-hero-card {
  background: linear-gradient(120deg, rgba(34,197,94,.12), rgba(59,130,246,.08));
  border: 1.5px solid #214146;
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.company-pill-tag {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(15,23,42,.6);
  border: 1px solid rgba(226,232,240,.1);
  color: #94a3b8;
  margin-bottom: 10px;
}
.company-hero-card h3 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.company-hero-card p {
  font-size: .85rem;
  color: #cbd5e1;
}
.company-hero-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.company-hero-meta div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 150px;
}
.hq-meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 180px;
}
.hq-map-wrap {
  position: relative;
  width: 180px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.hq-map-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.hq-addr {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.hq-addr-line {
  font-size: .78rem;
  color: #94a3b8;
  line-height: 1.5;
}
.hq-empty {
  font-size: .88rem;
  color: #475569;
}
.company-hero-meta span {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #94a3b8;
}
.company-hero-meta strong {
  font-size: .95rem;
  color: #e2e8f0;
  font-weight: 600;
}
.company-pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.company-pill {
  background: #111d30;
  border: 1.5px solid #1a2438;
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* In-place editable pills */
.cp-pill { position: relative; }
.cp-edit-btn {
  position: absolute; top: 10px; right: 10px;
  background: none; border: none; cursor: pointer;
  color: #2a3f5a; font-size: .85rem; padding: 2px 4px; border-radius: 4px;
  opacity: 0; transition: opacity .15s, color .15s;
}
.cp-pill:hover .cp-edit-btn,
.secure-card-title .cp-edit-btn,
.secure-field:hover .cp-edit-btn { opacity: 1; }
.cp-edit-btn:hover { color: var(--green); }
.secure-card-title .cp-edit-btn { position: static; opacity: .5; }
.secure-card-title .cp-edit-btn:hover { opacity: 1; }
.cp-input {
  width: 100%; background: #0a1120; border: 1px solid #2a3f5a;
  border-radius: 6px; color: #e2e8f0; padding: 6px 10px;
  font-size: .88rem; font-family: inherit; resize: vertical;
}
.cp-input:focus { border-color: var(--green); outline: none; }
.cp-edit-actions { display: flex; gap: 6px; margin-top: 6px; }
.bank-desc { font-size: .78rem; color: #64748b; padding: 4px 0 8px; font-style: italic; }
.doc-description { font-size: .78rem; color: #94a3b8; margin: 2px 0; }

/* Owner avatars in hero */
.company-hero-owners { display: flex; gap: 12px; margin-top: 12px; }
.cho-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cho-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; object-position: top; flex-shrink: 0; }
.cho-name { font-size: .68rem; color: #64748b; }
.company-pill span, .cp-label {
  font-size: .7rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}
.cp-val {
  font-size: .95rem;
  color: #e2e8f0;
  font-weight: 600;
  line-height: 1.5;
}
.company-pill strong {
  font-size: .95rem;
  color: #e2e8f0;
}
.company-secure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.secure-card {
  background: #0f1929;
  border: 1.5px solid #1e2d45;
  border-radius: var(--radius);
  padding: 18px 20px;
}
.secure-card-title {
  font-size: .9rem;
  font-weight: 700;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.secure-card-title i { color: var(--green); }
.secure-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #111d30;
}
.secure-field:first-of-type { border-top: none; }
.secure-field span {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #475569;
}
.secure-value {
  font-size: .98rem;
  font-weight: 700;
  color: #e2e8f0;
  display: block;
}
.secure-toggle {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #1e2d45;
  color: #64748b;
  background: #111d30;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.secure-toggle:hover {
  color: #e2e8f0;
  border-color: #2a3448;
}
/* ── COMPANY FILES ───────────────────────────────────────────── */
.company-files-section {
  margin-top: 20px;
  background: #0d1526;
  border: 1.5px solid #1e2d45;
  border-radius: var(--radius);
  padding: 20px 22px;
}
.company-files-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.company-files-title {
  font-size: .95rem; font-weight: 700; color: #e2e8f0;
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.company-files-title i { color: var(--blue); }
.company-files-sub { font-size: .78rem; color: #475569; }
.company-files-search-row { margin-bottom: 10px; }
.company-files-search {
  width: 100%; padding: 8px 12px; border-radius: 8px;
  border: 1px solid #1e2d45; background: #0d1829;
  color: #e2e8f0; font-size: .84rem; font-family: inherit;
}
.company-files-search:focus { outline: none; border-color: #2a3f5a; }
.company-files-filter-row { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.company-files-grid { display: flex; flex-direction: column; gap: 8px; }
.cf-card {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  background: #0f1929; border: 1px solid #1a2438; border-radius: 10px;
  transition: border-color .15s;
}
.cf-card:hover { border-color: #2a3f5a; }
.cf-icon {
  width: 38px; height: 38px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.cf-info { flex: 1; min-width: 0; }
.cf-name { font-size: .85rem; font-weight: 600; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-meta { font-size: .72rem; color: #475569; margin-top: 2px; }
.cf-actions { display: flex; gap: 4px; flex-shrink: 0; }

.company-notes-panel {
  background: #0f1929;
  border: 1.5px solid #1e2d45;
  border-radius: var(--radius);
  padding: 18px 20px;
}
.company-notes-title {
  font-size: .9rem;
  font-weight: 700;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.company-notes-title i { color: var(--green); }
.company-notes-body {
  font-size: .9rem;
  color: #cbd5e1;
  line-height: 1.6;
  white-space: pre-wrap;
}
.company-empty {
  color: #475569;
  font-style: italic;
}
@media (max-width: 700px) {
  .company-hero-card { flex-direction: column; }
  .company-hero-meta { flex-direction: column; }
}

/* ── OWNERSHIP HUB ─────────────────────────────────────────────── */
.ownership-layout {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.ownership-panel {
  background: #0d1526;
  border: 1.5px solid #1e2d45;
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.panel-todos, .panel-goals { min-height: 300px; }
#owner-dist-section { min-height: 200px; }
.panel-title {
  font-size: .88rem; font-weight: 700; color: #e2e8f0;
  display: flex; align-items: center; gap: 8px;
  padding: 16px 18px;
  border-bottom: 1px solid #1a2438;
  flex-shrink: 0;
}
.panel-title i { color: var(--green); }

/* Notes feed */
.notes-feed {
  flex: 1; overflow-y: auto;
  padding: 14px 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.note-item {
  display: flex; gap: 10px;
}
.note-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; flex-shrink: 0;
}
.note-bubble {
  flex: 1;
  background: #111d30;
  border: 1px solid #1a2438;
  border-radius: 4px 12px 12px 12px;
  padding: 10px 14px;
}
.note-meta { font-size: .72rem; color: #475569; margin-bottom: 5px; }
.note-text { font-size: .88rem; color: #e2e8f0; line-height: 1.55; white-space: pre-wrap; }
.notes-compose {
  padding: 14px 18px;
  border-top: 1px solid #1a2438;
  display: flex; gap: 10px;
  flex-shrink: 0;
}
.notes-compose-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; flex-shrink: 0;
  margin-top: 2px;
}
.notes-compose-right { flex: 1; display: flex; flex-direction: column; gap: 8px; }
#notes-input { resize: none; min-height: 72px; width: 100%; border-radius: 10px; }
.notes-compose-right .btn-action { align-self: flex-end; }

/* Todos + Goals */
.todos-list, .goals-list {
  flex: 1; overflow-y: auto;
  padding: 10px 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.todo-item, .goal-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 12px;
  background: #111d30;
  border: 1px solid #1a2438;
  border-radius: 8px;
  transition: border-color .2s;
}
.todo-item:hover, .goal-item:hover { border-color: #2a3448; }
.todo-check {
  width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid #2a3448;
  flex-shrink: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
  transition: all .15s;
}
.todo-check.checked { background: var(--green); border-color: var(--green); }
.todo-check.checked::after { content: '✓'; font-size: .75rem; color: #000; font-weight: 700; }
.todo-text { flex: 1; font-size: .85rem; color: #e2e8f0; line-height: 1.4; }
.todo-text.done { text-decoration: line-through; color: #475569; }
.todo-del {
  color: #3a5070; font-size: .85rem; padding: 4px 6px; border-radius: 4px;
  transition: color .2s; flex-shrink: 0; opacity: 0; transition: opacity .15s, color .15s;
}
.todo-item:hover .todo-del, .goal-item:hover .todo-del { opacity: 1; }
.todo-del:hover { color: var(--red); opacity: 1; }
.goal-status-badge {
  font-size: .65rem; font-weight: 700;
  padding: 2px 8px; border-radius: 99px;
  letter-spacing: .04em; text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.gs-on-track { background: var(--green-bg); color: var(--green); }
.gs-at-risk  { background: var(--gold-bg);  color: var(--gold); }
.gs-done     { background: var(--blue-bg);  color: var(--blue); }
.gs-not-started { background: #1a2438; color: #64748b; }
.todo-add {
  padding: 10px 14px;
  border-top: 1px solid #1a2438;
  display: flex; gap: 8px; flex-shrink: 0;
}
.todo-add input, .todo-add select { flex: 1; padding: 8px 12px; font-size: .83rem; }
.todo-add select { flex: 0.7; }

/* ── BUTTONS ──────────────────────────────────────────────────────── */
.btn-action {
  background: var(--green-bg);
  color: var(--green);
  border: 1.5px solid rgba(34,197,94,.25);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: .84rem; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  transition: all .15s;
  white-space: nowrap;
}
.btn-action:hover { background: rgba(34,197,94,.2); border-color: rgba(34,197,94,.4); }
.btn-primary {
  background: var(--green);
  color: #000;
  border-radius: 8px;
  padding: 9px 20px;
  font-size: .88rem; font-weight: 700;
  display: flex; align-items: center; gap: 7px;
  transition: background .15s;
}
.btn-primary:hover { background: #16a34a; }
.btn-secondary {
  background: #1a2438;
  color: #94a3b8;
  border: 1.5px solid #2a3448;
  border-radius: 8px;
  padding: 9px 20px;
  font-size: .88rem; font-weight: 600;
  transition: all .15s;
}
.btn-secondary:hover { background: #1e2d45; color: #e2e8f0; }
.btn-danger {
  background: var(--red-bg);
  color: var(--red);
  border: 1.5px solid rgba(239,68,68,.25);
  border-radius: 8px;
  padding: 9px 20px;
  font-size: .88rem; font-weight: 600;
  display: flex; align-items: center; gap: 7px;
  transition: all .15s;
}
.btn-danger:hover { background: rgba(239,68,68,.2); }

/* ── TOAST ─────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: #1a2438; border: 1.5px solid #2a3448;
  color: #e2e8f0; font-size: .88rem; font-weight: 500;
  padding: 11px 22px; border-radius: 99px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  z-index: 900;
  animation: fadeIn .2s;
  white-space: nowrap;
}
.toast.success { border-color: rgba(34,197,94,.4); color: var(--green); }
.toast.error   { border-color: rgba(239,68,68,.4); color: var(--red); }

/* ── RESPONSIVE ───────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .kpi-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .charts-row { grid-template-columns: 1fr; }
  .charts-row-equal { grid-template-columns: 1fr; }
  .chart-card-wide { grid-column: span 1; }
  .ownership-layout { grid-template-columns: 1fr; }
  .kpi-strip { grid-template-columns: repeat(3, 1fr); }
  .bonus-calendar { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 20px rgba(0,0,0,.5); }
  .topbar-menu { display: flex; }
  .view { padding: 14px 14px 30px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-col-2 { grid-column: span 1; }
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .kpi-value { font-size: 1.15rem; }
}
@media (max-width: 400px) {
  .kpi-strip { grid-template-columns: 1fr; }
}

/* ── MISC ──────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 40px 20px;
  color: #2a3448; font-size: .88rem; font-style: italic;
}
.opacity-60 { opacity: 0.6; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1e2d45; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #2a3448; }

/* ═══════════════════════════════════════════════════════════════
   POLISH PASS — Glassmorphism · Depth · Skeletons · Mobile Nav
   ═══════════════════════════════════════════════════════════════ */

/* ── Glassmorphism & Depth ──────────────────────────────────────── */
.kpi-card {
  background: linear-gradient(135deg, rgba(14,22,40,0.97) 0%, rgba(9,14,26,0.92) 100%);
  border-color: rgba(255,255,255,0.07);
  box-shadow: 0 2px 8px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.06);
}
.kpi-green:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 36px rgba(34,197,94,0.1); }
.kpi-blue:hover  { box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 36px rgba(59,130,246,0.1); }
.kpi-purple:hover{ box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 36px rgba(168,85,247,0.1); }
.kpi-gold:hover  { box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 36px rgba(245,158,11,0.1); }
.kpi-teal:hover   { box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 36px rgba(6,182,212,0.1); }
.kpi-orange:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 36px rgba(249,115,22,0.1); }
.kpi-lime:hover   { box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 36px rgba(132,204,22,0.1); }

.chart-card {
  background: linear-gradient(160deg, rgba(13,21,38,0.98) 0%, rgba(8,13,24,0.95) 100%);
  border-color: rgba(255,255,255,0.05);
  box-shadow: 0 2px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.03);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.fin-section {
  background: linear-gradient(160deg, rgba(13,21,38,0.98) 0%, rgba(8,13,24,0.95) 100%);
  border-color: rgba(255,255,255,0.05);
  box-shadow: 0 2px 12px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.025);
}

.emp-card {
  background: linear-gradient(135deg, rgba(13,21,38,0.97) 0%, rgba(9,14,26,0.92) 100%);
  border-color: rgba(255,255,255,0.06);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.emp-card:hover {
  border-color: rgba(34,197,94,0.22);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 24px rgba(34,197,94,0.05);
}

.sidebar {
  background: linear-gradient(180deg, #0a1120 0%, #080e1c 100%);
  border-right-color: rgba(255,255,255,0.05);
  box-shadow: 2px 0 24px rgba(0,0,0,0.4);
}

.topbar {
  background: rgba(9,14,26,0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(255,255,255,0.05);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03);
}

.ownership-panel {
  background: linear-gradient(160deg, rgba(13,21,38,0.98) 0%, rgba(8,13,24,0.95) 100%);
  border-color: rgba(255,255,255,0.05);
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

.bonus-month {
  background: linear-gradient(135deg, rgba(13,21,38,0.97) 0%, rgba(9,14,26,0.92) 100%);
  border-color: rgba(255,255,255,0.06);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.login-card {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(13,21,38,0.92);
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 40px 80px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.06);
}

/* ── Skeleton Loader ────────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}
.skel {
  display: inline-block;
  background: linear-gradient(90deg, #111d30 25%, #1c2d46 50%, #111d30 75%);
  background-size: 200% auto;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: 6px;
  vertical-align: middle;
}
.skel-kpi  { width: 90px;  height: 26px; display: block; margin-top: 2px; }
.skel-text { width: 70px;  height: 12px; display: block; margin-top: 4px; border-radius: 4px; }
.skel-line { width: 100%;  height: 12px; display: block; margin-bottom: 6px; border-radius: 4px; }

/* ── Mobile Bottom Nav ──────────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: rgba(7,11,20,0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
  z-index: 200;
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  align-items: stretch;
}
.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #3a4e6a;
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  border-radius: 10px;
  padding: 6px 2px;
  transition: color .15s;
  min-width: 0;
  position: relative;
}
.mobile-nav-item i {
  font-size: 1.2rem;
  line-height: 1;
}
.mobile-nav-item.active {
  color: var(--green);
}
.mobile-nav-item.active i {
  filter: drop-shadow(0 0 5px rgba(34,197,94,0.45));
}
.mobile-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%; transform: translateX(-50%);
  width: 18px; height: 2px;
  background: var(--green);
  border-radius: 99px;
}

@media (max-width: 700px) {
  .mobile-nav { display: flex; }
  .topbar-menu { display: none !important; }
  .main { padding-bottom: 60px; }
  .view { padding-bottom: 76px; }
}
