/*
 * MENDARIS — Premium Design System
 * Enterprise-grade UI for pricing proposals
 * Version 2.0
 */

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

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Premium Color System */
  --green: #22c55e;
  --green-hover: #16a34a;
  --green-dim: rgba(34, 197, 94, 0.12);
  --green-glow: rgba(34, 197, 94, 0.25);
  --red: #ef4444;
  --red-hover: #dc2626;
  --red-dim: rgba(239, 68, 68, 0.12);
  --blue: #3b82f6;
  --blue-dim: rgba(59, 130, 246, 0.12);
  --yellow: #f59e0b;
  --yellow-dim: rgba(245, 158, 11, 0.12);
  --purple: #8b5cf6;
  --purple-dim: rgba(139, 92, 246, 0.12);

  /* Spacing Scale (8px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 64px;
  --space-11: 80px;
  --space-12: 96px;

  /* Border Radius Scale */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Typography Scale */
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 36px;

  /* Font System */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --duration-fast: 0.15s;
  --duration-base: 0.2s;
  --duration-slow: 0.3s;
  --duration-slower: 0.5s;

  /* Layout */
  --tab-height: 76px;
  --sidebar-width: 280px;
  --header-height: 64px;
  --content-max-width: 1280px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);
  --shadow-glow: 0 0 40px rgba(34, 197, 94, 0.15);
}

/* Dark Theme - Premium */
[data-theme="dark"] {
  --bg: #050505;
  --bg-alt: #0a0a0a;
  --bg-card: #111111;
  --bg-card-hover: #161616;
  --bg-sidebar: #080808;
  --bg-elevated: #1a1a1a;
  --fg: #fafafa;
  --fg-muted: #737373;
  --fg-subtle: #525252;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-hover: rgba(255, 255, 255, 0.18);
  --overlay: rgba(0, 0, 0, 0.85);
}

/* Light Theme — Premium Design System */
[data-theme="light"] {
  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-elevated: #ffffff;
  --fg: #0f172a;
  --fg-muted: #64748b;
  --fg-subtle: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-hover: #94a3b8;
  --overlay: rgba(255, 255, 255, 0.9);

  /* Light mode premium shadows - softer and more refined */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
  --shadow-glow: 0 0 30px rgba(34, 197, 94, 0.12);

  /* Adjusted color dims for light mode - more visible */
  --green-dim: rgba(34, 197, 94, 0.12);
  --green-glow: rgba(34, 197, 94, 0.2);
  --red-dim: rgba(239, 68, 68, 0.12);
  --blue-dim: rgba(59, 130, 246, 0.12);
  --yellow-dim: rgba(245, 158, 11, 0.12);
  --purple-dim: rgba(139, 92, 246, 0.12);
}

/* Dark theme premium shadows */
[data-theme="dark"] {
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
}

/* ============================================
   LIGHT MODE PREMIUM REFINEMENTS
   ============================================ */

/* Cards - clean with subtle shadows */
[data-theme="light"] .card,
[data-theme="light"] .stat-card,
[data-theme="light"] .proposal-card,
[data-theme="light"] .form-card,
[data-theme="light"] .info-card,
[data-theme="light"] .insight-card,
[data-theme="light"] .price-card,
[data-theme="light"] .settings-form {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .card:hover,
[data-theme="light"] .stat-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

[data-theme="light"] .proposal-card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(34, 197, 94, 0.1);
}

/* Sidebar - clean white with subtle shadow */
[data-theme="light"] .sidebar {
  background: #fff;
  border-right: 1px solid var(--border);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .sidebar-link:hover {
  background: var(--bg-alt);
}

[data-theme="light"] .sidebar-link.active {
  background: var(--green-dim);
  color: #15803d;
}

[data-theme="light"] .sidebar-link.active .sidebar-link-icon {
  color: var(--green);
}

/* Stat cards - premium light styling */
[data-theme="light"] .stat-icon {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.08) 100%);
}

/* Remove gradient overlays in light mode - keep it clean */
[data-theme="light"] .card::before,
[data-theme="light"] .stat-card::before,
[data-theme="light"] .proposal-card::before,
[data-theme="light"] .sidebar::before {
  display: none;
}

/* Form inputs - clean and crisp */
[data-theme="light"] .form-input,
[data-theme="light"] .form-select,
[data-theme="light"] .form-textarea {
  background: #fff;
  border: 1px solid var(--border-strong);
}

[data-theme="light"] .form-input:hover,
[data-theme="light"] .form-select:hover,
[data-theme="light"] .form-textarea:hover {
  border-color: var(--border-hover);
}

[data-theme="light"] .form-input:focus,
[data-theme="light"] .form-select:focus,
[data-theme="light"] .form-textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-dim);
}

/* Buttons - refined for light mode */
[data-theme="light"] .btn-primary {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(34, 197, 94, 0.25);
}

[data-theme="light"] .btn-primary:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 8px 24px rgba(34, 197, 94, 0.3);
}

[data-theme="light"] .btn-secondary {
  background: #fff;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .btn-secondary:hover:not(:disabled) {
  background: var(--bg-alt);
  border-color: var(--border-hover);
}

/* Section titles - solid colors, no gradient */
[data-theme="light"] .page-title {
  background: none;
  -webkit-text-fill-color: var(--fg);
  color: var(--fg);
}

[data-theme="light"] .stat-value {
  background: none;
  -webkit-text-fill-color: var(--fg);
  color: var(--fg);
}

/* Proposal card price - green accent */
[data-theme="light"] .proposal-price {
  color: #16a34a;
}

/* Tab navigation - cleaner */
[data-theme="light"] .tab-nav {
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
}

/* Mobile header */
[data-theme="light"] .app-header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* Badge refinements */
[data-theme="light"] .proposal-badge-completed {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

[data-theme="light"] .proposal-badge-sent {
  background: rgba(59, 130, 246, 0.15);
  color: #1d4ed8;
}

[data-theme="light"] .proposal-badge-draft {
  background: var(--bg-alt);
  color: var(--fg-muted);
  border: 1px solid var(--border);
}

/* Help button */
[data-theme="light"] .tour-help-btn {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* View all button */
[data-theme="light"] .view-all-link .btn {
  background: #fff;
  border: 1px solid var(--border-strong);
}

[data-theme="light"] .view-all-link .btn:hover {
  background: var(--bg-alt);
  border-color: var(--border-hover);
}

html {
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
  min-height: 100vh;
}

/* Mobile: App with tab navigation */
body.has-tabs {
  padding-bottom: var(--tab-height);
}

/* ============================================
   ALERTS & MESSAGES — Premium Design System
   ============================================ */

.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-5);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.alert::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.alert-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.alert-content {
  flex: 1;
  line-height: 1.5;
}

.alert-success {
  background: var(--green-dim);
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.2);
}

.alert-success::before {
  background: var(--green);
}

.alert-error {
  background: var(--red-dim);
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.2);
}

.alert-error::before {
  background: var(--red);
}

.alert-warning {
  background: var(--yellow-dim);
  color: var(--yellow);
  border-color: rgba(245, 158, 11, 0.2);
}

.alert-warning::before {
  background: var(--yellow);
}

.alert-info {
  background: var(--blue-dim);
  color: var(--blue);
  border-color: rgba(59, 130, 246, 0.2);
}

.alert-info::before {
  background: var(--blue);
}

/* ============================================
   MOBILE: TOP HEADER — Premium Design System
   ============================================ */

.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: all var(--duration-slow) var(--ease);
}

[data-theme="dark"] .app-header {
  background: rgba(3, 3, 3, 0.92);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .app-header {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.04);
}

.app-header-inner {
  max-width: 600px;
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-header-title {
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.app-header-action {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--fg-muted);
  text-decoration: none;
  transition: all 0.2s;
}

.app-header-action:hover {
  color: var(--fg);
  background: var(--bg-alt);
}

/* ============================================
   MOBILE: APP CONTENT
   ============================================ */

.app-content {
  padding-top: var(--header-height);
  min-height: 100vh;
}

.app-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* ============================================
   MOBILE: TAB NAVIGATION
   ============================================ */

/* Tab Navigation — Premium Design System */
.tab-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--tab-height);
  background: var(--bg);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: all var(--duration-slow) var(--ease);
}

[data-theme="dark"] .tab-nav {
  background: rgba(3, 3, 3, 0.92);
  box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .tab-nav {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.06);
}

.tab-nav-inner {
  max-width: 600px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 var(--space-5);
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-2) var(--space-4);
  background: transparent;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
  position: relative;
}

.tab-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 32px;
  height: 3px;
  background: var(--green);
  border-radius: 0 0 3px 3px;
  transition: transform var(--duration-fast) var(--ease);
}

.tab-item.active::before {
  transform: translateX(-50%) scaleX(1);
}

.tab-item-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-muted);
  transition: all var(--duration-fast) var(--ease);
}

.tab-item-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--fg-muted);
  transition: all var(--duration-fast) var(--ease);
  letter-spacing: 0.02em;
}

.tab-item:hover .tab-item-icon,
.tab-item:hover .tab-item-label {
  color: var(--fg);
}

.tab-item:active {
  transform: scale(0.95);
}

.tab-item.active .tab-item-icon {
  color: var(--green);
  transform: scale(1.1);
}

.tab-item.active .tab-item-label {
  color: var(--green);
}

/* Center FAB button — Premium */
.tab-item-fab {
  position: relative;
  top: -24px;
}

.tab-fab {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--green) 0%, #15803d 100%);
  border: none;
  border-radius: 50%;
  color: #000;
  cursor: pointer;
  box-shadow:
    0 4px 20px rgba(34, 197, 94, 0.4),
    0 0 40px rgba(34, 197, 94, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all var(--duration-base) var(--ease);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.tab-fab::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease);
}

.tab-fab:hover::before {
  opacity: 1;
}

.tab-fab:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow:
    0 8px 32px rgba(34, 197, 94, 0.5),
    0 0 60px rgba(34, 197, 94, 0.3);
}

.tab-fab:active {
  transform: scale(1.02);
}

.tab-fab svg {
  transition: transform var(--duration-fast) var(--ease);
}

.tab-fab:hover svg {
  transform: scale(1.15);
}

.tab-fab svg {
  width: 28px;
  height: 28px;
}

