/* Freya Design System - Dorilon Newsletter Manager */

/* ========================================
   Buttons
   ======================================== */

.btn-primary-freya {
  background: linear-gradient(to right, rgb(139, 92, 246), rgb(168, 85, 247), rgb(236, 72, 153));
  color: white;
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.3);
  transition: all 200ms;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  text-decoration: none;
}

.btn-primary-freya:hover {
  box-shadow: 0 10px 15px -3px rgba(139, 92, 246, 0.4);
  transform: scale(1.02);
}

.btn-primary-freya-orange {
  background: linear-gradient(to right, rgb(249, 115, 22), rgb(239, 68, 68), rgb(236, 72, 153));
  color: white;
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(249, 115, 22, 0.3);
  transition: all 200ms;
  display: inline-block;
  text-decoration: none;
}

.btn-primary-freya-orange:hover {
  box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.4);
  transform: scale(1.02);
}

.btn-secondary-freya {
  background-color: #f5f5f5;
  border: 1px solid #e5e5e5;
  color: #404040;
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  transition: all 200ms;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  text-decoration: none;
}

.dark .btn-secondary-freya {
  background-color: #404040;
  border-color: #525252;
  color: #e5e5e5;
}

.btn-secondary-freya:hover {
  background-color: #e5e5e5;
}

.dark .btn-secondary-freya:hover {
  background-color: #525252;
}

.btn-outline-freya {
  background-color: transparent;
  border: 2px solid rgb(139, 92, 246);
  color: rgb(124, 58, 237);
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  transition: all 200ms;
  display: inline-block;
  text-decoration: none;
}

.dark .btn-outline-freya {
  color: rgb(167, 139, 250);
}

.btn-outline-freya:hover {
  background-color: rgb(245, 243, 255);
}

.dark .btn-outline-freya:hover {
  background-color: rgba(139, 92, 246, 0.3);
}

