/* ══════════════════════════════════════════════════════════════
   COMPONENTS.CSS — Reusable Component Library
   All shared UI patterns: cards, buttons, inputs, modals,
   badges, sidebars, navigation, skeleton loaders, etc.
   ══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════
   GLASS CARDS
   ═══════════════════════════════════════════════════ */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: all var(--ease-spring);
}

.glass:not(nav):not(.no-hover):hover {
  transform: translateY(-6px);
  border-color: rgba(59, 130, 246, 0.30);
}

.dark .glass:not(nav):not(.no-hover):hover {
  box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.3);
}

html:not(.dark) .glass:not(nav):not(.no-hover):hover {
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.10);
}

.glass-solid {
  background: var(--bg-card-solid);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-default);
}


/* ═══════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════ */
.card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  transition: all var(--ease-spring);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.25);
  box-shadow: var(--shadow-lg);
}

/* Stat Card — for dashboard metric cards */
.stat-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
  transition: all var(--ease-base);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.5;
  pointer-events: none;
}

.stat-card--blue::before    { background: var(--primary-glow); }
.stat-card--emerald::before { background: var(--emerald-glow); }
.stat-card--amber::before   { background: var(--amber-glow); }
.stat-card--red::before     { background: var(--red-glow); }
.stat-card--purple::before  { background: rgba(168, 85, 247, 0.20); }

.stat-card__label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-2);
}

.stat-card--blue .stat-card__label    { color: var(--primary); }
.stat-card--emerald .stat-card__label { color: var(--emerald); }
.stat-card--amber .stat-card__label   { color: var(--amber); }
.stat-card--red .stat-card__label     { color: var(--red); }
.stat-card--purple .stat-card__label  { color: var(--purple); }

.stat-card__value {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
}

/* Server Plan Card */
.server-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition: all var(--ease-spring);
}

.server-card:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 130, 246, 0.30);
  box-shadow: var(--shadow-glow-blue);
}

.server-card__image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.server-card__body {
  padding: var(--space-5);
}

.server-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.server-card__specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.server-card__spec {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.server-card__spec i {
  color: var(--primary);
  width: 1rem;
  text-align: center;
}

.server-card__price {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--emerald);
  margin-bottom: var(--space-4);
}

.server-card__price span {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-tertiary);
}


/* ═══════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.75rem;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all 0.4s ease;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

.btn:active {
  transform: scale(0.97);
}

/* Primary Button */
.btn-primary {
  background-image: linear-gradient(to right, var(--primary) 0%, var(--secondary) 51%, var(--primary) 100%);
  background-size: 200%;
  color: white;
  box-shadow: 0 4px 15px rgba(135, 80, 247, 0.2);
}

.btn-primary i {
  transform: rotate(-45deg);
  transition: 0.4s;
}

.btn-primary:hover {
  background-position: -100%;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(135, 80, 247, 0.4);
}

.btn-primary:hover i {
  transform: rotate(0);
}

/* Secondary / Outline Button */
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-default);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--primary);
  color: var(--primary);
}

/* Success Button */
.btn-success {
  background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
  color: white;
  box-shadow: var(--shadow-glow-emerald);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.40);
}

/* Danger Button */
.btn-danger {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: white;
  box-shadow: var(--shadow-glow-red);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.40);
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

/* Icon Button (square) */
.btn-icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

/* Button Sizes */
.btn-sm  { padding: 0.5rem 1rem; font-size: 0.75rem; border-radius: var(--radius-md); }
.btn-lg  { padding: 1rem 2rem; font-size: 1rem; border-radius: var(--radius-2xl); }
.btn-xl  { padding: 1.25rem 2.5rem; font-size: 1.1rem; border-radius: var(--radius-2xl); }
.btn-full { width: 100%; }

/* Pill Button */
.btn-pill {
  border-radius: var(--radius-full);
  padding: 0.625rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

/* Button loading state */
.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn.loading::after {
  content: '';
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: var(--space-2);
}


/* ═══════════════════════════════════════════════════
   FORM INPUTS
   ═══════════════════════════════════════════════════ */
.input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all var(--ease-base);
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.input::placeholder {
  color: var(--text-tertiary);
}

.input-sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  border-radius: var(--radius-md);
}

.input-lg {
  padding: 1rem 1.25rem;
  font-size: 1rem;
  border-radius: var(--radius-2xl);
}

/* Textarea */
.textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-size: 0.875rem;
  min-height: 100px;
  resize: vertical;
  transition: border-color var(--ease-base), box-shadow var(--ease-base);
}

.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Select */
.select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-size: 0.875rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8.825L1.175 4 2.238 2.938 6 6.7 9.763 2.937 10.825 4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
  cursor: pointer;
  transition: border-color var(--ease-base), box-shadow var(--ease-base);
}

.select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Checkbox styled */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.checkbox-wrapper input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Form Group */
.form-group {
  margin-bottom: var(--space-4);
}

.form-group label {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: var(--space-2);
}