/* ============================================
   DESKTOP: SIDEBAR LAYOUT
   ============================================ */

.sidebar {
  display: none;
}

@media (min-width: 1024px) {
  /* Hide mobile elements on desktop */
  .app-header {
    display: none;
  }

  .tab-nav {
    display: none;
  }

  body.has-tabs {
    padding-bottom: 0;
    padding-left: var(--sidebar-width);
  }

  /* Show sidebar — Premium Design System */
  .sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    z-index: 100;
    transition: all var(--duration-slow) var(--ease);
  }

  .sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      linear-gradient(180deg, rgba(34, 197, 94, 0.03) 0%, transparent 20%),
      linear-gradient(to right, transparent 0%, rgba(255,255,255,0.01) 100%);
    pointer-events: none;
  }

  .sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, var(--green-dim) 0%, transparent 30%, transparent 70%, var(--green-dim) 100%);
    pointer-events: none;
  }

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

  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--fg);
    text-decoration: none;
    letter-spacing: -0.03em;
    transition: all var(--duration-base) var(--ease);
  }

  .sidebar-brand:hover {
    transform: translateX(2px);
  }

  .sidebar-brand-icon {
    color: var(--green);
    font-size: 30px;
    filter: drop-shadow(0 0 15px var(--green-glow));
    transition: all var(--duration-base) var(--ease);
  }

  .sidebar-brand:hover .sidebar-brand-icon {
    filter: drop-shadow(0 0 20px var(--green-glow));
    transform: scale(1.1) rotate(-5deg);
  }

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

  .sidebar-section {
    margin-bottom: var(--space-6);
  }

  .sidebar-section-title {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--fg-subtle);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: var(--space-2) var(--space-3);
    margin-bottom: var(--space-1);
  }

  .sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: var(--fg-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all var(--duration-base) var(--ease);
    margin-bottom: var(--space-1);
    position: relative;
    overflow: hidden;
  }

  .sidebar-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--green) 0%, #4ade80 100%);
    transform: scaleY(0);
    transition: transform var(--duration-base) var(--ease);
    border-radius: 0 3px 3px 0;
  }

  .sidebar-link:hover {
    color: var(--fg);
    background: var(--bg-alt);
    transform: translateX(4px);
  }

  .sidebar-link:hover .sidebar-link-icon {
    color: var(--green);
    transform: scale(1.15);
  }

  .sidebar-link.active {
    color: var(--fg);
    background: linear-gradient(90deg, var(--green-dim) 0%, transparent 100%);
    border: 1px solid rgba(34, 197, 94, 0.15);
  }

  .sidebar-link.active::before {
    transform: scaleY(1);
  }

  .sidebar-link.active .sidebar-link-icon {
    color: var(--green);
    filter: drop-shadow(0 0 8px var(--green-glow));
  }

  .sidebar-link-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    transition: all var(--duration-fast) var(--ease);
    justify-content: center;
    flex-shrink: 0;
  }

  /* New proposal button in sidebar */
  .sidebar-cta {
    padding: 16px 12px;
    border-top: 1px solid var(--border);
  }

  .sidebar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    background: linear-gradient(135deg, #22c55e 0%, #4ade80 50%, #22c55e 100%);
    background-size: 200% 200%;
    border: none;
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.4s var(--ease);
    position: relative;
    overflow: hidden;
  }

  .sidebar-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.6s var(--ease);
  }

  .sidebar-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(34, 197, 94, 0.4);
    background-position: 100% 100%;
  }

  .sidebar-btn:hover::before {
    transform: translateX(100%);
  }

  .sidebar-btn:active {
    transform: translateY(-1px);
  }

  /* Sidebar footer */
  .sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
  }

  .sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
  }

  .sidebar-user:hover {
    background: var(--bg-alt);
  }

  .sidebar-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--green), #4ade80);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    flex-shrink: 0;
  }

  .sidebar-user-info {
    flex: 1;
    min-width: 0;
  }

  .sidebar-user-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sidebar-user-email {
    font-size: 12px;
    color: var(--fg-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sidebar-user-action {
    color: var(--fg-muted);
    flex-shrink: 0;
  }

  /* Desktop content area */
  .app-content {
    padding-top: 0;
    min-height: 100vh;
  }

  .app-container {
    max-width: 1200px;
    padding: 40px 60px;
  }

  /* When page header is present, reduce top padding */
  .page-header-wrapper + .app-container {
    padding-top: 32px;
  }

  /* Desktop page header - full width outside container */
  .page-header-wrapper {
    border-bottom: 1px solid var(--border);
    padding-top: 40px;
  }

  .page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px 24px 60px;
  }

  .page-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .page-back {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--fg-muted);
    text-decoration: none;
    transition: all 0.2s;
  }

  .page-back:hover {
    color: var(--fg);
    border-color: var(--border-strong);
  }

  .page-title {
    font-size: var(--text-3xl);
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--fg) 0%, var(--fg-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .page-subtitle {
    font-size: var(--text-sm);
    color: var(--fg-muted);
    margin-top: var(--space-1);
    letter-spacing: -0.01em;
  }

  .page-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  /* Desktop theme toggle in sidebar */
  .theme-toggle-desktop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-alt);
    border-radius: var(--radius-sm);
    margin: 12px;
  }

  .theme-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--fg-muted);
  }

  /* Language Switcher */
  .lang-switcher {
    display: flex;
    gap: 8px;
    padding: 0 12px;
  }

  .lang-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--fg-muted);
    background: var(--bg-alt);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.2s;
  }

  .lang-btn:hover {
    color: var(--fg);
    text-decoration: none;
  }

  .lang-btn.active {
    color: var(--green);
    background: var(--green-dim);
  }
}

/* ============================================
   DESKTOP: GRID LAYOUTS
   ============================================ */

@media (min-width: 1024px) {
  /* Proposals grid */
  .proposals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
  }

  .proposal-card-desktop {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s var(--ease);
  }

  .proposal-card-desktop:hover {
    border-color: var(--border-strong);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  }

  [data-theme="dark"] .proposal-card-desktop:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  }

  .proposal-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
  }

  .proposal-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-dim);
    border-radius: var(--radius-sm);
    color: var(--green);
  }

  .proposal-card-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--green);
  }

  .proposal-card-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
  }

  .proposal-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--fg-muted);
  }

  .proposal-card-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  /* Detail page two columns */
  .detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .detail-main {
    grid-column: 1 / 2;
  }

  .detail-sidebar {
    grid-column: 2 / 3;
    position: sticky;
    top: 40px;
    align-self: start;
  }

  /* Form two columns */
  .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .form-grid .form-group-full {
    grid-column: 1 / -1;
  }
}

/* ============================================
   FORM STYLES
   ============================================ */

.form-section {
  margin-bottom: 32px;
}

.form-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

/* ============================================
   FORMS — Premium Design System
   ============================================ */

.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--fg);
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}

.form-label-optional {
  font-weight: 400;
  color: var(--fg-muted);
  margin-left: var(--space-1);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-family: inherit;
  color: var(--fg);
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  outline: none;
  transition: all var(--duration-base) var(--ease);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--fg-subtle);
  transition: color var(--duration-fast) var(--ease);
}

.form-input:focus::placeholder,
.form-textarea:focus::placeholder {
  color: var(--fg-muted);
}

/* Focus state - Premium glow effect */
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--green);
  box-shadow:
    0 0 0 4px var(--green-dim),
    0 0 30px var(--green-glow);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

/* Hover state */
.form-input:hover:not(:focus),
.form-textarea:hover:not(:focus),
.form-select:hover:not(:focus) {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

/* Error state */
.form-input.error,
.form-textarea.error,
.form-select.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-dim);
}

.form-input.error:focus,
.form-textarea.error:focus,
.form-select.error:focus {
  box-shadow:
    0 0 0 3px var(--red-dim),
    0 0 20px rgba(239, 68, 68, 0.15);
}

/* Success state */
.form-input.success,
.form-textarea.success,
.form-select.success {
  border-color: var(--green);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-10);
}

/* Input with icon */
.form-input-wrapper {
  position: relative;
}

.form-input-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--fg-muted);
  pointer-events: none;
  transition: color var(--duration-fast) var(--ease);
}

.form-input-wrapper .form-input {
  padding-left: var(--space-10);
}

.form-input-wrapper:focus-within .form-input-icon {
  color: var(--green);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--fg-muted);
  margin-top: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.form-error {
  font-size: var(--text-xs);
  color: var(--red);
  margin-top: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.form-error::before {
  content: '';
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E");
  background-size: contain;
  flex-shrink: 0;
}

/* Checkbox with custom checkmark */
.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.form-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.form-checkbox .checkmark {
  width: 20px;
  height: 20px;
  min-width: 20px;
  background: var(--bg-card);
  border: 2px solid var(--border-strong);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-top: 1px;
}

.form-checkbox .checkmark::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s ease;
  margin-top: -2px;
}

.form-checkbox:hover .checkmark {
  border-color: var(--green);
}

.form-checkbox input:checked + .checkmark {
  background: var(--green);
  border-color: var(--green);
}

.form-checkbox input:checked + .checkmark::after {
  transform: rotate(45deg) scale(1);
}

.form-checkbox-text {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.5;
}

.form-checkbox-text a {
  color: var(--green);
  text-decoration: none;
}

.form-checkbox-text a:hover {
  text-decoration: none;
}

/* Form row (inline elements) */
.form-row {
  margin-bottom: 20px;
}

.form-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* Link styles */
.link-muted {
  font-size: 14px;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.link-muted:hover {
  color: var(--green);
  text-decoration: none;
}

/* ============================================
   PROPOSAL FORM
   ============================================ */

.proposal-form {
  width: 100%;
}

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  width: 100%;
  position: relative;
  transition: all var(--duration-base) var(--ease);
}

.form-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.02) 0%, transparent 50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease);
}

.form-card:hover::before {
  opacity: 1;
}

.form-card:focus-within {
  border-color: rgba(34, 197, 94, 0.2);
  box-shadow: 0 0 40px rgba(34, 197, 94, 0.05);
}

.form-card-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.01em;
}

.form-grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-group-full {
    grid-column: 1 / -1;
  }
}

.form-grid .form-group {
  margin-bottom: 0;
}

