:root {
  --pp-teal: #00695C;
  --pp-teal-dark: #004D40;
  --pp-teal-deep: #053F36;
  --pp-mint: #B2E0D8;
  --pp-mint-soft: #D7EFEA;
  --pp-mint-pale: #EAF7F4;
  --pp-neon: #45A842;
  --pp-neon-soft: #6BC568;
  --pp-pale: #E0F2F1;
  --pp-charcoal: #2C2C2C;
  --pp-grey-dark: #555;
  --pp-grey-mid: #999;
  --pp-grey-light: #E8E8E8;
  --pp-grey-bg: #F5F5F5;
  --pp-card-bg: #FAFAFA;
  --pp-white: #FFFFFF;
  --pp-orange: #E58B3A;
  --pp-shadow: 0 6px 18px rgba(0, 77, 64, 0.06);
  --pp-shadow-soft: 0 2px 8px rgba(44, 44, 44, 0.05);
  --pp-radius: 10px;
  --pp-radius-sm: 6px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Noto Sans", sans-serif;
  line-height: 1.5;
  font-size: 14px;
  color: var(--pp-charcoal);
  background: var(--pp-mint-pale);
}

body { min-height: 100vh; }

/* ============ APP SHELL ============ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ============ SIDEBAR ============ */
.sidebar {
  width: 260px;
  background: linear-gradient(180deg, var(--pp-teal-dark) 0%, var(--pp-teal-deep) 100%);
  color: var(--pp-white);
  padding: 1.5rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid rgba(178, 224, 216, 0.18);
  margin-bottom: 1.4rem;
  position: relative;
}

.sidebar__logo {
  width: 222px;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
  opacity: 1;
}

.sidebar__hamburger {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  padding: 0;
  cursor: pointer;
}

.sidebar__hamburger span {
  display: block;
  width: 16px;
  height: 2px;
  margin: 3px auto;
  background: var(--pp-white);
  border-radius: 999px;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.sidebar__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.72rem 0.9rem;
  border-radius: var(--pp-radius-sm);
  color: var(--pp-mint-soft);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 120ms ease, color 120ms ease;
}

.sidebar__link:hover:not(.sidebar__link--disabled) {
  background: rgba(178, 224, 216, 0.1);
  color: var(--pp-white);
}

