/* ================================================================
   udhar.css — KhataBook Ledger Styles
   Mobile-First Approach
================================================================ */

:root {
  --bg-color: #f1f5f9;
  --surface: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  
  --primary: #3b82f6;
  --primary-light: #eff6ff;
  --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  
  --success: #10b981;
  --success-gradient: linear-gradient(135deg, #059669 0%, #047857 100%);
  --success-light: #ecfdf5;
  
  --danger: #ef4444;
  --danger-gradient: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  --danger-light: #fef2f2;
  
  --warning: #f59e0b;
  --warning-gradient: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  --warning-light: #fffbeb;
  
  --premium-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  
  --border: #e2e8f0;
  --glass-bg: rgba(255, 255, 255, 0.8);
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

body {
  margin: 0; padding: 0;
  background: var(--bg-color);
  font-family: 'Outfit', 'Inter', sans-serif;
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
}

/* Animations */
@keyframes slideUpFade { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { 0% { opacity: 0; transform: scale(0.95); } 100% { opacity: 1; transform: scale(1); } }
@keyframes skeletonShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* Desk/Mob Helpers */
.desk-topbar { display: none; }
.desk-footer { display: none; }
.desk-only { display: none !important; }
.desk-page-header { display: none; }
.desktop-empty { display: none; }

/* ─── MOBILE TOPBAR ─── */
.mob-topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; background: #fff;
  border-bottom: 1px solid #f1f5f9;
  padding: 0 16px; box-shadow: 0 1px 8px rgba(0,0,0,.04);
}
.mob-back {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: #f8fafc; color: #0f172a;
  text-decoration: none; border: 1px solid #e2e8f0; font-size: 1rem;
}
.mob-title { flex: 1; text-align: center; font-size: 1.1rem; font-weight: 800; letter-spacing: -0.01em; }
.mob-action-btn {
  background: transparent; border: none; font-size: 1.2rem; color: var(--text-dark);
  width: 36px; height: 36px; cursor: pointer;
}

/* ─── MAIN WRAPPER ─── */
.udhar-page {
  padding-bottom: 90px;
}
.dashboard-panel { width: 100%; display: flex; flex-direction: column; }

/* ─── BENTO GRID / SUMMARY (Mobile) ─── */
.bento-grid { padding: 16px; display: grid; gap: 16px; }

.summary-card {
  background: var(--premium-dark);
  color: white; border-radius: 28px; padding: 28px;
  box-shadow: 0 15px 35px -10px rgba(15, 23, 42, 0.5);
  position: relative; overflow: hidden;
  animation: popIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255,255,255,0.1);
}
.summary-card.positive {
  background: var(--success-gradient);
  box-shadow: 0 15px 35px -10px rgba(5, 150, 105, 0.4);
}
.summary-card::before, .summary-card::after {
  content: ''; position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 70%);
}
.summary-card::before { top: -50%; right: -20%; width: 250px; height: 250px; }
.summary-card::after { bottom: -30%; left: -10%; width: 150px; height: 150px; }