/* Price preview */
.price-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  margin-top: 24px;
  background: linear-gradient(135deg, var(--green-dim) 0%, rgba(34, 197, 94, 0.05) 100%);
  border: 1px solid rgba(34, 197, 94, 0.15);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.price-preview::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.price-preview-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--fg-muted);
}

.price-preview-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.02em;
  text-shadow: 0 0 30px var(--green-glow);
}

/* Form actions */
.form-actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
  padding-top: 12px;
}

@media (min-width: 640px) {
  .form-actions {
    flex-direction: row;
    justify-content: flex-end;
  }
}

/* ============================================
   BUTTONS — Premium Design System
   ============================================ */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: inherit;
  letter-spacing: -0.01em;
  border: none;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease);
  isolation: isolate;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease);
}

.btn:hover::before {
  opacity: 1;
}

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

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

.btn:disabled::before {
  display: none;
}

/* Primary Button - Green Gradient */
.btn-primary {
  color: #000;
  background: linear-gradient(135deg, #22c55e 0%, #4ade80 50%, #22c55e 100%);
  background-size: 200% 200%;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.1),
    0 4px 12px rgba(34, 197, 94, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.25) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.5s var(--ease);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-3px);
  background-position: 100% 100%;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.15),
    0 12px 40px rgba(34, 197, 94, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:hover:not(:disabled)::before {
  transform: translateX(100%);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(-1px) scale(0.98);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.1),
    0 4px 16px rgba(34, 197, 94, 0.25);
}

/* Primary Button Icon Animation */
.btn-primary svg {
  transition: all var(--duration-base) var(--ease);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

.btn-primary:hover:not(:disabled) svg {
  transform: scale(1.15) rotate(-5deg);
}

/* Secondary Button - Subtle with Border */
.btn-secondary {
  color: var(--fg);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
  box-shadow: var(--shadow-sm);
}

/* Danger Button - Red Gradient */
.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, var(--red) 0%, #b91c1c 100%);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.1),
    0 2px 8px rgba(239, 68, 68, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-danger:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 8px 32px rgba(239, 68, 68, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-danger:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

/* Ghost Button - Minimal */
.btn-ghost {
  color: var(--fg-muted);
  background: transparent;
  padding: var(--space-2) var(--space-4);
}

.btn-ghost::before {
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--fg);
}

.btn-ghost:hover:not(:disabled)::before {
  opacity: 1;
}

/* Outline Button - New variant */
.btn-outline {
  color: var(--green);
  background: transparent;
  border: 1.5px solid var(--green);
}

.btn-outline:hover:not(:disabled) {
  background: var(--green-dim);
  border-color: var(--green-hover);
  transform: translateY(-1px);
}

/* Full Width */
.btn-full {
  width: 100%;
}

/* Size Variants */
.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  border-radius: var(--radius);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  border-radius: var(--radius-xs);
}

.btn-xs {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  border-radius: var(--radius-xs);
}

/* Icon Button */
.btn-icon {
  padding: var(--space-3);
  border-radius: var(--radius-sm);
}

.btn-icon svg {
  width: 20px;
  height: 20px;
  transition: transform var(--duration-base) var(--ease);
}

.btn-icon:hover:not(:disabled) svg {
  transform: scale(1.1);
}

/* Icon Only - Circle */
.btn-circle {
  padding: var(--space-3);
  border-radius: var(--radius-full);
}

/* Button with loading state */
.btn-loading {
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}

.btn-primary.btn-loading::after {
  border-top-color: #000;
}

.btn-secondary.btn-loading::after {
  border-top-color: var(--fg);
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   CARDS — Premium Design System
   ============================================ */

.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  transition: all var(--duration-base) var(--ease);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease);
}

.card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.card:hover::before {
  opacity: 1;
}

.card-clickable {
  cursor: pointer;
}

.card-clickable:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card-clickable:active {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Card with glow effect on hover */
.card-glow:hover {
  box-shadow:
    var(--shadow-lg),
    0 0 40px var(--green-glow);
}

/* ============================================
   PROPOSAL CARDS — Premium Design System
   ============================================ */

.proposals-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.proposals-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
}

@media (min-width: 1024px) {
  .proposals-grid {
    gap: var(--space-4);
  }
}

.proposal-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;
  gap: var(--space-3);
  padding: var(--space-5);
  min-height: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: all var(--duration-slow) var(--ease);
  overflow: hidden;
}

/* Premium gradient overlay */
.proposal-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.03) 0%, transparent 40%);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease);
}

/* Left accent border */
.proposal-card::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--green) 0%, #4ade80 100%);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--duration-slow) var(--ease);
  border-radius: 0 4px 4px 0;
}

@media (min-width: 640px) {
  .proposal-card {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: 1fr;
    align-items: center;
    gap: var(--space-5);
    padding: var(--space-5) var(--space-6);
    min-height: 76px;
  }
}

@media (min-width: 1024px) {
  .proposal-card {
    padding: var(--space-5) var(--space-7);
    gap: var(--space-6);
  }
}

.proposal-card:hover {
  border-color: rgba(34, 197, 94, 0.3);
  background: var(--bg-card-hover);
  transform: translateY(-6px) scale(1.01);
  text-decoration: none;
}

.proposal-card:hover::before {
  opacity: 1;
}

.proposal-card:hover::after {
  transform: scaleY(1);
}

[data-theme="dark"] .proposal-card:hover {
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(34, 197, 94, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .proposal-card:hover {
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(34, 197, 94, 0.2);
}

.proposal-card:active {
  transform: translateY(-2px) scale(1.005);
}

/* Proposal card - horizontal layout */
.proposal-card-header {
  display: none; /* Hidden in new layout */
}

/* Badge Styling */
.proposal-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 100px;
  flex-shrink: 0;
  align-self: flex-start;
}

.proposal-badge-draft {
  background: var(--bg-alt);
  color: var(--fg-muted);
}

.proposal-badge-completed {
  background: var(--green-dim);
  color: var(--green);
}

.proposal-badge-sent {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.proposal-badge-accepted {
  background: var(--green-dim);
  color: var(--green);
}

.proposal-badge-rejected {
  background: var(--red-dim);
  color: var(--red);
}

.proposal-date {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  flex-shrink: 0;
}

.proposal-content {
  min-width: 0;
  overflow: hidden;
}

.proposal-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 2.8em;
}

@media (min-width: 640px) {
  .proposal-title {
    -webkit-line-clamp: 1;
    max-height: 1.4em;
    white-space: nowrap;
    display: block;
  }
}

@media (min-width: 1024px) {
  .proposal-title {
    font-size: 18px;
  }
}

.proposal-desc {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 1.5em;
}

@media (min-width: 1024px) {
  .proposal-desc {
    font-size: 15px;
  }
}

.proposal-card-footer {
  display: none; /* Hidden in new layout */
}

.proposal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .proposal-meta {
    justify-content: flex-end;
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .proposal-meta {
    gap: 24px;
  }
}

.proposal-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--green);
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .proposal-price {
    font-size: 26px;
  }
}

.proposal-arrow {
  color: var(--fg-muted);
  transition: transform 0.2s, color 0.2s;
  flex-shrink: 0;
}

.proposal-card:hover .proposal-arrow {
  color: var(--green);
  transform: translateX(4px);
}

/* Section header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.section-title {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
}

@media (min-width: 1024px) {
  .section-header {
    margin-top: var(--space-4);
    margin-bottom: var(--space-7);
  }

  .section-title {
    font-size: var(--text-2xl);
  }
}

.section-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--green);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  transition: all var(--duration-fast) var(--ease);
}

.section-link:hover {
  color: var(--green-hover);
  text-decoration: none;
  transform: translateX(2px);
}

.section-link::after {
  content: '→';
  transition: transform var(--duration-fast) var(--ease);
}

.section-link:hover::after {
  transform: translateX(3px);
}

/* Empty state - enhanced */
.empty-state-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: 50%;
  margin: 0 auto 24px;
  color: var(--fg-muted);
}

/* ============================================
   DETAIL PAGE
   ============================================ */

.detail-header {
  text-align: center;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.detail-price {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.detail-confidence {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--green-dim);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
}

.detail-section {
  margin-bottom: 32px;
}

.detail-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.detail-info {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row-label {
  font-size: 14px;
  color: var(--fg-muted);
}

.detail-row-value {
  font-size: 14px;
  font-weight: 500;
}

.detail-text {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.7;
}

/* Detail grid layout */
.detail-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 32px;
}

@media (min-width: 640px) {
  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Price card */
.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}

.price-card-label {
  font-size: 13px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.price-card-value {
  font-size: 40px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.price-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 100px;
}

.badge-draft {
  background: var(--bg-alt);
  color: var(--fg-muted);
}
.badge-completed {
  background: var(--green-dim);
  color: var(--green);
}
.badge-sent {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}
.badge-accepted {
  background: var(--green-dim);
  color: var(--green);
}
.badge-rejected {
  background: var(--red-dim);
  color: var(--red);
}

/* Info card */
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-size: 14px;
  color: var(--fg-muted);
}

.info-value {
  font-size: 14px;
  font-weight: 500;
}

/* Insights grid */
.insights-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 32px;
}

@media (min-width: 768px) {
  .insights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.insight-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.insight-card-pro {
  border-left: 3px solid var(--green);
}

.insight-card-con {
  border-left: 3px solid var(--red);
}

.insight-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.insight-card-pro .insight-title {
  color: var(--green);
}

.insight-card-con .insight-title {
  color: var(--red);
}

.insight-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.insight-list li {
  position: relative;
  padding-left: 20px;
  padding-bottom: 12px;
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.5;
}

.insight-list li:last-child {
  padding-bottom: 0;
}

.insight-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.insight-card-pro .insight-list li::before {
  background: var(--green);
}

.insight-card-con .insight-list li::before {
  background: var(--red);
}

/* Mobile actions */
.mobile-actions {
  position: fixed;
  bottom: calc(var(--tab-height) + 20px);
  left: 20px;
  right: 20px;
  z-index: 50;
}

@media (min-width: 1024px) {
  .mobile-actions {
    display: none;
  }
}

/* Page header adjustments */
.page-header-content {
  flex: 1;
  min-width: 0;
}

/* Desktop detail layout */
@media (min-width: 1024px) {
  .detail-header {
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    border-bottom: none;
    margin-bottom: 40px;
  }

  .detail-price {
    font-size: 56px;
  }

  .detail-header-actions {
    display: flex;
    gap: 12px;
  }
}

/* Insights list */
.insights-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.insight-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-sm);
}

