/* ===========================================================================
   Dashboard redesign — academy-aligned aesthetic.
   Loaded after site.css; overrides the legacy dark-mode briefing widget,
   adds NEW badges, and polishes the KPI rate values.
   =========================================================================== */

/* ---------- 1. BRIEFING BAR — light theme ----------
   The briefing widget originally renders in a dark wrapper using its own
   #212529 vars. We rebind those vars to the academy palette so the widget
   becomes a clean white card that fits the rest of the page.            */

#pwlb-briefing {
  --ob: var(--pt-orange);
  --dark: #ffffff;
  --dark2: #ffffff;
  --dark3: var(--pt-line-soft);
  --border: var(--pt-line);
  --text: var(--pt-text);
  --muted: var(--pt-muted);
}

#pb-overlay,
#pb-modal {
  --ob: var(--pt-orange);
  --dark: #ffffff;
  --dark2: #ffffff;
  --dark3: var(--pt-line-soft);
  --border: var(--pt-line);
  --text: var(--pt-text);
  --muted: var(--pt-muted);
}

#pb-header {
  background: var(--pt-navy-grad) !important;
  border: none !important;
  border-radius: 10px !important;
  box-shadow: var(--pt-shadow-navy);
  color: #ffffff !important;
  padding: 12px 18px !important;
}

#pwlb-briefing.open #pb-header {
  border-radius: 10px 10px 0 0 !important;
}

#pb-header:hover {
  filter: brightness(1.08);
}

.pb-live-label {
  color: var(--pt-orange) !important;
  font-weight: 700 !important;
}

.pb-divider {
  background: rgba(255, 255, 255, 0.18) !important;
}

.pb-headline-preview {
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 500 !important;
}

.pb-date-chip {
  background: rgba(255, 255, 255, 0.10) !important;
  color: rgba(255, 255, 255, 0.88) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em !important;
}

.pb-expand-btn {
  background: var(--pt-orange) !important;
  color: #ffffff !important;
  border: 1px solid var(--pt-orange) !important;
  font-weight: 600 !important;
}

.pb-expand-btn:hover {
  filter: brightness(1.08);
}

.pb-chevron {
  color: rgba(255, 255, 255, 0.70) !important;
}

#pb-panel {
  background: #ffffff !important;
  border: 1px solid var(--pt-line) !important;
  border-top: none !important;
  border-radius: 0 0 10px 10px !important;
  color: var(--pt-text) !important;
  box-shadow: var(--pt-shadow-navy);
}

.pb-article-headline,
#pb-hl,
#pb-m-hl {
  color: var(--pt-navy) !important;
  font-weight: 700 !important;
}

.pb-byline,
#pb-byline-date,
#pb-cat-tag {
  color: var(--pt-muted) !important;
}

.pb-body,
#pb-body,
#pb-m-body {
  color: var(--pt-text) !important;
}

.pb-cursor {
  background: var(--pt-orange) !important;
}

.pb-sidebar {
  background: var(--pt-line-soft) !important;
  border-left: 1px solid var(--pt-line) !important;
}

.pb-sidebar-label {
  color: var(--pt-muted) !important;
  border-bottom: 1px solid var(--pt-line) !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.pb-issue-item {
  border-bottom: 1px solid var(--pt-line) !important;
  color: var(--pt-text) !important;
  background: transparent !important;
}

.pb-issue-item:hover {
  background: rgba(253, 126, 20, 0.06) !important;
}

.pb-issue-item.active {
  background: var(--pt-orange-soft) !important;
  border-left: 3px solid var(--pt-orange) !important;
  padding-left: calc(12px - 3px) !important;
}

.pb-issue-date {
  color: var(--pt-muted) !important;
}

.pb-issue-title {
  color: var(--pt-text) !important;
}

/* Hide "Previous Issues" / "Archive" — only the latest briefing matters here.
   Article content expands to full width in both the inline panel and modal. */
.pb-sidebar,
.pb-modal-sidebar { display: none !important; }

.pb-inner,
.pb-modal-body-wrap {
  grid-template-columns: 1fr !important;
}

.pb-article,
.pb-modal-article {
  max-width: none !important;
  width: 100% !important;
}

/* Full-view modal (kept dark-on-navy to match academy course-modal feel). */
#pb-overlay { background: rgba(10, 37, 64, 0.55) !important; }

#pb-modal {
  background: #ffffff !important;
  color: var(--pt-text) !important;
  border: 1px solid var(--pt-line) !important;
  box-shadow: var(--pt-shadow-navy-strong) !important;
}

.pb-modal-hdr {
  background: var(--pt-navy-grad) !important;
  color: #ffffff !important;
}

.pb-modal-title { color: #ffffff !important; }
.pb-close { color: #ffffff !important; }

/* (NEW badge styles moved to site.css since the sidebar is shared chrome.) */

/* (KPI rate-value polish moved to site.css so other pages — gilts, etc. —
   pick up the same visual styling.) */

/* ---------- Table headers — gradient on the row, transparent cells ----------
   To get a SINGLE continuous gradient across the whole header row (instead of
   each cell starting the gradient over from its own left edge), apply the
   gradient to the parent (tr / .tabulator-header) and make the cells
   transparent. */

/* Predictions table */
#pwlb-predictions-chart .pwlb-predictions-table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

#pwlb-predictions-chart .pwlb-predictions-table thead tr {
  background: var(--pt-navy-grad) !important;
}

#pwlb-predictions-chart .pwlb-predictions-table thead th,
#pwlb-predictions-chart .pwlb-predictions-table thead th:first-child {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--pt-orange) !important;
  border: none !important;
}

#pwlb-predictions-chart .pwlb-predictions-table thead th *,
#pwlb-predictions-chart .pwlb-predictions-table thead th:first-child * {
  color: var(--pt-orange) !important;
}

#pwlb-predictions-chart .pwlb-predictions-table thead tr:nth-child(2) th {
  border-bottom: none !important;
}

/* Latest PWLB Rates (Tabulator) — gradient on the header bar, transparent cols */
.main-content #pwlbTable.tabulator .tabulator-header,
#pwlbTable.tabulator .tabulator-header {
  background: var(--pt-navy-grad) !important;
  background-image: linear-gradient(120deg, #0a2540 0%, #143659 60%, #1a4775 100%) !important;
  border-bottom: none !important;
}

.main-content #pwlbTable.tabulator .tabulator-header .tabulator-col,
.main-content #pwlbTable.tabulator .tabulator-header .tabulator-col[data-field="Period"],
.main-content #pwlbTable.tabulator .tabulator-header .tabulator-col:first-child,
#pwlbTable.tabulator .tabulator-header .tabulator-col,
#pwlbTable.tabulator .tabulator-header .tabulator-col[data-field="Period"],
#pwlbTable.tabulator .tabulator-header .tabulator-col:first-child {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-right: none !important;
  border-bottom: none !important;
}

/* (Tile-header layout rules moved to site.css so every page using the
   site shell — gilts, etc. — gets the same compact header treatment.) */

/* ---------- 5. Page hero polish ---------- */
.site-main-wrap > .container-fluid > h1,
.site-main-wrap .h4.page-title {
  color: var(--pt-text) !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
}