/* ═══════════════════════════════════════════════════
   BADGES / PILLS
   ═══════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-primary {
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary);
  border-color: rgba(59, 130, 246, 0.20);
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  border-color: rgba(16, 185, 129, 0.20);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.20);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.20);
}

.badge-info {
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan);
  border-color: rgba(6, 182, 212, 0.20);
}

.badge-neutral {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border-color: var(--border-default);
}

.badge-purple {
  background: rgba(168, 85, 247, 0.15);
  color: var(--purple);
  border-color: rgba(168, 85, 247, 0.20);
}


/* ═══════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.60);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--ease-base), visibility var(--ease-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-3xl);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--space-8);
  transform: translateY(30px) scale(0.95);
  opacity: 0;
  transition: all var(--ease-spring);
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-content-lg {
  max-width: 720px;
}

.modal-content-xl {
  max-width: 960px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-close {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all var(--ease-base);
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
}


/* ═══════════════════════════════════════════════════
   NAVIGATION BAR
   ═══════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  padding: var(--space-4) var(--space-6);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border);
  transition: all var(--ease-base);
}

.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.navbar-logo {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.navbar-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.navbar-title span {
  font-weight: 400;
  color: var(--text-secondary);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-link {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--ease-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.nav-link.active {
  color: var(--primary);
}

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 1.25rem;
  color: var(--text-primary);
  cursor: pointer;
}

@media (max-width: 768px) {
  .navbar-links { display: none; }
  .menu-toggle  { display: flex; }
}


/* ═══════════════════════════════════════════════════
   MOBILE MENU (Full-screen overlay)
   ═══════════════════════════════════════════════════ */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: var(--bg-body);
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-xl);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all var(--ease-base);
}

.mobile-menu-link:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.mobile-menu-link i {
  width: 1.25rem;
  text-align: center;
  color: var(--primary);
}


/* ═══════════════════════════════════════════════════
   SIDEBAR (Dashboard & Admin)
   ═══════════════════════════════════════════════════ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: var(--z-fixed);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-nav {
  flex: 1;
  padding: var(--space-4);
  overflow-y: auto;
}

.sidebar-footer {
  padding: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.75rem 1rem;
  margin-bottom: 0.25rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-item:hover {
  color: var(--text-primary);
  background: rgba(59, 130, 246, 0.05);
  border-color: rgba(59, 130, 246, 0.10);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.08);
}

.sidebar-item.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-glow-blue);
}

.sidebar-item i {
  width: 1.25rem;
  text-align: center;
  font-size: 0.875rem;
}

.sidebar-item .lock-icon {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--amber);
}

/* Main Content when sidebar is present */
.main-with-sidebar {
  margin-left: 280px;
  min-height: 100vh;
  padding: var(--space-8);
  transition: margin-left 0.3s ease;
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-with-sidebar {
    margin-left: 0;
  }
}


/* ═══════════════════════════════════════════════════
   SKELETON LOADERS
   ═══════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.03) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

html:not(.dark) .skeleton {
  background: linear-gradient(90deg,
    rgba(0,0,0,0.04) 25%,
    rgba(0,0,0,0.08) 50%,
    rgba(0,0,0,0.04) 75%);
  background-size: 200% 100%;
}

.skeleton-text {
  height: 0.875rem;
  margin-bottom: var(--space-2);
  border-radius: var(--radius-xs);
}

.skeleton-title {
  height: 1.25rem;
  width: 60%;
  margin-bottom: var(--space-3);
}

.skeleton-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
}

.skeleton-image {
  width: 100%;
  height: 180px;
  border-radius: var(--radius-lg);
}

.skeleton-card {
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  border: 1px solid var(--border-subtle);
}


/* ═══════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.875rem 1.25rem;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  pointer-events: auto;
  animation: slideInRight 0.4s var(--ease-spring) forwards;
  min-width: 280px;
  max-width: 420px;
}

.toast-info    { border-left: 4px solid var(--primary); }
.toast-success { border-left: 4px solid var(--emerald); }
.toast-error   { border-left: 4px solid var(--red); }
.toast-warning { border-left: 4px solid var(--amber); }

.toast-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.toast-info .toast-icon    { color: var(--primary); }
.toast-success .toast-icon { color: var(--emerald); }
.toast-error .toast-icon   { color: var(--red); }
.toast-warning .toast-icon { color: var(--amber); }

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

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

.toast.removing {
  animation: slideOutRight 0.3s ease forwards;
}

@media (max-width: 640px) {
  .toast-container {
    left: var(--space-4);
    right: var(--space-4);
    top: var(--space-4);
  }
  .toast {
    min-width: auto;
    max-width: 100%;
  }
}


/* ═══════════════════════════════════════════════════
   AVATAR
   ═══════════════════════════════════════════════════ */
.avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid transparent;
  transition: border-color var(--ease-base);
}

.avatar:hover {
  border-color: var(--primary);
}

.avatar-sm { width: 2rem;   height: 2rem; }
.avatar-lg { width: 3rem;   height: 3rem; }
.avatar-xl { width: 4rem;   height: 4rem; }

.avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  box-shadow: var(--shadow-glow-blue);
}


/* ═══════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════ */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border-default);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-default);
}

.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: var(--bg-elevated);
}


/* ═══════════════════════════════════════════════════
   TABS
   ═══════════════════════════════════════════════════ */
.tabs {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-1);
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  overflow-x: auto;
}

.tab {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: transparent;
  white-space: nowrap;
  transition: all var(--ease-base);
}

.tab:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.tab.active {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-glow-blue);
}


/* ═══════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-8);
}

.empty-state-icon {
  font-size: 3rem;
  color: var(--text-tertiary);
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.empty-state-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto;
}


/* ═══════════════════════════════════════════════════
   WHATSAPP WIDGET
   ═══════════════════════════════════════════════════ */
.whatsapp-widget {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-popover);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-3);
}

.whatsapp-btn {
  position: relative;
  width: 3.5rem;
  height: 3.5rem;
  background: var(--emerald);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.75rem;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.40);
  cursor: pointer;
  border: none;
  transition: transform var(--ease-base);
}

.whatsapp-btn:hover {
  transform: scale(1.1);
}

.whatsapp-ping {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--emerald);
  opacity: 0.6;
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.whatsapp-popup {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  width: 320px;
  box-shadow: var(--shadow-xl);
}

@media (max-width: 640px) {
  .whatsapp-widget {
    bottom: var(--space-4);
    right: var(--space-4);
  }
  .whatsapp-btn {
    width: 3rem;
    height: 3rem;
    font-size: 1.5rem;
  }
  .whatsapp-popup {
    width: calc(100vw - 2rem);
  }
}


/* ═══════════════════════════════════════════════════
   LOCKED SECTION
   ═══════════════════════════════════════════════════ */
.locked-section {
  text-align: center;
  padding: var(--space-20) var(--space-8);
  max-width: 480px;
  margin: 0 auto;
}

.locked-icon {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-6);
  font-size: 2rem;
  color: var(--amber);
  border: 2px solid var(--amber-glow);
}

.locked-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.locked-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
  line-height: 1.6;
}


/* ═══════════════════════════════════════════════════
   CUSTOM SCROLLBAR (for specific containers)
   ═══════════════════════════════════════════════════ */
.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.10);
  border-radius: 4px;
}
html:not(.dark) .custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.10);
}


/* ═══════════════════════════════════════════════════
   DIVIDER
   ═══════════════════════════════════════════════════ */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border-default);
  margin: var(--space-6) 0;
}


/* ═══════════════════════════════════════════════════
   PRICING TABLE
   ═══════════════════════════════════════════════════ */
.pricing-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-3xl);
  padding: var(--space-8);
  text-align: center;
  transition: all var(--ease-spring);
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-8px);
  border-color: rgba(59, 130, 246, 0.40);
  box-shadow: var(--shadow-glow-blue);
}

.pricing-card.popular {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow-blue);
}

.pricing-card.popular::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-size: 0.625rem;
  font-weight: 800;
  padding: 0.25rem 1rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.1em;
}

.pricing-card__name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.pricing-card__price {
  font-size: 3rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.pricing-card__price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-tertiary);
}

.pricing-card__features {
  text-align: left;
  margin: var(--space-6) 0;
}

.pricing-card__feature {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.pricing-card__feature i {
  color: var(--emerald);
  font-size: 0.75rem;
}


/* ═══════════════════════════════════════════════════
   MARQUEE BANNER
   ═══════════════════════════════════════════════════ */
.marquee-banner {
  overflow: hidden;
  white-space: nowrap;
  padding: var(--space-3) 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.marquee-text {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 40s linear infinite;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-tertiary);
  will-change: transform;
}


/* ═══════════════════════════════════════════════════
   IFRAME WORKSPACE
   ═══════════════════════════════════════════════════ */
.iframe-workspace {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: var(--z-workspace);
  display: none;
  flex-direction: column;
}

.iframe-workspace.active {
  display: flex;
}

.iframe-workspace__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-6);
  background: var(--slate-900);
  border-bottom: 1px solid var(--border-subtle);
}

.iframe-workspace iframe {
  flex: 1;
  border: none;
  width: 100%;
  height: 100%;
}


/* ═══════════════════════════════════════════════════
   QUILL EDITOR OVERRIDES
   ═══════════════════════════════════════════════════ */
.ql-toolbar.ql-snow {
  border-color: var(--border-default) !important;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
  background: var(--bg-elevated) !important;
}

.ql-container.ql-snow {
  border-color: var(--border-default) !important;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg) !important;
  min-height: 150px;
}

.ql-editor {
  color: var(--text-primary) !important;
  font-family: var(--font-sans) !important;
}

.ql-snow .ql-stroke {
  stroke: var(--text-secondary) !important;
}

.ql-snow .ql-fill {
  fill: var(--text-secondary) !important;
}

.ql-snow .ql-picker-label {
  color: var(--text-secondary) !important;
}
