/* ═══════════════════════════════════════════
   7aseb — Smart Invoice System
   Modern, Clean, Emerald Green Theme
   ═══════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
  --primary: #10B981;
  --primary-dark: #059669;
  --primary-light: #D1FAE5;
  --primary-50: #ECFDF5;
  --secondary: #F9FAFB;
  --accent: #3B82F6;
  --accent-light: #DBEAFE;
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  --danger-bg: #FFF5F5;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --success: #10B981;
  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --font-en: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ar: 'Cairo', 'Inter', sans-serif;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Dark Mode ── */
html.dark {
  --white: #1a1a2e;
  --gray-50: #121220;
  --gray-100: #1e1e32;
  --gray-200: #2a2a42;
  --gray-300: #3a3a54;
  --gray-400: #8888a4;
  --gray-500: #a0a0b8;
  --gray-600: #c0c0d0;
  --gray-700: #d4d4e0;
  --gray-800: #e8e8f0;
  --gray-900: #f2f2f8;
  --secondary: #121220;
  --primary-50: rgba(16,185,129,0.1);
  --primary-light: rgba(16,185,129,0.15);
  --accent-light: rgba(59,130,246,0.12);
  --danger-light: rgba(239,68,68,0.15);
  --danger-bg: rgba(239,68,68,0.08);
  --warning-light: rgba(245,158,11,0.15);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.35);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.4);
}
html.dark body { color-scheme: dark; }
html.dark #main-header { background: rgba(26,26,46,0.92); border-bottom-color: var(--gray-200); }
html.dark #mobile-nav { background: rgba(26,26,46,0.95); border-top-color: var(--gray-200); }
html.dark .supplier-card { background: var(--gray-100); border-color: var(--gray-200); }
html.dark .supplier-card:hover { border-color: var(--accent); }
html.dark .supplier-card-name { color: var(--gray-800); }
html.dark .treasury-daily-card { background: var(--gray-100); border-color: var(--gray-200); }
html.dark .treasury-daily-value { color: var(--gray-800); }
html.dark .treasury-item { border-color: var(--gray-200); }
html.dark .treasury-item:hover { background: var(--gray-100); }
html.dark .treasury-item-desc { color: var(--gray-800); }
html.dark .ledger-age-card { background: var(--gray-100); border-color: var(--gray-200); }
html.dark .ledger-age-value { color: var(--gray-800); }
html.dark .user-dropdown { background: var(--gray-100); border-color: var(--gray-200); }
html.dark .user-dropdown button { color: var(--gray-700); }
html.dark .user-dropdown button:hover { background: var(--gray-200); }
html.dark input, html.dark select, html.dark textarea {
  background: var(--gray-100); color: var(--gray-800);
  border-color: var(--gray-200);
}
html.dark input:focus, html.dark select:focus, html.dark textarea:focus {
  border-color: var(--primary); background: var(--gray-50);
}
html.dark .modal-overlay { background: rgba(0,0,0,0.7); }
html.dark .modal-content { background: var(--gray-100); border-color: var(--gray-200); }
html.dark .lp-signin-btn { background: var(--primary); }
html.dark .lp-signin-btn:hover { background: var(--primary-dark); }
html.dark .payment-overlay { background: linear-gradient(135deg, rgba(10,10,20,0.97), rgba(6,60,45,0.95)); }
html.dark .payment-card { background: var(--gray-100); }
html.dark .payment-card h2 { color: var(--gray-900); }
html.dark .payment-phone { color: var(--gray-600); }
html.dark .invoice-preview-container { background: var(--gray-100); color: var(--gray-800); }
html.dark .badge-normal { background: var(--primary-50); color: var(--primary); }
html.dark hr { border-top-color: var(--gray-200); }
html.dark .invoice-item { background: var(--white); border-color: var(--gray-200); }
html.dark .dash-quick-stats { background: var(--white); border-color: var(--gray-200); }
html.dark .dash-panel { background: var(--white); border-color: var(--gray-200); }
html.dark .hero-today { background: linear-gradient(135deg, #065F46 0%, #059669 60%, #10B981 100%); }
html.dark .hero-month { background: linear-gradient(135deg, #1E3A5F 0%, #2563EB 60%, #3B82F6 100%); }
html.dark .form-card { background: var(--white); border-color: var(--gray-200); }
html.dark .custom-field-row input { background: var(--gray-100); border-color: var(--gray-300); color: var(--gray-800); }
html.dark .custom-field-row input:focus { background: var(--gray-50); border-color: var(--primary); }
html.dark .toast { background: var(--gray-100); color: var(--gray-800); border-color: var(--gray-200); }
html.dark .suggestions-dropdown { background: var(--gray-100); border-color: var(--gray-200); }
html.dark .suggestion-item:hover { background: var(--gray-200); }
html.dark .btn-outline { color: var(--gray-700); border-color: var(--gray-300); }
html.dark .btn-outline:hover { background: var(--gray-200); }
html.dark .logo-text {
  background: linear-gradient(135deg, #34D399, #10B981);
  -webkit-background-clip: text; background-clip: text;
}
html.dark .lp-nav-logo {
  background: linear-gradient(135deg, #34D399, #10B981);
  -webkit-background-clip: text; background-clip: text;
}
html.dark .dropdown-header span:first-child { color: var(--gray-800); }
html.dark .product-card { background: var(--gray-100); border-color: var(--gray-200); }
html.dark .product-card:hover { border-color: rgba(16,185,129,0.3); }
html.dark #dark-mode-toggle { color: var(--gray-500); }
html.dark #dark-mode-toggle:hover { background: var(--gray-200); color: #F59E0B; }
html, body { transition: background-color 0.3s ease, color 0.3s ease; }

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; touch-action: manipulation; overflow-x: hidden; }
@media (max-width: 768px) {
  html { -webkit-text-size-adjust: 100%; }
  input[type="text"], input[type="number"], input[type="tel"], input[type="search"], select, textarea {
    font-size: 16px;
  }
}
body {
  font-family: var(--font-en);
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html[dir="rtl"] body { font-family: var(--font-ar); }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea, button { font-size: 1rem; }
.hidden { display: none !important; }
.text-muted { color: var(--gray-500); font-size: 0.875rem; }
.text-danger { color: var(--danger) !important; }
hr { border: none; border-top: 1px solid var(--gray-200); margin: 0.75rem 0; }

/* ── Loading Screen ── */
#loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--white);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2rem;
}
.loader-logo { animation: pulse-scale 1.2s ease-in-out infinite; }
@keyframes pulse-scale {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.loader-bar {
  width: 200px; height: 4px;
  background: var(--gray-200); border-radius: 4px; overflow: hidden;
}
.loader-fill {
  height: 100%; width: 0; background: var(--primary);
  border-radius: 4px; animation: load-fill 1.5s ease forwards;
}
@keyframes load-fill { to { width: 100%; } }
#loading-screen.fade-out {
  opacity: 0; transition: opacity 0.4s ease;
  pointer-events: none;
}

/* ── Landing Page / Auth Screen ── */
#auth-screen {
  background: var(--white); color: var(--gray-800);
  overflow-x: hidden;
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Nav */
.lp-nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
}
.lp-nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem; height: 56px;
}
.lp-nav-brand { display: flex; align-items: center; gap: 0.5rem; }
.lp-nav-logo {
  font-size: 1.2rem; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.lp-nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.lp-lang-btn {
  display: flex; align-items: center; gap: 0.4rem;
  background: none; border: 1px solid var(--gray-200); border-radius: 20px;
  padding: 0.35rem 0.85rem; font-size: 0.8rem; color: var(--gray-600);
  font-weight: 500; transition: var(--transition);
}
.lp-lang-btn:hover { border-color: var(--primary); color: var(--primary); }
.lp-signin-btn {
  background: var(--primary); color: white; border: none; border-radius: 20px;
  padding: 0.4rem 1.1rem; font-size: 0.82rem; font-weight: 600;
  transition: var(--transition);
}
.lp-signin-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* Hero */
.lp-hero {
  padding: 4rem 1.5rem 3rem;
  background: linear-gradient(180deg, var(--primary-50) 0%, var(--white) 100%);
}
.lp-hero-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
}
.lp-badge {
  display: inline-block; padding: 0.3rem 0.85rem; border-radius: 20px;
  background: var(--primary-light); color: var(--primary-dark);
  font-size: 0.78rem; font-weight: 700; margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}
.lp-hero-title {
  font-size: 3rem; font-weight: 800; line-height: 1.15;
  color: var(--gray-900); letter-spacing: -1px; margin-bottom: 1rem;
}
.lp-hero-accent {
  display: block;
  background: linear-gradient(135deg, var(--primary), #059669);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.lp-hero-desc {
  font-size: 1.05rem; color: var(--gray-500); line-height: 1.7;
  margin-bottom: 2rem; max-width: 480px;
}
.lp-hero-actions { display: flex; flex-direction: column; gap: 0.75rem; }
.btn-google {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem;
  padding: 0.85rem 1.75rem; max-width: 280px;
  background: var(--white); border: 2px solid var(--gray-200);
  border-radius: var(--radius); font-weight: 600; font-size: 0.95rem;
  color: var(--gray-700); transition: var(--transition);
}
.btn-google:hover {
  border-color: var(--primary); background: var(--primary-50);
  transform: translateY(-1px); box-shadow: var(--shadow-md);
}
.btn-google:active { transform: translateY(0); }
.lp-hero-note { font-size: 0.8rem; color: var(--gray-400); }

/* Hero visual — invoice mockup */
.lp-hero-visual { display: flex; justify-content: center; }
.lp-mock-card {
  width: 100%; max-width: 360px;
  background: var(--white); border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid var(--gray-200); overflow: hidden;
  animation: slide-up 0.6s ease 0.1s both;
}
.lp-mock-header {
  display: flex; gap: 6px; padding: 0.75rem 1rem;
  background: var(--gray-50); border-bottom: 1px solid var(--gray-200);
}
.lp-mock-dot { width: 10px; height: 10px; border-radius: 50%; background: #EF4444; }
.lp-mock-dot.d2 { background: #F59E0B; }
.lp-mock-dot.d3 { background: #10B981; }
.lp-mock-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; }
.lp-mock-row { height: 12px; border-radius: 6px; background: var(--gray-200); }
.lp-mock-title-bar { width: 55%; height: 14px; background: var(--gray-300); }
.lp-mock-sub-bar { width: 35%; }
.lp-mock-divider { height: 1px; background: var(--gray-200); margin: 0.3rem 0; }
.lp-mock-line-row { display: flex; gap: 0.5rem; }
.lp-mock-cell { height: 10px; border-radius: 5px; background: var(--gray-200); }
.lp-mock-cell.w60 { flex: 6; } .lp-mock-cell.w40 { flex: 4; }
.lp-mock-cell.w30 { flex: 3; } .lp-mock-cell.w20 { flex: 2; }
.lp-mock-cell.accent { background: var(--primary-light); }
.lp-mock-cell.green { background: var(--primary); }
.lp-mock-total { display: flex; gap: 0.5rem; justify-content: flex-end; }

/* Sections common */
.lp-section-inner { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.lp-section-title {
  font-size: 1.75rem; font-weight: 800; color: var(--gray-900);
  margin-bottom: 0.5rem; letter-spacing: -0.5px;
}
.lp-section-desc { color: var(--gray-500); font-size: 1rem; margin-bottom: 2.5rem; }

/* Features */
.lp-features { padding: 4rem 1.5rem; background: var(--gray-50); }
.lp-features .lp-section-inner { text-align: center; }
.lp-features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem; text-align: start;
}
.lp-feature-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 1.5rem;
  transition: var(--transition);
}
.lp-feature-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.lp-feature-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--primary-50); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.lp-feature-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--gray-800); margin-bottom: 0.4rem; }
.lp-feature-card p { font-size: 0.82rem; color: var(--gray-500); line-height: 1.6; }

/* Pricing */
.lp-pricing { padding: 4rem 1.5rem; text-align: center; }
.lp-pricing-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1rem; max-width: 900px; margin: 0 auto;
}
.lp-price-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 1.75rem 1.25rem;
  transition: var(--transition); position: relative;
}
.lp-price-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.lp-price-featured {
  border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow-lg);
}
.lp-price-featured:hover { border-color: var(--primary); }
.lp-price-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: white; font-size: 0.68rem;
  font-weight: 700; padding: 0.2rem 0.75rem; border-radius: 20px;
  white-space: nowrap;
}
.lp-price-name { font-size: 0.85rem; font-weight: 600; color: var(--gray-500); margin-bottom: 0.5rem; }
.lp-price-amount { font-size: 1.6rem; font-weight: 800; color: var(--gray-900); }
.lp-price-amount span { font-size: 0.85rem; font-weight: 600; }
.lp-price-period { font-size: 0.78rem; color: var(--gray-400); margin-top: 0.15rem; }
.lp-price-old {
  font-size: 0.82rem; color: var(--gray-400); text-decoration: line-through;
  margin-top: 0.3rem;
}
.lp-price-save {
  font-size: 0.75rem; font-weight: 700; color: var(--primary);
  margin-top: 0.25rem;
}

