:root {
  --bg-0: #07090e;
  --bg-1: #0d111a;
  --bg-2: #131926;
  --bg-3: #1b2336;
  --border: #232d42;
  --text-main: #e6edf3;
  --text-muted: #8b98af;
  --accent-cyan: #00e5ff;
  --accent-green: #00e676;
  --accent-amber: #ffab00;
  --accent-red: #ff5252;
  --accent-purple: #b388ff;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;
}

[data-theme="light"] {
  --bg-0: #f4f6fa;
  --bg-1: #ffffff;
  --bg-2: #eef2f7;
  --bg-3: #e2e8f0;
  --border: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #475569;
  --accent-cyan: #0284c7;
  --accent-green: #16a34a;
  --accent-amber: #d97706;
  --accent-red: #dc2626;
  --accent-purple: #7c3aed;
}

[data-theme="light"] #code-editor,
[data-theme="light"] #optimal-hint-code,
[data-theme="light"] .asm-box,
[data-theme="light"] .blog-content pre,
[data-theme="light"] .admin-md-textarea,
[data-theme="light"] .admin-code-textarea,
[data-theme="light"] .problem-body pre {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .blog-content p,
[data-theme="light"] .blog-content li,
[data-theme="light"] .problem-body {
  color: #1e293b !important;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-0);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Topbar */
.topbar {
  height: 58px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.brand-badge {
  background: rgba(0, 229, 255, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 229, 255, 0.35);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
}

.brand-title {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-title .accent {
  color: var(--accent-cyan);
}

.brand-sub {
  color: var(--text-muted);
  font-size: 12px;
  border-left: 1px solid var(--border);
  padding-left: 10px;
}

.nav-tabs {
  display: flex;
  gap: 6px;
}

.nav-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s ease;
}

.nav-btn:hover {
  color: var(--text-main);
  background: var(--bg-2);
}

.nav-btn.active {
  color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.3);
}

.dot.live {
  width: 7px;
  height: 7px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-green);
}

.compiler-status {
  display: flex;
  gap: 10px;
}

.status-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 4px 9px;
  border-radius: 4px;
}

.status-pill strong {
  color: var(--text-main);
}

/* Views */
.view-section {
  display: none;
  flex: 1;
}

.view-section.active {
  display: block;
}

/* Playground Grid */
.playground-grid {
  display: grid;
  grid-template-columns: 440px 1fr;
  height: calc(100vh - 58px);
}

.panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.problem-panel {
  background: var(--bg-1);
  border-right: 1px solid var(--border);
}

.panel-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.problem-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-cyan);
  letter-spacing: 1px;
}

#problem-select {
  background: var(--bg-2);
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 7px 10px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  outline: none;
}

.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--bg-3);
}

.tier-targets {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-0);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
}

.tier-chip {
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg-2);
  border: 1px solid var(--border);
}

.tier-chip.s-plus {
  border-color: rgba(0, 230, 118, 0.4);
  color: var(--accent-green);
}

.tier-chip.s-tier {
  border-color: rgba(0, 229, 255, 0.4);
  color: var(--accent-cyan);
}

.problem-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  font-size: 13.5px;
  line-height: 1.65;
  color: #cdd6e5;
}

.problem-body h3 {
  color: var(--text-main);
  font-size: 14px;
  margin: 14px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.problem-body h3:first-child {
  margin-top: 0;
}

.problem-body p {
  margin-bottom: 10px;
}

.problem-body ul {
  margin: 6px 0 12px 18px;
}

.problem-body li {
  margin-bottom: 5px;
}

.problem-body code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-2);
  color: var(--accent-cyan);
  padding: 2px 5px;
  border-radius: 3px;
}

.hint-box {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}

.hint-header {
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-amber);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
}

#optimal-hint-code {
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #a5d6ff;
  background: #06080c;
  overflow-x: auto;
  border-top: 1px solid var(--border);
  max-height: 190px;
}

/* Workspace Panel */
.workspace-panel {
  background: var(--bg-0);
}

.editor-toolbar {
  padding: 10px 16px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

#username-input,
#opt-flag-select {
  background: var(--bg-2);
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, #00c853, #00e5ff);
  color: #04080e;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-primary:hover {
  opacity: 0.92;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: wait;
}

.btn-secondary {
  background: var(--bg-2);
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 7px 12px;
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
}

.editor-container {
  flex: 1;
  display: flex;
  position: relative;
  min-height: 240px;
}

#code-editor {
  width: 100%;
  height: 100%;
  background: #080b11;
  color: #e6edf3;
  border: none;
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.55;
  resize: none;
  outline: none;
  tab-size: 4;
}

