 .stats-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
     gap: 20px;
     margin: 20px 0 30px;
 }

 .stat-card {
     background: #fff;
     border-radius: 14px;
     padding: 20px;
     display: flex;
     align-items: center;
     gap: 15px;
     box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
     transition: 0.3s ease;
 }

 .stat-card:hover {
     transform: translateY(-3px);
     box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
 }

 .stat-card .icon {
     width: 50px;
     height: 50px;
     border-radius: 12px;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 20px;
     color: #fff;
 }

 .stat-card .info h4 {
     font-size: 14px;
     margin: 0;
     color: #666;
 }

 .stat-card .info p {
     font-size: 20px;
     font-weight: 700;
     margin: 4px 0 0;
 }

 .blue .icon {
     background: #0d6efd;
 }

 .green .icon {
     background: #198754;
 }

 .orange .icon {
     background: #fd7e14;
 }

 .red .icon {
     background: #dc3545;
 }

 .flash-wrap {
     display: flex;
     flex-direction: column;
     gap: 12px;
     margin: 18px 0 22px;
 }

 .flash-msg {
     border-radius: 16px;
     padding: 16px 18px;
     display: flex;
     align-items: flex-start;
     gap: 12px;
     box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
     border: 1px solid transparent;
     animation: fadeSlideIn .25s ease;
 }

 .flash-msg i {
     font-size: 18px;
     margin-top: 2px;
 }

 .flash-msg .msg-title {
     font-weight: 800;
     font-size: 15px;
     margin-bottom: 4px;
 }

 .flash-msg .msg-text {
     font-size: 14px;
     line-height: 1.7;
 }

 .flash-success {
     background: #ecfdf3;
     border-color: #a7f3d0;
     color: #065f46;
 }

 .flash-success i {
     color: #059669;
 }

 .flash-error {
     background: #fef2f2;
     border-color: #fecaca;
     color: #991b1b;
 }

 .flash-error i {
     color: #dc2626;
 }

 .flash-warning {
     background: #fff7ed;
     border-color: #fed7aa;
     color: #9a3412;
 }

 .flash-warning i {
     color: #ea580c;
 }

 .flash-info {
     background: #eff6ff;
     border-color: #bfdbfe;
     color: #1e3a8a;
 }

 .flash-info i {
     color: #2563eb;
 }

 .custom-modal-backdrop {
     position: fixed;
     inset: 0;
     background: rgba(15, 23, 42, .45);
     display: none;
     align-items: center;
     justify-content: center;
     z-index: 99999;
     padding: 20px;
 }

 .custom-modal-backdrop.show {
     display: flex;
 }

 .custom-modal {
     width: 100%;
     max-width: 460px;
     background: #fff;
     border-radius: 22px;
     box-shadow: 0 25px 60px rgba(0, 0, 0, .22);
     overflow: hidden;
     animation: modalIn .18s ease;
     border: 1px solid #eef2f7;
 }

 .custom-modal-head {
     padding: 18px 20px 10px;
     display: flex;
     align-items: center;
     gap: 10px;
 }

 .custom-modal-head i {
     width: 42px;
     height: 42px;
     border-radius: 12px;
     display: inline-flex;
     align-items: center;
     justify-content: center;
     background: #fef2f2;
     color: #dc2626;
     font-size: 18px;
 }

 .custom-modal-title {
     font-size: 18px;
     font-weight: 800;
     color: #0f172a;
 }

 .custom-modal-body {
     padding: 0 20px 18px;
     color: #475569;
     font-size: 14px;
     line-height: 1.8;
 }

 .custom-modal-actions {
     padding: 16px 20px 20px;
     display: flex;
     justify-content: flex-end;
     gap: 10px;
 }

 .modal-btn {
     border: none;
     border-radius: 12px;
     padding: 11px 18px;
     font-size: 14px;
     font-weight: 700;
     cursor: pointer;
     transition: .2s ease;
 }

 .modal-btn:hover {
     transform: translateY(-1px);
 }

 .modal-btn-cancel {
     background: #eef2f7;
     color: #0f172a;
 }

 .modal-btn-danger {
     background: linear-gradient(135deg, #dc2626, #b91c1c);
     color: #fff;
 }

 @keyframes modalIn {
     from {
         opacity: 0;
         transform: translateY(8px) scale(.98);
     }

     to {
         opacity: 1;
         transform: translateY(0) scale(1);
     }

 }

 .purchases-actions {
     display: flex;
     align-items: center;
     gap: 12px;
     margin: 18px 0 20px;
     flex-wrap: wrap;
 }

 .modal-btn-warning {
     background: linear-gradient(135deg, #f59e0b, #d97706);
     color: #fff;
 }

 .filter-box label {
     display: block;
     font-size: 13px;
     font-weight: 700;
     margin-bottom: 6px;
     color: #334155;
 }

 .form-control {
     width: 100%;
     height: 44px;
     border: 1px solid #dbe2ea;
     border-radius: 12px;
     padding: 0 12px;
     background: #fff;
     font-size: 14px;
 }

 .filter-box input.form-control {
     padding: 0 12px;
 }