/* Zippy Sandbox — Custom styles on top of Pico CSS */

:root, [data-theme="light"] {
  --zippy-primary: #4f46e5;
  --zippy-primary-hover: #4338ca;
  --zippy-success: #10b981;
  --zippy-success-hover: #059669;
  --zippy-danger: #ef4444;
  --zippy-danger-hover: #dc2626;
  --zippy-warning: #f59e0b;
  --zippy-pending: #8b5cf6;
  --zippy-bg: #f8fafc;
  --zippy-card-bg: #ffffff;
  --zippy-border: #e2e8f0;
  --zippy-text: #0f172a;
  --zippy-text-muted: #64748b;
  --zippy-font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --zippy-font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Theme mappings */
  --theme-bg-grad-1: rgba(79, 70, 229, 0.05);
  --theme-bg-grad-2: rgba(16, 185, 129, 0.05);
  --theme-sidebar-bg: #ffffff;
  --theme-brand-grad-1: #0f172a;
  --theme-brand-grad-2: #4f46e5;
  --theme-nav-hover: rgba(15, 23, 42, 0.04);
  --theme-nav-active: rgba(79, 70, 229, 0.08);
  --theme-stat-bg-1: #ffffff;
  --theme-stat-bg-2: #f8fafc;
  
  --theme-badge-pending-bg: rgba(245, 158, 11, 0.15);
  --theme-badge-pending-text: #b45309;
  --theme-badge-ok-bg: rgba(16, 185, 129, 0.15);
  --theme-badge-ok-text: #047857;
  --theme-badge-failed-bg: rgba(239, 68, 68, 0.15);
  --theme-badge-failed-text: #b91c1c;
  --theme-badge-payin-bg: rgba(59, 130, 246, 0.15);
  --theme-badge-payin-text: #1d4ed8;
  --theme-badge-payout-bg: rgba(139, 92, 246, 0.15);
  --theme-badge-payout-text: #6d28d9;
  
  --theme-btn-sec-bg: #ffffff;
  --theme-btn-sec-hover: #f1f5f9;
  --theme-btn-accept-text: #ffffff;
  --theme-btn-reject-text: #ffffff;
  
  --theme-table-bg: #ffffff;
  --theme-table-th-bg: #f8fafc;
  --theme-table-td-text: #334155;
  --theme-table-tr-hover: #f8fafc;
  
  --theme-input-bg: #ffffff;
  --theme-input-focus-ring: rgba(79, 70, 229, 0.25);
  --theme-input-focus-bg: #ffffff;
  
  --theme-json-bg: #f8fafc;
  --theme-json-text: #1e293b;
  
  --theme-callback-entry-bg: #ffffff;
  --theme-callback-header-bg: #f1f5f9;
  --theme-callback-header-hover: #e2e8f0;
  --theme-expandable-bg: #f8fafc;
  
  --theme-shadow: 0 2px 4px -2px rgba(0, 0, 0, 0.02);
  --theme-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
  --zippy-primary: #818cf8;
  --zippy-primary-hover: #6366f1;
  --zippy-success: #34d399;
  --zippy-success-hover: #10b981;
  --zippy-danger: #f87171;
  --zippy-danger-hover: #ef4444;
  --zippy-warning: #fbbf24;
  --zippy-pending: #a78bfa;
  --zippy-bg: #030712;
  --zippy-card-bg: rgba(17, 24, 39, 0.6);
  --zippy-border: rgba(255, 255, 255, 0.1);
  --zippy-text: #f9fafb;
  --zippy-text-muted: #9ca3af;
  
  --theme-bg-grad-1: rgba(99, 102, 241, 0.15);
  --theme-bg-grad-2: rgba(16, 185, 129, 0.1);
  --theme-sidebar-bg: rgba(3, 7, 18, 0.65);
  --theme-brand-grad-1: #fff;
  --theme-brand-grad-2: #a5b4fc;
  --theme-nav-hover: rgba(255, 255, 255, 0.05);
  --theme-nav-active: rgba(99, 102, 241, 0.1);
  --theme-stat-bg-1: rgba(30, 41, 59, 0.5);
  --theme-stat-bg-2: rgba(15, 23, 42, 0.5);
  
  --theme-badge-pending-bg: rgba(251, 191, 36, 0.1);
  --theme-badge-pending-text: #fde68a;
  --theme-badge-ok-bg: rgba(52, 211, 153, 0.1);
  --theme-badge-ok-text: #a7f3d0;
  --theme-badge-failed-bg: rgba(248, 113, 113, 0.1);
  --theme-badge-failed-text: #fecaca;
  --theme-badge-payin-bg: rgba(96, 165, 250, 0.1);
  --theme-badge-payin-text: #bfdbfe;
  --theme-badge-payout-bg: rgba(167, 139, 250, 0.1);
  --theme-badge-payout-text: #ddd6fe;
  
  --theme-btn-sec-bg: rgba(255, 255, 255, 0.1);
  --theme-btn-sec-hover: rgba(255, 255, 255, 0.15);
  --theme-btn-accept-text: #022c22;
  --theme-btn-reject-text: #450a0a;
  
  --theme-table-bg: rgba(15, 23, 42, 0.4);
  --theme-table-th-bg: rgba(30, 41, 59, 0.5);
  --theme-table-td-text: #e2e8f0;
  --theme-table-tr-hover: rgba(255, 255, 255, 0.03);
  
  --theme-input-bg: rgba(15, 23, 42, 0.3);
  --theme-input-focus-ring: rgba(129, 140, 248, 0.25);
  --theme-input-focus-bg: rgba(15, 23, 42, 0.6);
  
  --theme-json-bg: #0f172a;
  --theme-json-text: #e2e8f0;
  
  --theme-callback-entry-bg: rgba(15, 23, 42, 0.4);
  --theme-callback-header-bg: rgba(30, 41, 59, 0.6);
  --theme-callback-header-hover: rgba(30, 41, 59, 0.9);
  --theme-expandable-bg: rgba(15, 23, 42, 0.6);
  
  --theme-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --theme-card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

* { box-sizing: border-box; }

body {
  display: block;
  min-height: 100vh;
  margin: 0;
  padding: 0 0 0 260px;
  background-color: var(--zippy-bg);
  background-image: 
    radial-gradient(circle at 10% 0%, var(--theme-bg-grad-1) 0vw, transparent 40vw),
    radial-gradient(circle at 90% 100%, var(--theme-bg-grad-2) 0vw, transparent 40vw);
  background-attachment: fixed;
  color: var(--zippy-text);
  font-family: var(--zippy-font-sans);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ── Sidebar Navigation ── */
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: var(--theme-sidebar-bg);
  border-right: 1px solid var(--zippy-border);
  color: var(--zippy-text);
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  padding: 2rem 1.5rem 1.5rem;
}

.sidebar-brand h2 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--theme-brand-gradient, linear-gradient(135deg, var(--theme-brand-grad-1), var(--theme-brand-grad-2)));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-brand p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--zippy-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 1rem 0;
  flex: 1;
}

