/* =============================================================
   STASH SHADOW — DESIGN SYSTEM
   Premium marketplace theme: emerald teal + amber gold accents,
   deep slate backgrounds, glass morphism cards.
   ============================================================= */

/* ---------- Typography ---------- */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  /* Surface — Soft Tinted Light Mode (pearl / pale blue-gray) */
  --bc-bg:        #e6ecf2;
  --bc-bg-soft:   #dee5ed;
  --bc-surface:   #f1f5f9;
  --bc-surface-2: #e8eef5;
  --bc-surface-3: #dde5ee;
  --bc-border:    #b8c8d8;
  --bc-border-strong: #95acc2;

  /* Text */
  --bc-text:      #0d1a28;
  --bc-text-mute: #2a4256;
  --bc-text-dim:  #46627a;

  /* Brand / accent — Emerald Teal */
  --bc-accent:        #008f6b;
  --bc-accent-hover:  #007558;
  --bc-accent-soft:   rgba(0, 200, 150, 0.1);
  --bc-accent-glow:   rgba(0, 200, 150, 0.3);

  /* Secondary accent — Amber Gold */
  --bc-purple:        #f5a623;
  --bc-purple-soft:   rgba(245, 166, 35, 0.12);
  --bc-purple-glow:   rgba(245, 166, 35, 0.35);

  /* Semantic */
  --bc-success:      #22c55e;
  --bc-success-bg:   rgba(34, 197, 94, 0.1);
  --bc-success-text: #4ade80;
  --bc-warn:         #f59e0b;
  --bc-warn-bg:      rgba(245, 158, 11, 0.1);
  --bc-warn-text:    #fbbf24;
  --bc-danger:       #ef4444;
  --bc-danger-bg:    rgba(239, 68, 68, 0.1);
  --bc-danger-text:  #f87171;
  --bc-info:         #3b82f6;
  --bc-info-bg:      rgba(59, 130, 246, 0.1);

  /* Spacing scale */
  --bc-sp-1: 4px;
  --bc-sp-2: 8px;
  --bc-sp-3: 12px;
  --bc-sp-4: 16px;
  --bc-sp-5: 24px;
  --bc-sp-6: 32px;
  --bc-sp-7: 48px;

  /* Radius */
  --bc-radius-sm: 4px;
  --bc-radius:    8px;
  --bc-radius-lg: 14px;
  --bc-radius-xl: 20px;

  /* Shadows */
  --bc-shadow-sm:  0 2px 6px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --bc-shadow:     0 4px 16px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.05);
  --bc-shadow-lg:  0 12px 40px rgba(0,0,0,0.14), 0 4px 12px rgba(0,0,0,0.07);
  --bc-shadow-3d:  0 4px 0 rgba(0,0,0,0.15), 0 6px 12px rgba(0,0,0,0.10), inset 0 1px 0 rgba(255,255,255,0.6);
  --bc-glow-blue:  0 0 8px rgba(0,200,150,0.35), 0 0 20px rgba(0,200,150,0.12), 0 0 40px rgba(0,200,150,0.05);
  --bc-glow-purple: 0 0 8px rgba(245,166,35,0.35), 0 0 20px rgba(245,166,35,0.12);

  /* Transition */
  --bc-t: 200ms cubic-bezier(.4,.2,.2,1);

  /* Fonts */
  --bc-font-display: 'Rajdhani', 'Inter', ui-sans-serif, sans-serif;
  --bc-font-ui:      'Inter', 'Rajdhani', ui-sans-serif, sans-serif;
  --bc-font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Body & Background ---------- */
body {
  margin: 0;
  background-color: var(--bc-bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 200, 150, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(0, 150, 200, 0.04) 0%, transparent 60%),
    linear-gradient(180deg, var(--bc-bg) 0%, var(--bc-bg-soft) 100%);
  background-attachment: fixed;
  color: var(--bc-text-mute);
  min-height: 100vh;
  padding: 0;
  font-family: var(--bc-font-mono);
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  position: relative;
}