/* CTA */
.lp-cta { padding: 4rem 1.5rem; background: var(--gray-50); }
.lp-cta-btn { max-width: 300px; margin: 0 auto; }

/* Footer */
.lp-footer {
  padding: 1.5rem; border-top: 1px solid var(--gray-200);
}
.lp-footer-inner {
  display: flex; align-items: center; justify-content: space-between;
}
.lp-footer-brand { display: flex; align-items: center; gap: 0.4rem; }
.lp-footer-copy { font-size: 0.78rem; color: var(--gray-400); }

/* Landing page dark mode */
html.dark #auth-screen { background: var(--white); }
html.dark .lp-nav { background: rgba(26,26,46,0.92); border-bottom-color: var(--gray-200); }
html.dark .lp-hero { background: linear-gradient(180deg, rgba(16,185,129,0.06) 0%, var(--white) 100%); }
html.dark .lp-features { background: var(--gray-50); }
html.dark .lp-feature-card { background: var(--white); border-color: var(--gray-200); }
html.dark .lp-feature-card:hover { border-color: rgba(16,185,129,0.3); }
html.dark .lp-feature-icon { background: rgba(16,185,129,0.1); }
html.dark .lp-price-card { background: var(--white); border-color: var(--gray-200); }
html.dark .lp-price-featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow-lg); }
html.dark .lp-cta { background: var(--gray-50); }
html.dark .lp-footer { border-top-color: var(--gray-200); }
html.dark .lp-mock-card { background: var(--gray-100); border-color: var(--gray-200); }
html.dark .lp-mock-header { background: var(--gray-50); border-color: var(--gray-200); }
html.dark .btn-google { background: var(--white); border-color: var(--gray-300); color: var(--gray-700); }
html.dark .btn-google:hover { background: var(--primary-50); border-color: var(--primary); }
html.dark .lp-lang-btn { border-color: var(--gray-300); color: var(--gray-500); }
html.dark .lp-badge { background: rgba(16,185,129,0.12); }

/* Landing responsive */
@media (max-width: 768px) {
  .lp-hero-inner { grid-template-columns: 1fr; text-align: center; }
  .lp-hero-title { font-size: 2.2rem; }
  .lp-hero-desc { margin-inline: auto; }
  .lp-hero-actions { align-items: center; }
  .btn-google { max-width: 100%; width: 100%; }
  .lp-hero-visual { display: none; }
  .lp-features-grid { grid-template-columns: 1fr 1fr; }
  .lp-pricing-grid { grid-template-columns: 1fr 1fr; }
  .lp-signin-btn { display: none; }
  .lp-section-title { font-size: 1.5rem; }
  .lp-footer-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
}
@media (max-width: 480px) {
  .lp-hero { padding: 2.5rem 1rem 2rem; }
  .lp-hero-title { font-size: 1.75rem; }
  .lp-hero-desc { font-size: 0.92rem; }
  .lp-features-grid { grid-template-columns: 1fr; }
  .lp-pricing-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .lp-price-card { padding: 1.25rem 0.75rem; }
  .lp-price-amount { font-size: 1.3rem; }
  .lp-feature-card { padding: 1.25rem; }
  .lp-features, .lp-pricing, .lp-cta { padding: 2.5rem 1rem; }
}

/* ── Hero Stats Bar ── */
.lp-stats-bar {
  display: flex; gap: 2rem; justify-content: center;
  margin: 1.5rem 0 2rem; flex-wrap: wrap;
}
.lp-stat-item { text-align: center; }
.lp-stat-num {
  display: block; font-size: 1.75rem; font-weight: 800;
  color: var(--primary); line-height: 1;
}
.lp-stat-label {
  font-size: 0.75rem; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* ── Contact Button in Hero ── */
.lp-contact-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.25rem; background: #25D366; color: white;
  border-radius: var(--radius); font-size: 0.9rem; font-weight: 600;
  text-decoration: none; transition: var(--transition);
}
.lp-contact-btn:hover { background: #128C7E; transform: translateY(-1px); }

/* ── How It Works Section ── */
.lp-how-it-works { padding: 4rem 1.5rem; background: white; }
.lp-steps-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2rem; max-width: 800px; margin: 2rem auto 0;
}
.lp-step-card {
  text-align: center; padding: 2rem 1.5rem;
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--gray-200); position: relative;
  transition: var(--transition);
}
.lp-step-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.lp-step-num {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 28px; background: var(--primary);
  color: white; border-radius: 50%; font-size: 0.8rem;
  font-weight: 700; display: flex; align-items: center;
  justify-content: center;
}
.lp-step-icon {
  width: 64px; height: 64px; margin: 0.5rem auto 1rem;
  background: rgba(16,185,129,0.1); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
}
.lp-step-card h3 { font-size: 1rem; margin-bottom: 0.5rem; color: var(--gray-800); }
.lp-step-card p { font-size: 0.8rem; color: var(--gray-500); line-height: 1.5; }

