/* ========================================
   Dashboard Styles
   Uses CSS variables from main.css
   ======================================== */

/* Dashboard Layout */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* ========================================
   Content Loader (shows while page loads)
   ======================================== */

.content-loader {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 260px; /* Same as sidebar width */
  background: hsl(var(--background));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Adjust for collapsed sidebar */
.sidebar.collapsed ~ .dashboard-main .content-loader {
  left: 72px;
}

/* Adjust for mobile (no sidebar visible) */
@media (max-width: 1024px) {
  .content-loader {
    left: 0;
  }
}

.content-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.content-loader-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.content-loader .spinner-icon {
  color: hsl(var(--muted-foreground));
  animation: spin 1s linear infinite;
}

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

/* ========================================
   Sidebar
   ======================================== */


/* Header Link */
.header-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: hsl(var(--secondary));
  border-radius: 0.75rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
}

.header-link:hover {
  color: hsl(var(--foreground));
  background: hsl(var(--foreground) / 0.08);
}


.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 260px;
  background-color: hsl(var(--card));
  border-right: 1px solid hsl(var(--border));
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: width 0.3s ease, transform 0.3s ease;
}

.sidebar.collapsed {
  width: 72px;
  cursor: e-resize;
}

/* Collapsed sidebar - hide toggle button since clicking anywhere expands */
.sidebar.collapsed .sidebar-toggle {
  display: none;
}

.sidebar.collapsed .nav-text,
.sidebar.collapsed .sidebar-section-title,
.sidebar.collapsed .profile-info,
.sidebar.collapsed .sidebar-logo-text {
  display: none;
}

.sidebar.collapsed .sidebar-header {
  padding: 1rem 0.75rem;
}

.sidebar.collapsed .nav-item {
  padding: 0.75rem;
}

.sidebar.collapsed .nav-item:hover {
  background-color: transparent;
}

.sidebar.collapsed .nav-item svg {
  margin-right: 0;
}

.sidebar.collapsed .profile-section {
  padding: 0.75rem;
}

.sidebar.collapsed .profile-section:hover {
  background-color: transparent;
}

.sidebar.collapsed .profile-avatar {
  margin-right: 0;
}

/* Immediate collapsed state from html class (prevents flash on page load) */
html.sidebar-collapsed .sidebar {
  width: 72px;
  cursor: e-resize;
}

html.sidebar-collapsed .sidebar .sidebar-toggle {
  display: none;
}

html.sidebar-collapsed .sidebar .nav-text,
html.sidebar-collapsed .sidebar .sidebar-section-title,
html.sidebar-collapsed .sidebar .profile-info,
html.sidebar-collapsed .sidebar .sidebar-logo-text {
  display: none;
}

html.sidebar-collapsed .sidebar .sidebar-header {
  padding: 1rem 0.75rem;
}

html.sidebar-collapsed .sidebar .nav-item {
  padding: 0.75rem;
}

html.sidebar-collapsed .sidebar .nav-item:hover {
  background-color: transparent;
}

html.sidebar-collapsed .sidebar .nav-item svg {
  margin-right: 0;
}

html.sidebar-collapsed .sidebar .profile-section {
  padding: 0.75rem;
}

html.sidebar-collapsed .sidebar .profile-section:hover {
  background-color: transparent;
}

html.sidebar-collapsed .sidebar .profile-avatar {
  margin-right: 0;
}

html.sidebar-collapsed .dashboard-main {
  margin-left: 72px;
}

html.sidebar-collapsed .content-loader {
  left: 72px;
}

/* Sidebar Header */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid hsl(var(--border));
  min-height: 64px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: hsl(var(--foreground));
}

.sidebar-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, hsl(270 70% 55%), hsl(280 70% 50%));
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1rem;
}

.sidebar-logo-text {
  font-family: 'Satoshi', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.15s ease 0.1s;
}