/* Custom selection */
::selection {
  background: var(--bc-accent);
  color: #000;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bc-bg-soft); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--bc-accent) 0%, var(--bc-purple) 100%);
  border-radius: 8px;
  border: 1px solid var(--bc-bg-soft);
}
::-webkit-scrollbar-thumb:hover { filter: brightness(1.2); }

/* ---------- Headings ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--bc-font-display);
  color: var(--bc-text);
  margin: 0 0 var(--bc-sp-3) 0;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
}

h1 {
  font-size: 1.8rem;
  line-height: 1.2;
  background: linear-gradient(135deg, #1a2c3e 0%, var(--bc-accent) 55%, var(--bc-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

h2 {
  font-size: 1.3rem;
  line-height: 1.25;
  color: var(--bc-text);
}

h3 {
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--bc-accent);
}

p { margin: 0 0 var(--bc-sp-3) 0; }

/* ---------- Links ---------- */
a {
  color: var(--bc-accent);
  text-decoration: none;
  transition: color var(--bc-t), text-shadow var(--bc-t);
}
a:hover {
  color: var(--bc-accent-hover);
  text-shadow: none;
  text-decoration: none;
}

/* ---------- Color helpers ---------- */
.red    { color: var(--bc-danger-text); }
.green  { color: var(--bc-success-text); }
.blue   { color: var(--bc-accent); }
.muted  { color: var(--bc-text-mute); }
.dim    { color: var(--bc-text-dim); }

/* ---------- Forms ---------- */
input, textarea, select {
  background: var(--bc-surface);
  border: 1px solid var(--bc-border);
  border-bottom: 2px solid var(--bc-border-strong);
  color: var(--bc-text);
  font-size: 0.88rem;
  border-radius: var(--bc-radius);
  padding: 10px 14px;
  font-family: var(--bc-font-mono);
  width: 100%;
  transition: border-color var(--bc-t), box-shadow var(--bc-t), background var(--bc-t);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}
input::placeholder, textarea::placeholder {
  color: var(--bc-text-dim);
}
input:hover, textarea:hover, select:hover {
  border-color: var(--bc-border-strong);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--bc-accent);
  border-bottom-color: var(--bc-accent);
  box-shadow: 0 0 0 3px var(--bc-accent-soft);
  background: var(--bc-surface);
}
input:disabled, textarea:disabled, select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
textarea { resize: vertical; min-height: 80px; }

