/* ============================================
   FNE Facturation - Styles CSS
   Design inspiré de maclinique-landing & SanteCloud
   ============================================ */

/* Import des polices */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap');

/* ============================================
   Variables CSS - Palette FNE
   ============================================ */
:root {
  /* Couleurs principales */
  --fne-orange: #E85D04;
  --fne-orange-light: #F48C06;
  --fne-orange-dark: #D45203;
  --fne-green: #2D6A4F;
  --fne-green-light: #40916C;
  --fne-teal: #1B4332;
  --fne-cream: #FFF8F0;

  /* Couleurs neutres */
  --fne-dark: #1A1A2E;
  --fne-gray: #6B7280;
  --fne-gray-light: #9CA3AF;
  --fne-gray-lighter: #E5E7EB;
  --fne-white: #FFFFFF;

  /* Couleurs sémantiques */
  --success: #22c55e;
  --success-dark: #16a34a;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Backgrounds */
  --bg-light: #F9FAFB;
  --bg-white: #FFFFFF;
  --bg-cream: var(--fne-cream);

  /* Texte */
  --text-dark: var(--fne-dark);
  --text-muted: var(--fne-gray);
  --text-light: var(--fne-gray-light);

  /* Borders */
  --border: #E2E8F0;
  --border-light: #F1F5F9;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--fne-orange) 0%, var(--fne-orange-light) 100%);
  --gradient-hero: linear-gradient(135deg, var(--fne-orange) 0%, var(--fne-teal) 100%);
  --gradient-dark: linear-gradient(180deg, var(--fne-dark) 0%, var(--fne-teal) 100%);
  --gradient-success: linear-gradient(135deg, var(--fne-green) 0%, var(--fne-green-light) 100%);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 40px rgba(232, 93, 4, 0.3);

  /* Border radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ============================================
   Reset et Base
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Serif font class */
.font-serif {
  font-family: 'Instrument Serif', Georgia, serif;
}

/* ============================================
   Container
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-lg {
  max-width: 1400px;
}

.container-sm {
  max-width: 800px;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-orange { color: var(--fne-orange); }
.text-green { color: var(--fne-green); }
.text-muted { color: var(--text-muted); }

/* ============================================
   Header / Navigation
   ============================================ */
.header {
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-light);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--fne-orange);
  text-decoration: none;
  transition: var(--transition-fast);
}

.logo:hover {
  opacity: 0.9;
}

.logo img, .logo svg {
  height: 40px;
  width: auto;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text .brand {
  font-weight: 800;
  color: var(--fne-orange);
}

.logo-text .tagline {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nav a {
  color: var(--text-dark);
  text-decoration: none;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.875rem;
  transition: var(--transition-fast);
}

.nav a:hover {
  background-color: var(--bg-light);
  color: var(--fne-orange);
}

.nav a.active {
  background: var(--gradient-primary);
  color: white;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 14px rgba(232, 93, 4, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 93, 4, 0.35);
}

.btn-secondary {
  background-color: var(--fne-gray);
  color: white;
}

.btn-secondary:hover {
  background-color: #4B5563;
}

.btn-success {
  background: var(--gradient-success);
  color: white;
  box-shadow: 0 4px 14px rgba(45, 106, 79, 0.25);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 106, 79, 0.35);
}

.btn-danger {
  background-color: var(--danger);
  color: white;
}

.btn-danger:hover {
  background-color: #dc2626;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--border);
  color: var(--text-dark);
}

.btn-outline:hover {
  border-color: var(--fne-orange);
  color: var(--fne-orange);
  background-color: rgba(232, 93, 4, 0.05);
}

.btn-outline.active,
.btn-outline[aria-pressed="true"] {
  background: var(--gradient-primary);
  border-color: var(--fne-orange);
  color: white;
}

.btn-outline-white {
  background-color: transparent;
  border: 2px solid white;
  color: white;
}

.btn-outline-white:hover {
  background-color: white;
  color: var(--fne-orange);
}

.btn-white {
  background-color: white;
  color: var(--fne-orange);
  font-weight: 600;
}

.btn-white:hover {
  background-color: var(--fne-cream);
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
}

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

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
}

/* ============================================
   Forms
   ============================================ */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-dark);
}