/* ── Problem/Solution Section ── */
.lp-problem-solution { padding: 4rem 1.5rem; }
.lp-vs-grid {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem; align-items: center; max-width: 900px;
  margin: 2rem auto 0;
}
.lp-vs-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 1.5rem;
}
.lp-vs-before { border-left: 4px solid #EF4444; }
.lp-vs-after { border-left: 4px solid #10B981; }
.lp-vs-header {
  font-size: 0.85rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; margin-bottom: 1rem;
}
.lp-vs-before .lp-vs-header { color: #EF4444; }
.lp-vs-after .lp-vs-header { color: #10B981; }
.lp-vs-list { list-style: none; padding: 0; margin: 0; }
.lp-vs-list li {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 0; font-size: 0.85rem; color: var(--gray-600);
}
.lp-vs-arrow {
  color: var(--primary); display: flex; align-items: center;
  justify-content: center;
}

/* ── Enhanced Pricing Section ── */
.lp-trust-badges {
  display: flex; gap: 1.5rem; justify-content: center;
  flex-wrap: wrap; margin-bottom: 2rem;
}
.lp-trust-item {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; color: var(--gray-600);
}
.lp-price-features {
  list-style: none; padding: 0; margin: 1rem 0;
  text-align: start;
}
.lp-price-features li {
  padding: 0.35rem 0; font-size: 0.8rem;
  color: var(--gray-600); border-bottom: 1px dashed var(--gray-100);
}
.lp-price-features li:last-child { border-bottom: none; }
.lp-price-btn {
  display: block; width: 100%; padding: 0.6rem;
  background: var(--white); color: var(--primary);
  border: 2px solid var(--primary); border-radius: var(--radius);
  font-size: 0.85rem; font-weight: 600; text-decoration: none;
  text-align: center; margin-top: 1rem; transition: var(--transition);
}
.lp-price-btn:hover { background: var(--primary); color: white; }
.lp-price-btn-primary {
  background: var(--primary); color: white;
}
.lp-price-btn-primary:hover { background: var(--primary-dark); }
.lp-price-currency { font-size: 0.7em; font-weight: 500; }

/* ── Final CTA Section ── */
.lp-final-cta { padding: 4rem 1.5rem; background: var(--primary); color: white; }
.lp-final-cta-box {
  max-width: 600px; margin: 0 auto; text-align: center;
  background: var(--white); padding: 2.5rem 2rem;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
}
.lp-final-title { font-size: 1.5rem; margin-bottom: 0.75rem; color: var(--gray-800); }
.lp-final-desc { font-size: 0.95rem; color: var(--gray-500); margin-bottom: 1.5rem; }
.lp-final-actions {
  display: flex; gap: 0.75rem; justify-content: center;
  flex-wrap: wrap; margin-bottom: 1rem;
}
.lp-final-btn-primary { padding: 0.75rem 1.25rem; font-size: 0.9rem; }
.lp-final-btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.25rem; background: #25D366; color: white;
  border-radius: var(--radius); font-size: 0.9rem; font-weight: 600;
  text-decoration: none; transition: var(--transition);
}
.lp-final-btn-secondary:hover { background: #128C7E; }
.lp-final-note {
  font-size: 0.75rem; color: var(--gray-400); margin-top: 0.5rem;
}

/* ---- Dark Mode for new landing elements ---- */
html.dark .lp-how-it-works { background: var(--white); }
html.dark .lp-step-card { background: var(--white); border-color: var(--gray-200); }
html.dark .lp-vs-card { background: var(--white); border-color: var(--gray-200); }
html.dark .lp-vs-before { border-left-color: #EF4444; }
html.dark .lp-vs-after { border-left-color: #10B981; }
html.dark .lp-final-cta { background: var(--primary); }
html.dark .lp-final-cta-box { background: var(--white); border-color: var(--gray-200); }
html.dark .lp-stat-label { color: var(--gray-400); }
html.dark .lp-price-features li { border-color: var(--gray-100); }

/* ── Responsive for new landing elements ── */
@media (max-width: 768px) {
  .lp-steps-grid { grid-template-columns: 1fr; max-width: 400px; }
  .lp-vs-grid { grid-template-columns: 1fr; }
  .lp-vs-arrow { transform: rotate(90deg); }
  .lp-stats-bar { gap: 1rem; }
  .lp-stat-num { font-size: 1.4rem; }
  .lp-contact-btn { width: 100%; max-width: 280px; justify-content: center; }
  .lp-final-actions { flex-direction: column; align-items: center; }
  .lp-final-btn-secondary { width: 100%; max-width: 280px; justify-content: center; }
}

/* ── Activation Notice Modal ── */
.act-modal-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem; animation: act-fade-in 0.3s ease;
}
.act-modal-overlay.hidden { display: none; }
@keyframes act-fade-in { from { opacity: 0; } to { opacity: 1; } }
.act-modal {
  background: var(--white); border-radius: 16px;
  padding: 2.5rem 2rem 2rem; max-width: 420px; width: 100%;
  text-align: center; position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.15);
  animation: act-slide-up 0.35s ease;
}
@keyframes act-slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.act-modal-close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  background: none; border: none; color: var(--gray-400);
  padding: 0.35rem; border-radius: 8px; transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
html[dir="rtl"] .act-modal-close { right: auto; left: 0.75rem; }
.act-modal-close:hover { background: var(--gray-100); color: var(--gray-600); }
.act-modal-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
}
.act-modal-title {
  font-size: 1.3rem; font-weight: 800; color: var(--gray-900);
  margin-bottom: 0.5rem;
}
.act-modal-desc {
  font-size: 0.9rem; color: var(--gray-500); line-height: 1.7;
  margin-bottom: 1.5rem;
}
.act-modal-wa-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; padding: 0.85rem 1rem; border-radius: 12px;
  background: #25D366; color: white; font-weight: 700; font-size: 0.95rem;
  text-decoration: none; transition: var(--transition); border: none;
}
.act-modal-wa-btn:hover { background: #1EBE5A; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(37,211,102,0.3); }
.act-modal-wa-btn:active { transform: translateY(0); }
.act-modal-number {
  font-weight: 600; font-size: 0.85rem; opacity: 0.85;
  direction: ltr; unicode-bidi: bidi-override;
}
.act-modal-dismiss {
  margin-top: 1rem; background: none; border: none;
  color: var(--gray-400); font-size: 0.82rem; font-weight: 500;
  padding: 0.5rem 1rem; transition: var(--transition);
}
.act-modal-dismiss:hover { color: var(--gray-600); }

/* Activation modal dark mode */
html.dark .act-modal { background: var(--gray-100); }
html.dark .act-modal-close:hover { background: var(--gray-200); color: var(--gray-500); }
html.dark .act-modal-dismiss:hover { color: var(--gray-500); }

/* Activation modal responsive */
@media (max-width: 480px) {
  .act-modal { padding: 2rem 1.25rem 1.5rem; }
  .act-modal-title { font-size: 1.15rem; }
  .act-modal-desc { font-size: 0.85rem; }
  .act-modal-icon { width: 56px; height: 56px; }
  .act-modal-icon svg { width: 32px; height: 32px; }
}

/* ── Zaki Bot Chat Widget ── */
#zaki-bot { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; }
html[dir="rtl"] #zaki-bot { right: auto; left: 1.5rem; }

#zaki-toggle {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white; border: none; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(16,185,129,0.4);
  transition: all 0.3s ease; position: relative;
}
#zaki-toggle:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(16,185,129,0.5); }
#zaki-toggle::after {
  content: ''; position: absolute; top: -2px; right: -2px;
  width: 16px; height: 16px; background: #EF4444; border-radius: 50%;
  border: 2px solid white; animation: zaki-pulse 2s infinite;
}
#zaki-toggle.active::after { display: none; }
@keyframes zaki-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

#zaki-window {
  position: absolute; bottom: 76px; right: 0;
  width: 380px; max-height: 520px;
  background: var(--white); border-radius: 20px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.15);
  border: 1px solid var(--gray-200);
  display: flex; flex-direction: column;
  animation: zaki-slide-up 0.3s ease;
  overflow: hidden;
}
html[dir="rtl"] #zaki-window { right: auto; left: 0; }
@keyframes zaki-slide-up {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.zaki-header {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white; padding: 1rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.zaki-header-left { display: flex; align-items: center; gap: 0.75rem; }
.zaki-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.zaki-name { font-weight: 700; font-size: 0.95rem; }
.zaki-status { font-size: 0.72rem; opacity: 0.85; }
.zaki-close-btn {
  background: rgba(255,255,255,0.15); border: none; color: white;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.zaki-close-btn:hover { background: rgba(255,255,255,0.3); }

.zaki-messages {
  flex: 1; overflow-y: auto; padding: 1rem;
  display: flex; flex-direction: column; gap: 0.625rem;
  min-height: 200px; max-height: 280px;
  scroll-behavior: smooth;
}
.zaki-messages::-webkit-scrollbar { width: 4px; }
.zaki-messages::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }

.zaki-msg {
  max-width: 85%; padding: 0.65rem 0.9rem;
  border-radius: 16px; font-size: 0.84rem; line-height: 1.5;
  animation: zaki-fade-in 0.25s ease;
  word-wrap: break-word;
}
@keyframes zaki-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.zaki-msg.bot {
  background: var(--gray-100); color: var(--gray-800);
  border-bottom-left-radius: 4px; align-self: flex-start;
}
html[dir="rtl"] .zaki-msg.bot { border-bottom-left-radius: 16px; border-bottom-right-radius: 4px; }
.zaki-msg.user {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white; border-bottom-right-radius: 4px; align-self: flex-end;
}
html[dir="rtl"] .zaki-msg.user { border-bottom-right-radius: 16px; border-bottom-left-radius: 4px; }

.zaki-msg .msg-time {
  display: block; font-size: 0.65rem; opacity: 0.6; margin-top: 0.25rem;
}

.zaki-typing {
  display: flex; gap: 4px; padding: 0.65rem 0.9rem; align-self: flex-start;
  background: var(--gray-100); border-radius: 16px; border-bottom-left-radius: 4px;
}
.zaki-typing span {
  width: 7px; height: 7px; background: var(--gray-400); border-radius: 50%;
  animation: zaki-dot 1.4s ease-in-out infinite;
}
.zaki-typing span:nth-child(2) { animation-delay: 0.2s; }
.zaki-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes zaki-dot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.zaki-suggestions {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  padding: 0 1rem 0.75rem; flex-shrink: 0;
}
.zaki-sug-btn {
  padding: 0.4rem 0.75rem; border-radius: 20px;
  background: var(--primary-50); color: var(--primary-dark);
  border: 1px solid var(--primary-light); font-size: 0.76rem;
  font-weight: 600; cursor: pointer; transition: var(--transition);
  white-space: nowrap;
}
.zaki-sug-btn:hover {
  background: var(--primary); color: white;
  border-color: var(--primary); transform: translateY(-1px);
}

.zaki-input-row {
  display: flex; gap: 0.5rem; padding: 0.75rem 1rem;
  border-top: 1px solid var(--gray-200); flex-shrink: 0;
  background: var(--gray-50);
}
.zaki-input-row input {
  flex: 1; border: 1px solid var(--gray-200); border-radius: 24px;
  padding: 0.6rem 1rem; font-size: 0.84rem;
  background: var(--white); color: var(--gray-800);
  outline: none; transition: var(--transition);
}
.zaki-input-row input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(16,185,129,0.1); }
.zaki-send-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: white; border: none;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); flex-shrink: 0;
}
.zaki-send-btn:hover { background: var(--primary-dark); transform: scale(1.05); }