.btn-ghost-freya {
  color: #525252;
  background-color: transparent;
  border: none;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  transition: all 200ms;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.dark .btn-ghost-freya {
  color: #a3a3a3;
}

.btn-ghost-freya:hover {
  background-color: #f5f5f5;
}

.dark .btn-ghost-freya:hover {
  background-color: #404040;
}

/* ========================================
   Cards
   ======================================== */

.card-freya {
  background-color: white;
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 4px 6px -1px rgba(23, 23, 23, 0.05);
  border: 1px solid #f5f5f5;
}

.dark .card-freya {
  background-color: #262626;
  box-shadow: 0 4px 6px -1px rgba(23, 23, 23, 0.2);
  border-color: #404040;
}

/* ========================================
   Stat Cards (Dashboard) - Vue Original Style
   ======================================== */

.stat-card {
  background-color: white;
  border-radius: 0.75rem;
  padding: 0.75rem;
  /* p-3 = 12px - Vue original */
  box-shadow: 0 4px 6px -1px rgba(23, 23, 23, 0.05);
  border: 1px solid #f5f5f5;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  /* gap-3 */
  transition: all 200ms;
}

.dark .stat-card {
  background-color: #262626;
  box-shadow: 0 4px 6px -1px rgba(23, 23, 23, 0.2);
  border-color: #404040;
}

.stat-card:hover {
  box-shadow: 0 10px 15px -3px rgba(23, 23, 23, 0.1);
}

.stat-card-violet {
  background-color: white;
  border-radius: 0.75rem;
  padding: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(23, 23, 23, 0.05);
  border: 1px solid #f5f5f5;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transition: all 200ms;
}

.dark .stat-card-violet {
  background-color: #262626;
  box-shadow: 0 4px 6px -1px rgba(23, 23, 23, 0.2);
  border-color: #404040;
}

.stat-card-violet:hover {
  box-shadow: 0 10px 15px -3px rgba(23, 23, 23, 0.1);
  border-color: #ddd6fe;
}

.dark .stat-card-violet:hover {
  border-color: #5b21b6;
}

.stat-card-emerald {
  background-color: white;
  border-radius: 0.75rem;
  padding: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(23, 23, 23, 0.05);
  border: 1px solid #f5f5f5;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transition: all 200ms;
}

.dark .stat-card-emerald {
  background-color: #262626;
  box-shadow: 0 4px 6px -1px rgba(23, 23, 23, 0.2);
  border-color: #404040;
}

.stat-card-emerald:hover {
  box-shadow: 0 10px 15px -3px rgba(23, 23, 23, 0.1);
  border-color: #a7f3d0;
}

.dark .stat-card-emerald:hover {
  border-color: #065f46;
}

.stat-card-red {
  background-color: white;
  border-radius: 0.75rem;
  padding: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(23, 23, 23, 0.05);
  border: 1px solid #f5f5f5;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transition: all 200ms;
}

.dark .stat-card-red {
  background-color: #262626;
  box-shadow: 0 4px 6px -1px rgba(23, 23, 23, 0.2);
  border-color: #404040;
}

.stat-card-red:hover {
  box-shadow: 0 10px 15px -3px rgba(23, 23, 23, 0.1);
  border-color: #fecaca;
}

.dark .stat-card-red:hover {
  border-color: #7f1d1d;
}

.stat-card-purple {
  background-color: white;
  border-radius: 0.75rem;
  padding: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(23, 23, 23, 0.05);
  border: 1px solid #f5f5f5;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transition: all 200ms;
}

.dark .stat-card-purple {
  background-color: #262626;
  box-shadow: 0 4px 6px -1px rgba(23, 23, 23, 0.2);
  border-color: #404040;
}

.stat-card-purple:hover {
  box-shadow: 0 10px 15px -3px rgba(23, 23, 23, 0.1);
  border-color: #e9d5ff;
}

.dark .stat-card-purple:hover {
  border-color: #581c87;
}

/* Stat Icon Wrapper - Vue Original (w-10 h-10 with light background) */
.stat-icon-wrapper {
  width: 2.5rem;
  /* w-10 */
  height: 2.5rem;
  /* h-10 */
  border-radius: 0.5rem;
  /* rounded-lg */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Icon color variants - Light backgrounds (Vue original) */
.stat-icon-violet {
  background-color: #ede9fe;
  /* violet-100 */
  color: #7c3aed;
  /* violet-600 */
}

.dark .stat-icon-violet {
  background-color: rgba(139, 92, 246, 0.3);
  color: #a78bfa;
}

.stat-icon-emerald {
  background-color: #d1fae5;
  /* emerald-100 */
  color: #059669;
  /* emerald-600 */
}

.dark .stat-icon-emerald {
  background-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.stat-icon-red {
  background-color: #fee2e2;
  /* red-100 */
  color: #dc2626;
  /* red-600 */
}

.dark .stat-icon-red {
  background-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.stat-icon-purple {
  background-color: #f3e8ff;
  /* purple-100 */
  color: #9333ea;
  /* purple-600 */
}

.dark .stat-icon-purple {
  background-color: rgba(168, 85, 247, 0.3);
  color: #c4b5fd;
}

/* Stat Content Typography */
.stat-label {
  font-size: 0.75rem;
  /* text-xs */
  font-weight: 500;
  color: #737373;
  /* surface-500 */
}

.dark .stat-label {
  color: #a3a3a3;
}

.stat-value {
  font-size: 1.5rem;
  /* text-2xl */
  font-weight: 700;
  color: #171717;
  /* surface-900 */
}

.dark .stat-value {
  color: white;
}

.stat-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 0.25rem;
}

.stat-link:hover {
  text-decoration: underline;
}

/* Stat Link Color Variants */
.stat-link-violet {
  color: #7c3aed;
}

.stat-link-emerald {
  color: #059669;
}

.stat-link-red {
  color: #dc2626;
}

.dark .stat-link-violet {
  color: #a78bfa;
}

.dark .stat-link-emerald {
  color: #6ee7b7;
}

.dark .stat-link-red {
  color: #fca5a5;
}

/* ========================================
   Email List Items (Recent Emails) - Vue Original
   ======================================== */

.email-list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background-color: #fafafa;
  /* surface-50 */
  transition: background-color 150ms;
}

.email-list-item:hover {
  background-color: #f5f5f5;
  /* surface-100 */
}

.dark .email-list-item {
  background-color: rgba(64, 64, 64, 0.5);
}

.dark .email-list-item:hover {
  background-color: #404040;
}

/* Status Icon Wrapper (checkmark with background) */
.status-icon-wrapper {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.status-icon-sent {
  background-color: #d1fae5;
  /* emerald-100 */
}

.dark .status-icon-sent {
  background-color: rgba(16, 185, 129, 0.3);
}

.status-icon-scheduled {
  background-color: #ede9fe;
  /* violet-100 */
}

.dark .status-icon-scheduled {
  background-color: rgba(139, 92, 246, 0.3);
}

/* ========================================
   Forms
   ======================================== */

.input-freya {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background-color: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: all 200ms;
}

.dark .input-freya {
  background-color: #171717;
  border-color: #525252;
  color: #fafafa;
}

.input-freya:focus {
  outline: none;
  border-color: rgb(139, 92, 246);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.input-freya::placeholder {
  color: #a3a3a3;
}

.dark .input-freya::placeholder {
  color: #737373;
}

.form-label-freya {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: #525252;
  margin-bottom: 0.375rem;
}

.dark .form-label-freya {
  color: #a3a3a3;
}

/* ========================================
   Status Badges
   ======================================== */

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.status-draft {
  background-color: #f5f5f5;
  color: #404040;
}

.dark .status-draft {
  background-color: #404040;
  color: #d4d4d4;
}

.status-queued {
  background-color: #dbeafe;
  color: #1e40af;
}

.dark .status-queued {
  background-color: rgba(30, 58, 138, 0.5);
  color: #93c5fd;
}

.status-scheduled {
  background-color: #e9d5ff;
  color: #6b21a8;
}

.dark .status-scheduled {
  background-color: rgba(107, 33, 168, 0.5);
  color: #d8b4fe;
}

.status-ready {
  background-color: #ede9fe;
  color: #5b21b6;
}

.dark .status-ready {
  background-color: rgba(91, 33, 182, 0.5);
  color: #c4b5fd;
}

.status-sending {
  background-color: #fef3c7;
  color: #92400e;
}

.dark .status-sending {
  background-color: rgba(146, 64, 14, 0.5);
  color: #fcd34d;
}

.status-sent {
  background-color: #d1fae5;
  color: #065f46;
}

.dark .status-sent {
  background-color: rgba(6, 95, 70, 0.5);
  color: #6ee7b7;
}

.status-error {
  background-color: #fee2e2;
  color: #991b1b;
}

.dark .status-error {
  background-color: rgba(153, 27, 27, 0.5);
  color: #fca5a5;
}

/* ========================================
   Navigation - Vue Original Styles
   ======================================== */

/* Navigation items - Vue original (py-3 rounded-xl min-h-[52px]) */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  color: #525252;
  transition: all 200ms;
  text-decoration: none;
  min-height: 52px;
}

.dark .nav-item {
  color: #a3a3a3;
}

.nav-item:hover {
  background-color: #f5f5f5;
}

.dark .nav-item:hover {
  background-color: #262626;
}

.nav-item-active {
  background: linear-gradient(to right, rgb(245, 243, 255), rgb(250, 245, 255));
  color: rgb(109, 40, 217);
}

.dark .nav-item-active {
  background: linear-gradient(to right, rgba(139, 92, 246, 0.3), rgba(168, 85, 247, 0.3));
  color: rgb(196, 181, 253);
}

/* Nav icons - Vue original (w-10 h-10 = 40x40) */
.nav-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
  color: #737373;
  transition: all 200ms;
}

.dark .nav-icon {
  background-color: #262626;
  color: #a3a3a3;
}

.nav-icon-active {
  background: linear-gradient(to bottom right, rgb(139, 92, 246), rgb(168, 85, 247));
  color: white;
  box-shadow: 0 10px 15px -3px rgba(139, 92, 246, 0.3);
}

/* New Freya Navigation Styles (w-72 sidebar) */
.nav-item-freya {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.75rem;
  color: #525252;
  transition: all 200ms;
  text-decoration: none;
}

.dark .nav-item-freya {
  color: #a3a3a3;
}

.nav-item-freya:hover {
  background-color: #f5f5f5;
}

.dark .nav-item-freya:hover {
  background-color: #262626;
}

.nav-item-freya-active {
  background: linear-gradient(to right, rgb(238, 242, 255), rgb(250, 245, 255));
  color: rgb(67, 56, 202);
}

.dark .nav-item-freya-active {
  background: linear-gradient(to right, rgba(139, 92, 246, 0.3), rgba(168, 85, 247, 0.3));
  color: rgb(196, 181, 253);
}

.nav-icon-freya {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
  color: #737373;
  flex-shrink: 0;
  transition: all 200ms;
}

.dark .nav-icon-freya {
  background-color: #262626;
  color: #a3a3a3;
}

.nav-icon-freya-active {
  background: linear-gradient(to bottom right, rgb(139, 92, 246), rgb(168, 85, 247));
  color: white;
  box-shadow: 0 10px 15px -3px rgba(139, 92, 246, 0.3);
}

/* Logout button */
.logout-btn-freya {
  background-color: transparent;
  color: #525252;
  border: none;
}

.dark .logout-btn-freya {
  color: #a3a3a3;
}

.logout-btn-freya:hover {
  background-color: rgb(254, 242, 242);
  color: rgb(220, 38, 38);
}

.dark .logout-btn-freya:hover {
  background-color: rgba(185, 28, 28, 0.2);
  color: rgb(248, 113, 113);
}

/* ========================================
   Tabs
   ======================================== */

.tab-item {
  padding: 1rem 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  color: #737373;
  transition: all 200ms;
  background: transparent;
  cursor: pointer;
}

.dark .tab-item {
  color: #a3a3a3;
}

.tab-item:hover {
  color: #404040;
  border-bottom-color: #d4d4d4;
}

.dark .tab-item:hover {
  color: #e5e5e5;
  border-bottom-color: #525252;
}

.tab-item-active {
  color: rgb(124, 58, 237);
  border-bottom-color: rgb(139, 92, 246);
}

.dark .tab-item-active {
  color: rgb(167, 139, 250);
}

/* ========================================
   Hero Section (Landing Page)
   ======================================== */

.hero-gradient {
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #ec4899 100%);
}

/* ========================================
   Utility Classes
   ======================================== */

.bg-surface-50 {
  background-color: #fafafa;
}

.bg-surface-100 {
  background-color: #f5f5f5;
}

.bg-surface-200 {
  background-color: #e5e5e5;
}

.bg-surface-600 {
  background-color: #525252;
}

.bg-surface-700 {
  background-color: #404040;
}

.bg-surface-800 {
  background-color: #262626;
}

.bg-surface-900 {
  background-color: #171717;
}

.text-surface-400 {
  color: #a3a3a3;
}

.text-surface-500 {
  color: #737373;
}

.text-surface-600 {
  color: #525252;
}

.text-surface-900 {
  color: #171717;
}

.dark .bg-surface-50 {
  background-color: #fafafa;
}

.dark .bg-surface-100 {
  background-color: #f5f5f5;
}

.dark .bg-surface-700 {
  background-color: #404040;
}

.dark .bg-surface-800 {
  background-color: #262626;
}

.dark .bg-surface-900 {
  background-color: #171717;
}

.dark .text-surface-400 {
  color: #a3a3a3;
}

.dark .text-surface-500 {
  color: #737373;
}

.dark .text-surface-600 {
  color: #525252;
}

.dark .text-surface-900 {
  color: #fafafa;
}

.dark .text-white {
  color: white;
}

.border-surface-100 {
  border-color: #f5f5f5;
}

.border-surface-200 {
  border-color: #e5e5e5;
}

.border-surface-700 {
  border-color: #404040;
}

.dark .border-surface-100 {
  border-color: #f5f5f5;
}

.dark .border-surface-200 {
  border-color: #e5e5e5;
}

.dark .border-surface-700 {
  border-color: #404040;
}

/* ========================================
   Gradient Utilities for Text
   ======================================== */

.bg-gradient-to-r {
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.from-violet-500 {
  --tw-gradient-from: rgb(139, 92, 246);
  --tw-gradient-to: rgb(139, 92, 246, 0);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.via-purple-500 {
  --tw-gradient-to: rgb(168, 85, 247, 0);
  --tw-gradient-stops: var(--tw-gradient-from), rgb(168, 85, 247), var(--tw-gradient-to);
}

.to-pink-500 {
  --tw-gradient-to: rgb(236, 72, 153);
}

.bg-clip-text {
  -webkit-background-clip: text;
  background-clip: text;
}

.text-transparent {
  color: transparent;
}

.from-orange-500 {
  --tw-gradient-from: rgb(249, 115, 22);
  --tw-gradient-to: rgb(249, 115, 22, 0);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.via-red-500 {
  --tw-gradient-to: rgb(239, 68, 68, 0);
  --tw-gradient-stops: var(--tw-gradient-from), rgb(239, 68, 68), var(--tw-gradient-to);
}

.to-pink-500 {
  --tw-gradient-to: rgb(236, 72, 153);
}

/* Gradient backgrounds for icons */
.bg-gradient-to-br {
  background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.from-violet-500.to-purple-500 {
  background: linear-gradient(to bottom right, rgb(139, 92, 246), rgb(168, 85, 247));
}

.from-orange-500.to-pink-500 {
  background: linear-gradient(to bottom right, rgb(249, 115, 22), rgb(236, 72, 153));
}

.from-purple-500.to-pink-500 {
  background: linear-gradient(to bottom right, rgb(168, 85, 247), rgb(236, 72, 153));
}

.from-emerald-500.to-teal-500 {
  background: linear-gradient(to bottom right, rgb(16, 185, 129), rgb(20, 184, 166));
}

.from-red-500.to-pink-500 {
  background: linear-gradient(to bottom right, rgb(239, 68, 68), rgb(236, 72, 153));
}

.from-amber-500.to-orange-500 {
  background: linear-gradient(to bottom right, rgb(245, 158, 11), rgb(249, 115, 22));
}

/* ========================================
   Transform Utilities for Sidebar
   ======================================== */

.-translate-x-full {
  transform: translateX(-100%);
}

.translate-x-0 {
  transform: translateX(0);
}

@media (min-width: 768px) {
  .md\:translate-x-0 {
    transform: translateX(0) !important;
  }

  .md\:static {
    position: static !important;
  }

  .md\:hidden {
    display: none !important;
  }

  .md\:block {
    display: block !important;
  }

  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1024px) {
  .lg\:translate-x-0 {
    transform: translateX(0) !important;
  }

  .lg\:hidden {
    display: none !important;
  }

  .lg\:block {
    display: block !important;
  }

  .lg\:ml-72 {
    margin-left: 18rem !important;
  }

  .lg\:pt-0 {
    padding-top: 0 !important;
  }

  .lg\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1280px) {
  .xl\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

/* ========================================
   Touch & Mobile Utilities
   ======================================== */

/* Touch-friendly minimum target size (44x44 per Apple HIG) */
.touch-target {
  min-height: 44px;
  min-width: 44px;
}

/* Touch manipulation for better touch response */
.touch-manipulation {
  touch-action: manipulation;
}

/* Hide scrollbar while keeping functionality */
.scrollbar-hide {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* ========================================
   Safe Area Insets (iOS notch support)
   ======================================== */

.safe-area-top {
  padding-top: env(safe-area-inset-top);
}

.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom);
}

.safe-area-left {
  padding-left: env(safe-area-inset-left);
}

.safe-area-right {
  padding-right: env(safe-area-inset-right);
}

.safe-area-inset {
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
}

/* ========================================
   Responsive Card Adjustments
   ======================================== */

@media (max-width: 639px) {
  .card-freya {
    padding: 1rem;
  }

  .stat-card,
  .stat-card-violet,
  .stat-card-emerald,
  .stat-card-red,
  .stat-card-purple {
    padding: 0.625rem;
    /* Slightly smaller on mobile */
  }
}

/* ========================================
   Responsive Button Adjustments
   ======================================== */

.btn-primary-freya,
.btn-primary-freya-orange,
.btn-secondary-freya,
.btn-outline-freya {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 639px) {

  .btn-primary-freya,
  .btn-primary-freya-orange,
  .btn-secondary-freya,
  .btn-outline-freya {
    padding: 0.625rem 1rem;
  }
}

/* ========================================
   Responsive Form Inputs
   ======================================== */

/* Prevent iOS zoom on input focus (requires 16px minimum) */
@media (max-width: 639px) {
  .input-freya {
    font-size: 16px;
  }
}

/* ========================================
   Responsive Navigation
   ======================================== */

@media (max-width: 767px) {
  .nav-item {
    min-height: 48px;
  }
}

/* ========================================
   Tab Scroll Indicator
   ======================================== */

.tabs-scroll-container {
  position: relative;
}

.tabs-scroll-container::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 2rem;
  background: linear-gradient(to left, white, transparent);
  pointer-events: none;
}

.dark .tabs-scroll-container::after {
  background: linear-gradient(to left, rgb(17, 24, 39), transparent);
}

/* ========================================
   Calendar Component
   ======================================== */

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}

.calendar-day {
  min-height: 80px;
  padding: 0.5rem;
  background-color: white;
  border: 1px solid #e5e5e5;
  transition: all 200ms;
}

.dark .calendar-day {
  background-color: #262626;
  border-color: #404040;
}

.calendar-day:hover {
  background-color: #fafafa;
}

.dark .calendar-day:hover {
  background-color: #303030;
}

.calendar-day-other-month {
  background-color: #f5f5f5;
  opacity: 0.5;
}

.dark .calendar-day-other-month {
  background-color: #1a1a1a;
}

.calendar-day-today {
  border-color: rgb(139, 92, 246);
  border-width: 2px;
}

.calendar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.calendar-dot-daily {
  background-color: rgb(139, 92, 246);
}

.calendar-dot-instant {
  background-color: rgb(245, 158, 11);
}

.calendar-dot-sent {
  background-color: rgb(16, 185, 129);
}

.calendar-dot-queued {
  background-color: transparent;
  border: 2px dashed rgb(139, 92, 246);
}

/* Email Badges in Calendar (Vue Original) */
.email-badge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.625rem;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
}

.email-badge-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.email-badge-icon {
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
}

.email-badge-sent-daily {
  background-color: #d1fae5;
  /* emerald-100 */
  color: #047857;
  /* emerald-700 */
}

.dark .email-badge-sent-daily {
  background-color: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  /* emerald-300 */
}

.email-badge-sent-instant {
  background-color: #ffedd5;
  /* orange-100 */
  color: #c2410c;
  /* orange-700 */
}

.dark .email-badge-sent-instant {
  background-color: rgba(249, 115, 22, 0.2);
  color: #fdba74;
  /* orange-300 */
}

.email-badge-queued {
  background-color: transparent;
  border: 1px dashed #8b5cf6;
  /* violet-500 */
  color: #6d28d9;
  /* violet-700 */
}

.dark .email-badge-queued {
  border-color: #a78bfa;
  /* violet-400 */
  color: #c4b5fd;
  /* violet-300 */
}

.email-badge-scheduled-daily {
  background-color: #ede9fe;
  /* violet-100 */
  color: #5b21b6;
  /* violet-800 */
}

.dark .email-badge-scheduled-daily {
  background-color: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
}

.email-badge-scheduled-instant {
  background-color: #fef3c7;
  /* amber-100 */
  color: #92400e;
  /* amber-800 */
}

.dark .email-badge-scheduled-instant {
  background-color: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

/* Calendar responsive */
@media (max-width: 639px) {
  .calendar-day {
    min-height: 60px;
    padding: 0.25rem;
  }

  .calendar-day-number {
    font-size: 0.75rem;
  }

  .calendar-email-badge,
  .email-badge {
    display: none;
  }

  .calendar-dot {
    width: 6px;
    height: 6px;
  }
}

@media (max-width: 374px) {
  .calendar-day {
    min-height: 48px;
  }
}

/* ========================================
   Mode Cards (Email Editors)
   ======================================== */

.mode-card-freya {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 2px solid #e5e5e5;
  cursor: pointer;
  transition: all 200ms;
}

.dark .mode-card-freya {
  border-color: #525252;
}

.mode-card-freya:hover {
  border-color: #d4d4d4;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dark .mode-card-freya:hover {
  border-color: #737373;
}

/* Violet active state (Queue) */
.mode-card-active-violet {
  border-color: rgb(139, 92, 246);
  background-color: rgb(245, 243, 255);
  box-shadow: 0 1px 3px rgba(139, 92, 246, 0.1);
}

.dark .mode-card-active-violet {
  background-color: rgba(139, 92, 246, 0.2);
}

/* Emerald active state (Date) */
.mode-card-active-emerald {
  border-color: rgb(16, 185, 129);
  background-color: rgb(236, 253, 245);
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.1);
}

.dark .mode-card-active-emerald {
  background-color: rgba(16, 185, 129, 0.2);
}

/* Amber active state (Day of Week) */
.mode-card-active-amber {
  border-color: rgb(245, 158, 11);
  background-color: rgb(255, 251, 235);
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.1);
}

.dark .mode-card-active-amber {
  background-color: rgba(245, 158, 11, 0.2);
}

/* Orange active state (Send Now) */
.mode-card-active-orange {
  border-color: rgb(249, 115, 22);
  background-color: rgb(255, 247, 237);
  box-shadow: 0 1px 3px rgba(249, 115, 22, 0.1);
}

.dark .mode-card-active-orange {
  background-color: rgba(249, 115, 22, 0.2);
}

/* Cyan active state (Schedule) */
.mode-card-active-cyan {
  border-color: rgb(6, 182, 212);
  background-color: rgb(236, 254, 255);
  box-shadow: 0 1px 3px rgba(6, 182, 212, 0.1);
}

.dark .mode-card-active-cyan {
  background-color: rgba(6, 182, 212, 0.2);
}

/* Mode card icon container */
.mode-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 200ms;
  background-color: #f5f5f5;
  color: #737373;
}

.dark .mode-icon {
  background-color: #404040;
  color: #a3a3a3;
}

/* Mode icon active states */
.mode-icon-violet {
  background-color: rgb(237, 233, 254);
  color: rgb(124, 58, 237);
}

.dark .mode-icon-violet {
  background-color: rgba(139, 92, 246, 0.3);
  color: rgb(167, 139, 250);
}

.mode-icon-emerald {
  background-color: rgb(209, 250, 229);
  color: rgb(5, 150, 105);
}

.dark .mode-icon-emerald {
  background-color: rgba(16, 185, 129, 0.3);
  color: rgb(110, 231, 183);
}

.mode-icon-amber {
  background-color: rgb(254, 243, 199);
  color: rgb(180, 83, 9);
}

.dark .mode-icon-amber {
  background-color: rgba(245, 158, 11, 0.3);
  color: rgb(252, 211, 77);
}

.mode-icon-orange {
  background-color: rgb(255, 237, 213);
  color: rgb(234, 88, 12);
}

.dark .mode-icon-orange {
  background-color: rgba(249, 115, 22, 0.3);
  color: rgb(251, 146, 60);
}

.mode-icon-cyan {
  background-color: rgb(207, 250, 254);
  color: rgb(8, 145, 178);
}

.dark .mode-icon-cyan {
  background-color: rgba(6, 182, 212, 0.3);
  color: rgb(34, 211, 238);
}

/* ========================================
   Day of Week Buttons
   ======================================== */

.day-btn-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  padding: 0.75rem;
  background-color: #fafafa;
  border-radius: 0.75rem;
  border: 1px solid #e5e5e5;
}