.form-label .tooltip-trigger {
  color: var(--text-muted);
  cursor: help;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: var(--transition-fast);
  background-color: var(--bg-white);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--fne-orange);
  box-shadow: 0 0 0 4px rgba(232, 93, 4, 0.1);
}

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

.form-input.error {
  border-color: var(--danger);
}

.form-error {
  color: var(--danger);
  font-size: 0.75rem;
  margin-top: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.form-hint {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.375rem;
}

.form-row {
  display: grid;
  gap: 1rem;
}

.form-row-2 { grid-template-columns: repeat(2, 1fr); }
.form-row-3 { grid-template-columns: repeat(3, 1fr); }
.form-row-4 { grid-template-columns: repeat(4, 1fr); }

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

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-light);
  transition: var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-dark);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card-icon.orange {
  background: rgba(232, 93, 4, 0.1);
  color: var(--fne-orange);
}

.card-icon.green {
  background: rgba(45, 106, 79, 0.1);
  color: var(--fne-green);
}

/* ============================================
   Stat Cards
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
  transition: var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.stat-card.green::before {
  background: var(--gradient-success);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  background: rgba(232, 93, 4, 0.1);
  color: var(--fne-orange);
}

.stat-card.green .stat-icon {
  background: rgba(45, 106, 79, 0.1);
  color: var(--fne-green);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--fne-orange);
  line-height: 1;
}

.stat-card.green .stat-value {
  color: var(--fne-green);
}

/* ============================================
   Tables
   ============================================ */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background-color: var(--bg-light);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

tbody tr {
  transition: var(--transition-fast);
}

tbody tr:hover {
  background-color: rgba(232, 93, 4, 0.03);
}

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

/* Items table (invoice) */
.items-table th,
.items-table td {
  padding: 0.75rem;
  vertical-align: middle;
}

.items-table input,
.items-table select {
  padding: 0.5rem;
  font-size: 0.875rem;
}

/* ============================================
   Tooltips
   ============================================ */
.tooltip {
  position: relative;
  display: inline-flex;
}

.tooltip-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background-color: var(--border);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: help;
  transition: var(--transition-fast);
}

.tooltip-trigger:hover {
  background-color: var(--fne-orange);
  color: white;
}

.tooltip-content {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.75rem 1rem;
  background-color: var(--fne-dark);
  color: white;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.5;
  border-radius: var(--radius-md);
  white-space: nowrap;
  max-width: 300px;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-fast);
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}

.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--fne-dark);
}

.tooltip:hover .tooltip-content {
  opacity: 1;
  visibility: visible;
}

/* Tooltip positions */
.tooltip-right .tooltip-content {
  bottom: auto;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
}

.tooltip-right .tooltip-content::after {
  top: 50%;
  left: -6px;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right-color: var(--fne-dark);
}

/* ============================================
   Badges
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-success {
  background-color: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.badge-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.badge-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.badge-orange {
  background-color: rgba(232, 93, 4, 0.1);
  color: var(--fne-orange);
}

.badge-green {
  background-color: rgba(45, 106, 79, 0.1);
  color: var(--fne-green);
}

.fne-badge {
  background: var(--gradient-success);
  color: white;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

/* ============================================
   Auth Pages - Split Screen
   ============================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
}

.auth-left {
  flex: 1;
  background: var(--gradient-hero);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.auth-left-content {
  position: relative;
  z-index: 1;
  max-width: 480px;
}

.auth-left .logo {
  color: white;
  margin-bottom: 2rem;
}

.auth-left .logo .brand {
  color: white;
}

.auth-left h1 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.auth-left p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.125rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.auth-features {
  list-style: none;
}

.auth-features li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  color: white;
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.auth-features .feature-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.auth-features .feature-text strong {
  display: block;
  margin-bottom: 0.25rem;
}

.auth-features .feature-text span {
  opacity: 0.8;
  font-size: 0.875rem;
}

.auth-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background-color: var(--bg-white);
}

.auth-container {
  width: 100%;
  max-width: 420px;
}

.auth-card {
  background: transparent;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  background: var(--bg-light);
  padding: 0.375rem;
  border-radius: var(--radius-lg);
}

.auth-tab {
  flex: 1;
  padding: 0.875rem 1rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: var(--transition-fast);
  color: var(--text-muted);
}

.auth-tab:hover {
  color: var(--text-dark);
}

.auth-tab.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.auth-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.auth-footer p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.auth-mode-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(232, 93, 4, 0.08);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  color: var(--fne-orange);
  margin-bottom: 1.5rem;
}

@media (max-width: 968px) {
  .auth-page {
    flex-direction: column;
  }

  .auth-left {
    padding: 2rem;
    min-height: auto;
  }

  .auth-left h1 {
    font-size: 1.75rem;
  }

  .auth-features {
    display: none;
  }

  .auth-right {
    padding: 2rem;
  }
}

/* ============================================
   Dashboard
   ============================================ */
