/* =========================================================
   ECLIPSE GATEWAY — CYBER CRIMSON DESIGN SYSTEM
   Elite Cyber Security & Payment Theme (Matching ESCLIPS TEAM)
   Theme: Pure Cyber Black (#060609), Crisp White (#ffffff), Neon Crimson (#ff2449)
   ========================================================= */

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

/* Prevent Lucide icon flashing & layout shift */
i[data-lucide], svg.lucide {
  display: inline-block;
  width: 20px;
  height: 20px;
  vertical-align: middle;
  flex-shrink: 0;
  stroke-width: 1.6px !important;
}

/* ---- CYBER CRIMSON DESIGN TOKENS ---- */
:root {
  /* Core Brand (Neon Cyber Crimson & Red Accents) */
  --accent:              #ff2449;
  --accent-dark:         #be123c;
  --accent-light:        rgba(255, 36, 73, 0.14);
  --accent-glow:         rgba(255, 36, 73, 0.45);
  --accent-red:          #ef4444;

  --blue-50:  rgba(6, 182, 212, 0.12);
  --blue-100: rgba(6, 182, 212, 0.18);
  --blue-200: rgba(6, 182, 212, 0.35);
  --blue-500: #06b6d4;
  --blue-600: #ff2449;
  --blue-700: #22d3ee;
  --blue-800: #be123c;
  --blue-900: #0d0d16;

  /* Surfaces (Pure Cyber Dark Glass) */
  --surface-page:   #060609;
  --surface-card:   rgba(13, 13, 22, 0.94);
  --surface-raised: #141422;
  --surface-input:  #0a0a10;

  /* Ink / Text */
  --ink-900: #ffffff;
  --ink-700: #f1f5f9;
  --ink-500: #cbd5e1;
  --ink-400: #94a3b8;
  --ink-300: #64748b;
  --ink-200: #475569;
  --ink-100: #334155;
  --ink-50:  rgba(255, 255, 255, 0.08);

  /* Semantic */
  --color-primary:       #ff2449;
  --color-primary-deep:  #be123c;
  --color-primary-press: #991b1b;
  --color-primary-soft:  rgba(255, 36, 73, 0.14);
  --color-primary-glow:  rgba(255, 36, 73, 0.45);

  --color-ink:           #ffffff;
  --color-ink-secondary: #cbd5e1;
  --color-ink-mute:      #94a3b8;
  --color-ink-mute-2:    #64748b;

  --color-canvas:        var(--surface-card);
  --color-canvas-soft:   var(--surface-page);

  --color-hairline:      rgba(255, 255, 255, 0.08);
  --color-hairline-input: rgba(255, 255, 255, 0.12);

  /* Status Colors */
  --color-success-bg:     rgba(34, 197, 94, 0.14);
  --color-success-text:   #4ade80;
  --color-success-border: rgba(34, 197, 94, 0.32);
  --color-warning-bg:     rgba(245, 158, 11, 0.14);
  --color-warning-text:   #fbbf24;
  --color-warning-border: rgba(245, 158, 11, 0.32);
  --color-danger-bg:      rgba(239, 68, 68, 0.14);
  --color-danger-text:    #f87171;
  --color-danger-border:  rgba(239, 68, 68, 0.35);
  --color-ruby:           #ff2449;

  /* Sidebar (Deep Carbon Cyber) */
  --sidebar-bg:          #09090e;
  --sidebar-active:      rgba(255, 36, 73, 0.14);
  --sidebar-text:        #94a3b8;
  --sidebar-text-active: #ffffff;
  --sidebar-width:       256px;

  /* Radii (Sleek Minimal Cyber Curves) */
  --r-xs:   3px;
  --r-sm:   4px;
  --r-md:   6px;
  --r-lg:   8px;
  --r-xl:   10px;
  --r-pill: 9999px;

  /* Shadows & Neon Glows */
  --shadow-xs:  0 1px 3px rgba(0,0,0,0.5);
  --shadow-sm:  0 3px 12px rgba(0,0,0,0.55);
  --shadow-md:  0 6px 24px rgba(0,0,0,0.65);
  --shadow-lg:  0 16px 48px rgba(0,0,0,0.75);
  --shadow-xl:  0 25px 60px rgba(0,0,0,0.85);
  --shadow-inset: inset 0 2px 4px 0 rgba(0,0,0,0.5);
  --glow-accent: 0 0 24px rgba(255, 36, 73, 0.45);

  /* Typography */
  --font:      'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;

  /* Transition */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 0.15s;
  --t-mid:  0.22s;
}

