/* RechargePro — Global Styles */
:root {
  --bg: #09090b;
  --bg-secondary: #18181b;
  --bg-card: #1c1c21;
  --border: #27272a;
  --foreground: #fafafa;
  --muted: #a1a1aa;
  --primary: #6d28d9;
  --primary-hover: #7c3aed;
  --primary-fg: #fff;
  --success: #22c55e;
  --destructive: #ef4444;
  --accent: #8b5cf6;
  --gradient: linear-gradient(135deg, #6d28d9, #8b5cf6);
  --glow: 0 0 20px rgba(109, 40, 217, 0.3);
  --radius: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', var(--font);
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

.font-display { font-family: var(--font-display); }

/* Utilities */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--primary-fg); box-shadow: var(--glow); }
.btn-primary:hover { background: var(--primary-hover); transform: scale(1.02); }
.btn-secondary { background: var(--bg-card); color: var(--foreground); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-secondary); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }
.btn-danger { background: var(--destructive); color: #fff; }
.btn-danger:hover { opacity: 0.9; }
.btn-success { background: var(--success); color: #fff; }

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card-hover:hover { border-color: rgba(109, 40, 217, 0.4); }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.375rem;
}
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--foreground);
  font-size: 1rem;
  transition: border-color 0.2s;
}
.form-input:focus { outline: none; border-color: var(--primary); }
.form-input::placeholder { color: var(--muted); }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.badge-success { background: rgba(34,197,94,0.15); color: var(--success); }
.badge-warning { background: rgba(234,179,8,0.15); color: #eab308; }
.badge-danger { background: rgba(239,68,68,0.15); color: var(--destructive); }
.badge-primary { background: rgba(109,40,217,0.15); color: var(--accent); }

/* Table */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th { text-align: left; padding: 0.75rem 1rem; color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
tr:hover td { background: var(--bg-secondary); }

/* Tabs */
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; overflow-x: auto; }
.tab {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}
.tab:hover { color: var(--foreground); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Alert */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.alert-error { background: rgba(239,68,68,0.1); color: var(--destructive); border: 1px solid rgba(239,68,68,0.2); }
.alert-success { background: rgba(34,197,94,0.1); color: var(--success); border: 1px solid rgba(34,197,94,0.2); }

/* Grid */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .container { padding: 0 1rem; }
  .btn-lg { padding: 0.875rem 1.5rem; font-size: 0.9375rem; }
}

/* Flex */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Spacing */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

/* Text */
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.line-through { text-decoration: line-through; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Misc */
.hidden { display: none; }
.w-full { width: 100%; }
.rounded { border-radius: var(--radius); }
.rounded-full { border-radius: 9999px; }
.border { border: 1px solid var(--border); }
.shadow-glow { box-shadow: var(--glow); }
.animate-pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.backdrop-blur { backdrop-filter: blur(12px); }
.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.min-h-screen { min-height: 100vh; }

/* Selected state */
.card.selected, .btn.selected { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.preset-btn.selected { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Loading spinner */
.spinner {
  width: 1.25rem; height: 1.25rem;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
