/* ═══════════════════════════════════════════════════════════════
   INFLUENCERS NEXUS - MIDNIGHT LUXE THEME v3
   Fixed Version - All Issues Resolved
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  --black: #000; --black-1: #030304; --black-2: #07070a; --black-3: #0c0c10;
  --black-4: #121218; --black-5: #1a1a23; --black-6: #24242f;
  
  --amber: #F59E0B; --amber-400: #FBBF24; --amber-500: #F59E0B; --amber-600: #D97706;
  --amber-glow: rgba(245,158,11,0.15);
  
  --violet: #8B5CF6; --violet-400: #A78BFA; --violet-500: #8B5CF6; --violet-600: #7C3AED;
  --violet-glow: rgba(139,92,246,0.15);
  
  --teal: #14B8A6; --teal-400: #2DD4BF; --teal-500: #14B8A6; --teal-600: #0D9488;
  --teal-glow: rgba(20,184,166,0.15);
  
  --coral: #F472B6; --coral-400: #F472B6; --coral-500: #EC4899; --coral-600: #DB2777;
  --coral-glow: rgba(244,114,182,0.15);
  
  --primary: var(--amber-500); --primary-light: var(--amber-400); --primary-dark: var(--amber-600);
  --primary-glow: var(--amber-glow); --primary-soft: rgba(245,158,11,0.08);
  --secondary: var(--violet-500); --secondary-light: var(--violet-400); --secondary-glow: var(--violet-glow);
  --accent: var(--teal-500); --accent-light: var(--teal-400); --accent-glow: var(--teal-glow);
  
  --success: #10B981; --success-light: #34D399; --success-bg: rgba(16,185,129,0.1); --success-border: rgba(16,185,129,0.25);
  --warning: var(--amber-500); --warning-light: var(--amber-400); --warning-bg: rgba(245,158,11,0.1); --warning-border: rgba(245,158,11,0.25);
  --error: #EF4444; --error-light: #F87171; --error-dark: #DC2626; --error-bg: rgba(239,68,68,0.1); --error-border: rgba(239,68,68,0.25);
  --info: var(--violet-500); --info-light: var(--violet-400); --info-bg: rgba(139,92,246,0.1); --info-border: rgba(139,92,246,0.25);
  
  --bg-body: var(--black-1); --bg-card: var(--black-3); --bg-card-solid: var(--black-3);
  --bg-card-hover: var(--black-4); --bg-elevated: var(--black-4); --bg-input: var(--black-2);
  --bg-tertiary: var(--black-5); --bg-hover: rgba(245,158,11,0.08);
  
  --text-white: #FFF; --text-primary: #F4F4F5; --text-secondary: #A1A1AA; --text-muted: #71717A;
  
  --border: rgba(255,255,255,0.08); --border-hover: rgba(245,158,11,0.4); --glass-border: rgba(255,255,255,0.1);
  
  --gradient-primary: linear-gradient(135deg, var(--amber-600), var(--amber-500), var(--amber-400));
  --gradient-secondary: linear-gradient(135deg, var(--violet-600), var(--violet-500), var(--violet-400));
  --gradient-accent: linear-gradient(135deg, var(--teal-600), var(--teal-500), var(--teal-400));
  --gradient-coral: linear-gradient(135deg, var(--coral-600), var(--coral-500), var(--coral-400));
  
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.5); --shadow-md: 0 4px 12px rgba(0,0,0,0.6); 
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.7); --shadow-xl: 0 20px 50px rgba(0,0,0,0.8);
  --shadow-glow-amber: 0 0 30px rgba(245,158,11,0.3); --shadow-glow-violet: 0 0 30px rgba(139,92,246,0.3);
  
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px; --radius-xl: 20px; --radius-2xl: 28px; --radius-full: 9999px;
  --transition: 250ms cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(at 40% 20%, var(--violet-glow) 0, transparent 50%),
              radial-gradient(at 80% 0%, var(--amber-glow) 0, transparent 50%),
              radial-gradient(at 0% 50%, var(--teal-glow) 0, transparent 50%);
  opacity: 0.5;
  pointer-events: none;
  z-index: -1;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
::selection { background: var(--primary); color: var(--black); }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--black-2); }
::-webkit-scrollbar-thumb { background: var(--black-5); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.2; color: var(--text-white); }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }
p { color: var(--text-secondary); margin-bottom: 1em; }

.text-gradient, .gradient-text { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.text-white { color: var(--text-white) !important; }
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-error { color: var(--error) !important; }
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.25rem !important; } .mb-2 { margin-bottom: 0.5rem !important; } .mb-3 { margin-bottom: 1rem !important; } .mb-4 { margin-bottom: 1.5rem !important; } .mb-5 { margin-bottom: 2rem !important; }
.mt-1 { margin-top: 0.25rem !important; } .mt-2 { margin-top: 0.5rem !important; } .mt-3 { margin-top: 1rem !important; } .mt-4 { margin-top: 1.5rem !important; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; width: 100%; }
.section { padding: 5rem 0; }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* NAVBAR */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 1rem 0; transition: var(--transition); }
.navbar.scrolled { padding: 0.75rem 0; background: rgba(3,3,4,0.95); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
.nav-container { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 0.5rem; font-size: 1.375rem; font-weight: 700; }
.logo i { color: var(--primary); font-size: 1.5rem; }
.logo span { color: var(--text-white); }
.logo strong { color: var(--primary); }
.nav-menu { display: flex; align-items: center; gap: 0.25rem; }
.nav-link { padding: 0.625rem 1rem; color: var(--text-secondary); font-weight: 500; font-size: 0.9rem; border-radius: var(--radius-lg); transition: var(--transition); position: relative; }
.nav-link:hover { color: var(--text-white); background: var(--bg-hover); }
.nav-link.active { color: var(--primary); background: var(--primary-soft); }
.nav-right { display: flex; align-items: center; gap: 0.75rem; }
.nav-auth { display: flex; gap: 0.625rem; }
.nav-user { display: flex; align-items: center; gap: 0.75rem; }
.nav-icon { position: relative; width: 2.5rem; height: 2.5rem; display: flex; align-items: center; justify-content: center; background: var(--bg-elevated); border-radius: var(--radius-lg); color: var(--text-secondary); transition: var(--transition); border: 1px solid var(--border); }
.nav-icon:hover { color: var(--primary); border-color: var(--primary); background: var(--amber-glow); }
.nav-icon .badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; background: var(--gradient-secondary); color: white; font-size: 0.65rem; font-weight: 700; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg-body); }
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 0.625rem; padding: 0.25rem 0.875rem 0.25rem 0.25rem; background: var(--bg-elevated); border-radius: var(--radius-full); color: var(--text-secondary); transition: var(--transition); border: 1px solid var(--border); }
.user-btn:hover { border-color: var(--primary); background: var(--amber-glow); }
.user-btn img { width: 2rem; height: 2rem; border-radius: var(--radius-full); object-fit: cover; }
.user-btn span { font-weight: 600; color: var(--text-white); font-size: 0.875rem; }
.user-dropdown { position: absolute; top: calc(100% + 0.75rem); right: 0; min-width: 220px; background: var(--bg-card); backdrop-filter: blur(20px); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 0.5rem; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: var(--transition); box-shadow: var(--shadow-xl); z-index: 10001; }
.user-menu:hover .user-dropdown, .user-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-header { padding: 0.875rem 1rem; border-bottom: 1px solid var(--border); margin-bottom: 0.5rem; }
.dropdown-name { display: block; font-weight: 600; color: var(--text-white); }
.dropdown-role { font-size: 0.75rem; color: var(--primary); text-transform: uppercase; letter-spacing: 0.05em; }
.user-dropdown a { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; color: var(--text-secondary); border-radius: var(--radius-md); transition: var(--transition); font-weight: 500; }
.user-dropdown a:hover { background: var(--amber-glow); color: var(--text-white); }
.user-dropdown a i { width: 1.125rem; color: var(--primary); }
.dropdown-divider { height: 1px; background: var(--border); margin: 0.5rem 0; }
.menu-toggle { display: none; width: 2.5rem; height: 2.5rem; align-items: center; justify-content: center; background: var(--bg-elevated); border-radius: var(--radius-md); color: var(--text-white); border: 1px solid var(--border); z-index: 1001; }

/* Mobile Auth Buttons in Nav Menu - Hidden on desktop */
.nav-auth-mobile {
  display: none !important;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  align-items: center;
}

/* Better touch targets for mobile */
@media (max-width: 768px) {
  a, button, .btn, .nav-link, [role="button"] {
    min-height: 44px;
    min-width: 44px;
  }
  
  .nav-link {
    padding: 12px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  /* Prevent text selection on touch */
  .nav-menu, .user-dropdown {
    -webkit-user-select: none;
    user-select: none;
  }
  
  /* Better tap highlighting */
  .nav-link:active, .btn:active {
    opacity: 0.7;
    transform: scale(0.98);
  }
}

/* Hero Pattern Background */
.hero-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 25% 25%, rgba(201, 162, 39, 0.1) 0%, transparent 50%),
                    radial-gradient(circle at 75% 75%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
  opacity: 0.6;
  pointer-events: none;
}