.dashboard {
  padding: 2rem 0;
}

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

.dashboard-title {
  font-size: 1.75rem;
  font-weight: 800;
}

/* ============================================
   Invoice Page
   ============================================ */
.invoice-page {
  padding: 2rem 0;
}

.invoice-section {
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title .step-number {
  width: 28px;
  height: 28px;
  background: var(--gradient-primary);
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
}

/* Invoice Stepper */
.invoice-stepper {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  position: relative;
}

.invoice-stepper::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 40px;
  right: 40px;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.stepper-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.stepper-number {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-white);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  transition: var(--transition-fast);
}

.stepper-item.active .stepper-number,
.stepper-item.completed .stepper-number {
  background: var(--gradient-primary);
  border-color: var(--fne-orange);
  color: white;
}

.stepper-item.completed .stepper-number::after {
  content: '\2714';
}

.stepper-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stepper-item.active .stepper-label {
  color: var(--fne-orange);
  font-weight: 600;
}

/* Item taxes */
.item-taxes {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.item-taxes label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.item-taxes label:hover {
  background: var(--bg-light);
}

.item-taxes input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--fne-orange);
}

/* Totals */
.totals-section {
  max-width: 400px;
  margin-left: auto;
}

.total-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}

.total-row:last-child {
  border-bottom: none;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--fne-orange);
  padding-top: 1rem;
  margin-top: 0.5rem;
  border-top: 2px solid var(--fne-orange);
}

/* Result Card */
.result-card {
  background: var(--gradient-success);
  color: white;
  border-radius: var(--radius-2xl);
  padding: 3rem;
  text-align: center;
  box-shadow: var(--shadow-xl);
}

.result-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.result-card .subtitle {
  opacity: 0.9;
  margin-bottom: 2rem;
}

.result-number {
  font-size: 1.75rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.2);
  padding: 1rem 2rem;
  border-radius: var(--radius-lg);
  display: inline-block;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

.qr-code {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  display: inline-block;
  margin: 1rem 0;
  box-shadow: var(--shadow-md);
}

.qr-code img {
  display: block;
}

.balance-info {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
}

/* ============================================
   Alerts
   ============================================ */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  font-size: 0.9375rem;
}

.alert-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.alert-success {
  background-color: rgba(34, 197, 94, 0.1);
  color: #166534;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

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

.alert-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: #854d0e;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info {
  background-color: rgba(59, 130, 246, 0.1);
  color: #1e40af;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ============================================
   Info Cards
   ============================================ */
.info-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, rgba(59, 130, 246, 0.08) 100%);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
}

.info-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--fne-dark);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.info-card-header i {
  color: var(--info);
  font-size: 1rem;
}

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

.info-card-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
  .info-card-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .info-card-grid,
  .info-card-grid-4 {
    grid-template-columns: 1fr;
  }
}

.info-card-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.info-card-item.compact {
  gap: 0.5rem;
}

.info-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  color: white;
}

.info-card-item.compact .info-card-icon {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
  font-weight: 700;
}

.info-card-icon.orange {
  background: var(--gradient-primary);
}

.info-card-icon.green {
  background: var(--gradient-success);
}

.info-card-icon.teal {
  background: linear-gradient(135deg, var(--fne-teal) 0%, var(--fne-green) 100%);
}

.info-card-icon.blue {
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
}

.info-card-item strong {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fne-dark);
  margin-bottom: 0.125rem;
}

.info-card-item p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.info-card-item.compact strong {
  font-size: 0.75rem;
}

.info-card-item.compact p {
  font-size: 0.6875rem;
}

/* ============================================
   Loading
   ============================================ */
.loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--fne-orange);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

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