/* ---- RESET ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: #060609 !important;
  color-scheme: dark;
}

body {
  font-family: var(--font) !important;
  background: var(--surface-page) !important;
  color: var(--color-ink) !important;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
input, button, textarea, select { font-family: var(--font); }

/* ---- TYPOGRAPHY ---- */
.tnum { font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.display-lg { font-size: 30px; font-weight: 800; line-height: 1.2; letter-spacing: -0.75px; color: var(--color-ink); }
.heading-lg  { font-size: 20px; font-weight: 700; line-height: 1.3; letter-spacing: -0.4px; color: var(--color-ink); }
.heading-md  { font-size: 17px; font-weight: 600; line-height: 1.4; letter-spacing: -0.3px; color: var(--color-ink); }

/* ---- BUTTONS (Cyber Crimson Glowing) ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  border: 1px solid transparent;
  font-family: var(--font);
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn-sm { font-size: 12px; padding: 5px 12px; border-radius: var(--r-sm); }

.btn-primary {
  background: linear-gradient(135deg, #ff2449 0%, #be123c 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 36, 73, 0.6) !important;
  box-shadow: 0 0 20px rgba(255, 36, 73, 0.4) !important;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #ff3b5c 0%, #d41743 100%) !important;
  box-shadow: 0 0 28px rgba(255, 36, 73, 0.65) !important;
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); filter: brightness(0.95); }

.btn-secondary {
  background: #12121c !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: #181826 !important;
  border-color: rgba(255, 36, 73, 0.4) !important;
  color: #ffffff !important;
}

.btn-dark {
  background: #0d0d16 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
.btn-dark:hover {
  background: #141422 !important;
  border-color: rgba(255, 36, 73, 0.3) !important;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12) !important;
  color: var(--color-danger-text) !important;
  border: 1px solid var(--color-danger-border) !important;
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.35) !important;
}

.btn-ghost {
  background: transparent !important;
  color: var(--color-ink-mute) !important;
  border: 1px solid transparent !important;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #ffffff !important;
}

/* ---- FORMS ---- */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-ink-secondary);
  letter-spacing: 0.02em;
}
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-md);
  background: #09090f;
  color: #ffffff;
  font-size: 13.5px;
  font-family: var(--font);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
}
.form-input:focus {
  border-color: #ff2449;
  background: #0d0d16;
  box-shadow: 0 0 0 2px rgba(255, 36, 73, 0.25);
}
.form-input::placeholder { color: #64748b; }

/* ---- CARDS ---- */
.card {
  background: var(--surface-card);
  border-radius: var(--r-md);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  margin-bottom: 20px;
  transition: border-color var(--t-mid), box-shadow var(--t-mid);
}
.card:hover {
  border-color: rgba(255, 36, 73, 0.3);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 24px rgba(255, 36, 73, 0.12);
}
.card-header { margin-bottom: 20px; }
.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-ink);
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: flex-start !important;
}
.card-sub { font-size: 12.5px; color: var(--color-ink-mute); margin-top: 4px; }