.dark .day-btn-grid {
  background-color: #262626;
  border-color: #404040;
}

.day-btn {
  width: 100%;
  height: 2.75rem;
  border-radius: 0.5rem;
  border: 2px solid #e5e5e5;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #525252;
  background-color: white;
  cursor: pointer;
  transition: all 200ms;
}

.dark .day-btn {
  border-color: #404040;
  color: #a3a3a3;
  background-color: #171717;
}

.day-btn:hover {
  border-color: rgb(251, 191, 36);
  background-color: rgb(255, 251, 235);
  color: rgb(146, 64, 14);
}

.dark .day-btn:hover {
  border-color: rgb(180, 83, 9);
  background-color: rgba(245, 158, 11, 0.15);
  color: rgb(252, 211, 77);
}

.day-btn-active {
  border-color: rgb(245, 158, 11);
  background: linear-gradient(135deg, rgb(251, 191, 36), rgb(245, 158, 11));
  color: white;
  box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.3);
}

.day-btn-active:hover {
  background: linear-gradient(135deg, rgb(252, 211, 77), rgb(251, 191, 36));
  border-color: rgb(251, 191, 36);
}

.dark .day-btn-active {
  border-color: rgb(245, 158, 11);
  background: linear-gradient(135deg, rgb(251, 191, 36), rgb(245, 158, 11));
  color: white;
}

