﻿/* ===== VISION UI GLASSMORPHISM THEME вЂ” v3 Design System ===== */
:root {
  --sidebar-w: 230px;
  --sidebar-collapsed-w: 56px;
  --topbar-h: 44px;

  /* Deep dark theme */
  --content-bg: #0b0e14;
  --card-bg: #161b26;
  --card-border: rgba(255, 255, 255, 0.06);
  --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);

  /* Sidebar */
  --sidebar-bg: #10141e;
  --sidebar-hover: rgba(255, 255, 255, 0.04);
  --sidebar-active: rgba(0, 117, 255, 0.18);
  --sidebar-text: #7b7f9e;
  --sidebar-text-active: #ffffff;
  --sidebar-divider: rgba(255, 255, 255, 0.05);

  /* Accent palette */
  --accent: #0075FF;
  --accent-cyan: #00E5FF;
  --accent-purple: #7928CA;

  /* Typography scale */
  --fs-sm: 11px;   /* captions, labels */
  --fs-md: 13px;   /* body, metric names */
  --fs-lg: 18px;   /* headings, stat values */
  --fs-xl: 20px;   /* page titles */

  /* Text — crisp contrast on dark */
  --text-primary: #FFFFFF;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Status — soft bg with white text inside badges */
  --green: #01B574;
  --green-bg: rgba(1, 181, 116, 0.15);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.15);
  --orange: #f59e0b;
  --orange-bg: rgba(245, 158, 11, 0.15);
  --status-good-bg: rgba(1, 181, 116, 0.15);
  --status-good-text: #fff;
  --status-warn-bg: rgba(245, 158, 11, 0.15);
  --status-warn-text: #fff;
  --status-bad-bg: rgba(239, 68, 68, 0.15);
  --status-bad-text: #fff;

  /* Accent */
  --accent-hover: #005ce6;
  --accent-bg: rgba(0, 117, 255, 0.12);

  /* Sizes вЂ” unified 16px radius for premium look */
  --radius: 16px;
  --radius-lg: 20px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Aliases for legacy templates */
  --d-card-bg: var(--card-bg);
  --d-border: var(--card-border);
  --d-border-light: rgba(255, 255, 255, 0.03);
  --d-text: var(--text-primary);
  --d-muted: var(--text-secondary);
  --d-primary: var(--accent);
  --d-primary-bg: var(--accent-bg);
  --d-green: var(--green);
  --d-green-bg: var(--green-bg);
  --d-red: var(--red);
  --d-red-bg: var(--red-bg);
  --d-orange: var(--orange);
  --d-orange-bg: var(--orange-bg);
  --d-warning: var(--orange);
  --d-warning-bg: var(--orange-bg);
  --d-info: var(--accent);
  --d-info-bg: var(--accent-bg);
  --d-bg-subtle: rgba(255, 255, 255, 0.03);
  --d-shadow-sm: var(--card-shadow);
}

/* ===== Glass card utility ===== */
.d-glass {
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
}

* { box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--content-bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}

/* ===== LAYOUT ===== */
.d-layout {
  display: flex;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--content-bg);
}

/* ===== SIDEBAR ===== */
.d-sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1030;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.d-sidebar.collapsed {
  width: var(--sidebar-collapsed-w);
}
.d-sidebar.collapsed .d-sidebarg {
  width: var(--sidebar-collapsed-w);
}
.d-sidebar.collapsed .d-logo-text,
.d-sidebar.collapsed .d-logo-sub,
.d-sidebar.collapsed .d-nav-label,
.d-sidebar.collapsed .d-nav-label-text,
.d-sidebar.collapsed .d-nav-badge,
.d-sidebar.collapsed #dThemeLabel {
  display: none;
}
.d-sidebar.collapsed .d-nav-item {
  padding: 6px 10px;
  justify-content: center;
}
.d-sidebar.collapsed .d-nav-iconbox {
  margin-right: 0;
}
.d-sidebar.collapsed .d-sidebar-footer {
  justify-content: center;
  padding: 8px 4px;
}
.d-sidebar.hidden {
  width: 0;
  overflow: hidden;
  border-right: none;
}
.d-sidebar.hidden + .d-main {
  margin-left: 0;
}