.insight-pro {
  background: var(--green-dim);
}
.insight-con {
  background: var(--red-dim);
}

.insight-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.insight-pro .insight-icon {
  background: var(--green);
  color: #000;
}

.insight-con .insight-icon {
  background: var(--red);
  color: #fff;
}

.insight-text {
  flex: 1;
}

.insight-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.insight-desc {
  font-size: 13px;
  color: var(--fg-muted);
}

@media (min-width: 1024px) {
  .insights-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* ============================================
   AUTH PAGES
   ============================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.auth-header {
  text-align: center;
  margin-bottom: 40px;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 24px;
  text-decoration: none;
  color: inherit;
}

.auth-logo-icon {
  color: var(--green);
  font-size: 28px;
}

.auth-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 15px;
  color: var(--fg-muted);
}

.auth-form {
  margin-bottom: 32px;
}

.auth-footer {
  text-align: center;
}

.auth-footer p {
  font-size: 14px;
  color: var(--fg-muted);
}

.auth-footer a {
  color: var(--green);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: none;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  font-size: 13px;
  color: var(--fg-muted);
}

.auth-social {
  display: flex;
  gap: 12px;
}

.auth-social .btn {
  flex: 1;
}

/* Auth success state */
.auth-success-box {
  text-align: center;
  padding: 40px 0;
}

.auth-success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  background: var(--green-dim);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
}

.auth-success-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}

.auth-success-text {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* Link with back arrow */
.link-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.link-back:hover {
  color: var(--fg);
  text-decoration: none;
}

/* Auth Panel - hidden on mobile */
.auth-panel {
  display: none;
}

/* Desktop auth - split screen layout */
@media (min-width: 1024px) {
  .auth-page {
    flex-direction: row;
  }

  .auth-panel {
    display: flex;
    flex: 1;
    background: var(--bg-alt);
    position: relative;
    overflow: hidden;
  }

  .auth-panel::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(
      circle,
      rgba(34, 197, 94, 0.1) 0%,
      transparent 70%
    );
    pointer-events: none;
  }

  .auth-panel-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
  }

  .auth-panel-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 600;
    color: var(--fg);
    text-decoration: none;
    margin-bottom: 60px;
  }

  .auth-panel-logo .auth-logo-icon {
    color: var(--green);
    font-size: 24px;
  }

  .auth-panel-hero {
    margin-bottom: 48px;
  }

  .auth-panel-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-dim);
    border-radius: 24px;
    margin-bottom: 32px;
    color: var(--green);
  }

  .auth-panel-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
  }

  .auth-panel-text {
    font-size: 16px;
    color: var(--fg-muted);
    line-height: 1.7;
  }

  /* Features list */
  .auth-panel-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .auth-panel-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: var(--fg-muted);
  }

  /* Stats */
  .auth-panel-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .auth-panel-stat {
    text-align: center;
  }

  .auth-panel-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--green);
    margin-bottom: 4px;
  }

  .auth-panel-stat-label {
    font-size: 13px;
    color: var(--fg-muted);
  }

  /* Tips / Steps */
  .auth-panel-tips {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .auth-panel-tip {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .auth-panel-tip-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-dim);
    color: var(--green);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
  }

  .auth-panel-tip-text {
    font-size: 15px;
    color: var(--fg-muted);
  }

  /* Right side form area */
  .auth-content {
    flex: 1;
    max-width: 560px;
  }

  .auth-card {
    max-width: 420px;
  }

  .auth-logo.mobile-only {
    display: none;
  }

  /* Two-column form grid for register */
  .auth-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .auth-form-grid .form-group {
    margin-bottom: 0;
  }
}

/* ============================================
   PROFILE / SETTINGS PAGE
   ============================================ */

.profile-header {
  text-align: center;
  padding: 32px 0;
  margin-bottom: 24px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--green), #4ade80);
  border-radius: 50%;
  font-size: 28px;
  font-weight: 600;
  color: #000;
  margin: 0 auto 16px;
}

.profile-name {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.profile-email {
  font-size: 14px;
  color: var(--fg-muted);
}

.settings-section {
  margin-bottom: 32px;
  width: 100%;
}

.settings-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  padding: 0 4px;
}

.settings-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  width: 100%;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  color: inherit;
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-item:hover {
  background: var(--bg-alt);
}

.settings-item-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-item-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
}

.settings-item-text {
  font-size: 15px;
  font-weight: 500;
}

.settings-item-arrow {
  color: var(--fg-muted);
}

.settings-item-danger .settings-item-text {
  color: var(--red);
}

/* Inline Language Switcher */
.lang-switcher-inline {
  display: flex;
  gap: 4px;
  background: var(--bg-alt);
  border-radius: 8px;
  padding: 4px;
}

.lang-switcher-inline .lang-btn {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted);
  background: transparent;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s var(--ease);
}

.lang-switcher-inline .lang-btn:hover {
  color: var(--fg);
  background: var(--border);
}

.lang-switcher-inline .lang-btn.active {
  color: var(--green);
  background: var(--green-dim);
}

/* Settings form */
.settings-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
}

.settings-form .form-group:last-of-type {
  margin-bottom: 24px;
}

.settings-form .btn {
  width: 100%;
}

@media (min-width: 640px) {
  .settings-form .btn {
    width: auto;
  }
}

/* Desktop settings grid - full width like other pages */
@media (min-width: 1024px) {
  .settings-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
  }

  .settings-grid .settings-section {
    margin-bottom: 0;
    width: 100%;
  }

  .settings-section .settings-form,
  .settings-section .settings-list {
    width: 100%;
  }

  .profile-header {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0;
    margin-bottom: 40px;
  }

  .profile-avatar {
    width: 100px;
    height: 100px;
    font-size: 36px;
    margin: 0;
  }

  .profile-info {
    text-align: left;
  }

  .profile-name {
    font-size: 24px;
  }
}

/* Toggle switch */
.toggle {
  position: relative;
  width: 50px;
  height: 28px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border-strong);
  border-radius: 28px;
  transition: 0.3s;
}

.toggle-slider::before {
  position: absolute;
  content: "";
  width: 22px;
  height: 22px;
  left: 3px;
  bottom: 3px;
  background: var(--fg);
  border-radius: 50%;
  transition: 0.3s;
}

.toggle input:checked + .toggle-slider {
  background: var(--green);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(22px);
  background: #000;
}

/* ============================================
   LEGAL PAGE
   ============================================ */

.legal-page {
  min-height: 100vh;
  background: var(--bg);
}

.legal-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.legal-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
}

.legal-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

@media (min-width: 768px) {
  .legal-content {
    flex-direction: row;
    gap: 60px;
    padding: 60px 40px;
  }
}

.legal-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .legal-nav {
    flex-direction: column;
    min-width: 160px;
    flex-shrink: 0;
  }
}

.legal-nav-link {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.legal-nav-link:hover {
  color: var(--fg);
  background: var(--bg-alt);
  text-decoration: none;
}

.legal-nav-link.active {
  color: var(--green);
  background: var(--green-dim);
}

.legal-article {
  flex: 1;
}

.legal-article h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.legal-updated {
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 32px;
}

.legal-text h2 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 16px;
}

.legal-text p {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.legal-text ul {
  margin-bottom: 16px;
  padding-left: 24px;
}

.legal-text li {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 8px;
}

@media (min-width: 1024px) {
  .legal-article h1 {
    font-size: 36px;
  }

  .legal-text h2 {
    font-size: 22px;
  }
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: 50%;
  margin: 0 auto 24px;
  color: var(--fg-muted);
}

.empty-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-desc {
  font-size: 14px;
  color: var(--fg-muted);
  margin-bottom: 24px;
}

@media (min-width: 1024px) {
  .empty-state {
    padding: 100px 20px;
  }

  .empty-icon {
    width: 100px;
    height: 100px;
  }

  .empty-title {
    font-size: 22px;
  }

  .empty-desc {
    font-size: 16px;
  }
}

/* ============================================
   LOADING STATE
   ============================================ */

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ============================================
   STATS CARDS (Dashboard)
   ============================================ */

.stats-grid {
  display: none;
  width: 100%;
}

@media (min-width: 768px) {
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
    width: 100%;
  }
}

@media (min-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
  }

  .stats-grid.stats-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1400px) {
  .stats-grid {
    gap: 32px;
  }
}

/* Stat Card — Premium Design System */
.stat-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--duration-slow) var(--ease);
  overflow: hidden;
}

/* Premium gradient overlay */
.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card:hover {
  border-color: var(--green);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(34, 197, 94, 0.1);
}

[data-theme="dark"] .stat-card:hover {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 60px rgba(34, 197, 94, 0.08);
}

.stat-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--green-dim) 0%, rgba(34, 197, 94, 0.05) 100%);
  border-radius: var(--radius);
  color: var(--green);
  flex-shrink: 0;
  transition: all var(--duration-slow) var(--ease);
  position: relative;
}

.stat-icon::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--green) 0%, transparent 50%);
  opacity: 0;
  z-index: -1;
  transition: opacity var(--duration-base) var(--ease);
}

.stat-card:hover .stat-icon {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 8px 24px var(--green-glow);
}

.stat-card:hover .stat-icon::after {
  opacity: 0.15;
}