/* Telemetry Deck */
.telemetry-deck {
  height: 295px;
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.telemetry-tabs {
  display: flex;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.subtab-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-right: 1px solid var(--border);
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.subtab-btn.active {
  background: var(--bg-1);
  color: var(--accent-cyan);
  border-bottom: 2px solid var(--accent-cyan);
}

.subtab-content {
  display: none;
  flex: 1;
  padding: 14px 18px;
  overflow-y: auto;
}

.subtab-content.active {
  display: block;
}

.telemetry-empty {
  color: var(--text-muted);
  font-size: 13px;
  padding: 36px 0;
  text-align: center;
}

.rank-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.tier-circle {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  background: rgba(0, 230, 118, 0.15);
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
}

.rank-meta {
  flex: 1;
}

.rank-title {
  font-weight: 700;
  font-size: 14px;
}

.rank-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.compile-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.kpi-card {
  background: var(--bg-0);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.kpi-card.highlight {
  border-color: rgba(0, 229, 255, 0.45);
}

.kpi-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.kpi-unit {
  font-size: 11px;
  color: var(--text-muted);
}

.asm-box,
.error-box {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: #a5d6ff;
  white-space: pre-wrap;
}

.error-box {
  color: var(--accent-red);
  background: rgba(255, 82, 82, 0.08);
  border: 1px solid rgba(255, 82, 82, 0.3);
  padding: 12px;
  border-radius: 6px;
}

/* Blogs Layout */
.blogs-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  min-height: calc(100vh - 58px);
  max-width: 100%;
}

.blog-sidebar {
  background: var(--bg-1);
  border-right: 1px solid var(--border);
  padding: 18px;
  min-width: 0;
  max-width: 100%;
}

.sidebar-header h2 {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-cyan);
  margin-bottom: 4px;
}

.sidebar-header p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.blog-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.blog-card:hover,
.blog-card.active {
  border-color: var(--accent-cyan);
}

.blog-card h4 {
  font-size: 13.5px;
  margin-bottom: 6px;
}

.blog-card-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.blog-reader {
  max-width: 880px;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  padding: 36px 48px;
  line-height: 1.75;
}

.blog-reader h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.blog-subtitle {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 16px;
}

.blog-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.tag-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--accent-cyan);
  padding: 3px 8px;
  border-radius: 4px;
}

.blog-content h2 {
  margin: 26px 0 10px;
  font-size: 19px;
  color: var(--accent-cyan);
}

.blog-content h3 {
  margin: 18px 0 8px;
  font-size: 15px;
}

.blog-content p {
  margin-bottom: 14px;
  color: #d4dce8;
}

.blog-content pre {
  background: #06090f;
  border: 1px solid var(--border);
  padding: 14px 16px;
  border-radius: 6px;
  max-width: 100%;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #a5d6ff;
  margin: 12px 0 18px;
}

.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13px;
}

.blog-content th,
.blog-content td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}

.blog-content th {
  background: var(--bg-2);
  font-family: var(--font-mono);
}

.blog-cta-box {
  margin-top: 28px;
  padding: 16px 20px;
  background: rgba(0, 229, 255, 0.07);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Leaderboard */
.leaderboard-container {
  max-width: 1180px;
  margin: 28px auto;
  padding: 0 24px;
}

.leaderboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
}

.leaderboard-header h2 {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  font-size: 20px;
}

.leaderboard-header p {
  color: var(--text-muted);
  font-size: 13px;
}

.leaderboard-filter select {
  background: var(--bg-2);
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 7px 12px;
  border-radius: 5px;
  font-family: var(--font-mono);
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-1);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.rank-table th,
.rank-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.rank-table th {
  background: var(--bg-2);
  color: var(--text-muted);
  font-size: 11px;
}

.tier-pill {
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
}

.tier-Splus {
  background: rgba(0, 230, 118, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(0, 230, 118, 0.4);
}

.tier-S {
  background: rgba(0, 229, 255, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 229, 255, 0.4);
}

.tier-A {
  background: rgba(179, 136, 255, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(179, 136, 255, 0.4);
}

.tier-B,
.tier-C {
  background: rgba(255, 171, 0, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(255, 171, 0, 0.4);
}

.hidden {
  display: none !important;
}

/* Admin Studio */
.admin-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 58px);
  padding: 24px;
}

.admin-login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-login-card h2 {
  font-family: var(--font-mono);
  font-size: 20px;
}

.admin-login-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.admin-workspace {
  display: grid;
  grid-template-columns: 310px 1fr;
  height: calc(100vh - 58px);
}

.admin-sidebar {
  background: var(--bg-1);
  border-right: 1px solid var(--border);
  padding: 14px;
  overflow-y: auto;
}

.admin-mode-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  margin-bottom: 14px;
  background: var(--bg-0);
  padding: 4px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.admin-mode-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 7px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.admin-mode-btn.active {
  background: var(--bg-2);
  color: var(--accent-cyan);
}

.admin-editor-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  height: calc(100vh - 58px);
  overflow: hidden;
}

