/* UNRV Dashboard — Stylesheet */

/* ─── Variables & Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --blue: #1B5EA8; --blue-dark: #0C3568; --blue-light: #2E7BC4; --blue-pale: #E8F2FB;
  --orange: #F4A520; --orange-dark: #D4880A; --orange-pale: #FEF3DC;
  --gray: #717173; --gray-border: #E2E8F0; --gray-light: #F7F9FC;
  --navy: #0A1F3D; --white: #FFFFFF;
  --text-dark: #0F172A; --text-mid: #475569; --text-light: #94A3B8;
  --green: #22C55E; --green-pale: #DCFCE7; --green-dark: #16A34A;
  --amber: #F59E0B; --amber-pale: #FEF3C7;
  --red: #EF4444; --red-pale: #FEE2E2;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --radius: 12px; --radius-lg: 20px; --radius-sm: 8px;
  --sidebar: 260px; --header-h: 70px;
}

/* Dark mode */
[data-theme="dark"] {
  --gray-light: #0D1E35; --gray-border: #1E3A5F; --white: #0A1B2E;
  --text-dark: #F1F5F9; --text-mid: #94A3B8; --text-light: #64748B;
  --blue-pale: rgba(27,94,168,0.15); --orange-pale: rgba(244,165,32,0.12);
  --green-pale: rgba(34,197,94,0.12); --amber-pale: rgba(245,158,11,0.12);
  --red-pale: rgba(239,68,68,0.12);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.3); --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
}

html, body { height: 100%; font-family: 'Inter', sans-serif; }
body { background: var(--gray-light); color: var(--text-dark); overflow-x: hidden; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 3px; }

/* ─── Dashboard Header ───────────────────────────────────────────── */
.dash-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h); padding: 0 28px;
  background: var(--white); border-bottom: 1px solid var(--gray-border);
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-sm);
}
.dash-header-left { display: flex; align-items: center; gap: 16px; }
.dash-logo { height: 38px; }
.dash-title {
  font-size: 18px; font-weight: 700; color: var(--text-dark);
  display: flex; flex-direction: column; line-height: 1.2;
}
.dash-title small { font-size: 11px; font-weight: 400; color: var(--text-light); letter-spacing: 0.5px; }

.dash-header-right { display: flex; align-items: center; gap: 12px; }

.sync-indicator {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 20px;
  background: var(--green-pale); border: 1px solid rgba(34,197,94,0.3);
  font-size: 12px; color: var(--green-dark); font-weight: 500;
}
.sync-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  animation: syncPulse 2s ease-in-out infinite;
}
@keyframes syncPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }

.refresh-timer {
  font-size: 12px; color: var(--text-light); padding: 6px 12px;
  border-radius: 20px; border: 1px solid var(--gray-border);
  background: var(--white);
}

.btn-icon {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--gray-light); border: 1px solid var(--gray-border);
  color: var(--text-mid); font-size: 14px; cursor: pointer;
  transition: all 0.2s;
}
.btn-icon:hover { background: var(--blue-pale); color: var(--blue); border-color: var(--blue); }

.btn-header {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all 0.2s; border: none;
}
.btn-header.primary { background: var(--blue); color: var(--white); }
.btn-header.primary:hover { background: var(--blue-dark); }
.btn-header.secondary {
  background: var(--gray-light); color: var(--text-mid);
  border: 1px solid var(--gray-border);
}
.btn-header.secondary:hover { background: var(--blue-pale); color: var(--blue); }
.btn-header.danger { background: var(--red-pale); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }
.btn-header.danger:hover { background: rgba(239,68,68,0.15); }

/* ─── Dashboard Body Layout ──────────────────────────────────────── */
.dash-body {
  padding-top: var(--header-h);
  min-height: 100vh;
}
.dash-main {
  max-width: 1600px; margin: 0 auto;
  padding: 28px;
}

/* ─── Alert Banner ───────────────────────────────────────────────── */
.alert-banner {
  display: none; align-items: center; gap: 12px;
  background: var(--amber-pale); border: 1px solid rgba(245,158,11,0.4);
  border-radius: var(--radius); padding: 14px 20px; margin-bottom: 20px;
  font-size: 13px; font-weight: 500; color: #92400E;
}
.alert-banner.show { display: flex; }
.alert-banner i { font-size: 16px; color: var(--amber); }