.stat-content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.stat-value {
  font-size: clamp(20px, 2.5vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  word-break: break-word;
  overflow-wrap: break-word;
  background: linear-gradient(135deg, var(--fg) 0%, var(--fg-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  margin-top: var(--space-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  margin-top: var(--space-2);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.stat-change-up {
  color: var(--green);
  background: var(--green-dim);
}

.stat-change-down {
  color: var(--red);
  background: var(--red-dim);
}

/* ============================================
   STATUS BADGES
   ============================================ */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 100px;
}

.status-draft {
  background: var(--bg-alt);
  color: var(--fg-muted);
}

.status-completed {
  background: var(--green-dim);
  color: var(--green);
}

.status-sent {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.status-accepted {
  background: var(--green-dim);
  color: var(--green);
}

.status-rejected {
  background: var(--red-dim);
  color: var(--red);
}

/* ============================================
   THEME TOGGLE ICONS
   ============================================ */

/* Show sun in dark mode, moon in light mode */
[data-theme="dark"] .icon-sun {
  display: block;
}
[data-theme="dark"] .icon-moon {
  display: none;
}
[data-theme="light"] .icon-sun {
  display: none;
}
[data-theme="light"] .icon-moon {
  display: block;
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center {
  text-align: center;
}
.text-muted {
  color: var(--fg-muted);
}
.text-green {
  color: var(--green);
}
.text-red {
  color: var(--red);
}

.mt-8 {
  margin-top: 8px;
}
.mt-16 {
  margin-top: 16px;
}
.mt-24 {
  margin-top: 24px;
}
.mt-32 {
  margin-top: 32px;
}

.mb-8 {
  margin-bottom: 8px;
}
.mb-16 {
  margin-bottom: 16px;
}
.mb-24 {
  margin-bottom: 24px;
}
.mb-32 {
  margin-bottom: 32px;
}

/* ============================================
   MARKET PAGE
   ============================================ */

.market-header {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 768px) {
  .market-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.market-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 4px;
}

.market-subtitle {
  font-size: 14px;
  color: var(--fg-muted);
}

.market-balance {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--green-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.market-balance-icon {
  color: var(--green);
}

.market-balance-info {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.market-balance-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--green);
}

.market-balance-label {
  font-size: 13px;
  color: var(--fg-muted);
}

.market-packages {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 768px) {
  .market-packages {
    flex-direction: row;
    gap: 20px;
  }
}

.market-package {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s var(--ease);
}

@media (min-width: 768px) {
  .market-package {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }
}

.market-package:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.market-package-featured {
  border-color: var(--green);
}

.market-package-featured:hover {
  border-color: var(--green);
}

.market-package-badge {
  position: absolute;
  top: -12px;
  left: 20px;
  padding: 6px 12px;
  background: var(--green);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 6px;
}

@media (min-width: 768px) {
  .market-package-badge {
    left: 50%;
    transform: translateX(-50%);
  }
}

.market-package-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (min-width: 768px) {
  .market-package-header {
    flex-direction: column;
    gap: 8px;
  }
}

.market-package-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-dim);
  color: var(--green);
  border-radius: 12px;
}

.market-package-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
}

.market-package-amount {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

@media (min-width: 768px) {
  .market-package-amount {
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin: 16px 0;
  }
}

.market-package-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
}

@media (min-width: 768px) {
  .market-package-number {
    font-size: 40px;
  }
}

.market-package-unit {
  font-size: 13px;
  color: var(--fg-muted);
}

.market-package-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

@media (min-width: 768px) {
  .market-package-footer {
    width: 100%;
    align-items: stretch;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
  }
}

.market-package-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
}

@media (min-width: 768px) {
  .market-package-price {
    text-align: center;
  }
}

.market-package-btn {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.market-package-btn:hover {
  border-color: var(--green);
  color: var(--green);
}

.market-package-btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: #000;
}

.market-package-btn-primary:hover {
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}

@media (min-width: 768px) {
  .market-package-btn {
    width: 100%;
    padding: 12px 20px;
  }
}

/* Sidebar credits/generations */
.sidebar-credits {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin: 0 12px 12px;
  background: var(--green-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s var(--ease);
}

.sidebar-credits:hover {
  border-color: var(--green);
}

.sidebar-credits-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-credits-info svg {
  color: var(--green);
}

.sidebar-credits-count {
  font-size: 16px;
  font-weight: 700;
  color: var(--green);
}

.sidebar-credits-label {
  font-size: 13px;
  color: var(--fg-muted);
}

.sidebar-credits-add {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: #000;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
}

.desktop-only {
  display: none;
}

.mobile-only {
  display: block;
}

@media (min-width: 1024px) {
  .desktop-only {
    display: block;
  }

  .mobile-only {
    display: none;
  }
}

/* Link styles */
a {
  color: var(--green);
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
  .app-container {
    padding: 20px 16px;
  }

  .tab-fab {
    width: 56px;
    height: 56px;
  }

  .tab-fab svg {
    width: 24px;
    height: 24px;
  }
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  padding: 16px 0;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

.pagination-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--green);
  color: var(--green);
  text-decoration: none;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

.pagination-page:hover {
  color: var(--fg);
  background: var(--bg-secondary);
  text-decoration: none;
}

.pagination-page.active {
  color: var(--green);
  background: var(--green-dim);
  border-color: var(--green);
}

.pagination-ellipsis {
  color: var(--muted);
  padding: 0 8px;
}

@media (max-width: 768px) {
  .pagination {
    flex-wrap: wrap;
  }

  .pagination-pages {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 12px;
  }
}

/* ============================================
   VIEW ALL LINK
   ============================================ */

.view-all-link {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.view-all-link .btn {
  gap: 8px;
}

/* ============================================
   SUPPORT CONTACT
   ============================================ */

.support-contact {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.support-contact p {
  margin: 0 0 8px;
}

.support-contact a {
  color: var(--green);
}

/* ============================================
   AI GENERATION LOADING — Premium UX
   ============================================ */

.generating-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease-out, visibility 0.4s;
}

.generating-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, var(--green-dim) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 80%, var(--purple-dim) 0%, transparent 40%),
    radial-gradient(ellipse 50% 30% at 20% 90%, var(--blue-dim) 0%, transparent 30%);
  opacity: 0.6;
  pointer-events: none;
}

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

.generating-content {
  text-align: center;
  max-width: 480px;
  padding: 40px;
  position: relative;
  z-index: 1;
}

.generating-animation {
  width: 140px;
  height: 140px;
  margin: 0 auto 40px;
  position: relative;
}

.generating-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--green);
  animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.generating-circle:nth-child(2) {
  width: 75%;
  height: 75%;
  top: 12.5%;
  left: 12.5%;
  border-top-color: transparent;
  border-right-color: var(--green);
  opacity: 0.7;
  animation-duration: 1.8s;
  animation-direction: reverse;
}

.generating-circle:nth-child(3) {
  width: 50%;
  height: 50%;
  top: 25%;
  left: 25%;
  border-top-color: var(--green);
  border-right-color: transparent;
  opacity: 0.4;
  animation-duration: 2.4s;
}

.generating-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  color: var(--green);
  animation: iconPulse 2s ease-in-out infinite;
  filter: drop-shadow(0 0 20px var(--green-glow));
}

@keyframes iconPulse {
  0%, 100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: drop-shadow(0 0 20px var(--green-glow));
  }
  50% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(0.92);
    filter: drop-shadow(0 0 30px var(--green-glow));
  }
}

.generating-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.generating-subtitle {
  font-size: 15px;
  color: var(--fg-muted);
  margin-bottom: 40px;
  line-height: 1.6;
}

/* Timer display */
.generating-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 32px;
  font-variant-numeric: tabular-nums;
}

.generating-timer svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.generating-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.generating-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--fg-muted);
  transition: all 0.4s var(--ease);
  transform: translateX(0);
}

.generating-step.active {
  border-color: var(--green);
  color: var(--fg);
  background: var(--bg-alt);
  transform: translateX(4px);
}

.generating-step.completed {
  border-color: var(--green);
  background: var(--green-dim);
  color: var(--green);
}

.generating-step-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-alt);
  flex-shrink: 0;
  transition: all 0.4s var(--ease);
}

.generating-step.active .generating-step-icon {
  background: var(--green);
  color: #000;
  animation: stepPulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 20px var(--green-glow);
}

@keyframes stepPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.generating-step.completed .generating-step-icon {
  background: var(--green);
  color: #000;
}

.generating-step-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.generating-step-text {
  flex: 1;
  font-weight: 500;
}

/* Step duration hint */
.generating-step-time {
  font-size: 12px;
  color: var(--fg-muted);
  opacity: 0.6;
  font-weight: 400;
}

.generating-step.active .generating-step-time {
  opacity: 1;
  color: var(--green);
}

/* Progress bar */
.generating-progress {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  margin-top: 28px;
  overflow: hidden;
  position: relative;
}

.generating-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--green-hover));
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease-out;
  position: relative;
}

.generating-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 1.5s infinite;
}

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

/* Percentage display */
.generating-percentage {
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
}

.generating-percentage span {
  color: var(--green);
  font-weight: 600;
}

/* Error state */
.generating-error {
  display: none;
  text-align: center;
  padding: 20px;
}

.generating-overlay.error .generating-animation,
.generating-overlay.error .generating-steps,
.generating-overlay.error .generating-progress {
  display: none;
}

.generating-overlay.error .generating-error {
  display: block;
}

.generating-error-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  color: var(--red);
}

.generating-error-text {
  font-size: 15px;
  color: var(--fg-muted);
  margin-bottom: 20px;
}

.generating-error-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.generating-error-btn:hover {
  border-color: var(--green);
  color: var(--green);
}

/* Generations warning */
.generations-warning {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--red-dim);
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.generations-warning-icon {
  color: var(--red);
  flex-shrink: 0;
}

.generations-warning-text {
  flex: 1;
  font-size: 14px;
  color: var(--red);
}

.generations-warning-link {
  color: var(--red);
  font-weight: 600;
  text-decoration: underline;
}

/* Generations info badge */
.generations-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--green-dim);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--green);
  margin-bottom: 20px;
}

.generations-info svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   PROPOSAL DETAIL - ENHANCED
   ============================================ */

.proposal-detail {
  max-width: 1000px;
}

/* Summary */
.proposal-summary {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.proposal-summary-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg);
  margin: 0 0 16px;
}

.proposal-value-prop {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--green-dim);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--green);
}

.proposal-value-prop svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Price Options Grid */
.price-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.price-option {
  position: relative;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s var(--ease);
}

.price-option:hover {
  border-color: var(--border-strong);
}

.price-option-recommended {
  border-color: var(--green);
  background: linear-gradient(180deg, var(--green-dim) 0%, var(--bg-card) 100%);
}

.price-option-badge {
  position: absolute;
  top: -10px;
  left: 20px;
  padding: 4px 12px;
  background: var(--green);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
}

