@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #8b5cf6;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --bg-muted: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 1px 2px rgba(0, 0, 0, .06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 10px 10px -5px rgba(0, 0, 0, .04);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all .2s ease;
  --font: 'Inter', sans-serif
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html {
  scroll-behavior: smooth;
  font-size: 16px
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased
}

body.dark-mode {
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-muted: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border: #334155
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition)
}

a:hover {
  color: var(--primary-dark)
}

img {
  max-width: 100%;
  height: auto
}

ul {
  list-style: none
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px
}

.container-sm {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 20px
}

/* ===== GLOBAL LOADER ===== */
#globalLoader {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent), var(--primary));
  background-size: 400% 100%;
  z-index: 99999;
  transition: width 0.4s cubic-bezier(0.1, 0.05, 0.4, 1), opacity 0.3s ease;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
  pointer-events: none;
  animation: loaderFlow 3s linear infinite;
}

@keyframes loaderFlow {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

#globalLoader.loading {
  width: 75%;
}

#globalLoader.complete {
  width: 100%;
  opacity: 0;
}


/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none
}

.btn-primary {
  background: var(--primary);
  color: #fff
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, .4)
}

.btn-secondary {
  background: var(--bg-muted);
  color: var(--text);
  border: 1px solid var(--border)
}

.btn-secondary:hover {
  background: var(--border);
  color: var(--text)
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary)
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff
}

.btn-success {
  background: var(--success);
  color: #fff
}

.btn-danger {
  background: var(--danger);
  color: #fff
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: var(--radius)
}

.btn-sm {
  padding: 6px 14px;
  font-size: .8rem
}

.btn-full {
  width: 100%;
  justify-content: center
}

.btn-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border: none
}

.btn-gradient:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, .4)
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: var(--transition)
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px)
}

.card-body {
  padding: 24px
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border)
}

.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-muted)
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 20px
}

.form-label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .9375rem;
  color: var(--text);
  background: var(--bg-card);
  transition: var(--transition);
  outline: none
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .1)
}

.form-control::placeholder {
  color: var(--text-light)
}

textarea.form-control {
  resize: vertical;
  min-height: 120px
}

/* ===== ALERTS ===== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: .875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600
}

.badge-free {
  background: #d1fae5;
  color: #065f46
}

.badge-pro {
  background: #ede9fe;
  color: #5b21b6
}

.badge-premium {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #fff
}

.badge-new {
  background: var(--accent);
  color: #fff
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0
}

.dark-mode .navbar {
  background: rgba(15, 23, 42, .95)
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  text-decoration: none
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: rgba(99, 102, 241, .08)
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text);
  cursor: pointer;
  padding: 4px
}

.mobile-menu {
  display: flex;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  padding: 24px;
  z-index: 999;
  flex-direction: column;
  gap: 8px;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.dark-mode .mobile-menu {
  background: rgba(15, 23, 42, 0.98);
}

.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-link {
  padding: 14px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-link i {
  font-size: 1.25rem;
  color: var(--primary);
}

.mobile-link:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  transform: translateX(8px);
}

/* ===== HERO ===== */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 50%, #f0f9ff 100%);
  position: relative;
  overflow: hidden
}

.dark-mode .hero {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%)
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(99, 102, 241, .08) 0%, transparent 50%), radial-gradient(circle at 70% 70%, rgba(139, 92, 246, .08) 0%, transparent 50%);
  pointer-events: none
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, .1);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 20px;
  border: 1px solid rgba(99, 102, 241, .2)
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -.02em
}

.hero-title span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text
}

.hero-desc {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 36px
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border)
}

.stat-item {
  text-align: center
}

.stat-num {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--primary)
}

.stat-label {
  font-size: .8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px
}

/* ===== TOOL CARDS ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transition: transform .3s ease;
  transform-origin: left
}

.tool-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--primary)
}

.tool-card:hover::before {
  transform: scaleX(1)
}

.tool-card:hover .tool-name {
  color: var(--primary)
}

.tool-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  flex-shrink: 0
}

.tool-name {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text);
  transition: var(--transition)
}

.tool-desc {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.5
}

.tool-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto
}

.tool-plan-lock {
  width: 20px;
  height: 20px;
  background: var(--bg-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  color: var(--text-muted)
}

/* ===== CATEGORY TABS ===== */
.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px
}

.cat-tab {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition)
}

.cat-tab:hover,
.cat-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary)
}

/* ===== CATEGORY SLIDER ===== */
.category-slider-container {
  overflow: hidden;
  padding: 10px 0;
  position: relative;
}

.category-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 10px 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  justify-content: center;
}

.category-grid::-webkit-scrollbar {
  display: none;
}

.category-card {
  flex: 0 0 calc(20% - 13px);
  min-width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  text-decoration: none;
  transition: all .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.category-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.category-name {
  font-weight: 700;
  color: var(--text);
  font-size: .9375rem;
}

.category-count {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

@media (max-width: 1024px) {
  .category-grid {
    justify-content: flex-start;
    padding-left: 20px;
    padding-right: 20px;
  }

  .category-card {
    flex: 0 0 200px;
  }
}

/* ===== SEARCH ===== */
.search-wrap {
  position: relative;
  max-width: 560px;
  margin: 0 auto 32px
}

.search-input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: 2px solid var(--border);
  border-radius: 999px;
  font-size: 1rem;
  font-family: var(--font);
  background: var(--bg-card);
  color: var(--text);
  outline: none;
  transition: var(--transition)
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .1)
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none
}

/* ===== SECTION ===== */
.section {
  padding: 60px 0
}

.section-header {
  text-align: center;
  margin-bottom: 48px
}

.section-label {
  display: inline-block;
  background: rgba(99, 102, 241, .1);
  color: var(--primary);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 12px
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 12px
}