.sidebar-nav li {
  margin-bottom: 0.25rem;
  padding: 0 1rem;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 1rem;
  color: var(--zippy-text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.sidebar-nav li a:hover {
  background: var(--theme-nav-hover);
  color: var(--zippy-text);
  transform: translateX(2px);
}

.sidebar-nav li a.active {
  background: var(--theme-nav-active);
  color: var(--zippy-primary);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--zippy-primary);
}

.sidebar-nav li a .nav-icon {
  font-size: 1.1rem;
  width: 1.5rem;
  text-align: center;
  opacity: 0.8;
}

.sidebar-footer {
  padding: 1.5rem;
  font-size: 0.75rem;
  color: var(--zippy-text-muted);
  font-family: var(--zippy-font-mono);
}

/* ── Main Content ── */
.main-content {
  margin: 0 auto;
  padding: 3rem 2rem;
  max-width: 1100px;
  width: 100%;
}

.page-header {
  margin-bottom: 2.5rem;
}

.page-header h1 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--zippy-text);
}

.page-header p {
  margin: 0;
  color: var(--zippy-text-muted);
  font-size: 1rem;
}

/* ── Cards ── */
.card {
  background: var(--zippy-card-bg);
  border: 1px solid var(--zippy-border);
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  padding: 1.75rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card h2,
.card h3 {
  margin-top: 0;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--zippy-border);
  font-size: 1.15rem;
  font-weight: 600;
}

