:root {
  --bg-page: #050505;
  --bg-card: #0c0c0e;
  --bg-card-inner: #08080a;
  --bg-code: #060607;
  --bg-input: #111114;
  --bg-pill: #18181b;
  --border-color: #1f1f23;
  --border-hover: #323238;
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-purple: #8b5cf6;
  --accent-red: #ef4444;
  --radius-card: 12px;
  --radius-btn: 8px;
}

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

body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

code, pre, .mono {
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, 'Courier New', monospace;
}

/* Top Navbar (Matches Screenshots 1-6) */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  height: 60px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  cursor: pointer;
}

.brand-logo span.terminal-icon {
  font-family: monospace;
  font-weight: 900;
  color: #fff;
  font-size: 1.1rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-item {
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  transition: all 0.15s ease;
}

.nav-item:hover {
  color: #fff;
  background: #121215;
}

.nav-item.active {
  color: #fff;
  background: #141418;
  border-color: #27272d;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 6px;
  border-radius: 999px;
  background: #121215;
  border: 1px solid var(--border-color);
  margin-left: 8px;
  font-size: 0.82rem;
  color: #e4e4e7;
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ea580c;
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: lowercase;
}

/* Main Container */
.page-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 28px 80px;
}

.page-container.narrow {
  max-width: 1020px;
}

/* Page Header Row */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-top: 4px;
}

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

/* Inputs & Selects */
.input-dark, .select-dark, .textarea-dark {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-btn);
  color: var(--text-primary);
  padding: 8px 13px;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.input-dark:focus, .select-dark:focus, .textarea-dark:focus {
  border-color: #52525b;
}

.textarea-dark {
  width: 100%;
  min-height: 120px;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 0.82rem;
  resize: vertical;
}

/* Buttons */
.btn-white {
  background: #ffffff;
  color: #09090b;
  border: 1px solid #ffffff;
  border-radius: var(--radius-btn);
  padding: 8px 16px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

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

.btn-dark {
  background: #141417;
  color: #e4e4e7;
  border: 1px solid #27272b;
  border-radius: var(--radius-btn);
  padding: 8px 15px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-dark:hover {
  background: #1c1c21;
  border-color: #3f3f46;
  color: #fff;
}

.btn-purple {
  background: #7c3aed;
  color: #fff;
  border: 1px solid #8b5cf6;
  border-radius: var(--radius-btn);
  padding: 8px 16px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-purple:hover {
  background: #6d28d9;
}

.btn-red-outline {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-btn);
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-red-outline:hover {
  background: rgba(239, 68, 68, 0.2);
}

.btn-green-pill {
  background: #059669;
  color: #ffffff;
  border: 1px solid #10b981;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-green-pill:hover {
  background: #10b981;
  transform: translateY(-1px);
}

.btn-icon-square {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #141417;
  border: 1px solid #27272b;
  color: #a1a1aa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.btn-icon-square:hover {
  background: #1e1e24;
  border-color: #3f3f46;
  color: #fff;
}

.btn-icon-trash {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.32);
  color: #ef4444;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.btn-icon-trash:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #f87171;
  transform: translateY(-1px);
}

.test-hint-box {
  border: 1px solid #27272a;
  border-radius: 10px;
  background: #090a0c;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: #a1a1aa;
  line-height: 1.45;
}

.badge-draft {
  background: rgba(245, 158, 11, 0.14);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-weight: 700;
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.draft-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #141417;
  border: 1px solid #27272b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d4d4d8;
  flex-shrink: 0;
}

.test-loadstring-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #090a0c;
  border: 1px solid #1f1f24;
  border-radius: 8px;
  padding: 8px 14px;
  margin-top: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.78rem;
}

.test-loadstring-code {
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.btn-copy-bar {
  background: transparent;
  border: none;
  color: #f4f4f5;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.btn-copy-bar:hover {
  background: #27272e;
  color: #10b981;
}

.btn-sm {
  padding: 5px 11px;
  font-size: 0.78rem;
  border-radius: 6px;
}

/* Filter Pill Tabs */
.filter-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0c0c0e;
  border: 1px solid var(--border-color);
  padding: 5px;
  border-radius: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.filter-tab.active {
  background: #16161a;
  color: #fff;
  border-color: #27272c;
}

.count-pill {
  background: #232329;
  color: #d4d4d8;
  font-size: 0.72rem;
  padding: 1px 7px;
  border-radius: 999px;
}

/* Badges */
.badge-master {
  background: rgba(245, 158, 11, 0.13);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-variant {
  background: rgba(139, 92, 246, 0.14);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.35);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-working {
  background: rgba(16, 185, 129, 0.13);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.32);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-game {
  background: #16161a;
  color: #a1a1aa;
  border: 1px solid #26262c;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 0.73rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* 3-Column & 4-Column Grids for Scripts & Games */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
}

/* Script Card (Screenshot 1) */
.script-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s ease;
  min-width: 0;
  overflow: hidden;
}

.script-card:hover {
  border-color: var(--border-hover);
}

.script-card-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.code-preview-box {
  background: var(--bg-code);
  border: 1px solid #18181b;
  border-radius: 8px;
  padding: 12px;
  margin: 12px 0;
  height: 138px;
  overflow: hidden;
  font-size: 0.73rem;
  color: #71717a;
  line-height: 1.5;
  white-space: pre;
}

.script-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.script-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Game Card (Screenshot 2) */
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 24px 18px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s ease;
}

.game-card:hover {
  border-color: var(--border-hover);
}

.game-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #141418;
  border: 1px solid #232329;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 1.25rem;
  color: #a1a1aa;
}