.section-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto
}

/* ===== PRICING ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px
}

.pricing-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  position: relative;
  transition: var(--transition)
}

.pricing-card.popular {
  border-color: var(--primary);
  transform: scale(1.04)
}

.pricing-popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 4px 20px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap
}

.pricing-plan {
  font-size: .875rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px
}

.pricing-price {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px
}

.pricing-price sup {
  font-size: 1.2rem;
  vertical-align: top;
  margin-top: 8px
}

.pricing-period {
  font-size: .875rem;
  color: var(--text-muted)
}

.pricing-features {
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 10px
}

.pricing-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .875rem
}

.pricing-feature i {
  color: var(--success);
  font-size: 1rem;
  flex-shrink: 0
}

.pricing-feature.disabled {
  color: var(--text-light)
}

.pricing-feature.disabled i {
  color: var(--text-light)
}

/* ===== AUTH PAGES ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 100%);
  padding: 20px
}

.dark-mode .auth-page {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%)
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-xl)
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px
}

.auth-title {
  font-size: 1.625rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 6px
}

.auth-sub {
  font-size: .875rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 28px
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: .8rem
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border)
}

.auth-switch {
  text-align: center;
  font-size: .875rem;
  color: var(--text-muted);
  margin-top: 20px
}

/* ===== DASHBOARD ===== */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  min-height: 100vh
}

.sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  text-decoration: none
}

.sidebar-link:hover,
.sidebar-link.active {
  background: rgba(99, 102, 241, .08);
  color: var(--primary)
}

.sidebar-link.active {
  font-weight: 600
}

.sidebar-section {
  font-size: .7rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 16px 14px 6px
}

.dashboard-content {
  padding: 32px;
  background: var(--bg)
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition)
}

.stat-card:hover {
  box-shadow: var(--shadow-md)
}

.stat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 12px
}

.stat-card-value {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--text)
}

.stat-card-label {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: 2px
}

/* ===== FOOTER ===== */
.footer {
  background: var(--text);
  color: #94a3b8;
  padding: 60px 0 0
}

.dark-mode .footer {
  background: #020617
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px
}

.footer-brand-name {
  font-size: 1.375rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px
}

.footer-desc {
  font-size: .875rem;
  line-height: 1.6;
  margin-bottom: 20px
}

.footer-heading {
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 16px
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px
}

.footer-link {
  font-size: .875rem;
  color: #94a3b8;
  transition: var(--transition)
}

.footer-link:hover {
  color: #fff
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem
}

/* ===== DARK MODE TOGGLE ===== */
.dark-toggle {
  background: var(--bg-muted);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  width: 44px;
  height: 24px;
  cursor: pointer;
  position: relative;
  transition: var(--transition)
}

.dark-toggle::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--primary);
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform .3s ease
}

.dark-mode .dark-toggle::after {
  transform: translateX(20px)
}

/* ===== RESPONSIVE ===== */
@media(max-width:768px) {

  .nav-menu,
  .nav-actions .btn {
    display: none
  }

  .nav-toggle {
    display: flex
  }

  .hero {
    padding: 48px 0 36px
  }

  .hero-stats {
    gap: 24px;
    flex-wrap: wrap
  }

  .pricing-grid {
    grid-template-columns: 1fr
  }

  .pricing-card.popular {
    transform: none
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px
  }

  .dashboard-layout {
    grid-template-columns: 1fr
  }

  .sidebar {
    display: none
  }

  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px
  }
}

@media(max-width:480px) {
  .tools-grid {
    grid-template-columns: 1fr
  }

  .footer-grid {
    grid-template-columns: 1fr
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch
  }

  .btn-lg {
    text-align: center;
    justify-content: center
  }
}

/* ===== UTILITIES ===== */
.text-center {
  text-align: center
}

.text-muted {
  color: var(--text-muted)
}

.mt-1 {
  margin-top: 8px
}

.mt-2 {
  margin-top: 16px
}

.mt-3 {
  margin-top: 24px
}

.mt-4 {
  margin-top: 32px
}

.mb-1 {
  margin-bottom: 8px
}

.mb-2 {
  margin-bottom: 16px
}

.mb-3 {
  margin-bottom: 24px
}

.mb-4 {
  margin-bottom: 32px
}

.d-flex {
  display: flex
}

.align-center {
  align-items: center
}

.justify-between {
  justify-content: space-between
}

.gap-2 {
  gap: 8px
}

.gap-3 {
  gap: 12px
}

.fw-600 {
  font-weight: 600
}

.fw-700 {
  font-weight: 700
}

.fw-800 {
  font-weight: 800
}

.fs-sm {
  font-size: .875rem
}

.fs-xs {
  font-size: .8rem
}

.rounded {
  border-radius: var(--radius)
}

.rounded-full {
  border-radius: 999px
}

.w-full {
  width: 100%
}

.hidden {
  display: none !important
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text
}

#chatImagePreview img {
  max-height: 80px;
  border-radius: 8px;
}

#chatImagePreview .remove-preview {
  position: absolute;
  top: 0;
  right: 0;
  background: #ef4444;
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 480px) {
  .chat-widget {
    width: calc(100% - 40px);
    right: 20px;
    bottom: 20px;
    max-height: 80vh;
  }
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  min-width: 280px;
  max-width: 420px;
  padding: 14px 20px;
  background: var(--bg-card);
  color: var(--text);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .9375rem;
  font-weight: 500;
  pointer-events: auto;
  animation: toastSlideIn .4s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all .3s ease;
}

.toast.removing {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
}

.toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.toast-success .toast-icon { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.toast-error .toast-icon { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.toast-warning .toast-icon { background: rgba(245, 158, 11, 0.1); color: var(--warning); }

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(40px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dark-mode .toast {
  background: #1e293b;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