/* ─── KPI Cards ──────────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 24px;
}
.kpi-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 22px; border: 1px solid var(--gray-border);
  box-shadow: var(--shadow-sm); transition: box-shadow 0.2s, transform 0.2s;
  position: relative; overflow: hidden;
}
.kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.kpi-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.kpi-card.kpi-blue::after { background: var(--blue); }
.kpi-card.kpi-orange::after { background: var(--orange); }
.kpi-card.kpi-green::after { background: var(--green); }
.kpi-card.kpi-red::after { background: var(--red); }
.kpi-card.kpi-purple::after { background: #8B5CF6; }
.kpi-card.kpi-teal::after { background: #0D9488; }

.kpi-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.kpi-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.kpi-icon.blue { background: var(--blue-pale); color: var(--blue); }
.kpi-icon.orange { background: var(--orange-pale); color: var(--orange-dark); }
.kpi-icon.green { background: var(--green-pale); color: var(--green-dark); }
.kpi-icon.red { background: var(--red-pale); color: var(--red); }
.kpi-icon.purple { background: rgba(139,92,246,0.1); color: #8B5CF6; }
.kpi-icon.teal { background: rgba(13,148,136,0.1); color: #0D9488; }

.kpi-badge {
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  border-radius: 20px; letter-spacing: 0.3px;
}
.kpi-badge.live { background: var(--green-pale); color: var(--green-dark); }

.kpi-value {
  font-size: 26px; font-weight: 800; color: var(--text-dark);
  letter-spacing: -0.5px; line-height: 1.1; margin-bottom: 4px;
}
.kpi-label {
  font-size: 12px; font-weight: 500; color: var(--text-light);
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* Progress ring card */
.kpi-ring {
  display: flex; align-items: center; gap: 16px;
}
.ring-svg { flex-shrink: 0; }
.ring-track { fill: none; stroke: var(--gray-border); stroke-width: 5; }
.ring-fill { fill: none; stroke-width: 5; stroke-linecap: round;
  transform: rotate(-90deg); transform-origin: center;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.ring-text { font-size: 14px; font-weight: 800; }

/* ─── Filter Bar ─────────────────────────────────────────────────── */
.filter-bar {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--gray-border); padding: 16px 20px;
  margin-bottom: 24px; box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-label { font-size: 10px; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; }
select.filter-select, input.filter-date {
  padding: 8px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--gray-border); background: var(--gray-light);
  font-size: 13px; font-family: inherit; color: var(--text-dark);
  outline: none; min-width: 140px; transition: border-color 0.2s;
}
select.filter-select:focus, input.filter-date:focus { border-color: var(--blue); }
.filter-divider { width: 1px; height: 32px; background: var(--gray-border); margin: 0 4px; }
.btn-filter-reset {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  background: none; border: 1px solid var(--gray-border);
  font-size: 12px; font-weight: 500; color: var(--text-mid);
  cursor: pointer; transition: all 0.2s; margin-left: auto;
}
.btn-filter-reset:hover { background: var(--red-pale); color: var(--red); border-color: var(--red); }

/* Date quick pills */
.date-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.date-pill {
  padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 500;
  border: 1px solid var(--gray-border); background: var(--gray-light);
  color: var(--text-mid); cursor: pointer; transition: all 0.2s;
}
.date-pill:hover, .date-pill.active { background: var(--blue); color: var(--white); border-color: var(--blue); }

