/* SEDRA Cosmic Theme for Miningcore Dashboard */
:root {
  --void: #050a10;
  --void-2: #08111a;
  --bg-primary: #050a10;
  --bg-card: rgba(18, 26, 36, 0.65);
  --bg-card-hover: rgba(24, 34, 48, 0.85);
  --border-color: rgba(120, 150, 180, 0.16);
  --border-glow: rgba(161, 92, 245, 0.35);
  --line-strong: rgba(120, 160, 190, 0.30);
  
  --sedra-magenta: #e033ff;
  --sedra-violet: #a15cf5;
  --sedra-blue: #5fa5ff;
  --sedra-teal: #34d6c6;
  --sedra-gold: #f5b73c;
  --sedra-rose: #ff3366;
  --sedra-grad: linear-gradient(135deg, #e033ff 0%, #a15cf5 50%, #5fa5ff 100%);
  
  --accent-cyan: #34d6c6;
  --accent-emerald: #34d6c6;
  --accent-purple: #a15cf5;
  --accent-amber: #f5b73c;
  --accent-rose: #ff3366;
  
  --text-main: #e9edf2;
  --text-muted: #9fabbd;
  --text-dim: #6b7688;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
  --glass-backdrop: blur(14px);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--void);
  color: var(--text-main);
  background-image: 
    radial-gradient(120% 90% at 50% -20%, #1a1338 0%, #0a1220 45%, var(--void) 75%),
    radial-gradient(circle at 10% 20%, rgba(224, 51, 255, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(95, 165, 255, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(52, 214, 198, 0.03) 0%, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header & Nav */
header {
  background: rgba(6, 7, 13, 0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  width: 100%;
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.hamburger-btn {
  background: rgba(18, 26, 36, 0.75);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hamburger-btn:hover {
  background: rgba(161, 92, 245, 0.15);
  border-color: var(--sedra-violet);
  color: var(--sedra-teal);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px rgba(161, 92, 245, 0.45);
  overflow: hidden;
}

.brand-icon-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* App Layout & Sidebar */
.app-layout {
  display: flex;
  flex: 1;
  width: 100%;
  position: relative;
  min-height: calc(100vh - 65px);
}

.sidebar {
  width: 240px;
  background: rgba(8, 12, 18, 0.88);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--border-color);
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: sticky;
  top: 65px;
  height: calc(100vh - 65px);
  z-index: 90;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar.collapsed {
  width: 72px;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.25rem 0.75rem;
  justify-content: space-between;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-btn {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.93rem;
  font-weight: 600;
  padding: 0.62rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.sidebar-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(161, 92, 245, 0.2) 0%, rgba(52, 214, 198, 0.12) 100%);
  border: 1px solid rgba(161, 92, 245, 0.4);
  box-shadow: 0 0 14px rgba(161, 92, 245, 0.25);
}

.sidebar-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(52, 214, 198, 0) 0%, rgba(52, 214, 198, 0.4) 15%, rgba(161, 92, 245, 0.6) 50%, rgba(52, 214, 198, 0.4) 85%, rgba(52, 214, 198, 0) 100%);
  margin: 0.35rem 0.6rem;
  box-shadow: 0 0 8px rgba(52, 214, 198, 0.25);
  list-style: none;
}

.sidebar-icon {
  flex-shrink: 0;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.sidebar-btn:hover .sidebar-icon,
.sidebar-btn.active .sidebar-icon {
  color: var(--sedra-teal);
}

.sidebar.collapsed .sidebar-text,
.sidebar.collapsed .ai-live-badge,
.sidebar.collapsed .sidebar-footer {
  display: none;
}

.sidebar.collapsed .sidebar-btn {
  justify-content: center;
  padding: 0.75rem 0;
}

.sidebar-footer-card {
  background: rgba(18, 26, 36, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  text-align: center;
}

.sidebar-footer-title {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-footer-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sedra-teal);
  margin-top: 0.2rem;
}

.main-content {
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
  min-width: 0;
}

.pool-selector-wrapper {
  display: flex;
  align-items: center;
}

.coin-selector-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(18, 26, 36, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.coin-selector-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 6px 20px rgba(161, 92, 245, 0.25);
  background: rgba(24, 34, 48, 0.85);
}

/* Coin Price Badge */
.coin-price-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(18, 26, 36, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  font-family: monospace;
}

.price-change-tag {
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 700;
}

.price-up {
  background: rgba(52, 214, 198, 0.15);
  color: #34d6c6;
  border: 1px solid rgba(52, 214, 198, 0.35);
}

.price-down {
  background: rgba(255, 51, 102, 0.15);
  color: #ff3366;
  border: 1px solid rgba(255, 51, 102, 0.35);
}

.coin-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 12px rgba(161, 92, 245, 0.45);
  flex-shrink: 0;
}

.coin-info-wrapper {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}

.coin-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.coin-display-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.dropdown-chevron {
  color: var(--text-muted);
  transition: transform 0.2s, color 0.2s;
}

.coin-selector-card:hover .dropdown-chevron {
  color: var(--sedra-violet);
  transform: translateY(1px);
}

.coin-display-algo {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sedra-teal);
  letter-spacing: 0.2px;
}

.pool-select-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 1rem;
}

/* Main Container */
main {
  max-width: 1300px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  flex: 1;
  width: 100%;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Stat Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-glow);
  box-shadow: 0 12px 36px 0 rgba(0, 0, 0, 0.55), 0 0 20px rgba(161, 92, 245, 0.15);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--sedra-grad);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.stat-sub {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-top: 0.4rem;
}

/* Chart Card */
.card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-card);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Miner Search Bar */
.search-box {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.search-input {
  flex: 1;
  background: rgba(8, 17, 26, 0.7);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: monospace;
  outline: none;
  transition: all 0.2s;
}

.search-input:focus {
  border-color: var(--sedra-violet);
  box-shadow: 0 0 14px rgba(161, 92, 245, 0.3);
}

.btn-primary {
  background: var(--sedra-grad);
  color: #fff;
  border: none;
  font-weight: 700;
  padding: 0 1.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(161, 92, 245, 0.35);
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(161, 92, 245, 0.45);
}

/* Miner Favorites System */
.favorite-btn {
  background: rgba(255, 209, 102, 0.1);
  border: 1px solid rgba(255, 209, 102, 0.35);
  color: #ffd166;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.favorite-btn:hover {
  background: rgba(255, 209, 102, 0.22);
  border-color: #ffd166;
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(255, 209, 102, 0.3);
}

.favorite-btn.active {
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.25) 0%, rgba(255, 170, 0, 0.2) 100%);
  border-color: #ffd166;
  color: #ffd166;
  box-shadow: 0 0 14px rgba(255, 209, 102, 0.35);
}

.miner-favorites-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.favorite-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(20, 28, 44, 0.85);
  border: 1px solid rgba(255, 209, 102, 0.3);
  color: var(--text-main);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.favorite-chip:hover {
  background: rgba(30, 42, 66, 0.95);
  border-color: #ffd166;
  color: #ffd166;
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.favorite-chip.current-active {
  border-color: var(--sedra-teal);
  background: rgba(52, 214, 198, 0.12);
  color: var(--sedra-teal);
}

.favorite-chip .chip-delete {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-left: 0.25rem;
  cursor: pointer;
  transition: color 0.15s;
}

.favorite-chip .chip-delete:hover {
  color: #ff5c8d;
}

/* Data Tables */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

td {
  padding: 1rem;
  border-bottom: 1px solid rgba(120, 150, 180, 0.1);
  font-size: 0.95rem;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-confirmed { background: rgba(52, 214, 198, 0.15); color: var(--sedra-teal); border: 1px solid rgba(52, 214, 198, 0.35); }
.badge-pending { background: rgba(245, 183, 60, 0.15); color: var(--sedra-gold); border: 1px solid rgba(245, 183, 60, 0.35); }
.badge-orphaned { background: rgba(255, 51, 102, 0.15); color: var(--sedra-rose); border: 1px solid rgba(255, 51, 102, 0.35); }

/* Pagination */
.pagination-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem 0.5rem 0.5rem 0.5rem;
  border-top: 1px solid var(--border-color);
  margin-top: 0.5rem;
}

.pagination-info {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.page-btn {
  background: rgba(18, 26, 36, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
  background: rgba(161, 92, 245, 0.2);
  border-color: var(--sedra-violet);
  color: #fff;
  box-shadow: 0 0 10px rgba(161, 92, 245, 0.25);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.filter-pill {
  background: rgba(14, 22, 34, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.filter-pill:hover {
  border-color: var(--sedra-teal);
  color: #ffffff;
  background: rgba(52, 214, 198, 0.1);
}

.filter-pill.active {
  background: rgba(52, 214, 198, 0.18);
  border-color: var(--sedra-teal);
  color: var(--sedra-teal);
  box-shadow: 0 0 12px rgba(52, 214, 198, 0.25);
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.page-num {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  min-width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.page-num:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.page-num.active {
  background: rgba(161, 92, 245, 0.25);
  border-color: rgba(161, 92, 245, 0.6);
  color: #fff;
  box-shadow: 0 0 10px rgba(161, 92, 245, 0.35);
}

.page-ellipsis {
  color: var(--text-dim);
  padding: 0 0.25rem;
  font-size: 0.85rem;
}

/* Code Snippet */
pre code {
  display: block;
  background: #08111a;
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: var(--radius-sm);
  color: var(--sedra-teal);
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  overflow-x: auto;
  margin: 0.75rem 0;
}

.code-copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  float: right;
  margin-top: -2.5rem;
  margin-right: 0.5rem;
  transition: all 0.2s;
}

.code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* Modal Popup */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 10, 16, 0.85);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.25s ease forwards;
}

.modal-card {
  background: rgba(18, 26, 36, 0.95);
  border: 1px solid var(--border-glow);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 24px rgba(161, 92, 245, 0.25);
  border-radius: var(--radius-md);
  max-width: 580px;
  width: 100%;
  overflow: hidden;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.modal-body {
  padding: 1.5rem;
  max-height: 75vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.info-section h4 {
  color: var(--sedra-teal);
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.info-section p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.formula-box {
  background: #08111a;
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--sedra-violet);
  font-family: 'Fira Code', monospace;
  font-size: 0.82rem;
  margin: 0.5rem 0;
  overflow-x: auto;
}

.btn-info-modal {
  background: rgba(161, 92, 245, 0.12);
  border: 1px solid rgba(161, 92, 245, 0.35);
  color: var(--sedra-violet);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-info-modal:hover {
  background: rgba(161, 92, 245, 0.25);
  color: #fff;
  box-shadow: 0 0 10px rgba(161, 92, 245, 0.3);
}

.explorer-link, .address-link {
  color: var(--sedra-teal);
  text-decoration: none;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.explorer-link:hover, .address-link:hover {
  color: var(--sedra-blue);
  text-decoration: underline;
}

.external-icon {
  font-size: 0.75rem;
  opacity: 0.7;
}

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

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar { flex-wrap: wrap; }
  .search-box { flex-direction: column; }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transform: translateX(-100%);
    width: 260px;
    background: #090e15;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
  }

  .sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .main-content {
    padding: 1.25rem 1rem;
  }
}

/* AI Intelligence Styles */
.ai-live-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  background: rgba(52, 214, 198, 0.2);
  border: 1px solid rgba(52, 214, 198, 0.4);
  color: #34d6c6;
  border-radius: 4px;
  font-weight: 700;
  margin-left: 0.35rem;
  letter-spacing: 0.5px;
  animation: aiPulse 2s infinite;
}

@keyframes aiPulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 214, 198, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(52, 214, 198, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 214, 198, 0); }
}

.ai-hero-card {
  background: linear-gradient(135deg, rgba(161, 92, 245, 0.12) 0%, rgba(52, 214, 198, 0.08) 100%), var(--bg-card);
  border: 1px solid rgba(161, 92, 245, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.ai-hero-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #a15cf5, #34d6c6, #ff3366);
}

.ai-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.ai-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(52, 214, 198, 0.15);
  border: 1px solid rgba(52, 214, 198, 0.4);
  color: #34d6c6;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.85rem;
  font-family: monospace;
}

.ai-pulse-dot {
  width: 8px;
  height: 8px;
  background: #34d6c6;
  border-radius: 50%;
  box-shadow: 0 0 8px #34d6c6;
  animation: dotBlink 1.5s infinite;
}

@keyframes dotBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.ai-log-terminal {
  background: rgba(8, 12, 18, 0.95);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.82rem;
  max-height: 280px;
  overflow-y: auto;
  line-height: 1.6;
}

.ai-log-line {
  margin-bottom: 0.35rem;
  word-break: break-all;
}

.ai-log-time {
  color: var(--text-dim);
  margin-right: 0.5rem;
}

.ai-log-tag {
  color: #a15cf5;
  font-weight: 700;
  margin-right: 0.4rem;
}

.ai-log-val {
  color: #34d6c6;
}

/* Chart Guide Box */
.chart-guide-box {
  background: rgba(12, 18, 28, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chart-guide-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.chart-guide-label {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.2px;
}

.chart-legend-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.chart-guide-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  padding-left: 1.15rem;
}

.chart-guide-desc strong {
  color: var(--text-main);
}

/* Action Buttons */
.btn-action-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 26, 40, 0.7);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-outline:hover {
  background: rgba(52, 214, 198, 0.12);
  border-color: var(--sedra-teal);
  color: var(--sedra-teal);
  transform: translateY(-1px);
}

.btn-action-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--sedra-grad);
  color: #fff;
  border: none;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(161, 92, 245, 0.35);
}

.btn-action-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(161, 92, 245, 0.5);
}

/* Tax Modal Card & Statement */
.tax-modal-card {
  max-width: 950px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

.tax-statement-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.tax-statement-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-main);
}

.tax-statement-subtitle {
  font-size: 0.92rem;
  color: var(--sedra-teal);
  font-weight: 600;
  margin-top: 0.15rem;
}

.tax-statement-meta {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.tax-statement-badge-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.tax-statement-badge {
  background: rgba(255, 184, 77, 0.15);
  border: 1px solid rgba(255, 184, 77, 0.4);
  color: #ffb84d;
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.tax-print-btn {
  height: 38px;
  font-size: 0.85rem;
}

.tax-table th {
  background: rgba(12, 20, 32, 0.8);
  font-size: 0.78rem;
  padding: 0.65rem 0.75rem;
}

.tax-table td {
  padding: 0.65rem 0.75rem;
  font-size: 0.85rem;
}

/* Print Stylesheet for Tax Statement */
@media print {
  body * {
    visibility: hidden;
  }
  #tax-modal, #tax-modal * {
    visibility: visible;
  }
  #tax-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: auto;
    background: #ffffff !important;
    color: #111111 !important;
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  .modal-card.tax-modal-card {
    background: #ffffff !important;
    color: #111111 !important;
    border: none !important;
    box-shadow: none !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .modal-header, .tax-print-btn, .modal-close-btn {
    display: none !important;
  }
  .tax-statement-title {
    color: #000000 !important;
    font-size: 1.4rem !important;
  }
  .tax-statement-subtitle {
    color: #0066cc !important;
  }
  .tax-statement-meta, .tax-statement-meta strong {
    color: #333333 !important;
  }
  .stat-card {
    background: #f4f6f9 !important;
    border: 1px solid #d0d7de !important;
    color: #111111 !important;
  }
  .stat-label, .stat-sub {
    color: #555555 !important;
  }
  .stat-value {
    color: #111111 !important;
  }
  .tax-table th {
    background: #eef2f6 !important;
    color: #222222 !important;
    border-bottom: 2px solid #ccc !important;
  }
  .tax-table td {
    color: #222222 !important;
    border-bottom: 1px solid #e0e0e0 !important;
  }
  .info-section {
    background: #fbfbfb !important;
    border: 1px solid #e0e0e0 !important;
    color: #333333 !important;
  }
  .info-section h4 {
    color: #111111 !important;
  }
  .info-section p {
    color: #444444 !important;
  }
}

/* ==========================================================================
   Treasure Chamber & Gamification Styles
   ========================================================================== */

.treasure-hero-card {
  background: linear-gradient(135deg, rgba(30, 22, 10, 0.85) 0%, rgba(18, 14, 28, 0.9) 50%, rgba(10, 22, 28, 0.9) 100%);
  border: 1px solid rgba(255, 209, 102, 0.4);
  border-radius: var(--radius-md);
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 209, 102, 0.05);
  position: relative;
  overflow: hidden;
}

.treasure-hero-content {
  flex: 1;
  z-index: 2;
}

.treasure-hero-badge {
  display: inline-block;
  background: rgba(255, 209, 102, 0.15);
  color: #ffd166;
  border: 1px solid rgba(255, 209, 102, 0.4);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
}

.treasure-hero-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.5rem 0;
  background: linear-gradient(90deg, #ffffff 0%, #ffd166 60%, #ffb703 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.treasure-hero-desc {
  color: #a0aec0;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 1.5rem 0;
  max-width: 680px;
}

.treasure-vault-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.vault-stat-box {
  background: rgba(10, 15, 22, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.telemetry-hero-frame {
  background: linear-gradient(135deg, rgba(26, 14, 40, 0.85) 0%, rgba(15, 18, 32, 0.9) 50%, rgba(10, 20, 30, 0.9) 100%);
  border: 1px solid rgba(161, 92, 245, 0.4);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(161, 92, 245, 0.05);
  position: relative;
  overflow: hidden;
}

.telemetry-hero-badge {
  display: inline-block;
  background: rgba(161, 92, 245, 0.15);
  color: #a15cf5;
  border: 1px solid rgba(161, 92, 245, 0.4);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
}

.telemetry-hero-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.4rem 0;
  background: linear-gradient(90deg, #ffffff 0%, #c084fc 60%, #a15cf5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.vault-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.vault-stat-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffd166;
  margin: 0.25rem 0;
}

.vault-stat-sub {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.treasure-chest-graphic {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
}

.chest-icon {
  font-size: 4.5rem;
  z-index: 2;
  filter: drop-shadow(0 0 20px rgba(255, 209, 102, 0.6));
  animation: floatChest 3.5s ease-in-out infinite;
}

.chest-glow {
  position: absolute;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 209, 102, 0.35) 0%, rgba(161, 92, 245, 0.2) 50%, transparent 70%);
  border-radius: 50%;
  animation: pulseGlow 2.5s infinite alternate;
}

@keyframes floatChest {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

@keyframes pulseGlow {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.2); opacity: 1; }
}

.epoch-progress-container {
  width: 100%;
  height: 18px;
  background: rgba(10, 16, 24, 0.8);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 0.5rem;
}

.epoch-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ffb703 0%, #ffd166 50%, #34d6c6 100%);
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 15px rgba(255, 209, 102, 0.5);
}

.quests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.quest-card {
  background: rgba(13, 20, 30, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.quest-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 209, 102, 0.5);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.quest-card.game-quest {
  background: linear-gradient(135deg, rgba(25, 15, 35, 0.8) 0%, rgba(13, 20, 30, 0.8) 100%);
  border: 1px solid rgba(161, 92, 245, 0.4);
}

.quest-card.game-quest:hover {
  border-color: #a15cf5;
  box-shadow: 0 8px 25px rgba(161, 92, 245, 0.25);
}

.quest-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.quest-icon {
  font-size: 2rem;
  line-height: 1;
}

.quest-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quest-badge.quest1, .quest-badge.instant { background: rgba(52, 214, 198, 0.15); color: #34d6c6; border: 1px solid rgba(52, 214, 198, 0.45); }
.quest-badge.quest2, .quest-badge.epoch { background: rgba(255, 209, 102, 0.15); color: #ffd166; border: 1px solid rgba(255, 209, 102, 0.45); }
.quest-badge.quest3, .quest-badge.streak { background: rgba(0, 229, 255, 0.15); color: #00e5ff; border: 1px solid rgba(0, 229, 255, 0.45); }
.quest-badge.quest4, .quest-badge.milestone { background: rgba(161, 92, 245, 0.18); color: #b77eff; border: 1px solid rgba(161, 92, 245, 0.45); }
.quest-badge.quest5, .quest-badge.game { background: rgba(255, 92, 141, 0.15); color: #ff5c8d; border: 1px solid rgba(255, 92, 141, 0.45); }

.quest-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.5rem 0;
}

.quest-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1rem;
}

.quest-calc-box {
  margin: 0.85rem 0 1rem 0;
  padding: 0.85rem 0.95rem;
  background: rgba(10, 16, 26, 0.75);
  border: 1px solid rgba(52, 214, 198, 0.22);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quest-calc-box:hover {
  border-color: rgba(52, 214, 198, 0.45);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.quest-calc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.quest-calc-label {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--sedra-teal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.quest-calc-tag {
  font-size: 0.65rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 600;
}

.quest-calc-formula {
  font-family: 'Fira Code', monospace;
  font-size: 0.76rem;
  background: rgba(0, 0, 0, 0.45);
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  color: #ffd166;
  border-left: 3px solid var(--sedra-teal);
  margin-bottom: 0.6rem;
  word-break: break-word;
  line-height: 1.45;
}

.quest-calc-details {
  font-size: 0.74rem;
  color: #94a3b8;
  line-height: 1.48;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.quest-calc-detail-key {
  color: #f1f5f9;
  font-weight: 600;
}

.quest-reward-box {
  background: rgba(8, 12, 18, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-top: auto;
}

.quest-reward-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
}

.quest-reward-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffd166;
  margin-top: 0.2rem;
}

@media (max-width: 768px) {
  .treasure-hero-card {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }
  .treasure-chest-graphic {
    order: -1;
  }
}

/* ==========================================================================
   Chamber Mini-Game Arena & Chest Styles
   ========================================================================== */

.chest-card {
  background: rgba(14, 20, 32, 0.75);
  border: 1px solid rgba(161, 92, 245, 0.3);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.chest-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: #ffd166;
  box-shadow: 0 12px 30px rgba(255, 209, 102, 0.25);
  background: rgba(22, 28, 45, 0.9);
}

.chest-card.featured {
  border-color: rgba(255, 209, 102, 0.5);
  background: linear-gradient(135deg, rgba(30, 24, 15, 0.8) 0%, rgba(18, 22, 36, 0.8) 100%);
}

.chest-card.opening {
  animation: chestShake 0.6s ease-in-out infinite;
}

@keyframes chestShake {
  0%, 100% { transform: translateY(-6px) rotate(0deg); }
  25% { transform: translateY(-8px) rotate(-4deg); }
  75% { transform: translateY(-8px) rotate(4deg); }
}

.chest-card-icon {
  font-size: 3.8rem;
  margin-bottom: 0.75rem;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 0 12px rgba(255, 209, 102, 0.4));
}

.chest-card:hover .chest-card-icon {
  transform: scale(1.15) rotate(3deg);
}

.chest-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 209, 102, 0.15);
  color: #ffd166;
  border: 1px solid rgba(255, 209, 102, 0.5);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  letter-spacing: 0.5px;
  box-shadow: 0 0 10px rgba(255, 209, 102, 0.2);
}

.chest-card.stage-active {
  border-color: rgba(255, 209, 102, 0.6);
  box-shadow: 0 0 25px rgba(255, 209, 102, 0.18);
  transform: translateY(-2px);
}

.chest-card.stage-locked {
  opacity: 0.55;
  filter: grayscale(0.2);
}

.chest-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.chest-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.btn-chest {
  width: 100%;
  background: linear-gradient(90deg, #ffb703 0%, #ffd166 100%);
  color: #0b1118;
  border: none;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(255, 209, 102, 0.3);
}

.btn-chest:hover {
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.game-success-banner {
  background: linear-gradient(90deg, rgba(52, 214, 198, 0.15) 0%, rgba(255, 209, 102, 0.15) 100%);
  border: 1px solid #34d6c6;
  color: #ffffff;
  animation: fadeIn 0.4s ease;
}

.game-error-banner {
  background: rgba(239, 71, 111, 0.15);
  border: 1px solid #ef476f;
  color: #ffffff;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Miner Console 4-Section Architecture Styles */
.console-section {
  position: relative;
}

.console-section-header {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.console-section-num {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #a15cf5 0%, #34d6c6 100%);
  color: #0b1118;
  font-weight: 900;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(52, 214, 198, 0.45), 0 0 15px rgba(161, 92, 245, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.35);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.4);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.console-section:hover .console-section-num {
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(52, 214, 198, 0.55), 0 0 20px rgba(161, 92, 245, 0.5);
}

.console-section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.2px;
}

.console-section-sub {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
  line-height: 1.4;
}

/* Clickable Telemetry Stat Cards */
.stat-card.clickable-telemetry-card {
  cursor: pointer;
  position: relative;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card.clickable-telemetry-card:hover {
  transform: translateY(-2px);
  border-color: rgba(161, 92, 245, 0.6);
  box-shadow: 0 6px 20px rgba(161, 92, 245, 0.2);
}

.telemetry-history-badge-btn:hover {
  background: rgba(52, 214, 198, 0.25) !important;
  border-color: #34d6c6 !important;
  box-shadow: 0 0 12px rgba(52, 214, 198, 0.35);
  transform: translateY(-1px);
}

/* Telemetry Modal Tabs */
.telemetry-tab-btn {
  background: rgba(13, 27, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 0.45rem 0.9rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.telemetry-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.telemetry-tab-btn.active {
  background: linear-gradient(135deg, rgba(161, 92, 245, 0.3) 0%, rgba(52, 214, 198, 0.25) 100%);
  border-color: #a15cf5;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(161, 92, 245, 0.35);
}

/* Telemetry Timeframe Buttons */
.telemetry-tf-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: 14px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.telemetry-tf-btn:hover {
  color: #ffffff;
}

.telemetry-tf-btn.active {
  background: var(--sedra-teal);
  color: #0b1118;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(52, 214, 198, 0.4);
}