.d-sidebarg {
  padding: 0 12px;
  width: var(--sidebar-w);
  transition: width 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.d-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 10px;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}
.d-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
  box-shadow: 0 4px 16px rgba(0, 117, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
  color: #fff;
}
.d-logo-text {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  letter-spacing: 0.3px;
  color: #fff;
}
.d-logo-sub {
  font-size: 9px;
  color: var(--sidebar-text);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.d-nav {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
  min-height: 0;
}
.d-nav::-webkit-scrollbar { width: 3px; }
.d-nav::-webkit-scrollbar-thumb { background: var(--sidebar-divider); border-radius: 4px; }

.d-nav-label {
  padding: 12px 16px 4px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  white-space: nowrap;
}

.d-nav-item {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 6px 14px;
  margin: 1px 8px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
}
.d-nav-item:hover {
  background: var(--sidebar-hover);
  color: var(--text-primary);
}
.d-nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
  font-weight: 600;
}

/* Icon container for Vision UI style */
.d-nav-iconbox {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 10px;
  transition: all 0.2s ease;
}
.d-nav-item:hover .d-nav-iconbox {
  background: rgba(255, 255, 255, 0.08);
}
.d-nav-item.active .d-nav-iconbox {
  background: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 117, 255, 0.3);
}
.d-nav-item i {
  font-size: 13px;
  transition: color 0.2s ease;
}
.d-nav-item.active i {
  color: #fff;
}
.d-nav-item .d-nav-label-text {
  flex: 1;
}

.d-nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  min-width: 18px;
  text-align: center;
}

.d-sidebar-divider {
  height: 1px;
  background: var(--sidebar-divider);
  margin: 4px 12px;
}

/* Sidebar footer */
.d-sidebar-footer {
  padding: 8px 12px;
  border-top: 1px solid var(--sidebar-divider);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.d-sidebar-footer .d-nav-item {
  margin: 0;
  padding: 6px 10px;
  flex: 1;
  justify-content: center;
}
.d-theme-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin: 1px 8px;
  border: none;
  background: transparent;
  color: var(--sidebar-text);
  font-size: 12px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  width: calc(100% - 16px);
  font-family: var(--font);
  font-weight: 500;
}
.d-theme-btn:hover { background: var(--sidebar-hover); color: var(--text-primary); }
.d-theme-btn i { font-size: 13px; width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,0.04); display: inline-flex; align-items: center; justify-content: center; margin-right: 10px; }

/* ===== MAIN AREA ===== */
.d-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  transition: margin-left 0.25s ease;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--content-bg);
}
.d-sidebar.collapsed + .d-main {
  margin-left: var(--sidebar-collapsed-w);
}

/* ===== TOP BAR ===== */
.d-topbar {
  height: var(--topbar-h);
  background: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 1020;
}
.d-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.d-sidebar-toggle {
  display: inline-flex;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  line-height: 1;
  transition: background 0.15s;
}
.d-sidebar-toggle:hover { background: rgba(255, 255, 255, 0.06); }
.d-page-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.d-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.d-topbar-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: none;
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.d-topbar-btn:hover { background: rgba(255, 255, 255, 0.08); color: var(--text-primary); }
.d-topbar-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid transparent;
}

.d-user-dropdown {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s;
}
.d-user-dropdown:hover { background: rgba(255, 255, 255, 0.06); }
.d-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-purple));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.d-user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* ===== CONTENT ===== */
.d-content {
  flex: 1;
  padding: 20px 24px;
  background: transparent;
}