label {
  color: var(--bc-text-mute);
  font-size: 0.78rem;
  font-family: var(--bc-font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

/* ---------- Buttons ---------- */
button {
  padding: 10px 20px;
  border: 1px solid var(--bc-border);
  border-bottom: 3px solid var(--bc-border-strong);
  background: linear-gradient(135deg, var(--bc-surface) 0%, var(--bc-surface-2) 100%);
  color: var(--bc-text);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--bc-radius);
  transition: all var(--bc-t);
  font-family: var(--bc-font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: var(--bc-shadow-3d);
  position: relative;
}
button:hover {
  background: linear-gradient(135deg, var(--bc-surface-2) 0%, var(--bc-surface-3) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 0 rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.10), inset 0 1px 0 rgba(255,255,255,0.8);
}
button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.15), inset 0 2px 4px rgba(0,0,0,0.08);
  border-bottom-width: 1px;
}
button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bc-accent-soft), var(--bc-glow-blue);
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* Accent buttons */
.green-btn {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #fff;
  border-color: rgba(34, 197, 94, 0.3);
  border-bottom-color: #0f5c2d;
  box-shadow: 0 4px 0 #0a3d1e, 0 6px 16px rgba(34, 197, 94, 0.2), inset 0 1px 0 rgba(255,255,255,0.1);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.green-btn:hover {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 6px 0 #0a3d1e, 0 10px 24px rgba(34, 197, 94, 0.3), inset 0 1px 0 rgba(255,255,255,0.15);
  text-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.blue-btn {
  background: linear-gradient(135deg, var(--bc-accent) 0%, var(--bc-accent-hover) 100%);
  color: #000;
  border-color: rgba(0, 200, 150, 0.3);
  border-bottom-color: #007a5c;
  box-shadow: 0 4px 0 #005040, 0 6px 16px rgba(0, 200, 150, 0.2), inset 0 1px 0 rgba(255,255,255,0.15);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.blue-btn:hover {
  background: linear-gradient(135deg, #00dba6 0%, var(--bc-accent) 100%);
  box-shadow: 0 6px 0 #005040, 0 10px 24px rgba(0, 200, 150, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
  text-shadow: 0 0 8px rgba(0, 200, 150, 0.4);
}

.red-btn {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #fff;
  border-color: rgba(239, 68, 68, 0.3);
  border-bottom-color: #7f1d1d;
  box-shadow: 0 4px 0 #5a1010, 0 6px 16px rgba(239, 68, 68, 0.2), inset 0 1px 0 rgba(255,255,255,0.1);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.red-btn:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 6px 0 #5a1010, 0 10px 24px rgba(239, 68, 68, 0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn-ghost {
  background: transparent;
  color: var(--bc-text-mute);
  border: 1px solid var(--bc-border);
  border-bottom: 1px solid var(--bc-border);
  box-shadow: none;
}
.btn-ghost:hover {
  color: var(--bc-accent);
  border-color: var(--bc-accent);
  background: var(--bc-accent-soft);
  box-shadow: var(--bc-glow-blue);
  text-shadow: 0 0 6px rgba(0, 200, 150, 0.5);
}

/* ---------- Tables ---------- */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bc-surface);
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius-lg);
  overflow: hidden;
  box-shadow: var(--bc-shadow), inset 0 1px 0 rgba(255,255,255,0.02);
}
table th {
  background: linear-gradient(180deg, var(--bc-surface-2) 0%, var(--bc-surface-3) 100%);
  color: var(--bc-accent);
  padding: 12px 14px;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--bc-border);
  font-family: var(--bc-font-ui);
  position: sticky;
  top: 0;
  z-index: 2;
}
table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--bc-border);
  font-size: 0.84rem;
  color: var(--bc-text);
  vertical-align: middle;
}
table tr:last-child td { border-bottom: none; }
table tbody tr { transition: background var(--bc-t), box-shadow var(--bc-t); }
table tbody tr:hover {
  background: linear-gradient(90deg, rgba(0, 200, 150, 0.05) 0%, rgba(245, 166, 35, 0.03) 100%);
  box-shadow: inset 3px 0 0 var(--bc-accent);
}

/* ---------- Layout ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--bc-sp-5) var(--bc-sp-4);
  position: relative;
  z-index: 10;
}

/* ---------- Card ---------- */
.card {
  background: #ffffff;
  border: 1px solid var(--bc-border);
  border-top: 2px solid rgba(0, 200, 150, 0.3);
  border-radius: var(--bc-radius-lg);
  padding: var(--bc-sp-5);
  margin-bottom: var(--bc-sp-4);
  box-shadow: var(--bc-shadow);
  transition: border-color var(--bc-t), box-shadow var(--bc-t), transform var(--bc-t);
  position: relative;
}
.card:hover {
  border-color: var(--bc-accent);
  border-top-color: var(--bc-accent);
  box-shadow: var(--bc-shadow-lg), 0 0 0 1px rgba(0, 200, 150, 0.1);
  transform: translateY(-2px);
}

/* Card corner accent */
.card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 40px;
  height: 40px;
  border-top: 2px solid var(--bc-accent);
  border-left: 2px solid var(--bc-accent);
  border-radius: var(--bc-radius-lg) 0 0 0;
  opacity: 0.5;
  pointer-events: none;
}

.hidden { display: none !important; }