/* ─── Chart Grid ─────────────────────────────────────────────────── */
.chart-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 20px; margin-bottom: 24px;
}
.chart-card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--gray-border); padding: 24px;
  box-shadow: var(--shadow-sm);
}
.chart-card.full-width { grid-column: 1 / -1; }
.chart-card.col-3 { grid-column: span 1; }
.chart-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.chart-title { font-size: 15px; font-weight: 700; color: var(--text-dark); }
.chart-subtitle { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.chart-actions { display: flex; gap: 6px; }
.chart-canvas-wrap { position: relative; }

/* ─── Stakeholder Table ──────────────────────────────────────────── */
.table-card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--gray-border);
  box-shadow: var(--shadow-sm); margin-bottom: 24px; overflow: hidden;
}
.table-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--gray-border);
  flex-wrap: wrap; gap: 12px;
}
.table-header h3 { font-size: 16px; font-weight: 700; }
.table-controls { display: flex; gap: 10px; align-items: center; }
.table-search {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--gray-border); background: var(--gray-light);
  transition: border-color 0.2s;
}
.table-search:focus-within { border-color: var(--blue); }
.table-search i { color: var(--text-light); font-size: 13px; }
.table-search input {
  border: none; background: none; outline: none; font-size: 13px;
  font-family: inherit; color: var(--text-dark); width: 180px;
}
.table-search input::placeholder { color: var(--text-light); }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 12px 16px; text-align: left; font-size: 11px; font-weight: 600;
  color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px;
  background: var(--gray-light); border-bottom: 1px solid var(--gray-border);
  white-space: nowrap; cursor: pointer; user-select: none;
  transition: background 0.15s;
}
.data-table th:hover { background: var(--blue-pale); color: var(--blue); }
.data-table th.sorted { color: var(--blue); }
.data-table th .sort-icon { margin-left: 6px; font-size: 10px; opacity: 0.6; }
.data-table td {
  padding: 14px 16px; font-size: 13px; color: var(--text-mid);
  border-bottom: 1px solid var(--gray-border);
  vertical-align: middle;
}
.data-table tbody tr { transition: background 0.15s; cursor: pointer; }
.data-table tbody tr:hover { background: var(--blue-pale); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table .font-bold { font-weight: 700; color: var(--text-dark); }
.data-table .font-mono { font-family: 'Courier New', monospace; letter-spacing: -0.5px; }
.data-table .text-right { text-align: right; }

/* Progress bar in table */
.progress-bar-wrap { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.progress-track {
  flex: 1; height: 6px; background: var(--gray-border); border-radius: 3px; overflow: hidden;
}
.progress-fill { height: 100%; border-radius: 3px; transition: width 1s ease; }
.progress-label { font-size: 12px; font-weight: 600; min-width: 36px; text-align: right; }

/* Status badge */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
  white-space: nowrap;
}
.status-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; }
.status-badge.completed { background: var(--green-pale); color: var(--green-dark); }
.status-badge.completed::before { background: var(--green); }
.status-badge.on-track { background: var(--blue-pale); color: var(--blue); }
.status-badge.on-track::before { background: var(--blue-light); }
.status-badge.behind { background: var(--amber-pale); color: #92400E; }
.status-badge.behind::before { background: var(--amber); }
.status-badge.critical { background: var(--red-pale); color: var(--red); }
.status-badge.critical::before { background: var(--red); }

/* Table pagination */
.table-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; border-top: 1px solid var(--gray-border);
  font-size: 13px; color: var(--text-light);
}
.pagination { display: flex; gap: 4px; }
.page-btn {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  border: 1px solid var(--gray-border); background: var(--gray-light);
  font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.page-btn:hover, .page-btn.active { background: var(--blue); color: var(--white); border-color: var(--blue); }

/* ─── Transaction Tabs ───────────────────────────────────────────── */
.tab-card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--gray-border); box-shadow: var(--shadow-sm);
  margin-bottom: 24px; overflow: hidden;
}
.tab-nav {
  display: flex; border-bottom: 1px solid var(--gray-border);
  background: var(--gray-light); padding: 4px;
  gap: 4px; padding: 8px 12px;
}
.tab-btn {
  padding: 10px 20px; border-radius: var(--radius-sm);
  border: none; background: none; font-size: 13px; font-weight: 500;
  color: var(--text-mid); cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; gap: 8px;
}
.tab-btn:hover { background: var(--white); color: var(--text-dark); }
.tab-btn.active {
  background: var(--white); color: var(--blue); font-weight: 600;
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-border);
}
.tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 10px; font-size: 10px; font-weight: 700;
  background: var(--blue-pale); color: var(--blue);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--gray-border); flex-wrap: wrap; gap: 10px;
}