/* Hide logo text instantly when collapsing */
.sidebar.collapsed .sidebar-logo-text,
html.sidebar-collapsed .sidebar .sidebar-logo-text {
  opacity: 0;
  transition: opacity 0s;
}

.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 0.5rem;
  color: hsl(var(--muted-foreground));
  transition: all 0.2s ease;
  cursor: pointer;
}

.sidebar-toggle:hover {
  background-color: hsl(var(--secondary));
  color: hsl(var(--foreground));
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
}

.sidebar-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 0.75rem 0.5rem;
  margin-top: 0.5rem;
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.15s ease 0.1s;
}

/* Hide section title instantly when collapsing */
.sidebar.collapsed .sidebar-section-title,
html.sidebar-collapsed .sidebar .sidebar-section-title {
  opacity: 0;
  transition: opacity 0s;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  margin-bottom: 0.25rem;
  cursor: pointer;
  overflow: hidden;
  flex-wrap: nowrap;
}

.nav-item:hover {
  background-color: hsl(var(--secondary));
  color: hsl(var(--foreground));
}

.nav-item.active {
  background-color: hsl(var(--secondary));
  color: hsl(var(--foreground));
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: currentColor;
}

.nav-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 1;
  transition: opacity 0.15s ease 0.1s; /* Delay text appearance until sidebar is mostly expanded */
}

/* Hide text instantly when collapsing */
.sidebar.collapsed .nav-text,
html.sidebar-collapsed .sidebar .nav-text {
  opacity: 0;
  transition: opacity 0s;
}

.nav-external-icon {
  margin-left: auto;
  width: 14px;
  height: 14px;
  opacity: 0.5;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.nav-item:hover .nav-external-icon {
  opacity: 0.8;
}

.sidebar.collapsed .nav-external-icon {
  display: none;
}

.nav-divider {
  height: 2px;
  background-color: hsl(var(--border));
  margin: 0.5rem 0.75rem;
}

.nav-badge {
  margin-left: auto;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  display: flex;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid hsl(var(--border));
  position: relative;
}

.profile-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.profile-section:hover {
  background-color: hsl(var(--secondary));
}

.profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: hsl(var(--foreground));
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--background));
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
  min-width: 0;
  opacity: 1;
  transition: opacity 0.15s ease 0.1s;
}

/* Hide profile info instantly when collapsing */
.sidebar.collapsed .profile-info,
html.sidebar-collapsed .sidebar .profile-info {
  opacity: 0;
  transition: opacity 0s;
}

.profile-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-email {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar Upgrade Button */
.sidebar-upgrade-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem 1rem;
  margin-top: 0.75rem;
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  border: none;
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-upgrade-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px hsl(var(--foreground) / 0.25);
}

.sidebar-upgrade-btn svg {
  flex-shrink: 0;
}

.sidebar.collapsed .sidebar-upgrade-btn {
  padding: 0.75rem;
}

.sidebar.collapsed .sidebar-upgrade-btn span {
  display: none;
}

/* ========================================
   Main Content
   ======================================== */

.dashboard-main {
  position: relative;
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
  background-color: hsl(var(--background));
  transition: margin-left 0.3s ease;
}

.sidebar.collapsed ~ .dashboard-main {
  margin-left: 72px;
}

.dashboard-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  min-height: 64px;
  background-color: hsl(var(--background) / 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border));
}

.dashboard-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-menu-btn {
  display: none;
  padding: 0.5rem;
  border-radius: 0.5rem;
  color: hsl(var(--foreground));
}

.mobile-theme-btn {
  display: none;
  padding: 0.5rem;
  border-radius: 0.5rem;
  color: hsl(var(--foreground));
  margin-right: 0.5rem;
}

.mobile-theme-btn svg {
  width: 24px;
  height: 24px;
}

.dashboard-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.dashboard-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dashboard-content {
  padding: 1.5rem;
  margin-bottom:100px;
}

/* ========================================
   Mobile Styles
   ======================================== */