/* ── Dashboard Stats ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: linear-gradient(180deg, var(--theme-stat-bg-1) 0%, var(--theme-stat-bg-2) 100%);
  border: 1px solid var(--zippy-border);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: left;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 2px;
  background: var(--zippy-border);
}

.stat-card.stat-pending::before { background: var(--zippy-warning); }
.stat-card.stat-ok::before { background: var(--zippy-success); }
.stat-card.stat-failed::before { background: var(--zippy-danger); }
.stat-card.stat-total::before { background: var(--zippy-primary); }

.stat-card .stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: var(--zippy-font-sans);
  line-height: 1.1;
  margin-bottom: 0.5rem;
  color: var(--zippy-text);
  letter-spacing: -0.04em;
}

.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--zippy-text-muted);
  font-weight: 500;
}

.stat-card.stat-pending .stat-value { color: var(--zippy-warning); text-shadow: 0 0 20px rgba(251, 191, 36, 0.2); }
.stat-card.stat-ok .stat-value { color: var(--zippy-success); text-shadow: 0 0 20px rgba(52, 211, 153, 0.2); }
.stat-card.stat-failed .stat-value { color: var(--zippy-danger); text-shadow: 0 0 20px rgba(248, 113, 113, 0.2); }
.stat-card.stat-total .stat-value { color: var(--zippy-primary); text-shadow: 0 0 20px rgba(129, 140, 248, 0.2); }

/* ── Toast Notification ── */
.toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  color: white;
  font-weight: 600;
  z-index: 1000;
  display: none;
  animation: fadeIn 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast.success { background: var(--zippy-success); }
.toast.error { background: var(--zippy-danger); }

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

/* ── Status Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--zippy-font-mono);
  letter-spacing: 0.025em;
  line-height: 1.2;
}

.badge-pending { background: var(--theme-badge-pending-bg); color: var(--theme-badge-pending-text); border: 1px solid var(--theme-badge-pending-bg); }
.badge-ok { background: var(--theme-badge-ok-bg); color: var(--theme-badge-ok-text); border: 1px solid var(--theme-badge-ok-bg); }
.badge-failed { background: var(--theme-badge-failed-bg); color: var(--theme-badge-failed-text); border: 1px solid var(--theme-badge-failed-bg); }
.badge-pay_in { background: var(--theme-badge-payin-bg); color: var(--theme-badge-payin-text); border: 1px solid var(--theme-badge-payin-bg); }
.badge-pay_out { background: var(--theme-badge-payout-bg); color: var(--theme-badge-payout-text); border: 1px solid var(--theme-badge-payout-bg); }
.badge-success { background: var(--theme-badge-ok-bg); color: var(--theme-badge-ok-text); border: 1px solid var(--theme-badge-ok-bg); }
.badge-error { background: var(--theme-badge-failed-bg); color: var(--theme-badge-failed-text); border: 1px solid var(--theme-badge-failed-bg); }

/* ── Action Buttons ── */
.btn-accept, .btn-reject, .btn-secondary {
  border: 1px solid transparent;
  padding: 0.4rem 0.85rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.2s;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  font-family: var(--zippy-font-sans);
}

.btn-accept {
  background: var(--zippy-success);
  color: var(--theme-btn-accept-text);
}

.btn-reject {
  background: var(--zippy-danger);
  color: var(--theme-btn-reject-text);
}

.btn-secondary {
  background: var(--theme-btn-sec-bg);
  color: var(--zippy-text);
  border: 1px solid var(--zippy-border);
}

.btn-accept:hover { background: var(--zippy-success-hover); transform: translateY(-1px); }
.btn-reject:hover { background: var(--zippy-danger-hover); transform: translateY(-1px); }
.btn-secondary:hover { background: var(--theme-btn-sec-hover); transform: translateY(-1px); }

.btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
}

.btn-group {
  display: flex;
  gap: 0.5rem;
}

/* ── Tables ── */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--zippy-border);
  border-radius: 0.75rem;
  background: var(--theme-table-bg);
}

table {
  width: 100%;
  font-size: 0.875rem;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
}

thead th {
  background: var(--theme-table-th-bg);
  white-space: nowrap;
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--zippy-text-muted);
  border-bottom: 1px solid var(--zippy-border);
  font-family: var(--zippy-font-sans);
  font-weight: 600;
}

tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--zippy-border);
  vertical-align: middle;
  color: var(--theme-table-td-text);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: background 0.15s;
}

tbody tr:hover {
  background: var(--theme-table-tr-hover);
}

/* ── Truncated cell ── */
.truncate {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Clickable row ── */
tr.clickable {
  cursor: pointer;
}

tr.clickable:hover {
  background: #eef2ff;
}

/* ── Filters ── */
.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: end;
  flex-wrap: wrap;
}

.filters .filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filters label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--zippy-text-muted);
  text-transform: uppercase;
}

.filters select {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--zippy-border);
  border-radius: 0.4rem;
  font-size: 0.85rem;
  background: white;
}

/* ── Form Styles ── */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  color: var(--zippy-text-muted);
}

