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

:root {
  /* Colors - Deep Space Theme (Default Dark) */
  --bg-dark: #020617;
  /* Slate 950 */
  --bg-card: rgba(30, 41, 59, 0.7);
  /* Slate 800 with opacity */
  --bg-glass: rgba(15, 23, 42, 0.6);
  --bg-sidebar: rgba(2, 6, 23, 0.95);
  --bg-header: rgba(2, 6, 23, 0.8);

  --primary: #06b6d4;
  /* Cyan 500 */
  --primary-glow: rgba(6, 182, 212, 0.5);
  --secondary: #8b5cf6;
  /* Violet 500 */
  --secondary-glow: rgba(139, 92, 246, 0.5);
  --accent: #10b981;
  /* Emerald 500 */

  --text-main: #f8fafc;
  /* Slate 50 */
  --text-muted: #94a3b8;
  /* Slate 400 */
  --text-inverse: #020617;

  --border-glass: rgba(255, 255, 255, 0.1);
  --border-highlight: rgba(255, 255, 255, 0.2);

  --input-bg: rgba(0, 0, 0, 0.2);

  /* Spacing */
  --container-width: 1200px;
  --header-height: 80px;

  /* Animation */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-dark: #f8fafc;
  /* Slate 50 */
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.6);
  --bg-sidebar: #ffffff;
  --bg-header: rgba(255, 255, 255, 0.8);

  --text-main: #0f172a;
  /* Slate 900 */
  --text-muted: #64748b;
  /* Slate 500 */
  --text-inverse: #f8fafc;

  --border-glass: rgba(0, 0, 0, 0.1);
  --border-highlight: rgba(6, 182, 212, 0.5);

  --input-bg: rgba(255, 255, 255, 0.5);
  --primary-glow: rgba(6, 182, 212, 0.25);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* Background Gradients */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -2;
  background-image:
    radial-gradient(circle at 15% 50%, var(--secondary-glow), transparent 25%),
    radial-gradient(circle at 85% 30%, var(--primary-glow), transparent 25%);
  transition: opacity var(--transition-smooth);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

/* ... existing utilities ... */

/* Custom Dropdown Styling */
.custom-select-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

select.custom-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 12px 16px;
  background-color: var(--input-bg);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-fast);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

select.custom-select:hover {
  border-color: var(--primary);
}

select.custom-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: var(--bg-card);
  border-color: var(--primary);
}

/* Logo Blend */
[data-theme="light"] .logo-img {
  mix-blend-mode: multiply;
  filter: invert(1) contrast(1.2);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.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-4 {
  gap: 1rem;
}

.gap-8 {
  gap: 2rem;
}

.text-gradient {
  background: linear-gradient(135deg, var(--text-main) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-secondary {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glassmorphism */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.glass-panel:hover {
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
  transform: translateY(-2px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 99px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #0891b2 100%);
  color: #fff;
  border: none;
  box-shadow: 0 0 15px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px var(--primary-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
}

[data-theme="light"] .btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
}

[data-theme="light"] .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

/* Animations */
@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

@keyframes pulse-glow {

  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

/* ... Utilities ... */

/* Dashboard Layout */
body.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

body.auth-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  position: fixed;
  height: 100vh;
  z-index: 100;
  transition: background-color var(--transition-smooth);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 12px 16px;
  color: var(--text-muted);
  border-radius: 12px;
  margin-bottom: 0.5rem;
  transition: var(--transition-fast);
  border-left: 2px solid transparent;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.05);
  /* Stays subtle in both modes */
  color: var(--text-main);
}

[data-theme="light"] .nav-item:hover,
[data-theme="light"] .nav-item.active {
  background: rgba(0, 0, 0, 0.05);
}

.nav-item.active {
  background: linear-gradient(90deg, var(--primary-glow) 0%, transparent 100%);
  border-left: 2px solid var(--primary);
}

.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 2rem;
  width: calc(100% - 260px);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-glass);
}

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

.dashboard-card {
  padding: 1.5rem;
}

/* Tables */
.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 1rem;
  border-bottom: 1px solid var(--border-glass);
  color: var(--text-main);
}

th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
}

tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

.status-badge {
  padding: 4px 8px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-active {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent);
}

.status-pending {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.copy-btn:hover {
  color: var(--primary);
}

/* Configuration Styles */
.config-section {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-input,
.form-select {
  width: 100%;
  padding: 12px;
  background: var(--input-bg);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-glass);
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: var(--text-main);
  transition: .4s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: var(--primary);
}

input:checked+.slider:before {
  transform: translateX(26px);
  background-color: #fff;
}

/* Custom Amount Input (Billing) */
/* Custom Amount Input (Billing) */
.custom-amount-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 99px;
  /* Pill shape */
  padding: 6px;
  width: 280px;
  /* Fixed width for better look */
}

.amount-btn {
  width: 42px;
  height: 42px;
  border: none;
  background: rgba(255, 255, 255, 0.03);
  /* Subtle button bg */
  color: var(--text-main);
  font-size: 1.5rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 50%;
  /* Circle buttons */
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.amount-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary);
}

.amount-display {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

/* Currency Symbol */
.currency-symbol {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0;
}

.amount-field {
  width: 2ch;
  /* Initial small width */
  background: transparent;
  border: none;
  color: var(--text-main);
  text-align: left;
  /* Align next to currency */
  font-size: 1.3rem;
  font-weight: 600;
  padding: 0;
  -moz-appearance: textfield;
  appearance: textfield;
  /* Standard property */
}



.amount-field:focus {
  outline: none;
}

.amount-field::-webkit-outer-spin-button,
.amount-field::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Amount Presets */
.amount-presets {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.preset-btn {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 99px;
  /* Pill shape */
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.preset-btn:hover {
  border-color: var(--primary);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

/* Payment Methods (Billing) */
.payment-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.payment-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.payment-card:hover {
  border-color: var(--primary);
}

/* Header Actions Alignment */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  /* 16px */
}

/* Language Toggle Button styling to match Theme Toggle */
.lang-toggle-btn {
  height: 40px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  background: transparent;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
}

[data-theme="light"] .lang-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  width: 40px;
  height: 40px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
}

[data-theme="light"] .theme-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Spacing Utilities */
.gap-6 {
  gap: 1.5rem;
}

.gap-12 {
  gap: 3rem;
}

/* Logout Button */
.btn-logout {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  color: var(--text-muted);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 0.95rem;
  font-weight: 500;
  justify-content: flex-start;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}