@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --ink: #142033;
  --muted: #5b677a;
  --line: #d9e0ea;
  --line-strong: #c7d1de;
  --brand: #0f3a5d;
  --brand-soft: #e8f0f8;
  --ok: #0f766e;
  --warn: #a16207;
  --bad: #b42318;
}

html { font-size: 15px; min-height: 100%; }

body.app-shell {
  margin: 0 0 54px;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.app-main-wrap {
  max-width: 1480px;
  margin: 0 auto;
}

.footer {
  position: static !important;
  width: 100%;
  margin-top: 1rem;
}

.dashboard-nav {
  background: #123a5c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.1px;
}

.brand-dot { display: none; }

.dashboard-shell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(20, 32, 51, 0.05);
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.dashboard-header h1 {
  margin: 0;
  font-size: 1.55rem;
  color: var(--brand);
}

.dashboard-header p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 0.8rem;
  padding: 0.75rem;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.filter-group {
  display: grid;
  gap: 0.25rem;
}

.filter-row label {
  font-weight: 600;
  color: #37465d;
}

.filter-row input[type="text"],
.filter-row select {
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 6px;
  padding: 0.42rem 0.58rem;
}

.kpi-grid {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 0.6rem;
}

.kpi-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
  background: #fff;
}

.kpi-label {
  color: var(--muted);
  font-size: 0.82rem;
}

.kpi-card strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--brand);
  font-size: 1.45rem;
  line-height: 1.1;
}

.kpi-positive strong { color: var(--ok); }
.kpi-negative strong { color: var(--bad); }

.section-title {
  margin: 1rem 0 0.45rem;
  font-size: 0.98rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #3f4f66;
}

.table-wrap { margin-top: 0.4rem; }
.table-scroll { overflow-x: auto; }

.comparison-table {
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 0;
}