/* ---- BADGES / PILLS ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--r-xs);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
}
.badge-success { background: var(--color-success-bg); color: var(--color-success-text); border: 1px solid var(--color-success-border); }
.badge-warning { background: var(--color-warning-bg); color: var(--color-warning-text); border: 1px solid var(--color-warning-border); }
.badge-danger  { background: var(--color-danger-bg);  color: var(--color-danger-text);  border: 1px solid var(--color-danger-border); }
.badge-soft    { background: rgba(255, 36, 73, 0.12); color: #ff4d6d; border: 1px solid rgba(255, 36, 73, 0.3); }
.badge-neutral { background: rgba(255, 255, 255, 0.06); color: #94a3b8; border: 1px solid rgba(255, 255, 255, 0.08); }

/* ---- ALERTS / CALLOUTS ---- */
.callout { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); margin-bottom: 20px; font-size: 13px; border: 1px solid transparent; }
.callout-success { background: var(--color-success-bg); color: var(--color-success-text); border-color: var(--color-success-border); }
.callout-warning { background: var(--color-warning-bg); color: var(--color-warning-text); border-color: var(--color-warning-border); }
.callout-error   { background: var(--color-danger-bg);  color: var(--color-danger-text);  border-color: var(--color-danger-border); }
.callout-info    { background: rgba(6, 182, 212, 0.12); color: #22d3ee; border-color: rgba(6, 182, 212, 0.3); }
.msg.error   { background: var(--color-danger-bg); color: var(--color-danger-text); border: 1px solid var(--color-danger-border); padding: 12px 16px; border-radius: var(--r-md); margin-bottom: 16px; font-size: 13px; }
.msg.success { background: var(--color-success-bg); color: var(--color-success-text); border: 1px solid var(--color-success-border); padding: 12px 16px; border-radius: var(--r-md); margin-bottom: 16px; font-size: 13px; }

/* ================================================================
   DASHBOARD LAYOUT
   ================================================================ */
.dashboard-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--surface-page);
}

.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) 280px;
  gap: 20px;
}

/* ---- SIDEBAR ---- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: hidden;
  overflow-x: hidden;
  z-index: 30;
  transition: transform 0.3s var(--ease);
  border-right: 1px solid rgba(255,255,255,0.06);
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.sidebar-header {
  padding: 22px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-brand-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #ff2449, #be123c) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(255, 36, 73, 0.5) !important;
  flex-shrink: 0;
}
.sidebar-brand-name {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
  line-height: 1.2;
}
.sidebar-brand-tagline {
  font-size: 10px;
  color: #ff4d6d;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sidebar-section-label {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #64748b;
  padding: 10px 8px 6px;
  margin-top: 8px;
  font-family: var(--font-mono);
}
.sidebar-item {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  text-decoration: none;
  position: relative;
  min-height: 38px;
  line-height: 20px;
  white-space: nowrap;
}
.sidebar-item:hover {
  background: rgba(255,255,255,0.06);
  color: #ffffff;
}
.sidebar-item.active {
  background: rgba(255, 36, 73, 0.15) !important;
  color: #ffffff !important;
  border-left: 3px solid #ff2449 !important;
  font-weight: 600;
}
.sidebar-item.active i[data-lucide],
.sidebar-item.active > svg { color: #ff2449 !important; }
.sidebar-item i[data-lucide] { width: 16px; height: 16px; flex-shrink: 0; transition: color var(--t-fast); }
.sidebar-item > svg { width:16px; height:16px; min-width:16px; min-height:16px; flex:0 0 16px; display:block; transition:color var(--t-fast); }
.sidebar-nav::-webkit-scrollbar { width:4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background:rgba(255,255,255,.14); border-radius:4px; }

.sidebar-item-badge {
  margin-left: auto;
  background: #ff2449 !important;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--r-pill);
}

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--t-fast);
  text-decoration: none;
}
.sidebar-user-card:hover { background: rgba(255,255,255,0.07); }
.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 36, 73, 0.4);
  flex-shrink: 0;
}
.sidebar-user-card > div:first-child {
  width: 36px !important;
  height: 36px !important;
  flex: 0 0 36px !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #ff2449, #be123c) !important;
  box-shadow: 0 2px 10px rgba(255, 36, 73, 0.45) !important;
}
.sidebar-user-card > div:first-child img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}
.sidebar-user-name { font-size: 13px; font-weight: 600; color: #ffffff; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sidebar-user-role { font-size: 11px; color: #ff4d6d; font-family: var(--font-mono); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.merchant-plan-dot { display:inline-block; width:6px; height:6px; margin-right:5px; border-radius:50%; background:#22c55e; box-shadow:0 0 0 2px rgba(34,197,94,.25); }
.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  margin-top: 4px;
  border-radius: var(--r-md);
  color: #f87171;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--t-fast);
  text-decoration: none;
}
.sidebar-logout:hover { background: rgba(239,68,68,0.12); color: #ff8080; }
.sidebar-logout i[data-lucide] { width: 15px; height: 15px; }
.sidebar-logout > svg { width:15px; height:15px; min-width:15px; min-height:15px; flex:0 0 15px; display:block; }

/* ---- MOBILE HEADER ---- */
.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 22px 22px;
  min-height: 72px;
  background: var(--sidebar-bg);
  color: #ffffff;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
  z-index: 20;
}
.mobile-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
}
.mobile-menu-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
}
.mobile-menu-btn:hover { background: rgba(255, 36, 73, 0.2); border-color: #ff2449; }

/* ---- OVERLAY ---- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 25;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---- MAIN CONTENT ---- */
.main-content {
  flex: 1;
  overflow-y: auto;
  background: var(--surface-page);
  min-width: 0;
}
.main-content::-webkit-scrollbar { width: 6px; }
.main-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 3px; }