/* ---------- Header ---------- */
header {
  background: linear-gradient(180deg, var(--bc-surface) 0%, var(--bc-surface-2) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bc-border);
  box-shadow:
    0 2px 12px rgba(0,0,0,0.08),
    0 1px 0 rgba(0, 200, 150, 0.25);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Header bottom accent line */
header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--bc-accent) 20%,
    var(--bc-purple) 50%,
    var(--bc-accent) 80%,
    transparent 100%
  );
  opacity: 0.4;
}

/* Logo */
.logo, a.logo {
  font-family: var(--bc-font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #1a2c3e 0%, var(--bc-accent) 60%, var(--bc-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 4px rgba(0, 200, 150, 0.3));
  text-decoration: none !important;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: var(--bc-sp-4);
  flex-wrap: wrap;
  align-items: center;
}
.nav-links a {
  color: var(--bc-text-mute);
  text-decoration: none;
  font-size: 0.78rem;
  font-family: var(--bc-font-ui);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
  transition: color var(--bc-t), border-color var(--bc-t), text-shadow var(--bc-t);
  position: relative;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--bc-accent);
  border-bottom-color: var(--bc-accent);
  text-shadow: none;
  text-decoration: none;
}

.wallet-display {
  color: var(--bc-success-text);
  font-size: 0.82rem;
  cursor: pointer;
  font-weight: 700;
  font-family: var(--bc-font-ui);
  letter-spacing: 0.05em;
  text-shadow: 0 0 6px rgba(34, 197, 94, 0.35);
}

/* ---------- Dropdown ---------- */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-trigger {
  color: var(--bc-text-mute);
  text-decoration: none;
  font-size: 0.78rem;
  font-family: var(--bc-font-ui);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
  transition: color var(--bc-t), text-shadow var(--bc-t), border-color var(--bc-t);
  white-space: nowrap;
}
.dropdown-trigger:hover, .dropdown.active .dropdown-trigger {
  color: var(--bc-accent);
  text-shadow: 0 0 8px rgba(0, 200, 150, 0.4);
  border-bottom-color: var(--bc-accent);
}

.dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 180px;
  background: #ffffff;
  border: 1px solid var(--bc-border);
  border-top: 2px solid var(--bc-accent);
  border-radius: var(--bc-radius-lg);
  z-index: 1010;
  box-shadow: var(--bc-shadow-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  animation: dropdownIn 150ms cubic-bezier(.2,.8,.2,1);
}

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.dropdown-content a {
  color: var(--bc-text-mute);
  padding: 11px 16px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-family: var(--bc-font-ui);
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color var(--bc-t), background var(--bc-t);
  border-left: 2px solid transparent;
}
.dropdown-content a:hover {
  background: var(--bc-accent-soft);
  color: var(--bc-accent);
  border-left-color: var(--bc-accent);
  text-shadow: 0 0 6px rgba(0, 200, 150, 0.35);
  text-decoration: none;
}

.dropdown.active .dropdown-content {
  display: block;
}
@media (hover: hover) and (pointer: fine) {
  .dropdown:hover .dropdown-content { display: block; }
}

/* ---------- Nav within pages ---------- */
nav {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

nav a, .dropdown-trigger {
  color: var(--bc-text-mute);
  text-decoration: none;
  font-size: 0.78rem;
  font-family: var(--bc-font-ui);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--bc-t), text-shadow var(--bc-t);
}
nav a:hover {
  color: var(--bc-accent);
  text-shadow: 0 0 8px rgba(0, 200, 150, 0.4);
  text-decoration: none;
}