.sidebar__link small {
  color: rgba(178, 224, 216, 0.55);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.sidebar__link--active {
  background: var(--pp-mint);
  color: var(--pp-teal-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.sidebar__link--active:hover {
  background: var(--pp-mint);
  color: var(--pp-teal-dark);
}

.sidebar__link--disabled {
  color: rgba(178, 224, 216, 0.55);
  cursor: default;
}

.nav-group {
  display: flex;
  flex-direction: column;
}

.nav-group__chevron {
  font-size: 0.72rem;
  opacity: 0.7;
  margin-left: 0.5rem;
  transition: transform 180ms ease;
}

.nav-group.is-open > .sidebar__link--parent .nav-group__chevron {
  transform: rotate(180deg);
}

.sidebar__link--parent {
  justify-content: space-between;
}

/* Children container (for Guidelines group which nests Underwriting) */
.nav-group__children {
  display: flex;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 260ms ease, opacity 200ms ease;
  pointer-events: none;
}

.nav-group.is-open > .nav-group__children {
  max-height: 40rem; /* generous cap so nested submenus fit */
  opacity: 1;
  pointer-events: auto;
}

/* Sub-link (first nesting level) */
.sidebar__link--sub {
  padding-left: 1.9rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(178, 224, 216, 0.78);
  position: relative;
  max-height: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  transition: max-height 220ms ease, opacity 180ms ease, padding 180ms ease;
  pointer-events: none;
}

.nav-group.is-open > .sidebar__link--sub,
.nav-group__children .sidebar__link--sub {
  max-height: 3rem;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  opacity: 1;
  pointer-events: auto;
}

.sidebar__link--sub::before {
  content: "\21b3";
  position: absolute;
  left: 0.85rem;
  color: rgba(178, 224, 216, 0.6);
}

/* Sub-sub level (e.g. Underwriting > PPDS/Approval/Closed Deals) */
.sidebar__link--subsub {
  padding-left: 2.9rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(178, 224, 216, 0.72);
  position: relative;
  max-height: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  transition: max-height 220ms ease, opacity 180ms ease, padding 180ms ease;
  pointer-events: none;
}

.nav-group--nested.is-open .sidebar__link--subsub {
  max-height: 2.6rem;
  padding-top: 0.42rem;
  padding-bottom: 0.42rem;
  opacity: 1;
  pointer-events: auto;
}

.sidebar__link--subsub::before {
  content: "\2022";
  position: absolute;
  left: 2rem;
  color: rgba(178, 224, 216, 0.5);
  font-size: 0.7rem;
}

/* Active state must win over sub / subsub (they redefine color otherwise) */
.sidebar__link.sidebar__link--active,
.sidebar__link--sub.sidebar__link--active,
.sidebar__link--subsub.sidebar__link--active {
  background: var(--pp-mint);
  color: var(--pp-teal-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  font-weight: 700;
}

.sidebar__link--sub.sidebar__link--active::before,
.sidebar__link--subsub.sidebar__link--active::before {
  color: var(--pp-teal-dark);
}

.sidebar__footer {
  padding-top: 1rem;
  border-top: 1px solid rgba(178, 224, 216, 0.15);
  font-size: 0.72rem;
  color: rgba(178, 224, 216, 0.55);
  text-align: center;
  letter-spacing: 0.04em;
}

/* ============ CONTENT ============ */
.content-shell {
  flex: 1;
  padding: 1.5rem 1.75rem;
  min-width: 0;
}

.layout {
  display: block;
}

.report-pane {
  padding: 0.25rem 0.25rem 1rem;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.content-stamp {
  text-align: right;
  margin-top: 0.9rem;
  padding-right: 0.5rem;
  color: var(--pp-grey-mid);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

/* ============ REPORT HEADER ============ */
.report-header {
  padding-bottom: 0.9rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--pp-grey-light);
}

.report-header__eyebrow {
  color: var(--pp-teal);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.66rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.report-header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 800;
  color: var(--pp-teal-dark);
  letter-spacing: 0.01em;
}

.report-header p {
  margin: 0.2rem 0;
  color: var(--pp-grey-dark);
  font-size: 0.82rem;
}

.report-header__date {
  color: var(--pp-charcoal);
  font-weight: 600;
}

/* ============ LEGEND ============ */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.legend__item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.7rem 0.35rem 0.45rem;
  border-radius: 999px;
  background: var(--pp-mint-pale);
  font-size: 0.72rem;
  color: var(--pp-grey-dark);
  border: 1px solid rgba(0, 77, 64, 0.05);
}

/* ============ ACTION TABLE ============ */
.table-wrap {
  overflow-x: auto;
  margin: 0 -0.25rem;
  padding: 0 0.25rem;
}

.action-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.78rem;
  color: var(--pp-charcoal);
}

.action-table thead th {
  position: sticky;
  top: 0;
  background: var(--pp-mint-pale);
  color: var(--pp-teal-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.66rem;
  font-weight: 800;
  text-align: center;
  padding: 0.55rem 0.5rem;
  border-bottom: 2px solid var(--pp-mint);
  white-space: nowrap;
}

.action-table thead th.col-happening,
.action-table thead th.col-todo,
.action-table thead th.col-note { text-align: left; }

.action-table tbody td {
  padding: 0.5rem 0.5rem;
  border-bottom: 1px solid var(--pp-grey-light);
  vertical-align: middle;
  line-height: 1.4;
  text-align: center;
}

.action-table tbody td.col-happening,
.action-table tbody td.col-todo,
.action-table tbody td.col-note {
  text-align: left;
  vertical-align: top;
}

.action-table tbody tr:hover td {
  background: var(--pp-mint-pale);
}

.action-table tbody tr:last-child td {
  border-bottom: 0;
}

.col-priority { width: 78px; white-space: nowrap; }
.col-client   { width: 115px; }
.col-id       { width: 85px; }
.col-agent    { width: 95px; }
.col-role     { width: 88px; }
.col-status   { width: 100px; }
.col-happening { min-width: 180px; }
.col-todo      { min-width: 180px; }
.col-note      { min-width: 125px; }
.col-followup  { width: 118px; text-align: center; }

.mono {
  font-family: "JetBrains Mono", "Menlo", "Consolas", monospace;
  font-size: 0.74rem;
  color: var(--pp-grey-dark);
}

/* ============ PRIORITY BADGES ============ */
.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.priority-badge--HIGH {
  background: var(--pp-orange);
  color: var(--pp-white);
}

.priority-badge--MEDIUM {
  background: var(--pp-teal-dark);
  color: var(--pp-white);
}

.priority-badge--LOW {
  background: var(--pp-mint);
  color: var(--pp-teal-dark);
}

/* ============ RESOLVE / REOPEN PILL ============ */
.resolve-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  margin-top: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--pp-mint-pale);
  color: var(--pp-teal-dark);
  border: 1px dashed rgba(0, 77, 64, 0.35);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
  white-space: nowrap;
}

.resolve-pill:hover {
  background: var(--pp-mint);
  border-style: solid;
  border-color: var(--pp-teal-dark);
}

.resolve-pill.is-reopen {
  background: var(--pp-white);
  color: var(--pp-teal);
  border: 1px solid var(--pp-teal);
}

.resolve-pill.is-reopen:hover {
  background: var(--pp-teal);
  color: var(--pp-white);
}

/* Row fade-out when resolved/reopened */
.action-row.row-leaving {
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 280ms ease, transform 280ms ease;
}

/* ============ GUIDELINES PAGES (ported from Ada's design) ============ */
.guideline-container {
  max-width: none;
  margin: 0.5rem 0 2rem;
  background: var(--pp-white);
  border-radius: var(--pp-radius);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border-top: 4px solid var(--pp-teal);
}

.guideline-header {
  text-align: center;
  margin: 1.25rem 2.5rem;
  padding: 1.25rem;
  background: var(--pp-mint-pale);
  border-radius: 0.75rem;
}

.guideline-header h1 {
  font-family: "Noto Serif", "Noto Sans", serif;
  font-weight: 800;
  font-size: 1.85rem;
  letter-spacing: 0.02em;
  color: var(--pp-teal-dark);
  margin: 0 0 0.35rem;
}

.guideline-subtitle {
  font-style: italic;
  color: var(--pp-grey-dark);
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
}

.guideline-hint {
  color: var(--pp-grey-mid);
  font-size: 0.82rem;
  margin: 0.4rem 0 0;
}

.guideline-eyebrow {
  color: var(--pp-teal);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  font-size: 0.68rem;
  margin: 0 0 0.35rem;
}

.guideline-search {
  position: relative;
  max-width: 520px;
  margin: 1rem auto 0.2rem;
}

.guideline-search__input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.3rem;
  border-radius: 999px;
  border: 1px solid #b2f5ea;
  background: var(--pp-white);
  color: var(--pp-charcoal);
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(0, 77, 64, 0.06);
  transition: border-color 150ms ease, box-shadow 150ms ease;
  font-family: inherit;
}

.guideline-search__input:focus {
  outline: none;
  border-color: var(--pp-teal);
  box-shadow: 0 3px 14px rgba(0, 77, 64, 0.15);
}

.guideline-search__icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pp-teal);
  font-size: 0.95rem;
  opacity: 0.7;
  pointer-events: none;
}