/* Zaki Bot dark mode */
html.dark #zaki-window { background: var(--gray-100); border-color: var(--gray-200); }
html.dark .zaki-msg.bot { background: var(--gray-200); color: var(--gray-800); }
html.dark .zaki-typing { background: var(--gray-200); }
html.dark .zaki-input-row { background: var(--gray-50); border-color: var(--gray-200); }
html.dark .zaki-input-row input { background: var(--gray-100); border-color: var(--gray-300); color: var(--gray-800); }
html.dark .zaki-sug-btn { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.2); }
html.dark #zaki-toggle { box-shadow: 0 4px 16px rgba(16,185,129,0.25); }

/* Zaki Bot responsive */
@media (max-width: 480px) {
  #zaki-bot { bottom: 1rem; right: 1rem; }
  html[dir="rtl"] #zaki-bot { right: auto; left: 1rem; }
  #zaki-toggle { width: 52px; height: 52px; }
  #zaki-window {
    width: calc(100vw - 2rem); right: -0.5rem; bottom: 66px;
    max-height: 70vh; border-radius: 16px;
  }
  html[dir="rtl"] #zaki-window { right: auto; left: -0.5rem; }
  .zaki-messages { min-height: 160px; max-height: 45vh; }
}

/* ── Header ── */
#main-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem; height: 64px;
}
.header-left { display: flex; align-items: center; }
.logo {
  display: flex; align-items: center; gap: 0.625rem;
  cursor: pointer; user-select: none;
}
.logo-text {
  font-size: 1.375rem; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; letter-spacing: -0.5px;
}
.header-nav { display: flex; gap: 0.25rem; }
.nav-btn {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem; border: none; background: none;
  color: var(--gray-500); font-weight: 500; font-size: 0.875rem;
  border-radius: var(--radius-sm); transition: var(--transition);
}
.nav-btn:hover { color: var(--gray-800); background: var(--gray-100); }
.nav-btn.active { color: var(--primary); background: var(--primary-50); }
.header-right { display: flex; align-items: center; gap: 0.75rem; }
.btn-icon {
  width: 36px; height: 36px; border: none; background: none;
  color: var(--gray-500); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.btn-icon:hover { background: var(--gray-100); color: var(--gray-700); }
.user-menu { position: relative; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  cursor: pointer; border: 2px solid var(--gray-200);
  transition: var(--transition);
}
.avatar:hover { border-color: var(--primary); }
.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-xl); border: 1px solid var(--gray-200);
  min-width: 220px; padding: 0.5rem; z-index: 200;
  animation: dropdown-in 0.15s ease;
}
html[dir="rtl"] .user-dropdown { right: auto; left: 0; }
@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.dropdown-header {
  padding: 0.75rem; display: flex; flex-direction: column;
}
.dropdown-header span:first-child { font-weight: 600; font-size: 0.9rem; }
.user-dropdown button {
  display: block; width: 100%; text-align: start;
  padding: 0.625rem 0.75rem; border: none; background: none;
  font-size: 0.875rem; color: var(--gray-700);
  border-radius: var(--radius-sm); transition: var(--transition);
}
.user-dropdown button:hover { background: var(--gray-100); }
.user-dropdown button.text-danger:hover { background: var(--danger-light); }

/* ── Mobile Nav ── */
#mobile-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--gray-200); z-index: 100;
  padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom));
  justify-content: space-around;
}
.mob-nav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  padding: 0.4rem 0; border: none; background: none;
  color: var(--gray-400); font-size: 0.62rem; font-weight: 600;
  border-radius: var(--radius-sm); transition: var(--transition);
  min-width: 0; flex: 1;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.mob-nav-btn.active { color: var(--primary); }
.mob-nav-btn:active { transform: scale(0.92); }

/* ── Mobile More Sheet ── */
.mob-more-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 200; transition: opacity 0.25s ease;
}
.mob-more-overlay.hidden { display: none; }
.mob-more-sheet {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-radius: 1.25rem 1.25rem 0 0;
  z-index: 201;
  padding: 0 1rem calc(1.5rem + env(safe-area-inset-bottom));
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
}
.mob-more-sheet.hidden {
  transform: translateY(100%);
  pointer-events: none;
}
.mob-more-handle {
  display: flex; justify-content: center; padding: 0.75rem 0 0.5rem;
  cursor: pointer;
}
.mob-more-handle span {
  width: 36px; height: 4px; border-radius: 2px;
  background: var(--gray-300);
}
.mob-more-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding-bottom: 0.5rem;
}
.mob-more-item {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  padding: 1rem 0.5rem;
  border: none; background: none;
  font-size: 0.75rem; font-weight: 600; color: var(--gray-700);
  border-radius: var(--radius);
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.mob-more-item:active { background: var(--gray-50); transform: scale(0.95); }
.mob-more-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}
html.dark .mob-more-sheet { background: var(--gray-100); }
html.dark .mob-more-item { color: var(--gray-800); }
html.dark .mob-more-item:active { background: var(--gray-200); }
html.dark .mob-more-handle span { background: var(--gray-500); }

