/* ==========================================================================
   RelanceExpress - Design System & Global Styles
   Fintech Dark Mode with Emerald & Cyan Accents
   ========================================================================== */

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

:root {
  /* Color Palette */
  --bg-dark: #080b11;
  --bg-dark-elevated: #0f1523;
  --bg-card: rgba(18, 26, 43, 0.65);
  --bg-card-hover: rgba(26, 38, 62, 0.85);
  --bg-glass-input: rgba(255, 255, 255, 0.04);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-emerald: rgba(16, 185, 129, 0.35);
  --border-hover: rgba(255, 255, 255, 0.18);
  
  --emerald-main: #10b981;
  --emerald-light: #34d399;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --cyan-main: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.25);
  --purple-accent: #8b5cf6;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #10b981;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Shadows & Effects */
  --shadow-glass: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
  --shadow-emerald: 0 0 25px rgba(16, 185, 129, 0.3);
  --shadow-cyan: 0 0 25px rgba(6, 182, 212, 0.3);
  
  /* Transitions */
  --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Background Ambient Glows */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.15;
}

.glow-orb-1 {
  top: -10%;
  left: 20%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--emerald-main) 0%, transparent 70%);
}

.glow-orb-2 {
  top: 40%;
  right: -10%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, var(--cyan-main) 0%, transparent 70%);
}

.glow-orb-3 {
  bottom: -10%;
  left: -5%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, var(--purple-accent) 0%, transparent 70%);
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text-primary);
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, var(--emerald-light) 50%, var(--cyan-main) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

/* Glassmorphism Containers */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glass);
  transition: var(--transition-smooth);
}

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

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-heading);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald-light);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
  text-decoration: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--emerald-main) 0%, #059669 100%);
  color: #ffffff;
  box-shadow: var(--shadow-emerald);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}

.btn-secondary {
  background: var(--bg-glass-input);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

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

.btn-cyan {
  background: linear-gradient(135deg, var(--cyan-main) 0%, #0284c7 100%);
  color: #ffffff;
  box-shadow: var(--shadow-cyan);
}

.btn-cyan:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px rgba(6, 182, 212, 0.5);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.88rem;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
  border-radius: var(--radius-md);
}

/* Inputs & Form Elements */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.input-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-field, .select-field, .textarea-field {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-glass-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.input-field:focus, .select-field:focus, .textarea-field:focus {
  outline: none;
  border-color: var(--emerald-main);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.select-field option {
  background-color: var(--bg-dark-elevated);
  color: var(--text-primary);
}

/* Navigation Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 11, 17, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 24px;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--emerald-main) 0%, var(--cyan-main) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: var(--shadow-emerald);
}

/* Mode Switcher Tabs (Landing / Dashboard / FB Kit) */
.mode-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.tab-btn {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(6, 182, 212, 0.2) 100%);
  color: #ffffff;
  border: 1px solid var(--border-emerald);
  box-shadow: var(--shadow-emerald);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 12, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: var(--transition-smooth);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-dark-elevated);
  border-left: 4px solid var(--emerald-main);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  color: var(--text-primary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Utility Layouts */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-padding {
  padding: 90px 0;
}

.text-center { text-align: center; }
.text-emerald { color: var(--emerald-light); }
.text-muted { color: var(--text-muted); }