.protocol-card__dept {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pp-teal);
  margin: 0 0 0.2rem;
}

.protocol-card__ext {
  font-size: 0.78rem;
  color: var(--pp-teal);
  margin-left: 0.3rem;
  vertical-align: middle;
}

/* ============ REPORTS HUB ============ */
.reports-container {
  margin: 0.5rem 0 2rem;
}

.reports-hero {
  position: relative;
  overflow: hidden;
  padding: 2.6rem 2.6rem 2.3rem;
  border-radius: 1.1rem;
  background: var(--pp-teal-dark);
  color: var(--pp-white);
  box-shadow: 0 10px 34px rgba(0, 77, 64, 0.18);
  border: 1px solid rgba(79, 209, 197, 0.2);
}

/* Orbit + spark layers — very subtle, no bright hotspots */
.reports-hero__orbit,
.reports-hero__spark {
  display: none;
}

.reports-hero__content {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

.reports-hero__eyebrow {
  color: #81e6d9;
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  margin: 0 0 0.75rem;
}

.reports-hero__title {
  font-family: "Noto Serif", "Noto Sans", serif;
  font-size: 2.8rem;
  font-weight: 800;
  margin: 0 0 0.6rem;
  letter-spacing: 0.01em;
  line-height: 1.05;
}

.reports-hero__subtitle {
  color: #d7efea;
  font-size: 0.98rem;
  max-width: 640px;
  line-height: 1.55;
  margin: 0 0 1.35rem;
}

.reports-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.55rem;
  margin-bottom: 1.25rem;
}

.reports-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(178, 224, 216, 0.35);
  color: #e6fffa;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.reports-chip__icon {
  font-size: 0.95rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.reports-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.reports-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(178, 224, 216, 0.3);
  color: #a7f3d0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reports-hero__badge--muted {
  color: rgba(215, 239, 234, 0.75);
}

/* Empty state */
.reports-empty {
  margin-top: 1.5rem;
  padding: 3rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, var(--pp-white) 0%, var(--pp-mint-pale) 100%);
  border: 1px dashed rgba(0, 77, 64, 0.22);
  border-radius: 1rem;
  color: var(--pp-grey-dark);
  box-shadow: 0 3px 14px rgba(0, 77, 64, 0.06);
}

.reports-empty__icon {
  font-size: 3.2rem;
  line-height: 1;
  margin-bottom: 0.6rem;
  filter: drop-shadow(0 4px 8px rgba(0, 77, 64, 0.15));
}

.reports-empty__title {
  font-family: "Noto Serif", "Noto Sans", serif;
  color: var(--pp-teal-dark);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.reports-empty__body {
  max-width: 620px;
  margin: 0 auto;
  font-size: 0.9rem;
  line-height: 1.6;
}

.reports-listing {
  margin-top: 1.5rem;
}

/* ============ FILE TABLE (Reports / Audits / etc) ============ */
.file-table-section {
  margin-top: 1.5rem;
  background: var(--pp-white);
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.4rem 1.6rem 1.2rem;
  box-shadow: 0 4px 18px rgba(0, 77, 64, 0.06);
}

.file-table-section__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.file-table-section__title {
  font-family: "Noto Serif", "Noto Sans", serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--pp-teal-dark);
  margin: 0 0 0.2rem;
}

.file-table-section__hint {
  color: var(--pp-grey-mid);
  font-size: 0.82rem;
  margin: 0;
}

.file-table-section__actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.file-table-section__search {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #b2f5ea;
  background: var(--pp-white);
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--pp-charcoal);
  min-width: 220px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.file-table-section__search:focus {
  outline: none;
  border-color: var(--pp-teal);
  box-shadow: 0 2px 10px rgba(0, 77, 64, 0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform 120ms ease, box-shadow 150ms ease, background 150ms ease, color 150ms ease;
  text-decoration: none;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--pp-teal), var(--pp-teal-dark));
  color: var(--pp-white);
  box-shadow: 0 3px 12px rgba(0, 77, 64, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 5px 18px rgba(0, 77, 64, 0.3);
}

.btn-ghost {
  background: var(--pp-white);
  color: var(--pp-teal);
  border-color: var(--pp-mint);
}

.btn-ghost:hover {
  background: var(--pp-mint-pale);
  border-color: var(--pp-teal);
}

/* Actual file table */
.file-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
}

.file-table thead th {
  text-align: center;
  padding: 0.6rem 0.9rem;
  color: var(--pp-grey-mid);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--pp-grey-light);
}

.file-table tbody td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid #f1f5f9;
  color: var(--pp-charcoal);
  text-align: center;
  vertical-align: middle;
}

.file-table tbody tr:hover td {
  background: var(--pp-mint-pale);
}

.file-table tbody tr:last-child td {
  border-bottom: none;
}

.file-table__size { white-space: nowrap; color: var(--pp-grey-mid); }
.file-table__actions { width: 1%; white-space: nowrap; text-align: center; }

.file-table__name {
  font-weight: 700;
  color: var(--pp-teal-dark);
  font-family: "Noto Serif", "Noto Sans", serif;
  letter-spacing: 0.01em;
}

.file-table__shared {
  /* Kept centered via tbody td; chips wrap naturally inline */
}

.file-table__shared .role-chip + .role-chip {
  margin-left: 0.25rem;
}

