/* Navy scrollbar styling, applied globally (works in Chromium + Firefox) */
html {
  scrollbar-color: var(--cr-navy, #09121f) var(--cr-pale-blue-pale, #EEF1F5);
  scrollbar-width: thin;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #EEF1F5;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #09121f, #09121F);
  border-radius: 10px;
  border: 2px solid #EEF1F5;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #09121F, #09121F);
}
::-webkit-scrollbar-corner {
  background: #EEF1F5;
}

:root {
  /* === CR Ops navy palette (sampled from CR branding 2026-05-18) === */
  --cr-navy:            #09121f;   /* primary brand navy (sidebar, headers) */
  --cr-navy-dark:       #09121F;   /* deeper navy (hover, gradient mid) */
  --cr-navy-deep:       #09121F;   /* deepest navy (gradient end, shadow base) */
  --cr-pale-blue:       #B9C3D2;   /* medium pale blue (accents) */
  --cr-pale-blue-soft:  #DDE3EB;   /* soft pale blue (rows, panels) */
  --cr-pale-blue-pale:  #EEF1F5;   /* very pale blue (page bg) */
  --cr-pale-blue-bg:    #E5EAF1;   /* soft alt bg */
  --cr-accent:          #4A6FA5;   /* success green (kept brand-agnostic) */
  --cr-accent-soft:     #7A9CC9;
  --cr-charcoal:        #2C2C2C;
  --cr-grey-dark:       #555;
  --cr-grey-mid:        #999;
  --cr-grey-light:      #E8E8E8;
  --cr-grey-bg:         #F5F5F5;
  --cr-card-bg:         #FAFAFA;
  --cr-white:           #FFFFFF;
  --cr-orange:          #E58B3A;   /* alert/warning */
  --cr-shadow:          0 6px 18px rgba(9, 18, 31, 0.06);
  --cr-shadow-soft:     0 2px 8px rgba(44, 44, 44, 0.05);
  --cr-radius:          10px;
  --cr-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(--cr-charcoal);
  background: var(--cr-pale-blue-pale);
}

body { min-height: 100vh; }

/* ============ APP SHELL ============ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ============ SIDEBAR ============ */
.sidebar {
  width: 260px;
  background: #09121F;
  color: var(--cr-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(255, 255, 255, 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(--cr-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(--cr-radius-sm);
  color: var(--cr-pale-blue-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(255, 255, 255, 0.1);
  color: var(--cr-white);
}

.sidebar__link small {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.sidebar__link--active {
  background: var(--cr-pale-blue);
  color: var(--cr-navy-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.sidebar__link--active:hover {
  background: var(--cr-pale-blue);
  color: var(--cr-navy-dark);
}

.sidebar__link--disabled {
  color: rgba(255, 255, 255, 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(255, 255, 255, 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(255, 255, 255, 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(255, 255, 255, 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(255, 255, 255, 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(--cr-pale-blue);
  color: var(--cr-navy-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(--cr-navy-dark);
}

.sidebar__footer {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  letter-spacing: 0.04em;
}

/* ============ CONTENT ============ */
.content-shell {
  flex: 1;
  padding: 0.25rem 1rem 1.5rem 1rem;
  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(--cr-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(--cr-grey-light);
}

.report-header__eyebrow {
  color: var(--cr-navy);
  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(--cr-navy-dark);
  letter-spacing: 0.01em;
}

.report-header p {
  margin: 0.2rem 0;
  color: var(--cr-grey-dark);
  font-size: 0.82rem;
}

.report-header__date {
  color: var(--cr-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(--cr-pale-blue-pale);
  font-size: 0.72rem;
  color: var(--cr-grey-dark);
  border: 1px solid rgba(9, 18, 31, 0.05);
}

/* ============ AGENT FILTER ============ */
.agent-filter {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.9rem;
  flex-wrap: wrap;
}

.agent-filter__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cr-grey-dark);
  letter-spacing: 0.01em;
}

.agent-filter__select {
  appearance: none;
  padding: 0.4rem 2rem 0.4rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(9, 18, 31, 0.22);
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%23004d40' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat right 0.65rem center;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--cr-charcoal);
  min-width: 210px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.agent-filter__select:hover {
  border-color: var(--cr-navy);
}

.agent-filter__select:focus {
  outline: none;
  border-color: var(--cr-navy);
  box-shadow: 0 0 0 3px rgba(0, 128, 128, 0.12);
}

.agent-filter__clear {
  appearance: none;
  border: 1px solid rgba(9, 18, 31, 0.18);
  background: var(--cr-pale-blue-pale);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--cr-navy);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.agent-filter__clear:hover {
  background: #EEF1F5;
  border-color: var(--cr-navy);
}

/* ============ 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(--cr-charcoal);
}

.action-table thead th {
  position: sticky;
  top: 0;
  background: var(--cr-pale-blue-pale);
  color: var(--cr-navy-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(--cr-pale-blue);
  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(--cr-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(--cr-pale-blue-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(--cr-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(--cr-orange);
  color: var(--cr-white);
}

.priority-badge--MEDIUM {
  background: var(--cr-navy-dark);
  color: var(--cr-white);
}

.priority-badge--LOW {
  background: var(--cr-pale-blue);
  color: var(--cr-navy-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(--cr-pale-blue-pale);
  color: var(--cr-navy-dark);
  border: 1px dashed rgba(9, 18, 31, 0.35);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
  white-space: nowrap;
}

.resolve-pill:hover {
  background: var(--cr-pale-blue);
  border-style: solid;
  border-color: var(--cr-navy-dark);
}

.resolve-pill.is-reopen {
  background: var(--cr-white);
  color: var(--cr-navy);
  border: 1px solid var(--cr-navy);
}

.resolve-pill.is-reopen:hover {
  background: var(--cr-navy);
  color: var(--cr-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(--cr-white);
  border-radius: var(--cr-radius);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border-top: 4px solid var(--cr-navy);
}

.guideline-header {
  text-align: center;
  margin: 1.25rem 2.5rem;
  padding: 1.25rem;
  background: var(--cr-pale-blue-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(--cr-navy-dark);
  margin: 0 0 0.35rem;
}

.guideline-subtitle {
  font-style: italic;
  color: var(--cr-grey-dark);
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
}

.guideline-hint {
  color: var(--cr-grey-mid);
  font-size: 0.82rem;
  margin: 0.4rem 0 0;
}

.guideline-eyebrow {
  color: var(--cr-navy);
  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 #B9C3D2;
  background: var(--cr-white);
  color: var(--cr-charcoal);
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(9, 18, 31, 0.06);
  transition: border-color 150ms ease, box-shadow 150ms ease;
  font-family: inherit;
}

.guideline-search__input:focus {
  outline: none;
  border-color: var(--cr-navy);
  box-shadow: 0 3px 14px rgba(9, 18, 31, 0.15);
}

.guideline-search__icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cr-navy);
  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(--cr-navy);
  margin: 0 0 0.2rem;
}

/* Search hit highlight (inline <mark> inside cards + protocol body) */
mark.search-hit {
  background: #fef08a;
  color: #854d0e;
  padding: 0 0.12em;
  border-radius: 0.2em;
  font-weight: 700;
}

/* Currently-focused hit when Enter-cycling through protocol matches */
mark.search-hit--current {
  background: #f59e0b;
  color: #fff;
  outline: 2px solid #d97706;
  outline-offset: 1px;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.45);
}

/* CSR checklists (email-style) use their own 900px cap internally —
   override to fill the protocol-page width when embedded in ops. */
.csr-embed .email-container {
  max-width: none !important;
  box-shadow: none !important;
}

/* The intake progress bars were sticky-top in the standalone email — in the
   embedded SPA they overlaid the ops sidebar. Pin them to normal flow. */
.csr-embed .progress-wrapper {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  box-shadow: none !important;
}

/* The checklists' standalone HTML has its own <div class="header"> with
   title + subtitle — redundant with our protocol-page title-card above.
   Hide when embedded. */
.csr-embed .email-container > .header,
.csr-embed .email-container > .title-section {
  display: none !important;
}

/* Tighten the top of embedded checklists so they hug the title-card */
.csr-embed .email-container,
.csr-embed .email-container > .content,
.csr-embed .email-container > .protocol-section:first-child {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.protocol-card__ext {
  font-size: 0.78rem;
  color: var(--cr-navy);
  margin-left: 0.3rem;
  vertical-align: middle;
}

/* ============ REPORTS HUB ============ */
.reports-container {
  margin: 0.5rem 0 2rem;
}

.reports-hero {
  position: relative;
  overflow: hidden;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  background: var(--cr-navy);
  color: var(--cr-white);
  box-shadow: 0 4px 12px rgba(9, 18, 31, 0.12);
  border: 1px solid rgba(9, 18, 31, 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: #B9C3D2;
  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: #dde3eb;
  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(255, 255, 255, 0.35);
  color: #EEF1F5;
  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(255, 255, 255, 0.3);
  color: #B9C3D2;
  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(--cr-white) 0%, var(--cr-pale-blue-pale) 100%);
  border: 1px dashed rgba(9, 18, 31, 0.22);
  border-radius: 1rem;
  color: var(--cr-grey-dark);
  box-shadow: 0 3px 14px rgba(9, 18, 31, 0.06);
}

.reports-empty__icon {
  font-size: 3.2rem;
  line-height: 1;
  margin-bottom: 0.6rem;
  filter: drop-shadow(0 4px 8px rgba(9, 18, 31, 0.15));
}

.reports-empty__title {
  font-family: "Noto Serif", "Noto Sans", serif;
  color: var(--cr-navy-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;
}

/* ============ EMBEDDED APP CONTAINER (iframe) ============ */
.embed-container {
  display: flex;
  flex-direction: column;
  background: var(--cr-white);
  border: 1px solid var(--cr-grey-light);
  border-radius: 0.9rem;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(9, 18, 31, 0.06);
  min-height: calc(100vh - 4rem);
}

.embed-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  background: var(--cr-pale-blue-pale);
  border-bottom: 1px solid #B9C3D2;
}

.embed-eyebrow {
  color: var(--cr-navy);
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  font-weight: 800;
  margin: 0 0 0.2rem;
}

.embed-title {
  font-family: "Noto Serif", "Noto Sans", serif;
  color: var(--cr-navy-dark);
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 0.3rem;
  letter-spacing: 0.01em;
}

.embed-subtitle {
  color: var(--cr-grey-dark);
  font-size: 0.85rem;
  margin: 0;
  max-width: 720px;
  line-height: 1.5;
}

.embed-frame {
  flex: 1;
  width: 100%;
  border: 0;
  min-height: calc(100vh - 12rem);
  background: var(--cr-white);
}

/* Full-bleed variant: iframe stretches to fill ops content area, no chrome */
.embed-frame--bleed {
  display: block;
  width: 100%;
  height: calc(100vh - 3rem);
  min-height: calc(100vh - 3rem);
  border: 0;
  background: var(--cr-pale-blue-pale);
}

/* Premier Auditor host-header — lives inline inside .topbar, left side */
.premier-host-header {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  padding-left: 0.4rem;
}

.premier-host-header__title {
  font-family: "Noto Sans", -apple-system, system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--cr-navy-dark, #09121F);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.premier-host-header__dot {
  opacity: 0.55;
  margin: 0 0.3rem;
}

/* Widen Premier's .wrap container when embedded in ops (no hard cap) */
.pp-embedded .wrap {
  max-width: none !important;
  width: auto !important;
}

/* ============ FILE TABLE (Reports / Audits / etc) ============ */
.file-table-section {
  margin-top: 1.5rem;
  background: var(--cr-white);
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.4rem 1.6rem 1.2rem;
  box-shadow: 0 4px 18px rgba(9, 18, 31, 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(--cr-navy-dark);
  margin: 0 0 0.2rem;
}

.file-table-section__hint {
  color: var(--cr-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 #B9C3D2;
  background: var(--cr-white);
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--cr-charcoal);
  min-width: 220px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.file-table-section__search:focus {
  outline: none;
  border-color: var(--cr-navy);
  box-shadow: 0 2px 10px rgba(9, 18, 31, 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(--cr-navy), var(--cr-navy-dark));
  color: var(--cr-white);
  box-shadow: 0 3px 12px rgba(9, 18, 31, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 5px 18px rgba(9, 18, 31, 0.3);
}

.btn-ghost {
  background: var(--cr-white);
  color: var(--cr-navy);
  border-color: var(--cr-pale-blue);
}

.btn-ghost:hover {
  background: var(--cr-pale-blue-pale);
  border-color: var(--cr-navy);
}

/* 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(--cr-grey-mid);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--cr-grey-light);
}

.file-table tbody td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid #f1f5f9;
  color: var(--cr-charcoal);
  text-align: center;
  vertical-align: middle;
}

.file-table tbody tr:hover td {
  background: var(--cr-pale-blue-pale);
}

.file-table tbody tr:last-child td {
  border-bottom: none;
}

.file-table__size { white-space: nowrap; color: var(--cr-grey-mid); }
.file-table__actions { width: 1%; white-space: nowrap; text-align: center; }

.file-table__name {
  font-weight: 700;
  color: var(--cr-navy-dark);
  font-family: "Noto Serif", "Noto Sans", serif;
  letter-spacing: 0.01em;
}

.file-table__desc {
  margin-top: 0.2rem;
  font-family: "Noto Sans", system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--cr-grey-mid);
  letter-spacing: 0;
}

.btn.is-muted {
  color: var(--cr-grey-mid);
  cursor: default;
  border-color: transparent;
  background: transparent;
}

/* Compliance landing — signal-source grid */
.compliance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.4rem 0 0.4rem;
}

.compliance-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, var(--cr-white) 0%, var(--cr-pale-blue-pale) 100%);
  border: 1px solid rgba(9, 18, 31, 0.12);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 2px 10px rgba(9, 18, 31, 0.05);
}

.compliance-card:hover {
  transform: translateY(-1px);
  border-color: rgba(9, 18, 31, 0.25);
  box-shadow: 0 6px 18px rgba(9, 18, 31, 0.1);
}

.compliance-card__icon {
  font-size: 1.8rem;
  flex: 0 0 auto;
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 18, 31, 0.14);
  border-radius: 0.7rem;
}

.compliance-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.compliance-card__body h3 {
  margin: 0 0 0.2rem;
  font-family: "Noto Serif", "Noto Sans", serif;
  font-size: 1rem;
  color: var(--cr-navy-dark);
}

.compliance-card__body p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--cr-grey-mid);
  line-height: 1.4;
}

.compliance-card__chevron {
  flex: 0 0 auto;
  font-size: 1.4rem;
  color: var(--cr-navy);
  opacity: 0.7;
}

.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(--cr-pale-blue-pale);
  color: var(--cr-navy-dark);
  border-color: #B9C3D2;
}

.role-chip--team_leader {
  background: #EEF1F5;
  color: #166534;
  border-color: #B9C3D2;
}

.role-chip--user {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

.role-chip--none {
  background: transparent;
  color: var(--cr-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: #EEF1F5;
  color: #166534;
  border-color: #B9C3D2;
}

.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(--cr-grey-dark);
  background: linear-gradient(135deg, var(--cr-white), var(--cr-pale-blue-pale));
  border: 1px dashed rgba(9, 18, 31, 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(9, 18, 31, 0.12));
}

.file-table__empty-title {
  font-family: "Noto Serif", "Noto Sans", serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cr-navy-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(--cr-white), #f7fafc);
  border: 1px solid #e2e8f0;
  border-left: 5px solid var(--cr-navy);
  border-radius: 0.75rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 12px rgba(9, 18, 31, 0.07);
  transition: box-shadow 180ms ease, transform 120ms ease;
  cursor: pointer;
}

.protocol-card:hover {
  box-shadow: 0 4px 20px rgba(9, 18, 31, 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, #EEF1F5, var(--cr-pale-blue));
  border: 1px solid #B9C3D2;
  border-radius: 999px;
  color: var(--cr-navy-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(--cr-navy-dark);
  margin: 0 0 0.25rem;
}

.protocol-card__body p {
  font-size: 0.86rem;
  color: var(--cr-grey-dark);
  line-height: 1.45;
  margin: 0;
}

.protocol-card__chevron {
  color: var(--cr-grey-mid);
  font-size: 1.4rem;
  font-weight: 300;
  transition: color 120ms ease, transform 120ms ease;
}

.protocol-card:hover .protocol-card__chevron {
  color: var(--cr-navy);
  transform: translateX(2px);
}

.coming-soon-box {
  margin: 1rem 2.5rem 2.5rem;
  padding: 2rem;
  background: linear-gradient(135deg, var(--cr-pale-blue-pale), var(--cr-white));
  border: 1px solid #B9C3D2;
  border-radius: 0.75rem;
  text-align: center;
  color: var(--cr-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(--cr-white);
  border-radius: var(--cr-radius);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.09);
  overflow: hidden;
  border-top: 5px solid var(--cr-navy);
}

.protocol-page__breadcrumb {
  padding: 1.2rem 2.5rem 0.5rem;
  border-bottom: 3px solid var(--cr-navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.protocol-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 360px;
  flex: 1;
  min-width: 220px;
}

.protocol-search__input {
  width: 100%;
  padding: 0.5rem 3rem 0.5rem 2.2rem;
  border-radius: 999px;
  border: 1px solid #B9C3D2;
  background: var(--cr-white);
  color: var(--cr-charcoal);
  font-size: 0.88rem;
  font-family: inherit;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.protocol-search__input:focus {
  outline: none;
  border-color: var(--cr-navy);
  box-shadow: 0 2px 10px rgba(9, 18, 31, 0.12);
}

.protocol-search__icon {
  position: absolute;
  left: 0.75rem;
  color: var(--cr-navy);
  font-size: 0.88rem;
  opacity: 0.7;
  pointer-events: none;
}

.protocol-search__count {
  position: absolute;
  right: 0.85rem;
  font-size: 0.72rem;
  color: var(--cr-grey-mid);
  pointer-events: none;
  white-space: nowrap;
}

.protocol-page__back {
  color: var(--cr-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(--cr-navy);
}

.protocol-page__title-card {
  text-align: center;
  margin: 1.25rem 2.5rem 0.75rem;
  padding: 1.25rem 1.5rem;
  background: var(--cr-pale-blue-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(--cr-navy-dark);
  margin: 0 0 0.4rem;
}

.protocol-page__title-card .subtitle {
  font-style: italic;
  color: var(--cr-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, #EEF1F5, var(--cr-pale-blue));
  border: 2px solid #B9C3D2;
  color: var(--cr-navy-dark);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(9, 18, 31, 0.1);
}

.protocol-page__body {
  padding: 0.5rem 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(--cr-pale-blue-pale), #f7fafc);
  text-align: center;
  border-top: 3px solid #B9C3D2;
  color: var(--cr-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(--cr-navy);
  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(--cr-navy);
  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(--cr-navy);
  background: linear-gradient(135deg, var(--cr-white), #f7fafc);
  box-shadow: 0 2px 12px rgba(9, 18, 31, 0.07);
  transition: box-shadow 180ms ease;
}

.pb-step-box:hover {
  box-shadow: 0 4px 20px rgba(9, 18, 31, 0.13);
}

.pb-step-box__title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--cr-navy);
  margin-bottom: 0.7rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid #EEF1F5;
}

.pb-step-box__body {
  color: #4a5568;
  font-size: 0.88rem;
}

.pb-step-box__body strong {
  color: var(--cr-navy);
  font-weight: 700;
}

.pb-step-box--red {
  border-left-color: #dc2626;
  background: linear-gradient(135deg, var(--cr-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(--cr-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(--cr-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(--cr-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(--cr-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(--cr-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(--cr-white), #EEF1F5);
}
.pb-step-box--green .pb-step-box__title { color: #166534; border-bottom-color: #B9C3D2; }

/* Lime — go / positive / fresh */
.pb-step-box--lime {
  border-left-color: #4A6FA5;
  background: linear-gradient(135deg, var(--cr-white), #EEF1F5);
}
.pb-step-box--lime .pb-step-box__title { color: #09121F; border-bottom-color: #DDE3EB; }

/* Yellow — soft highlight / reminder */
.pb-step-box--yellow {
  border-left-color: #eab308;
  background: linear-gradient(135deg, var(--cr-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(--cr-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(--cr-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(--cr-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(--cr-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(--cr-navy), #4A6FA5);
  color: var(--cr-white);
  padding: 1.25rem 1.4rem;
  margin: 1.2rem 0;
  border-radius: 0.9rem;
  border: 1px solid rgba(9, 18, 31, 0.3);
  box-shadow: 0 6px 24px rgba(9, 18, 31, 0.22);
}

.pb-highlight-box__title {
  color: #B9C3D2;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.pb-highlight-box__body {
  color: #EEF1F5;
  font-size: 0.9rem;
  line-height: 1.55;
}

.pb-highlight-box__body strong {
  color: var(--cr-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 #B9C3D2;
  background: linear-gradient(135deg, #EEF1F5, #EEF1F5);
}

.pb-info-box__title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--cr-navy);
  padding-bottom: 0.45rem;
  margin-bottom: 0.65rem;
  border-bottom: 2px dashed #B9C3D2;
  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: #B9C3D2;
  border-left: 5px solid #16a34a;
  background: linear-gradient(135deg, #EEF1F5, #EEF1F5);
}
.pb-info-box--green .pb-info-box__title { color: #166534; border-bottom-color: #B9C3D2; }

.pb-info-box--lime {
  border-color: #DDE3EB;
  border-left: 5px solid #4A6FA5;
  background: linear-gradient(135deg, #EEF1F5, #EEF1F5);
}
.pb-info-box--lime .pb-info-box__title { color: #09121F; border-bottom-color: #DDE3EB; }

.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, #4A6FA5, #B9C3D2); }
.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: #B9C3D2; }
.pb-data-table--green thead th  { background: linear-gradient(135deg, #166534, #16a34a); }
.pb-data-table--lime   { border-color: #DDE3EB; }
.pb-data-table--lime thead th   { background: linear-gradient(135deg, #09121F, #4A6FA5); }
.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(--cr-navy), #6b7f9f);
}

.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(--cr-navy);
  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 #6b7f9f;
}

/* DataTable */
.pb-data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 2px solid #B9C3D2;
  margin: 1rem 0;
  box-shadow: 0 2px 15px rgba(9, 18, 31, 0.1);
  font-size: 0.84rem;
}

.pb-data-table thead th {
  background: linear-gradient(135deg, var(--cr-navy), #4A6FA5);
  color: var(--cr-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 #DDE3EB;
}

.pb-data-table tbody td {
  padding: 0.65rem 0.85rem;
  border: 1px solid #DDE3EB;
  background: var(--cr-white);
  vertical-align: top;
}

.pb-data-table tbody td strong {
  color: var(--cr-navy);
}

.pb-data-table tbody tr:nth-child(even) td {
  background: linear-gradient(135deg, #EEF1F5, var(--cr-white));
}

.pb-data-table tbody tr:hover td {
  background: #EEF1F5;
}

.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(--cr-navy), #4A6FA5); }
.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 #B9C3D2; }
.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(--cr-white), #f7fafc);
  border: 1px solid #e2e8f0;
  border-left: 5px solid var(--cr-navy);
  border-radius: 0.75rem;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 2px 12px rgba(9, 18, 31, 0.08);
}

.pb-toc__title {
  color: var(--cr-navy);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0 0 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid #EEF1F5;
}

.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(--cr-white), #EEF1F5);
  border: 1px solid #DDE3EB;
  border-left: 4px solid var(--cr-navy);
  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: #EEF1F5;
  border-left-color: #4A6FA5;
  box-shadow: 0 2px 8px rgba(9, 18, 31, 0.12);
}

.pb-toc__item-go {
  color: var(--cr-navy);
  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(--cr-grey-light);
  border-radius: var(--cr-radius-sm);
  resize: vertical;
  background: var(--cr-white);
  color: var(--cr-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(--cr-grey-mid);
  font-style: italic;
}

.note-input:focus {
  border-color: var(--cr-navy);
  background: var(--cr-white);
  box-shadow: 0 0 0 3px rgba(9, 18, 31, 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(--cr-grey-light);
  background: transparent;
  color: var(--cr-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(--cr-orange);
  color: var(--cr-orange);
  background: rgba(229, 139, 58, 0.06);
}

.follow-pill.is-active {
  background: var(--cr-orange);
  border: 1px solid var(--cr-orange);
  color: var(--cr-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(--cr-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(--cr-grey-mid);
}

.save-indicator.is-success { color: var(--cr-navy); 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(--cr-grey-light);
}

.history-pane__header h2 {
  margin: 0;
  color: var(--cr-navy-dark);
  font-size: 1.1rem;
}

.history-pane__header p {
  margin: 0.2rem 0 0;
  color: var(--cr-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(--cr-grey-light);
  border-radius: var(--cr-radius-sm);
  background: var(--cr-white);
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  color: inherit;
  transition: all 120ms ease;
}

.history-item:hover {
  border-color: var(--cr-pale-blue);
  background: var(--cr-pale-blue-pale);
  transform: translateY(-1px);
}

.history-item__date {
  color: var(--cr-navy);
  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(--cr-charcoal);
}

.empty-state {
  padding: 1.8rem 1rem;
  text-align: center;
  color: var(--cr-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; }
}

/* =============================================================================
   2026 AUDITS — view styles v4
   - Direct DB embed (no API)
   - Compact horizontal filter row (NOT full-width stacked)
   - Mint hero, teal text
   - Full-width container
   ============================================================================= */

.audits-page {
  width: 100%;
  max-width: none;
  padding: 0;
  box-sizing: border-box;
}

/* hero — flat header (no card) */
.audits-hero {
  margin: 0 0 12px;
  padding: 0;
  background: transparent;
  color: #09121F;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.audits-hero__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 12px;
}
.audits-hero__titles { flex: 1 1 auto; min-width: 0; }
.audits-hero__count { flex: 0 0 auto; }
.audits-hero__eyebrow {
  margin: 0 0 4px;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: #09121f; opacity: 0.85;
}
.audits-hero__title {
  margin: 0; font-family: "Playfair Display", "Georgia", serif;
  font-size: 28px; font-weight: 800; letter-spacing: 0.02em; color: #09121F;
}
.audits-hero__subtitle {
  margin: 4px 0 0; font-size: 13px; color: #09121f;
  max-width: 760px; line-height: 1.4;
}
.audits-status {
  display: inline-block;
  background: rgba(9, 18, 31,0.14); color: #09121F;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* COMPACT inline filter row */
.audits-hero__filters.audits-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: flex-end;
}
.audits-filters label {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 0 0 auto;
}
.audits-filters .lbl {
  margin-bottom: 2px;
  font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; font-size: 9.5px; color: #09121f;
}
.audits-filters__search { flex: 1 1 220px; min-width: 180px; max-width: 320px; }
.audits-filters .audits-search {
  padding: 5px 9px; font-size: 12.5px;
  border: 1px solid #B9C3D2; border-radius: 5px;
  background: #ffffff; color: #1f2937;
  width: 100%; box-sizing: border-box; height: 28px;
}
.audits-filters select,
.audits-filters input[type="date"] {
  padding: 4px 8px; font-size: 12px;
  border: 1px solid #B9C3D2; border-radius: 5px;
  background: #ffffff; color: #1f2937;
  width: auto; min-width: 110px; max-width: 160px;
  height: 28px; box-sizing: border-box;
}
.audits-filters input[type="date"] { min-width: 130px; }
.audits-filters select:focus,
.audits-filters input:focus {
  outline: none; border-color: #09121f;
  box-shadow: 0 0 0 2px rgba(9, 18, 31,0.18);
}
.audits-filters__clear {
  padding: 0 12px; height: 28px;
  background: #09121f; border: 1px solid #09121F; border-radius: 5px;
  font-size: 11px; font-weight: 700; color: #fff;
  cursor: pointer; letter-spacing: 0.05em; text-transform: uppercase;
  align-self: flex-end;
}
.audits-filters__clear:hover { background: #09121F; }

/* table — full-bleed, no card wrap */
.audits-table-wrap {
  width: 100%;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow-x: auto;
}
.audits-table {
  width: max-content;
  min-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 11.5px;
}
.audits-table th, .audits-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.audits-table .cell-long {
  white-space: normal !important;
  text-overflow: clip;
  overflow: hidden;
  word-wrap: break-word;
  line-height: 1.35;
  font-size: 11px;
}
.audits-table thead th {
  background: linear-gradient(180deg, #09121F 0%, #09121f 100%);
  color: #fff;
  text-align: left;
  padding: 9px 10px;
  font-weight: 700; font-size: 10.5px;
  letter-spacing: 0.06em; text-transform: uppercase;
  position: sticky; top: 0; z-index: 1;
  white-space: nowrap;
}
.audits-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid #eef0f3;
  vertical-align: middle;
  text-align: center;
  line-height: 1.4;
}
.audits-table thead th { text-align: center; }
.audits-table tbody tr.audit-row { cursor: pointer; transition: background-color 0.12s; }
.audits-table tbody tr.audit-row:hover td { background: rgba(9, 18, 31,0.045); }
.audits-table tbody tr:last-child td { border-bottom: 0; }

.audits-table .cell-num { white-space: nowrap; font-variant-numeric: tabular-nums; color: #4b5563; }
.audits-table .cell-points { font-weight: 700; color: #1f2937; }
.audits-table .cell-rating { text-align: center; }
.audits-table .cell-agent { font-weight: 600; color: #1f2937; white-space: nowrap; }
.audits-table .cell-client { font-family: "JetBrains Mono", "Menlo", "Consolas", monospace; font-size: 11.5px; color: #475569; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audits-table .cell-long {
  color: #374151;
}
.audits-table tbody td { max-width: 240px; }
.audits-table .cell-agent,
.audits-table .cell-client,
.audits-table .cell-num,
.audits-table .cell-rating,
.audits-table .cell-points { white-space: nowrap; }

/* pills (tag-y columns) */
.tag-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.02em; white-space: nowrap;
  max-width: 180px; overflow: hidden; text-overflow: ellipsis;
}
.tag-pill.tag-auditor-empty { background: #f3f4f6; color: #6b7280; }
.tag-pill.tag-auditor-0 { background: #ffedd5; color: #9a3412; }
.tag-pill.tag-auditor-1 { background: #ffe4e6; color: #9f1239; }
.tag-pill.tag-auditor-2 { background: #fef3c7; color: #92400e; }
.tag-pill.tag-auditor-3 { background: #fde2e2; color: #b91c1c; }
.tag-pill.tag-auditor-4 { background: #fce7f3; color: #9d174d; }
.tag-pill.tag-auditor-5 { background: #fff7ed; color: #c2410c; }
.tag-pill.tag-company-empty { background: #f3f4f6; color: #6b7280; }
.tag-pill.tag-company-0 { background: #ccfbf1; color: #115e59; }
.tag-pill.tag-company-1 { background: #cffafe; color: #155e75; }
.tag-pill.tag-company-2 { background: #dbeafe; color: #1e40af; }
.tag-pill.tag-company-3 { background: #d1fae5; color: #065f46; }
.tag-pill.tag-company-4 { background: #e0e7ff; color: #3730a3; }
.tag-pill.tag-company-5 { background: #ecfeff; color: #0e7490; }
.tag-pill.tag-reqby-empty { background: #f3f4f6; color: #6b7280; }
.tag-pill.tag-reqby-0 { background: #374151; color: #f3f4f6; }
.tag-pill.tag-reqby-1 { background: #4b5563; color: #f9fafb; }
.tag-pill.tag-reqby-2 { background: #6b7280; color: #f9fafb; }
.tag-pill.tag-reqby-3 { background: #1f2937; color: #f3f4f6; }
.tag-pill.tag-reqby-4 { background: #475569; color: #f1f5f9; }
.tag-pill.tag-reqby-5 { background: #334155; color: #f1f5f9; }
.tag-pill.status-pill { padding: 3px 11px; }
.tag-pill.status-empty    { background: #f3f4f6; color: #6b7280; }
.tag-pill.status-complete { background: #d1fae5; color: #065f46; }
.tag-pill.status-progress { background: #dbeafe; color: #1e40af; }
.tag-pill.status-pending  { background: #fef3c7; color: #92400e; }
.tag-pill.status-disputed { background: #fee2e2; color: #991b1b; }
.tag-pill.status-other    { background: #ede9fe; color: #5b21b6; }

.grade-pill {
  display: inline-block;
  min-width: 30px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 800;
  letter-spacing: 0.04em; text-align: center;
  color: #fff; font-variant-numeric: tabular-nums;
}
.grade-pill.grade-ap { background: linear-gradient(135deg, #047857, #10b981); }
.grade-pill.grade-a  { background: linear-gradient(135deg, #059669, #34d399); }
.grade-pill.grade-bp { background: linear-gradient(135deg, #0369a1, #38bdf8); }
.grade-pill.grade-b  { background: linear-gradient(135deg, #1d4ed8, #60a5fa); }
.grade-pill.grade-cp { background: linear-gradient(135deg, #b45309, #fbbf24); color: #422006; }
.grade-pill.grade-c  { background: linear-gradient(135deg, #92400e, #f59e0b); color: #422006; }
.grade-pill.grade-dp { background: linear-gradient(135deg, #c2410c, #fb923c); }
.grade-pill.grade-d  { background: linear-gradient(135deg, #9a3412, #f97316); }
.grade-pill.grade-f  { background: linear-gradient(135deg, #991b1b, #ef4444); box-shadow: 0 0 0 2px rgba(239,68,68,0.2); }
.grade-pill.is-none  { background: #d1d5db; color: #4b5563; }

.audits-empty {
  padding: 36px 18px !important;
  text-align: center !important;
  color: #6b7280 !important;
  font-size: 14px !important; font-style: italic;
}

/* detail modal — same as v3 */
.audits-detail-modal {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none; align-items: flex-start; justify-content: center;
  padding: 50px 20px; overflow-y: auto; z-index: 1000;
}
.audits-detail-modal.is-open { display: flex; }
.audits-detail-modal__inner {
  position: relative; background: #fff;
  width: 100%; max-width: 760px;
  border-radius: 14px; box-shadow: 0 20px 48px rgba(0,0,0,0.18);
  padding: 28px 32px 32px;
  font-size: 14px; color: #1f2937;
}
.audits-detail-modal .modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: 0; font-size: 28px; line-height: 1;
  color: #6b7280; cursor: pointer; width: 32px; height: 32px; border-radius: 6px;
}
.audits-detail-modal .modal-close:hover { background: #f3f4f6; color: #1f2937; }
.audits-detail-header { border-bottom: 1px solid #e3e6eb; padding-bottom: 18px; margin-bottom: 18px; }
.audits-detail-eyebrow { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #09121f; margin-bottom: 4px; }
.audits-detail-title { font-family: "Playfair Display", Georgia, serif; font-size: 26px; margin: 0 0 10px; color: #1f2937; }
.audits-detail-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: #4b5563; }
.audits-detail-meta strong { color: #1f2937; margin-right: 4px; }
.audits-detail-score { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed #e3e6eb; }
.audits-detail-score__points { font-family: "Playfair Display", Georgia, serif; font-size: 38px; font-weight: 800; line-height: 1; color: #1f2937; }
.audits-detail-score__points small { font-size: 16px; color: #6b7280; margin-left: 2px; }
.audits-detail-score__deducted { font-size: 12px; font-weight: 700; color: #b91c1c; background: #fee2e2; padding: 3px 8px; border-radius: 6px; }
.audits-detail-section { margin-bottom: 16px; }
.audits-detail-section h3 { margin: 0 0 6px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #09121f; }
.audits-detail-section p { margin: 0; white-space: pre-wrap; line-height: 1.55; color: #1f2937; }
.audits-detail-section--deductions p { background: #fff7ed; border-left: 3px solid #f97316; padding: 10px 12px; border-radius: 6px; }
.audits-detail-section--lexi p { background: #f0f9ff; border-left: 3px solid #0ea5e9; padding: 10px 12px; border-radius: 6px; font-style: italic; }
.audits-detail-footer { display: flex; justify-content: space-between; font-size: 11px; color: #6b7280; margin-top: 18px; padding-top: 12px; border-top: 1px solid #e3e6eb; }

@media (max-width: 980px) {
  .audits-hero__top { flex-direction: column; gap: 10px; align-items: flex-start; }
  .audits-hero__count { align-self: flex-start; }
}


/* === audits compact filters + full-screen table — 2026-04-25 minimal patch === */
.audits-page { min-height: calc(100vh - 60px); display: flex; flex-direction: column; }
.audits-container { padding: 0 !important; max-width: none !important; }
.audits-toolbar {
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem;
  align-items: end; padding: 0.7rem 1rem;
  background: #fafdfb; border-bottom: 1px solid #d8e8e0;
}
.audits-search-wrap { display: flex; align-items: center; gap: 0.6rem; flex: 0 0 280px; }
.audits-search { padding: 0.4rem 0.65rem; font-size: 0.86rem;
  border: 1px solid #c4dccf; border-radius: 6px; width: 100%; }
.audits-status { font-size: 0.82rem; color: #2a7d68; white-space: nowrap; font-weight: 600; }
.audits-filters {
  display: flex !important; flex-direction: row !important; flex-wrap: wrap;
  gap: 0.5rem 0.65rem; align-items: end; flex: 1;
}
.audits-filters label {
  display: flex !important; flex-direction: column !important;
  gap: 0.15rem; min-width: 0; flex: 0 1 130px;
}
.audits-filters label .lbl {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: #2a7d68;
}
.audits-filters select,
.audits-filters input[type="date"] {
  padding: 0.35rem 0.5rem; font-size: 0.82rem;
  border: 1px solid #c4dccf; border-radius: 5px;
  background: #ffffff; width: 100%; box-sizing: border-box;
  font-family: inherit;
}
.audits-filters__clear {
  padding: 0.4rem 0.85rem; font-size: 0.78rem; font-weight: 600;
  border: 1px solid #c4dccf; border-radius: 5px;
  background: #ffffff; color: #1a4d3f; cursor: pointer; height: 30px;
}
.audits-filters__clear:hover { background: #EEF1F5; }
.audits-table-wrap {
  flex: 1; min-height: 0; overflow: auto; background: transparent;
  border: 0; border-radius: 0; box-shadow: none;
}
.audits-table { min-width: 100%; }
.audits-table thead th {
  position: sticky; top: 0; z-index: 5;
  background: #0a4f3f; color: #ffffff; font-weight: 700;
  font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.65rem 0.7rem; text-align: left;
  border-right: 1px solid #1a6750; white-space: nowrap;
}
.audits-table thead th:last-child { border-right: none; }
.audits-table tbody tr { border-bottom: 1px solid #eef5f1; }
.audits-table tbody tr:nth-child(even) { background: #fafdfb; }
.audits-table tbody tr:hover { background: #EEF1F5; cursor: pointer; }
.audits-table td { padding: 0.55rem 0.7rem; vertical-align: top; line-height: 1.4; font-size: 0.85rem; }
.audits-empty { text-align: center; padding: 3rem 1rem; color: #555; font-style: italic; }
.audit-cell-notes { max-width: 480px; color: #09121F; }

/* breathing room so last column isn't flush against viewport edge */
.audits-table-wrap, .audits-top-scroll { padding-right: 12px !important; box-sizing: border-box; }

/* === Forge override FINAL 2026-04-25 13:57 — consolidated, supersedes all prior === */

/* hero: flush-left, no card */
.audits-hero {
  margin: 0 0 0.6rem !important;
  padding: 12px 8px 12px 12px !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid #DDE3EB !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.audits-hero__title {
  font-family: "Noto Sans", sans-serif !important;
  font-size: 1.15rem !important;
}

/* page: hug the sidebar */
.content-shell:has(.audits-page),
.report-pane:has(.audits-page) {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.audits-page {
  padding: 0.25rem 0 1rem 0 !important;
  margin: 0 !important;
}

/* + new audit button */
.audits-filters__new {
  background: #09121f; color: #fff; border: 0; border-radius: 5px;
  padding: 5px 12px; font-size: 12px; font-weight: 700; cursor: pointer; height: 28px;
}
.audits-filters__new:hover { background: #09121F; }

/* table — uniform 56px rows, side-by-side cells */
.audits-table {
  table-layout: fixed !important;
  width: 100% !important;
  font-size: 11px !important;
  border-collapse: collapse !important;
}
.audits-table thead th {
  text-align: center !important;
  vertical-align: middle !important;
  font-size: 9.5px !important;
  padding: 7px 5px !important;
  background: linear-gradient(180deg, #09121F 0%, #09121f 100%) !important;
  color: #fff !important;
}
.audits-table tbody tr { height: 112px !important; }
.audits-table tbody td {
  height: 112px !important;
  padding: 5px 7px !important;
  vertical-align: middle !important;
  text-align: center !important;
  border-bottom: 1px solid #eef0f3 !important;
  border-right: 0 !important;
}
.audits-table tbody td:not(.cell-long) { overflow: hidden !important; }

/* short-cell columns — single line, ellipsis */
.audits-table .cell-num,
.audits-table .cell-agent,
.audits-table .cell-client,
.audits-table .cell-points,
.audits-table .cell-rating {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* long-cell columns — wrap to 3 lines, left-aligned */
.audits-table .cell-long {
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  text-align: left !important;
  vertical-align: middle !important;
  line-height: 1.35 !important;
  font-size: 10.5px !important;
  position: relative !important;
}
.audits-table .cell-long > .clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  overflow: hidden;
  max-height: 100px;
}

/* forth client link */
.audits-table .cell-client a {
  color: #09121F; text-decoration: underline;
  text-decoration-color: rgba(9, 18, 31,0.4); font-weight: 600;
}
.audits-table .cell-client a:hover { color: #09121f; text-decoration-color: #09121f; }

/* breathing room at right edge */
.audits-table-wrap, .audits-top-scroll { padding-right: 12px !important; box-sizing: border-box !important; overflow-y: visible !important; }

/* top scroll bar */
.audits-top-scroll {
  width: 100% !important; overflow-x: auto !important; overflow-y: hidden !important;
  height: 14px !important; margin-bottom: 2px !important; scrollbar-width: thin !important;
}
.audits-top-scroll__inner { height: 1px !important; }
.audits-top-scroll::-webkit-scrollbar { height: 10px !important; }
.audits-top-scroll::-webkit-scrollbar-thumb { background: #09121f !important; border-radius: 6px !important; }
.audits-top-scroll::-webkit-scrollbar-track { background: #DDE3EB !important; }

/* edit modal — wide */
.audits-detail-modal__inner { max-width: 1100px !important; }

/* audit edit form */
.audit-form { padding: 0; }
.audit-form__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #DDE3EB;
}
.audit-form__title {
  margin: 0; font-family: "Playfair Display", Georgia, serif;
  font-size: 22px; color: #09121F;
}
.audit-form__actions { display: flex; gap: 8px; }
.audit-form .btn {
  padding: 7px 16px; border-radius: 6px; font-weight: 700; font-size: 13px;
  cursor: pointer; border: 1px solid transparent;
}
.audit-form .btn-primary { background: #09121f; color: #fff; }
.audit-form .btn-primary:hover { background: #09121F; }
.audit-form .btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.audit-form .btn-ghost { background: transparent; color: #09121F; border-color: #B9C3D2; }
.audit-form .btn-ghost:hover { background: #EEF1F5; }
.audit-form__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 14px; margin-bottom: 14px;
}
.audit-form__grid label {
  display: flex; flex-direction: column; font-size: 11px; font-weight: 700;
  color: #09121f; text-transform: uppercase; letter-spacing: 0.05em;
}
.audit-form__grid input,
.audit-form__grid select,
.audit-form__textarea textarea {
  margin-top: 3px; padding: 6px 9px; border: 1px solid #B9C3D2; border-radius: 4px;
  background: #fff; font-size: 13px; font-weight: 400; font-family: inherit;
  color: #1f2937; text-transform: none; letter-spacing: normal;
}
.audit-form__grid input:focus,
.audit-form__grid select:focus,
.audit-form__textarea textarea:focus {
  outline: none; border-color: #09121f; box-shadow: 0 0 0 2px rgba(9, 18, 31,0.15);
}
.audit-form__textarea {
  display: flex; flex-direction: column; font-size: 11px; font-weight: 700;
  color: #09121f; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px;
}
.audit-form__textarea textarea { resize: vertical; line-height: 1.4; }
.audit-form__footer {
  display: flex; justify-content: space-between; font-size: 11px;
  color: #6b7280; padding-top: 10px; border-top: 1px solid #eef0f3;
}
.audit-form__msg { font-weight: 700; }
/* === Forge — custom teal tooltip on cell-long hover, anchored above the cell === */
.audits-table .cell-long { position: relative; }



/* === Forge — allow Company pill to wrap to 2 lines === */
.audits-table tbody tr td:nth-child(2) .tag-pill {
  white-space: normal !important;
  word-break: normal !important;
  max-width: 100% !important;
  line-height: 1.25 !important;
}

/* === Forge — auth: user bar + login chip + settings page === */
.user-bar {
  display: flex; justify-content: flex-end; align-items: center;
  padding: 8px 12px 0; gap: 8px; min-height: 28px;
}
.user-bar__chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #09121F; color: #fff; padding: 3px 4px 3px 10px;
  border-radius: 999px; font-size: 10.5px; font-weight: 600;
}
.user-bar__name { letter-spacing: 0.01em; }
.user-bar__role {
  background: rgba(255,255,255,0.16); color: #DDE3EB;
  padding: 1px 7px; border-radius: 999px; font-size: 8.5px;
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700;
}
.user-bar__btn {
  background: #ffffff; color: #09121F; border: 0;
  padding: 2px 10px; border-radius: 999px;
  font-size: 9px; font-weight: 700; cursor: pointer;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.user-bar__btn:hover { background: #EEF1F5; }
.user-bar__signin {
  background: #09121f; color: #fff; border: 0;
  padding: 6px 14px; border-radius: 999px; text-decoration: none;
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.user-bar__signin:hover { background: #09121F; }

.settings-page {
  padding: 0.25rem 0.75rem 1.25rem; max-width: 100%;
}
.settings-hero {
  border-bottom: 1px solid #DDE3EB; padding-bottom: 12px; margin-bottom: 16px;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
}
.settings-hero h1 {
  font-family: Noto Sans, sans-serif;
  font-size: 1.15rem; margin: 0; color: #09121F; font-weight: 800;
}
.settings-hero p { margin: 4px 0 0; font-size: 13px; color: #09121f; }
.settings-hero__actions { display: flex; gap: 8px; }
.settings-add-btn {
  background: #09121f; color: #fff; border: 0; border-radius: 5px;
  padding: 7px 14px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.settings-add-btn:hover { background: #09121F; }
.users-table {
  width: 100%; border-collapse: collapse; font-size: 12.5px;
  background: #fff; border-radius: 8px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(9, 18, 31,0.06);
}
.users-table thead th {
  background: linear-gradient(180deg, #09121F 0%, #09121f 100%);
  color: #fff; text-align: center; padding: 9px 12px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.users-table tbody td {
  padding: 8px 12px; border-bottom: 1px solid #eef0f3; vertical-align: middle; text-align: center;
}
.users-table .row-actions { text-align: right; }
.users-table tbody tr:last-child td { border-bottom: 0; }
.users-table tbody tr:hover { background: rgba(9, 18, 31,0.045); }
.users-table .role-pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
}
.users-table .role-admin       { background: #fde2e4; color: #b91c1c; }
.users-table .role-team_leader { background: #ddeafe; color: #1d4ed8; }
.users-table .role-management  { background: #f3e8ff; color: #7c3aed; }
.users-table .role-csr         { background: #d1fae5; color: #047857; }
.users-table .role-negotiator  { background: #ffedd5; color: #9a3412; }
.users-table .status-pill {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 700;
}
.users-table .status-active   { background: #d1fae5; color: #047857; }
.users-table .status-disabled { background: #f3f4f6; color: #6b7280; }
.users-table .row-actions { white-space: nowrap; }
.users-table .row-actions button {
  background: transparent; border: 1px solid #B9C3D2; border-radius: 5px;
  color: #09121F; padding: 3px 9px; font-size: 11px; font-weight: 600;
  cursor: pointer; margin-left: 4px;
}
.users-table .row-actions button:hover { background: #EEF1F5; border-color: #09121f; }
.users-table .row-actions .btn-danger {
  color: #b91c1c; border-color: #fca5a5;
}
.users-table .row-actions .btn-danger:hover { background: #fef2f2; border-color: #b91c1c; }

.user-form-modal {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55);
  display: none; align-items: center; justify-content: center;
  padding: 30px 20px; overflow-y: auto; z-index: 1000;
}
.user-form-modal.is-open { display: flex; }
.user-form-modal__inner {
  background: #fff; border-radius: 12px; padding: 28px;
  width: 100%; max-width: 460px; box-shadow: 0 20px 48px rgba(0,0,0,0.18);
}
.user-form-modal h2 { margin: 0 0 16px; font-size: 18px; color: #09121F; }
.user-form-modal label {
  display: block; margin-bottom: 12px; font-size: 11px;
  font-weight: 700; color: #09121f; text-transform: uppercase; letter-spacing: 0.05em;
}
.user-form-modal input,
.user-form-modal select {
  display: block; width: 100%; margin-top: 4px;
  padding: 7px 10px; border: 1px solid #B9C3D2; border-radius: 5px;
  font-size: 13px; font-family: inherit; color: #1f2937;
  text-transform: none; letter-spacing: normal; font-weight: 400;
}
.user-form-modal input:focus, .user-form-modal select:focus {
  outline: none; border-color: #09121f; box-shadow: 0 0 0 2px rgba(9, 18, 31,0.15);
}
.user-form-modal__actions {
  display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px;
  padding-top: 14px; border-top: 1px solid #eef0f3;
}
.user-form-modal__msg {
  font-size: 12px; font-weight: 700; margin-top: 10px; min-height: 16px;
}

/* === Forge — sidebar footer user chip === */
.sidebar__footer .sidebar__user {
  display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 4px;
  padding: 6px 10px; background: rgba(255,255,255,0.04);
  border-radius: 6px;
  font-size: 10px;
}
.sidebar__user-name {
  color: #fff; font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.01em; flex: 0 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sidebar__user-role {
  margin: 0; padding: 2px 9px;
  background: rgba(255, 255, 255, 0.18);
  color: #B9C3D2; font-size: 8px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.25);
  flex: 0 0 auto;
}
.sidebar__user-logout {
  margin-top: 0;
  background: transparent; color: #B9C3D2;
  border: 0; padding: 2px 4px;
  font-size: 8.5px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; cursor: pointer;
  flex: 0 0 auto;
}
.sidebar__user-logout:hover { color: #fff; }
.sidebar__user-signin {
  display: block; background: #09121f; color: #fff;
  text-decoration: none; padding: 7px 12px; border-radius: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; text-align: center;
}
.sidebar__user-signin:hover { background: #DDE3EB; color: #09121F; }

/* === Forge — Settings tabs + sections === */
.settings-tabs {
  display: flex; gap: 4px; margin: 8px 0 14px; border-bottom: 1px solid #DDE3EB;
}
.settings-tab {
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  padding: 8px 14px; font-size: 12px; font-weight: 700; color: #6b7280;
  letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer;
}
.settings-tab:hover { color: #09121f; }
.settings-tab--active { color: #09121F; border-bottom-color: #09121f; }
.settings-section { padding-top: 6px; }
.settings-section__head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
}
.settings-section__head h2 {
  font-size: 15px; margin: 0; color: #09121F; font-weight: 700;
}
.settings-section__hint {
  margin: 0 0 12px; font-size: 12px; color: #6b7280; font-style: italic;
}
.settings-section__hint kbd {
  background: #f3f4f6; border: 1px solid #d1d5db; border-radius: 3px;
  padding: 1px 5px; font-size: 11px; font-family: ui-monospace, monospace;
}
.role-pill.role-custom { background: #fef3c7; color: #92400e; }

/* === Forge — bigger QC hero title since eyebrow removed === */
.qc-hero-title { font-size: 1.7rem !important; letter-spacing: 0.01em; }
.qc-hero-subtitle { max-width: 760px; line-height: 1.5; font-size: 14px; }

/* === Forge — My View page === */
.myview-page { padding: 0.5rem 0.75rem 1.5rem; max-width: 1200px; }
.myview-hero {
  border-bottom: 1px solid #DDE3EB;
  padding-bottom: 12px; margin-bottom: 18px;
}
.myview-hero h1 {
  font-family: 'Noto Sans', sans-serif;
  font-size: 1.5rem; margin: 0; color: #09121F; font-weight: 800; letter-spacing: 0.01em;
}
.myview-hero p { margin: 4px 0 0; font-size: 13px; color: #09121f; }

.myview-section { margin-bottom: 24px; }
.myview-section__head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.myview-section__head h2 {
  font-size: 14px; margin: 0; color: #09121F; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.myview-count {
  display: inline-block; background: #09121f; color: #fff;
  padding: 1px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.myview-list { display: flex; flex-direction: column; gap: 10px; }
.myview-card {
  background: #fff; border: 1px solid #eef0f3; border-radius: 8px;
  padding: 12px 14px; box-shadow: 0 1px 3px rgba(9, 18, 31,0.04);
  border-left: 4px solid #09121f;
}
.myview-card--item.priority-high   { border-left-color: #b91c1c; }
.myview-card--item.priority-medium { border-left-color: #d97706; }
.myview-card--item.priority-low    { border-left-color: #6b7280; }
.myview-card--audit { border-left-color: #0284c7; }
.myview-card__head {
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center;
  font-size: 12px; color: #4b5563; margin-bottom: 6px;
}
.myview-priority {
  background: #fee2e2; color: #b91c1c; padding: 2px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.priority-medium .myview-priority { background: #fef3c7; color: #92400e; }
.priority-low .myview-priority    { background: #f3f4f6; color: #4b5563; }
.myview-card__client { font-weight: 600; color: #1f2937; }
.myview-card__client small { color: #6b7280; font-weight: 400; font-family: ui-monospace, monospace; }
.myview-card__status { background: #e0f2fe; color: #075985; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.myview-card__date { color: #6b7280; font-variant-numeric: tabular-nums; }
.myview-card__type { color: #4b5563; }
.myview-card__by { color: #6b7280; font-style: italic; }
.myview-card__pts { color: #09121F; font-weight: 700; }
.myview-card__what,
.myview-card__do,
.myview-card__deductions,
.myview-card__mgmt {
  margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: #374151;
}
.myview-card__do { color: #047857; }
.myview-card__mgmt { color: #09121F; background: rgba(9, 18, 31,0.06); padding: 6px 10px; border-radius: 5px; }
.myview-card__deductions { color: #b91c1c; }
.myview-empty {
  background: rgba(9, 18, 31,0.05); border: 1px dashed #B9C3D2;
  border-radius: 8px; padding: 18px;
  font-size: 13px; color: #09121f; font-style: italic; text-align: center;
}


/* === My View — Performance Reviews table === */
.myview-perf-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 13px;
}
.myview-perf-table th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  font-weight: 700;
  padding: 8px 10px;
  border-bottom: 1px solid var(--hairline);
}
.myview-perf-table td {
  padding: 10px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: middle;
}
.myview-perf-table tr:hover td { background: rgba(120, 200, 140, 0.05); }
.myview-perf-actions {
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end;
}
.myview-perf-response td {
  background: rgba(120, 200, 140, 0.08) !important;
  border-left: 3px solid #2f8a55;
  font-size: 12.5px;
  color: #1f3d2a;
}
.perf-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.perf-pill--ok {
  background: rgba(120, 200, 140, 0.16);
  color: #1f7a3f;
  border: 1px solid rgba(120, 200, 140, 0.45);
}
.perf-pill--pending {
  background: rgba(255, 170, 80, 0.14);
  color: #a35d15;
  border: 1px solid rgba(255, 170, 80, 0.45);
}


/* === My View Performance Reviews — make sure action buttons are styled === */
.myview-perf-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 12.5px;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.myview-perf-actions .btn:hover { background: #f6fbf8; border-color: rgba(120,200,140,0.45); }
.myview-perf-actions .btn.ghost { background: #fff; }
.myview-perf-actions .btn.success {
  background: rgba(120, 200, 140, 0.12);
  border-color: rgba(120, 200, 140, 0.5);
  color: #1f7a3f;
  font-weight: 600;
}
.myview-perf-actions .btn.success:hover { background: rgba(120, 200, 140, 0.22); }


/* === My View Performance Reviews — column sizing tightening === */
/* Force most columns to their content width and let Subject (column 3) absorb the slack */
.myview-perf-table th,
.myview-perf-table td { white-space: nowrap; }
.myview-perf-table th:nth-child(3),
.myview-perf-table td:nth-child(3) { white-space: normal; width: 100%; }
/* Pack action buttons tight against the row */
.myview-perf-actions { justify-content: flex-end; gap: 6px; }


/* === My View Performance Reviews — final column / button alignment === */
/* Reset previous attempts and use a cleaner table layout */
.myview-perf-table { table-layout: auto; width: 100%; }
.myview-perf-table th,
.myview-perf-table td {
  white-space: normal;
  text-align: left;
  vertical-align: middle;
  padding: 10px 12px;
}
.myview-perf-table th { font-size: 11.5px; }
/* Center the numeric / pill / status / actions columns under their headers */
.myview-perf-table th:nth-child(4),
.myview-perf-table td:nth-child(4),
.myview-perf-table th:nth-child(5),
.myview-perf-table td:nth-child(5),
.myview-perf-table th:nth-child(6),
.myview-perf-table td:nth-child(6),
.myview-perf-table th:nth-child(7),
.myview-perf-table td:nth-child(7) { text-align: center; }
.myview-perf-table th:nth-child(3),
.myview-perf-table td:nth-child(3) { width: auto; min-width: 160px; max-width: 320px; }
/* Action buttons stay in a row, no wrapping */
.myview-perf-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
}


/* === My View Performance Reviews — actual table look with subtle borders === */
.myview-perf-table {
  border: 1px solid rgba(120, 120, 120, 0.18);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.myview-perf-table thead th {
  background: rgba(120, 200, 140, 0.06);
  border-right: 1px solid rgba(120, 120, 120, 0.10);
  border-bottom: 1px solid rgba(120, 120, 120, 0.18);
}
.myview-perf-table thead th:last-child { border-right: none; }
.myview-perf-table tbody td {
  border-right: 1px solid rgba(120, 120, 120, 0.10);
  border-bottom: 1px solid rgba(120, 120, 120, 0.10);
}
.myview-perf-table tbody td:last-child { border-right: none; }
.myview-perf-table tbody tr:last-child td { border-bottom: none; }
.myview-perf-table tbody tr.myview-perf-response td {
  border-top: none;
}


/* === My View Performance Reviews — center Subject column too === */
.myview-perf-table th:nth-child(3),
.myview-perf-table td:nth-child(3) { text-align: center; }


/* === My View perf-review modals — scoped class so Premier's modals stay untouched === */
.pp-mv-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.38); backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; z-index: 1000; padding: 20px;
}
.pp-mv-modal-backdrop.show { display: flex; animation: pp-mv-fade-in .2s ease-out; }
@keyframes pp-mv-fade-in { from { opacity: 0; } to { opacity: 1; } }
.pp-mv-modal-backdrop .modal {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 24px;
  width: 100%; max-width: 680px; max-height: 92vh; overflow: auto;
  box-shadow: 0 12px 30px rgba(0,0,0,0.22);
}
.pp-mv-modal-backdrop .modal .modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
}
.pp-mv-modal-backdrop .modal .title-block { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pp-mv-modal-backdrop .modal .title-block h3 { margin: 0; font-size: 17px; color: var(--text); }
.pp-mv-modal-backdrop .modal .title-block .sub { font-size: 12.5px; color: var(--text-dim); }
.pp-mv-modal-backdrop .modal .row.end { display: flex; justify-content: flex-end; }


/* QC Manager client_id Forth link — inherit cell color, no default blue */
.action-table .forth-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.action-table .forth-link:hover { text-decoration: none; opacity: 0.78; }

/* F-Grade Audits table in My View — full width, scrollable */
.myview-page:has(#fAuditsTableWrap) { max-width: none; }
#fAuditsTableWrap {
  overflow-x: auto;
  overflow-y: visible;
  padding-right: 12px;
  box-sizing: border-box;
}
#fAuditsTableWrap .audits-table { min-width: 1400px; }

/* Unread Texts widget on My View 2026-05-07 */
.myview-section--texts {
  background: linear-gradient(135deg, var(--cr-pale-blue-pale, #EEF1F5), #ffffff);
  border: 1px solid var(--cr-pale-blue, #B9C3D2);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 20px;
}
.myview-section--texts .myview-section__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.myview-section--texts h2 {
  margin: 0; font-size: 18px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  color: var(--cr-charcoal, #2C2C2C);
}
.myview-section--texts .myview-count {
  background: var(--cr-pale-blue-soft, #DDE3EB);
  color: var(--cr-navy, #09121f);
  padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.myview-texts__open {
  font-size: 13px; font-weight: 600;
  color: var(--cr-navy, #09121f);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(9, 18, 31, 0.06);
  transition: background 0.15s ease;
}
.myview-texts__open:hover { background: rgba(9, 18, 31, 0.12); }
.myview-texts__body {
  display: flex; flex-direction: column; gap: 8px;
}
.myview-texts__empty, .myview-texts__loading {
  padding: 20px; text-align: center;
  color: #6b7280; font-size: 14px;
  background: #fff; border-radius: 10px;
}
.myview-text-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e8eeec;
  border-radius: 12px;
  text-decoration: none;
  color: var(--cr-charcoal, #2C2C2C);
  transition: border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, "Segoe UI", Roboto, "Apple Color Emoji", "Segoe UI Emoji", Arial, sans-serif;
}
.myview-text-card:hover {
  border-color: var(--cr-pale-blue, #B9C3D2);
  box-shadow: 0 4px 12px rgba(9, 18, 31, 0.06);
  transform: translateY(-1px);
}
.myview-text-card__avatar {
  width: 36px; height: 36px; flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #09121f, #014A40);
  color: #fff;
  font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 0.04em;
}
.myview-text-card__body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.myview-text-card__top {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
}
.myview-text-card__name {
  font-weight: 700; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.myview-text-card__time {
  font-size: 11px; color: #999; flex: 0 0 auto; font-weight: 500;
}
.myview-text-card__meta {
  font-size: 12px; color: #6b7280;
}
.myview-text-card__cid {
  color: #999; font-weight: 500;
}
.myview-text-card__preview {
  font-size: 13px; color: #4b5563;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}
.myview-text-card__count {
  flex: 0 0 auto;
  min-width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--cr-orange, #E58B3A);
  color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 6px;
}


/* 2026-05-11 My View "clients waiting on your reply" banner */
.myview-texts__waiting {
  background: #fef3c7;
  color: #92400e;
  padding: 8px 14px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 500;
}