/* ===== STAT CARDS ===== */
.d-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.d-stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--card-shadow);
  transition: all 0.2s ease;
}
.d-stat-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.1);
}
.d-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
}
.d-stat-icon.purple { background: rgba(121, 40, 202, 0.2); color: var(--accent-purple); }
.d-stat-icon.green { background: var(--green-bg); color: var(--green); }
.d-stat-icon.orange { background: var(--orange-bg); color: var(--orange); }
.d-stat-icon.red { background: var(--red-bg); color: var(--red); }
.d-stat-icon.blue { background: var(--accent-bg); color: var(--accent); }
.d-stat-info { flex: 1; min-width: 0; }
.d-stat-value { font-size: 26px; font-weight: 800; color: #FFFFFF; line-height: 1.1; letter-spacing: -0.02em; }
.d-stat-label { font-size: var(--fs-sm); color: var(--text-secondary); margin-top: 2px; font-weight: 500; letter-spacing: 0.2px; }
.d-stat-card.primary-metric { border-color: rgba(0,117,255,0.3); box-shadow: 0 0 20px rgba(0,117,255,0.15), var(--card-shadow); }
.d-stat-card.primary-metric .d-stat-icon { background: rgba(0,117,255,0.25); color: #fff; box-shadow: 0 0 16px rgba(0,117,255,0.2); }
.d-stat-change {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}
.d-stat-change.up { color: var(--green); }
.d-stat-change.down { color: var(--red); }

/* ===== STAT ROW (flex version) ===== */
.d-stats-row {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.d-stats-row .d-stat-card {
  flex: 1;
  min-width: 200px;
}

/* ===== GENERIC CARD ===== */
.d-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}
.d-card-body {
  padding: 8px 12px;
}
.d-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px 0;
}

/* ===== VISION UI BUTTONS ===== */
.btn-apple {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: var(--fs-sm);
  font-weight: 600;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, var(--accent), #005ce6);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  font-family: var(--font);
  line-height: 1.4;
  box-shadow: 0 4px 14px rgba(0, 117, 255, 0.25);
}
.btn-apple:hover {
  background: linear-gradient(135deg, #005ce6, #0047b3);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 117, 255, 0.35);
  transform: translateY(-1px);
}
.btn-apple:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.btn-apple-sm {
  padding: 5px 10px;
  font-size: var(--fs-sm);
  border-radius: 8px;
}
.btn-outline-apple {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: var(--fs-sm);
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  font-family: var(--font);
  line-height: 1.4;
}
.btn-outline-apple:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 117, 255, 0.08);
  text-decoration: none;
}
.btn-apple-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  box-shadow: none;
}
.btn-apple-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  box-shadow: none;
}
.btn-apple-active {
  background: linear-gradient(135deg, var(--accent), #005ce6) !important;
  color: #fff !important;
  border-color: transparent !important;
}

/* ===== CHARTS ===== */
.d-charts {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.d-chart-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
}
.d-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.d-chart-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.d-chart-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  font-weight: 500;
}
.d-chart-body {
  position: relative;
  height: 280px;
}
.d-chart-body canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ===== TABLE CARD ===== */
.d-table-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.d-table-header {
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
   border-bottom: 1px solid var(--card-border);
}
.d-table-title {
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
}
.d-table-body {
  overflow-x: auto;
  padding: 0;
}
.d-table-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.d-table-body th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  padding: 14px 24px;
  border-bottom: 1px solid var(--card-border);
  background: transparent;
}
.d-table-body td {
  padding: 12px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #FFFFFF;
}
.d-table-body tr:last-child td { border-bottom: none; }
.d-table-body tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* ===== KPI CATEGORY CARDS ===== */
.d-kpi-flex {
  display: flex;
  gap: 8px;
}
.d-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  flex: 1;
}
@media (max-width: 768px) {
  .d-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .d-chart-body { height: 240px; }
  .d-chart-card { padding: 14px; }
}
@media (max-width: 480px) {
  .d-kpi-grid { grid-template-columns: 1fr; }
}
.d-kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  transition: all 0.2s;
}
.d-kpi-card:hover { border-color: rgba(255, 255, 255, 0.1); }
.d-kpi-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  font-size: var(--fs-sm);
  font-weight: 600;
}
.d-kpi-name {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.d-kpi-card-educ {
  width: 160px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.d-kpi-card-educ .d-kpi-head {
  flex-direction: column;
  gap: 8px;
  padding: 16px 12px;
  text-align: center;
}
.d-kpi-card-educ .d-kpi-name {
  font-size: 11px;
  white-space: normal;
  line-height: 1.3;
}
.d-kpi-card-educ .d-kpi-row-pct {
  font-size: 14px;
}
.d-kpi-body { padding: 0; }
.d-kpi-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  font-size: 10px;
  line-height: 1.3;
}
.d-kpi-row + .d-kpi-row { border-top: 1px solid rgba(255,255,255,0.04); }
.d-kpi-row-name { color: var(--text-secondary); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.d-kpi-row-bar { flex: 1; height: 4px; background: rgba(255,255,255,0.06); border-radius: 4px; margin: 0 8px; overflow: hidden; }
.d-kpi-row-bar-fill { height: 100%; border-radius: 4px; }
.d-kpi-row-pct { font-weight: 700; font-size: 11px; min-width: 36px; text-align: right; }
.d-kpi-row-pct.ok { color: var(--status-good-text); }
.d-kpi-row-pct.fail { color: var(--status-bad-text); }
.d-kpi-row-pct.warn { color: var(--status-warn-text); }
.d-kpi-row-val { font-weight: 700; color: #FFFFFF; }

/* ===== PILL BADGES (shared) ===== */
.cat-pct, .d-kpi-row-pct.pill { display:inline-block;padding:2px 8px;border-radius:20px;font-size:11px;font-weight:700;line-height:1.4; }
.cat-pct.ok, .d-kpi-row-pct.pill.ok { background:var(--status-good-bg); color:var(--status-good-text); }
.cat-pct.warn, .d-kpi-row-pct.pill.warn { background:var(--status-warn-bg); color:var(--status-warn-text); }
.cat-pct.fail, .d-kpi-row-pct.pill.fail { background:var(--status-bad-bg); color:var(--status-bad-text); }
.sp { display:inline-block;padding:2px 8px;border-radius:20px;font-size:12px;font-weight:700;line-height:1.4; }
.sp.good { background:var(--status-good-bg); color:var(--status-good-text); }
.sp.ok { background:var(--status-warn-bg); color:var(--status-warn-text); }
.sp.bad { background:var(--status-bad-bg); color:var(--status-bad-text); }

/* ===== BREADCRUMBS ===== */
.d-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.d-breadcrumbs a { color: var(--text-secondary); text-decoration: none; transition: color 0.15s; }
.d-breadcrumbs a:hover { color: var(--accent); }
.d-breadcrumbs span.sep { color: rgba(255, 255, 255, 0.12); }
.d-breadcrumbs span { color: #FFFFFF; }

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .d-charts { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .d-sidebar { transform: translateX(-100%); width: var(--sidebar-w); }
  .d-sidebar.open { transform: translateX(0); }
  .d-sidebar.collapsed { transform: translateX(-100%); }
  .d-sidebar.collapsed.open { transform: translateX(0); }
  .d-main { margin-left: 0; }
  .d-sidebar-toggle { display: inline-flex; }
  .d-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .d-stats { grid-template-columns: 1fr; }
  .d-content { padding: 12px; }
  .d-user-name { display: none; }
}

/* ===== OVERLAY (mobile) ===== */
.d-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1029; display: none;
}
.d-overlay.show { display: block; }

/* ===== UTILITY ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.15); }

/* Form controls overrides for glassmorphism */
.form-control, .form-select, .form-control-sm, .form-select-sm {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #FFFFFF !important;
  border-radius: 8px !important;
  font-family: var(--font);
  color-scheme: dark;
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(0, 117, 255, 0.2) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}
.form-control::placeholder { color: #6b7194 !important; }

/* Dark dropdown options */
select.form-select, select.form-control, .form-select-sm, select {
  background-color: rgba(6, 11, 40, 0.95) !important;
  color: #FFFFFF !important;
}
select option {
  background: #0B0F2A !important;
  color: #FFFFFF !important;
  padding: 6px 8px;
}
select option:hover, select option:focus, select option:checked {
  background: rgba(0, 117, 255, 0.2) !important;
  color: #FFFFFF !important;
}
select optgroup {
  background: #0B0F2A !important;
  color: var(--text-secondary) !important;
}

/* ===== SHARED KPI BADGE SYSTEM ===== */
.cat-pct {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
}
.cat-pct.ok { background: var(--status-good-bg); }
.cat-pct.warn { background: var(--status-warn-bg); }
.cat-pct.fail { background: var(--status-bad-bg); }
.cat-pct.neutral { background: rgba(255,255,255,0.06); color: var(--text-secondary); }

.sp {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
}
.sp.ok { background: var(--status-good-bg); color: #fff; }
.sp.warn { background: var(--status-warn-bg); color: #fff; }
.sp.fail { background: var(--status-bad-bg); color: #fff; }
.sp.neutral { background: rgba(255,255,255,0.05); color: var(--text-secondary); }