/* Dashboard Section Cards (Screenshots 4, 5, 6) */
.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 22px;
}

.dash-inner-box {
  background: var(--bg-card-inner);
  border: 1px solid #19191d;
  border-radius: 10px;
  padding: 16px;
}

.stat-label-upper {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.stat-big-num {
  font-size: 1.75rem;
  font-weight: 800;
  margin-top: 4px;
}

/* Tables */
.dark-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}

.dark-table th {
  text-align: left;
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
}

.dark-table td {
  padding: 13px 12px;
  border-bottom: 1px solid #161619;
  vertical-align: middle;
}

.dark-table tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

.table-scroll-wrap {
  width: 100%;
  overflow-x: auto;
}

.compact-table th {
  padding: 8px 12px;
  white-space: nowrap;
}

.compact-table td {
  padding: 9px 12px;
  white-space: nowrap;
}

.table-pagination-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  margin-top: 4px;
  border-top: 1px solid #16161a;
}

.table-pagination-info {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #71717a;
}

.table-pagination-info strong {
  color: #f4f4f5;
  font-weight: 700;
}

.table-pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pag-pill-btn {
  background: #121216;
  color: #d4d4d8;
  border: 1px solid #24242b;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.pag-pill-btn:hover:not(:disabled) {
  background: #1c1c22;
  border-color: #3f3f46;
  color: #fff;
}

.pag-pill-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.pag-num-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #121216;
  border: 1px solid #24242b;
  color: #a1a1aa;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
}

.pag-num-btn:hover:not(.active) {
  background: #1c1c22;
  border-color: #3f3f46;
  color: #fff;
}

.pag-num-btn.active {
  background: #ffffff;
  color: #09090b;
  border-color: #ffffff;
  font-weight: 800;
}

.pag-dots {
  color: #71717a;
  font-size: 0.78rem;
  padding: 0 4px;
}

/* Private Tracking Note Box (Screenshot 6) */
.private-note-box {
  background: #08080a;
  border: 1px solid #18181c;
  border-radius: 9px;
  padding: 12px 14px;
  margin-top: 14px;
}

.private-note-input {
  width: 100%;
  background: transparent;
  border: 1px dashed #27272d;
  border-radius: 7px;
  padding: 8px 12px;
  color: #d4d4d8;
  font-size: 0.8rem;
  margin-top: 8px;
  outline: none;
}

.private-note-input:focus {
  border-color: #f59e0b;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: #0d0d10;
  border: 1px solid #27272d;
  border-radius: 14px;
  max-width: 640px;
  width: 100%;
  padding: 24px;
  max-height: 90vh;
  overflow-y: auto;
}