.admin-editor-single {
  height: calc(100vh - 58px);
  overflow-y: auto;
}

.admin-form-pane {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
}

.admin-preview-pane {
  background: var(--bg-0);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.admin-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.admin-preview-pane .admin-pane-header {
  padding: 18px 24px 10px;
}

.admin-pane-header h3 {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--accent-cyan);
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.admin-form-group label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
}

.admin-form-group input,
.admin-form-group select {
  background: var(--bg-2);
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 13px;
  outline: none;
}

.admin-form-group input:focus,
.admin-form-group textarea:focus {
  border-color: var(--accent-cyan);
}

.markdown-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
}

.md-snippet-btns {
  display: flex;
  gap: 6px;
}

.md-snippet-btns button {
  background: var(--bg-2);
  color: var(--accent-cyan);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
}

.md-snippet-btns button:hover {
  border-color: var(--accent-cyan);
}

.admin-md-textarea,
.admin-code-textarea {
  width: 100%;
  flex: 1;
  min-height: 250px;
  background: #06090f;
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  resize: vertical;
  outline: none;
}

.admin-status-banner {
  padding: 10px 14px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(0, 230, 118, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(0, 230, 118, 0.4);
}

/* Responsive Tables & Bug/QA Grids */
.table-scroll-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.bug-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 4px;
}

.qa-diag-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* Responsive Breakpoints (Laptop, Tablet & Mobile Phones) */
@media (max-width: 1280px) {
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .playground-grid {
    grid-template-columns: 360px 1fr;
  }
  .brand-sub {
    display: none;
  }
  .qa-diag-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 960px) {
  .topbar {
    height: auto;
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .nav-tabs,
  .compiler-status {
    flex-wrap: wrap;
    gap: 6px;
  }
  .playground-grid,
  .blogs-layout,
  .admin-workspace,
  .admin-editor-split {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
  }
  .problem-panel,
  .blog-sidebar,
  .admin-sidebar,
  .admin-form-pane {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .blog-reader {
    padding: 24px 22px;
    max-width: 100%;
  }
  .editor-toolbar {
    flex-wrap: wrap;
    gap: 10px;
  }
  .toolbar-left,
  .toolbar-actions,
  .tier-targets,
  .blog-tags,
  .leaderboard-header {
    flex-wrap: wrap;
  }
  .kpi-grid,
  .admin-form-grid,
  .admin-form-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .bug-details-grid {
    grid-template-columns: 1fr;
  }
  .telemetry-deck {
    height: auto;
    min-height: 260px;
  }
  #code-editor {
    min-height: 280px;
  }
  /* Tablet Leaderboard Compact Layout (BUG-121 Fix) */
  .rank-table {
    font-size: 11px;
  }
  .rank-table th,
  .rank-table td {
    padding: 8px 6px;
  }
  .rank-table th:nth-child(8),
  .rank-table td:nth-child(8),
  .rank-table th:nth-child(10),
  .rank-table td:nth-child(10) {
    display: none;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 10px 12px;
  }
  .nav-btn {
    padding: 6px 10px;
    font-size: 12px;
  }
  .blog-reader {
    padding: 18px 14px;
  }
  .blog-reader h1 {
    font-size: 21px;
    line-height: 1.3;
  }
  .blog-subtitle {
    font-size: 14px;
  }
  .blog-cta-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .leaderboard-container {
    margin: 16px auto;
    padding: 0 12px;
  }
  /* Mobile Phone Leaderboard Compact Columns (BUG-121 Fix) */
  .rank-table {
    font-size: 10.5px;
  }
  .rank-table th,
  .rank-table td {
    padding: 7px 5px;
  }
  .rank-table th:nth-child(6),
  .rank-table td:nth-child(6),
  .rank-table th:nth-child(7),
  .rank-table td:nth-child(7),
  .rank-table th:nth-child(9),
  .rank-table td:nth-child(9) {
    display: none;
  }
  .qa-diag-grid,
  .admin-form-grid,
  .admin-form-grid-3 {
    grid-template-columns: 1fr;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .kpi-value {
    font-size: 15px;
  }
  .rank-banner {
    flex-wrap: wrap;
  }
  .status-pill {
    font-size: 10.5px;
  }
}

@media (max-width: 380px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}