.form-group input,
.form-group textarea,
.form-group select,
.filters select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--zippy-border);
  border-radius: 0.5rem;
  font-size: 0.9rem;
  background: var(--theme-input-bg);
  color: var(--zippy-text);
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: var(--zippy-font-sans);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(156, 163, 175, 0.8);
}

.form-group textarea {
  min-height: 120px;
  font-family: var(--zippy-font-mono);
  font-size: 0.82rem;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.filters select:focus {
  outline: none;
  border-color: var(--zippy-primary);
  box-shadow: 0 0 0 2px var(--theme-input-focus-ring);
  background: var(--theme-input-focus-bg);
}

button[type="submit"] {
  background: var(--zippy-primary);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  width: 100%;
}

button[type="submit"]:hover {
  background: var(--zippy-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

@media (min-width: 640px) {
  button[type="submit"] {
    width: auto;
  }
}

/* ── JSON Viewer ── */
.json-viewer {
  background: var(--theme-json-bg);
  border: 1px solid var(--zippy-border);
  color: var(--theme-json-text);
  padding: 1.25rem;
  border-radius: 0.5rem;
  font-family: var(--zippy-font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 400px;
  overflow-y: auto;
}

.json-viewer .json-key { color: #93c5fd; }
.json-viewer .json-string { color: #86efac; }
.json-viewer .json-number { color: #fbbf24; }
.json-viewer .json-boolean { color: #c084fc; }
.json-viewer .json-null { color: #94a3b8; }

/* ── Detail Grid ── */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-item .detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--zippy-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-item .detail-value {
  font-size: 0.9rem;
  word-break: break-all;
  color: var(--zippy-text);
  font-family: var(--zippy-font-sans);
}

/* ── Callback Log Entry ── */
.callback-entry {
  border: 1px solid var(--zippy-border);
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  overflow: hidden;
  background: var(--theme-callback-entry-bg);
}

.callback-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: var(--theme-callback-header-bg);
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s;
  color: var(--zippy-text);
}

.callback-entry-header:hover {
  background: var(--theme-callback-header-hover);
}

.callback-entry-body {
  padding: 1.25rem;
  display: none;
  border-top: 1px solid var(--zippy-border);
}

.callback-entry-body.expanded {
  display: block;
}

.callback-meta {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--zippy-text-muted);
}

/* ── Expandable row ── */
.expandable-row {
  display: none;
}

.expandable-row.expanded {
  display: table-row;
}

.expandable-row td {
  padding: 0;
}

.expandable-content {
  padding: 1.5rem;
  background: var(--theme-expandable-bg);
  border-bottom: 1px solid var(--zippy-border);
  box-shadow: inset 0 4px 6px -4px rgba(0,0,0,0.05);
}

/* ── Sections ── */
.section-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--zippy-border);
}

/* ── Label with action button ── */
.label-with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.label-with-action label {
  margin-bottom: 0;
}

/* ── Test Key Info Box ── */
.test-key-info {
  margin-top: 0.75rem;
  border: 1px solid var(--zippy-warning);
  border-radius: 0.5rem;
  background: rgba(245, 158, 11, 0.06);
  overflow: hidden;
}

[data-theme="dark"] .test-key-info {
  background: rgba(251, 191, 36, 0.06);
}

.test-key-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  background: rgba(245, 158, 11, 0.1);
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}

[data-theme="dark"] .test-key-header {
  background: rgba(251, 191, 36, 0.08);
  border-bottom-color: rgba(251, 191, 36, 0.15);
}

.test-key-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--zippy-warning);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.test-key-pre {
  margin: 0;
  padding: 0.85rem;
  font-family: var(--zippy-font-mono);
  font-size: 0.72rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--zippy-text-muted);
  max-height: 200px;
  overflow-y: auto;
  background: transparent;
  border: none;
  border-radius: 0;
}

/* ── Hidden ── */
.hidden {
  display: none !important;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--zippy-text-muted);
}

/* ── Settings saved indicator ── */
.settings-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--zippy-success);
  font-weight: 600;
}

/* ── Links ── */
.link-row {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.link-row a {
  color: var(--zippy-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}

.link-row a:hover {
  text-decoration: underline;
}

/* ── Mobile hamburger ── */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  background: var(--zippy-primary);
  color: white;
  border: none;
  border-radius: 0.4rem;
  padding: 0.5rem 0.7rem;
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

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

  .mobile-menu-btn {
    display: block;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 1rem;
    padding-top: 3.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .filters {
    flex-direction: column;
    align-items: stretch;
  }
}

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