.price-option-header {
  margin-bottom: 12px;
}

.price-option-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 8px;
}

.price-option-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--green);
}

.price-option-timeline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-alt);
  border-radius: 4px;
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 12px;
}

.price-option-desc {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
  margin: 0 0 16px;
}

.price-option-features {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.price-option-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--fg);
  border-bottom: 1px solid var(--border);
}

.price-option-features li:last-child {
  border-bottom: none;
}

.price-option-features svg {
  flex-shrink: 0;
  color: var(--green);
  margin-top: 2px;
}

.price-option-limitations,
.price-option-extras {
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.price-option-limitations-label,
.price-option-extras-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
  margin-bottom: 8px;
}

.price-option-limitation,
.price-option-extra {
  display: inline-block;
  padding: 4px 8px;
  background: var(--bg-alt);
  border-radius: 4px;
  font-size: 12px;
  color: var(--fg-muted);
  margin: 0 4px 4px 0;
}

.price-option-extra {
  background: var(--green-dim);
  color: var(--green);
}

/* Arguments Grid */
.arguments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.argument-card {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s var(--ease);
}

.argument-card:hover {
  border-color: var(--border-strong);
}

.argument-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.argument-number {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: #000;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

.argument-category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--bg-alt);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-muted);
}

.argument-category svg {
  width: 12px;
  height: 12px;
}

.argument-category-value { color: var(--blue); background: rgba(59, 130, 246, 0.1); }
.argument-category-quality { color: var(--yellow); background: rgba(234, 179, 8, 0.1); }
.argument-category-expertise { color: var(--green); background: var(--green-dim); }
.argument-category-time { color: var(--purple); background: rgba(168, 85, 247, 0.1); }
.argument-category-cost { color: var(--green); background: var(--green-dim); }
.argument-category-competitive { color: var(--orange); background: rgba(249, 115, 22, 0.1); }
.argument-category-support { color: var(--cyan); background: rgba(6, 182, 212, 0.1); }
.argument-category-technology { color: var(--pink); background: rgba(236, 72, 153, 0.1); }

.argument-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 8px;
  line-height: 1.4;
}

.argument-desc {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.6;
  margin: 0;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -40px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: #000;
  font-size: 14px;
  font-weight: 700;
  border-radius: 50%;
  z-index: 1;
}

.timeline-content {
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.timeline-phase {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  margin: 0;
}

.timeline-duration {
  padding: 4px 10px;
  background: var(--green-dim);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--green);
}

.timeline-deliverables {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline-deliverables li {
  position: relative;
  padding: 6px 0 6px 20px;
  font-size: 13px;
  color: var(--fg-muted);
}

.timeline-deliverables li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
}

/* Risks Grid */
.risks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.risk-card {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--yellow);
  border-radius: var(--radius-sm);
}

.risk-severity-low {
  border-left-color: var(--green);
}

.risk-severity-medium {
  border-left-color: var(--yellow);
}

.risk-severity-high {
  border-left-color: var(--red);
}

.risk-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.risk-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin: 0;
  flex: 1;
}

.risk-severity {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.risk-severity-low .risk-severity {
  background: var(--green-dim);
  color: var(--green);
}

.risk-severity-medium .risk-severity {
  background: rgba(234, 179, 8, 0.1);
  color: var(--yellow);
}

.risk-severity-high .risk-severity {
  background: var(--red-dim);
  color: var(--red);
}

.risk-desc {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.6;
  margin: 0 0 12px;
}

.risk-mitigation {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--fg);
}

.risk-mitigation svg {
  flex-shrink: 0;
  color: var(--green);
  margin-top: 2px;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.faq-question:hover {
  background: var(--bg-alt);
}

.faq-question svg {
  flex-shrink: 0;
  color: var(--fg-muted);
  transition: transform 0.2s var(--ease);
}

.faq-item.open .faq-question svg {
  transform: rotate(90deg);
}

.faq-answer {
  display: none;
  padding: 0 20px 16px 48px;
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  display: block;
}

/* ============================================ */
/* PRICE RANGE SECTION */
/* ============================================ */
.price-range-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.price-range-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  margin: 0;
}

.section-title-inline svg {
  color: var(--primary);
}

.confidence-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: #10b981;
}

.price-range-visual {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.price-range-bar {
  position: relative;
  height: 8px;
  background: var(--bg-alt);
  border-radius: 4px;
  overflow: visible;
}

.price-range-fill {
  position: absolute;
  left: var(--range-start, 0%);
  right: calc(100% - var(--range-end, 100%));
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
  border-radius: 4px;
}

.price-range-marker {
  position: absolute;
  left: var(--marker-pos, 50%);
  top: -8px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.price-range-marker::before {
  content: '';
  width: 16px;
  height: 16px;
  background: var(--primary);
  border: 3px solid var(--bg-card);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.marker-label {
  position: absolute;
  top: -24px;
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-muted);
  white-space: nowrap;
}

.price-range-values {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.price-range-min,
.price-range-max,
.price-range-recommended {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-range-recommended {
  text-align: center;
}

.price-range-max {
  text-align: right;
}

.price-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fg-muted);
}

.price-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
}

.price-value-main {
  font-size: 20px;
  color: var(--primary);
}

/* ============================================ */
/* MARKET POSITION */
/* ============================================ */
.market-section {
  margin-bottom: 24px;
}

.market-position-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.market-position-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.market-percentile {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.percentile-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
}

.percentile-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fg-muted);
}

.market-label-badge {
  padding: 8px 16px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
}

.market-chart {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 160px;
  padding-top: 20px;
}

.chart-bar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 80px;
}

.chart-bar {
  width: 100%;
  max-width: 48px;
  height: var(--bar-height, 50%);
  min-height: 20px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  position: relative;
  transition: all 0.3s var(--ease);
}

.chart-bar-you {
  background: linear-gradient(180deg, var(--primary), #8b5cf6);
}

.chart-bar-value {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
}

.chart-bar-label {
  font-size: 11px;
  color: var(--fg-muted);
  text-align: center;
}

.chart-bar-you-marker {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
  padding: 2px 8px;
  border-radius: 100px;
}

/* ============================================ */
/* SEASONALITY */
/* ============================================ */
.seasonality-section {
  margin-bottom: 24px;
}

.seasonality-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.seasonality-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.seasonality-current {
  display: flex;
  align-items: center;
  gap: 12px;
}

.seasonality-quarter {
  font-size: 24px;
  font-weight: 700;
  color: var(--fg);
}

.seasonality-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
}

.seasonality-trend-up {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.seasonality-trend-down {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.seasonality-trend-stable {
  background: var(--bg-alt);
  color: var(--fg-muted);
}

.seasonality-best-worst {
  display: flex;
  gap: 16px;
}

.best-quarter,
.worst-quarter {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--fg-muted);
}

.best-quarter svg {
  color: #10b981;
}

.worst-quarter svg {
  color: #ef4444;
}

.seasonality-recommendation {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--fg);
  line-height: 1.5;
}

.seasonality-recommendation svg {
  flex-shrink: 0;
  color: var(--primary);
  margin-top: 2px;
}

.quarterly-factors {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.quarter-factor {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--border);
}

.quarter-factor-positive {
  border-left-color: #10b981;
}

.quarter-factor-negative {
  border-left-color: #ef4444;
}

.quarter-factor-neutral {
  border-left-color: var(--fg-muted);
}

.quarter-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}

.quarter-desc {
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.4;
}

.quarter-impact {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fg-muted);
}

/* ============================================ */
/* ARGUMENTS PRO/CON */
/* ============================================ */
.detail-section-title-pro {
  color: #10b981;
}

.detail-section-title-pro svg {
  color: #10b981;
}

.detail-section-title-con {
  color: #f59e0b;
}

.detail-section-title-con svg {
  color: #f59e0b;
}

.arguments-grid-pro .argument-card {
  border-left: 3px solid #10b981;
}

.arguments-grid-con .argument-card {
  border-left: 3px solid #f59e0b;
}

.argument-card-pro .argument-number {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.argument-card-con .argument-number {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.argument-impact {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 100px;
  margin-left: auto;
}

.argument-impact-high {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.argument-impact-medium {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.argument-impact-low {
  background: var(--bg-alt);
  color: var(--fg-muted);
}

.argument-mitigation {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  margin-top: 12px;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.1);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--fg);
  line-height: 1.5;
}

.argument-mitigation svg {
  flex-shrink: 0;
  color: #10b981;
  margin-top: 2px;
}

/* ============================================ */
/* TIMELINE MILESTONES */
/* ============================================ */
.timeline-milestones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.milestone-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 100px;
  font-size: 12px;
  color: var(--primary);
}

/* ============================================ */
/* NEGOTIATION TIPS */
/* ============================================ */
.negotiation-tips {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.negotiation-tip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.negotiation-situation {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-alt);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
}

.negotiation-situation svg {
  flex-shrink: 0;
  color: #f59e0b;
}

.negotiation-response {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
}

.negotiation-response svg {
  flex-shrink: 0;
  color: #10b981;
  margin-top: 2px;
}

/* ============================================ */
/* UPSELL OPPORTUNITIES */
/* ============================================ */
.upsell-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.upsell-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.2s var(--ease);
}

.upsell-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.upsell-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.upsell-service {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  margin: 0;
}

.upsell-price {
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: #10b981;
  white-space: nowrap;
}

.upsell-value {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.5;
  margin: 0;
}

/* ============================================ */
/* CLOSING STATEMENT */
/* ============================================ */
.closing-statement {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius);
  margin-top: 24px;
}

.closing-statement svg {
  flex-shrink: 0;
  color: var(--primary);
}

.closing-statement p {
  font-size: 16px;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.6;
  margin: 0;
}

/* ============================================ */
/* PRICE OPTIONS BEST FOR */
/* ============================================ */
.price-option-best-for {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--fg-muted);
}

.price-option-best-for svg {
  flex-shrink: 0;
  color: var(--primary);
}