/* ---------- Badges / Pills ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bc-surface-2);
  color: var(--bc-text-mute);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 1px solid var(--bc-border);
  white-space: nowrap;
  font-family: var(--bc-font-ui);
  text-transform: uppercase;
}
.badge-green  { background: var(--bc-success-bg); color: var(--bc-success-text); border-color: rgba(34,197,94,0.3); text-shadow: 0 0 4px rgba(34,197,94,0.4); }
.badge-red    { background: var(--bc-danger-bg);  color: var(--bc-danger-text);  border-color: rgba(239,68,68,0.3); }
.badge-blue   { background: var(--bc-accent-soft); color: var(--bc-accent);      border-color: rgba(0,200,150,0.25); }
.badge-yellow { background: var(--bc-warn-bg);    color: var(--bc-warn-text);    border-color: rgba(245,158,11,0.3); }

/* ---------- View button ---------- */
.view-btn {
  background: linear-gradient(135deg, var(--bc-accent) 0%, var(--bc-accent-hover) 100%);
  color: #000;
  border: none;
  border-bottom: 2px solid #007a5c;
  padding: 6px 14px;
  border-radius: var(--bc-radius);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--bc-font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all var(--bc-t);
  box-shadow: 0 2px 0 #005040, 0 4px 12px rgba(0, 200, 150, 0.2);
}
.view-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #005040, 0 8px 20px rgba(0, 200, 150, 0.3);
  filter: brightness(1.1);
}
.view-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #005040;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  gap: 6px;
  margin-top: var(--bc-sp-4);
  justify-content: center;
  flex-wrap: wrap;
}
.pagination button {
  background: var(--bc-surface);
  color: var(--bc-text-mute);
  border: 1px solid var(--bc-border);
  border-bottom: 2px solid var(--bc-bg-soft);
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  min-width: 36px;
  box-shadow: none;
  text-transform: none;
}
.pagination button:hover { background: var(--bc-surface-3); color: var(--bc-accent); border-color: var(--bc-accent); }
.pagination button.active {
  background: linear-gradient(135deg, var(--bc-accent) 0%, var(--bc-accent-hover) 100%);
  color: #000;
  border-color: var(--bc-accent);
  box-shadow: 0 0 12px rgba(0, 200, 150, 0.25);
}

/* ---------- Modal ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  animation: bcFadeIn 160ms ease-out;
}
.modal-content {
  background: #ffffff;
  border: 1px solid var(--bc-border);
  border-top: 3px solid var(--bc-accent);
  border-radius: var(--bc-radius-xl);
  padding: var(--bc-sp-6);
  max-width: 560px;
  width: 92%;
  max-height: 84vh;
  overflow-y: auto;
  color: var(--bc-text);
  box-shadow: var(--bc-shadow-lg);
  animation: bcZoomIn 200ms cubic-bezier(.2,.8,.2,1);
  position: relative;
}
.modal-content::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 60px;
  height: 60px;
  border-top: 2px solid var(--bc-accent);
  border-left: 2px solid var(--bc-accent);
  border-radius: var(--bc-radius-xl) 0 0 0;
  opacity: 0.7;
  pointer-events: none;
}
.modal-content h2 {
  margin-top: 0;
  border-bottom: 1px solid var(--bc-border);
  padding-bottom: var(--bc-sp-3);
  font-family: var(--bc-font-display);
}

@keyframes bcFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bcZoomIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

.close-btn {
  float: right;
  background: none;
  border: none;
  border-bottom: none;
  color: var(--bc-text-mute);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color var(--bc-t), text-shadow var(--bc-t);
  box-shadow: none;
  text-transform: none;
  letter-spacing: 0;
}
.close-btn:hover { color: var(--bc-accent); background: none; text-shadow: 0 0 8px rgba(0, 200, 150, 0.5); transform: none; box-shadow: none; }

/* ---------- Filter row ---------- */
.filter-row {
  display: flex;
  gap: var(--bc-sp-3);
  margin-bottom: var(--bc-sp-4);
  flex-wrap: wrap;
}
.filter-row input, .filter-row select {
  flex: 1;
  min-width: 140px;
}

/* ---------- Payment / Wallet boxes ---------- */
.payment-box {
  background: #ffffff;
  border: 1px solid var(--bc-border);
  border-top: 2px solid rgba(0, 200, 150, 0.35);
  border-radius: var(--bc-radius-lg);
  padding: var(--bc-sp-5);
  margin: var(--bc-sp-4) 0;
  box-shadow: var(--bc-shadow);
}

