/* ===== B2C Marketplace - Production Quality Stylesheet ===== */
/* ===== SEO-friendly, responsive, accessible design ===== */

/* --- CSS Variables / Design Tokens --- */
:root {
  --primary: #8a2be2;
  --primary-dark: #6a1b9a;
  --primary-light: #b388ff;
  --secondary: #00e5ff;
  --secondary-dark: #00b8d4;
  --accent: #ff007f;
  --accent-dark: #c51162;
  --success: #00e676;
  --warning: #ffea00;
  --danger: #ff1744;
  --info: #2979ff;

  --dark: #121212;
  --dark-secondary: #212121;
  --gray: #9e9e9e;
  --gray-light: #f5f5f5;
  --light: #fafafa;
  --white: #ffffff;

  --gradient-primary: linear-gradient(135deg, #8a2be2 0%, #b388ff 100%);
  --gradient-secondary: linear-gradient(135deg, #00e5ff 0%, #18ffff 100%);
  --gradient-accent: linear-gradient(135deg, #ff007f 0%, #ff4081 100%);
  --gradient-hero: linear-gradient(135deg, #121212 0%, #212121 50%, #121212 100%);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.2);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.25);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--dark);
  background-color: var(--light);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 700;
  color: var(--dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--dark-secondary);
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-fluid {
  width: 100%;
  padding: 0 20px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  border-color: transparent;
}

.btn-primary:hover {
  box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4);
  transform: translateY(-2px);
  color: var(--white);
}

.btn-secondary {
  background: var(--gradient-secondary);
  color: var(--dark);
  border-color: transparent;
}

.btn-secondary:hover {
  box-shadow: 0 8px 25px rgba(0, 206, 201, 0.4);
  transform: translateY(-2px);
  color: var(--dark);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-white {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}

.btn-white:hover {
  background: transparent;
  color: var(--white);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.1rem;
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-danger:hover {
  background: #d63031;
  color: var(--white);
  transform: translateY(-2px);
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-success:hover {
  color: var(--white);
  transform: translateY(-2px);
}

.btn-warning {
  background: var(--warning);
  color: var(--dark);
}

.btn-warning:hover {
  transform: translateY(-2px);
}

/* --- Header / Navigation --- */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
}

.logo:hover {
  color: var(--primary-dark);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 800;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  color: var(--dark-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 4px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  transition: var(--transition);
  border-radius: 2px;
}

/* --- Hero Section --- */
.hero {
  background: var(--gradient-hero);
  color: var(--white);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(108,92,231,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0,206,201,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  color: var(--white);
  margin-bottom: 20px;
}

.hero-content h1 span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content p {
  color: rgba(255,255,255,0.7);
  font-size: 1.15rem;
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 60px;
}

.hero-stat {
  text-align: center;
}

.hero-stat-number {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat-label {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  margin-top: 4px;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-illustration {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1;
  background: linear-gradient(135deg, rgba(108,92,231,0.2) 0%, rgba(0,206,201,0.2) 100%);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}

.hero-illustration-inner {
  position: absolute;
  inset: 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(108,92,231,0.3) 0%, rgba(0,206,201,0.3) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px;
}

.hero-illustration-inner .icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.hero-illustration-inner p {
  color: rgba(255,255,255,0.8);
  text-align: center;
  font-size: 0.95rem;
}

/* --- Section Styles --- */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  margin-bottom: 12px;
}

.section-header p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  color: var(--dark-secondary);
}

.section-bg-alt {
  background: var(--white);
}

/* --- Feature Cards --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--gray-light);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--white);
}

.feature-card h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.feature-card p {
  color: var(--dark-secondary);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* --- Creator Cards Grid --- */
.creators-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.creator-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--gray-light);
}

.creator-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.creator-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient-primary);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--white);
  font-weight: 700;
}

.creator-card h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.creator-niche {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
  display: block;
}

.creator-stats {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.creator-stat {
  text-align: center;
}

.creator-stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
}

.creator-stat-label {
  font-size: 0.75rem;
  color: var(--dark-secondary);
}

/* --- Campaign Cards --- */
.campaigns-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.campaign-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--gray-light);
}

.campaign-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.campaign-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.campaign-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.campaign-card p {
  font-size: 0.9rem;
  color: var(--dark-secondary);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.campaign-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.campaign-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--dark-secondary);
}

.campaign-budget {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

/* --- Badges --- */
.badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-primary {
  background: rgba(108,92,231,0.1);
  color: var(--primary);
}

.badge-success {
  background: rgba(0,184,148,0.1);
  color: var(--success);
}

.badge-warning {
  background: rgba(253,203,110,0.2);
  color: #B7950B;
}

.badge-danger {
  background: rgba(225,112,85,0.1);
  color: var(--danger);
}

.badge-info {
  background: rgba(116,185,255,0.15);
  color: #0984E3;
}

.badge-secondary {
  background: rgba(99,110,114,0.1);
  color: var(--dark-secondary);
}

/* --- How It Works --- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  counter-reset: step;
}

.step-card {
  text-align: center;
  padding: 32px 20px;
  position: relative;
}

.step-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  margin: 0 auto 20px;
  position: relative;
  z-index: 1;
}

.step-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 0.9rem;
  color: var(--dark-secondary);
}

/* --- CTA Section --- */
.cta-section {
  background: var(--gradient-hero);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(108,92,231,0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(0,206,201,0.1) 0%, transparent 50%);
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-content h2 {
  color: var(--white);
  margin-bottom: 16px;
}

.cta-content p {
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Footer --- */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo {
  color: var(--white);
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  max-width: 300px;
}

.footer h4 {
  color: var(--white);
  margin-bottom: 20px;
  font-size: 1rem;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary);
  color: var(--white);
}

/* --- Auth Pages --- */
.auth-page {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--light);
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 480px;
  border: 1px solid var(--gray-light);
}

.auth-card h1 {
  font-size: 1.75rem;
  margin-bottom: 8px;
  text-align: center;
}

.auth-card > p {
  text-align: center;
  color: var(--dark-secondary);
  margin-bottom: 32px;
}

/* --- Form Styles --- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--dark);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  background: var(--white);
  color: var(--dark);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(108,92,231,0.1);
}

.form-input.error {
  border-color: var(--danger);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.form-check label {
  font-size: 0.9rem;
  color: var(--dark-secondary);
}

.form-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--dark-secondary);
  font-size: 0.9rem;
}

.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-light);
}

/* --- Alert / Flash Messages --- */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: rgba(0,184,148,0.1);
  color: var(--success);
  border: 1px solid rgba(0,184,148,0.2);
}

.alert-danger {
  background: rgba(225,112,85,0.1);
  color: var(--danger);
  border: 1px solid rgba(225,112,85,0.2);
}

.alert-warning {
  background: rgba(253,203,110,0.15);
  color: #B7950B;
  border: 1px solid rgba(253,203,110,0.25);
}

.alert-info {
  background: rgba(116,185,255,0.1);
  color: #0984E3;
  border: 1px solid rgba(116,185,255,0.2);
}

/* ================================================ */
/* ============ DASHBOARD / ADMIN PANEL =========== */
/* ================================================ */

.dashboard-layout {
  display: flex;
  min-height: calc(100vh - 72px);
}

/* --- Sidebar --- */
.sidebar {
  width: 260px;
  background: var(--dark);
  color: var(--white);
  flex-shrink: 0;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  max-height: calc(100vh - 72px);
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

.sidebar-user {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.sidebar-user-info {
  overflow: hidden;
}

.sidebar-user-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  text-transform: capitalize;
}

.sidebar-nav {
  padding: 12px 0;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
  border-left: 3px solid transparent;
}

.sidebar-nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--white);
}

.sidebar-nav-item.active {
  background: rgba(108,92,231,0.15);
  color: var(--primary-light);
  border-left-color: var(--primary);
}

.sidebar-nav-item .icon {
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
}

.sidebar-section-title {
  padding: 16px 20px 8px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.3);
  font-weight: 600;
}

/* --- Dashboard Main Content --- */
.dashboard-main {
  flex: 1;
  padding: 32px;
  background: var(--light);
  overflow-y: auto;
  min-width: 0;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.dashboard-header h1 {
  font-size: 1.75rem;
}

.dashboard-header-actions {
  display: flex;
  gap: 12px;
}

/* --- Dashboard Stats Cards --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-light);
  transition: var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.stat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.stat-card-icon.primary {
  background: rgba(108,92,231,0.1);
  color: var(--primary);
}

.stat-card-icon.success {
  background: rgba(0,184,148,0.1);
  color: var(--success);
}

.stat-card-icon.warning {
  background: rgba(253,203,110,0.15);
  color: #B7950B;
}

.stat-card-icon.info {
  background: rgba(116,185,255,0.15);
  color: #0984E3;
}

.stat-card-icon.danger {
  background: rgba(225,112,85,0.1);
  color: var(--danger);
}

.stat-card-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
}

.stat-card-label {
  font-size: 0.85rem;
  color: var(--dark-secondary);
  font-weight: 500;
}

.stat-card-change {
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 8px;
}

.stat-card-change.positive { color: var(--success); }
.stat-card-change.negative { color: var(--danger); }

/* --- Dashboard Cards --- */
.dashboard-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-light);
  margin-bottom: 24px;
  overflow: hidden;
}

.dashboard-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-card-header h3 {
  font-size: 1.1rem;
}

.dashboard-card-body {
  padding: 24px;
}

.dashboard-card-body:only-child {
  padding: 24px;
}

/* --- Table Styles --- */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--dark-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--gray-light);
  background: var(--light);
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-light);
  vertical-align: middle;
}

.table tr:hover td {
  background: rgba(108,92,231,0.02);
}

.table-actions {
  display: flex;
  gap: 8px;
}

.table-actions .btn {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* --- User Avatar in table --- */
.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.user-avatar-sm.role-brand {
  background: var(--gradient-secondary);
}

.user-avatar-sm.role-admin,
.user-avatar-sm.role-super_admin,
.user-avatar-sm.role-moderator,
.user-avatar-sm.role-editor {
  background: var(--danger);
}

.user-cell-info .user-name {
  font-weight: 600;
  color: var(--dark);
  display: block;
}

.user-cell-info .user-email {
  font-size: 0.8rem;
  color: var(--dark-secondary);
}

/* --- Search / Filter Bar --- */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-bar .form-input,
.filter-bar .form-select {
  width: auto;
  min-width: 200px;
}

.search-input {
  position: relative;
}

.search-input .form-input {
  padding-left: 40px;
}

.search-input .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dark-secondary);
}

/* --- Profile Page --- */
.profile-header-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-light);
  margin-bottom: 24px;
}

.profile-cover {
  height: 200px;
  background: var(--gradient-primary);
}

.profile-info {
  padding: 0 32px 32px;
  margin-top: -60px;
  display: flex;
  align-items: flex-end;
  gap: 24px;
}

.profile-avatar-lg {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--gradient-primary);
  border: 4px solid var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--white);
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}

.profile-details {
  padding-bottom: 8px;
}

.profile-details h2 {
  font-size: 1.5rem;
  margin-bottom: 2px;
}

.profile-details p {
  color: var(--dark-secondary);
  font-size: 0.95rem;
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--dark-secondary);
  margin-bottom: 20px;
}

/* --- Modal / Overlay --- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-size: 1.25rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark-secondary);
  padding: 4px;
  line-height: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-light);
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.pagination-item {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-light);
  color: var(--dark-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  background: var(--white);
}

.pagination-item:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination-item.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* --- Loading Spinner --- */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--gray-light);
  margin-bottom: 24px;
}

.tab {
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dark-secondary);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  font-family: var(--font-sans);
}

.tab:hover {
  color: var(--primary);
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* --- Toggle Switch --- */
.toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--gray);
  border-radius: 26px;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: var(--white);
  border-radius: 50%;
  transition: var(--transition);
}

.toggle input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
  min-width: 300px;
}

.toast-success {
  background: var(--success);
  color: var(--white);
}

.toast-error {
  background: var(--danger);
  color: var(--white);
}

.toast-info {
  background: var(--info);
  color: var(--white);
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content p {
    margin: 0 auto 32px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image {
    display: none;
  }

  .creators-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .campaigns-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--gray-light);
  }

  .nav.open {
    display: flex;
  }

  .nav-actions {
    flex-direction: column;
    width: 100%;
  }

  .nav-actions .btn {
    width: 100%;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    padding: 60px 0 40px;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 40px;
  }

  .creators-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .campaigns-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .dashboard-layout.sidebar-open .sidebar {
    display: block;
    position: fixed;
    z-index: 1500;
    top: 72px;
    left: 0;
    width: 260px;
    height: calc(100vh - 72px);
    overflow-x: hidden;
    overflow-y: auto;
  }

  .dashboard-main {
    padding: 20px;
  }

  .dashboard-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .auth-card {
    padding: 32px 24px;
  }

  .profile-info {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .filter-bar .form-input,
  .filter-bar .form-select {
    width: 100%;
    min-width: 100%;
  }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  .creators-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* --- Print Styles --- */
@media print {
  .header,
  .sidebar,
  .footer,
  .back-to-top,
  .nav-actions {
    display: none !important;
  }

  .dashboard-main {
    padding: 0;
  }

  .dashboard-layout {
    display: block;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }
}

/* --- Accessibility: Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ================================================ */
/* ============ ADDED AI ENHANCEMENTS  =========== */
/* ================================================ */

/* Glassmorphism */
.glassmorphism {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.glassmorphism-dark {
  background: rgba(18, 18, 18, 0.7);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
}

/* Admin Sidebar Dark Mode Details */
.sidebar {
  background: linear-gradient(180deg, var(--dark) 0%, #0a0a0a 100%);
  border-right: 1px solid rgba(255,255,255,0.05);
}
.sidebar-user {
  background: rgba(255,255,255,0.03);
}
.sidebar-nav-item:hover {
  background: linear-gradient(90deg, rgba(138,43,226,0.1) 0%, transparent 100%);
  color: var(--primary-light);
  padding-left: 24px;
}
.sidebar-nav-item.active {
  background: linear-gradient(90deg, rgba(138,43,226,0.2) 0%, transparent 100%);
  border-left-color: var(--primary-light);
  box-shadow: inset 3px 0 0 var(--primary-light);
}

/* Stat Card Micro-Animations */
.stat-card {
  position: relative;
  overflow: hidden;
  border: none;
  background: var(--white);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: var(--transition);
}
.stat-card:hover::before {
  opacity: 1;
}
.stat-card:hover .stat-card-icon {
  transform: scale(1.1) rotate(5deg);
}
.stat-card-icon {
  transition: var(--transition);
}

/* Modern Tables */
.table th {
  background: linear-gradient(to right, var(--light), #f0f0f0);
  font-weight: 700;
  color: var(--dark);
}
.table tr {
  transition: var(--transition);
}
.table tr:hover {
  background: rgba(138,43,226,0.03) !important;
}

/* Action Buttons */
.action-btn {
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--light);
  color: var(--dark-secondary);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.action-btn:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}
.action-btn.delete:hover {
  background: var(--danger);
}

/* Gradient Texts */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Form Labels color */
.form-label {
  color: #000000;
}

#addAdminModal .form-label {
  color: #ffffff;
}

/* Custom Confirmation Popup Modal */
.custom-confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(18, 18, 18, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-confirm-overlay.show {
  opacity: 1;
}

.custom-confirm-modal {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  max-width: 440px;
  width: 90%;
  transform: scale(0.9);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(138, 43, 226, 0.1);
  text-align: center;
}

.custom-confirm-overlay.show .custom-confirm-modal {
  transform: scale(1);
}

.custom-confirm-icon {
  width: 64px;
  height: 64px;
  background: rgba(255, 23, 68, 0.1);
  color: var(--danger);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
  margin: 0 auto 20px auto;
}

.custom-confirm-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
}

.custom-confirm-message {
  color: #555555;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 28px;
}

.custom-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.custom-confirm-btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.custom-confirm-btn.cancel {
  background: var(--gray-light);
  color: var(--dark-secondary);
}

.custom-confirm-btn.cancel:hover {
  background: #e2e8f0;
}

.custom-confirm-btn.confirm {
  background: var(--danger);
  color: var(--white);
}

.custom-confirm-btn.confirm:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