.mobile-overlay {
  display: none;
}

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }

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

  .sidebar.collapsed {
    width: 280px;
  }

  .dashboard-main {
    margin-left: 0;
  }

  .sidebar.collapsed ~ .dashboard-main {
    margin-left: 0;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .mobile-theme-btn {
    display: flex;
  }

  .mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: hsl(0 0% 0% / 0.5);
    z-index: 35;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .mobile-overlay.active {
    display: block;
    opacity: 1;
  }

  .sidebar-toggle {
    display: none;
  }

  .mobile-close-btn {
    display: flex;
  }
}

/* ========================================
   Dashboard Cards & Components
   ======================================== */

/* Dashboard Grid Layouts */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.dashboard-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.dashboard-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.dashboard-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

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

@media (max-width: 640px) {
  .dashboard-grid-2,
  .dashboard-grid-3,
  .dashboard-grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Base Dashboard Card */
.dashboard-card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px -10px hsl(0 0% 0% / 0.15);
}

/* Welcome Card - Hero Style */
.welcome-card {
  background: linear-gradient(135deg, hsl(var(--card)) 0%, hsl(var(--secondary)) 100%);
  border: none;
  position: relative;
  overflow: hidden;
}

.welcome-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, hsl(var(--foreground) / 0.03) 0%, transparent 70%);
  pointer-events: none;
}

/* Stat Card - Compact Numbers */
.stat-card {
  padding: 1.25rem;
  border-radius: 0.875rem;
}

.stat-card .dashboard-card-header {
  margin-bottom: 0.75rem;
}

.stat-card .dashboard-card-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Featured Card - With Glow Effect */
.featured-card {
  background: linear-gradient(145deg, hsl(var(--card)) 0%, hsl(var(--secondary) / 0.5) 100%);
  border: 1px solid hsl(var(--foreground) / 0.1);
  box-shadow: 0 0 40px -15px hsl(var(--foreground) / 0.1);
}

.featured-card:hover {
  border-color: hsl(var(--foreground) / 0.2);
  box-shadow: 0 0 50px -10px hsl(var(--foreground) / 0.15);
}

/* Accent Card - Colored Top Border */
.accent-card {
  border-top: 3px solid hsl(var(--foreground));
  border-radius: 0 0 1rem 1rem;
}

/* Glass Card - Glassmorphism */
.glass-card {
  background: hsl(var(--card) / 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid hsl(var(--foreground) / 0.1);
}

/* Action Card - Clickable */
.action-card {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.action-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px -12px hsl(0 0% 0% / 0.2);
}

.action-card:hover .action-card-arrow {
  transform: translateX(4px);
}

.action-card-arrow {
  transition: transform 0.2s ease;
}

.dashboard-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.dashboard-card-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
}

.dashboard-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.dashboard-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--secondary));
  color: hsl(var(--foreground));
}

.dark .dashboard-card-icon {
  background: hsl(var(--secondary));
}

/* Large Icon Style */
.dashboard-card-icon.large {
  width: 56px;
  height: 56px;
  border-radius: 1rem;
}

.dashboard-card-icon.large svg {
  width: 28px;
  height: 28px;
}

/* Stats Row */
.stats-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

.stats-positive {
  color: hsl(142 76% 36%);
}

.stats-negative {
  color: hsl(0 84% 60%);
}

.stats-label {
  color: hsl(var(--muted-foreground));
}

/* ========================================
   Skeleton Loader Animation
   ======================================== */

@keyframes skeleton-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.skeleton {
  position: relative;
  overflow: hidden;
  background-color: hsl(var(--secondary));
  border-radius: 0.375rem;
}

.skeleton::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    hsl(var(--foreground) / 0.08) 50%,
    transparent 100%
  );
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.dark .skeleton::after {
  background: linear-gradient(
    90deg,
    transparent 0%,
    hsl(0 0% 100% / 0.08) 50%,
    transparent 100%
  );
}

/* Skeleton Sizes */
.skeleton-text {
  height: 1rem;
  width: 100%;
}

