/* VendueTech ESOP — minimal, clean, design-system-aligned (matches sales-hub palette). */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --border: #e3e6ec;
  --text: #1a1f2c;
  --muted: #6b7280;
  --primary: #2647c2;
  --primary-fg: #ffffff;
  --accent: #ff7a45;
  --good: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20,30,55,0.04), 0 4px 12px rgba(20,30,55,0.04);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* shell */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.shell__nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.shell__brand { font-weight: 700; letter-spacing: .2px; }
.shell__nav nav { display: flex; gap: 18px; }
.shell__user { display: flex; align-items: center; gap: 12px; }
.navlink { color: var(--muted); padding: 6px 0; border-bottom: 2px solid transparent; }
.navlink--active { color: var(--text); border-bottom-color: var(--primary); }
.shell__main { padding: 24px; max-width: 1200px; width: 100%; margin: 0 auto; }

/* cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  overflow: hidden;
}
.card__hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.card__hd h3 { margin: 0; font-size: 15px; }
.card__bd { padding: 18px; }
.card--muted { background: #fafbfd; }

/* kpis */
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin-bottom: 14px;
}
.kpi { background: var(--bg); border-radius: 8px; padding: 12px 14px; }
.kpi__label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.kpi__value { font-size: 18px; font-weight: 600; }
.big-num { font-size: 28px; font-weight: 700; margin: 4px 0; }
.fineprint { font-size: 11px; color: var(--muted); }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.tbl th { color: var(--muted); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover { background: #f4f6fa; }
.empty { text-align: center; color: var(--muted); padding: 20px !important; }

/* progress */
.progress { background: var(--bg); border-radius: 999px; height: 8px; overflow: hidden; margin: 8px 0 14px; }
.progress__fill { height: 100%; background: var(--primary); transition: width .3s; }

/* status pills */
.pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; text-transform: uppercase; letter-spacing: .4px;
  background: var(--bg); color: var(--muted);
}
.pill--active, .pill--accepted, .pill--signed, .pill--approved { background: #e0f2e9; color: var(--good); }
.pill--draft, .pill--offered, .pill--pending, .pill--sent { background: #fef3c7; color: var(--warn); }
.pill--paused, .pill--terminated, .pill--expired { background: #fee2e2; color: var(--bad); }
.pill--fully_vested, .pill--exercised { background: #dbeafe; color: var(--primary); }

/* buttons */
.btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 8px 14px; border-radius: 8px; font: inherit; cursor: pointer;
}
.btn:hover { background: var(--bg); }
.btn--primary { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
.btn--primary:hover { filter: brightness(1.05); background: var(--primary); }

/* form */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field__label { font-size: 12px; color: var(--muted); }
.input {
  font: inherit; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; padding: 18px; }

/* modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20,30,55,0.5);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal {
  background: var(--surface); border-radius: var(--radius); width: 720px;
  max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); overflow: auto;
  box-shadow: 0 20px 60px rgba(20,30,55,.25);
}
.modal header { padding: 16px 18px; border-bottom: 1px solid var(--border); }
.modal header h3 { margin: 0; }
.modal__ftr { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--border); }

/* misc */
.muted { color: var(--muted); }
.disclaimer {
  font-size: 12px; color: var(--muted); padding: 14px 16px;
  background: #fff8eb; border: 1px solid #fde68a; border-radius: var(--radius);
  margin-top: 18px;
}
.datelist { list-style: none; padding: 0; margin: 12px 0; columns: 2; column-gap: 32px; }
.datelist li { padding: 4px 0; }
.value-row { padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 14px 0; }
.calc { padding: 14px 0; }
.calc__inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.calc__out { margin-top: 14px; }
.docs { padding-top: 14px; border-top: 1px solid var(--border); margin-top: 14px; }

.login { max-width: 460px; margin: 80px auto; }

/* admin */
.admin__hdr h2 { margin: 0; }
.admin__hdr { margin-bottom: 16px; }

@media (max-width: 720px) {
  .form-grid, .calc__inputs { grid-template-columns: 1fr; }
  .datelist { columns: 1; }
  .shell__nav { flex-wrap: wrap; gap: 10px; }
}

/* ============================================================
   Looker-style analytics: KPI accents, in-cell bars, donut, timeline
   ============================================================ */
:root {
  --lime: #a3e635;
  --lime-dark: #65a30d;
  --purple: #7c3aed;
  --purple-soft: #ede9fe;
}

.shell__brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit;
}
.shell__brand:hover { text-decoration: none; opacity: .85; }
.brand-mark { width: 26px; height: 26px; flex: 0 0 26px; }
.brand-text {
  font-size: 13px; font-weight: 500; color: var(--muted);
  border-left: 1px solid var(--border); padding-left: 10px;
  white-space: nowrap;
}

.login__logo { display: block; width: 220px; height: auto; margin: 0 auto 20px; }

.print-header__logo { width: 200px; height: auto; display: block; margin: 0 0 8px; }

.kpi-grid--big {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 18px;
}
.kpi--big { padding: 16px 18px; }
.kpi--big .kpi__value { font-size: 24px; }
.kpi--lime   { background: linear-gradient(135deg, rgba(163,230,53,.18), rgba(163,230,53,.04)); border: 1px solid rgba(163,230,53,.4); }
.kpi--purple { background: linear-gradient(135deg, rgba(124,58,237,.14), rgba(124,58,237,.03)); border: 1px solid rgba(124,58,237,.35); }

/* in-cell bar */
.tbl--bars td:nth-child(2) { width: 28%; }
.cellbar { position: relative; height: 18px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.cellbar__fill { position: absolute; inset: 0 auto 0 0; background: var(--lime); transition: width .25s; }
.cellbar__lbl { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 600; color: var(--text); }

/* donut */
.chart { padding: 4px 0; }
.chart h4 { margin: 0 0 10px; font-size: 14px; }
.chart--donut { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.donut__legend { list-style: none; padding: 0; margin: 0; flex: 1; min-width: 160px; }
.donut__legend li { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 12px; }
.donut__legend .sw { width: 12px; height: 12px; border-radius: 3px; }
.donut__legend .lbl { flex: 1; }

/* timeline */
.chart--timeline { display: flex; flex-direction: column; gap: 8px; }
.chart--timeline svg { width: 100%; max-width: 100%; height: auto; background: var(--surface); border-radius: 6px; }
.chart__legend { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.axis-lbl { font-size: 10px; fill: var(--muted); }

/* analytics layout */
.an-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 960px) { .an-grid { grid-template-columns: 1fr; } }
.analytics__hdr { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.analytics__hdr h2 { margin: 0 0 4px; }

.filters-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }

/* recommendations */
.recs { list-style: none; padding: 0; margin: 0; }
.rec { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.rec--warn     { background: #fff8eb; }
.rec--critical { background: #fee2e2; }

/* extra status pills */
.pill--at_risk          { background: #fef3c7; color: #b45309; }
.pill--missing_tracking { background: #ffe4e6; color: #be123c; }
.pill--missing_documents{ background: #ffe4e6; color: #be123c; }
.pill--inactive,
.pill--offboarded,
.pill--contract_ended   { background: #e5e7eb; color: #374151; }
.pill--new              { background: #dbeafe; color: var(--primary); }
.pill--info             { background: #dbeafe; color: var(--primary); }
.pill--warn             { background: #fef3c7; color: #b45309; }
.pill--critical         { background: #fee2e2; color: var(--bad); }

/* data freshness footer */
.datafooter {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 14px 0; margin-top: 22px;
  font-size: 12px; color: var(--muted);
  border-top: 1px solid var(--border);
}
.datafooter .sep { opacity: .5; }

/* FAQ */
.faq details { padding: 8px 0; border-bottom: 1px solid var(--border); }
.faq summary { font-weight: 500; cursor: pointer; padding: 4px 0; }
.faq p { margin: 6px 0 4px; }

/* ============================================================
   Staff Tracker — date cards, filter row, detail header
   ============================================================ */
.staff__detail-hdr {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 8px 0 14px;
}
.staff__detail-hdr h3 { margin: 0; }

.filters-row--wide {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.btn-row { display: flex; gap: 8px; margin-bottom: 10px; }

/* date / activity cards with severity states */
.datecards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.datecard {
  border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px;
  background: var(--bg);
  position: relative;
}
.datecard__lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.datecard__val { font-size: 17px; font-weight: 600; }
.datecard__sub { font-size: 12px; margin-top: 2px; }
.datecard__hint { margin-top: 6px; }
.datecard--warning   { background: #fff8eb; border-color: #fde68a; }
.datecard--warning .datecard__lbl { color: var(--warn); }
.datecard--critical  { background: #fee2e2; border-color: #fecaca; }
.datecard--critical .datecard__lbl { color: var(--bad); }
.datecard--completed { background: #e0f2e9; border-color: #bbf7d0; }
.datecard--completed .datecard__lbl { color: var(--good); }
.datecard--completed::after {
  content: '✓'; position: absolute; right: 12px; top: 10px;
  color: var(--good); font-size: 16px; font-weight: 700;
}

.staff__detail { margin-top: 14px; }

/* Activity status pills (low_activity wasn't covered) */
.pill--active        { background: #e0f2e9; color: var(--good); }
.pill--low_activity  { background: #fef3c7; color: var(--warn); }
.pill--inactive      { background: #e5e7eb; color: #374151; }
.pill--paused        { background: #fee2e2; color: var(--bad); }

/* ============================================================
   ESOP Modeling charts: hbar, treemap, comparison, stacked bar
   ============================================================ */
.chart-svg { width: 100%; max-width: 100%; height: auto; background: var(--surface); border-radius: 6px; }

/* horizontal bar chart */
.hbar { list-style: none; padding: 0; margin: 0; }
.hbar__row {
  display: grid; grid-template-columns: 130px 1fr 80px auto;
  align-items: center; gap: 12px; padding: 6px 0;
}
.hbar__row--focused { background: rgba(124,58,237,.06); border-radius: 4px; padding-left: 6px; padding-right: 6px; }
.hbar__lbl { font-size: 13px; }
.hbar__track { background: var(--bg); border-radius: 4px; height: 14px; overflow: hidden; }
.hbar__fill  { height: 100%; transition: width .25s; }
.hbar__val   { font-size: 13px; font-weight: 600; text-align: right; }
.hbar__badge {
  font-size: 10px; padding: 2px 8px; border-radius: 999px;
  background: #fee2e2; color: var(--bad); text-transform: uppercase; letter-spacing: .4px;
}

/* treemap */
.treemap {
  position: relative; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--border);
}
.treemap__tile {
  position: absolute; padding: 8px 10px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.4);
  color: rgba(20,30,55,.92); font-size: 12px; line-height: 1.2;
  cursor: default;
  transition: filter .15s;
}
.treemap__tile:hover { filter: brightness(1.05); }
.treemap__tile--focus { outline: 2px solid #1a1f2c; outline-offset: -3px; }
.treemap__lbl { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.treemap__val { font-weight: 700; font-size: 14px; }
.treemap__sub { font-size: 11px; opacity: .8; }

/* comparison bars (contribution vs ESOP) */
.compare { list-style: none; padding: 0; margin: 0; }
.compare__legend {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; margin-bottom: 10px;
}
.compare__legend .sw { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.compare__row {
  display: grid; grid-template-columns: 130px 1fr;
  align-items: center; gap: 10px; padding: 4px 0;
}
.compare__lbl { font-size: 13px; }
.compare__track {
  display: flex; height: 22px; background: var(--bg); border-radius: 4px; overflow: hidden;
  position: relative;
}
.compare__leftFill, .compare__rightFill {
  height: 100%; display: flex; align-items: center; justify-content: flex-end;
  font-size: 10px; color: rgba(20,30,55,.95); padding: 0 6px;
  white-space: nowrap;
}

.disclaimer--legal { background: #fef3c7; border-color: #fde68a; }

/* ============================================================
   Allocation engine — multiplier inputs + acknowledgment checkbox
   ============================================================ */
.tbl--allocation { font-size: 12px; }
.tbl--allocation td, .tbl--allocation th { padding: 6px 8px; }
.input--mult {
  width: 60px; padding: 4px 6px; font-size: 12px; text-align: center;
}
.input--mult:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.modal__ack {
  display: block; padding: 12px; margin: 12px 0;
  background: #fff8eb; border: 1px solid #fde68a; border-radius: 8px;
  font-size: 13px; line-height: 1.4;
}
.modal__ack input[type="checkbox"] { margin-right: 8px; transform: translateY(1px); }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em; padding: 1px 5px; border-radius: 3px;
  background: #f3f4f6; color: var(--primary);
}

/* ============================================================
   Print stylesheet — used by personal ESOP summary export
   ============================================================ */
@media print {
  .shell__nav, .navlink, .shell__user,
  .filters-row, .calc__inputs, .docs,
  .btn, .btn-row, footer.datafooter { display: none !important; }
  body { background: #fff; }
  .shell__main { padding: 0; max-width: none; }
  .card { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
  .disclaimer { background: #fff !important; border: 1px solid #999 !important; }
  .kpi-grid { break-inside: avoid; }
  .faq details > p { display: block !important; }
  .print-only { display: block !important; }
}
.print-only { display: none; }
@media print {
  .print-header h1 { font-size: 22px; margin: 0 0 4px; }
  .print-header p  { font-size: 12px; color: #555; margin: 0 0 16px; }
}

/* Employee header layout: title left, "Download PDF" button right */
.employee__hdr {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 14px;
}
.employee__hdr h2 { margin: 0 0 4px; }