/* Role chips — color per tier */
.role-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.role-chip--admin {
  background: #dbeafe;
  color: #1e3a8a;
  border-color: #93c5fd;
}

.role-chip--manager {
  background: var(--pp-mint-pale);
  color: var(--pp-teal-dark);
  border-color: #81e6d9;
}

.role-chip--team_leader {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.role-chip--user {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

.role-chip--none {
  background: transparent;
  color: var(--pp-grey-mid);
  font-weight: 500;
  border: none;
}

/* Period pills (Live = green glow, others = neutral) */
.period-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.period-pill--live {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.period-pill__dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
  animation: period-pulse 1.8s ease-in-out infinite;
}

@keyframes period-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.08); }
}

.file-table__empty {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--pp-grey-dark);
  background: linear-gradient(135deg, var(--pp-white), var(--pp-mint-pale));
  border: 1px dashed rgba(0, 77, 64, 0.22);
  border-radius: 0.8rem;
}

.file-table__empty-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 3px 8px rgba(0, 77, 64, 0.12));
}

.file-table__empty-title {
  font-family: "Noto Serif", "Noto Sans", serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--pp-teal-dark);
  margin: 0 0 0.45rem;
}

.file-table__empty-body {
  font-size: 0.88rem;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .reports-hero { padding: 1.8rem 1.4rem; }
  .reports-hero__title { font-size: 2rem; }
}

.protocol-cards {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 0.5rem 2rem 2rem;
}

.protocol-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  background: linear-gradient(135deg, var(--pp-white), #f7fafc);
  border: 1px solid #e2e8f0;
  border-left: 5px solid var(--pp-teal);
  border-radius: 0.75rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 12px rgba(0, 77, 64, 0.07);
  transition: box-shadow 180ms ease, transform 120ms ease;
  cursor: pointer;
}

.protocol-card:hover {
  box-shadow: 0 4px 20px rgba(0, 77, 64, 0.14);
  transform: translateY(-1px);
}

.protocol-card__index {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.7rem;
  height: 2.1rem;
  padding: 0 0.8rem;
  background: linear-gradient(135deg, #e6fffa, var(--pp-mint));
  border: 1px solid #81e6d9;
  border-radius: 999px;
  color: var(--pp-teal-dark);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

.protocol-card__body {
  flex: 1;
  min-width: 0;
}

.protocol-card__body h2 {
  font-family: "Noto Serif", "Noto Sans", serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pp-teal-dark);
  margin: 0 0 0.25rem;
}

.protocol-card__body p {
  font-size: 0.86rem;
  color: var(--pp-grey-dark);
  line-height: 1.45;
  margin: 0;
}

.protocol-card__chevron {
  color: var(--pp-grey-mid);
  font-size: 1.4rem;
  font-weight: 300;
  transition: color 120ms ease, transform 120ms ease;
}

.protocol-card:hover .protocol-card__chevron {
  color: var(--pp-teal);
  transform: translateX(2px);
}

.coming-soon-box {
  margin: 1rem 2.5rem 2.5rem;
  padding: 2rem;
  background: linear-gradient(135deg, var(--pp-mint-pale), var(--pp-white));
  border: 1px solid #b2f5ea;
  border-radius: 0.75rem;
  text-align: center;
  color: var(--pp-grey-dark);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ============ PROTOCOL PAGE (ported from Ada's ProtocolLayout) ============ */
.protocol-page {
  max-width: none;
  margin: 0.5rem 0 2rem;
  background: var(--pp-white);
  border-radius: var(--pp-radius);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.09);
  overflow: hidden;
  border-top: 5px solid var(--pp-teal);
}

.protocol-page__breadcrumb {
  padding: 1.2rem 2.5rem 0.5rem;
  border-bottom: 3px solid var(--pp-teal);
}

.protocol-page__back {
  color: var(--pp-grey-mid);
  text-decoration: none;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 150ms ease;
}

.protocol-page__back:hover {
  color: var(--pp-teal);
}

.protocol-page__title-card {
  text-align: center;
  margin: 1.25rem 2.5rem;
  padding: 1.5rem;
  background: var(--pp-mint-pale);
  border-radius: 0.75rem;
}

.protocol-page__title-card h1 {
  font-family: "Noto Serif", "Noto Sans", serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--pp-teal-dark);
  margin: 0 0 0.4rem;
}

.protocol-page__title-card .subtitle {
  font-style: italic;
  color: var(--pp-grey-dark);
  font-size: 0.95rem;
  margin: 0 0 0.7rem;
}

.protocol-page__version {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #e6fffa, var(--pp-mint));
  border: 2px solid #81e6d9;
  color: var(--pp-teal-dark);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(0, 77, 64, 0.1);
}

.protocol-page__body {
  padding: 1rem 2.5rem 2rem;
  color: #1f2937;
  line-height: 1.6;
  font-size: 0.92rem;
}

.protocol-page__footer {
  padding: 1.2rem 2.5rem;
  background: linear-gradient(135deg, var(--pp-mint-pale), #f7fafc);
  text-align: center;
  border-top: 3px solid #b2f5ea;
  color: var(--pp-grey-mid);
  font-size: 0.72rem;
}

/* ============ PROTOCOL BLOCKS (ported from Ada's protocol-blocks.tsx) ============ */
.pb-section-heading {
  font-family: "Noto Serif", "Noto Sans", serif;
  font-size: 1.38rem;
  color: var(--pp-teal);
  font-weight: 700;
  margin: 1.75rem 0 0.85rem;
  padding: 0.6rem 0;
  border-bottom: 3px solid #cfc09f;
  position: relative;
  letter-spacing: 0.02em;
  scroll-margin-top: 1.5rem;
}

.pb-section-heading::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--pp-teal);
  border-radius: 2px;
}