.summary-title { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; opacity: 0.8; margin-bottom: 12px; font-family: 'Inter', sans-serif; }
.summary-amount { font-size: 3rem; font-weight: 800; margin: 0; line-height: 1; letter-spacing: -0.03em; text-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.summary-subtitle { font-size: 0.9rem; opacity: 0.9; margin-top: 20px; display: flex; justify-content: space-between; font-weight: 500; font-family: 'Inter', sans-serif; }
.summary-progress-bg { background: rgba(255,255,255,0.1); height: 8px; border-radius: 8px; margin-top: 14px; overflow: hidden; width: 100%; box-shadow: inset 0 2px 4px rgba(0,0,0,0.1); }
.summary-progress-fill { background: linear-gradient(90deg, #60a5fa, #3b82f6); height: 100%; border-radius: 8px; width: 0%; transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1); }

/* ─── AI STRIP ─── */
.ai-strip { display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 16px; scrollbar-width: none; }
.ai-strip::-webkit-scrollbar { display: none; }
.ai-card {
  min-width: 260px; background: #fff; border-radius: 16px; padding: 14px;
  display: flex; align-items: center; gap: 12px; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); flex-shrink: 0;
}
.ai-card-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.ai-card.danger .ai-card-icon { background: var(--danger-light); color: var(--danger); }
.ai-card.warning .ai-card-icon { background: var(--warning-light); color: var(--warning); }
.ai-card.success .ai-card-icon { background: var(--success-light); color: var(--success); }
.ai-card-text { flex: 1; }
.ai-card-title { font-weight: 800; font-size: 0.9rem; margin: 0 0 4px; color: var(--text-dark); }
.ai-card-desc { font-size: 0.8rem; color: var(--text-muted); margin: 0; line-height: 1.4; font-weight: 500; }

/* ─── SEARCH & FILTER ─── */
.search-filter-section { padding: 0 16px; margin-bottom: 16px; position: sticky; top: 56px; background: var(--bg-color); z-index: 90; padding-top: 10px; padding-bottom: 10px; }
.search-container { position: relative; margin-bottom: 12px; }
.search-input {
  width: 100%; padding: 14px 14px 14px 44px; border-radius: 16px; border: 1px solid var(--border);
  font-family: inherit; font-size: 0.95rem; font-weight: 600; background: #fff; box-sizing: border-box;
  box-shadow: var(--shadow-sm); transition: border-color 0.2s;
}
.search-input:focus { outline: none; border-color: var(--primary); }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 1rem; }

.filter-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip {
  background: #fff; border: 1px solid var(--border); color: var(--text-muted); padding: 8px 16px;
  border-radius: 20px; font-size: 0.85rem; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.filter-chip.active { background: var(--text-dark); color: #fff; border-color: var(--text-dark); }

/* ─── CUSTOMER LIST ─── */
.customer-list { padding: 0 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.customer-item {
  display: flex; align-items: center; background: #fff; padding: 18px 20px; border-radius: 20px;
  box-shadow: var(--shadow-sm); cursor: pointer; border: 1px solid var(--border);
  animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1); transition: all 0.2s ease;
}
.customer-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #cbd5e1; }
.customer-item:active { transform: scale(0.98); }
.c-avatar {
  width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.3rem; color: #fff; margin-right: 18px; flex-shrink: 0; 
  text-shadow: 0 1px 2px rgba(0,0,0,0.2); box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.c-info { flex: 1; min-width: 0; }
.c-name { font-weight: 800; font-size: 1.15rem; margin: 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-dark); letter-spacing: -0.01em; }
.c-meta { font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; gap: 12px; font-weight: 500; font-family: 'Inter', sans-serif; }
.c-amount-box { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.c-amount { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.c-amount.due { color: var(--danger); }
.c-amount.advance { color: var(--success); }
.c-amount.settled { color: var(--text-muted); }
.badge { font-size: 0.65rem; font-weight: 800; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; }
.badge.due { background: var(--danger-light); color: var(--danger); }
.badge.settled { background: #f1f5f9; color: var(--text-muted); }

/* Skeleton */
.skeleton { background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%); background-size: 200% 100%; animation: skeletonShimmer 1.5s infinite; border-radius: 8px; }
.skel-item { display: flex; align-items: center; background: #fff; padding: 14px 16px; border-radius: 20px; margin-bottom: 12px; }
.skel-avatar { width: 48px; height: 48px; border-radius: 14px; margin-right: 14px; flex-shrink: 0; }
.skel-line { height: 14px; margin-bottom: 8px; width: 60%; }
.skel-line.short { width: 40%; }

/* ─── FAB (Mobile) ─── */
.fab-container { position: fixed; bottom: 90px; right: 20px; z-index: 20; }
.fab-btn {
  background: var(--text-dark); color: #fff; border: none; height: 56px; padding: 0 20px;
  border-radius: 28px; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 1rem; font-weight: 800; font-family: inherit; box-shadow: 0 8px 20px rgba(15,23,42,0.4);
  cursor: pointer; transition: transform 0.2s;
}
.fab-btn:active { transform: scale(0.95); }

/* ─── LEDGER OVERLAY (Passbook) ─── */
.ledger-overlay {
  position: fixed; inset: 0; background: var(--bg-color); z-index: 2000;
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.3s ease-out;
}
.ledger-overlay.active { transform: translateX(0); }

.lo-header {
  background: #fff; border-bottom: 1px solid var(--border); padding: 16px;
  display: flex; align-items: center; gap: 16px; box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  position: sticky; top: 0; z-index: 10;
}
.lo-back {
  background: #f8fafc; border: 1px solid var(--border); font-size: 1.1rem; color: var(--text-dark);
  width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.lo-header h2 { font-size: 1.1rem; font-weight: 800; margin: 0; flex: 1; text-align: center; color: var(--text-dark); }
.lo-btn-icon { width: 40px; height: 40px; border: none; background: transparent; font-size: 1.3rem; color: #16a34a; cursor: pointer; }

.lo-scroll-content { flex: 1; overflow-y: auto; padding-bottom: 24px; }

/* Profile Card */
.lo-profile-card {
  background: #fff; margin: 16px; border-radius: 24px; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden; border: 1px solid var(--border);
}
.lo-profile-bg {
  height: 100px; background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border-radius: 24px 24px 0 0;
}
.lo-profile-top { padding: 16px 20px 12px; display: flex; align-items: flex-start; gap: 16px; position: relative; margin-top: -50px; }
.lo-avatar.large {
  width: 72px; height: 72px; font-size: 2.2rem; border-radius: 20px;
  border: 4px solid #fff; box-shadow: 0 8px 16px rgba(0,0,0,0.15); display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;
}
.lo-profile-info { flex: 1; padding-top: 50px; }
.lo-name-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.lo-name { font-size: 1.3rem; margin: 0; font-weight: 800; color: var(--text-dark); }
.lo-ai-badge {
  background: var(--warning-gradient); color: white; padding: 3px 8px; font-size: 0.7rem; font-weight: 800;
  border-radius: 10px; display: flex; align-items: center; gap: 4px; text-transform: uppercase;
}
.lo-phone { font-size: 0.9rem; color: var(--text-muted); font-weight: 600; margin: 0; }

.lo-actions-row { display: flex; gap: 10px; padding: 0 20px 20px; }
.lo-action-chip {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px;
  border-radius: 14px; font-weight: 800; font-size: 0.9rem; cursor: pointer; text-decoration: none; border: 1px solid transparent;
}
.lo-action-chip.call { background: #eff6ff; color: #3b82f6; border-color: #bfdbfe; }
.lo-action-chip.wa { background: #f0fdf4; color: #16a34a; border-color: #bbf7d0; }

.lo-profile-stats { display: flex; gap: 12px; padding: 0 20px 20px; }
.stat-glass-box { flex: 1; background: #f8fafc; padding: 16px; border-radius: 16px; display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--border); }
.stat-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.stat-icon.danger-tint { background: var(--danger-light); color: var(--danger); }
.stat-icon.warning-tint { background: var(--warning-light); color: var(--warning); }
.stat-content p { font-size: 0.75rem; color: var(--text-muted); font-weight: 800; text-transform: uppercase; margin: 0; }
.stat-content h2 { font-size: 1.5rem; font-weight: 800; margin: 0; line-height: 1; letter-spacing: -0.02em; }
.stat-content h2.danger { color: var(--danger); }

/* Timeline */
.lo-timeline { padding: 0 16px; display: flex; flex-direction: column; position: relative; }
.lo-timeline::before { content: ''; position: absolute; top: 0; bottom: 0; left: 35px; width: 2px; background: #e2e8f0; z-index: 1; }
.tl-date-badge {
  align-self: flex-start; background: #fff; border: 1px solid var(--border); color: var(--text-muted);
  font-size: 0.75rem; font-weight: 800; padding: 6px 14px; border-radius: 16px; margin: 16px 0 16px 50px;
  z-index: 2; box-shadow: var(--shadow-sm); text-transform: uppercase;
}
.tl-entry-wrapper { display: flex; align-items: flex-start; margin-bottom: 16px; position: relative; z-index: 2; }
.tl-dot {
  width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 3px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 1rem; margin-right: 14px; flex-shrink: 0;
}
.gave .tl-dot { border-color: #fda4af; color: var(--danger); background: #fff1f2; }
.got .tl-dot { border-color: #86efac; color: var(--success); background: #f0fdf4; }
.tl-entry {
  flex: 1; background: #fff; padding: 16px; border-radius: 0 16px 16px 0; border: 1px solid var(--border);
  border-left: 4px solid transparent; box-shadow: var(--shadow-sm);
}
.gave .tl-entry { border-left-color: var(--danger); }
.got .tl-entry { border-left-color: var(--success); }
.tl-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.tl-title { font-weight: 800; font-size: 0.95rem; color: var(--text-dark); margin: 0; line-height: 1.3;}
.tl-amount { font-weight: 800; font-size: 1.2rem; }
.gave .tl-amount { color: var(--danger); }
.got .tl-amount { color: var(--success); }
.tl-meta { font-size: 0.8rem; color: var(--text-muted); display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.tl-balance { background: #f1f5f9; padding: 4px 8px; border-radius: 8px; color: var(--text-dark); font-weight: 800; }

/* Bottom Action Bar */
.lo-bottom-bar {
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  display: flex; gap: 12px; background: #fff; border-top: 1px solid var(--border);
  position: sticky; bottom: 0; z-index: 10;
}
.lo-action-btn {
  flex: 1; padding: 16px; border: none; border-radius: 16px; font-size: 1rem; font-weight: 800; font-family: inherit;
  color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.lo-btn-gave { background: var(--danger-gradient); }
.lo-btn-got { background: var(--success-gradient); }

/* ─── MODALS ─── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,0.6); backdrop-filter: blur(4px);
  z-index: 2500; display: flex; align-items: flex-end; justify-content: center;
}
.modal-sheet {
  background: #fff; width: 100%; max-width: 500px; border-radius: 28px 28px 0 0;
  padding: 24px 20px calc(30px + env(safe-area-inset-bottom));
  animation: slideUpFade 0.3s ease-out; position: relative;
}
.modal-drag-handle { width: 40px; height: 5px; background: #cbd5e1; border-radius: 3px; margin: -10px auto 20px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-header h3 { margin: 0; font-size: 1.3rem; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.modal-close-btn { background: #f1f5f9; border: none; width: 38px; height: 38px; border-radius: 12px; font-size: 1.1rem; color: var(--text-muted); cursor: pointer; }

.entry-input-group { margin-bottom: 20px; }
.entry-input-group label { display: block; font-size: 0.85rem; font-weight: 800; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; }
.entry-input {
  width: 100%; padding: 16px; font-size: 1.05rem; font-weight: 600; border: 2px solid var(--border);
  border-radius: 16px; background: #f8fafc; font-family: inherit; color: var(--text-dark); box-sizing: border-box;
}
.entry-input:focus { outline: none; border-color: var(--primary); background: #fff; }
.amount-input { font-size: 1.8rem; text-align: center; font-weight: 800; }
.danger-input { color: var(--danger); }
.success-input { color: var(--success); }
textarea.entry-input { resize: none; font-size: 1rem; }

.quick-amounts { display: flex; gap: 10px; margin-top: 10px; }
.qa-chip { flex: 1; background: #fff; border: 1px solid var(--border); padding: 10px 0; border-radius: 12px; font-size: 0.95rem; font-weight: 800; color: var(--text-muted); cursor: pointer; }
.qa-chip:active { background: #f1f5f9; }

.consent-box { background: #f8fafc; padding: 16px; border-radius: 16px; margin-bottom: 24px; border: 1px solid var(--border); }
.consent-title { font-size: 0.75rem; color: var(--text-muted); font-weight: 800; text-transform: uppercase; margin: 0 0 12px; }
.consent-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.consent-row:last-child { margin-bottom: 0; }
.custom-checkbox { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.wa-check { accent-color: #16a34a; }
.consent-row label { font-size: 0.9rem; font-weight: 600; color: var(--text-dark); cursor: pointer; }

.btn-action { width: 100%; padding: 18px; border: none; border-radius: 16px; font-size: 1.1rem; font-weight: 800; font-family: inherit; color: #fff; cursor: pointer; transition: transform 0.2s; }
.btn-action:active { transform: scale(0.97); }
.btn-primary { background: var(--text-dark); }
.btn-danger-action { background: var(--danger-gradient); }
.btn-success-action { background: var(--success-gradient); }

#toast { position: fixed; top: -100px; left: 50%; transform: translateX(-50%); background: var(--text-dark); color: white; padding: 12px 24px; border-radius: 30px; font-weight: 600; font-size: 0.95rem; z-index: 9999; display: flex; align-items: center; gap: 10px; transition: top 0.3s ease; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
#toast.show { top: 20px; }
.loading-state, .empty-state { padding: 40px 20px; text-align: center; color: var(--text-muted); }


/* ================================================================
   DESKTOP OVERRIDES (BENTO DASHBOARD + SIDE DRAWER)
================================================================ */
@media (min-width: 1024px) {

  /* Hide Mobile Elements */
  .mob-topbar, .mob-only, .bottom-nav { display: none !important; }
  .desk-only { display: flex !important; }

  body { background: #f1f5f9; padding-top: 64px; }

  /* Topbar */
  .desk-topbar {
    display: flex; position: fixed; top: 0; left: 0; right: 0; height: 64px;
    background: #0f172a; border-bottom: 1px solid rgba(255,255,255,.06);
    align-items: center; z-index: 500;
  }
  .desk-topbar-inner {
    max-width: 1280px; margin: 0 auto; width: 100%; padding: 0 36px;
    display: flex; align-items: center; justify-content: space-between;
  }
  .desk-brand { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; font-weight: 800; color: #fff; text-decoration: none; }
  .desk-brand i { color: #3b82f6; font-size: 1.2rem; }
  .desk-nav { display: flex; gap: 4px; }
  .desk-nav a { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; color: #94a3b8; font-size: 0.88rem; font-weight: 600; text-decoration: none; transition: all .18s; }
  .desk-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
  .desk-nav a.is-active { background: rgba(59,130,246,.15); color: #60a5fa; }

  /* Page Container */
  .udhar-page { max-width: 1400px; margin: 0 auto; padding: 40px; display: flex; align-items: flex-start; gap: 40px; }
  
  /* Dashboard Panel becomes main content area */
  .dashboard-panel { flex: 1; min-width: 0; }

  /* Page Title */
  .desk-page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
  .page-title { font-size: 2.6rem; font-weight: 800; margin: 0; color: var(--text-dark); letter-spacing: -0.04em; }
  .btn-refresh-desk { background: #fff; border: 1px solid var(--border); padding: 12px 24px; border-radius: 14px; font-weight: 700; color: var(--text-dark); cursor: pointer; display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow-sm); font-size: 1rem; transition: all 0.2s; }
  .btn-refresh-desk:hover { background: #f8fafc; transform: translateY(-2px); box-shadow: var(--shadow-md); }

  /* Bento Grid */
  .bento-grid { padding: 0; grid-template-columns: 2.5fr 1fr; margin-bottom: 32px; gap: 24px; }
  .summary-card { padding: 40px; border-radius: 32px; }
  .summary-title { font-size: 0.9rem; margin-bottom: 16px; }
  .summary-amount { font-size: 4.5rem; }
  
  .b-add-cust { 
    background: #fff; border-radius: 32px; padding: 40px; border: 2px dashed #cbd5e1;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    cursor: pointer; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .b-add-cust:hover { border-color: var(--primary); background: var(--primary-light); transform: translateY(-4px); box-shadow: var(--shadow-md); }
  .b-add-cust .bt-icon { width: 64px; height: 64px; background: #fff; color: var(--primary); border-radius: 20px; font-size: 1.8rem; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
  .b-add-cust .bt-title { font-size: 1.3rem; font-weight: 800; margin: 0 0 8px; color: var(--text-dark); }
  .b-add-cust .bt-desc { font-size: 0.95rem; color: var(--text-muted); margin: 0; font-weight: 500; font-family: 'Inter', sans-serif; }

  /* Search & Filters */
  .search-filter-section { position: static; padding: 0; background: transparent; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
  .search-container { margin: 0; flex: 1; max-width: 480px; }
  .search-input { padding: 18px 18px 18px 50px; border-radius: 20px; font-size: 1.05rem; }
  .search-icon { left: 20px; font-size: 1.1rem; }
  .filter-chip { padding: 12px 24px; font-size: 0.95rem; border-radius: 24px; }
  
  /* Customer List (List View on desktop, not Grid) */
  .customer-list { padding: 0; display: flex; flex-direction: column; gap: 16px; }
  .customer-item { padding: 20px 24px; border-radius: 24px; }
  .c-avatar { width: 60px; height: 60px; font-size: 1.6rem; border-radius: 18px; }
  .c-name { font-size: 1.3rem; margin-bottom: 8px; }
  .c-meta { font-size: 0.95rem; }
  .c-amount { font-size: 1.4rem; }
  .badge { font-size: 0.75rem; padding: 4px 10px; }

  /* LEDGER OVERLAY -> SIDE PANEL DESKTOP */
  .ledger-overlay {
    position: sticky; top: 104px; width: 480px; flex-shrink: 0; background: #fff; border-radius: 32px;
    border: none; box-shadow: var(--shadow-lg); transform: none !important;
    display: none; flex-direction: column; height: calc(100vh - 140px); overflow: hidden;
  }
  .ledger-overlay.active { display: flex; animation: slideInRight 0.5s cubic-bezier(0.16, 1, 0.3, 1); }

  .desktop-empty {
    position: sticky; top: 104px; display: flex; width: 480px; flex-shrink: 0; flex-direction: column; align-items: center; justify-content: center;
    background: transparent; border-radius: 32px; border: 2px dashed #cbd5e1; color: var(--text-muted);
    height: calc(100vh - 140px); text-align: center; padding: 40px; transition: all 0.3s;
  }
  .desktop-empty i { color: #94a3b8 !important; }
  .ledger-overlay.active + .desktop-empty { display: none; }

  .lo-header { padding: 28px 32px 20px; border-bottom: 1px solid var(--border); }
  .lo-back { display: none; } 
  .lo-header h2 { text-align: left; font-size: 1.5rem; letter-spacing: -0.02em; }
  .lo-btn-icon { width: 44px; height: 44px; background: #f0fdf4; border-radius: 14px; transition: all 0.2s; }
  .lo-btn-icon:hover { background: #dcfce3; transform: scale(1.05); }

  .lo-profile-card { margin: 24px 32px; border-radius: 24px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
  .lo-profile-bg { height: 110px; border-radius: 24px 24px 0 0; background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); }
  .lo-profile-top { padding: 20px 24px 16px; margin-top: -55px; }
  .lo-avatar.large { width: 80px; height: 80px; font-size: 2.5rem; border-width: 4px; }
  .lo-profile-info { padding-top: 55px; }
  .lo-name { font-size: 1.6rem; letter-spacing: -0.02em; }
  .stat-glass-box { padding: 20px; border-radius: 20px; }
  .stat-content p { font-size: 0.8rem; letter-spacing: 1px; }
  .stat-content h2 { font-size: 1.8rem; }

  .lo-timeline { padding: 0 32px; }
  .lo-timeline::before { left: 51px; border-left: 2px dashed #cbd5e1; width: 0; background: transparent; }
  .tl-date-badge { margin: 24px 0 24px 68px; font-size: 0.85rem; padding: 8px 16px; }
  .tl-entry { padding: 20px; border-radius: 0 20px 20px 0; }
  .tl-dot { width: 44px; height: 44px; font-size: 1.2rem; margin-right: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }

  .lo-bottom-bar { padding: 24px 32px; border-top: 1px solid var(--border); gap: 16px; }
  .lo-action-btn { padding: 20px; font-size: 1.15rem; border-radius: 18px; box-shadow: 0 8px 20px rgba(0,0,0,0.15); transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
  .lo-action-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(0,0,0,0.2); }

  /* Modals Centered */
  .modal-overlay { align-items: center; }
  .modal-sheet { border-radius: 28px; padding: 32px; max-width: 480px; }
  .modal-drag-handle { display: none; }

  /* Footer */
  .desk-footer { display: block; background: #0f172a; margin-top: 48px; }
  .desk-footer-inner { max-width: 1280px; margin: 0 auto; padding: 48px 36px 32px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
  .df-brand { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; font-weight: 800; color: #fff; margin-bottom: 10px; }
  .df-brand i { color: #3b82f6; font-size: 1.2rem; }
  .df-tagline { margin: 0 0 6px; color: #94a3b8; font-size: 0.85rem; font-style: italic; }
  .df-desc { margin: 0; color: #64748b; font-size: 0.83rem; line-height: 1.6; }
  .df-heading { margin: 0 0 14px; color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 800; }
  .df-nav { display: flex; flex-direction: column; gap: 10px; }
  .df-nav a { color: #64748b; text-decoration: none; font-size: 0.88rem; display: flex; align-items: center; gap: 8px; transition: color .2s; }
  .df-nav a:hover { color: #fff; }
  .df-info { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
  .df-info li { color: #64748b; font-size: 0.88rem; display: flex; align-items: center; gap: 8px; }
  .df-info li i { color: #3b82f6; width: 14px; }
  .df-payments { display: flex; gap: 10px; }
  .df-payments span { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: #94a3b8; padding: 5px 12px; border-radius: 20px; font-size: 0.78rem; font-weight: 700; display: flex; align-items: center; gap: 6px; }
  .df-bottom { max-width: 1280px; margin: 0 auto; padding: 20px 36px; border-top: 1px solid rgba(255,255,255,.06); display: flex; justify-content: space-between; align-items: center; }
  .df-bottom span { color: #475569; font-size: 0.82rem; display: flex; align-items: center; gap: 5px; }
}