/* ── Main Content ── */
#main-content {
  max-width: 1200px; margin: 0 auto;
  padding: 1.5rem; padding-bottom: 6rem;
}
.container { max-width: 800px; margin: 0 auto; }
#view-dashboard > .container { max-width: 960px; }
.container-sm { max-width: 560px; }
.view { display: none; animation: fade-in 0.25s ease; }
.view.active { display: block; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ── Dashboard Greeting ── */
.dash-greeting {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap;
}
.dash-greeting h2 { font-size: 1.35rem; font-weight: 700; color: var(--gray-900); line-height: 1.3; }
.dash-greeting p { color: var(--gray-500); font-size: 0.85rem; margin-top: 0.15rem; }
.dash-new-btn { white-space: nowrap; flex-shrink: 0; }

/* ── Hero Income Cards ── */
.dash-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 0.75rem; }
.dash-hero-card {
  border-radius: var(--radius-lg); padding: 1.25rem 1.35rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  position: relative; overflow: hidden;
}
.hero-today {
  background: linear-gradient(135deg, #059669 0%, #10B981 60%, #34D399 100%);
  color: white;
}
.hero-month {
  background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 60%, #60A5FA 100%);
  color: white;
}
.hero-top { display: flex; align-items: center; justify-content: space-between; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: rgba(255,255,255,0.2); border-radius: 20px;
  padding: 0.2rem 0.65rem; font-size: 0.72rem; font-weight: 600;
  backdrop-filter: blur(4px);
}
.hero-value {
  font-size: 1.65rem; font-weight: 800; letter-spacing: -0.5px; line-height: 1;
}
.dash-hero-card::after {
  content: ''; position: absolute; bottom: -20px; right: -20px;
  width: 90px; height: 90px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
html[dir="rtl"] .dash-hero-card::after { right: auto; left: -20px; }

/* ── Quick Stats Strip ── */
.dash-quick-stats {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--white); border-radius: var(--radius);
  padding: 1rem 1.25rem; margin-bottom: 0.75rem;
  border: 1px solid var(--gray-100); box-shadow: var(--shadow-sm);
}
.qs-item { flex: 1; text-align: center; min-width: 0; }
.qs-value {
  display: block; font-size: 1.15rem; font-weight: 800;
  color: var(--gray-900); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qs-label { display: block; font-size: 0.68rem; color: var(--gray-500); font-weight: 500; margin-top: 0.1rem; }
.qs-sep { width: 1px; height: 28px; background: var(--gray-200); flex-shrink: 0; }

/* ── Dashboard Panels ── */
.dash-panel {
  background: var(--white); border-radius: var(--radius);
  padding: 1.15rem 1.25rem; margin-bottom: 0.75rem;
  border: 1px solid var(--gray-100); box-shadow: var(--shadow-sm);
}
.dash-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.85rem; gap: 0.5rem;
}
.dash-panel-head h3 { font-size: 0.92rem; font-weight: 700; color: var(--gray-800); }

/* ── Duo Layout (side-by-side on desktop) ── */
.dash-duo { display: grid; grid-template-columns: 1fr 1.4fr; gap: 0.75rem; }
.dash-duo > .dash-panel { margin-bottom: 0; }

/* ── Section Header (used in other views) ── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; flex-wrap: wrap; gap: 0.75rem;
}
.section-header h2, .section-header h3 {
  font-size: 1.125rem; font-weight: 700;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.625rem 1.25rem; border: 2px solid transparent;
  border-radius: var(--radius-sm); font-weight: 600; font-size: 0.875rem;
  transition: var(--transition); white-space: nowrap; line-height: 1.4;
}
.btn:active { transform: scale(0.97); }
.btn-sm { padding: 0.4rem 0.875rem; font-size: 0.8rem; }
.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; }
.btn-primary {
  background: var(--primary); color: white; border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); box-shadow: 0 4px 12px rgba(16,185,129,0.35); }
.btn-success { background: #25D366; color: white; border-color: #25D366; }
.btn-success:hover { background: #1fbd5a; border-color: #1fbd5a; box-shadow: 0 4px 12px rgba(37,211,102,0.35); }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover { background: #DC2626; border-color: #DC2626; }
.btn-outline {
  background: var(--white); color: var(--gray-700); border-color: var(--gray-200);
}
.btn-outline:hover { border-color: var(--gray-400); background: var(--gray-50); }
.btn-ghost { background: none; border: none; color: var(--gray-500); padding: 0.4rem; }
.btn-ghost:hover { color: var(--danger); }

/* ── Badges ── */
.badge {
  display: inline-flex; padding: 0.2rem 0.6rem; font-size: 0.7rem;
  font-weight: 700; border-radius: 999px; letter-spacing: 0.03em;
}
.badge-draft { background: var(--warning-light); color: #B45309; }
.badge-normal { background: var(--primary-light); color: var(--primary-dark); }
.badge-return { background: var(--danger-light); color: var(--danger); }

/* ── Form Card ── */
.form-header {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.form-header h2 { font-size: 1.5rem; font-weight: 700; }
.form-card {
  background: var(--white); border-radius: var(--radius);
  padding: 1.5rem; margin-bottom: 1rem;
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100);
  overflow: hidden;
}
.form-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.form-card-title {
  font-size: 0.95rem; font-weight: 700; color: var(--gray-800);
  margin-bottom: 1rem;
}
.form-card-header .form-card-title { margin-bottom: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row.three-col { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 0.375rem; position: relative; }
.form-group label {
  font-size: 0.8rem; font-weight: 600; color: var(--gray-600);
}
.form-group input, .form-group select, .form-group textarea {
  padding: 0.7rem 0.875rem; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm); background: var(--white);
  transition: var(--transition); color: var(--gray-800);
  font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
}
.form-group input::placeholder, .form-group textarea::placeholder {
  color: var(--gray-400);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-card > .form-group + .form-group { margin-top: 0.875rem; }
.form-card > .form-group + .btn { margin-top: 1.25rem; }
#view-settings h2 { margin-bottom: 1.25rem; font-size: 1.5rem; font-weight: 700; }

/* ── Customer Suggestions ── */
.suggestions-dropdown {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  z-index: 50; max-height: 180px; overflow-y: auto;
}
.suggestion-item {
  padding: 0.6rem 0.875rem; cursor: pointer;
  font-size: 0.875rem; border-bottom: 1px solid var(--gray-100);
  transition: var(--transition);
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: var(--primary-50); }
.suggestion-item .suggestion-phone { color: var(--gray-400); font-size: 0.78rem; }

/* ── Item Row ── */
.item-row {
  display: grid;
  grid-template-columns: 2fr 1fr 0.7fr 1fr auto;
  gap: 0.75rem; align-items: end;
  padding: 0.875rem 0; border-bottom: 1px solid var(--gray-100);
  animation: item-in 0.25s ease;
}
.item-row:last-child { border-bottom: none; }
@keyframes item-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.item-row .form-group label { font-size: 0.72rem; }
.item-row input {
  padding: 0.55rem 0.7rem; font-size: 0.875rem;
}
.item-total {
  font-weight: 700; color: var(--primary-dark); font-size: 0.9rem;
  padding-top: 1.6rem; white-space: nowrap;
}
.btn-remove-item {
  background: none; border: none; color: var(--gray-400);
  padding: 0.4rem; border-radius: var(--radius-sm);
  transition: var(--transition); margin-top: 1.2rem;
}
.btn-remove-item:hover { color: var(--danger); background: var(--danger-light); }

/* ── Totals Card ── */
.totals-card {
  background: var(--white); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; margin-bottom: 1rem;
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100);
}
.total-row {
  display: flex; justify-content: space-between;
  padding: 0.4rem 0; font-size: 0.9rem; color: var(--gray-600);
}
.total-final {
  font-size: 1.25rem; font-weight: 800; color: var(--gray-900);
  padding-top: 0.75rem;
}
.total-final span:last-child { color: var(--primary); }

/* ── Form Actions ── */
.form-actions {
  display: flex; gap: 1rem; justify-content: flex-end;
  margin-top: 0.5rem;
}

/* ── Invoice List ── */
.invoice-list { display: flex; flex-direction: column; gap: 0.5rem; }
.invoice-item {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--white); border-radius: var(--radius);
  padding: 1rem 1.25rem; box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100); transition: var(--transition);
  cursor: pointer; gap: 1rem;
}
.invoice-item:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.invoice-item.return-item { border-left: 3px solid var(--danger); }
html[dir="rtl"] .invoice-item.return-item { border-left: none; border-right: 3px solid var(--danger); }
.invoice-item-left { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.invoice-item-name { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.invoice-item-meta { font-size: 0.78rem; color: var(--gray-400); display: flex; gap: 0.75rem; flex-wrap: wrap; }
.invoice-item-right { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.invoice-item-amount { font-weight: 700; font-size: 1.1rem; }
.invoice-item-actions { display: flex; gap: 0.25rem; }

/* ── Empty State ── */
.empty-state {
  text-align: center; padding: 3rem 1rem; color: var(--gray-400);
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.empty-state svg { width: 48px; height: 48px; opacity: 0.3; }

/* ── Loading Spinner ── */
.loading-spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loading-container {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  padding: 3rem 1rem; color: var(--gray-400);
}

/* ── Filter Group ── */
.filter-group { display: flex; gap: 0.5rem; }
.filter-group select, .filter-group input {
  padding: 0.5rem 0.75rem; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm); font-size: 0.85rem;
  background: var(--white); transition: var(--transition);
}
.filter-group select:focus, .filter-group input:focus {
  outline: none; border-color: var(--primary);
}

/* ── Modal ── */
.modal {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; animation: modal-in 0.2s ease;
}
.modal.hidden { display: none !important; }
@keyframes modal-in { from { opacity: 0; } }
.modal-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.45); backdrop-filter: blur(4px);
}
.modal-content {
  position: relative; background: var(--white);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xl);
  max-height: 90vh; overflow: hidden;
  display: flex; flex-direction: column;
  width: 100%; max-width: 560px;
  animation: modal-slide 0.25s ease;
}
.modal-lg { max-width: 780px; }
@keyframes modal-slide {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--gray-200);
}
.modal-header h3 { font-size: 1.1rem; font-weight: 700; }
.modal-header-danger { background: var(--danger-light); }
.modal-header-danger h3 { color: var(--danger); }
.btn-close {
  width: 32px; height: 32px; border: none; background: none;
  font-size: 1.4rem; color: var(--gray-400); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.btn-close:hover { background: var(--gray-100); color: var(--gray-700); }
.modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; }
.modal-footer {
  display: flex; gap: 0.75rem; padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--gray-200); flex-wrap: wrap;
  justify-content: flex-end;
}

/* ── Invoice Preview ── */
.invoice-preview-container {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); padding: 2rem;
  font-size: 0.85rem;
}
.inv-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2rem; }
.inv-brand { display: flex; align-items: center; gap: 0.75rem; }
.inv-brand-name { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.inv-type-badge {
  display: inline-block; padding: 0.3rem 0.75rem;
  border-radius: 999px; font-size: 0.7rem; font-weight: 700;
}
.inv-type-normal { background: var(--primary-light); color: var(--primary-dark); }
.inv-type-return { background: var(--danger-light); color: var(--danger); }
.inv-details { text-align: end; }
.inv-details p { margin: 0.15rem 0; color: var(--gray-600); font-size: 0.8rem; }
.inv-invoice-number { font-size: 1.1rem; font-weight: 700; color: var(--gray-900); }
.inv-section { margin-bottom: 1.5rem; }
.inv-section-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-400); font-weight: 700; margin-bottom: 0.5rem; }
.inv-customer p { margin: 0.15rem 0; }
.inv-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.inv-table th {
  padding: 0.6rem 0.75rem; text-align: start;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--gray-500); font-weight: 700;
  border-bottom: 2px solid var(--gray-200); background: var(--gray-50);
}
.inv-table td {
  padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--gray-100);
  font-size: 0.84rem;
}
.inv-table td:last-child, .inv-table th:last-child { text-align: end; }
.inv-totals { display: flex; flex-direction: column; align-items: flex-end; }
.inv-totals-table { min-width: 220px; }
.inv-totals-row {
  display: flex; justify-content: space-between;
  padding: 0.35rem 0; font-size: 0.84rem; color: var(--gray-600);
}
.inv-totals-final {
  font-size: 1.15rem; font-weight: 800; color: var(--gray-900);
  border-top: 2px solid var(--gray-800); padding-top: 0.6rem; margin-top: 0.4rem;
}
.inv-totals-final span:last-child { color: var(--primary); }
.inv-payment {
  background: var(--primary-50); border-radius: var(--radius-sm);
  padding: 0.75rem 1rem; display: flex; align-items: center; gap: 0.5rem;
}
.inv-payment strong { color: var(--primary-dark); }
.inv-notes {
  background: var(--gray-50); border-radius: var(--radius-sm);
  padding: 0.75rem 1rem; font-style: italic; color: var(--gray-500);
  font-size: 0.82rem;
}
.inv-footer {
  text-align: center; margin-top: 2rem; padding-top: 1rem;
  border-top: 1px solid var(--gray-200); color: var(--gray-400); font-size: 0.75rem;
}
.inv-return-bg { background: var(--danger-bg); }
.inv-return-bg .inv-brand-name { color: var(--danger); }
.inv-return-bg .inv-totals-final span:last-child { color: var(--danger); }
.inv-return-bg .inv-payment { background: var(--danger-light); }
.inv-return-bg .inv-payment strong { color: var(--danger); }

/* ── Return Modal Items ── */
.return-item-row {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 0; border-bottom: 1px solid var(--gray-100);
}
.return-item-row:last-child { border-bottom: none; }
.return-item-row input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--danger);
}
.return-item-info { flex: 1; }
.return-item-name { font-weight: 600; font-size: 0.9rem; }
.return-item-detail { font-size: 0.78rem; color: var(--gray-400); }
.return-qty-input {
  width: 60px; padding: 0.4rem; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm); text-align: center; font-size: 0.85rem;
}

/* ── Toast ── */
#toast-container {
  position: fixed; top: 80px; right: 1.5rem; z-index: 1000;
  display: flex; flex-direction: column; gap: 0.5rem;
}
html[dir="rtl"] #toast-container { right: auto; left: 1.5rem; }
.toast {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.875rem 1.25rem; background: var(--white);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200); font-size: 0.875rem; font-weight: 500;
  animation: toast-in 0.3s ease;
  min-width: 280px; max-width: 400px;
}
.toast-success { border-left: 4px solid var(--primary); }
.toast-error { border-left: 4px solid var(--danger); }
html[dir="rtl"] .toast-success { border-left: none; border-right: 4px solid var(--primary); }
html[dir="rtl"] .toast-error { border-left: none; border-right: 4px solid var(--danger); }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toast-in-rtl {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}
html[dir="rtl"] .toast { animation-name: toast-in-rtl; }
.toast-exit { animation: toast-out 0.3s ease forwards; }
@keyframes toast-out {
  to { opacity: 0; transform: translateX(24px); }
}