/* ---- TOP BAR (inside main) ---- */
.page-header {
  padding: 24px 32px 0;
  margin-bottom: 24px;
}
.page-header-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
}
.page-header-sub { font-size: 13px; color: var(--color-ink-mute); margin-top: 3px; }

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 48px 80px;
}

/* ---- TABLES ---- */
.table-container {
  overflow-x: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 20px -24px -24px;
  border-radius: 0 0 var(--r-md) var(--r-md);
}
.card > .table-container:last-child { margin-bottom: -1px; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th, .table td {
  white-space: nowrap;
}
.table thead th {
  background: #09090f !important;
  padding: 14px 20px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8 !important;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-family: var(--font-mono);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}
.table thead th:first-child { padding-left: 24px; }
.table tbody td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  vertical-align: middle;
  white-space: nowrap;
}
.table tbody td:first-child { padding-left: 24px; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr {
  transition: background var(--t-fast);
}
.table tbody tr:hover { background: rgba(255, 36, 73, 0.05) !important; }

/* ---- STAT CARDS (inside dashboard) ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--surface-card) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: var(--r-md) !important;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6) !important;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color var(--t-mid), box-shadow var(--t-mid), transform var(--t-mid);
}
.stat-card:hover {
  border-color: rgba(255, 36, 73, 0.35) !important;
  box-shadow: 0 16px 40px rgba(0,0,0,0.75), 0 0 24px rgba(255, 36, 73, 0.15) !important;
  transform: translateY(-2px);
}
.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stat-card-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-family: var(--font-mono);
}
.stat-card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-card-icon.blue   { background: linear-gradient(135deg, #ff2449, #be123c); color: #fff; box-shadow: 0 0 16px rgba(255, 36, 73, 0.5); }
.stat-card-icon.green  { background: linear-gradient(135deg, #22c55e, #15803d); color: #fff; box-shadow: 0 0 16px rgba(34, 197, 94, 0.4); }
.stat-card-icon.red    { background: linear-gradient(135deg, #ff2449, #be123c); color: #fff; box-shadow: 0 0 16px rgba(255, 36, 73, 0.5); }
.stat-card-icon.orange { background: linear-gradient(135deg, #f59e0b, #b45309); color: #fff; box-shadow: 0 0 16px rgba(245, 158, 11, 0.4); }
.stat-card-icon.purple { background: linear-gradient(135deg, #a855f7, #7e22ce); color: #fff; box-shadow: 0 0 16px rgba(168, 85, 247, 0.4); }
.stat-card-value {
  font-size: 34px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -1px;
  line-height: 1;
  font-family: var(--font-mono);
}
.stat-card.featured {
  background: linear-gradient(135deg, #be123c 0%, #ff2449 100%) !important;
  border-color: rgba(255, 36, 73, 0.6) !important;
  box-shadow: 0 0 30px rgba(255, 36, 73, 0.45) !important;
}
.stat-card.featured .stat-card-label { color: rgba(255, 255, 255, 0.85); }
.stat-card.featured .stat-card-value { color: #ffffff; }
.stat-card.featured .stat-card-icon  { background: rgba(255,255,255,0.2); color: #ffffff; box-shadow: none; }
.stat-card.featured:hover { box-shadow: 0 0 40px rgba(255, 36, 73, 0.65) !important; }

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 48px 20px;
}
.empty-state-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--r-md);
  background: #0d0d16;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #64748b;
}
.empty-state-title { font-size: 15px; font-weight: 700; color: #ffffff; margin-bottom: 6px; }
.empty-state-sub   { font-size: 13px; color: var(--color-ink-mute); }

/* ---- CODE / API KEY ---- */
.code-block {
  background: #060609 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: var(--r-md);
  padding: 18px 20px;
  overflow-x: auto;
}
.code-block code {
  color: #22d3ee;
  font-size: 13px;
  font-family: var(--font-mono);
  white-space: pre-wrap;
  word-break: break-word;
}
.copy-btn {
  background: #141422 !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: var(--r-sm);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.copy-btn:hover { background: #1a1a2e !important; color: #ffffff !important; border-color: #ff2449 !important; box-shadow: 0 0 12px rgba(255, 36, 73, 0.35); }
.copy-btn.copied { background: rgba(34, 197, 94, 0.18) !important; color: #4ade80 !important; border-color: rgba(34, 197, 94, 0.4) !important; }

/* ---- DOCS ---- */
.desc { font-size: 14px; color: var(--color-ink-secondary); line-height: 1.65; margin-bottom: 20px; }
.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: rgba(255, 36, 73, 0.14);
  color: #ff4d6d;
  border: 1px solid rgba(255, 36, 73, 0.3);
  border-radius: var(--r-xs);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  margin-right: 8px;
}

/* ---- MOBILE RESPONSIVENESS ---- */
@media (max-width: 960px) {
  .dashboard-layout { flex-direction: column; height: 100dvh; }
  .mobile-header    { display: flex; }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    transform: translateX(-100%);
    z-index: 30;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar.open + .sidebar-overlay { display: block; }
  .wrap { padding: 20px 18px 48px; }
  .card { padding: 20px; }
  .table-container { margin: 16px -20px -20px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .page-header { padding: 16px 18px 0; }
  .dashboard-bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stat-grid { grid-template-columns: 1fr; }
  .wrap { padding: 16px 14px 40px; }
  .card { padding: 16px; border-radius: var(--r-lg); }
  .table-container { margin: 14px -16px -16px; }
  #closeSidebarBtn { display: block !important; }
  .form-input { font-size: 16px; /* prevent iOS zoom */ }
}

/* =============================================
   PREMIUM MICRO-INTERACTIONS (Admin Panel)
============================================= */

/* Button tactile press — feels physical */
.btn:active { transform: scale(0.97) translateY(1px); }

/* Table rows — smooth highlight on hover */
.table tbody tr {
  transition: background var(--t-fast), box-shadow var(--t-fast);
}
.table tbody tr:hover {
  background: var(--blue-50);
  box-shadow: inset 3px 0 0 var(--color-primary);
}

/* Cards — subtle lift on hover (upgrade from just shadow) */
.card {
  transition: box-shadow var(--t-mid) var(--ease), transform var(--t-mid) var(--ease);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }

/* Sidebar items — smooth icon color transition */
.sidebar-item { transition: background var(--t-fast), color var(--t-fast), padding-left var(--t-mid); }
.sidebar-item:hover { padding-left: 16px; }
.sidebar-item.active { padding-left: 12px; }

/* Sidebar slide-in — smoother bezier curve */
.sidebar { transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }

/* Stat card icon pulse on hover */
.stat-card:hover .stat-card-icon { transform: scale(1.1); transition: transform var(--t-mid); }

/* Overlay fade-in */
.sidebar-overlay { transition: opacity 0.25s ease; }

/* =============================================
   MERCHANT PANEL — ENTRANCE ANIMATIONS
   Powered by IntersectionObserver (no lib)
============================================= */

@keyframes dashFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes dashFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes dashSlideRight {
  from { opacity: 0; transform: translateX(-18px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Utility animation classes — initial hidden state */
.dash-anim-up      { opacity: 0; will-change: opacity, transform; }
.dash-anim-in      { opacity: 0; will-change: opacity; }
.dash-anim-right   { opacity: 0; will-change: opacity, transform; }

/* Triggered by .is-visible (added via JS) */
.dash-anim-up.is-visible    { animation: dashFadeUp  0.55s cubic-bezier(.22,1,.36,1) forwards; }
.dash-anim-in.is-visible    { animation: dashFadeIn  0.5s ease forwards; }
.dash-anim-right.is-visible { animation: dashSlideRight 0.55s cubic-bezier(.22,1,.36,1) forwards; }

/* Stagger: children appear one after another */
.dash-stagger > * { opacity: 0; will-change: opacity, transform; }
.dash-stagger.is-visible > *:nth-child(1) { animation: dashFadeUp .5s .04s cubic-bezier(.22,1,.36,1) forwards; }
.dash-stagger.is-visible > *:nth-child(2) { animation: dashFadeUp .5s .12s cubic-bezier(.22,1,.36,1) forwards; }
.dash-stagger.is-visible > *:nth-child(3) { animation: dashFadeUp .5s .20s cubic-bezier(.22,1,.36,1) forwards; }
.dash-stagger.is-visible > *:nth-child(4) { animation: dashFadeUp .5s .28s cubic-bezier(.22,1,.36,1) forwards; }
.dash-stagger.is-visible > *:nth-child(5) { animation: dashFadeUp .5s .36s cubic-bezier(.22,1,.36,1) forwards; }
.dash-stagger.is-visible > *:nth-child(6) { animation: dashFadeUp .5s .44s cubic-bezier(.22,1,.36,1) forwards; }

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .dash-anim-up, .dash-anim-in, .dash-anim-right,
  .dash-stagger > * {
    opacity: 1 !important;
    animation: none !important;
  }
}

/* =============================================
   MERCHANT PANEL — RESPONSIVENESS FIXES
============================================= */

/* API Key display on mobile — prevent overflow */
.api-key-display {
  word-break: break-all;
  overflow-wrap: anywhere;
}

/* Payment link URL cell on mobile */
@media (max-width: 640px) {
  .table td code {
    display: block;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .wrap {
    padding: 14px 12px 60px;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .stat-card-value {
    font-size: 22px;
  }
  .page-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  /* Fixes for Profile and forms on mobile */
  .form-row {
    grid-template-columns: 1fr !important;
  }
  #updateProfileForm, #requestEmailForm, #verifyEmailForm {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  #updateProfileForm > div, #requestEmailForm > div, #verifyEmailForm > div {
    min-width: 100% !important;
  }
  #updateProfileForm > div[style*="display: flex"] {
    flex-direction: row !important;
  }
  
  /* Dashboard layout fixes */
  .card {
    padding: 16px !important;
  }
  .card-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  .card-header > div {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 400px) {
  .stat-grid { grid-template-columns: 1fr; }
  #updateProfileForm > div[style*="display: flex"] {
    flex-direction: column !important;
  }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin-icon {
  animation: spin 1s linear infinite !important;
  transform-origin: center !important;
  transform-box: fill-box !important;
  position: relative;
  top: 2px;
}