/* ============================================ */
/* RESPONSIVE ADJUSTMENTS */
/* ============================================ */
@media (max-width: 768px) {
  .quarterly-factors {
    grid-template-columns: repeat(2, 1fr);
  }

  .market-chart {
    height: 120px;
  }

  .chart-bar-wrapper {
    max-width: 60px;
  }

  .seasonality-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .price-range-values {
    flex-direction: column;
    gap: 12px;
  }

  .price-range-min,
  .price-range-max,
  .price-range-recommended {
    text-align: left;
  }

  .upsell-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .quarterly-factors {
    grid-template-columns: 1fr;
  }

  .market-position-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* Print styles */
@media print {
  .sidebar,
  .tab-nav,
  .page-header-actions,
  .btn {
    display: none !important;
  }

  .app-content {
    margin: 0;
    padding: 0;
  }

  .proposal-detail {
    max-width: 100%;
  }

  .argument-card,
  .risk-card,
  .price-option,
  .timeline-content,
  .negotiation-tip,
  .upsell-card,
  .market-position-card,
  .seasonality-card {
    break-inside: avoid;
  }

  .price-range-section,
  .market-position-card,
  .seasonality-card,
  .closing-statement {
    background: #fff !important;
    border-color: #ddd !important;
  }
}

/* ============================================ */
/* DASHBOARD ANIMATIONS */
/* ============================================ */

/* Keyframe Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes expandIn {
  from {
    opacity: 0;
    transform: translateY(20px) scaleY(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Stats Grid Animation */
.stats-grid {
  animation: slideUp 0.5s var(--ease) both;
}

.stat-card {
  opacity: 0;
  animation: slideUp 0.5s var(--ease) both;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

/* Section Header Animation */
.section-header {
  opacity: 0;
  animation: slideUpFade 0.5s var(--ease) 0.4s both;
}

/* Proposals Grid Animation */
.proposals-grid {
  opacity: 0;
  animation: slideUpFade 0.6s var(--ease) 0.5s both;
}

/* Individual Proposal Card Animation */
.proposals-grid .proposal-card {
  opacity: 0;
  animation: expandIn 0.4s var(--ease) both;
  transform-origin: top center;
}

.proposals-grid .proposal-card:nth-child(1) { animation-delay: 0.55s; }
.proposals-grid .proposal-card:nth-child(2) { animation-delay: 0.65s; }
.proposals-grid .proposal-card:nth-child(3) { animation-delay: 0.75s; }
.proposals-grid .proposal-card:nth-child(4) { animation-delay: 0.85s; }
.proposals-grid .proposal-card:nth-child(5) { animation-delay: 0.95s; }
.proposals-grid .proposal-card:nth-child(6) { animation-delay: 1.05s; }
.proposals-grid .proposal-card:nth-child(7) { animation-delay: 1.15s; }
.proposals-grid .proposal-card:nth-child(8) { animation-delay: 1.25s; }

/* View All Link Animation */
.view-all-link {
  opacity: 0;
  animation: slideUp 0.4s var(--ease) 1s both;
}

/* Empty State Animation */
.empty-state {
  opacity: 0;
  animation: scaleIn 0.5s var(--ease) 0.5s both;
}

/* Page Header Animation */
.page-header-wrapper {
  opacity: 0;
  animation: slideUp 0.4s var(--ease) both;
}

/* Alert Animation */
.alert {
  opacity: 0;
  animation: slideUp 0.3s var(--ease) both;
}

/* ============================================ */
/* NEW PROPOSAL PAGE ANIMATIONS */
/* ============================================ */

.generations-info,
.generations-warning {
  opacity: 0;
  animation: slideUp 0.4s var(--ease) 0.1s both;
}

.proposal-form .form-card {
  opacity: 0;
  animation: slideUpFade 0.5s var(--ease) both;
}

.proposal-form .form-card:nth-child(1) { animation-delay: 0.15s; }
.proposal-form .form-card:nth-child(2) { animation-delay: 0.25s; }
.proposal-form .form-card:nth-child(3) { animation-delay: 0.35s; }

.proposal-form .form-actions {
  opacity: 0;
  animation: slideUp 0.4s var(--ease) 0.4s both;
}

/* ============================================ */
/* PROFILE PAGE ANIMATIONS */
/* ============================================ */

.profile-header {
  opacity: 0;
  animation: scaleIn 0.5s var(--ease) 0.1s both;
}

.settings-grid {
  opacity: 0;
  animation: slideUpFade 0.5s var(--ease) 0.2s both;
}

.settings-section {
  opacity: 0;
  animation: slideUp 0.4s var(--ease) both;
}

.settings-section:nth-child(1) { animation-delay: 0.25s; }
.settings-section:nth-child(2) { animation-delay: 0.35s; }
.settings-section:nth-child(3) { animation-delay: 0.45s; }
.settings-section:nth-child(4) { animation-delay: 0.55s; }

/* ============================================ */
/* SUPPORT PAGE ANIMATIONS */
/* ============================================ */

.support-contact {
  opacity: 0;
  animation: slideUp 0.4s var(--ease) 0.4s both;
}

/* ============================================ */
/* PROPOSAL DETAIL PAGE ANIMATIONS */
/* ============================================ */

.proposal-summary {
  opacity: 0;
  animation: slideUpFade 0.5s var(--ease) 0.1s both;
}

.price-range-section {
  opacity: 0;
  animation: slideUpFade 0.5s var(--ease) 0.2s both;
}

.proposal-detail .detail-section {
  opacity: 0;
  animation: expandIn 0.5s var(--ease) both;
}

.proposal-detail .detail-section:nth-child(1) { animation-delay: 0.1s; }
.proposal-detail .detail-section:nth-child(2) { animation-delay: 0.15s; }
.proposal-detail .detail-section:nth-child(3) { animation-delay: 0.2s; }
.proposal-detail .detail-section:nth-child(4) { animation-delay: 0.25s; }
.proposal-detail .detail-section:nth-child(5) { animation-delay: 0.3s; }
.proposal-detail .detail-section:nth-child(6) { animation-delay: 0.35s; }
.proposal-detail .detail-section:nth-child(7) { animation-delay: 0.4s; }
.proposal-detail .detail-section:nth-child(8) { animation-delay: 0.45s; }
.proposal-detail .detail-section:nth-child(9) { animation-delay: 0.5s; }
.proposal-detail .detail-section:nth-child(10) { animation-delay: 0.55s; }

/* Price Options Cards Animation */
.price-options-grid .price-option {
  opacity: 0;
  animation: scaleIn 0.4s var(--ease) both;
}

.price-options-grid .price-option:nth-child(1) { animation-delay: 0.3s; }
.price-options-grid .price-option:nth-child(2) { animation-delay: 0.4s; }
.price-options-grid .price-option:nth-child(3) { animation-delay: 0.5s; }

/* Arguments Animation */
.argument-card {
  opacity: 0;
  animation: slideUp 0.3s var(--ease) both;
}

.argument-card:nth-child(1) { animation-delay: 0.35s; }
.argument-card:nth-child(2) { animation-delay: 0.4s; }
.argument-card:nth-child(3) { animation-delay: 0.45s; }
.argument-card:nth-child(4) { animation-delay: 0.5s; }
.argument-card:nth-child(5) { animation-delay: 0.55s; }
.argument-card:nth-child(6) { animation-delay: 0.6s; }
.argument-card:nth-child(7) { animation-delay: 0.65s; }
.argument-card:nth-child(8) { animation-delay: 0.7s; }
.argument-card:nth-child(9) { animation-delay: 0.75s; }
.argument-card:nth-child(10) { animation-delay: 0.8s; }

/* Timeline Animation */
.timeline-item {
  opacity: 0;
  animation: slideUp 0.3s var(--ease) both;
}

.timeline-item:nth-child(1) { animation-delay: 0.3s; }
.timeline-item:nth-child(2) { animation-delay: 0.4s; }
.timeline-item:nth-child(3) { animation-delay: 0.5s; }
.timeline-item:nth-child(4) { animation-delay: 0.6s; }
.timeline-item:nth-child(5) { animation-delay: 0.7s; }

/* FAQ Animation */
.faq-item {
  opacity: 0;
  animation: slideUp 0.3s var(--ease) both;
}

.faq-item:nth-child(1) { animation-delay: 0.35s; }
.faq-item:nth-child(2) { animation-delay: 0.4s; }
.faq-item:nth-child(3) { animation-delay: 0.45s; }
.faq-item:nth-child(4) { animation-delay: 0.5s; }
.faq-item:nth-child(5) { animation-delay: 0.55s; }

/* Negotiation Tips Animation */
.negotiation-tip {
  opacity: 0;
  animation: slideUp 0.3s var(--ease) both;
}

.negotiation-tip:nth-child(1) { animation-delay: 0.3s; }
.negotiation-tip:nth-child(2) { animation-delay: 0.4s; }
.negotiation-tip:nth-child(3) { animation-delay: 0.5s; }

/* Upsell Cards Animation */
.upsell-card {
  opacity: 0;
  animation: scaleIn 0.4s var(--ease) both;
}

.upsell-card:nth-child(1) { animation-delay: 0.3s; }
.upsell-card:nth-child(2) { animation-delay: 0.4s; }
.upsell-card:nth-child(3) { animation-delay: 0.5s; }

/* Market Chart Bars Animation */
.chart-bar-wrapper {
  opacity: 0;
  animation: slideUp 0.4s var(--ease) both;
}

.chart-bar-wrapper:nth-child(1) { animation-delay: 0.25s; }
.chart-bar-wrapper:nth-child(2) { animation-delay: 0.35s; }
.chart-bar-wrapper:nth-child(3) { animation-delay: 0.45s; }
.chart-bar-wrapper:nth-child(4) { animation-delay: 0.55s; }

/* Seasonality Cards Animation */
.seasonality-card {
  opacity: 0;
  animation: scaleIn 0.4s var(--ease) 0.25s both;
}

.quarter-factor {
  opacity: 0;
  animation: slideUp 0.3s var(--ease) both;
}

.quarter-factor:nth-child(1) { animation-delay: 0.3s; }
.quarter-factor:nth-child(2) { animation-delay: 0.35s; }
.quarter-factor:nth-child(3) { animation-delay: 0.4s; }
.quarter-factor:nth-child(4) { animation-delay: 0.45s; }

/* Detail Grid Animation (Price + Info Cards) */
.detail-grid {
  opacity: 0;
  animation: slideUpFade 0.5s var(--ease) 0.25s both;
}

.price-card {
  opacity: 0;
  animation: scaleIn 0.4s var(--ease) 0.3s both;
}

.info-card {
  opacity: 0;
  animation: scaleIn 0.4s var(--ease) 0.4s both;
}

/* Closing Statement Animation */
.closing-statement {
  opacity: 0;
  animation: slideUpFade 0.5s var(--ease) 0.5s both;
}

/* ============================================ */
/* MARKET PAGE ANIMATIONS */
/* ============================================ */

.market-header {
  opacity: 0;
  animation: slideUp 0.4s var(--ease) 0.1s both;
}

.market-packages {
  opacity: 0;
  animation: slideUpFade 0.5s var(--ease) 0.2s both;
}

.market-package {
  opacity: 0;
  animation: scaleIn 0.4s var(--ease) both;
}

.market-package:nth-child(1) { animation-delay: 0.25s; }
.market-package:nth-child(2) { animation-delay: 0.35s; }
.market-package:nth-child(3) { animation-delay: 0.45s; }

/* ============================================ */
/* HISTORY PAGE ANIMATIONS */
/* ============================================ */

.history-header {
  opacity: 0;
  animation: slideUp 0.4s var(--ease) 0.1s both;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .stats-grid,
  .stat-card,
  .section-header,
  .proposals-grid,
  .proposals-grid .proposal-card,
  .view-all-link,
  .empty-state,
  .page-header-wrapper,
  .alert,
  .generations-info,
  .generations-warning,
  .proposal-form .form-card,
  .proposal-form .form-actions,
  .profile-header,
  .settings-grid,
  .settings-section,
  .support-contact,
  .proposal-summary,
  .price-range-section,
  .proposal-detail .detail-section,
  .price-options-grid .price-option,
  .argument-card,
  .timeline-item,
  .faq-item,
  .negotiation-tip,
  .upsell-card,
  .chart-bar-wrapper,
  .seasonality-card,
  .quarter-factor,
  .detail-grid,
  .price-card,
  .info-card,
  .closing-statement,
  .market-header,
  .market-packages,
  .market-package,
  .history-header {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================ */
/* TOOLTIPS — Premium Design System */
/* ============================================ */

[data-tooltip] {
  position: relative;
  cursor: help;
}

[data-tooltip]::before,
[data-tooltip]::after {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all var(--duration-base) var(--ease);
  z-index: 10000;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1.5;
  color: var(--fg);
  white-space: nowrap;
  max-width: 280px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-tooltip]::after {
  content: '';
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  border: 6px solid transparent;
  border-top-color: var(--border-strong);
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Tooltip positions */
[data-tooltip-pos="bottom"]::before {
  bottom: auto;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(-4px);
}

[data-tooltip-pos="bottom"]::after {
  bottom: auto;
  top: calc(100% + 2px);
  border-top-color: transparent;
  border-bottom-color: var(--border);
  transform: translateX(-50%) translateY(-4px);
}

[data-tooltip-pos="bottom"]:hover::before,
[data-tooltip-pos="bottom"]:hover::after {
  transform: translateX(-50%) translateY(0);
}

[data-tooltip-pos="left"]::before {
  bottom: auto;
  left: auto;
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%) translateX(4px);
}

[data-tooltip-pos="left"]::after {
  bottom: auto;
  left: auto;
  right: calc(100% + 2px);
  top: 50%;
  border-top-color: transparent;
  border-left-color: var(--border);
  transform: translateY(-50%) translateX(4px);
}

[data-tooltip-pos="left"]:hover::before,
[data-tooltip-pos="left"]:hover::after {
  transform: translateY(-50%) translateX(0);
}

[data-tooltip-pos="right"]::before {
  bottom: auto;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
}

[data-tooltip-pos="right"]::after {
  bottom: auto;
  left: calc(100% + 2px);
  top: 50%;
  border-top-color: transparent;
  border-right-color: var(--border);
  transform: translateY(-50%) translateX(-4px);
}

[data-tooltip-pos="right"]:hover::before,
[data-tooltip-pos="right"]:hover::after {
  transform: translateY(-50%) translateX(0);
}

/* Multiline tooltips */
[data-tooltip-multiline]::before {
  white-space: normal;
  text-align: left;
  width: 280px;
}

/* ============================================ */
/* ONBOARDING TOUR */
/* ============================================ */

.tour-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--ease);
}

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

.tour-highlight {
  position: relative;
  z-index: 9999 !important;
  box-shadow: 0 0 0 4px var(--green), 0 0 0 9999px rgba(0, 0, 0, 0.6) !important;
  border-radius: var(--radius);
  animation: tour-pulse 2s infinite;
}

@keyframes tour-pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--green), 0 0 0 9999px rgba(0, 0, 0, 0.6); }
  50% { box-shadow: 0 0 0 8px rgba(0, 212, 110, 0.4), 0 0 0 9999px rgba(0, 0, 0, 0.6); }
}