.wallet-addr {
  background: rgba(0, 200, 150, 0.04);
  padding: 12px 14px;
  color: var(--bc-success-text);
  word-break: break-all;
  border: 1px dashed rgba(0, 200, 150, 0.25);
  border-radius: var(--bc-radius);
  margin: 10px 0;
  font-size: 0.85rem;
  user-select: all;
  font-family: var(--bc-font-mono);
  text-shadow: 0 0 4px rgba(34, 197, 94, 0.25);
}

/* ---------- Toasts ---------- */
.bc-toast-host {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
  font-family: var(--bc-font-mono);
}
/* legacy host wrapper — toast block itself is defined below in the global section */

/* ---------- Page section headings ---------- */
.section-title, h2.section-title {
  font-family: var(--bc-font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 200, 150, 0.25), 2px 2px 0 rgba(0,0,0,0.8);
  position: relative;
  padding-bottom: 10px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--bc-accent) 0%, var(--bc-purple) 100%);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(0, 200, 150, 0.4);
}

/* ---------- Utility focus ring ---------- */
:focus-visible {
  outline: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  body { font-size: 13px; }
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.1rem; }
  .container { padding: var(--bc-sp-4) var(--bc-sp-3); max-width: 100%; }
  .nav-links { gap: 8px; }
  .nav-links a { font-size: 0.72rem; padding: 4px 2px; }
  .filter-row { flex-direction: column; }
  .table-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
  }
  .table-scroll > table { width: max-content; min-width: 100%; font-size: 0.88rem; }
  .table-scroll > table th, .table-scroll > table td { padding: 11px 14px; overflow: hidden; }
  .modal-content table, .sd-modal table { display: table; white-space: normal; font-size: 12px; width: 100%; }
  .modal-content table th, .modal-content table td,
  .sd-modal table th, .sd-modal table td { white-space: normal; padding: 6px 8px; }
  .modal-content { padding: var(--bc-sp-4); max-height: 90vh; width: calc(100% - 24px); max-width: 100%; }
  button { padding: 9px 14px; }
  header {
    min-height: 56px;
    padding: 14px 12px;
    flex-wrap: wrap;
    gap: 10px;
    row-gap: 10px;
  }
  .logo, a.logo { font-size: 1rem; }
  .nav-links { width: 100%; justify-content: flex-start; gap: 8px 14px; row-gap: 8px; }
  .wallet-display { font-size: 0.74rem; }

  .hamburger { display: inline-block !important; order: 1; margin-right: auto; }
  header > .logo { order: 2; margin-left: auto; }
  header > nav, header > .user-menu {
    order: 3;
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--bc-border);
    margin-top: 6px;
  }
  header.nav-open > nav, header.nav-open > .user-menu { display: flex; }
  header > nav .dropdown,
  header > .user-menu .dropdown { width: 100%; }
  header > nav .dropdown-trigger,
  header > .user-menu .dropdown-trigger {
    width: 100%;
    justify-content: space-between;
    padding: 12px 14px;
    border: 1px solid var(--bc-border);
    border-radius: 8px;
    background: var(--bc-surface-2);
    font-size: 0.85rem;
  }
  header > nav > a {
    display: block;
    padding: 12px 14px;
    border: 1px solid var(--bc-border);
    border-radius: 8px;
    background: var(--bc-surface-2);
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--bc-text);
  }
  header > nav .dropdown-content,
  header > .user-menu .dropdown-content {
    position: static;
    left: auto !important;
    right: auto !important;
    width: 100%;
    min-width: 0;
    box-shadow: none;
    border: none;
    background: transparent;
    margin-top: 4px;
    padding-left: 8px;
  }
  header > .user-menu { border-top: none; padding-top: 0; margin-top: 0; }
}