/* ============================================
   Modal
   ============================================ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 26, 46, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-base);
}

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

.modal-content {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px);
  transition: var(--transition-base);
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.25rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  transition: var(--transition-fast);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
}

.modal-close:hover {
  background-color: var(--bg-light);
  color: var(--danger);
}

/* ============================================
   User Menu
   ============================================ */
.user-menu {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1rem;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.user-btn:hover {
  border-color: var(--fne-orange);
  background: rgba(232, 93, 4, 0.05);
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: var(--gradient-primary);
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  min-width: 220px;
  padding: 0.5rem;
  display: none;
  z-index: 100;
  border: 1px solid var(--border);
}

.user-menu:hover .user-dropdown {
  display: block;
}

.user-dropdown a,
.user-dropdown button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition-fast);
}

.user-dropdown a:hover,
.user-dropdown button:hover {
  background: var(--bg-light);
  color: var(--fne-orange);
}

.user-dropdown .danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

/* ============================================
   Checkbox & Radio
   ============================================ */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
  font-size: 0.9375rem;
}

.checkbox-label input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  cursor: pointer;
  accent-color: var(--fne-orange);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.animate-fade-up {
  animation: fadeUp 0.6s ease forwards;
}

.animate-fade-in {
  animation: fadeIn 0.4s ease forwards;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Animation delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* ============================================
   Landing Page Specific
   ============================================ */
.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition-base);
}

.landing-nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
}

.landing-nav .nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.landing-nav .nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.landing-nav .nav-links a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: var(--transition-fast);
}

.landing-nav .nav-links a:hover {
  color: var(--fne-orange);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 0 4rem;
  background: var(--fne-cream);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(135deg, transparent 0%, rgba(232, 93, 4, 0.05) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(45, 106, 79, 0.1);
  border-radius: var(--radius-full);
  color: var(--fne-green);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  max-width: 700px;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--fne-orange);
  display: block;
}

.hero-stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Section Common */
.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.section-header .badge {
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.125rem;
}

/* Problems Section */
.problems-section {
  background: var(--gradient-dark);
  color: white;
}

.problems-section .section-header h2,
.problems-section .section-header p {
  color: white;
}

.problems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.problem-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition-base);
}

.problem-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-4px);
}

.problem-icon {
  width: 48px;
  height: 48px;
  background: rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.problem-card h3 {
  color: white;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.problem-card p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
}

/* Solution Section */
.solution-section {
  background: var(--bg-white);
}

.solution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.solution-card {
  background: var(--bg-light);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  transition: var(--transition-base);
  border: 1px solid var(--border-light);
}

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

.solution-icon {
  width: 64px;
  height: 64px;
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 1.25rem;
  color: white;
}

.solution-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.solution-card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  border: 1px solid var(--border);
  transition: var(--transition-base);
}

.feature-card:hover {
  border-color: var(--fne-orange);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Benefits Section */
.benefits-section {
  background: var(--fne-cream);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.benefit-card {
  display: flex;
  gap: 1.25rem;
}

.benefit-number {
  width: 48px;
  height: 48px;
  background: var(--gradient-primary);
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.benefit-content h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.benefit-content p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* CTA Section */
.cta-section {
  background: var(--gradient-hero);
  color: white;
  text-align: center;
  padding: 5rem 0;
}

.cta-section h2 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  background: var(--fne-dark);
  color: white;
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand .logo {
  color: white;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
  max-width: 300px;
}

.footer-links h4 {
  color: white;
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.footer-links a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--fne-orange);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}

/* ============================================
   Invoice Preview
   ============================================ */
.invoice-preview {
  background: white;
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.invoice-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--fne-orange);
}

.company-info h2 {
  color: var(--fne-orange);
  margin-bottom: 0.5rem;
}

.company-info p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.invoice-meta {
  text-align: right;
}

.invoice-meta h1 {
  font-size: 1.5rem;
  color: var(--fne-orange);
  margin-bottom: 0.5rem;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: white;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .header,
  .landing-nav {
    position: static;
  }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }

  .nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .invoice-preview-header {
    flex-direction: column;
    gap: 1rem;
  }

  .invoice-meta {
    text-align: left;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .landing-nav .nav-links {
    display: none;
  }

  .cta-section h2 {
    font-size: 1.75rem;
  }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.hidden { display: none; }
.block { display: block; }

.w-full { width: 100%; }
