/**
 * UI/UX Pro Max - Modern High-End Design System Token Architecture
 * Standard: WCAG 2.1 AA, Aurora Lighting, Fluid Responsive Scaling
 */

:root {
  /* ========================================================================= */
  /* 1. Brand & Semantic Colors (Emerald & Mint Tech SaaS Palette) */
  /* ========================================================================= */
  --primary-50: #ecfdf5;
  --primary-100: #d1fae5;
  --primary-200: #a7f3d0;
  --primary-300: #6ee7b7;
  --primary-400: #34d399;
  --primary-500: #10b981;
  --primary-600: #059669;
  --primary-700: #047857;
  --primary-800: #065f46;
  --primary-900: #064e3b;

  --color-primary: #059669;
  --color-primary-hover: #047857;
  --color-primary-light: #ecfdf5;
  --color-secondary: #10b981;
  --color-accent: #ea580c; /* High urgency conversion accent */
  --color-accent-hover: #c2410c;

  /* Neutrals & Dark Contrast (Obsidian Slate) */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --slate-950: #020617;

  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-translucent: rgba(255, 255, 255, 0.85);
  --bg-surface-subtle: #f8fafc;
  --bg-dark-card: #0f172a;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #94a3b8;
  --text-inverse: #ffffff;

  --border-light: rgba(226, 232, 240, 0.85);
  --border-medium: #cbd5e1;
  --border-focus: rgba(5, 150, 105, 0.5);

  /* E-Commerce Partner Brands */
  --shopee: #ee4d2d;
  --shopee-gradient: linear-gradient(135deg, #ff5722 0%, #ee4d2d 100%);
  --shopee-bg: #fff1ee;
  
  --tiktok: #000000;
  --tiktok-accent: #fe2c55;
  --tiktok-gradient: linear-gradient(135deg, #1e293b 0%, #000000 100%);
  --tiktok-bg: #f3f4f6;

  --lazada: #0f146d;
  --lazada-accent: #f5146d;
  --lazada-gradient: linear-gradient(135deg, #1a239c 0%, #0f146d 100%);
  --lazada-bg: #eef0fa;

  --tiki: #1a94ff;
  --tiki-gradient: linear-gradient(135deg, #3db2ff 0%, #1a94ff 100%);
  --tiki-bg: #edf6ff;

  /* Status Colors */
  --status-pending: #d97706;
  --status-pending-bg: #fef3c7;
  --status-approved: #059669;
  --status-approved-bg: #d1fae5;
  --status-paid: #2563eb;
  --status-paid-bg: #dbeafe;
  --status-rejected: #dc2626;
  --status-rejected-bg: #fee2e2;

  /* ========================================================================= */
  /* 2. Modern Typography Pairing (Plus Jakarta Sans + Be Vietnam Pro) */
  /* ========================================================================= */
  --font-main: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Be Vietnam Pro', sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;

  /* Fluid Typography Scaling */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: clamp(1.375rem, 2vw, 1.625rem); /* 22px-26px */
  --text-3xl: clamp(1.75rem, 3vw, 2.25rem);   /* 28px-36px */
  --text-4xl: clamp(2.25rem, 4.5vw, 3.25rem); /* 36px-52px */

  /* ========================================================================= */
  /* 3. Layered Elevation, Lighting & Shadows */
  /* ========================================================================= */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 6px -1px rgba(15, 23, 42, 0.06), 0 1px 3px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -4px rgba(15, 23, 42, 0.07), 0 4px 10px -2px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 20px 35px -6px rgba(15, 23, 42, 0.09), 0 8px 16px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 28px 56px -12px rgba(15, 23, 42, 0.14);
  --shadow-glow-primary: 0 10px 28px rgba(5, 150, 105, 0.28);
  --shadow-glow-accent: 0 10px 28px rgba(234, 88, 12, 0.25);

  /* Card Surfaces & Gradients */
  --glass-bg: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(255, 255, 255, 0.8);
  --aurora-gradient: radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.12) 0px, transparent 50%),
                      radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
                      radial-gradient(at 50% 100%, rgba(234, 88, 12, 0.06) 0px, transparent 50%);

  /* Border Radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 350ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Spacing Scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Aurora Ambient Gradient Aura */
body::before {
  content: '';
  position: fixed;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 520px;
  background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.14) 0%, rgba(59, 130, 246, 0.06) 45%, transparent 75%);
  z-index: -1;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
  user-select: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* Containers */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.container-narrow {
  max-width: 880px;
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-main);
  letter-spacing: -0.03em;
  font-weight: 800;
  line-height: 1.2;
}

/* Surface Cards & Glassmorphism */
.surface-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}

.surface-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--slate-300);
}

.glass-card {
  background: var(--bg-surface-translucent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-xl);
}

/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-shopee { background: var(--shopee-bg); color: var(--shopee); }
.badge-tiktok { background: var(--tiktok-bg); color: var(--tiktok); border: 1px solid #e2e8f0; }
.badge-lazada { background: var(--lazada-bg); color: var(--lazada); }
.badge-tiki { background: var(--tiki-bg); color: var(--tiki); }
.badge-primary { background: var(--primary-100); color: var(--primary-800); }

.badge-status {
  padding: 5px 12px;
  font-size: 0.8125rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.badge-status.pending { background: var(--status-pending-bg); color: var(--status-pending); }
.badge-status.approved { background: var(--status-approved-bg); color: var(--status-approved); }
.badge-status.paid { background: var(--status-paid-bg); color: var(--status-paid); }
.badge-status.rejected { background: var(--status-rejected-bg); color: var(--status-rejected); }

/* Buttons & Touch Targets */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
  letter-spacing: -0.01em;
  min-height: 44px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  color: white;
  box-shadow: var(--shadow-glow-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(5, 150, 105, 0.38);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: white;
  color: var(--slate-700);
  border: 1.5px solid var(--slate-200);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: var(--slate-100);
  color: var(--slate-900);
  border-color: var(--slate-300);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  min-height: 38px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.0625rem;
  border-radius: var(--radius-lg);
  min-height: 52px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

.animate-fade-in {
  animation: fadeIn 0.35s var(--transition-smooth) forwards;
}