.hamburger {
  display: none;
  background: transparent;
  border: 1px solid var(--bc-border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--bc-text);
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--bc-text);
  margin: 4px 0;
  border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 480px) {
  body { padding: 0; }
  .container { padding: var(--bc-sp-3) 12px; }
  .pagination button { padding: 6px 10px; min-width: 32px; }
  header { padding: 8px 10px; }
  .logo, a.logo { font-size: 0.92rem; letter-spacing: 0.06em; }
  .nav-links a { font-size: 0.66rem; letter-spacing: 0.04em; }
  table th, table td { padding: 10px 12px; font-size: 0.85rem; }
  h1 { font-size: 1.2rem; }
  h2 { font-size: 1rem; }
}

/* Global overflow safety - prevent any element from breaking the viewport */
html, body { max-width: 100%; }
img, video, table, pre, code { max-width: 100%; }

/* ---------- Global Toast Notifications ---------- */
#bc-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 360px;
}
.bc-toast {
  pointer-events: all;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px 14px 22px;
  border-radius: 10px;
  border: 1px solid var(--bc-border);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(13,26,40,0.18), 0 2px 8px rgba(13,26,40,0.10);
  font-family: var(--bc-font-ui);
  font-size: 13.5px;
  line-height: 1.5;
  color: #0d1a28;
  animation: bc-toast-in 0.3s cubic-bezier(.21,1.02,.73,1) forwards;
  position: relative;
  overflow: hidden;
}
.bc-toast::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  border-radius: 10px 0 0 10px;
}
.bc-toast.bc-toast-success { background: #ecfdf3; border-color: rgba(22,163,74,0.55); }
.bc-toast.bc-toast-success::before { background: #16a34a; }
.bc-toast.bc-toast-error   { background: #fef2f2; border-color: rgba(220,38,38,0.55); }
.bc-toast.bc-toast-error::before   { background: #dc2626; }
.bc-toast.bc-toast-warn    { background: #fffbeb; border-color: rgba(217,119,6,0.55); }
.bc-toast.bc-toast-warn::before    { background: #d97706; }
.bc-toast.bc-toast-info    { background: #eff6ff; border-color: rgba(37,99,235,0.55); }
.bc-toast.bc-toast-info::before    { background: #2563eb; }

.bc-toast-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}
.bc-toast.bc-toast-success .bc-toast-icon { color: #16a34a; }
.bc-toast.bc-toast-error   .bc-toast-icon { color: #dc2626; }
.bc-toast.bc-toast-warn    .bc-toast-icon { color: #d97706; }
.bc-toast.bc-toast-info    .bc-toast-icon { color: #2563eb; }

.bc-toast-body { flex: 1; min-width: 0; }
.bc-toast-title {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.bc-toast.bc-toast-success .bc-toast-title { color: #15803d; }
.bc-toast.bc-toast-error   .bc-toast-title { color: #b91c1c; }
.bc-toast.bc-toast-warn    .bc-toast-title { color: #b45309; }
.bc-toast.bc-toast-info    .bc-toast-title { color: #1d4ed8; }
.bc-toast-msg {
  font-size: 13.5px;
  color: #0d1a28 !important;
  word-wrap: break-word;
  font-weight: 500;
}
.bc-toast-close {
  flex-shrink: 0;
  cursor: pointer;
  color: #46627a;
  font-size: 15px;
  line-height: 1;
  transition: color 0.2s;
  background: none;
  border: none;
  padding: 0;
}
.bc-toast-close:hover { color: #0d1a28; }
.bc-toast-out { animation: bc-toast-out 0.25s ease forwards; }
@keyframes bc-toast-in {
  from { opacity: 0; transform: translateX(40px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0)   scale(1); }
}
@keyframes bc-toast-out {
  from { opacity: 1; transform: translateX(0)   scale(1); max-height: 120px; margin-bottom: 0; }
  to   { opacity: 0; transform: translateX(40px) scale(0.95); max-height: 0; margin-bottom: -10px; }
}

/* ---------- App Sidebar (left drawer) ---------- */
.app-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 290px; max-width: 85vw;
  background: var(--bc-surface);
  border-right: 1px solid var(--bc-border);
  transform: translateX(-105%);
  transition: transform .32s cubic-bezier(.2,.8,.2,1);
  z-index: 10000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  box-shadow: 8px 0 32px rgba(0,0,0,.45);
}
.app-sidebar.open { transform: translateX(0); }
.app-sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
  z-index: 9999;
}
.app-sidebar-overlay.open { opacity: 1; pointer-events: auto; }
.app-sidebar .sb-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--bc-border);
  background: linear-gradient(180deg, var(--bc-surface-2) 0%, var(--bc-surface) 100%);
}
.app-sidebar .sb-logo {
  font-family: var(--bc-font-ui);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bc-accent);
  text-decoration: none;
}
.app-sidebar .sb-close {
  background: transparent; border: 1px solid var(--bc-border);
  color: var(--bc-text); font-size: 1.4rem; line-height: 1;
  width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, border-color .2s, color .2s;
}
.app-sidebar .sb-close:hover { background: var(--bc-surface-3); color: var(--bc-accent); border-color: var(--bc-accent); }
.app-sidebar .sb-body { padding: 14px; display: flex; flex-direction: column; gap: 16px; }
.app-sidebar .sb-section { display: flex; flex-direction: column; gap: 6px; }
.app-sidebar .sb-section nav,
.app-sidebar .sb-section .user-menu {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: none;
  margin: 0;
  background: transparent;
}
.app-sidebar nav > a,
.app-sidebar .user-menu > a {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--bc-text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: var(--bc-surface-2);
  border: 1px solid var(--bc-border);
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.app-sidebar nav > a:hover,
.app-sidebar .user-menu > a:hover {
  background: var(--bc-accent-soft);
  color: var(--bc-accent);
  border-color: var(--bc-accent);
  transform: translateX(2px);
}
.app-sidebar .dropdown { position: relative; width: 100%; }
.app-sidebar .dropdown-trigger {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bc-surface-2);
  border: 1px solid var(--bc-border);
  color: var(--bc-text);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.app-sidebar .dropdown-trigger:hover { background: var(--bc-accent-soft); color: var(--bc-accent); border-color: var(--bc-accent); }
.app-sidebar .dropdown-trigger i { transition: transform .25s; }
.app-sidebar .dropdown.open .dropdown-trigger i,
.app-sidebar .dropdown.active .dropdown-trigger i { transform: rotate(180deg); }
.app-sidebar .dropdown-content {
  position: static !important;
  display: none !important;
  width: 100% !important; min-width: 0 !important;
  background: transparent !important;
  border: none !important; box-shadow: none !important;
  padding: 6px 0 0 12px !important;
  margin-top: 4px !important;
  left: auto !important; right: auto !important; top: auto !important;
}
.app-sidebar .dropdown.open > .dropdown-content,
.app-sidebar .dropdown.active > .dropdown-content { display: flex !important; flex-direction: column; gap: 4px; }
.app-sidebar .dropdown-content a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--bc-text-mute);
  text-decoration: none;
  border-left: 2px solid var(--bc-border);
  background: transparent;
  transition: background .2s, color .2s, border-color .2s;
}
.app-sidebar .dropdown-content a:hover {
  background: var(--bc-surface-2);
  color: var(--bc-accent);
  border-left-color: var(--bc-accent);
}
.app-sidebar .wallet-display { font-size: 0.85rem; padding: 6px 4px; color: var(--bc-text-mute); }

body.sidebar-open { overflow: hidden; }

/* Hide top header nav whenever the sidebar exists (mobile + desktop choice) */
@media (max-width: 768px) {
  body header > nav,
  body header > .user-menu { display: none !important; }
  body header.nav-open > nav,
  body header.nav-open > .user-menu { display: none !important; }
  .hamburger { display: inline-block !important; }
}