/* ─── Slide-out Detail Panel ─────────────────────────────────────── */
.detail-overlay {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(10,31,61,0.5); backdrop-filter: blur(4px);
}
.detail-overlay.open { display: block; animation: fadeIn 0.2s ease; }
.detail-panel {
  position: fixed; right: 0; top: 0; bottom: 0; z-index: 501;
  width: min(520px, 95vw); background: var(--white);
  box-shadow: -8px 0 40px rgba(0,0,0,0.15);
  transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column; overflow: hidden;
}
.detail-panel.open { transform: translateX(0); }
.detail-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--gray-border);
  background: var(--navy); color: var(--white);
}
.detail-panel-header h3 { font-size: 17px; font-weight: 700; }
.detail-panel-body { flex: 1; overflow-y: auto; padding: 24px; }
.detail-panel-footer {
  padding: 16px 24px; border-top: 1px solid var(--gray-border);
  display: flex; gap: 10px;
}

/* Member detail cards */
.member-summary {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px;
}
.member-stat {
  background: var(--gray-light); border-radius: var(--radius); padding: 16px;
}
.member-stat .mstat-label { font-size: 11px; font-weight: 500; color: var(--text-light); text-transform: uppercase; margin-bottom: 4px; }
.member-stat .mstat-value { font-size: 18px; font-weight: 700; color: var(--text-dark); }
.member-stat .mstat-sub { font-size: 11px; color: var(--text-light); }

.member-ring-wrap {
  display: flex; justify-content: center; padding: 24px 0;
  background: var(--blue-pale); border-radius: var(--radius-lg); margin-bottom: 24px;
  flex-direction: column; align-items: center; gap: 8px;
}
.member-ring-label { font-size: 13px; color: var(--blue); font-weight: 500; }

/* ─── Skeleton Loading ───────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--gray-border) 25%, var(--gray-light) 50%, var(--gray-border) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.5s infinite; border-radius: var(--radius-sm);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-value { height: 28px; margin-bottom: 4px; width: 70%; }

/* ─── Loading State ──────────────────────────────────────────────── */
.loading-overlay {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(10,31,61,0.7); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; flex-direction: column; gap: 16px;
}
.loading-overlay.show { display: flex; }
.loading-spinner {
  width: 48px; height: 48px; border: 4px solid rgba(255,255,255,0.2);
  border-top-color: var(--white); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: var(--white); font-size: 14px; font-weight: 500; }