/* StepBox */
.pb-step-box {
  padding: 1.1rem 1.25rem;
  margin: 0.9rem 0;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  border-left: 5px solid var(--pp-teal);
  background: linear-gradient(135deg, var(--pp-white), #f7fafc);
  box-shadow: 0 2px 12px rgba(0, 77, 64, 0.07);
  transition: box-shadow 180ms ease;
}

.pb-step-box:hover {
  box-shadow: 0 4px 20px rgba(0, 77, 64, 0.13);
}

.pb-step-box__title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--pp-teal);
  margin-bottom: 0.7rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid #e6fffa;
}

.pb-step-box__body {
  color: #4a5568;
  font-size: 0.88rem;
}

.pb-step-box__body strong {
  color: var(--pp-teal);
  font-weight: 700;
}

.pb-step-box--red {
  border-left-color: #dc2626;
  background: linear-gradient(135deg, var(--pp-white), #fef2f2);
}

.pb-step-box--red .pb-step-box__title {
  color: #991b1b;
  border-bottom-color: #fecaca;
}

.pb-step-box--black {
  border-left-color: #18181b;
  background: linear-gradient(135deg, var(--pp-white), #fafafa);
}

.pb-step-box--black .pb-step-box__title {
  color: #18181b;
  border-bottom-color: #e4e4e7;
}

.pb-step-box--warning {
  border-left-color: #f6ad55;
  background: linear-gradient(135deg, #fffbeb, #fef5e7);
}

.pb-step-box--warning .pb-step-box__title {
  color: #c05621;
  border-bottom-color: #fed7aa;
}

/* ===== Extended palette for StepBox (for richer editorial choice) ===== */

/* Blue — formal / official */
.pb-step-box--blue {
  border-left-color: #2563eb;
  background: linear-gradient(135deg, var(--pp-white), #eff6ff);
}
.pb-step-box--blue .pb-step-box__title { color: #1e40af; border-bottom-color: #bfdbfe; }

/* Sky — tip / gentle info */
.pb-step-box--sky {
  border-left-color: #0ea5e9;
  background: linear-gradient(135deg, var(--pp-white), #f0f9ff);
}
.pb-step-box--sky .pb-step-box__title { color: #075985; border-bottom-color: #bae6fd; }

/* Orange — attention (stronger than warning) */
.pb-step-box--orange {
  border-left-color: #ea580c;
  background: linear-gradient(135deg, var(--pp-white), #fff7ed);
}
.pb-step-box--orange .pb-step-box__title { color: #9a3412; border-bottom-color: #fed7aa; }

/* Peach — soft attention / note */
.pb-step-box--peach {
  border-left-color: #fdba74;
  background: linear-gradient(135deg, var(--pp-white), #fff1e6);
}
.pb-step-box--peach .pb-step-box__title { color: #9a3412; border-bottom-color: #fed7aa; }

/* Green — approved / success (distinct from teal) */
.pb-step-box--green {
  border-left-color: #16a34a;
  background: linear-gradient(135deg, var(--pp-white), #f0fdf4);
}
.pb-step-box--green .pb-step-box__title { color: #166534; border-bottom-color: #bbf7d0; }

/* Lime — go / positive / fresh */
.pb-step-box--lime {
  border-left-color: #84cc16;
  background: linear-gradient(135deg, var(--pp-white), #f7fee7);
}
.pb-step-box--lime .pb-step-box__title { color: #4d7c0f; border-bottom-color: #d9f99d; }

/* Yellow — soft highlight / reminder */
.pb-step-box--yellow {
  border-left-color: #eab308;
  background: linear-gradient(135deg, var(--pp-white), #fefce8);
}
.pb-step-box--yellow .pb-step-box__title { color: #854d0e; border-bottom-color: #fef08a; }

/* Nude — warm neutral / narrative */
.pb-step-box--nude {
  border-left-color: #d6c6b8;
  background: linear-gradient(135deg, var(--pp-white), #faf6f0);
}
.pb-step-box--nude .pb-step-box__title { color: #78563a; border-bottom-color: #e7d8c7; }

/* Grey — subdued / secondary */
.pb-step-box--grey {
  border-left-color: #64748b;
  background: linear-gradient(135deg, var(--pp-white), #f8fafc);
}
.pb-step-box--grey .pb-step-box__title { color: #334155; border-bottom-color: #cbd5e1; }

/* Purple — category / special */
.pb-step-box--purple {
  border-left-color: #8b5cf6;
  background: linear-gradient(135deg, var(--pp-white), #faf5ff);
}
.pb-step-box--purple .pb-step-box__title { color: #6b21a8; border-bottom-color: #ddd6fe; }

/* Rose — soft caution / sensitive */
.pb-step-box--rose {
  border-left-color: #fb7185;
  background: linear-gradient(135deg, var(--pp-white), #fff1f2);
}
.pb-step-box--rose .pb-step-box__title { color: #9f1239; border-bottom-color: #fecdd3; }

/* HighlightBox */
.pb-highlight-box {
  background: linear-gradient(135deg, var(--pp-teal), #285e61);
  color: var(--pp-white);
  padding: 1.25rem 1.4rem;
  margin: 1.2rem 0;
  border-radius: 0.9rem;
  border: 1px solid rgba(79, 209, 197, 0.3);
  box-shadow: 0 6px 24px rgba(0, 77, 64, 0.22);
}

.pb-highlight-box__title {
  color: #81e6d9;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.pb-highlight-box__body {
  color: #e6fffa;
  font-size: 0.9rem;
  line-height: 1.55;
}

.pb-highlight-box__body strong {
  color: var(--pp-white);
}

/* WarningBox */
.pb-warning-box {
  background: linear-gradient(135deg, #fffbeb, #fef5e7);
  border: 1px solid #fcd34d;
  border-left: 5px solid #f6ad55;
  padding: 0.95rem 1.1rem;
  margin: 0.9rem 0;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(246, 173, 85, 0.12);
  color: #1f2937;
  font-size: 0.88rem;
  line-height: 1.55;
}

.pb-warning-box strong {
  color: #c05621;
  font-weight: 700;
}

/* InfoBox */
.pb-info-box {
  border-radius: 0.9rem;
  padding: 1.1rem 1.25rem;
  margin: 0.9rem 0;
  border: 2px solid #81e6d9;
  background: linear-gradient(135deg, #e6fffa, #f0fdfa);
}

.pb-info-box__title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--pp-teal);
  padding-bottom: 0.45rem;
  margin-bottom: 0.65rem;
  border-bottom: 2px dashed #b2f5ea;
  letter-spacing: 0.02em;
}

.pb-info-box__body {
  color: #4a5568;
  font-size: 0.88rem;
  line-height: 1.55;
}

.pb-info-box--red {
  border-color: #fca5a5;
  border-left: 5px solid #dc2626;
  background: linear-gradient(135deg, #fef2f2, #fff5f5);
}

.pb-info-box--red .pb-info-box__title {
  color: #991b1b;
  border-bottom-color: #fca5a5;
}

.pb-info-box--amber {
  border-color: #fcd34d;
  border-left: 5px solid #f59e0b;
  background: linear-gradient(135deg, #fffbeb, #fefce8);
}

.pb-info-box--amber .pb-info-box__title {
  color: #92400e;
  border-bottom-color: #fcd34d;
}

.pb-info-box--slate {
  border-color: #94a3b8;
  border-left: 5px solid #475569;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.pb-info-box--slate .pb-info-box__title {
  color: #1e293b;
  border-bottom-color: #94a3b8;
}

/* ===== Extended InfoBox variants ===== */
.pb-info-box--blue {
  border-color: #bfdbfe;
  border-left: 5px solid #2563eb;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
}
.pb-info-box--blue .pb-info-box__title { color: #1e40af; border-bottom-color: #bfdbfe; }

.pb-info-box--sky {
  border-color: #bae6fd;
  border-left: 5px solid #0ea5e9;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
}
.pb-info-box--sky .pb-info-box__title { color: #075985; border-bottom-color: #bae6fd; }

.pb-info-box--orange {
  border-color: #fed7aa;
  border-left: 5px solid #ea580c;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
}
.pb-info-box--orange .pb-info-box__title { color: #9a3412; border-bottom-color: #fed7aa; }

.pb-info-box--peach {
  border-color: #fed7aa;
  border-left: 5px solid #fdba74;
  background: linear-gradient(135deg, #fff1e6, #ffedd5);
}
.pb-info-box--peach .pb-info-box__title { color: #9a3412; border-bottom-color: #fed7aa; }

.pb-info-box--green {
  border-color: #bbf7d0;
  border-left: 5px solid #16a34a;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}
.pb-info-box--green .pb-info-box__title { color: #166534; border-bottom-color: #bbf7d0; }

.pb-info-box--lime {
  border-color: #d9f99d;
  border-left: 5px solid #84cc16;
  background: linear-gradient(135deg, #f7fee7, #ecfccb);
}
.pb-info-box--lime .pb-info-box__title { color: #4d7c0f; border-bottom-color: #d9f99d; }

.pb-info-box--yellow {
  border-color: #fef08a;
  border-left: 5px solid #eab308;
  background: linear-gradient(135deg, #fefce8, #fef9c3);
}
.pb-info-box--yellow .pb-info-box__title { color: #854d0e; border-bottom-color: #fef08a; }

.pb-info-box--nude {
  border-color: #e7d8c7;
  border-left: 5px solid #d6c6b8;
  background: linear-gradient(135deg, #faf6f0, #f5ebdd);
}
.pb-info-box--nude .pb-info-box__title { color: #78563a; border-bottom-color: #e7d8c7; }

.pb-info-box--grey {
  border-color: #cbd5e1;
  border-left: 5px solid #64748b;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}
.pb-info-box--grey .pb-info-box__title { color: #334155; border-bottom-color: #cbd5e1; }

.pb-info-box--purple {
  border-color: #ddd6fe;
  border-left: 5px solid #8b5cf6;
  background: linear-gradient(135deg, #faf5ff, #f3e8ff);
}
.pb-info-box--purple .pb-info-box__title { color: #6b21a8; border-bottom-color: #ddd6fe; }

.pb-info-box--rose {
  border-color: #fecdd3;
  border-left: 5px solid #fb7185;
  background: linear-gradient(135deg, #fff1f2, #ffe4e6);
}
.pb-info-box--rose .pb-info-box__title { color: #9f1239; border-bottom-color: #fecdd3; }

/* ===== Extended BulletList variants ===== */
.pb-bullets--blue li::before  { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.pb-bullets--sky li::before   { background: linear-gradient(135deg, #0ea5e9, #7dd3fc); }
.pb-bullets--orange li::before{ background: linear-gradient(135deg, #ea580c, #fb923c); }
.pb-bullets--peach li::before { background: linear-gradient(135deg, #fdba74, #fed7aa); }
.pb-bullets--green li::before { background: linear-gradient(135deg, #16a34a, #4ade80); }
.pb-bullets--lime li::before  { background: linear-gradient(135deg, #84cc16, #bef264); }
.pb-bullets--yellow li::before{ background: linear-gradient(135deg, #eab308, #facc15); }
.pb-bullets--nude li::before  { background: linear-gradient(135deg, #d6c6b8, #e7d8c7); }
.pb-bullets--grey li::before  { background: linear-gradient(135deg, #64748b, #94a3b8); }
.pb-bullets--purple li::before{ background: linear-gradient(135deg, #8b5cf6, #c4b5fd); }
.pb-bullets--rose li::before  { background: linear-gradient(135deg, #fb7185, #fda4af); }

/* ===== Extended DataTable variants (header gradients) ===== */
.pb-data-table--blue   { border-color: #bfdbfe; }
.pb-data-table--blue thead th   { background: linear-gradient(135deg, #1e40af, #2563eb); }
.pb-data-table--sky    { border-color: #bae6fd; }
.pb-data-table--sky thead th    { background: linear-gradient(135deg, #075985, #0ea5e9); }
.pb-data-table--orange { border-color: #fed7aa; }
.pb-data-table--orange thead th { background: linear-gradient(135deg, #9a3412, #ea580c); }
.pb-data-table--green  { border-color: #bbf7d0; }
.pb-data-table--green thead th  { background: linear-gradient(135deg, #166534, #16a34a); }
.pb-data-table--lime   { border-color: #d9f99d; }
.pb-data-table--lime thead th   { background: linear-gradient(135deg, #4d7c0f, #84cc16); }
.pb-data-table--yellow { border-color: #fef08a; }
.pb-data-table--yellow thead th { background: linear-gradient(135deg, #854d0e, #eab308); color: #451a03; }
.pb-data-table--nude   { border-color: #e7d8c7; }
.pb-data-table--nude thead th   { background: linear-gradient(135deg, #78563a, #a47c59); }
.pb-data-table--grey   { border-color: #cbd5e1; }
.pb-data-table--grey thead th   { background: linear-gradient(135deg, #334155, #64748b); }
.pb-data-table--purple { border-color: #ddd6fe; }
.pb-data-table--purple thead th { background: linear-gradient(135deg, #6b21a8, #8b5cf6); }
.pb-data-table--rose   { border-color: #fecdd3; }
.pb-data-table--rose thead th   { background: linear-gradient(135deg, #9f1239, #fb7185); }

/* BulletList */
.pb-bullets {
  list-style: none;
  margin: 0.3rem 0;
  padding: 0;
}

.pb-bullets li {
  position: relative;
  padding-left: 1.4rem;
  margin: 0.4rem 0;
  color: #4a5568;
  font-size: 0.88rem;
  line-height: 1.55;
}

.pb-bullets li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.48rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pp-teal), #4fd1c5);
}

.pb-bullets--red li::before {
  background: linear-gradient(135deg, #dc2626, #f87171);
}

.pb-bullets--black li::before {
  background: linear-gradient(135deg, #18181b, #3f3f46);
}

.pb-bullets li strong {
  color: var(--pp-teal);
  font-weight: 700;
}

/* SubBulletList */
.pb-sub-bullets {
  list-style: none;
  margin: 0.3rem 0 0.3rem 0.9rem;
  padding: 0;
}

.pb-sub-bullets li {
  position: relative;
  padding-left: 1.3rem;
  margin: 0.3rem 0;
  color: #4a5568;
  font-size: 0.84rem;
  line-height: 1.5;
}

.pb-sub-bullets li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.5rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: transparent;
  border: 2px solid #4fd1c5;
}

/* DataTable */
.pb-data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 2px solid #b2f5ea;
  margin: 1rem 0;
  box-shadow: 0 2px 15px rgba(0, 77, 64, 0.1);
  font-size: 0.84rem;
}

.pb-data-table thead th {
  background: linear-gradient(135deg, var(--pp-teal), #319795);
  color: var(--pp-white);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0.7rem 0.85rem;
  text-align: left;
  border: 1px solid #d5f5f0;
}

.pb-data-table tbody td {
  padding: 0.65rem 0.85rem;
  border: 1px solid #d5f5f0;
  background: var(--pp-white);
  vertical-align: top;
}

.pb-data-table tbody td strong {
  color: var(--pp-teal);
}

.pb-data-table tbody tr:nth-child(even) td {
  background: linear-gradient(135deg, #f0fdfa, var(--pp-white));
}

.pb-data-table tbody tr:hover td {
  background: #e6fffa;
}

.pb-data-table--red {
  border-color: #fca5a5;
  box-shadow: 0 2px 15px rgba(220, 38, 38, 0.1);
}

.pb-data-table--red thead th {
  background: linear-gradient(135deg, #991b1b, #b91c1c);
}

.pb-data-table--black {
  border-color: #a1a1aa;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.pb-data-table--black thead th {
  background: linear-gradient(135deg, #18181b, #3f3f46);
}

.pb-data-table--mixed thead th:nth-child(1) { background: linear-gradient(135deg, var(--pp-teal), #319795); }
.pb-data-table--mixed thead th:nth-child(2) { background: linear-gradient(135deg, #991b1b, #b91c1c); }
.pb-data-table--mixed thead th:nth-child(3) { background: linear-gradient(135deg, #18181b, #3f3f46); }
.pb-data-table--mixed tbody td:nth-child(1) { border-left: 3px solid #81e6d9; }
.pb-data-table--mixed tbody td:nth-child(2) { border-left: 3px solid #fca5a5; background: rgba(254, 242, 242, 0.35); }
.pb-data-table--mixed tbody td:nth-child(3) { border-left: 3px solid #a1a1aa; background: rgba(244, 244, 245, 0.35); }

.pb-data-table--matrix thead th:nth-child(1) { background: linear-gradient(135deg, #991b1b, #b91c1c); }
.pb-data-table--matrix thead th:nth-child(2) { background: linear-gradient(135deg, #92400e, #b45309); }
.pb-data-table--matrix thead th:nth-child(3) { background: linear-gradient(135deg, #1e293b, #334155); }
.pb-data-table--matrix tbody td:nth-child(1) { border-left: 4px solid #f87171; background: rgba(254, 226, 226, 0.3); color: #991b1b; font-weight: 600; }
.pb-data-table--matrix tbody td:nth-child(2) { border-left: 4px solid #fbbf24; background: rgba(254, 243, 199, 0.3); color: #92400e; font-weight: 600; }
.pb-data-table--matrix tbody td:nth-child(3) { border-left: 4px solid #94a3b8; background: rgba(241, 245, 249, 0.4); color: #1e293b; font-weight: 600; }

/* Table of Contents */
.pb-toc {
  background: linear-gradient(135deg, var(--pp-white), #f7fafc);
  border: 1px solid #e2e8f0;
  border-left: 5px solid var(--pp-teal);
  border-radius: 0.75rem;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 2px 12px rgba(0, 77, 64, 0.08);
}

.pb-toc__title {
  color: var(--pp-teal);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0 0 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid #e6fffa;
}

.pb-toc__list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pb-toc__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.95rem;
  background: linear-gradient(135deg, var(--pp-white), #f0fdfa);
  border: 1px solid #d5f5f0;
  border-left: 4px solid var(--pp-teal);
  border-radius: 0.5rem;
  color: #1f2937;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.pb-toc__item:hover {
  background: #e6fffa;
  border-left-color: #319795;
  box-shadow: 0 2px 8px rgba(0, 77, 64, 0.12);
}

.pb-toc__item-go {
  color: var(--pp-teal);
  font-weight: 800;
  transition: transform 150ms ease;
}

.pb-toc__item:hover .pb-toc__item-go {
  transform: translateX(3px);
}

/* ============ NOTES + FOLLOW UP ============ */
.note-input {
  width: 100%;
  min-height: 32px;
  padding: 0.32rem 0.45rem;
  border: 1px solid var(--pp-grey-light);
  border-radius: var(--pp-radius-sm);
  resize: vertical;
  background: var(--pp-white);
  color: var(--pp-charcoal);
  font: inherit;
  font-size: 0.74rem;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
  line-height: 1.3;
}

.note-input::placeholder {
  color: var(--pp-grey-mid);
  font-style: italic;
}

.note-input:focus {
  border-color: var(--pp-teal);
  background: var(--pp-white);
  box-shadow: 0 0 0 3px rgba(0, 105, 92, 0.08);
  min-height: 72px;
}

.follow-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px dashed var(--pp-grey-light);
  background: transparent;
  color: var(--pp-grey-mid);
  font: inherit;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-transform: none;
  transition: all 120ms ease;
  min-width: 100px;
}

.follow-pill:hover {
  border-style: solid;
  border-color: var(--pp-orange);
  color: var(--pp-orange);
  background: rgba(229, 139, 58, 0.06);
}

.follow-pill.is-active {
  background: var(--pp-orange);
  border: 1px solid var(--pp-orange);
  color: var(--pp-white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.62rem;
  font-weight: 800;
}

.follow-pill.is-active:hover {
  background: #d07b2e;
  border-color: #d07b2e;
  color: var(--pp-white);
}

.follow-pill__label {
  display: block;
  line-height: 1.2;
  white-space: nowrap;
}

.save-indicator {
  display: block;
  margin-top: 0.3rem;
  min-height: 0.9rem;
  font-size: 0.72rem;
  color: var(--pp-grey-mid);
}

.save-indicator.is-success { color: var(--pp-teal); font-weight: 700; }
.save-indicator.is-error   { color: #c05a3d; font-weight: 700; }

/* ============ HISTORY PANE ============ */
.history-pane {
  display: none; /* removed from layout; Rage manages history via backend */
}

.history-pane__header {
  padding: 0.2rem 0.3rem 0.85rem;
  border-bottom: 1px solid var(--pp-grey-light);
}

.history-pane__header h2 {
  margin: 0;
  color: var(--pp-teal-dark);
  font-size: 1.1rem;
}

.history-pane__header p {
  margin: 0.2rem 0 0;
  color: var(--pp-grey-mid);
  font-size: 0.82rem;
}

.history-list {
  overflow: auto;
  padding-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.history-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--pp-grey-light);
  border-radius: var(--pp-radius-sm);
  background: var(--pp-white);
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  color: inherit;
  transition: all 120ms ease;
}

.history-item:hover {
  border-color: var(--pp-mint);
  background: var(--pp-mint-pale);
  transform: translateY(-1px);
}

.history-item__date {
  color: var(--pp-teal);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.history-item__title {
  margin-top: 0.2rem;
  font-size: 0.86rem;
  color: var(--pp-charcoal);
}

.empty-state {
  padding: 1.8rem 1rem;
  text-align: center;
  color: var(--pp-grey-mid);
  font-size: 0.88rem;
  font-style: italic;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1280px) {
  .layout { grid-template-columns: 1fr; }
  .history-pane { position: static; max-height: none; }
}

@media (max-width: 960px) {
  .app-shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 1rem;
  }
  .sidebar__brand { flex-direction: row; padding-bottom: 1rem; margin-bottom: 0.8rem; justify-content: flex-start; gap: 0.8rem; }
  .sidebar__logo { width: 92px; }
  .sidebar__hamburger { display: inline-block; }
  .sidebar__nav { display: none; }
  .sidebar.is-open .sidebar__nav { display: flex; }
  .sidebar__footer { display: none; }
  .content-shell { padding: 1rem; }
}