.skeleton-text-sm {
  height: 0.75rem;
  width: 60%;
}

.skeleton-text-lg {
  height: 2rem;
  width: 50%;
}

.skeleton-value {
  height: 2.5rem;
  width: 40%;
  border-radius: 0.5rem;
}

.skeleton-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.75rem;
}

.skeleton-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.skeleton-bar {
  height: 0.375rem;
  width: 100%;
  border-radius: 9999px;
}

/* Hide skeleton when data is loaded - removed global rule, pages manage their own skeletons */

.data-value {
  display: none;
}

.loaded .data-value {
  display: block;
}

.skeleton-wrapper {
  display: block;
}

.loaded .skeleton-wrapper {
  display: none;
}

/* ========================================
   Profile Dropdown
   ======================================== */

.profile-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0.75rem;
  right: 0.75rem;
  margin-bottom: 0.5rem;
  /* Use card background with stronger border for distinction */
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--foreground) / 0.12);
  border-radius: 0.75rem;
  box-shadow: 0 10px 40px -10px hsl(0 0% 0% / 0.3);
  padding: 0.5rem;
  z-index: 50;
  
  /* Animation setup */
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.95);
  transform-origin: bottom center;
  transition: 
    opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.2s ease;
}

/* Fix for collapsed sidebar - show dropdown to the side */
.sidebar.collapsed .profile-dropdown {
  left: 100%;
  right: auto;
  width: 240px;
  bottom: 0.5rem;
  margin-left: 0.5rem;
  margin-bottom: 0;
  transform-origin: bottom left;
}

.profile-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Staggered animation for dropdown items */
.profile-dropdown.active .dropdown-item,
.profile-dropdown.active .balance-widget,
.profile-dropdown.active .dropdown-divider {
  animation: dropdownItemFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.profile-dropdown.active .balance-widget { animation-delay: 0.02s; }
.profile-dropdown.active .dropdown-divider:nth-of-type(1) { animation-delay: 0.04s; }
.profile-dropdown.active .dropdown-item:nth-of-type(1) { animation-delay: 0.06s; }
.profile-dropdown.active .dropdown-item:nth-of-type(2) { animation-delay: 0.08s; }
.profile-dropdown.active .dropdown-item:nth-of-type(3) { animation-delay: 0.1s; }
  /* Fix for profile dropdown items */
.profile-dropdown.active .dropdown-divider:nth-of-type(2) { animation-delay: 0.12s; }

/* Reset check-icon style inheritance from main.css */
.check-icon {
  background: transparent !important;
  border-radius: 0 !important;
  width: auto !important;
  height: auto !important;
  color: currentColor !important;
  /* display: inline-flex !important; */
}

/* Ensure SVG inherits color */
.check-icon svg {
  color: currentColor !important;
}
.profile-dropdown.active .dropdown-item:nth-of-type(4) { animation-delay: 0.14s; }
.profile-dropdown.active .dropdown-divider:nth-of-type(3) { animation-delay: 0.16s; }
.profile-dropdown.active .dropdown-item:nth-of-type(5) { animation-delay: 0.18s; }

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

.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  color: hsl(var(--foreground));
  text-decoration: none;
  font-size: 0.875rem;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.dropdown-item:hover {
  background-color: hsl(var(--foreground) / 0.1);
}

.dropdown-item svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.dropdown-item.danger {
  color: hsl(0 84% 60%);
}

.dropdown-divider {
  height: 1px;
  background-color: hsl(var(--foreground) / 0.15);
  margin: 0.5rem 0;
}

/* Balance Widget */
.balance-widget {
  padding: 0.75rem;
  /* Always show colored background */
  background: linear-gradient(135deg, hsl(var(--primary) / 0.15) 0%, hsl(var(--primary) / 0.08) 100%);
  border: 1px solid hsl(var(--primary) / 0.2);
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
}

.balance-widget:hover {
  background: linear-gradient(135deg, hsl(var(--primary) / 0.22) 0%, hsl(var(--primary) / 0.12) 100%);
  border-color: hsl(var(--primary) / 0.3);
}

.balance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.balance-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
}