/* Toast */
.toast-wrap {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast-msg {
  background: #141418;
  border: 1px solid #2e2e36;
  color: #fff;
  padding: 11px 16px;
  border-radius: 9px;
  font-size: 0.84rem;
  box-shadow: 0 12px 30px rgba(0,0,0,0.7);
}

/* ==========================================================================
   2-COLUMN ADMIN WORKSPACE DASHBOARD (100% Desktop Zoom Proportions)
   ========================================================================== */
.page-container.dash-wide {
  max-width: 1320px;
}

.dash-pill-cta {
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}

.dash-workspace-grid {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.dash-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dash-sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
}

.dash-profile-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-avatar-sq {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: #16161b;
  border: 1px solid #2a2a33;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-profile-name-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.dash-profile-name {
  font-size: 0.98rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}

.dash-role-tag {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.dash-profile-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.dash-status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid #17171c;
}

.dash-status-pill {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Sidebar Navigation Card */
.dash-nav-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-snav-btn {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  color: var(--text-primary);
}

.dash-snav-btn:hover {
  background: #121216;
  border-color: #222229;
}

.dash-snav-btn.active {
  background: #15151a;
  border-color: #2a2a33;
}

.snav-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex: 1;
}

.snav-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #121216;
  border: 1px solid #23232a;
  color: #a1a1aa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.dash-snav-btn.active .snav-icon-box {
  background: #ffffff;
  border-color: #ffffff;
  color: #09090b;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.14);
}

.snav-text {
  min-width: 0;
  flex: 1;
}

.snav-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f4f4f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-snav-btn.active .snav-title {
  color: #ffffff;
}

.snav-sub {
  font-size: 0.71rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.snav-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.snav-pill {
  font-size: 0.69rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: #1a1a20;
  color: #d4d4d8;
  border: 1px solid #2b2b34;
}

.dash-snav-btn.active .snav-pill.pill-default {
  background: #ffffff;
  color: #09090b;
  border-color: #ffffff;
}

.snav-pill.pill-amber {
  background: rgba(245, 158, 11, 0.14);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.35);
}

.snav-pill.pill-purple {
  background: rgba(139, 92, 246, 0.16);
  color: #a78bfa;
  border-color: rgba(139, 92, 246, 0.38);
}

.snav-pill.pill-green {
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.35);
}

.snav-chevron {
  color: #52525b;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

.dash-snav-btn.active .snav-chevron {
  color: #e4e4e7;
}

/* Sidebar Bottom 3 Mini Stat Boxes */
.dash-mini-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dash-mini-stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 11px;
}

.mini-stat-lbl {
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.mini-stat-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 3px;
  line-height: 1.2;
}

/* Right Workspace Panels */
.dash-workspace-main {
  min-width: 0;
}

.dash-panel {
  display: none;
}

.dash-panel.active {
  display: block;
}

/* Top 3 KPI Cards inside Scripts Panel */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.dash-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.kpi-big-num {
  font-size: 1.85rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 4px;
  line-height: 1.15;
}

.kpi-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: #131317;
  border: 1px solid #25252d;
  color: #a1a1aa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.kpi-icon-box.kpi-icon-green {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
}

/* Scripts Toolbar Row */
.dash-scripts-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.dash-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.dash-search-pill {
  border-radius: 999px;
  padding: 8px 16px;
  width: 235px;
  background: #0c0c0f;
}

.btn-key-pill {
  background: #141418;
  color: #f4f4f5;
  border: 1px solid #2b2b34;
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 0.79rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-key-pill:hover {
  background: #1d1d24;
  border-color: #52525b;
  color: #ffffff;
}

.dash-lib-footer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 18px;
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.rows-per-page-select {
  background: #121216;
  border: 1px solid #27272f;
  color: #f4f4f5;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  margin-left: 6px;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .dash-workspace-grid {
    grid-template-columns: 1fr;
  }
  .dash-sidebar {
    position: static;
  }
}
@media (max-width: 680px) {
  .grid-4, .grid-3, .grid-2, .dash-kpi-grid { grid-template-columns: 1fr; }
  .dash-search-pill { width: 100%; }
}