/* ─── Print Styles ───────────────────────────────────────────────── */
@media print {
  .dash-header, .filter-bar, .chart-actions, .btn-icon,
  .detail-panel, .detail-overlay, .tab-btn, .btn-filter-reset { display: none !important; }
  .dash-body { padding-top: 0; }
  .dash-main { padding: 16px; }
  body { background: white; }
  .kpi-card, .chart-card, .table-card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
  .chart-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .chart-grid { grid-template-columns: 1fr; }
  .chart-card.full-width { grid-column: auto; }
}
@media (max-width: 768px) {
  .dash-main { padding: 16px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  select.filter-select, input.filter-date { min-width: auto; width: 100%; }
  .dash-header { padding: 0 16px; }
  .sync-indicator span.sync-label { display: none; }
  .dash-title small { display: none; }
  .detail-panel { width: 100vw; }
  .member-summary { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .table-controls { flex-direction: column; width: 100%; }
  .table-search { width: 100%; }
}

/* ─── Attachments ────────────────────────────────────────────────── */
.attach-link {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--blue); font-size: 12px; text-decoration: none;
  padding: 2px 8px; border-radius: 4px; background: var(--blue-pale);
  transition: background 0.15s;
}
.attach-link:hover { background: var(--blue); color: white; }

/* Amount colors */
.amt-positive { color: var(--green-dark); font-weight: 600; }
.amt-negative { color: var(--red); font-weight: 600; }

/* ─── Misc ───────────────────────────────────────────────────────── */
.no-data {
  text-align: center; padding: 48px 24px;
  color: var(--text-light); font-size: 14px;
}
.no-data i { font-size: 36px; display: block; margin-bottom: 12px; opacity: 0.3; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ─── Stakeholder Progress Visualization ──────────────────────────── */
.sp-row {
  display: grid;
  grid-template-columns: 150px 1fr 240px;
  align-items: center;
  gap: 16px;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 2px;
}
.sp-row:hover { background: var(--gray-light); }
.sp-meta { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sp-name-text { font-size: 12.5px; font-weight: 500; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-shares-tag { font-size: 10px; background: #FEF3C7; color: #92400E; padding: 1px 5px; border-radius: 4px; margin-left: 3px; }
.sp-bar-col { position: relative; }
.sp-bar-track {
  height: 6px; background: var(--gray-border); border-radius: 20px;
  overflow: visible; position: relative;
}
.sp-bar-fill {
  height: 100%; border-radius: 20px;
  transition: width 0.8s cubic-bezier(.25,.8,.25,1);
}
.sp-promise-marker {
  position: absolute; top: -4px; bottom: -4px;
  width: 2px; background: #F59E0B;
  border-radius: 2px; transform: translateX(-50%);
  z-index: 1;
}
.sp-stats {
  display: grid;
  grid-template-columns: 42px 80px 1fr;
  align-items: center;
  gap: 10px;
}
.sp-pct { font-size: 12px; font-weight: 700; text-align: right; }
.sp-amt { font-size: 11px; color: var(--text-mid); font-weight: 500; text-align: right; white-space: nowrap; }
.sp-due-badge {
  font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 20px;
  white-space: nowrap; text-align: center;
}
.sp-due-badge.fulfilled { background: #DCFCE7; color: #15803D; }
.sp-due-badge.pending   { background: #EBF3FF; color: #1B5EA8; }

/* ─── Enhanced Mobile Responsive ────────────────────────────────── */
@media (max-width: 900px) {
  .dash-header { padding: 0 12px; height: auto; min-height: 60px; flex-wrap: wrap; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .dash-header-right { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  .dash-title { font-size: 14px; }
  .refresh-timer { display: none; }
  .btn-header { padding: 6px 10px; font-size: 12px; }
}
@media (max-width: 768px) {
  .dash-body { padding-top: 56px; }
  .dash-main { padding: 12px; gap: 12px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi-card { padding: 14px; }
  .kpi-value { font-size: 18px; }
  .kpi-ring { flex-direction: column; align-items: center; text-align: center; gap: 8px; }
  .filter-bar { flex-direction: column; align-items: stretch; padding: 14px; gap: 10px; }
  .date-pills { flex-wrap: wrap; gap: 6px; }
  .filter-divider { display: none; }
  .chart-grid { grid-template-columns: 1fr; gap: 12px; }
  .chart-card.full-width { grid-column: auto; }
  .chart-canvas-wrap { height: 200px !important; }
  .table-header { flex-direction: column; gap: 10px; align-items: stretch; }
  .table-controls { flex-direction: column; gap: 8px; width: 100%; }
  .table-controls .btn-header { width: 100%; justify-content: center; }
  .table-search { width: 100%; }
  .data-table { font-size: 12px; }
  .data-table th, .data-table td { padding: 8px 8px; }
  .detail-panel { width: 100vw; right: 0; border-radius: 0; }
  .detail-panel-body { padding: 16px; }
  .member-summary { grid-template-columns: 1fr 1fr; }
  .sp-row { grid-template-columns: 1fr; gap: 4px; padding: 10px; border: 1px solid var(--gray-border); margin-bottom: 6px; }
  .sp-stats { grid-template-columns: 40px 76px 1fr; }
  .tab-nav { gap: 6px; }
  .tab-btn { padding: 7px 10px; font-size: 12px; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .dash-header-left .dash-title { display: none; }
  .kpi-value { font-size: 16px; }
  .data-table th:nth-child(3),
  .data-table td:nth-child(3) { display: none; }
  .sp-amt { display: none; }
}

/* ─── Dark mode: Stakeholder Progress ─────────────────────────────── */
[data-theme="dark"] .sp-row:hover { background: rgba(255,255,255,0.05); }
[data-theme="dark"] .sp-id-tag { background: rgba(27,94,168,0.3); }
[data-theme="dark"] .sp-due-badge.fulfilled { background: rgba(34,197,94,0.15); color: #4ade80; }
[data-theme="dark"] .sp-due-badge.pending   { background: rgba(27,94,168,0.25); color: #60a5fa; }