.tour-popup {
  position: fixed;
  z-index: 10000;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s var(--ease);
}

.tour-popup.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tour-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.tour-popup-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tour-popup-step svg {
  width: 16px;
  height: 16px;
}

.tour-popup-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.tour-popup-close:hover {
  background: var(--bg-alt);
  color: var(--fg);
}

.tour-popup-body {
  padding: 20px;
}

.tour-popup-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
}

.tour-popup-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-muted);
}

.tour-popup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  gap: 12px;
}

.tour-progress {
  display: flex;
  gap: 6px;
}

.tour-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.2s var(--ease);
}

.tour-progress-dot.active {
  background: var(--green);
  transform: scale(1.2);
}

.tour-progress-dot.completed {
  background: var(--green);
}

.tour-popup-actions {
  display: flex;
  gap: 8px;
}

.tour-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.tour-btn-skip {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-muted);
}

.tour-btn-skip:hover {
  background: var(--bg-alt);
  color: var(--fg);
}

.tour-btn-next {
  background: var(--green);
  border: none;
  color: #000;
}

.tour-btn-next:hover {
  filter: brightness(1.1);
}

.tour-btn-prev {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--fg);
}

.tour-btn-prev:hover {
  background: var(--border);
}

/* Tour start button */
.tour-start-btn {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--green);
  border: none;
  border-radius: 100px;
  color: #000;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 212, 110, 0.3);
  transition: all 0.3s var(--ease);
  opacity: 0;
  transform: translateY(20px);
  animation: tour-start-appear 0.5s var(--ease) 1s forwards;
}

@keyframes tour-start-appear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tour-start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 212, 110, 0.4);
}

.tour-start-btn.hidden {
  display: none;
}

@media (min-width: 1024px) {
  .tour-start-btn {
    bottom: 24px;
    right: 24px;
  }
}

/* Help button (floating) */
.tour-help-btn {
  position: fixed;
  bottom: 100px;
  right: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--green) 0%, #1db954 100%);
  border: none;
  border-radius: 50px;
  color: #000;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.35), 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s var(--ease);
  animation: tour-help-appear 0.5s var(--ease);
}

.tour-help-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.tour-help-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 24px rgba(34, 197, 94, 0.45), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tour-help-btn:active {
  transform: translateY(0) scale(0.98);
}

@keyframes tour-help-appear {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 480px) {
  .tour-help-btn {
    padding: 12px;
    border-radius: 50%;
  }
  .tour-help-btn span {
    display: none;
  }
}

@media (min-width: 1024px) {
  .tour-help-btn {
    bottom: 24px;
    right: 24px;
  }
}

/* Help icon inline */
.help-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--fg-muted);
  font-size: 11px;
  font-weight: 700;
  cursor: help;
  transition: all 0.2s var(--ease);
  margin-left: 4px;
  vertical-align: middle;
}

.help-trigger:hover {
  background: var(--green-dim);
  border-color: var(--green);
  color: var(--green);
}

/* ============================================ */
/* WELCOME MODAL */
/* ============================================ */

.welcome-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s var(--ease);
}

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

.welcome-modal-content {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transform: scale(0.9) translateY(30px);
  transition: all 0.4s var(--ease);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

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

.welcome-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  z-index: 1;
}

.welcome-modal-close:hover {
  background: var(--border);
  color: var(--fg);
}

.welcome-modal-header {
  padding: 40px 32px 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.12) 0%, transparent 100%);
}

.welcome-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--green) 0%, #1db954 100%);
  border-radius: 20px;
  color: #000;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(34, 197, 94, 0.3);
  animation: welcome-icon-pulse 2s ease-in-out infinite;
}

@keyframes welcome-icon-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.welcome-modal-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.welcome-modal-subtitle {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.5;
}

.welcome-modal-body {
  padding: 8px 32px 24px;
}

.welcome-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.welcome-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all 0.2s var(--ease);
}

.welcome-feature:hover {
  border-color: var(--green);
  background: var(--green-dim);
}

.welcome-feature-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border-radius: 10px;
  color: var(--green);
}

.welcome-feature-text {
  flex: 1;
}

.welcome-feature-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 2px;
}

.welcome-feature-desc {
  font-size: 12px;
  color: var(--fg-muted);
}

.welcome-modal-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 32px 32px;
}

.welcome-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--green) 0%, #1db954 100%);
  border: none;
  border-radius: var(--radius-sm);
  color: #000;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.3);
}

.welcome-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(34, 197, 94, 0.4);
}

.welcome-btn-primary:active {
  transform: translateY(0);
}

.welcome-btn-primary svg {
  flex-shrink: 0;
}

.welcome-btn-secondary {
  width: 100%;
  padding: 14px 24px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.welcome-btn-secondary:hover {
  color: var(--fg);
}

/* ============================================ */
/* PREMIUM GLOBAL ENHANCEMENTS */
/* ============================================ */

/* Smooth page transitions */
.app-content {
  animation: fadeInPage 0.4s var(--ease) both;
}

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

/* Premium scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-alt);
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 5px;
  border: 2px solid var(--bg-alt);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--fg-subtle);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Text selection */
::selection {
  background: var(--green);
  color: #000;
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* Premium link underline animation */
a:not(.btn):not(.sidebar-link):not(.proposal-card):not(.nav-link):not(.tab-nav-link) {
  position: relative;
}

/* Subtle hover glow for interactive elements */
.stat-card,
.proposal-card,
.form-card,
.info-card {
  will-change: transform, box-shadow;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
