/* ================================================================
   GOXGATE — Premium Dark UI  |  v4 — Full Mobile Responsive
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #070c14;
  color: #f1f5f9;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a   { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1d2a40; border-radius: 99px; }

/* ── Global SVG ─────────────────────────────────────────────────── */
svg { overflow: hidden; flex-shrink: 0; display: inline-block; vertical-align: middle; }

/* ================================================================
   LAYOUT — Sidebar + Main
   ================================================================ */
.wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 260px;
  height: 100vh;
  background: #0f1a2d;
  border-right: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform 0.28s ease;
  box-shadow: 2px 0 0 0 rgba(59,130,246,0.12);
}

/* ── Main Content ── */
.main-content {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #070c14;
  min-width: 0; /* prevent overflow */
}

/* ── Overlay ── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.60);
  z-index: 199;
  backdrop-filter: blur(3px);
}
.sidebar-overlay.active { display: block; }

/* ================================================================
   SIDEBAR INTERNALS
   ================================================================ */
.sidebar-logo {
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.sidebar-logo-inner { display: flex; align-items: center; gap: 10px; }
.sidebar-logo-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-logo-icon svg { color: white; }
.sidebar-logo-right { min-width: 0; }
.sidebar-logo-text  { font-size: 15px; font-weight: 800; color: #f1f5f9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-logo-sub   { font-size: 10px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 1px; }

.sidebar-nav { flex: 1; padding: 8px 10px; overflow-y: auto; scrollbar-width: none; }
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-group-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.4px; color: #475569;
  padding: 14px 10px 6px;
}
.nav-link {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: 8px;
  color: #94a3b8; font-size: 13px; font-weight: 500;
  border: 1px solid transparent; margin-bottom: 2px;
  transition: all 0.2s ease;
}
.nav-link:hover  { background: rgba(255,255,255,0.04); color: #f1f5f9; border-color: rgba(255,255,255,0.05); }
.nav-link.active { background: rgba(59,130,246,0.12); color: #60a5fa; border-color: rgba(59,130,246,0.22); font-weight: 600; }

.sidebar-footer { padding: 10px; border-top: 1px solid rgba(255,255,255,0.07); flex-shrink: 0; }
.sidebar-user {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: 8px;
  background: #172032; border: 1px solid rgba(255,255,255,0.07); margin-bottom: 6px;
}
.sidebar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.sidebar-username { font-size: 12px; font-weight: 600; color: #f1f5f9; }
.sidebar-role     { font-size: 10px; color: #64748b; }
.nav-logout {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 8px;
  color: #ef4444; font-size: 13px; font-weight: 500;
  width: 100%; border: 1px solid transparent; transition: all 0.2s;
}
.nav-logout:hover { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.2); }

/* ================================================================
   TOPBAR
   ================================================================ */
.topbar {
  position: sticky; top: 0; z-index: 100;
  height: 60px;
  background: rgba(7,12,20,0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.topbar-left  { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-title { font-size: 15px; font-weight: 700; color: #f1f5f9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-subtitle { font-size: 11px; color: #64748b; margin-top: 1px; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.topbar-clock {
  font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 500; color: #94a3b8;
  background: #172032; border: 1px solid rgba(255,255,255,0.07);
  padding: 5px 12px; border-radius: 8px; white-space: nowrap;
}

/* Hamburger */
.menu-toggle {
  display: none;
  width: 36px; height: 36px;
  border-radius: 8px; border: 1px solid rgba(255,255,255,0.08);
  background: #172032; align-items: center; justify-content: center;
  color: #94a3b8; flex-shrink: 0; transition: all .2s;
}
.menu-toggle:hover { background: #1d2a40; color: #f1f5f9; }

/* ================================================================
   PAGE CONTENT
   ================================================================ */
.page-content {
  padding: 22px 24px;
  display: flex; flex-direction: column; gap: 18px;
  flex: 1;
}

/* ================================================================
   STAT CARDS
   ================================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat-card {
  background: #111827;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 18px;
  position: relative; overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.3); }

.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--c-line, linear-gradient(90deg,#3b82f6,#60a5fa));
}
.stat-card::after {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 110px; height: 110px; border-radius: 50%;
  background: var(--c-glow, rgba(59,130,246,0.14));
  filter: blur(28px); pointer-events: none;
}

.stat-card.blue   { --c-line: linear-gradient(90deg,#3b82f6,#60a5fa); --c-glow: rgba(59,130,246,0.18); }
.stat-card.purple { --c-line: linear-gradient(90deg,#8b5cf6,#a78bfa); --c-glow: rgba(139,92,246,0.18); }
.stat-card.green  { --c-line: linear-gradient(90deg,#10b981,#34d399); --c-glow: rgba(16,185,129,0.18); }
.stat-card.cyan   { --c-line: linear-gradient(90deg,#06b6d4,#22d3ee); --c-glow: rgba(6,182,212,0.18); }
.stat-card.orange { --c-line: linear-gradient(90deg,#f59e0b,#fbbf24); --c-glow: rgba(245,158,11,0.18); }

.stat-card-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; position: relative; z-index: 1; }
.stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px; color: #64748b; }
.stat-icon-box { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon-box svg { width: 18px !important; height: 18px !important; display: block; }

.si-blue   { background: rgba(59,130,246,0.15); color: #60a5fa; }
.si-purple { background: rgba(139,92,246,0.15); color: #a78bfa; }
.si-green  { background: rgba(16,185,129,0.15); color: #34d399; }
.si-cyan   { background: rgba(6,182,212,0.15);  color: #22d3ee; }
.si-orange { background: rgba(245,158,11,0.15); color: #fbbf24; }
.si-red    { background: rgba(239,68,68,0.15);  color: #f87171; }

.stat-value { font-size: 22px; font-weight: 800; letter-spacing: -0.8px; color: #f1f5f9; line-height: 1.1; margin-bottom: 6px; position: relative; z-index: 1; }
.stat-meta  { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #64748b; position: relative; z-index: 1; }
.stat-meta svg { width: 11px !important; height: 11px !important; }
.c-success { color: #10b981; }
.c-warning { color: #f59e0b; }
.c-danger  { color: #ef4444; }

/* ================================================================
   CONTENT CARD
   ================================================================ */
.card {
  background: #111827;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  overflow: hidden;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  gap: 10px; flex-wrap: wrap;
}
.card-title-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.card-icon-box {
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(59,130,246,0.12);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden; color: #60a5fa;
}
.card-icon-box svg { width: 16px !important; height: 16px !important; display: block; }
.card-title    { font-size: 14px; font-weight: 700; color: #f1f5f9; }
.card-subtitle { font-size: 11px; color: #64748b; margin-top: 1px; }
.card-action {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: #60a5fa;
  padding: 6px 12px; border-radius: 7px;
  border: 1px solid rgba(59,130,246,0.22);
  background: rgba(59,130,246,0.08);
  transition: all 0.2s; white-space: nowrap;
}
.card-action:hover { background: rgba(59,130,246,0.15); }
.card-action svg { width: 12px !important; height: 12px !important; }

/* ================================================================
   TABLE — Desktop full / Mobile card-stack
   ================================================================ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 10px 14px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px;
  color: #64748b; background: #0f1a2d;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  text-align: left; white-space: nowrap;
}
tbody tr   { border-bottom: 1px solid rgba(255,255,255,0.05); transition: background 0.15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.02); }
tbody td   { padding: 12px 14px; color: #f1f5f9; font-size: 13px; vertical-align: middle; }

.td-ref {
  font-family: 'Courier New', monospace; font-size: 11.5px;
  color: #94a3b8; white-space: nowrap;
  max-width: 160px; overflow: hidden; text-overflow: ellipsis; display: block;
}
.td-amount { font-weight: 700; white-space: nowrap; }
.td-date   { font-size: 12px; color: #64748b; white-space: nowrap; }

/* ================================================================
   BADGES
   ================================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 99px;
  font-size: 10.5px; font-weight: 700; white-space: nowrap;
}
.badge svg { width: 10px !important; height: 10px !important; }
.badge-success { background: rgba(16,185,129,0.1);  color: #10b981; border: 1px solid rgba(16,185,129,0.25); }
.badge-warning { background: rgba(245,158,11,0.1);  color: #f59e0b; border: 1px solid rgba(245,158,11,0.25); }
.badge-danger  { background: rgba(239,68,68,0.1);   color: #ef4444; border: 1px solid rgba(239,68,68,0.25); }
.badge-info    { background: rgba(59,130,246,0.1);  color: #60a5fa; border: 1px solid rgba(59,130,246,0.25); }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 8px;
  font-size: 13px; font-weight: 600; font-family: inherit;
  border: 1px solid transparent; transition: all 0.2s;
  cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn svg { width: 14px !important; height: 14px !important; }
.btn-sm    { padding: 5px 12px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }

.btn-primary   { background: #3b82f6; color: #fff; border-color: #3b82f6; box-shadow: 0 0 16px rgba(59,130,246,0.22); }
.btn-primary:hover   { background: #2563eb; transform: translateY(-1px); }
.btn-secondary { background: #172032; color: #94a3b8; border-color: rgba(255,255,255,0.07); }
.btn-secondary:hover { background: #1d2a40; color: #f1f5f9; }
.btn-danger  { background: rgba(239,68,68,0.1);  color: #ef4444; border-color: rgba(239,68,68,0.2); }
.btn-success { background: rgba(16,185,129,0.1); color: #10b981; border-color: rgba(16,185,129,0.2); }

/* ================================================================
   FORMS
   ================================================================ */
.form-group  { margin-bottom: 16px; }
.form-label  { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #94a3b8; }
.form-control {
  width: 100%; padding: 10px 13px;
  background: #172032; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; color: #f1f5f9; font-size: 14px; font-family: inherit;
  transition: all 0.2s;
}
.form-control:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.14); background: #1d2a40; }
.form-control::placeholder { color: #475569; }
.form-hint  { font-size: 12px; color: #64748b; margin-top: 4px; }

/* ================================================================
   ALERTS
   ================================================================ */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 8px;
  font-size: 13px; margin-bottom: 14px;
}
.alert svg { width: 16px !important; height: 16px !important; flex-shrink: 0; margin-top: 1px; }
.alert-error   { background: rgba(239,68,68,0.08);  border: 1px solid rgba(239,68,68,0.2);  color: #fca5a5; }
.alert-success { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.2); color: #6ee7b7; }
.alert-warning { background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2); color: #fcd34d; }
.alert-info    { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.2); color: #93c5fd; }

/* ================================================================
   AUTH PAGES
   ================================================================ */
.auth-container {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(59,130,246,0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(139,92,246,0.06) 0%, transparent 55%);
}
.auth-card {
  width: 100%; max-width: 420px;
  background: #111827; border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px; padding: 36px 28px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}
.auth-title    { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 6px; }
.auth-subtitle { font-size: 13px; color: #64748b; text-align: center; margin-bottom: 26px; }

/* ================================================================
   EMPTY STATE
   ================================================================ */
.empty-state { text-align: center; padding: 44px 20px; }
.empty-icon {
  width: 58px; height: 58px; border-radius: 50%;
  background: #172032; border: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; color: #475569;
}
.empty-icon svg { width: 26px !important; height: 26px !important; }
.empty-title { font-size: 15px; font-weight: 600; margin-bottom: 5px; }
.empty-desc  { font-size: 13px; color: #64748b; }

/* ================================================================
   UTILITIES & ANIMATIONS
   ================================================================ */
.fw-600  { font-weight: 600; }
.fw-700  { font-weight: 700; }
.divider { height: 1px; background: rgba(255,255,255,0.07); margin: 16px 0; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; }
.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.1s; }
.d3 { animation-delay: 0.15s; }
.d4 { animation-delay: 0.2s; }

/* ================================================================
   RESPONSIVE BREAKPOINTS
   ================================================================ */

/* ── 1100px: 4-col stats → 2-col ── */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── 768px: Mobile – hide sidebar, show hamburger ── */
@media (max-width: 768px) {
  .sidebar         { transform: translateX(-260px); box-shadow: none; }
  .sidebar.open    { transform: translateX(0); box-shadow: 8px 0 32px rgba(0,0,0,0.6); }
  .main-content    { margin-left: 0; }
  .menu-toggle     { display: flex; }
  .topbar-clock    { display: none; }
  .page-content    { padding: 14px; gap: 12px; }
  .topbar          { padding: 0 14px; height: 54px; }
  .topbar-subtitle { display: none; }
}

/* ── 640px: Smaller mobile ── */
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card  { padding: 14px; }
  .stat-value { font-size: 18px; }
  .card-header { padding: 12px 14px; gap: 8px; }
  .card-title  { font-size: 13px; }
  .page-content { padding: 12px; gap: 10px; }
  .auth-card  { padding: 28px 20px; }

  /* Table → Card layout on mobile */
  .table-mobile-card thead { display: none; }
  .table-mobile-card tbody tr {
    display: block;
    background: #0f1a2d;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    margin: 0 0 10px;
    padding: 12px 14px;
  }
  .table-mobile-card tbody tr:hover { background: #111827; }
  .table-mobile-card tbody td {
    display: flex;
    padding: 5px 0;
    font-size: 13px;
    border: none;
    gap: 8px;
    align-items: flex-start;
    justify-content: space-between;
  }
  .table-mobile-card tbody td::before {
    content: attr(data-label);
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: #475569; flex-shrink: 0;
    min-width: 80px; padding-top: 2px;
  }
  .table-mobile-card tbody td:empty { display: none; }
}

/* ── 480px: 1-col stats ── */
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; gap: 8px; }
  .stat-card  { padding: 14px 16px; border-radius: 10px; }
  .stat-card-head { margin-bottom: 8px; }
  .stat-icon-box  { width: 32px; height: 32px; }
  .stat-value     { font-size: 20px; margin-bottom: 4px; }
  .btn   { font-size: 12px; padding: 8px 14px; }
  .btn-sm { font-size: 11px; padding: 5px 10px; }
}

/* ================================================================
   SETTINGS PAGE — Responsive grid
   ================================================================ */
.settings-body  { padding: 18px 20px; }
.settings-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

@media (max-width: 640px) {
  .settings-body { padding: 14px; }
  .settings-grid { grid-template-columns: 1fr; gap: 12px; }
}

small { display: block; margin-top: 5px; color: #64748b; font-size: 11px; line-height: 1.5; }
code  { font-family: 'Courier New', monospace; background: rgba(255,255,255,0.07); padding: 2px 6px; border-radius: 4px; font-size: 12px; color: #e2e8f0; word-break: break-all; }

.gateway-status { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.status-ok      { background: rgba(16,185,129,0.09); color: #10b981; border: 1px solid rgba(16,185,129,0.25); }
.status-warn    { background: rgba(245,158,11,0.09); color: #f59e0b; border: 1px solid rgba(245,158,11,0.25); }

.input-reveal-wrap { position: relative; display: flex; }
.input-reveal-wrap .form-control { padding-right: 44px; }
.reveal-btn { position: absolute; right: 0; top: 0; bottom: 0; width: 40px; background: none; border: none; cursor: pointer; font-size: 15px; color: #64748b; }
.reveal-btn:hover { color: #f1f5f9; }

.info-box { background: rgba(59,130,246,0.07); border: 1px solid rgba(59,130,246,0.22); border-radius: 10px; padding: 14px 16px; font-size: 13px; color: #93c5fd; }
.info-box strong { color: #60a5fa; }
.copyable-url { display: flex; align-items: center; gap: 8px; margin: 10px 0 6px; background: rgba(0,0,0,0.3); border-radius: 6px; padding: 9px 12px; flex-wrap: wrap; }
.copyable-url code { background: none; padding: 0; word-break: break-all; flex: 1; color: #a5f3fc; font-size: 12px; min-width: 0; }
.url-copy-btn { flex-shrink: 0; background: #3b82f6; color: #fff; border: none; border-radius: 6px; padding: 4px 12px; cursor: pointer; font-size: 12px; white-space: nowrap; transition: background 0.15s; }
.url-copy-btn:hover { background: #2563eb; }
.test-btn { background: rgba(59,130,246,0.12); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); border-radius: 8px; padding: 9px 18px; cursor: pointer; font-size: 13px; font-weight: 600; transition: all 0.2s; }
.test-btn:hover { background: rgba(59,130,246,0.2); }

.api-ref-grid { display: grid; gap: 10px; }
.api-ref-box  { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; }
.api-method   { padding: 4px 10px; border-radius: 5px; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; white-space: nowrap; flex-shrink: 0; }
.api-method.post { background: rgba(16,185,129,0.15); color: #10b981; }
.api-method.get  { background: rgba(59,130,246,0.15); color: #60a5fa; }
.api-ref-box strong { display: block; margin-bottom: 4px; color: #f1f5f9; font-size: 13px; }
.api-ref-box code  { display: block; margin: 4px 0; word-break: break-all; }
.api-ref-box p     { margin: 4px 0 0; color: #64748b; font-size: 12px; line-height: 1.6; }

@media (max-width: 640px) {
  .api-ref-box { flex-direction: column; gap: 8px; }
}

/* ================================================================
   WEBHOOK PAGES — Responsive
   ================================================================ */
.wh-stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
@media (max-width: 900px) { .wh-stats-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 500px) { .wh-stats-grid { grid-template-columns: repeat(2,1fr); gap: 8px; } }

/* ================================================================
   PROJECT CARDS — Responsive
   ================================================================ */
.project-card        { border-bottom: 1px solid rgba(255,255,255,0.05); padding: 16px 18px; transition: background 0.15s; }
.project-card:last-child { border-bottom: none; }
.project-card:hover  { background: rgba(255,255,255,0.015); }
.project-card.pending       { border-left: 3px solid #f59e0b; }
.project-card.active        { border-left: 3px solid #10b981; }
.project-card.rejected      { border-left: 3px solid #ef4444; }
.project-card.pending_edit  { border-left: 3px solid #60a5fa; }
.project-card.pending_delete{ border-left: 3px solid #60a5fa; }

.project-card-top   { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.project-info       { flex: 1; min-width: 0; }
.project-name       { font-size: 14px; font-weight: 700; color: #f1f5f9; }
.project-meta-row   { display: flex; align-items: flex-start; gap: 6px; color: #64748b; margin-top: 4px; }
.project-actions    { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.project-date       { font-size: 11px; color: #475569; white-space: nowrap; }

.api-keys-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.05); }
.key-group  { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.key-label  { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: #64748b; }
.key-cell   { display: flex; align-items: center; gap: 5px; min-width: 0; }
.code-pill  { font-family: monospace; font-size: 11px; background: rgba(255,255,255,0.06); color: #94a3b8; padding: 4px 8px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.icon-btn   { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); color: #64748b; border-radius: 5px; padding: 4px 7px; cursor: pointer; display: flex; align-items: center; transition: all 0.15s; flex-shrink: 0; }
.icon-btn:hover { background: rgba(59,130,246,0.1); color: #60a5fa; border-color: rgba(59,130,246,0.3); }

.admin-note-box  { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; padding: 8px 10px; background: rgba(59,130,246,0.06); border: 1px solid rgba(59,130,246,0.15); border-radius: 6px; font-size: 12px; color: #93c5fd; }
.pending-preview { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 9px 12px; background: rgba(245,158,11,0.07); border: 1px solid rgba(245,158,11,0.2); border-radius: 8px; font-size: 12px; color: #fcd34d; }

@media (max-width: 500px) {
  .api-keys-row { flex-direction: column; gap: 10px; }
  .code-pill { max-width: 160px; }
  .project-actions { width: 100%; justify-content: flex-end; }
}

/* ================================================================
   MODAL
   ================================================================ */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.65); z-index: 500;
  align-items: center; justify-content: center;
  padding: 16px; backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: #111827; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px; width: 100%; max-width: 540px;
  max-height: 92vh; overflow-y: auto;
  animation: fadeUp 0.3s ease;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.07);
  position: sticky; top: 0; background: #111827; z-index: 1;
}
.modal-title  { font-size: 15px; font-weight: 700; color: #f1f5f9; }
.modal-close  { background: none; border: none; color: #64748b; cursor: pointer; padding: 4px; border-radius: 6px; display: flex; transition: color 0.15s; }
.modal-close:hover { color: #f87171; }
.modal-body   { padding: 20px; }
.info-notice  { display: flex; align-items: flex-start; gap: 8px; padding: 11px 13px; background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.2); border-radius: 8px; font-size: 12px; color: #93c5fd; margin-top: 4px; }

@media (max-width: 480px) {
  .modal-box    { border-radius: 14px; max-height: 96vh; }
  .modal-header { padding: 14px 16px; }
  .modal-body   { padding: 16px; }
}