.balance-plan {
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.balance-amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--foreground));
}

/* ========================================
   Quick Action Cards
   ======================================== */

.quick-action-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.quick-action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px hsl(0 0% 0% / 0.15);
  border-color: hsl(var(--foreground) / 0.2);
}

.quick-action-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--secondary));
  color: hsl(var(--foreground));
  flex-shrink: 0;
}

.quick-action-content h4 {
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 0.25rem;
}

.quick-action-content p {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

/* ========================================
   Pricing Modal
   ======================================== */

/* Modal Overlay - Fixed fullscreen backdrop */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: hsl(0 0% 0% / 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.pricing-modal {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1.5rem;
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 25px 60px -12px hsl(0 0% 0% / 0.4);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

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

.pricing-modal-header {
  position: relative;
  background: hsl(var(--foreground));
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.pricing-modal-bg {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
}

.pricing-modal-title {
  position: relative;
  z-index: 1;
  color: hsl(var(--background));
}

.pricing-modal-title h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.125rem;
}

.pricing-modal-title p {
  font-size: 0.875rem;
  opacity: 0.8;
}

.pricing-modal-close {
  position: relative;
  background: hsl(var(--background) / 0.2);
  border: none;
  color: hsl(var(--background));
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pricing-modal-close:hover {
  background: hsl(var(--background) / 0.3);
}

.pricing-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

/* Plans Grid */
.pricing-plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .pricing-plans-grid {
    grid-template-columns: 1fr;
  }
}

.pricing-plan-card {
  position: relative;
  background: hsl(var(--secondary) / 0.5);
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.pricing-plan-card:hover {
  border-color: hsl(var(--foreground) / 0.2);
}

.pricing-plan-featured {
  background: linear-gradient(135deg, hsl(var(--foreground) / 0.05) 0%, hsl(var(--foreground) / 0.1) 100%);
  border-color: hsl(var(--foreground) / 0.3);
  transform: scale(1.02);
}

.pricing-plan-badge-popular {
  position: absolute;
  top: -0.625rem;
  left: 50%;
  transform: translateX(-50%);
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  letter-spacing: 0.05em;
}

.pricing-plan-badge-current {
  position: absolute;
  top: -0.625rem;
  left: 50%;
  transform: translateX(-50%);
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  letter-spacing: 0.05em;
  z-index: 10;
  box-shadow: 0 4px 12px -2px hsl(var(--primary) / 0.3);
}

.pricing-plan-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.pricing-plan-name {
  font-size: 1rem;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.pricing-plan-badge {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
}

.pricing-plan-badge-free {
  background: hsl(142 70% 45% / 0.15);
  color: hsl(142 70% 45%);
}

.pricing-plan-highlight {
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 0.5rem;
}

.pricing-plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}

.pricing-plan-amount {
  font-size: 2rem;
  font-weight: 800;
  color: hsl(var(--foreground));
  line-height: 1;
}

.pricing-plan-period {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.pricing-plan-credits {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 0.25rem;
}

.pricing-plan-rate {
  font-size: 0.75rem;
  color: hsl(142 70% 45%);
  margin-bottom: 0.75rem;
}

.pricing-plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  flex: 1;
}

.pricing-plan-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  padding: 0.375rem 0;
}

.pricing-plan-features .feature-included {
  color: hsl(var(--foreground));
}

.pricing-plan-features .feature-included svg {
  color: hsl(142 70% 45%);
  flex-shrink: 0;
}

.pricing-plan-features .feature-excluded {
  color: hsl(var(--muted-foreground));
  opacity: 0.6;
}

.pricing-plan-features .feature-excluded svg {
  color: hsl(var(--muted-foreground));
  flex-shrink: 0;
}

/* Pricing Info Section - Unified Display */
.pricing-info-section {
  padding: 0.875rem;
  background: hsl(var(--background));
  border-radius: 0.625rem;
  margin-bottom: 1rem;
}

.pricing-minutes-display {
  margin-bottom: 0.625rem;
}

.pricing-minutes-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.5rem;
}

.pricing-minutes-item {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
  padding: 0.25rem 0;
}

.pricing-minutes-number {
  font-size: 1.125rem;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.pricing-minutes-unit {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.pricing-rates-footer {
  padding-top: 0.625rem;
  border-top: 1px solid hsl(var(--border) / 0.5);
}

.pricing-rates-header {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.375rem;
}

.pricing-rates-header svg {
  opacity: 0.7;
}

.pricing-rates-list {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  font-size: 0.6875rem;
  color: hsl(var(--muted-foreground));
}

.pricing-plan-additional {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  background: hsl(var(--secondary) / 0.3);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.pricing-additional-title {
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 0.25rem;
}

.pricing-no-additional {
  color: hsl(var(--muted-foreground));
  opacity: 0.7;
  font-style: italic;
}

.pricing-plan-additional-pro {
  background: hsl(142 70% 45% / 0.1);
  color: hsl(142 70% 40%);
}

.pricing-plan-btn {
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.625rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  text-decoration: none;
}

.pricing-plan-btn-outline {
  background: transparent;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
}

.pricing-plan-btn-outline:hover {
  background: hsl(var(--secondary));
  border-color: hsl(var(--foreground) / 0.2);
}

.pricing-plan-btn-primary {
  background: hsl(var(--foreground));
  border: none;
  color: hsl(var(--background));
}

.pricing-plan-btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.pricing-plan-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.pricing-plan-btn:disabled:hover {
  opacity: 0.5;
  transform: none;
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 0.25rem;
}


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

/* Balance Modal */
.balance-modal {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  max-width: 420px;
  width: 95%;
  box-shadow: 0 25px 60px -12px hsl(0 0% 0% / 0.4);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

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

.balance-modal-header {
  position: relative;
  background: hsl(var(--foreground));
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.balance-modal-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, hsl(270 70% 55% / 0.3) 0%, transparent 50%),
              radial-gradient(circle at 100% 100%, hsl(200 70% 50% / 0.2) 0%, transparent 50%);
  pointer-events: none;
}

.balance-modal-title {
  position: relative;
  z-index: 1;
}

.balance-modal-title h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: hsl(var(--primary));
  margin-bottom: 0.125rem;
}

.balance-modal-title p {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

.balance-modal-close {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  /* background: hsl(var(--primary)); */
  border-radius: 0.5rem;
  color: hsl(var(--foreground));
  cursor: pointer;
  transition: all 0.2s ease;
}

.balance-modal-close:hover {
  background: rgba(190, 190, 190, 0.2);
}

.balance-modal-body {
  padding: 1.5rem;
}

.balance-total-section {
  text-align: center;
  padding: 1.25rem;
  background: hsl(var(--secondary));
  border-radius: 0.75rem;
  margin-bottom: 1rem;
}

.balance-total-label {
  display: block;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.25rem;
}

.balance-total-value {
  font-size: 2rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  letter-spacing: -0.02em;
}

.balance-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.balance-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  background: hsl(var(--secondary));
  border-radius: 0.75rem;
}

.balance-item-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.balance-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.balance-icon-monthly {
  background: hsl(200 80% 50% / 0.15);
  color: hsl(200 80% 50%);
}

.balance-icon-permanent {
  background: hsl(142 70% 45% / 0.15);
  color: hsl(142 70% 45%);
}

.balance-item-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.balance-item-note {
  display: block;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.balance-item-value {
  font-size: 1rem;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.balance-info {
  padding: 0.875rem 1rem;
  background: hsl(var(--secondary));
  border-radius: 0.75rem;
  /* border-left: 3px solid hsl(var(--foreground) / 0.3); */
}

.balance-info p {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}

.balance-info strong {
  color: hsl(var(--foreground));
}

.balance-modal-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid hsl(var(--border));
}

.balance-modal-btn-secondary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.balance-modal-btn-secondary:hover {
  background: hsl(var(--foreground) / 0.1);
}

.balance-modal-btn-primary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.balance-modal-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px hsl(var(--foreground) / 0.25);
}

/* Enterprise CTA */
.pricing-enterprise {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: hsl(var(--secondary) / 0.5);
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
}

.pricing-enterprise-info h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin-bottom: 0.125rem;
}

.pricing-enterprise-info p {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

.pricing-enterprise-btn {
  padding: 0.625rem 1.25rem;
  background: transparent;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.pricing-enterprise-btn:hover {
  background: hsl(var(--secondary));
  border-color: hsl(var(--foreground) / 0.2);
}

/* Enterprise Plan State */
.enterprise-plan-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem;
  min-height: 300px;
}

.enterprise-state-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, hsl(270 60% 50% / 0.15) 0%, hsl(220 70% 50% / 0.15) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: hsl(270 60% 50%);
}

.enterprise-state-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin-bottom: 0.75rem;
}

.enterprise-state-description {
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
  max-width: 400px;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.enterprise-plan-state .pricing-plan-btn {
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
}

/* FAQ Accordion */
.pricing-faq h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin-bottom: 0.75rem;
}

.pricing-faq-item {
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.pricing-faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease;
}

.pricing-faq-question:hover {
  background: hsl(var(--secondary) / 0.5);
}

.pricing-faq-question svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.pricing-faq-item.active .pricing-faq-question svg {
  transform: rotate(180deg);
}

.pricing-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease, padding 0.2s ease;
}

.pricing-faq-item.active .pricing-faq-answer {
  max-height: 200px;
  padding: 0 1rem 0.75rem;
}

.pricing-faq-answer {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}

@media (max-width: 640px) {
  .pricing-enterprise {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
}

/* ========================================
   Toast Notifications
   ======================================== */

.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  box-shadow: 0 10px 40px -10px hsl(0 0% 0% / 0.3);
  min-width: 280px;
  max-width: 400px;
  pointer-events: auto;
  animation: toastSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.toast-exiting {
  animation: toastSlideOut 0.2s ease-in forwards;
}

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

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

.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 0.125rem;
}

.toast-message {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.4;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: all 0.15s ease;
}

.toast-close:hover {
  color: hsl(var(--foreground));
  background: hsl(var(--secondary));
}

/* Toast Variants */
.toast-success .toast-icon {
  color: hsl(142 70% 45%);
}

.toast-error .toast-icon {
  color: hsl(0 70% 50%);
}

.toast-warning .toast-icon {
  color: hsl(45 90% 50%);
}

.toast-info .toast-icon {
  color: hsl(220 70% 50%);
}

@media (max-width: 480px) {
  .toast-container {
    left: 1rem;
    right: 1rem;
    top: 1rem;
  }
  
  .toast {
    min-width: auto;
    max-width: none;
  }
}

/* ========================================
   Balance Modal
   ======================================== */

.balance-modal {
  background: hsl(var(--card));
  border-radius: 1rem;
  width: 90%;
  max-width: 400px;
  max-height: 90vh;
  overflow: hidden;
  animation: modalSlideIn 0.25s ease-out;
}

.balance-modal-header {
  position: relative;
  padding: 1.25rem;
  background: linear-gradient(135deg, hsl(var(--accent-purple)), hsl(var(--accent-pink)));
  color: hsl(var(--primary));
}

.balance-modal-bg {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='30' height='30' viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='3' cy='3' r='1.5' fill='%23ffffff10'/%3E%3C/svg%3E") repeat;
  opacity: 0.3;
}

.balance-modal-title {
  position: relative;
}

.balance-modal-title h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.balance-modal-title p {
  font-size: 0.8125rem;
  opacity: 0.9;
}
/* 
.balance-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: hsl(0 0% 100% / 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.balance-modal-close:hover {
  background: hsl(0 0% 100% / 0.3);
} */

.balance-modal-body {
  padding: 1.25rem;
}

.balance-total-section {
  text-align: center;
  padding: 1.25rem;
  background: hsl(var(--secondary));
  border-radius: 0.75rem;
  margin-bottom: 1rem;
}

.balance-total-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.balance-total-value {
  font-size: 2rem;
  font-weight: 800;
  color: hsl(var(--foreground));
}

.balance-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.balance-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem;
  background: hsl(var(--secondary) / 0.5);
  border-radius: 0.75rem;
  border: 1px solid hsl(var(--border));
}

