    :root {
      --primary: #16a34a;        /* Money Green */
      --primary-dark: #15803d;
      --sidebar-bg: #14532d;     /* Deep Forest Green */
      --sidebar-text: #dcfce7;   /* Light Green Tint */
      --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
      --bg-color: #f1f5f9;
    }
    
    body {
      background-color: var(--bg-color);
      min-height: 100vh;
      font-family: 'Inter', sans-serif;
      overflow-x: hidden;
    }

    /* ─── SIDEBAR ───────────────────────── */
    .sidebar {
      position: fixed; top: 0; left: 0;
      width: 260px; height: 100vh;
      background: var(--sidebar-bg);
      z-index: 1040;
      display: flex; flex-direction: column;
      box-shadow: 4px 0 10px rgba(0,0,0,0.1);
    }
    .sidebar .brand { padding: 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); flex-shrink: 0; }
    .sidebar .brand h5 { color: #fff !important; font-weight: 700; margin: 0; }
    .sidebar .brand small { color: #cbd5e1 !important; font-weight: 500; font-size: 0.85rem; }
    
    .sidebar .nav-label { 
      padding: 1.5rem 1.5rem 0.5rem; 
      font-size: 0.75rem; 
      font-weight: 800; 
      text-transform: uppercase; 
      color: #94a3b8; 
      letter-spacing: 0.08em;
    }
    .sidebar .nav-link { 
      color: #94a3b8; padding: 0.75rem 1.5rem; 
      font-weight: 500; display: flex; align-items: center; gap: 0.75rem;
      transition: all 0.2s;
    }
    .sidebar .nav-link:hover, .sidebar .nav-link.active {
      background: var(--primary); color: #fff;
    }
    .sidebar .nav-link i { font-size: 1.1rem; }
    
    .sidebar-footer {
      margin-top: auto;
      padding: 1rem;
      border-top: 1px solid rgba(255,255,255,0.1);
      background: rgba(20, 83, 45, 0.95); /* Deep Forest Green */
      flex-shrink: 0;
    }
    .logout-btn {
      color: #fca5a5 !important; /* Brighter Red */
      font-weight: 700;
      border: 1px solid rgba(248, 113, 113, 0.3);
      border-radius: 8px;
    }
    .logout-btn:hover {
      background: rgba(248, 113, 113, 0.15);
      color: #fff !important;
    }
    
    /* ─── TOPBAR ────────────────────────── */
    .topbar {
      position: fixed; top: 0; left: 260px; right: 0; height: 65px;
      background: #fff; border-bottom: 1px solid #e2e8f0;
      display: flex; align-items: center; padding: 0 2rem;
      justify-content: space-between; z-index: 1030;
    }

    /* ─── CONTENT AREA ───────────────────── */
    .main-content-wrapper {
      margin-left: 260px; margin-top: 65px;
      min-height: calc(100vh - 65px);
      display: flex;
      flex-direction: column;
      position: relative;
    }
    .main-content { padding: 2.5rem; flex-grow: 1; position: relative; z-index: 1;}

    /* ─── SOLID CARDS ───────────────────── */
    .card, .stat-card, .page-letterhead {
      background: #fff;
      border-radius: 12px;
      border: 1px solid #e2e8f0;
      box-shadow: var(--card-shadow);
      transition: transform 0.2s;
    }
    .stat-card:hover { transform: translateY(-3px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }

    /* ─── VISIBLE WATERMARK ─────────────── */
    .page-watermark {
      position: fixed; top: 50%; left: 58%;
      transform: translate(-50%, -50%);
      font-size: 40vw; /* Massive for icons */
      opacity: 0.1; z-index: 0; pointer-events: none;
      color: var(--primary);
    }
    .page-watermark img { width: 50vw; height: auto; opacity: 1; filter: none; }

    /* ─── NON-STICKY FOOTER ──────── */
    .app-footer {
      height: 75px;
      background: #fff; border-top: 1px solid #e2e8f0;
      padding: 0 2rem;
      display: flex; justify-content: space-between; align-items: center;
      font-size: 0.95rem; color: #475569; z-index: 1025;
      margin-top: auto;
    }
    .footer-logo { font-size: 1.8rem; color: var(--primary); }

    /* ─── PAD HEADER ───────────────────── */
    .page-letterhead {
      padding: 2rem; 
      margin-bottom: 2.5rem;
      border-top: 5px solid var(--primary);
      position: relative;
    }
    .letterhead-brand { display: flex; align-items: center; justify-content: space-between; }
    .letterhead-logo { height: 75px; }
    .letterhead-info h2 { font-weight: 800; color: #1e293b; margin: 0; }
    .letterhead-info p { color: #64748b; margin: 0; }

    /* ─── STATUS BADGES ─────────────────── */
    .badge-active  { background-color: #dcfce7; color: #15803d; border: 1px solid #86efac; }
    .badge-closed  { background-color: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
    .badge-paid    { background-color: #dcfce7; color: #15803d; border: 1px solid #86efac; }
    .badge-partial { background-color: #fef9c3; color: #a16207; border: 1px solid #fde047; }
    .badge-due     { background-color: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
    .badge-pending { background-color: #fef9c3; color: #a16207; border: 1px solid #fde047; }

    /* ─── PREMIUM BUTTONS ───────────────── */
    .btn-premium {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      padding: 0.5rem 1.2rem;
      font-weight: 600;
      border-radius: 10px;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      border: 1.5px solid transparent;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
      font-size: 0.875rem;
      line-height: 1.4;
      height: 38px;           /* fixed height for all sizes */
      text-decoration: none;
      cursor: pointer;
      white-space: nowrap;
      box-sizing: border-box;
      vertical-align: middle;
    }

    .btn-premium:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .btn-premium:active {
      transform: translateY(0);
    }

    .btn-premium-sm {
      padding: 0 0.85rem;
      font-size: 0.8rem;
      border-radius: 8px;
      height: 34px;           /* consistent sm height */
      line-height: 1.4;
    }

    .btn-lg.btn-premium {
      height: 46px;
    }

    .btn-premium-primary, 
    .btn-premium-success, 
    .btn-premium-danger, 
    .btn-premium-warning, 
    .btn-premium-info, 
    .btn-premium-dark, 
    .btn-premium-secondary {
      background: var(--primary);
      color: #ffffff !important;
    }

    .btn-premium-primary:hover, 
    .btn-premium-success:hover, 
    .btn-premium-danger:hover, 
    .btn-premium-warning:hover, 
    .btn-premium-info:hover, 
    .btn-premium-dark:hover, 
    .btn-premium-secondary:hover {
      background: var(--primary-dark);
    }

    .btn-premium-outline-primary,
    .btn-premium-outline-secondary,
    .btn-premium-outline-dark,
    .btn-premium-outline-warning,
    .btn-premium-outline-danger,
    .btn-premium-outline-success,
    .btn-premium-outline-info {
      border-color: var(--primary);
      color: var(--primary) !important;
      background: transparent;
    }
    
    .btn-premium-outline-primary:hover,
    .btn-premium-outline-secondary:hover,
    .btn-premium-outline-dark:hover,
    .btn-premium-outline-warning:hover,
    .btn-premium-outline-danger:hover,
    .btn-premium-outline-success:hover,
    .btn-premium-outline-info:hover {
      background: rgba(22, 163, 74, 0.1);
    }
    
    .btn-premium:disabled, .btn-premium.disabled {
      opacity: 0.6;
      pointer-events: none;
      filter: grayscale(0.5);
    }

    /* ─── BUTTON GROUPS RESPONSIVE FIX ──── */
    .btn-group {
      display: inline-flex;
      flex-wrap: wrap;
      gap: 0.4rem;
    }
    .btn-group > .btn-premium {
      border-radius: 8px !important; /* Prevent bootstrap gluing */
    }

    /* ─── GLOBAL TABLE REFINEMENTS ─────── */
    .table thead th {
      white-space: nowrap;
      font-size: 0.82rem;
      vertical-align: middle;
      letter-spacing: 0.02em;
      text-transform: capitalize; 
    }
    .table td.text-end {
      white-space: nowrap; /* Prevent action buttons from vertically stacking */
    }

    /* ─── MOBILE RESPONSIVENESS ─────────── */
    .sidebar { transition: transform 0.3s ease; }
    .sidebar-overlay {
      display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0,0,0,0.5); z-index: 1035;
    }
    
    @media (max-width: 991.98px) {
      .sidebar { transform: translateX(-100%); }
      .sidebar.show { transform: translateX(0); }
      .sidebar-overlay.show { display: block; }
      
      .topbar { left: 0; padding: 0 1rem; }
      .app-footer { padding: 0 1rem; }
      .main-content-wrapper { margin-left: 0; }
      .main-content { padding: 1rem; }
      
      /* Optimize tables for mobile */
      .table-responsive { border: 0; }
    }

    /* ─── PRINT OPTIMIZATIONS ───────────── */
    @media print {
      body { background-color: #fff !important; }
      .sidebar, .topbar, .app-footer, .d-print-none, .sidebar-overlay { display: none !important; }
      .main-content-wrapper { margin-left: 0 !important; margin-top: 0 !important; padding: 0 !important; }
      .main-content { padding: 0 !important; }
      .page-letterhead { margin-bottom: 2rem !important; border-top: 2px solid #000 !important; box-shadow: none !important; }
      .card { border: 1px solid #ddd !important; box-shadow: none !important; }
      .taka::before { content: '৳' !important; } /* Ensure symbol shows in print if fonts lag */

    }

    /* ─── GLOBAL THEME OVERRIDES (Money Green) ───────────── */
    :root { 
      --bs-primary: #16a34a; 
      --bs-primary-rgb: 22, 163, 74; 
      --bs-success: #16a34a; 
      --bs-success-rgb: 22, 163, 74; 
      --heading-font: 'Montserrat', sans-serif; 
      --body-font: 'Inter', sans-serif; 
    } 
    
    body { 
      font-family: var(--body-font) !important; 
    } 
    
    h1, h2, h3, h4, h5, h6, .navbar-brand { 
      font-family: var(--heading-font) !important; 
    } 
    
    .text-primary, .text-success { 
      color: #16a34a !important; 
    } 
    
    .bg-primary, .bg-success, .btn-primary, .btn-success { 
      background-color: #16a34a !important; 
      border-color: #16a34a !important; 
    }