/* ── Dashboard Cards (legacy compat) ── */
.bg-purple { background: linear-gradient(135deg, #8B5CF6, #7C3AED); }
.month-stats { display: flex; align-items: center; gap: 1rem; }
.month-stat { flex: 1; text-align: center; }
.month-stat-value { display: block; font-size: 1.25rem; font-weight: 800; color: var(--gray-900); }
.month-stat-label { font-size: 0.72rem; color: var(--gray-500); font-weight: 500; }
.month-stat-divider { width: 1px; height: 36px; background: var(--gray-200); flex-shrink: 0; }
.top-customers { display: flex; flex-direction: column; gap: 0.5rem; }
.top-customer-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 0; border-bottom: 1px solid var(--gray-100);
}
.top-customer-item:last-child { border-bottom: none; }
.top-customer-left { display: flex; align-items: center; gap: 0.75rem; }
.top-customer-rank {
  width: 24px; height: 24px; border-radius: 50%; font-size: 0.7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: var(--gray-100); color: var(--gray-600);
}
.top-customer-rank.rank-1 { background: #FEF3C7; color: #B45309; }
.top-customer-rank.rank-2 { background: var(--gray-200); color: var(--gray-700); }
.top-customer-rank.rank-3 { background: #FED7AA; color: #C2410C; }
.top-customer-name { font-weight: 600; font-size: 0.88rem; }
.top-customer-count { font-size: 0.72rem; color: var(--gray-400); }
.top-customer-amount { font-weight: 700; font-size: 0.9rem; color: var(--primary-dark); }

/* ── Logo Upload ── */
.logo-upload-area {
  border: 2px dashed var(--gray-300); border-radius: var(--radius);
  padding: 1.5rem; text-align: center; cursor: pointer;
  transition: var(--transition); background: var(--gray-50);
  position: relative; overflow: hidden;
}
.logo-upload-area:hover { border-color: var(--primary); background: var(--primary-50); }
.logo-upload-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: var(--gray-400); font-size: 0.82rem;
}
.logo-preview-img {
  max-width: 160px; max-height: 80px; margin: 0 auto;
  object-fit: contain; border-radius: var(--radius-sm);
}
.inv-brand-logo {
  width: 48px; height: 48px; object-fit: contain; border-radius: 8px;
}

/* ── Payment Wall ── */
.payment-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(135deg, rgba(17,24,39,0.95), rgba(6,95,70,0.9));
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.payment-card {
  background: var(--white); border-radius: 20px; padding: 2.5rem 2rem;
  text-align: center; max-width: 440px; width: 100%;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  animation: payment-in 0.5s ease;
}
@keyframes payment-in { from { opacity: 0; transform: scale(0.9) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.payment-logo { margin-bottom: 1.5rem; }
.payment-card h2 { font-size: 1.5rem; font-weight: 800; color: var(--gray-900); margin-bottom: 0.75rem; }
.payment-card p { color: var(--gray-500); font-size: 0.9rem; line-height: 1.7; margin-bottom: 1.5rem; }
.payment-wa-link {
  width: 100%; justify-content: center; padding: 0.85rem 1.5rem;
  font-size: 1rem; border-radius: 12px; gap: 0.75rem;
  background: #25D366; color: white; text-decoration: none;
  display: inline-flex; align-items: center;
  transition: var(--transition);
}
.payment-wa-link:hover { background: #1DA851; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(37,211,102,0.4); }
.payment-phone { margin-top: 1rem; font-size: 1.1rem; font-weight: 700; color: var(--gray-700); letter-spacing: 0.05em; direction: ltr; }

/* ── Trial Banner ── */
.trial-banner {
  background: linear-gradient(90deg, #F59E0B, #D97706);
  color: white; text-align: center; padding: 0.4rem 1rem;
  font-size: 0.78rem; font-weight: 600;
  line-height: 1.3;
}
.trial-banner-inner { display: flex; align-items: center; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
.trial-banner-sep { opacity: 0.5; font-weight: 300; }
.trial-banner-activate {
  display: inline-flex; align-items: center; gap: 0.35rem;
  color: white; text-decoration: none; font-weight: 700;
  background: rgba(255,255,255,0.2); padding: 0.15rem 0.6rem;
  border-radius: 20px; transition: background 0.2s ease;
  font-size: 0.75rem; white-space: nowrap;
}
.trial-banner-activate:hover { background: rgba(255,255,255,0.35); }

/* ── (income cards replaced by hero cards above) ── */

/* ── Custom Fields ── */
.custom-fields-section { margin-top: 0.75rem; }
.custom-fields-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 0; margin-bottom: 0.35rem;
}
.custom-fields-label { font-size: 0.78rem; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.04em; }
.custom-field-row {
  display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem;
  animation: item-in 0.25s ease;
}
.custom-field-row input {
  flex: 1; min-width: 0; padding: 0.5rem 0.7rem; font-size: 0.84rem;
  border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  background: var(--gray-50); color: var(--gray-800);
  outline: none; transition: var(--transition);
}
.custom-field-row input:focus { border-color: var(--primary); background: var(--white); box-shadow: 0 0 0 3px rgba(16,185,129,0.1); }
.custom-field-row .btn-remove-item { flex-shrink: 0; }

/* ── Product Catalog ── */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.75rem; }
.product-card {
  background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius);
  padding: 1rem 1.25rem; box-shadow: var(--shadow-sm); transition: var(--transition);
}
.product-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.product-card-main { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.product-card-name { font-weight: 700; font-size: 0.95rem; color: var(--gray-900); }
.product-card-price { font-weight: 800; font-size: 1rem; color: var(--primary-dark); }
.product-card-meta { display: flex; align-items: center; justify-content: space-between; }
.product-card-actions { display: flex; gap: 0.35rem; }
.search-input-inline {
  width: 100%; border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  padding: 0.55rem 0.85rem; font-size: 0.85rem; outline: none; transition: var(--transition);
  background: var(--gray-50);
}
.search-input-inline:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(16,185,129,0.1); background: var(--white); }
.btn-xs { padding: 0.25rem 0.5rem; font-size: 0.72rem; border-radius: 6px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .header-nav { display: none; }
  #mobile-nav { display: flex; }
  .header-inner { height: 50px; padding: 0 1rem; }
  .header-inner .logo svg { width: 28px; height: 28px; }
  .logo-text { font-size: 1.1rem; }
  .avatar { width: 30px; height: 30px; }
  .btn-icon { width: 30px; height: 30px; }
  .btn-icon svg { width: 16px; height: 16px; }
  .trial-banner { padding: 0.25rem 0.75rem; font-size: 0.72rem; }
  #main-content { padding: 1rem; padding-bottom: 5rem; }
  /* Dashboard mobile */
  .dash-greeting h2 { font-size: 1.15rem; }
  .dash-greeting p { font-size: 0.78rem; }
  .dash-hero { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .dash-hero-card { padding: 1rem; gap: 0.5rem; }
  .hero-value { font-size: 1.25rem; }
  .hero-badge { font-size: 0.65rem; padding: 0.15rem 0.5rem; }
  .qs-value { font-size: 0.95rem; }
  .qs-label { font-size: 0.62rem; }
  .qs-sep { height: 22px; }
  .dash-quick-stats { padding: 0.75rem 0.5rem; }
  .dash-duo { grid-template-columns: 1fr; }
  .month-stats { flex-direction: column; gap: 0.75rem; }
  .month-stat-divider { width: 80%; height: 1px; }
  /* Form mobile */
  .form-row { grid-template-columns: 1fr; }
  .form-row.three-col { grid-template-columns: 1fr; }
  .container { overflow-x: hidden; }
  .pi-item-card { overflow: hidden; }
  .item-row {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    padding: 0.75rem; padding-top: 2rem;
    background: var(--gray-50); border-radius: var(--radius-sm);
    border-bottom: none; margin-bottom: 0.5rem; position: relative;
  }
  .item-row .form-group:first-child { width: 100%; }
  .item-row .form-group:nth-child(2) { flex: 1; min-width: 0; }
  .item-row .form-group:nth-child(3) { flex: 1; min-width: 0; }
  .item-total {
    flex: 1; min-width: 0; padding-top: 0;
    display: flex; align-items: flex-end; padding-bottom: 0.7rem; font-size: 0.85rem;
  }
  .btn-remove-item { position: absolute; top: 0.5rem; right: 0.5rem; margin-top: 0; }
  html[dir="rtl"] .btn-remove-item { right: auto; left: 0.5rem; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; }
  .modal { padding: 0 !important; }
  .modal-content {
    margin: 0; max-height: 100vh; border-radius: 0;
    height: 100vh; width: 100vw; max-width: 100vw;
    box-sizing: border-box;
  }
  .modal-content.modal-lg { width: 100vw; max-width: 100vw; }
  .modal-body {
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    max-height: calc(100vh - 120px);
    padding: 1rem; box-sizing: border-box;
    overflow-x: hidden;
  }
  .modal-header { position: sticky; top: 0; background: var(--white); z-index: 2; padding: 0.75rem 1rem; }
  html.dark .modal-header { background: var(--gray-100); }
  .modal-footer {
    flex-wrap: wrap; position: sticky; bottom: 0;
    background: var(--white); z-index: 2;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--gray-200);
  }
  html.dark .modal-footer { background: var(--gray-100); }
  .modal-footer .btn { flex: 1 1 calc(50% - 0.5rem); min-width: 0; font-size: 0.85rem; padding: 0.75rem 0.5rem; min-height: 44px; }
  .btn-close { width: 36px; height: 36px; font-size: 1.5rem; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .section-header .btn { width: 100%; justify-content: center; min-height: 44px; }
  .filter-group { width: 100%; flex-direction: column; }
  .filter-group input, .filter-group select { width: 100%; min-height: 44px; font-size: 16px; }
  input, select, textarea { font-size: 16px !important; }
  .products-grid { grid-template-columns: 1fr; }
  .custom-field-row { flex-wrap: wrap; }
  .custom-field-row input { flex: 1 1 40%; min-width: 0; font-size: 0.8rem; padding: 0.45rem 0.6rem; }
  .custom-field-row .btn-remove-item { flex: 0 0 auto; }
  .inv-header { flex-direction: column; gap: 1rem; }
  .inv-details { text-align: start; }
  .invoice-item { flex-direction: column; align-items: flex-start; }
  .invoice-item-right { width: 100%; justify-content: space-between; }
  .invoice-preview-container { padding: 1.25rem; font-size: 0.8rem; }
  .inv-brand-name { font-size: 1.15rem; }
  .inv-invoice-number { font-size: 0.95rem; }
  .inv-table th, .inv-table td { padding: 0.4rem 0.5rem; font-size: 0.75rem; }
  .inv-totals-final { font-size: 1rem; }
  .inv-brand-logo { width: 36px; height: 36px; }
}

@media (max-width: 480px) {
  .header-inner { padding: 0 0.75rem; }
  .dash-greeting h2 { font-size: 1.05rem; }
  .dash-new-btn { display: none; }
  .dash-hero-card { padding: 0.85rem; border-radius: var(--radius); }
  .hero-value { font-size: 1.1rem; }
  .hero-badge { font-size: 0.6rem; }
  .dash-hero-card::after { width: 60px; height: 60px; }
  .qs-value { font-size: 0.82rem; }
  .qs-label { font-size: 0.58rem; }
  .dash-panel { padding: 0.85rem; }
  .month-stat-value { font-size: 1rem; }
  .form-card { padding: 1rem; }
  .form-row.three-col { grid-template-columns: 1fr; }
  .invoice-preview-container { padding: 1rem; }
  .inv-table th:first-child, .inv-table td:first-child { display: none; }
}

/* ── RTL Adjustments ── */
html[dir="rtl"] .invoice-item.return-item { border-left: none; border-right: 3px solid var(--danger); }
html[dir="rtl"] .inv-details { text-align: start; }

/* RTL Invoice Preview (for PDF + screen) */
.invoice-preview-container[dir="rtl"] { font-family: 'Cairo', 'Inter', sans-serif; }
.invoice-preview-container[dir="rtl"] .inv-header { flex-direction: row-reverse; }
.invoice-preview-container[dir="rtl"] .inv-brand { flex-direction: row-reverse; }
.invoice-preview-container[dir="rtl"] .inv-details { text-align: start; }
.invoice-preview-container[dir="rtl"] .inv-table th { text-align: start; }
.invoice-preview-container[dir="rtl"] .inv-table td:last-child,
.invoice-preview-container[dir="rtl"] .inv-table th:last-child { text-align: start; }
.invoice-preview-container[dir="rtl"] .inv-totals { align-items: flex-start; }
.invoice-preview-container[dir="rtl"] .inv-totals-row { flex-direction: row; }
.invoice-preview-container[dir="rtl"] .inv-payment { flex-direction: row-reverse; }

/* ── Print Styles ── */
/* Print styles are handled inline per page (index.html / invoice.html) */

/* ── Payment Status Badges ── */
.badge-paid { background: var(--primary-light); color: var(--primary-dark); }
.badge-partial { background: #FEF3C7; color: #B45309; }
.badge-unpaid { background: var(--gray-100); color: var(--gray-600); }
.badge-overdue { background: var(--danger-light); color: var(--danger); }

/* ── Payment Summary (inside payment modal) ── */
.payment-summary {
  background: var(--gray-50); border-radius: var(--radius-sm);
  padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem;
}
.payment-summary-row {
  display: flex; justify-content: space-between;
  font-size: 0.88rem; color: var(--gray-600);
}
.payment-summary-row.total { font-weight: 700; color: var(--gray-900); font-size: 1rem; }
.payment-summary-row.remaining { color: var(--danger); font-weight: 600; }
.payment-summary-row.paid-row { color: var(--primary-dark); font-weight: 600; }

/* ── CRM Customer Profile ── */
.crm-header {
  display: flex; align-items: center; gap: 1rem;
  padding-bottom: 1rem; border-bottom: 1px solid var(--gray-200); margin-bottom: 1.25rem;
}
.crm-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 800; flex-shrink: 0;
}
.crm-name { font-size: 1.15rem; font-weight: 700; color: var(--gray-900); }
.crm-contact { font-size: 0.82rem; color: var(--gray-500); }
.crm-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.crm-stat-card {
  background: var(--gray-50); border-radius: var(--radius-sm);
  padding: 0.85rem; text-align: center;
  border: 1px solid var(--gray-100);
}
.crm-stat-value { display: block; font-size: 1.1rem; font-weight: 800; color: var(--gray-900); }
.crm-stat-label { display: block; font-size: 0.68rem; color: var(--gray-500); font-weight: 500; margin-top: 0.15rem; }
.crm-invoices-title {
  font-size: 0.88rem; font-weight: 700; color: var(--gray-700);
  margin-bottom: 0.75rem;
}
.crm-customer-link {
  cursor: pointer; color: inherit; text-decoration: none;
  border-bottom: 1px dashed var(--gray-300); transition: var(--transition);
}
.crm-customer-link:hover { color: var(--primary); border-bottom-color: var(--primary); }

/* ── Alert Bell ── */
.alert-bell-wrapper { position: relative; }
.alert-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--danger); color: white;
  font-size: 0.6rem; font-weight: 700; min-width: 16px; height: 16px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  pointer-events: none; line-height: 1;
}
html[dir="rtl"] .alert-badge { right: auto; left: 2px; }
.alert-dropdown {
  position: absolute; top: 100%; right: 0;
  width: 320px; max-height: 360px; overflow-y: auto;
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  z-index: 200; margin-top: 0.5rem;
}
html[dir="rtl"] .alert-dropdown { right: auto; left: 0; }
.alert-dropdown-header {
  padding: 0.75rem 1rem; font-weight: 700; font-size: 0.88rem;
  border-bottom: 1px solid var(--gray-200); color: var(--gray-800);
}
.alert-dropdown-body { padding: 0.5rem; }
.alert-empty {
  text-align: center; padding: 1.5rem 0.5rem;
  color: var(--gray-400); font-size: 0.82rem;
}
.alert-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.6rem 0.75rem; border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--transition); font-size: 0.82rem;
}
.alert-item:hover { background: var(--gray-50); }
.alert-item-icon {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 0.75rem; font-weight: 700;
}
.alert-item-icon.overdue { background: var(--danger-light); color: var(--danger); }
.alert-item-icon.due-today { background: #FEF3C7; color: #B45309; }
.alert-item-info { flex: 1; min-width: 0; }
.alert-item-title { font-weight: 600; color: var(--gray-800); }
.alert-item-desc { color: var(--gray-500); font-size: 0.75rem; margin-top: 0.1rem; }

/* ── Overdue Row Highlight ── */
.invoice-item.overdue-item { border-left: 3px solid var(--danger); background: #FFF5F5; }
html[dir="rtl"] .invoice-item.overdue-item { border-left: none; border-right: 3px solid var(--danger); }

/* ── Invoice Preview Payment Status Section ── */
.inv-payment-status {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem; border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}
.inv-payment-status.status-paid { background: var(--primary-50); border: 1px solid var(--primary-light); }
.inv-payment-status.status-partial { background: #FFFBEB; border: 1px solid #FDE68A; }
.inv-payment-status.status-unpaid { background: var(--gray-50); border: 1px solid var(--gray-200); }
.inv-payment-status.status-overdue { background: #FFF5F5; border: 1px solid #FECACA; }
.inv-status-badge {
  padding: 0.2rem 0.6rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700;
}
.inv-status-info { flex: 1; font-size: 0.82rem; color: var(--gray-600); }
.inv-status-info strong { font-weight: 700; }

/* ── Dark Mode for new features ── */
html.dark .payment-summary { background: var(--gray-800); }
html.dark .payment-summary-row { color: var(--gray-300); }
html.dark .payment-summary-row.total { color: var(--gray-100); }
html.dark .crm-avatar { background: rgba(16,185,129,0.15); }
html.dark .crm-name { color: var(--gray-100); }
html.dark .crm-stat-card { background: var(--gray-800); border-color: var(--gray-700); }
html.dark .crm-stat-value { color: var(--gray-100); }
html.dark .alert-dropdown { background: var(--gray-800); border-color: var(--gray-700); }
html.dark .alert-dropdown-header { border-color: var(--gray-700); color: var(--gray-200); }
html.dark .alert-item:hover { background: var(--gray-700); }
html.dark .alert-item-title { color: var(--gray-200); }
html.dark .alert-item-desc { color: var(--gray-400); }
html.dark .alert-empty { color: var(--gray-500); }
html.dark .invoice-item.overdue-item { background: rgba(239,68,68,0.08); }
html.dark .inv-payment-status.status-paid { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.2); }
html.dark .inv-payment-status.status-partial { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.2); }
html.dark .inv-payment-status.status-unpaid { background: var(--gray-800); border-color: var(--gray-700); }
html.dark .inv-payment-status.status-overdue { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.2); }

/* ── Responsive for new features ── */
@media (max-width: 768px) {
  .crm-stats { grid-template-columns: repeat(2, 1fr); }
  .alert-dropdown { width: 280px; right: -60px; }
  html[dir="rtl"] .alert-dropdown { right: auto; left: -60px; }
}
@media (max-width: 480px) {
  .alert-dropdown { width: 260px; right: -80px; }
  html[dir="rtl"] .alert-dropdown { right: auto; left: -80px; }
  .crm-header { flex-direction: column; text-align: center; }
}

/* ── Enhanced Product Cards ── */
.product-card-sku { font-size: 0.72rem; color: var(--gray-400); font-family: monospace; margin-top: 0.1rem; }
.product-card-category { font-size: 0.7rem; color: var(--gray-500); }
.product-card-prices { display: flex; gap: 0.5rem; align-items: baseline; flex-wrap: wrap; }
.product-card-cost { font-size: 0.75rem; color: var(--gray-400); text-decoration: line-through; }
.product-card-wholesale { font-size: 0.75rem; color: var(--gray-500); }
.product-card-unit { font-size: 0.72rem; color: var(--gray-400); }
.product-card-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.4rem; }
.product-card-badges { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.badge-profit { background: #D1FAE5; color: #065F46; font-size: 0.68rem; padding: 0.15rem 0.45rem; border-radius: 999px; font-weight: 600; }
.badge-dead-stock { background: #FEF3C7; color: #92400E; font-size: 0.68rem; padding: 0.15rem 0.45rem; border-radius: 999px; font-weight: 600; }
.badge-low-stock { background: #FEE2E2; color: #991B1B; font-size: 0.68rem; padding: 0.15rem 0.45rem; border-radius: 999px; font-weight: 600; }
.product-card.dead-stock-card { border-left: 3px solid #F59E0B; }
html[dir="rtl"] .product-card.dead-stock-card { border-left: none; border-right: 3px solid #F59E0B; }
.product-card.low-stock-card { border-left: 3px solid var(--danger); }
html[dir="rtl"] .product-card.low-stock-card { border-left: none; border-right: 3px solid var(--danger); }

/* ── Pricing Toggle ── */
.pricing-toggle {
  display: inline-flex; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); overflow: hidden;
}
.pricing-opt {
  padding: 0.25rem 0.6rem; font-size: 0.72rem; font-weight: 600;
  background: transparent; border: none; cursor: pointer; color: var(--gray-500);
  transition: var(--transition);
}
.pricing-opt.active { background: var(--primary); color: white; }

/* ── Movement History Table ── */
.movement-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.movement-table th {
  padding: 0.5rem 0.75rem; text-align: start; font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--gray-500);
  font-weight: 700; border-bottom: 2px solid var(--gray-200); background: var(--gray-50);
}
.movement-table td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--gray-100); }
.movement-badge-in { background: #D1FAE5; color: #065F46; font-size: 0.68rem; padding: 0.12rem 0.4rem; border-radius: 999px; font-weight: 600; }
.movement-badge-out { background: #FEE2E2; color: #991B1B; font-size: 0.68rem; padding: 0.12rem 0.4rem; border-radius: 999px; font-weight: 600; }
.movement-badge-adjustment { background: #E0E7FF; color: #3730A3; font-size: 0.68rem; padding: 0.12rem 0.4rem; border-radius: 999px; font-weight: 600; }

/* ── Product Profit Display in Form ── */
.prod-profit-box {
  background: var(--gray-50); border-radius: var(--radius-sm); padding: 0.6rem 0.75rem;
  text-align: center; border: 1px solid var(--gray-100);
}
.prod-profit-value { font-size: 1rem; font-weight: 800; color: var(--primary-dark); }
.prod-profit-label { font-size: 0.68rem; color: var(--gray-500); font-weight: 500; }
.prod-profit-value.negative { color: var(--danger); }

/* ── Dark Mode for product features ── */
html.dark .product-card-sku { color: var(--gray-500); }
html.dark .product-card-cost { color: var(--gray-500); }
html.dark .product-card-wholesale { color: var(--gray-400); }
html.dark .pricing-toggle { border-color: var(--gray-600); }
html.dark .pricing-opt { color: var(--gray-400); }
html.dark .pricing-opt.active { background: var(--primary); color: white; }
html.dark .movement-table th { background: var(--gray-800); border-color: var(--gray-700); color: var(--gray-400); }
html.dark .movement-table td { border-color: var(--gray-700); }
html.dark .prod-profit-box { background: var(--gray-800); border-color: var(--gray-700); }
html.dark .product-card.dead-stock-card { border-left-color: #D97706; }
html[dir="rtl"].dark .product-card.dead-stock-card { border-right-color: #D97706; }

/* ── Responsive for product features ── */
@media (max-width: 480px) {
  .product-card-prices { flex-direction: column; gap: 0.15rem; }
  .pricing-toggle { display: none; }
}

/* ══════════════════════════════════════
   MODULE STYLES — Suppliers, Treasury, Ledger
   ══════════════════════════════════════ */

/* ── Suppliers Grid ── */
.suppliers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.supplier-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
}
.supplier-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.supplier-card-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.supplier-card-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem;
  flex-shrink: 0;
}
.supplier-card-name { font-weight: 600; color: var(--gray-900); font-size: 0.92rem; }
.supplier-card-phone { font-size: 0.78rem; color: var(--gray-500); margin-top: 0.1rem; }
.supplier-card-terms { font-size: 0.72rem; color: var(--accent); margin-top: 0.1rem; }
.supplier-card-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--gray-100);
}
.supplier-balance {
  font-size: 0.82rem; font-weight: 600;
}
.supplier-card-actions { display: flex; gap: 0.25rem; }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }

/* ── Purchase Item Card ── */
.pi-item-card {
  position: relative;
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  padding: 1rem; padding-top: 0.75rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  margin-bottom: 0.5rem;
}
html.dark .pi-item-card { background: var(--gray-100); border-color: var(--gray-200); }
html.dark #assign-customer-form { background: var(--gray-200) !important; }
.pi-item-remove {
  position: absolute; top: 0.5rem; right: 0.5rem;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: none;
  color: var(--gray-400); cursor: pointer;
  border-radius: 50%; transition: var(--transition);
}
html[dir="rtl"] .pi-item-remove { right: auto; left: 0.5rem; }
.pi-item-remove:hover { color: var(--danger); background: var(--danger-light); }
.pi-item-total {
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 0.55rem;
  font-weight: 700; font-size: 0.88rem; color: var(--primary-dark);
  white-space: nowrap; min-width: 70px;
}

/* ── Treasury Styles ── */
.treasury-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.treasury-balance-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  color: white;
  grid-column: 1 / -1;
}
.treasury-balance-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.84rem; opacity: 0.9;
}
.treasury-balance-amount {
  font-size: 2rem;
  font-weight: 800;
}
.treasury-health-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.health-green { background: rgba(255,255,255,0.2); color: #D1FAE5; }
.health-yellow { background: rgba(245,158,11,0.3); color: #FEF3C7; }
.health-red { background: rgba(239,68,68,0.3); color: #FEE2E2; }

.treasury-daily-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  grid-column: 1 / -1;
}
.treasury-daily-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}
.treasury-daily-card.daily-in { border-top: 3px solid var(--success); }
.treasury-daily-card.daily-out { border-top: 3px solid var(--danger); }
.treasury-daily-card.daily-net { border-top: 3px solid var(--accent); }
.treasury-daily-label {
  display: block; font-size: 0.72rem;
  color: var(--gray-500); text-transform: uppercase;
  letter-spacing: 0.03em; margin-bottom: 0.25rem;
}
.treasury-daily-value {
  display: block; font-size: 1.1rem;
  font-weight: 700; color: var(--gray-900);
}

/* Treasury transaction list */
.treasury-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  transition: var(--transition);
}
.treasury-item:hover { background: var(--gray-50); }
.treasury-item-left {
  display: flex; align-items: center; gap: 0.75rem;
}
.treasury-icon { font-size: 1.25rem; }
.treasury-item-desc {
  font-size: 0.84rem; font-weight: 500;
  color: var(--gray-900);
}
.treasury-item-meta {
  font-size: 0.72rem; color: var(--gray-400); margin-top: 0.15rem;
}
.treasury-item-amount {
  font-weight: 700; font-size: 0.9rem;
}

/* ── Customer Ledger Styles ── */
.ledger-age-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 1rem 0;
}
.ledger-age-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-top: 3px solid var(--success);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  text-align: center;
}
.ledger-age-value {
  display: block; font-weight: 700;
  font-size: 0.9rem; color: var(--gray-900);
}
.ledger-age-label {
  display: block; font-size: 0.68rem;
  color: var(--gray-500); margin-top: 0.2rem;
}