/* Hero Stats Grid */
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .hero-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
}

@media (max-width: 400px) {
  .hero-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  
  .hero-stats-grid > div {
    padding: 16px 10px !important;
  }
  
  .hero-stats-grid h3 {
    font-size: 1.25rem !important;
  }
  
  .hero-stats-grid p {
    font-size: 0.75rem !important;
  }
}

/* BUTTONS - FIXED HOVER STATES */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.75rem 1.5rem; font-weight: 600; font-size: 0.875rem; border-radius: var(--radius-lg); transition: var(--transition); cursor: pointer; border: none; white-space: nowrap; }

/* Primary Button - BLACK text always */
.btn-primary { background: var(--gradient-primary); color: #000 !important; box-shadow: 0 4px 15px rgba(245,158,11,0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow-amber); color: #000 !important; }
.btn-primary i { color: #000 !important; }

/* Secondary Button */
.btn-secondary { background: var(--bg-elevated); color: var(--text-white); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--secondary); background: var(--violet-glow); color: var(--violet-400); }

/* Outline Button - Fixed hover */
.btn-outline { background: transparent; color: var(--text-white); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); background: var(--amber-glow); color: var(--text-white); }

/* Ghost Button */
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--primary); background: var(--amber-glow); }

/* Accent Button */
.btn-accent { background: var(--gradient-accent); color: #000 !important; box-shadow: 0 4px 15px rgba(20,184,166,0.3); }
.btn-accent:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow-teal); color: #000 !important; }

/* Coral Button */
.btn-coral { background: var(--gradient-coral); color: #000 !important; box-shadow: 0 4px 15px rgba(244,114,182,0.3); }
.btn-coral:hover { transform: translateY(-2px); color: #000 !important; }

/* Danger Button */
.btn-danger { background: linear-gradient(135deg, var(--error-dark), var(--error), var(--error-light)); color: white !important; }
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 0 25px rgba(239,68,68,0.4); color: white !important; }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }
.btn-xl { padding: 1.125rem 2.5rem; font-size: 1.0625rem; border-radius: var(--radius-xl); }
.btn-block { width: 100%; }
.btn-icon { width: 2.75rem; height: 2.75rem; padding: 0; }

/* CARDS */
.card { background: var(--bg-card); border-radius: var(--radius-xl); padding: 1.5rem; border: 1px solid var(--border); transition: var(--transition); }
.card:hover { border-color: var(--border-hover); }
.card-header { padding-bottom: 1rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.card-header h3 { margin: 0; font-size: 1.125rem; }
.card-body { padding: 0; }
.card-footer { padding-top: 1rem; border-top: 1px solid var(--border); margin-top: 1rem; }

/* ═══════════════════════════════════════════════════════════════
   PROFILE CARDS - Influencer & Brand Cards (3-4 per row)
   ═══════════════════════════════════════════════════════════════ */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1200px) {
  .profile-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .profile-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .profile-grid { grid-template-columns: 1fr; }
}

.profile-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  width: 100%;
}

.profile-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(245,158,11,0.15);
}

.profile-card-cover {
  height: 70px;
  background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(139,92,246,0.15), rgba(20,184,166,0.1));
  position: relative;
}

.profile-card .cover {
  height: 70px;
  background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(139,92,246,0.15), rgba(20,184,166,0.1));
  position: relative;
}

.profile-card-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 3px solid var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -35px auto 0;
  position: relative;
  z-index: 10;
  overflow: hidden;
  color: var(--primary);
  font-size: 1.75rem;
}

.profile-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card .avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 3px solid var(--bg-card);
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  object-fit: cover;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.75rem;
  overflow: hidden;
}

.profile-card-body {
  padding: 0.875rem 1rem 0.625rem;
  text-align: center;
  flex: 1;
}

.profile-card .info {
  padding: 2.5rem 1rem 0.75rem;
  text-align: center;
}

.profile-card-body h4, .profile-card .name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 0.125rem;
}

.profile-card-body .handle {
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.profile-card .role {
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 500;
}

.profile-card-body .niche, .profile-card .niche {
  display: inline-block;
  background: var(--primary-glow);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.profile-card-body .bio, .profile-card .bio {
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.4;
  margin: 0.375rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.profile-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  padding: 0.75rem 0.75rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.profile-card .stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.profile-card-stats .stat-value, .profile-card .stat-value {
  display: block;
  font-weight: 700;
  color: var(--text-white);
  font-size: 0.9rem;
}

.profile-card-stats .stat-label, .profile-card .stat-label {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.profile-card-footer {
  display: flex;
  gap: 0.5rem;
  padding: 0 1rem 1rem;
}

.profile-card .actions {
  display: flex;
  gap: 0.5rem;
  padding: 0 1rem 1rem;
}

.profile-card-footer .btn, .profile-card .actions .btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
}

/* Brand Card */
.brand-card .profile-card-cover, .brand-cover {
  background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(244,114,182,0.15), rgba(20,184,166,0.1));
}

/* Grid for profile cards */
.profile-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  justify-items: center;
}

/* FORMS */
.form-group { margin-bottom: 1.25rem; position: relative; }
.form-label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--text-primary); font-size: 0.875rem; }
.form-control { width: 100%; padding: 0.875rem 1rem; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text-primary); font-size: 0.9375rem; transition: var(--transition); }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--amber-glow); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23A1A1AA' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
.form-control.is-valid { border-color: var(--success); }
.form-control.is-invalid { border-color: var(--error); }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.375rem; }
.form-error { font-size: 0.8rem; color: var(--error); margin-top: 0.375rem; display: none; }
.form-error.show { display: flex; align-items: center; gap: 0.375rem; }
.form-section { background: var(--bg-elevated); border-radius: var(--radius-xl); padding: 1.5rem; margin-bottom: 1.5rem; border: 1px solid var(--border); }
.form-section h4 { margin-bottom: 1.25rem; display: flex; align-items: center; gap: 0.625rem; }
.form-section h4 i { color: var(--primary); }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.checkbox-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.625rem 1rem; background: var(--bg-input); border-radius: var(--radius-lg); cursor: pointer; font-size: 0.875rem; color: var(--text-secondary); border: 1px solid var(--border); transition: var(--transition); }
.checkbox-item:hover { border-color: var(--primary); color: var(--text-white); }
.checkbox-item input[type="checkbox"] { accent-color: var(--primary); width: 1rem; height: 1rem; }

/* BADGES */
.badge { display: inline-flex; align-items: center; padding: 0.375rem 0.75rem; font-size: 0.75rem; font-weight: 600; border-radius: var(--radius-full); }
.badge-primary { background: var(--amber-glow); color: var(--amber-400); border: 1px solid rgba(245,158,11,0.3); }
.badge-secondary { background: var(--violet-glow); color: var(--violet-400); border: 1px solid rgba(139,92,246,0.3); }
.badge-success { background: var(--success-bg); color: var(--success-light); border: 1px solid var(--success-border); }
.badge-warning { background: var(--warning-bg); color: var(--warning-light); border: 1px solid var(--warning-border); }
.badge-error { background: var(--error-bg); color: var(--error-light); border: 1px solid var(--error-border); }
.badge-info { background: var(--info-bg); color: var(--info-light); border: 1px solid var(--info-border); }

/* ALERTS */
.alert { padding: 1rem 1.25rem; border-radius: var(--radius-lg); margin-bottom: 1.25rem; display: flex; align-items: center; gap: 0.75rem; }
.alert-success { background: var(--success-bg); color: var(--success-light); border: 1px solid var(--success-border); }
.alert-warning { background: var(--warning-bg); color: var(--warning-light); border: 1px solid var(--warning-border); }
.alert-error { background: var(--error-bg); color: var(--error-light); border: 1px solid var(--error-border); }
.alert-info { background: var(--info-bg); color: var(--info-light); border: 1px solid var(--info-border); }

/* PAGE HEADER */
.page-header { padding: 8rem 0 3rem; text-align: center; position: relative; }
.page-header::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 50% at 50% 0%, var(--amber-glow) 0%, transparent 70%); pointer-events: none; }
.page-header h1 { margin-bottom: 1rem; position: relative; }
.page-header p { font-size: 1.125rem; max-width: 600px; margin: 0 auto; position: relative; }

/* HERO */
.hero { min-height: 100vh; display: flex; align-items: center; padding: 7rem 0 4rem; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 50% 80% at 70% 30%, rgba(245,158,11,0.08) 0%, transparent 60%), radial-gradient(ellipse 40% 60% at 20% 70%, rgba(139,92,246,0.06) 0%, transparent 50%); pointer-events: none; }
.hero-content { position: relative; max-width: 680px; }
.hero-badge { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: var(--amber-glow); border: 1px solid rgba(245,158,11,0.3); border-radius: var(--radius-full); font-size: 0.8rem; font-weight: 600; color: var(--amber-400); margin-bottom: 1.5rem; }
.hero h1 { margin-bottom: 1.5rem; }
.hero p { font-size: 1.125rem; color: var(--text-secondary); margin-bottom: 2rem; line-height: 1.7; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 2.5rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.hero-stat .value { font-size: 2rem; font-weight: 700; color: var(--primary); }
.hero-stat .label { font-size: 0.875rem; color: var(--text-muted); }

/* CAMPAIGN CARDS */
.campaign-card { background: var(--bg-card); border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--border); transition: var(--transition); }
.campaign-card:hover { transform: translateY(-4px); border-color: var(--border-hover); box-shadow: var(--shadow-lg); }
.campaign-card .image { height: 160px; background: linear-gradient(135deg, var(--violet-glow), var(--amber-glow)); position: relative; }
.campaign-card .image img { width: 100%; height: 100%; object-fit: cover; }
.campaign-card .status { position: absolute; top: 0.75rem; right: 0.75rem; }
.campaign-card .content { padding: 1.25rem; }
.campaign-card .title { font-size: 1.0625rem; font-weight: 600; color: var(--text-white); margin-bottom: 0.5rem; }
.campaign-card .brand { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.campaign-card .brand img { width: 1.25rem; height: 1.25rem; border-radius: var(--radius-full); }
.campaign-card .brand span { color: var(--text-secondary); font-size: 0.8rem; }
.campaign-card .desc { color: var(--text-secondary); font-size: 0.875rem; margin-bottom: 1rem; line-height: 1.5; }
.campaign-card .meta { display: flex; flex-wrap: wrap; gap: 0.75rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.campaign-card .meta-item { display: flex; align-items: center; gap: 0.375rem; font-size: 0.8rem; color: var(--text-muted); }
.campaign-card .meta-item i { color: var(--primary); }
.campaign-card .budget { font-weight: 600; color: var(--success); }

/* STAT CARDS */
.stat-card { background: var(--bg-card); border-radius: var(--radius-xl); padding: 1.5rem; border: 1px solid var(--border); position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--gradient-primary); }
.stat-card.violet::before { background: var(--gradient-secondary); }
.stat-card.teal::before { background: var(--gradient-accent); }
.stat-card.coral::before { background: var(--gradient-coral); }
.stat-card .icon { width: 3rem; height: 3rem; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; margin-bottom: 1rem; background: var(--amber-glow); color: var(--primary); }
.stat-card.violet .icon { background: var(--violet-glow); color: var(--violet-400); }
.stat-card.teal .icon { background: var(--teal-glow); color: var(--teal-400); }
.stat-card.coral .icon { background: var(--coral-glow); color: var(--coral-400); }
.stat-card .value { font-size: 1.75rem; font-weight: 700; color: var(--text-white); }
.stat-card .label { color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card .trend { display: flex; align-items: center; gap: 0.25rem; margin-top: 0.75rem; font-size: 0.8rem; }
.stat-card .trend.up { color: var(--success); }
.stat-card .trend.down { color: var(--error); }

/* PRICING CARDS */
.pricing-card { background: var(--bg-card); border-radius: var(--radius-2xl); padding: 2rem; border: 1px solid var(--border); transition: var(--transition); position: relative; }
.pricing-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--gradient-secondary); border-radius: var(--radius-2xl) var(--radius-2xl) 0 0; opacity: 0; transition: var(--transition); }
.pricing-card:hover::before, .pricing-card.featured::before { opacity: 1; }
.pricing-card.featured { border-color: var(--secondary); box-shadow: var(--shadow-glow-violet); }
.pricing-card.featured::before { background: var(--gradient-primary); }
.pricing-card .plan-name { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }
.pricing-card .plan-price { font-size: 2.5rem; font-weight: 700; color: var(--primary); margin-bottom: 0.5rem; }
.pricing-card .plan-price span { font-size: 0.9rem; color: var(--text-muted); font-weight: 400; }
.pricing-card .plan-desc { color: var(--text-secondary); font-size: 0.875rem; margin-bottom: 1.5rem; }
.pricing-card .features { margin-bottom: 1.5rem; }
.pricing-card .feature { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0; color: var(--text-secondary); font-size: 0.875rem; }
.pricing-card .feature i { color: var(--success); width: 1.125rem; }
.pricing-card .feature.disabled { color: var(--text-muted); text-decoration: line-through; }
.pricing-card .feature.disabled i { color: var(--text-muted); }

/* TABLES */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 0.875rem 1rem; background: var(--bg-elevated); color: var(--primary); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.table td { padding: 0.875rem 1rem; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.table tr:hover td { background: var(--bg-card-hover); }
.table-container { overflow-x: auto; }

/* ADMIN TABLE - Suspend Button Fix */
.suspend-inf-btn, .suspend-brand-btn, 
.table .btn-danger,
button[class*="suspend"] {
  background: linear-gradient(135deg, #b91c1c, #dc2626, #ef4444) !important;
  border: 1px solid #ef4444 !important;
  color: white !important;
  padding: 0.5rem 1rem !important;
  opacity: 1 !important;
}

.suspend-inf-btn:hover, .suspend-brand-btn:hover {
  box-shadow: 0 0 20px rgba(239,68,68,0.5) !important;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════
   CHAT / MESSAGES - Golden Icons
   ═══════════════════════════════════════════════════════════════ */
.chat-container { display: grid; grid-template-columns: 300px 1fr; height: calc(100vh - 70px); position: fixed; top: 70px; left: 0; right: 0; bottom: 0; background: var(--bg-body); }
.chat-sidebar { background: var(--bg-card); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; }
.chat-sidebar-header { padding: 1.25rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.chat-sidebar-header h3 { font-size: 1rem; margin: 0; }
.chat-list { flex: 1; overflow-y: auto; }
.chat-item { display: flex; align-items: center; gap: 0.875rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); cursor: pointer; transition: var(--transition); }
.chat-item:hover { background: var(--bg-elevated); }
.chat-item.active { background: var(--amber-glow); border-left: 3px solid var(--primary); }
.chat-item.unread { background: rgba(245,158,11,0.05); }

/* Chat Avatar - Golden */
.chat-item img, .chat-header img {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--amber-glow);
  border: 2px solid var(--primary);
}

.chat-item .fa-user, .chat-header .fa-user,
.chat-item i, .chat-header i {
  color: var(--primary) !important;
}

/* Default avatar placeholder in chat */
.chat-item > div:first-child,
.chat-header > div:first-child {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-full);
  background: var(--amber-glow);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.chat-item-info { flex: 1; min-width: 0; }
.chat-item-info h4 { font-size: 0.9rem; margin-bottom: 0.125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item-info p { color: var(--text-muted); font-size: 0.8rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item-time { font-size: 0.7rem; color: var(--text-muted); }
.chat-item-badge { background: var(--gradient-primary); color: #000; font-size: 0.65rem; padding: 2px 6px; border-radius: var(--radius-full); font-weight: 700; }
.chat-main { display: flex; flex-direction: column; overflow: hidden; }
.chat-header { padding: 1rem 1.5rem; background: var(--bg-card); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 0.875rem; flex-shrink: 0; }
.chat-header img { width: 2.5rem; height: 2.5rem; border-radius: var(--radius-full); }
.chat-header h4 { font-size: 0.9375rem; margin-bottom: 0; }
.chat-header span { font-size: 0.8rem; color: var(--text-muted); }
.chat-toggle-btn { display: none; width: 2.25rem; height: 2.25rem; align-items: center; justify-content: center; background: var(--bg-elevated); border-radius: var(--radius-md); color: var(--text-secondary); border: 1px solid var(--border); margin-right: 0.5rem; cursor: pointer; flex-shrink: 0; }
.mobile-chat-toggle { display: none; }
.chat-messages { flex: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.message { max-width: 70%; padding: 0.875rem 1rem; border-radius: var(--radius-lg); font-size: 0.9rem; line-height: 1.5; }
.message-sent { align-self: flex-end; background: var(--gradient-primary); color: #000; border-bottom-right-radius: 4px; }
.message-received { align-self: flex-start; background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.message-content { word-wrap: break-word; }
.message-time { font-size: 0.65rem; opacity: 0.7; margin-top: 0.375rem; text-align: right; }
.chat-input { padding: 1rem 1.5rem; background: var(--bg-card); border-top: 1px solid var(--border); display: flex; gap: 0.875rem; flex-shrink: 0; }
.chat-input textarea { flex: 1; padding: 0.875rem 1rem; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text-primary); resize: none; font-size: 0.9rem; }
.chat-input textarea:focus { outline: none; border-color: var(--primary); }
.chat-input .btn { height: 3rem; width: 3rem; padding: 0; }
body.messages-page .footer { display: none; }

/* FOOTER */
.footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 4rem 0 2rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-about .logo { margin-bottom: 1rem; }
.footer-about p { font-size: 0.9rem; margin: 1rem 0; }
.social-links { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.social-links a { width: 2.5rem; height: 2.5rem; background: var(--bg-elevated); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: var(--transition); border: 1px solid var(--border); }
.social-links a:hover { background: var(--amber-glow); color: var(--primary); border-color: var(--primary); transform: translateY(-2px); }
.footer-links h4, .footer-contact h4 { color: var(--text-white); margin-bottom: 1.25rem; font-size: 0.9375rem; position: relative; padding-bottom: 0.75rem; }
.footer-links h4::after, .footer-contact h4::after { content: ''; position: absolute; bottom: 0; left: 0; width: 2rem; height: 2px; background: var(--gradient-primary); border-radius: 2px; }
.footer-links a { display: block; color: var(--text-secondary); padding: 0.5rem 0; font-size: 0.875rem; transition: var(--transition); }
.footer-links a:hover { color: var(--primary); padding-left: 0.5rem; }
.footer-contact p { color: var(--text-secondary); padding: 0.625rem 0; font-size: 0.875rem; display: flex; align-items: center; gap: 0.75rem; margin: 0; }
.footer-contact i { color: var(--primary); width: 1.125rem; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; text-align: center; }
.footer-bottom p { color: var(--text-muted); font-size: 0.8rem; margin: 0; }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 9999; padding: 1.25rem; opacity: 0; visibility: hidden; transition: var(--transition); }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal { background: var(--bg-card); border-radius: var(--radius-2xl); border: 1px solid var(--border); max-width: 500px; width: 100%; max-height: 90vh; overflow: hidden; box-shadow: var(--shadow-xl); transform: translateY(20px) scale(0.95); transition: var(--transition); }
.modal-overlay.active .modal { transform: translateY(0) scale(1); }
.modal-header { padding: 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 1.125rem; margin: 0; }
.modal-close { width: 2.25rem; height: 2.25rem; display: flex; align-items: center; justify-content: center; background: var(--bg-elevated); border-radius: var(--radius-md); color: var(--text-secondary); cursor: pointer; transition: var(--transition); border: 1px solid var(--border); }
.modal-close:hover { background: var(--error-bg); color: var(--error); border-color: var(--error); }
.modal-body { padding: 1.5rem; overflow-y: auto; max-height: calc(90vh - 140px); }
.modal-footer { padding: 1.25rem 1.5rem; border-top: 1px solid var(--border); display: flex; gap: 0.75rem; justify-content: flex-end; }

/* TOAST - Better styling */
.toast-container { position: fixed; top: 5.5rem; right: 1.5rem; z-index: 99999; max-width: 350px; }
.toast { display: flex; align-items: flex-start; gap: 0.875rem; padding: 1rem 1.25rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 0.75rem; box-shadow: var(--shadow-lg); animation: slideIn 0.3s ease; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast-icon { font-size: 1.25rem; flex-shrink: 0; }
.toast-success { border-left: 4px solid var(--success); }
.toast-success .toast-icon { color: var(--success); }
.toast-error { border-left: 4px solid var(--error); }
.toast-error .toast-icon { color: var(--error); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info { border-left: 4px solid var(--info); }
.toast-info .toast-icon { color: var(--info); }
.toast-content { flex: 1; min-width: 0; }
.toast-content h4 { color: var(--text-white); font-size: 0.9rem; margin-bottom: 0.25rem; font-weight: 600; }
.toast-content p { color: var(--text-secondary); font-size: 0.8rem; margin: 0; line-height: 1.4; }

/* EMPTY & LOADING */
.empty-state { text-align: center; padding: 3rem 1.5rem; }
.empty-state i { font-size: 3rem; color: var(--text-muted); margin-bottom: 1.25rem; display: block; }
.empty-state h3 { margin-bottom: 0.5rem; }
.empty-state p { max-width: 400px; margin: 0 auto 1.25rem; }
.loading { display: flex; justify-content: center; padding: 3rem; }
.spinner { width: 2.5rem; height: 2.5rem; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem; }

/* TABS */
.tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.tab { padding: 0.625rem 1.25rem; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text-secondary); font-weight: 500; font-size: 0.875rem; cursor: pointer; transition: var(--transition); }
.tab:hover { background: var(--amber-glow); border-color: var(--primary); color: var(--text-white); }
.tab.active { background: var(--gradient-primary); border-color: var(--primary); color: #000; }
.admin-tab { background: var(--bg-elevated) !important; color: var(--text-white) !important; border: 1px solid var(--border) !important; }
.admin-tab:hover { background: var(--amber-glow) !important; border-color: var(--primary) !important; }
.admin-tab.active { background: var(--gradient-primary) !important; color: #000 !important; }

/* PROGRESS & PAGINATION */
.progress { height: 6px; background: var(--bg-elevated); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar { height: 100%; background: var(--gradient-primary); border-radius: var(--radius-full); transition: width 0.4s ease; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 2rem; flex-wrap: wrap; }
.pagination button, .pagination-btn { min-width: 2.5rem; height: 2.5rem; display: flex; align-items: center; justify-content: center; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-secondary); font-weight: 500; cursor: pointer; transition: var(--transition); }
.pagination button:hover, .pagination-btn:hover { background: var(--amber-glow); border-color: var(--primary); color: var(--text-white); }
.pagination button.active, .pagination-btn.active { background: var(--gradient-primary); border-color: var(--primary); color: #000; }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }

/* AVATAR */
.avatar { border-radius: var(--radius-full); object-fit: cover; }
.avatar-sm { width: 2rem; height: 2rem; }
.avatar-md { width: 3rem; height: 3rem; }
.avatar-lg { width: 4rem; height: 4rem; }
.avatar-xl { width: 6rem; height: 6rem; }

/* UTILITIES */
.bg-elevated { background: var(--bg-elevated) !important; }
.bg-card { background: var(--bg-card) !important; }
.border-primary { border-color: var(--primary) !important; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; } .gap-2 { gap: 0.5rem; } .gap-3 { gap: 1rem; } .gap-4 { gap: 1.5rem; }
.w-100 { width: 100%; }
.hidden { display: none !important; }

/* Skeleton Loading */
@keyframes skeleton-loading { 0% { background-position: -200px 0; } 100% { background-position: calc(200px + 100%) 0; } }
.skeleton-bg, .skeleton-text, .skeleton-avatar { background: linear-gradient(90deg, var(--bg-elevated) 0%, var(--bg-tertiary) 50%, var(--bg-elevated) 100%); background-size: 200px 100%; animation: skeleton-loading 1.5s ease-in-out infinite; border-radius: 4px; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.animate-fade-in { animation: fadeIn 0.5s ease forwards; }
.animate-fade-in-up { animation: fadeInUp 0.5s ease forwards; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }

/* Skip link - hide but accessible */
.skip-to-content, .skip-link {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: -1;
  opacity: 0;
}
.skip-to-content:focus, .skip-link:focus {
  position: fixed;
  top: 10px;
  left: 10px;
  width: auto;
  height: auto;
  padding: 1rem 1.5rem;
  background: var(--primary);
  color: #000;
  z-index: 99999;
  opacity: 1;
  border-radius: var(--radius-lg);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE STYLES - Mobile First Approach
   ═══════════════════════════════════════════════════════════════ */

/* HOME PAGE - Hero Stats Grid */
[style*="display:grid;grid-template-columns:repeat(4,1fr);gap:24px;max-width:700px"] {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
  [style*="display:grid;grid-template-columns:repeat(4,1fr);gap:24px;max-width:700px"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    max-width: 100% !important;
  }
}

@media (max-width: 480px) {
  [style*="display:grid;grid-template-columns:repeat(4,1fr);gap:24px;max-width:700px"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  [style*="display:grid;grid-template-columns:repeat(4,1fr);gap:24px;max-width:700px"] > div {
    padding: 16px 12px !important;
  }
  [style*="display:grid;grid-template-columns:repeat(4,1fr);gap:24px;max-width:700px"] h3 {
    font-size: 1.5rem !important;
  }
}

/* HOME PAGE - How It Works Section */
[style*="display:grid;grid-template-columns:repeat(4,1fr);gap:32px;max-width:1100px"] {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
  [style*="display:grid;grid-template-columns:repeat(4,1fr);gap:32px;max-width:1100px"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px !important;
  }
}

@media (max-width: 500px) {
  [style*="display:grid;grid-template-columns:repeat(4,1fr);gap:32px;max-width:1100px"] {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    max-width: 300px !important;
    margin: 0 auto !important;
  }
}

/* HOME PAGE - Features Section */
[style*="display:grid;grid-template-columns:repeat(3,1fr);gap:32px"] {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  [style*="display:grid;grid-template-columns:repeat(3,1fr);gap:32px"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
  }
}

@media (max-width: 600px) {
  [style*="display:grid;grid-template-columns:repeat(3,1fr);gap:32px"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* HOME PAGE - For Influencers & Brands Section */
[style*="display:grid;grid-template-columns:repeat(2,1fr);gap:40px"] {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
  [style*="display:grid;grid-template-columns:repeat(2,1fr);gap:40px"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
}

/* HOME PAGE - Hero Heading */
@media (max-width: 768px) {
  [style*="font-size:3.5rem;font-weight:800"] {
    font-size: 2rem !important;
    line-height: 1.3 !important;
  }
  [style*="font-size:2.5rem;font-weight:700"] {
    font-size: 1.75rem !important;
  }
  [style*="font-size:1.8rem"] {
    font-size: 1.4rem !important;
  }
}

@media (max-width: 480px) {
  [style*="font-size:3.5rem;font-weight:800"] {
    font-size: 1.65rem !important;
  }
  [style*="font-size:2.5rem;font-weight:700"] {
    font-size: 1.5rem !important;
  }
  [style*="font-size:1.8rem"] {
    font-size: 1.25rem !important;
  }
}

/* HOME PAGE - Hero CTA Buttons */
@media (max-width: 600px) {
  [style*="display:flex;gap:16px;justify-content:center;flex-wrap:wrap;margin-bottom:60px"] {
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 40px !important;
  }
  [style*="display:flex;gap:16px;justify-content:center;flex-wrap:wrap;margin-bottom:60px"] .btn {
    width: 100% !important;
    max-width: 280px !important;
    padding: 14px 24px !important;
    font-size: 0.95rem !important;
  }
}

/* HOME PAGE - Hero Badge */
@media (max-width: 480px) {
  [style*="display:inline-flex;align-items:center;gap:8px;background:rgba(255,255,255,0.2)"] {
    padding: 8px 16px !important;
    font-size: 0.8rem !important;
  }
}

/* TABLET - 1024px and below */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .hero-stats { gap: 1.5rem; }
  .profile-card { max-width: 100%; }
  .profile-grid { grid-template-columns: repeat(3, 1fr); }
  
  /* Admin Dashboard - Tablet */
  [style*="grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns: repeat(4,1fr)"],
  [style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* MOBILE LANDSCAPE / SMALL TABLET - 768px and below */
@media (max-width: 768px) {
  /* Navigation - Mobile Menu */
  .nav-menu { 
    position: fixed; 
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    background: rgba(3,3,4,0.98); 
    backdrop-filter: blur(20px); 
    flex-direction: column; 
    justify-content: flex-start;
    align-items: center; 
    gap: 0.5rem; 
    opacity: 0; 
    visibility: hidden; 
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease; 
    z-index: 9999;
    padding-top: 80px;
    padding-bottom: 40px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-menu.active { 
    opacity: 1; 
    visibility: visible; 
    pointer-events: auto;
  }
  .nav-menu li {
    width: 100%;
    text-align: center;
  }
  .nav-link { 
    font-size: 1.125rem; 
    padding: 1rem 1.5rem; 
    display: block;
    width: 100%;
  }
  .menu-toggle { 
    display: flex; 
    position: relative;
    z-index: 10000;
  }
  .nav-auth { display: none; }
  
  /* Mobile auth buttons - only visible when menu is active */
  .nav-menu.active .nav-auth-mobile {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    align-items: center;
    width: 100%;
  }
  
  .nav-auth-mobile a.btn {
    width: 200px;
    max-width: 80%;
    text-align: center;
    justify-content: center;
  }
  
  /* Grids */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  
  /* Hero Section */
  .hero { padding: 6rem 0 3rem; min-height: auto; }
  .hero-stats { flex-direction: column; gap: 1rem; align-items: flex-start; }
  .hero-stat { text-align: left; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  
  /* Page Header */
  .page-header { padding: 5rem 0 1.5rem; }
  .page-header h1 { font-size: 1.75rem; }
  .page-header p { font-size: 0.95rem; }
  
  /* Footer */
  .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
  .footer-links h4::after, .footer-contact h4::after { left: 50%; transform: translateX(-50%); }
  .social-links { justify-content: center; }
  .footer-contact p { justify-content: center; }
  .footer-about { text-align: center; }
  .footer-about .logo { justify-content: center; }
  
  /* Chat/Messages */
  .chat-container { grid-template-columns: 1fr; height: calc(100vh - 60px); }
  .chat-sidebar { 
    position: fixed; 
    left: -100%; 
    top: 60px; 
    bottom: 0; 
    width: 85%; 
    max-width: 300px; 
    z-index: 998; 
    transition: var(--transition);
    background: var(--bg-card);
  }
  .chat-sidebar.active { left: 0; }
  .chat-toggle-btn { display: flex; }
  .mobile-chat-toggle { display: flex; position: fixed; bottom: 20px; right: 20px; z-index: 997; }
  
  /* Profile Cards */
  .profile-card { max-width: 100%; margin: 0 auto; }
  
  /* Admin Dashboard - Mobile */
  [style*="grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns: repeat(4,1fr)"],
  [style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  
  /* Admin Tabs - Scrollable */
  [style*="display:flex;gap:8px;margin-bottom:24px;flex-wrap:wrap"] {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  [style*="display:flex;gap:8px;margin-bottom:24px;flex-wrap:wrap"]::-webkit-scrollbar {
    display: none;
  }
  
  .admin-tab {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    padding: 8px 14px !important;
    font-size: 0.8rem !important;
  }
  
  .admin-tab i {
    display: none;
  }
  
  /* Tables - Responsive */
  .table-container { 
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch;
  }
  .table { min-width: 600px; }
  .table th, .table td { 
    padding: 0.75rem 0.5rem; 
    font-size: 0.8rem; 
  }
  
  /* Search/Filter Forms */
  [style*="display:flex;gap:16px;flex-wrap:wrap"] {
    flex-direction: column !important;
  }
  [style*="min-width:250px"], 
  [style*="min-width:180px"], 
  [style*="min-width:150px"] {
    min-width: 100% !important;
    width: 100% !important;
  }
  
  /* Sort & View Controls */
  [style*="display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:16px"] {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  
  /* Cards in Dashboard */
  .card { padding: 1rem; }
  .card h3 { font-size: 1.25rem; }
  
  /* Forms */
  .form-section { padding: 1rem; }
  
  /* Pricing Cards */
  .pricing-card { padding: 1.5rem; }
  .pricing-card .plan-price { font-size: 2rem; }
  
  /* Escrow Form */
  [style*="Parties Information"],
  [style*="Payment Details"] {
    padding: 16px !important;
  }
  
  /* Modal */
  .modal { max-width: 95vw; margin: 10px; }
  .modal-body { padding: 1rem; }
  .modal-header { padding: 1rem; }
  .modal-footer { padding: 1rem; flex-wrap: wrap; }
  .modal-footer .btn { flex: 1; min-width: 120px; }
}

/* MOBILE PORTRAIT - 480px and below */
@media (max-width: 480px) {
  /* Container */
  .container { padding: 0 1rem; }
  
  /* Section spacing */
  .section { padding: 2.5rem 0; }
  
  /* Typography */
  h1 { font-size: 1.5rem !important; }
  h2 { font-size: 1.25rem !important; }
  h3 { font-size: 1.1rem !important; }
  
  /* Buttons */
  .btn { 
    padding: 0.625rem 1rem; 
    font-size: 0.8rem; 
  }
  .btn-lg { padding: 0.75rem 1.25rem; }
  .btn-xl { padding: 0.875rem 1.5rem; font-size: 0.9rem; }
  
  /* Cards */
  .card { padding: 1rem; border-radius: var(--radius-lg); }
  
  /* Hero */
  .hero { padding: 5rem 0 2rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .hero-badge { font-size: 0.7rem; padding: 0.375rem 0.75rem; }
  
  /* Page Header */
  .page-header { padding: 4.5rem 0 1rem; }
  
  /* Profile Grid & Cards */
  .profile-grid { grid-template-columns: 1fr; gap: 1rem; }
  .profile-card { max-width: 100%; }
  .profile-card-body { padding: 0.75rem; }
  .profile-card-footer { padding: 0 0.75rem 0.75rem; }
  .profile-card-stats { padding: 0.625rem; }
  
  /* Admin Dashboard */
  [style*="grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns: repeat(4,1fr)"],
  [style*="grid-template-columns: repeat(4, 1fr)"],
  [style*="grid-template-columns:repeat(2,1fr)"],
  [style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  
  /* Dashboard stat cards */
  .card[style*="text-align:center;padding:24px"] {
    padding: 16px !important;
  }
  .card[style*="text-align:center;padding:24px"] h3 {
    font-size: 1.25rem !important;
  }
  
  /* Admin Tabs - Single row scroll */
  .admin-tab {
    padding: 6px 10px !important;
    font-size: 0.75rem !important;
  }
  
  /* Progress Steps in Dashboard */
  [style*="display:flex;justify-content:space-between;margin-bottom:32px;position:relative"] {
    flex-direction: column !important;
    gap: 16px !important;
    align-items: center !important;
  }
  [style*="display:flex;justify-content:space-between;margin-bottom:32px;position:relative"] > div[style*="text-align:center"] {
    flex-direction: row !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    text-align: left !important;
    background: var(--bg-elevated);
    padding: 12px 16px;
    border-radius: var(--radius-lg);
  }
  [style*="display:flex;justify-content:space-between;margin-bottom:32px;position:relative"] > div[style*="text-align:center"] div[style*="width:50px;height:50px"] {
    width: 40px !important;
    height: 40px !important;
    flex-shrink: 0;
  }
  /* Hide the progress line on mobile */
  [style*="position:absolute;top:25px;left:12%;right:12%;height:4px"] {
    display: none !important;
  }
  
  /* Search filters */
  [style*="display:flex;gap:16px;flex-wrap:wrap;margin-bottom:20px"] {
    gap: 12px !important;
  }
  
  /* Sort and view section */
  [style*="display:flex;gap:12px;align-items:center"] {
    flex-wrap: wrap;
    gap: 8px !important;
  }
  
  .btn-group { 
    width: 100%; 
    justify-content: flex-end; 
  }
  
  /* Tables */
  .table th, .table td { 
    padding: 0.5rem 0.375rem; 
    font-size: 0.75rem; 
  }
  
  /* Toast */
  .toast-container { 
    left: 0.75rem; 
    right: 0.75rem; 
    top: 4.5rem;
    max-width: none; 
  }
  .toast { padding: 0.75rem 1rem; }
  
  /* Footer */
  .footer { padding: 2.5rem 0 1.5rem; margin-top: 2rem; }
  .footer-grid { gap: 1.5rem; }
  .footer-links a, .footer-contact p { font-size: 0.8rem; }
  .social-links a { width: 2.25rem; height: 2.25rem; }
  
  /* Badge */
  .badge { padding: 0.25rem 0.5rem; font-size: 0.65rem; }
  
  /* Favorites/Save buttons */
  [style*="display:flex;justify-content:space-between;align-items:center;margin-bottom:20px"] {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  [style*="display:flex;gap:12px"]:has(#show-favorites-btn) {
    width: 100%;
  }
  #show-favorites-btn, #save-search-btn {
    flex: 1;
  }
  
  /* Escrow page */
  [style*="Initiate Escrow"] {
    font-size: 1.5rem !important;
  }
  
  /* Messages page - empty state */
  [style*="Select a conversation"] {
    font-size: 1.25rem !important;
  }
  
  /* Pricing cards */
  .pricing-card { padding: 1.25rem; }
  .pricing-card .plan-price { font-size: 1.75rem; }
  .pricing-card .plan-name { font-size: 1.1rem; }
  
  /* Campaign cards */
  .campaign-card .content { padding: 1rem; }
  .campaign-card .title { font-size: 0.95rem; }
  
  /* Stat cards */
  .stat-card { padding: 1rem; }
  .stat-card .value { font-size: 1.5rem; }
  
  /* Forms */
  .form-control { padding: 0.75rem; font-size: 0.875rem; }
  .form-label { font-size: 0.8rem; }
  
  /* Navbar mobile */
  .navbar { padding: 0.75rem 0; }
  .logo { font-size: 1.1rem; }
  .logo i { font-size: 1.25rem; }
  .nav-icon { width: 2.25rem; height: 2.25rem; }
  .user-btn { padding: 0.125rem 0.5rem 0.125rem 0.125rem; }
  .user-btn img { width: 1.75rem; height: 1.75rem; }
  .user-btn span { font-size: 0.75rem; }
  .user-dropdown { min-width: 180px; right: -10px; }
  
  /* Fix navbar to top when scrolled */
  .navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9998 !important;
  }
  
  /* User dropdown on mobile - positioned relative to viewport */
  .user-dropdown.show {
    position: fixed !important;
    top: 60px !important;
    right: 10px !important;
    left: auto !important;
    max-width: calc(100vw - 20px) !important;
  }
}

/* EXTRA SMALL - 360px and below */
@media (max-width: 360px) {
  .container { padding: 0 0.75rem; }
  
  h1 { font-size: 1.35rem !important; }
  
  .btn { padding: 0.5rem 0.875rem; font-size: 0.75rem; }
  
  .hero { padding: 4.5rem 0 1.5rem; }
  .hero h1 { font-size: 1.35rem; }
  
  .page-header { padding: 4rem 0 0.75rem; }
  
  .profile-card-body h4 { font-size: 0.9rem; }
  .profile-card-body .handle { font-size: 0.7rem; }
  .profile-card-stats .stat-value { font-size: 0.8rem; }
  .profile-card-stats .stat-label { font-size: 0.6rem; }
  
  .admin-tab { padding: 5px 8px !important; font-size: 0.7rem !important; }
  
  .user-btn span { display: none; }
  .user-btn { padding: 0.125rem; }
  
  .logo span { font-size: 1rem; }
}

/* ═══════════════════════════════════════════════════════════════
   SPECIAL COMPONENTS - Fixed for All Screen Sizes
   ═══════════════════════════════════════════════════════════════ */

/* OFFLINE INDICATOR */
.offline-indicator {
  position: fixed;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--error);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.875rem;
  z-index: 99999;
  transition: bottom 0.3s ease;
  box-shadow: var(--shadow-lg);
  max-width: calc(100vw - 32px);
  text-align: center;
}

.offline-indicator.show {
  bottom: 20px;
}

.offline-indicator.online-indicator {
  background: var(--success);
}

/* APPROVE BUTTON */
.approve-inf-btn, .approve-brand-btn, .approve-campaign-btn,
button[class*="approve"], a[class*="approve"],
.btn-success, .btn[style*="success"] {
  background: linear-gradient(135deg, #059669, #10B981, #34D399) !important;
  border: 1px solid #10B981 !important;
  color: white !important;
  padding: 0.5rem 1rem !important;
  opacity: 1 !important;
  font-weight: 600;
}

.approve-inf-btn:hover, .approve-brand-btn:hover, .approve-campaign-btn:hover {
  box-shadow: 0 0 20px rgba(16,185,129,0.5) !important;
  transform: translateY(-1px);
}

/* View Full Button */
.view-full-btn {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-white) !important;
}

.view-full-btn:hover {
  border-color: var(--primary) !important;
  background: var(--amber-glow) !important;
}

/* MOBILE-SPECIFIC UTILITY CLASSES */
@media (max-width: 768px) {
  .mobile-hidden { display: none !important; }
  .mobile-full-width { width: 100% !important; }
  .mobile-text-center { text-align: center !important; }
  .mobile-stack { flex-direction: column !important; }
  .mobile-gap-sm { gap: 8px !important; }
}

@media (min-width: 769px) {
  .desktop-hidden { display: none !important; }
}

/* PRINT STYLES */
@media print {
  body { background: white; color: black; }
  .navbar, .footer { display: none !important; }
  .card { border: 1px solid #ddd; box-shadow: none; }
}

/* ═══════════════════════════════════════════════════════════════
   PAGE-SPECIFIC MOBILE FIXES
   ═══════════════════════════════════════════════════════════════ */

/* ESCROW PAGE - Form Layout */
@media (max-width: 768px) {
  /* Escrow form sections */
  [style*="Approval Flow"],
  [style*="Parties Information"],
  [style*="Payment Details"],
  [style*="Project Details"] {
    padding: 16px !important;
  }
  
  /* Escrow info boxes */
  [style*="background:var(--info-bg)"],
  [style*="background:var(--warning-bg)"] {
    padding: 12px !important;
    font-size: 0.85rem !important;
  }
}

/* PRICING PAGE - Cards */
@media (max-width: 768px) {
  [style*="display:grid;grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: 1fr !important;
    max-width: 400px !important;
    margin: 0 auto !important;
  }
}

/* MESSAGES PAGE - Chat Layout */
@media (max-width: 768px) {
  .chat-container {
    height: calc(100vh - 60px) !important;
    top: 60px !important;
  }
  
  .chat-header {
    padding: 0.75rem 1rem !important;
  }
  
  .chat-messages {
    padding: 1rem !important;
  }
  
  .chat-input {
    padding: 0.5rem 0.75rem !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: var(--bg-card) !important;
    border-top: 1px solid var(--border) !important;
    z-index: 100 !important;
    display: flex !important;
    gap: 0.5rem !important;
    align-items: center !important;
  }
  
  .chat-input textarea {
    flex: 1 !important;
    min-width: 0 !important;
    padding: 0.625rem 0.75rem !important;
    font-size: 16px !important; /* Prevents iOS zoom on focus */
    max-height: 80px !important;
  }
  
  .chat-input .btn {
    flex-shrink: 0 !important;
    width: 2.5rem !important;
    height: 2.5rem !important;
    padding: 0 !important;
  }
  
  .chat-input #attach-file-btn {
    width: 2.25rem !important;
    height: 2.25rem !important;
  }
  
  .chat-main {
    padding-bottom: 80px !important;
    height: calc(100vh - 60px) !important;
    height: calc(100dvh - 60px) !important;
    overflow-y: auto !important;
  }
  
  .chat-messages {
    padding: 1rem !important;
    padding-bottom: 20px !important;
    overflow-y: auto !important;
    flex: 1 !important;
  }
  
  /* Messages page - prevent nav-menu from overlapping chat */
  body.messages-page .nav-menu {
    z-index: 9999 !important;
  }
  
  body.messages-page .chat-container {
    z-index: 1 !important;
    position: relative !important;
  }
  
  body.messages-page .chat-sidebar.active {
    z-index: 1000 !important;
  }
  
  /* Fix chat container height for mobile keyboards */
  body.messages-page {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }
  
  body.messages-page #app {
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px);
    overflow: hidden;
  }
  
  .chat-container {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
  }
  
  .chat-main {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-height: 0 !important;
    position: relative !important;
  }
  
  /* Message bubbles */
  .message {
    max-width: 85% !important;
    padding: 0.625rem 0.875rem !important;
    font-size: 0.875rem !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }
  
  /* Empty chat state */
  [style*="Select a conversation"] {
    font-size: 1.25rem !important;
  }
}

/* PROFILE DETAIL PAGE */
@media (max-width: 768px) {
  /* Profile header */
  [style*="display:flex;gap:32px;align-items:flex-start"] {
    flex-direction: column !important;
    gap: 20px !important;
    align-items: center !important;
    text-align: center !important;
  }
  
  /* Profile avatar */
  [style*="width:140px;height:140px"] {
    width: 100px !important;
    height: 100px !important;
  }
  
  /* Profile stats row */
  [style*="display:flex;gap:24px;margin-bottom:24px"] {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 16px !important;
  }
  
  /* Profile action buttons */
  [style*="display:flex;gap:12px;margin-top:24px"] {
    flex-direction: column !important;
    width: 100% !important;
  }
  [style*="display:flex;gap:12px;margin-top:24px"] .btn {
    width: 100% !important;
  }
}

/* CAMPAIGN DETAIL PAGE */
@media (max-width: 768px) {
  /* Campaign grid layout */
  [style*="display:grid;grid-template-columns:2fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  
  /* Campaign sidebar */
  [style*="position:sticky;top:100px"] {
    position: relative !important;
    top: 0 !important;
  }
}

/* CONTACT PAGE - Form */
@media (max-width: 768px) {
  /* Contact grid */
  [style*="display:grid;grid-template-columns:1fr 2fr"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
}

/* ABOUT PAGE */
@media (max-width: 768px) {
  /* Team/Stats grid */
  [style*="display:grid;grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 480px) {
  [style*="display:grid;grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: 1fr !important;
  }
}

/* SETTINGS/ACCOUNT PAGE */
@media (max-width: 768px) {
  /* Settings sidebar + content */
  [style*="display:grid;grid-template-columns:250px 1fr"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Settings menu - horizontal on mobile */
  [style*="display:flex;flex-direction:column;gap:8px"] {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
  }
}

/* SUBSCRIPTION SUCCESS/FAILED PAGE */
@media (max-width: 480px) {
  [style*="max-width:500px"] {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
  
  [style*="padding:48px"] {
    padding: 24px !important;
  }
}

/* VERIFY EMAIL PAGE */
@media (max-width: 480px) {
  [style*="padding:60px"] {
    padding: 32px 20px !important;
  }
}

/* TABLE RESPONSIVE - Force horizontal scroll */
@media (max-width: 768px) {
  .table-container,
  [style*="overflow-x:auto"],
  div:has(> .table) {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1rem;
    padding: 0 1rem;
  }
  
  .table {
    min-width: 600px;
    font-size: 0.8rem;
  }
}

/* FIX: Inline styles grid override for admin dashboard */
@media (max-width: 768px) {
  /* Force 2 columns on tablet for stat cards */
  div[style*="grid-template-columns:repeat(4,1fr)"],
  div[style*="grid-template-columns: repeat(4,1fr)"],
  div[style*="grid-template-columns: repeat(4, 1fr)"] {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
}

@media (max-width: 480px) {
  /* Force 1 column on mobile for stat cards */
  div[style*="grid-template-columns:repeat(4,1fr)"],
  div[style*="grid-template-columns: repeat(4,1fr)"],
  div[style*="grid-template-columns: repeat(4, 1fr)"],
  div[style*="grid-template-columns:repeat(2,1fr)"],
  div[style*="grid-template-columns: repeat(2, 1fr)"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
}

/* PROFILE CARDS GRID - Ensure proper sizing */
@media (max-width: 768px) {
  .profile-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  
  .profile-card {
    max-width: 100% !important;
    width: 100% !important;
  }
}

@media (max-width: 500px) {
  .profile-grid {
    grid-template-columns: 1fr !important;
    max-width: 350px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* FIX: Progress steps in dashboard - vertical on mobile */
@media (max-width: 600px) {
  div[style*="display:flex;justify-content:space-between;margin-bottom:32px;position:relative"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    align-items: stretch !important;
  }
  
  div[style*="display:flex;justify-content:space-between;margin-bottom:32px;position:relative"] > div {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    text-align: left !important;
    background: var(--bg-elevated) !important;
    padding: 12px 16px !important;
    border-radius: 12px !important;
  }
  
  div[style*="display:flex;justify-content:space-between;margin-bottom:32px;position:relative"] > div > div[style*="width:50px"] {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    flex-shrink: 0 !important;
  }
  
  /* Hide the horizontal progress line */
  div[style*="position:absolute;top:25px;left:12%;right:12%;height:4px;background:var(--border)"] {
    display: none !important;
  }
}

/* MODAL RESPONSIVE */
@media (max-width: 600px) {
  .modal-overlay {
    padding: 16px !important;
    align-items: flex-end !important;
  }
  
  .modal {
    max-width: 100% !important;
    max-height: 90vh !important;
    border-radius: 20px 20px 0 0 !important;
    margin: 0 !important;
  }
  
  .modal-header {
    padding: 16px !important;
  }
  
  .modal-body {
    padding: 16px !important;
    max-height: calc(90vh - 140px) !important;
  }
  
  .modal-footer {
    padding: 16px !important;
    flex-direction: column !important;
  }
  
  .modal-footer .btn {
    width: 100% !important;
  }
}

/* FIX: Favorites modal */
@media (max-width: 768px) {
  #favorites-modal > div {
    max-width: 95vw !important;
    max-height: 85vh !important;
    margin: auto !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   COMPREHENSIVE MOBILE FIXES - ALL SCREENS
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* ===== GLOBAL CONTAINER FIX ===== */
  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  
  /* ===== CONTACT PAGE ===== */
  .contact-grid,
  [style*="grid-template-columns:1fr 380px"],
  [style*="grid-template-columns: 1fr 380px"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
  }
  
  .contact-cards {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Contact form row */
  .form-row,
  [style*="grid-template-columns:1fr 1fr;gap:16px"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }
  
  /* ===== FAQ SECTION ===== */
  [style*="max-width:800px;margin:60px auto"],
  [style*="max-width: 800px"] {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
  }
  
  /* ===== FOOTER ===== */
  .footer {
    width: 100% !important;
  }
  
  .footer-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 32px !important;
    width: 100% !important;
  }
  
  .footer-about,
  .footer-links,
  .footer-contact {
    width: 100% !important;
    text-align: center !important;
  }
  
  /* ===== PROFILE PAGE STATS ===== */
  [style*="display:grid;grid-template-columns:repeat(5"],
  [style*="display: grid; grid-template-columns: repeat(5"] {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    overflow-x: visible !important;
  }
  
  /* Profile stats cards */
  [style*="border-radius:12px;text-align:center"] {
    padding: 12px 8px !important;
  }
  
  [style*="border-radius:12px;text-align:center"] h3 {
    font-size: 1rem !important;
  }
  
  [style*="border-radius:12px;text-align:center"] p {
    font-size: 0.7rem !important;
  }
  
  /* ===== ADMIN DASHBOARD ===== */
  /* Admin stats 4 column grid to 1 column */
  [style*="display:grid;grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  
  /* Admin tabs - horizontal scroll */
  [style*="display:flex;gap:8px;margin-bottom:24px"] {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 10px !important;
    margin-bottom: 16px !important;
  }
  
  .admin-tab {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }
  
  /* Admin action buttons wrap */
  [style*="display:flex;gap:12px;flex-wrap:wrap"],
  [style*="display:flex;gap:16px;flex-wrap:wrap"] {
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* ===== MESSAGES PAGE - CRITICAL FIXES ===== */
  body.messages-page {
    overflow: hidden !important;
    height: 100vh !important;
    height: 100dvh !important;
  }
  
  body.messages-page #app {
    height: calc(100vh - 60px) !important;
    height: calc(100dvh - 60px) !important;
    overflow: hidden !important;
    position: relative !important;
  }
  
  .chat-container {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    position: relative !important;
  }
  
  .chat-main {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-height: 0 !important;
    position: relative !important;
    padding-bottom: 0 !important;
    overflow: hidden !important;
  }
  
  .chat-header {
    flex-shrink: 0 !important;
    padding: 12px 16px !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background: var(--bg-card) !important;
  }
  
  .chat-messages {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 16px !important;
    padding-bottom: 90px !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  .chat-input {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 10px 12px !important;
    padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
    background: var(--bg-card) !important;
    border-top: 1px solid var(--border) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    z-index: 9000 !important;
  }
  
  .chat-input textarea {
    flex: 1 !important;
    min-height: 40px !important;
    max-height: 100px !important;
    padding: 10px 14px !important;
    font-size: 16px !important;
    border-radius: 20px !important;
    resize: none !important;
  }
  
  .chat-input .btn {
    width: 44px !important;
    height: 44px !important;
    flex-shrink: 0 !important;
    border-radius: 50% !important;
    padding: 0 !important;
  }
  
  .chat-input #attach-file-btn {
    width: 36px !important;
    height: 36px !important;
  }
  
  /* ===== GENERAL GRID FIXES ===== */
  /* All 2-column grids become 1 column */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  
  /* All 3-column grids become 1 column */
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Flex rows become columns */
  [style*="display:flex;gap:32px"],
  [style*="display:flex;gap:40px"],
  [style*="display: flex; gap: 32px"],
  [style*="display: flex; gap: 40px"] {
    flex-direction: column !important;
    gap: 20px !important;
  }
  
  /* ===== CARDS ===== */
  .card {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .card-body {
    padding: 16px !important;
  }
  
  /* ===== BUTTONS ===== */
  .btn-block,
  [style*="btn-block"] {
    width: 100% !important;
  }
  
  /* ===== TYPOGRAPHY ===== */
  h1 {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
  }
  
  h2 {
    font-size: 1.25rem !important;
  }
  
  h3 {
    font-size: 1.1rem !important;
  }
  
  /* ===== PAGE HEADERS ===== */
  .page-header {
    padding: 5rem 0 1.5rem !important;
    text-align: center !important;
  }
  
  .page-header h1 {
    font-size: 1.5rem !important;
  }
  
  .page-header p {
    font-size: 0.9rem !important;
  }
  
  /* ===== SECTIONS ===== */
  .section {
    padding: 2rem 0 !important;
  }
}

/* ===== EXTRA SMALL DEVICES - 480px and below ===== */
@media (max-width: 480px) {
  .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Profile stats - 2 columns */
  [style*="display:grid;grid-template-columns:repeat(5"],
  [style*="display: grid; grid-template-columns: repeat(5"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  /* Even smaller text */
  h1 {
    font-size: 1.35rem !important;
  }
  
  .btn {
    padding: 10px 16px !important;
    font-size: 0.8rem !important;
  }
  
  /* Cards tighter padding */
  .card-body {
    padding: 12px !important;
  }
  
  /* Hero section */
  .hero {
    padding-top: 80px !important;
    min-height: auto !important;
  }
  
  /* Hero stats grid - 2 columns */
  .hero-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  
  .hero-stats-grid > div {
    padding: 16px 8px !important;
  }
  
  .hero-stats-grid h3 {
    font-size: 1.25rem !important;
  }
  
  .hero-stats-grid p {
    font-size: 0.7rem !important;
  }
  
  /* How it works - 2 columns */
  [style*="grid-template-columns:repeat(4,1fr);gap:32px"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }
  
  /* Step icons smaller */
  [style*="width:80px;height:80px"] {
    width: 60px !important;
    height: 60px !important;
    font-size: 1.3rem !important;
  }
  
  /* Step number badge */
  [style*="width:30px;height:30px;border-radius:50%"] {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.75rem !important;
  }
}

/* ===== VERY SMALL DEVICES - 360px and below ===== */
@media (max-width: 360px) {
  .container {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  
  h1 {
    font-size: 1.2rem !important;
  }
  
  .btn {
    padding: 8px 12px !important;
    font-size: 0.75rem !important;
  }
  
  /* Navbar */
  .logo span {
    font-size: 0.9rem !important;
  }
  
  .user-btn span {
    display: none !important;
  }
}

/* Home Page CTA Buttons Hover Effects */
.home-cta-btn {
  transition: all 0.3s ease !important;
}

.home-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(201, 162, 39, 0.4);
}

.home-cta-btn-brand {
  transition: all 0.3s ease !important;
}

.home-cta-btn-brand:hover {
  background: #a06a50 !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(184, 122, 96, 0.4);
}

/* Home cards grid responsive */
.home-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

/* Campaign detail page responsive */
.campaign-detail-grid {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 32px;
}

/* Admin tabs responsive */
.admin-tabs-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 992px) {
  .home-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  
  .campaign-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  
  .campaign-info-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }
  
  .target-audience-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }
}

@media (max-width: 768px) {
  .home-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  
  .home-card-item {
    padding: 32px 24px !important;
  }
  
  .home-card-item h3 {
    font-size: 1.5rem !important;
  }
  
  .home-card-item .btn {
    width: 100%;
    justify-content: center;
  }
  
  .campaign-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  
  .campaign-info-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  
  .target-audience-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
}

@media (max-width: 480px) {
  .home-card-item {
    padding: 24px 20px !important;
  }
  
  .home-card-item h3 {
    font-size: 1.3rem !important;
  }
  
  .campaign-info-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  
  .campaign-info-grid > div {
    padding: 12px !important;
  }
  
  .target-audience-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   GLOBAL HOVER EFFECTS & TRANSITIONS
   ═══════════════════════════════════════════════════════════════ */

/* Card hover effects */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* Profile cards hover */
.profile-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.profile-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  border-color: var(--primary);
}

.profile-card:hover .profile-card-cover {
  filter: brightness(1.1);
}

.profile-card:hover .profile-card-avatar {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(201, 162, 39, 0.4);
}

.profile-card-avatar {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Button hover improvements */
.btn {
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.4);
}

.btn-secondary:hover {
  box-shadow: 0 6px 20px rgba(184, 122, 96, 0.4);
}

.btn-outline:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Nav link hover */
.nav-link {
  position: relative;
  transition: all 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

/* Form input focus effects */
.form-control {
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
  background: var(--bg-elevated);
}

/* Table row hover */
.table tbody tr {
  transition: background 0.2s ease;
}

.table tbody tr:hover {
  background: rgba(201, 162, 39, 0.05);
}

/* Badge hover */
.badge {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.badge:hover {
  transform: scale(1.05);
}

/* Stats hover */
.profile-card-stats > div {
  transition: transform 0.2s ease, background 0.2s ease;
}

.profile-card-stats > div:hover {
  transform: scale(1.05);
  background: rgba(201, 162, 39, 0.1);
  border-radius: 8px;
}

/* Image hover zoom */
.profile-card-cover {
  transition: filter 0.3s ease, transform 0.5s ease;
}

/* Icon button hover */
.nav-icon {
  transition: all 0.3s ease;
}

.nav-icon:hover {
  transform: scale(1.1);
}

/* Favorite button hover */
.favorite-btn:hover,
.brand-favorite-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 15px rgba(201, 162, 39, 0.5);
}

/* Modal backdrop animation */
#activate-modal,
#cancel-modal,
#templates-modal {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Pricing card hover */
.pricing-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.pricing-card.featured:hover {
  box-shadow: 0 25px 60px rgba(201, 162, 39, 0.3);
}

/* Social links hover */
a[href*="instagram"]:hover,
a[href*="youtube"]:hover,
a[href*="tiktok"]:hover,
a[href*="twitter"]:hover,
a[href*="facebook"]:hover {
  transform: scale(1.1);
}

/* Alert/Toast animation */
.toast {
  animation: slideIn 0.3s ease;
}

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

/* Loading spinner pulse */
.fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Dropdown animation */
.user-dropdown {
  animation: dropIn 0.2s ease;
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Link underline animation */
a:not(.btn):not(.nav-link) {
  position: relative;
}

/* Footer link hover */
.footer a:hover {
  color: var(--primary) !important;
}

/* Message item hover */
.chat-item {
  transition: background 0.2s ease, border-color 0.2s ease;
}

.chat-item:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
}
