/* Mining Pool Stats - Premium Dark Theme */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/vendor/fonts/inter-var-latin.woff2') format('woff2');
}

:root {
  --bg-body: #0f1117;
  --bg-surface: #181b22;
  --bg-surface-2: #1e2230;
  --bg-surface-hover: #252a3a;
  --border-subtle: rgba(255,255,255,0.06);
  --border-medium: rgba(255,255,255,0.1);
  --text-primary: #e8eaed;
  --text-secondary: #9aa0ac;
  --accent-blue: #4d8ffa;
  --accent-green: #34d399;
  --accent-yellow: #fbbf24;
  --accent-red: #f87171;
  --accent-purple: #a78bfa;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
}

/* ── Navbar ── */
.navbar {
  background: var(--bg-surface) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  padding: 0.6rem 1rem;
}
.navbar-brand {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.navbar .nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary) !important;
  padding: 0.5rem 0.85rem !important;
  border-radius: 0.5rem;
  transition: all 0.15s;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: #fff !important;
  background: rgba(77, 143, 250, 0.1);
}
.navbar .btn-primary {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 0.5rem;
}

/* ── Sidebar ── */
.sidebar {
  background: var(--bg-surface) !important;
  border-right: 1px solid var(--border-subtle) !important;
  overflow-y: auto;
  scrollbar-width: thin;
  padding-top: 0.5rem;
}
.sidebar h6 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-secondary) !important;
  padding: 0 0.75rem;
}
.sidebar .nav-link {
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary) !important;
  border-radius: 0.5rem;
  transition: all 0.15s;
  margin-bottom: 2px;
}
.sidebar .nav-link:hover {
  background: var(--bg-surface-hover);
  color: #fff !important;
}
.sidebar .nav-link.active {
  background: rgba(77, 143, 250, 0.12) !important;
  color: var(--accent-blue) !important;
  font-weight: 600;
}
.sidebar .nav-link.active.bg-warning {
  background: rgba(251, 191, 36, 0.12) !important;
  color: var(--accent-yellow) !important;
}

/* ── Stat Cards ── */
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 0.875rem;
  padding: 1.25rem;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 0.875rem 0.875rem 0 0;
  opacity: 0.8;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  border-color: var(--border-medium);
}
.stat-card .stat-icon {
  font-size: 2rem;
  opacity: 0.2;
  position: absolute;
  top: 1rem;
  right: 1rem;
}
.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.stat-card .stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Stat card accent top bars */
.stat-card .stat-value.text-info ~ .stat-label,
.stat-card .text-info { --accent: #0dcaf0; }
.stat-card .stat-value.text-success ~ .stat-label,
.stat-card .text-success { --accent: var(--accent-green); }
.stat-card .stat-value.text-warning ~ .stat-label,
.stat-card .text-warning { --accent: var(--accent-yellow); }
.stat-card .stat-value.text-danger ~ .stat-label,
.stat-card .text-danger { --accent: var(--accent-red); }
.stat-card .stat-value.text-primary ~ .stat-label,
.stat-card .text-primary { --accent: var(--accent-blue); }

/* ── Cards ── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 0.875rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.card:hover {
  border-color: var(--border-medium);
}
.card-header {
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
}
.card-header h3,
.card-header h5,
.card-header .card-title {
  margin-bottom: 0;
  font-size: 1rem;
  font-weight: 600;
}
.card-body {
  padding: 1.25rem;
}
.card-footer {
  background: var(--bg-surface-2);
  border-top: 1px solid var(--border-subtle);
}
.card-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Tables ── */
.table {
  margin-bottom: 0;
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255,255,255,0.02);
  --bs-table-hover-bg: rgba(255,255,255,0.04);
}
.table > thead {
  border-bottom: 2px solid var(--border-medium);
}
.table > thead th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  padding: 0.75rem 1rem;
  white-space: nowrap;
}
.table > tbody td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  border-color: var(--border-subtle);
}
.table a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 500;
}
.table a:hover {
  color: #79b0ff;
  text-decoration: underline;
}

/* ── List groups ── */
.list-group-item {
  background-color: transparent;
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

/* ── Forms ── */
.form-control, .form-select {
  background-color: var(--bg-surface-2);
  border-color: var(--border-medium);
  color: var(--text-primary);
  border-radius: 0.5rem;
  padding: 0.5rem 0.875rem;
}
.form-control:focus, .form-select:focus {
  background-color: var(--bg-surface-2);
  border-color: var(--accent-blue);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(77, 143, 250, 0.15);
}
.form-control::placeholder {
  color: rgba(154, 160, 172, 0.6);
}
.input-group-text {
  background-color: var(--bg-surface);
  border-color: var(--border-medium);
  color: var(--text-secondary);
}
.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ── Badges ── */
.badge {
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  padding: 0.35em 0.7em;
  border-radius: 0.375rem;
}

/* ── Buttons ── */
.btn {
  font-weight: 600;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  transition: all 0.15s;
}
.btn-primary {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}
.btn-primary:hover {
  background: #3a7ee8;
  border-color: #3a7ee8;
  box-shadow: 0 4px 12px rgba(77, 143, 250, 0.3);
}

/* ── CTA Section ── */
.cta-section {
  background: linear-gradient(135deg, #1a56db 0%, #7c3aed 100%);
  border-radius: 0.875rem;
  border: none;
  box-shadow: 0 4px 20px rgba(77, 143, 250, 0.15);
}
.cta-section h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
}
.cta-section .btn-light {
  font-weight: 700;
  border-radius: 0.5rem;
  padding: 0.6rem 1.5rem;
}
.cta-section .btn-outline-light {
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0.6rem 1.5rem;
  border-width: 2px;
}

/* ── Form steps (coin/exchange create) ── */
#form-steps .nav-link {
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}
#form-steps .nav-link.active {
  background: var(--accent-blue);
  color: white;
}

/* ── Auth pages ── */
.auth-card {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-subtle);
  border-radius: 0.875rem;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

/* ── Dropdown menus ── */
.dropdown-menu {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 0.75rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  padding: 0.5rem;
}
.dropdown-item {
  border-radius: 0.375rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.dropdown-item:hover {
  background: var(--bg-surface-hover);
  color: #fff;
}
.dropdown-divider {
  border-color: var(--border-subtle);
  margin: 0.25rem 0;
}

/* ── Footer ── */
footer {
  border-color: var(--border-subtle) !important;
}
footer small {
  font-size: 0.8rem;
}

/* ── Coin logo placeholder ── */
.coin-logo-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--bg-surface-2);
}

/* ── Pagination ── */
.page-link {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}
.page-link:hover {
  background: var(--bg-surface-hover);
  color: #fff;
}
.page-item.active .page-link {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

/* ── Alerts ── */
.alert {
  border-radius: 0.625rem;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ── Main content area ── */
main {
  background: var(--bg-body);
}

/* ── Responsive ── */
@media (max-width: 991px) {
  .sidebar {
    display: none !important;
  }
}
@media (max-width: 768px) {
  .stat-card .stat-value {
    font-size: 1.5rem;
  }
  .stat-card .stat-icon {
    font-size: 1.5rem;
  }
  .card-body {
    padding: 1rem;
  }
}
@media (max-width: 576px) {
  .stat-card {
    padding: 1rem;
  }
  .stat-card .stat-value {
    font-size: 1.3rem;
  }
  .cta-section {
    padding: 1.5rem !important;
  }
  .cta-section h3 {
    font-size: 1.25rem;
  }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ── Utility tweaks ── */
.text-muted { color: var(--text-secondary) !important; }
hr { border-color: var(--border-subtle); }