.balance-item-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.balance-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.balance-icon-monthly {
  background: hsl(220 70% 50% / 0.15);
  color: hsl(220 70% 50%);
}

.balance-icon-permanent {
  background: hsl(142 70% 45% / 0.15);
  color: hsl(142 70% 45%);
}

.balance-item-info {
  display: flex;
  flex-direction: column;
}

.balance-item-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.balance-item-note {
  font-size: 0.6875rem;
  color: hsl(var(--muted-foreground));
}

.balance-item-value {
  font-size: 1rem;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.balance-info {
  padding: 0.875rem;
  background: hsl(var(--secondary) / 0.3);
  border-radius: 0.5rem;
  /* border-left: 3px solid hsl(var(--accent-purple)); */
}

.balance-info p {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}

.balance-info strong {
  color: hsl(var(--foreground));
}

.balance-modal-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid hsl(var(--border));
}

.balance-modal-btn-secondary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  color: hsl(var(--foreground));
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.balance-modal-btn-secondary:hover {
  background: hsl(var(--secondary));
  border-color: hsl(var(--foreground) / 0.2);
}

.balance-modal-btn-primary {
  flex: 1;
  padding: 0.625rem 1rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.balance-modal-btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Confirm Dialog */
.confirm-dialog {
  background: hsl(var(--background));
  border-radius: 1rem;
  padding: 1.5rem;
  max-width: 320px;
  width: 90vw;
  text-align: center;
  box-shadow: 0 25px 60px -12px hsl(0 0% 0% / 0.3);
}

.confirm-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: hsl(var(--secondary));
  border-radius: 50%;
  margin-bottom: 1rem;
  color: hsl(var(--foreground));
}