.comparison-table thead th {
  background: var(--brand-soft);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  color: #173a59;
  font-weight: 700;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.comparison-table th,
.comparison-table td {
  padding: 0.38rem 0.45rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.comparison-table tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

.total-row td {
  background: #edf3f9 !important;
  font-weight: 700;
}

.count-band {
  display: inline-block;
  min-width: 52px;
  text-align: center;
  border-radius: 20px;
  padding: 0.08rem 0.5rem;
  font-weight: 700;
  font-size: 0.87rem;
}

.band-red { background: #fde7e7; color: #9b1c1c; }
.band-amber { background: #ffedd7; color: #8c3b00; }
.band-yellow { background: #fff3cf; color: #8d6508; }
.band-green { background: #dff6e7; color: #19663e; }

.legend-row {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.yearly-grid {
  margin-top: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem;
  background: #fcfdff;
}

.year-row {
  display: grid;
  grid-template-columns: 58px minmax(120px, 1fr) 62px;
  gap: 0.55rem;
  align-items: center;
}

.year-label { color: #3b4b61; font-weight: 600; }
.year-bar-track { background: #e5ebf2; height: 10px; border-radius: 999px; overflow: hidden; }
.year-bar-fill { background: linear-gradient(90deg, #1f6ca6, #2d8cc8); height: 100%; }
.year-bar-fill.is-selected-year { background: linear-gradient(90deg, #ca8a04, #f59e0b); }
.year-value { text-align: right; font-weight: 700; color: #27445f; }

.info-link {
  margin-left: 0.35rem;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  color: #1b4b72;
  border: 1px solid #94b8d8;
  background: #eaf3fb;
}

.details-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.details-table { width: 100%; table-layout: fixed; }
.details-table th, .details-table td { overflow-wrap: anywhere; }
.details-table th:nth-child(1), .details-table td:nth-child(1) { width: 76px; }
.details-table th:nth-child(2), .details-table td:nth-child(2) { width: 160px; }
.details-table th:nth-child(3), .details-table td:nth-child(3) { width: 160px; }
.details-table th:nth-child(4), .details-table td:nth-child(4) { width: 130px; }
.details-table th:nth-child(5), .details-table td:nth-child(5) { width: 100px; }
.details-table th:nth-child(6), .details-table td:nth-child(6) { width: 160px; }
.details-table th:nth-child(7), .details-table td:nth-child(7) { width: 108px; white-space: nowrap; }
.details-table th:nth-child(8), .details-table td:nth-child(8) { width: 170px; }

.view-toggle {
  margin-top: 0.75rem;
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
}

.toggle-btn {
  text-decoration: none;
  color: #244260;
  background: #fff;
  padding: 0.4rem 0.75rem;
  font-weight: 600;
  border-right: 1px solid var(--line-strong);
}

.toggle-btn:last-child { border-right: none; }

.toggle-btn.is-active {
  background: #244f77;
  color: #fff;
}

.details-link {
  margin-left: 0.45rem;
  font-size: 0.8rem;
  text-decoration: none;
  color: #1b5f8a;
  font-weight: 700;
}

.insight-panel {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1rem;
  border: 1px solid #2e72ac;
  border-radius: 10px;
  padding: 0.9rem;
  background: linear-gradient(135deg, #0c6bbc, #0f4f99);
}

.insight-col h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: #ffffff;
  font-weight: 700;
}

.insight-chart {
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.insight-panel .comparison-table thead th {
  background: rgba(0, 0, 0, 0.2);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
}

.insight-panel .comparison-table th,
.insight-panel .comparison-table td {
  color: #ecf7ff;
  border-color: rgba(255, 255, 255, 0.22);
}

.insight-panel .total-row td {
  background: rgba(255, 255, 255, 0.14) !important;
}

.drill-grid {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 0.75rem;
}

.drill-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem;
  background: #fff;
}

.drill-card h3 {
  margin: 0;
  font-size: 1rem;
  color: #173a59;
}

.drill-card p {
  margin: 0.45rem 0 0.6rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.drill-card a {
  text-decoration: none;
  font-weight: 700;
  color: #13803d;
}

.details-filter-grid {
  margin: 0.8rem 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 0.5rem;
}

.details-filter-grid input,
.details-filter-grid select {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0.36rem 0.5rem;
  background: #fff;
}

.pager-row {
  margin-top: 0.8rem;
  display: flex;
  gap: 0.7rem;
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 960px) {
  .filter-row { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
  .insight-panel { grid-template-columns: 1fr; }
  .drill-grid { grid-template-columns: 1fr; }
  .details-filter-grid { grid-template-columns: 1fr; }
  .pager-row { justify-content: flex-start; }
}

.vipmis-shell {
  background: #f7faf5;
  border-radius: 30px;
  border: 1px solid #d8e5dd;
  padding: 1.4rem;
}
.vip-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.vip-brand { font-weight: 700; color: #082f49; font-size: 1.2rem; }
.vip-crumb { color: #5d6d7e; }
.vip-head-pills { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.vip-pill { background: #fff; border: 1px solid #d3e0d8; border-radius: 999px; padding: 0.3rem 0.65rem; font-weight: 600; color: #234; text-decoration: none; }
.vip-live { background: #d8f7e2; color: #125e35; }
.vip-refresh { background: #082f49; color: #fff; }
.vip-greeting h1 { margin-top: 0.85rem; margin-bottom: 0.15rem; font-size: 2rem; color: #082f49; }
.vip-greeting p { margin: 0 0 0.8rem; color: #4f6475; }
.vip-filter { display: grid; grid-template-columns: 1fr 240px; gap: 0.8rem; margin-bottom: 1rem; }
.vip-filter label { font-weight: 600; margin-bottom: 0.2rem; display: block; }
.vip-filter input, .vip-filter select { width: 100%; border: 1px solid #c8d7cd; border-radius: 10px; padding: 0.45rem 0.6rem; }
.vip-hero { display: grid; grid-template-columns: 1.7fr 1fr; gap: 1rem; padding: 1rem; border-radius: 28px; background: linear-gradient(135deg, #1f8a4c, #37af66); color: #fff; box-shadow: 0 8px 25px rgba(20, 85, 50, 0.2); }
.vip-kpi-title { font-weight: 700; letter-spacing: 0.02em; }
.vip-kpi-row { display: flex; align-items: center; gap: 0.7rem; }
.vip-kpi-big { font-size: 3rem; font-weight: 800; line-height: 1.05; }
.vip-delta { border-radius: 999px; padding: 0.2rem 0.6rem; font-weight: 700; }
.vip-delta.up { background: #d5f7de; color: #0f5f35; }
.vip-delta.down { background: #ffe5e5; color: #972323; }
.vip-mini-grid { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 0.6rem; margin-top: 0.8rem; }
.vip-mini-grid article { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); border-radius: 14px; padding: 0.5rem; }
.vip-mini-grid span { display: block; font-size: 0.8rem; }
.vip-mini-grid strong { font-size: 1.2rem; }
.vip-bottom-kpis { margin-top: 0.7rem; display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.9rem; }
.vip-gauge { width: 220px; height: 220px; border-radius: 50%; margin: 0 auto; background: conic-gradient(#e4ffe6 calc(var(--gauge) * 1%), rgba(255,255,255,0.25) 0); display: grid; place-items: center; }
.vip-gauge-inner { width: 155px; height: 155px; border-radius: 50%; background: #1d7f47; display: grid; place-items: center; text-align: center; padding: 0.6rem; }
.vip-gauge-inner strong { font-size: 1.7rem; }
.vip-gauge-inner span { font-size: 0.8rem; }
.vip-summary-grid { margin-top: 0.95rem; display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 0.65rem; }
.vip-summary-card { background: #fff; border-radius: 16px; border: 1px solid #d9e7dd; padding: 0.7rem; box-shadow: 0 3px 10px rgba(5, 35, 20, 0.05); }
.vip-summary-card h3 { margin: 0; font-size: 0.86rem; color: #597; text-transform: uppercase; }
.vip-summary-card strong { font-size: 1.65rem; color: #0c5331; }
.vip-exec-grid { margin-top: 0.9rem; display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 0.75rem; }
.vip-gradient-card { border-radius: 22px; padding: 0.9rem; color: #fff; min-height: 190px; }
.vip-gradient-card h3 { margin-top: 0; }
.vip-gradient-card.green { background: linear-gradient(135deg, #15803d, #2fae6b); }
.vip-gradient-card.blue { background: linear-gradient(135deg, #0f4a8a, #1d78c9); }
.vip-gradient-card.purple { background: linear-gradient(135deg, #6d28d9, #8b5cf6); }
.vip-gradient-card.orange { background: linear-gradient(135deg, #c2410c, #f59e0b); }
.vip-mini-table { width: 100%; color: #fff; font-size: 0.86rem; }
.vip-mini-table td, .vip-mini-table th { border-color: rgba(255,255,255,0.35); }
.vip-funds { margin-top: 1rem; border-radius: 26px; padding: 1rem; background: linear-gradient(135deg, #0f5eaf, #0b3f78); color: #fff; }
.vip-funds-head h2 { margin: 0; font-size: 1.15rem; letter-spacing: 0.05em; }
.vip-funds-head p { margin: 0.15rem 0 0.6rem; opacity: 0.9; }
.vip-funds-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0.85rem; }
.vip-funds-table th { color: #fff; background: rgba(0,0,0,0.18); }
.vip-funds-table td { color: #eef7ff; }
.vip-bars h3 { font-size: 1rem; margin-bottom: 0.55rem; }
.vip-bar-row { display: grid; grid-template-columns: 35px 1fr 45px; gap: 0.45rem; align-items: center; margin-bottom: 0.35rem; }
.vip-bar-track { background: rgba(255,255,255,0.2); height: 11px; border-radius: 999px; overflow: hidden; }
.vip-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #d7ecff, #8ec8f7); }
.vip-comparison-card { margin-top: 1rem; background: #fff; border: 1px solid #d4e1d8; border-radius: 24px; padding: 0.8rem; }
.vip-comparison-card h2 { margin-top: 0; color: #082f49; font-size: 1.1rem; }
.selected-col { background: #e8f4ff !important; }
.vip-drill { margin-top: 1rem; }
.vip-drill h2 { color: #082f49; text-transform: uppercase; font-size: 1rem; }
.vip-drill-grid { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 0.65rem; }
.vip-drill-grid article { background: #fff; border: 1px solid #d7e4da; border-radius: 18px; padding: 0.8rem; }
.vip-drill-grid a { text-decoration: none; color: #149647; font-weight: 700; }

@media (max-width: 960px) {
  .vip-filter, .vip-hero, .vip-summary-grid, .vip-exec-grid, .vip-funds-grid, .vip-drill-grid { grid-template-columns: 1fr; }
}