/* Responsive: 4 columns on small screens */
@media (max-width: 480px) {
  .day-btn-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========================================
   Mode Card Selection Checkmark
   ======================================== */

.mode-check {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

/* ========================================
   Provider Cards (Settings)
   ======================================== */

.provider-card {
  padding: 1rem;
  border-radius: 0.75rem;
  border: 2px solid #e5e5e5;
  background-color: white;
  transition: all 200ms;
}

.dark .provider-card {
  background-color: #262626;
  border-color: #404040;
}

.provider-card-active {
  border-color: rgb(139, 92, 246);
  background: linear-gradient(to bottom right, rgba(139, 92, 246, 0.05), rgba(168, 85, 247, 0.05));
}

.dark .provider-card-active {
  border-color: rgb(139, 92, 246);
  background: linear-gradient(to bottom right, rgba(139, 92, 246, 0.15), rgba(168, 85, 247, 0.15));
}

.provider-card-disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.provider-card-disabled:hover {
  border-color: #e5e5e5;
}

.dark .provider-card-disabled:hover {
  border-color: #404040;
}

/* ========================================
   Integration Cards
   ======================================== */

.integration-card {
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e5e5;
  background-color: white;
  transition: all 200ms;
}

.dark .integration-card {
  background-color: #262626;
  border-color: #404040;
}

.integration-card:hover {
  border-color: #d4d4d4;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.dark .integration-card:hover {
  border-color: #525252;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Modal (Native Dialog)
   ======================================== */

.modal-freya {
  padding: 0;
  border: none;
  border-radius: 0.75rem;
  max-width: 90vw;
  max-height: 90vh;
  background-color: white;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.dark .modal-freya {
  background-color: #262626;
}

.modal-freya::backdrop {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content-freya {
  padding: 1.5rem;
  width: 100%;
  overflow-y: auto;
}

@media (max-width: 640px) {
  .modal-freya {
    max-width: 95vw;
    border-radius: 1rem 1rem 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    max-height: 85vh;
  }

  .modal-content-freya {
    padding: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }
}

/* ========================================
   TipTap Editor
   ======================================== */

.tiptap-editor-wrapper {
  border: 1px solid #e5e5e5;
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 200ms;
  display: flex;
  flex-direction: column;
}

.dark .tiptap-editor-wrapper {
  background-color: #171717;
  border-color: #525252;
}

.tiptap-editor-wrapper:focus-within {
  border-color: rgb(139, 92, 246);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.tiptap-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background-color: #fafafa;
  border-bottom: 1px solid #e5e5e5;
  overflow-x: auto;
  flex-shrink: 0;
}

.dark .tiptap-toolbar {
  background-color: #262626;
  border-bottom-color: #404040;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: nowrap;
}

.toolbar-btn svg {
  width: 1rem;
  height: 1rem;
}

@media (min-width: 640px) {
  .toolbar-btn svg {
    width: 1.125rem;
    height: 1.125rem;
  }
}

.toolbar-divider {
  width: 1px;
  height: 1.5rem;
  background-color: #e5e5e5;
  margin: 0 0.5rem;
}

.dark .toolbar-divider {
  background-color: #525252;
}

.toolbar-btn {
  padding: 0.5rem;
  border-radius: 0.375rem;
  color: #737373;
  background-color: transparent;
  border: none;
  cursor: pointer;
  transition: all 150ms;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark .toolbar-btn {
  color: #a3a3a3;
}

.toolbar-btn:hover {
  background-color: white;
  color: #404040;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dark .toolbar-btn:hover {
  background-color: #404040;
  color: #e5e5e5;
}

.toolbar-btn.active {
  background-color: rgb(237, 233, 254);
  color: rgb(109, 40, 217);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dark .toolbar-btn.active {
  background-color: rgba(139, 92, 246, 0.3);
  color: rgb(196, 181, 253);
}

.toolbar-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.toolbar-btn:disabled:hover {
  background-color: transparent;
  box-shadow: none;
}

.paste-btn {
  background-color: rgb(245, 243, 255);
  color: rgb(124, 58, 237);
  border: 1px solid rgb(221, 214, 254);
}

.dark .paste-btn {
  background-color: rgba(139, 92, 246, 0.2);
  color: rgb(167, 139, 250);
  border-color: rgb(91, 33, 182);
}

.paste-btn:hover {
  background-color: rgb(237, 233, 254);
}

.dark .paste-btn:hover {
  background-color: rgba(139, 92, 246, 0.3);
}

.paste-label {
  display: none;
}

.tiptap-content-wrapper {
  min-height: 250px;
  max-height: 400px;
  overflow-y: auto;
}

.tiptap-content {
  min-height: 250px;
}

.tiptap-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background-color: #fafafa;
  border-top: 1px solid #e5e5e5;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .tiptap-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.dark .tiptap-footer {
  background-color: #262626;
  border-top-color: #404040;
}

.word-count-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.word-count-bar {
  width: 6rem;
  height: 0.5rem;
  background-color: #e5e5e5;
  border-radius: 9999px;
  overflow: hidden;
}

.dark .word-count-bar {
  background-color: #404040;
}

.word-count-progress {
  height: 100%;
  border-radius: 9999px;
  transition: all 300ms;
}

.word-count-text {
  font-size: 0.875rem;
  color: #525252;
}

.dark .word-count-text {
  color: #a3a3a3;
}

.words-remaining {
  font-size: 0.75rem;
  color: #737373;
}

.dark .words-remaining {
  color: #737373;
}

.words-exceeded {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgb(220, 38, 38);
}

.dark .words-exceeded {
  color: rgb(248, 113, 113);
}

.goal-reached {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgb(5, 150, 105);
}

.dark .goal-reached {
  color: rgb(110, 231, 183);
}

.save-hint {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: #a3a3a3;
}

.kbd {
  padding: 0.125rem 0.375rem;
  background-color: #e5e5e5;
  border-radius: 0.25rem;
  font-size: 0.625rem;
  font-family: monospace;
  font-weight: 600;
}

.dark .kbd {
  background-color: #404040;
}

.save-status {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  background-color: #f5f5f5;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgb(139, 92, 246);
  transition: all 200ms;
}

.dark .save-status {
  background-color: #404040;
}

/* Toast notification */
.toast-notification {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background-color: white;
  color: #171717;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 1px solid #e5e5e5;
  z-index: 50;
  animation: toastIn 0.3s ease;
}

.dark .toast-notification {
  background-color: #262626;
  color: white;
  border-color: #525252;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.toast-fade-out {
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  transition: all 0.3s ease;
}

/* Fullscreen mode */
.fullscreen-mode {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100vh;
  height: 100dvh;
  z-index: 50;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  border: none;
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

.fullscreen-mode .tiptap-toolbar {
  flex-shrink: 0;
  border-radius: 0;
}

.fullscreen-mode .tiptap-content-wrapper {
  flex: 1 1 0%;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.fullscreen-mode .tiptap-footer {
  flex-shrink: 0;
  border-radius: 0;
}

/* Mobile responsive editor */
@media (max-width: 640px) {
  .tiptap-toolbar {
    gap: 0.125rem;
    padding: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }

  .toolbar-group {
    flex-wrap: nowrap;
  }

  .toolbar-btn {
    padding: 0.5rem;
    flex-shrink: 0;
    min-width: 40px;
    min-height: 40px;
  }

  .toolbar-divider {
    height: 1.25rem;
    margin: 0 0.375rem;
  }

  .tiptap-content-wrapper {
    min-height: 250px;
    max-height: 350px;
  }

  .tiptap-footer {
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
  }

  .word-count-bar {
    width: 4rem;
  }

  .word-count-text {
    font-size: 0.75rem;
  }

  .paste-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border-width: 2px;
  }

  .paste-label {
    display: inline;
    font-size: 0.75rem;
    font-weight: 600;
  }

  .toast-notification {
    bottom: 6rem;
    left: 1rem;
    right: 1rem;
    transform: none;
  }

  @keyframes toastIn {
    from {
      opacity: 0;
      transform: translateY(20px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .toast-fade-out {
    opacity: 0;
    transform: translateY(20px);
  }

  /* Fullscreen mobile toolbar */
  .fullscreen-mode .tiptap-toolbar {
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.98), rgba(249, 250, 251, 0.98));
  }

  .dark .fullscreen-mode .tiptap-toolbar {
    background: linear-gradient(to bottom, rgba(30, 30, 30, 0.98), rgba(23, 23, 23, 0.98));
  }

  .fullscreen-mode .toolbar-btn {
    min-width: 46px;
    min-height: 46px;
    padding: 0.625rem;
    border-radius: 0.75rem;
    background-color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  }

  .dark .fullscreen-mode .toolbar-btn {
    background-color: #404040;
  }

  .fullscreen-mode .toolbar-btn:active {
    transform: scale(0.95);
  }

  .fullscreen-mode .toolbar-btn.active {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  .fullscreen-mode .toolbar-divider {
    height: 2rem;
    margin: 0 0.5rem;
  }

  .fullscreen-mode .tiptap-footer {
    padding: 0.75rem 1rem;
  }
}

/* ========================================
   Footer Editor (Simplified TipTap)
   ======================================== */

.footer-editor-wrapper {
  border: 1px solid #e5e5e5;
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 200ms;
}

.dark .footer-editor-wrapper {
  background-color: #171717;
  border-color: #525252;
}

.footer-editor-wrapper:focus-within {
  border-color: rgb(139, 92, 246);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.footer-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background-color: #fafafa;
  border-bottom: 1px solid #e5e5e5;
  flex-wrap: wrap;
}

.dark .footer-editor-toolbar {
  background-color: #262626;
  border-bottom-color: #404040;
}

.footer-toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.footer-toolbar-divider {
  width: 1px;
  height: 1.5rem;
  background-color: #e5e5e5;
  margin: 0 0.25rem;
}

.dark .footer-toolbar-divider {
  background-color: #525252;
}

.footer-toolbar-btn {
  padding: 0.375rem;
  border-radius: 0.375rem;
  color: #737373;
  background-color: transparent;
  border: none;
  cursor: pointer;
  transition: all 150ms;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark .footer-toolbar-btn {
  color: #a3a3a3;
}

.footer-toolbar-btn:hover {
  background-color: white;
  color: #404040;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dark .footer-toolbar-btn:hover {
  background-color: #404040;
  color: #e5e5e5;
}

.footer-toolbar-btn.active {
  background-color: rgb(237, 233, 254);
  color: rgb(109, 40, 217);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dark .footer-toolbar-btn.active {
  background-color: rgba(139, 92, 246, 0.3);
  color: rgb(196, 181, 253);
}

.footer-variable-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  background-color: rgb(245, 243, 255);
  color: rgb(124, 58, 237);
  border: 1px solid rgb(221, 214, 254);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms;
}

.dark .footer-variable-btn {
  background-color: rgba(139, 92, 246, 0.2);
  color: rgb(167, 139, 250);
  border-color: rgb(91, 33, 182);
}

.footer-variable-btn:hover {
  background-color: rgb(237, 233, 254);
  border-color: rgb(196, 181, 253);
}

.dark .footer-variable-btn:hover {
  background-color: rgba(139, 92, 246, 0.3);
}

.footer-editor-content-wrapper {
  min-height: 120px;
  max-height: 200px;
  overflow-y: auto;
}

.footer-editor-content {
  height: 100%;
}

/* Mobile responsive footer editor */
@media (max-width: 640px) {
  .footer-editor-toolbar {
    padding: 0.5rem;
    gap: 0.375rem;
  }

  .footer-toolbar-btn {
    padding: 0.5rem;
    min-width: 36px;
    min-height: 36px;
  }

  .footer-variable-btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.6875rem;
  }

  .footer-variable-btn span {
    display: none;
  }

  .footer-editor-content-wrapper {
    min-height: 100px;
  }
}

/* ========================================
   Vue Original Layout - Safe Area Utilities
   ======================================== */

/* Safe area wrapper for the entire app */
.safe-area-wrapper {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Mobile header safe area (for iOS notch) */
.mobile-header {
  padding-top: env(safe-area-inset-top);
}

/* Sidebar safe area */
.sidebar-safe-area {
  padding-left: env(safe-area-inset-left);
}

/* Safe padding utilities - Vue original */
.pt-safe {
  padding-top: max(1.5rem, env(safe-area-inset-top));
}

.pb-safe {
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

/* ========================================
   Surface Color Scale (Vue Original)
   ======================================== */

.bg-surface-950 {
  background-color: #0a0a0a;
}

.dark .bg-surface-950 {
  background-color: #0a0a0a;
}

.border-surface-800 {
  border-color: #262626;
}

.dark .border-surface-800 {
  border-color: #262626;
}

/* ========================================
   Navigation Responsive Adjustments
   ======================================== */

@media (max-width: 1024px) {
  .nav-item {
    padding: 0.875rem 0.75rem;
    min-height: 56px;
  }

  .nav-icon {
    width: 2.75rem;
    height: 2.75rem;
  }
}