.confirm-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 0.5rem;
}

.confirm-text {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  gap: 0.75rem;
}

.confirm-actions .btn-secondary,
.confirm-actions .btn-primary {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.confirm-actions .btn-secondary {
  background: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
}

.confirm-actions .btn-secondary:hover {
  background: hsl(var(--foreground) / 0.1);
}

.confirm-actions .btn-primary {
  background: hsl(var(--foreground));
  border: none;
  color: hsl(var(--background));
}

.confirm-actions .btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ========================================
   Global Subscription Banners
   ======================================== */

.page-cancellation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  margin: 1.5rem 1.5rem 0;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  animation: slideDown 0.3s ease-out;
}

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

.banner-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.banner-content svg {
  flex-shrink: 0;
}

.banner-action-btn {
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  text-decoration: none;
  border: none;
}

.banner-action-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.banner-close-btn {
  background: transparent;
  border: none;
  color: currentColor;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.banner-close-btn:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.05);
}

/* Variants */
.banner-warning {
  background-color: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.2);
  color: #eab308;
}

.banner-warning .banner-action-btn {
  background-color: #eab308;
  color: black;
}

.banner-error {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.banner-error .banner-action-btn {
  background-color: #ef4444;
  color: white;
}

/* Adjust margin for when sidebar is collapsed or mobile */
@media (max-width: 768px) {
  .page-cancellation-banner {
    margin: 1rem 1rem 0;
    flex-wrap: wrap;
  }
}