/* ── Responsive for modules ── */
@media (max-width: 768px) {
  .suppliers-grid { grid-template-columns: 1fr; }
  .supplier-card { padding: 1rem; }
  .supplier-card-actions .btn { min-width: 36px; min-height: 36px; padding: 0.35rem; }
  .treasury-summary { grid-template-columns: 1fr; }
  .treasury-daily-cards { grid-template-columns: repeat(3, 1fr); }
  .treasury-daily-card { padding: 0.75rem 0.5rem; }
  .treasury-item { padding: 0.75rem; }
  .treasury-item-desc { font-size: 0.82rem; }
  .ledger-age-grid { grid-template-columns: repeat(2, 1fr); }
  .movement-table { font-size: 0.75rem; }
  .movement-table th, .movement-table td { padding: 0.5rem 0.4rem; }
  .crm-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .treasury-daily-cards { grid-template-columns: repeat(3, 1fr); gap: 0.35rem; }
  .treasury-daily-card { padding: 0.6rem 0.25rem; }
  .treasury-daily-label { font-size: 0.62rem; }
  .treasury-daily-value { font-size: 0.9rem; }
  .treasury-balance-amount { font-size: 1.5rem; }
  .treasury-balance-card { padding: 1rem; }
  .ledger-age-grid { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
  .ledger-age-card { padding: 0.5rem; }
  .ledger-age-value { font-size: 0.8rem; }
  .supplier-card-main { gap: 0.5rem; }
  .supplier-card-avatar { width: 36px; height: 36px; font-size: 0.85rem; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }
