/* ═══════════════════════════════════════════════════════════
   Tailwind/Bootstrap Compatibility Layer for DwinPayment
   ═══════════════════════════════════════════════════════════
   Enhances existing CSS with Tailwind-equivalent transitions,
   animations, and modern effects. Does NOT change designs.
   ═══════════════════════════════════════════════════════════ */

/* Card glassmorphism */
.card { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* Stat card hover lift */
.stat-card { transition: all 0.2s ease; }
.stat-card:hover { transform: translateY(-2px); }

/* Form focus rings (violet) */
.form-input:focus, .form-control:focus, .form-select:focus {
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15) !important;
  border-color: rgba(139,92,246,0.4) !important;
}

/* Button micro-interaction */
.btn { transition: all 0.15s ease; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }

/* Table row hover */
.dwin-table tbody tr, .data-table tbody tr, .table-hover tbody tr { transition: background 0.1s ease; }

/* Nav item slide */
.nav-item { transition: all 0.15s ease; }
.nav-item:hover { transform: translateX(2px); }

/* Balance hero gradient (ensure override) */
.balance-hero {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 40%, #2dd4bf 100%) !important;
  border-radius: 16px; padding: 24px; color: white;
  box-shadow: 0 8px 32px rgba(99,102,241,0.25);
}
.balance-hero .balance-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.8; }
.balance-hero .balance-amount { font-size: 2.25rem; font-weight: 800; font-family: 'IBM Plex Mono', monospace; margin-top: 4px; letter-spacing: -0.02em; }
.balance-hero .balance-sub { font-size: 12px; margin-top: 8px; opacity: 0.75; }

/* Tab buttons */
.tabs-row { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255,252,248,0.6); backdrop-filter: blur(8px); border: 1px solid rgba(201,162,39,0.15); }
.tab-btn { padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; border: none; cursor: pointer; transition: all 0.15s; background: transparent; color: #454056; }
.tab-btn.active { background: linear-gradient(135deg, #8b5cf6, #6366f1); color: white; box-shadow: 0 2px 8px rgba(139,92,246,0.25); }
.tab-btn:hover:not(.active) { background: rgba(139,92,246,0.06); }

/* Grid auto-fill */
.grid-auto { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* Stats grid */
.stat-grid, .stats-grid { display: grid; gap: 12px; margin-bottom: 20px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

/* Module header alignment */
.module-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.module-title { font-family: 'Inter', system-ui, sans-serif; font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; color: #1e1a2e; }
.module-subtitle { font-size: 0.875rem; color: #2c2838; margin-top: 4px; }
.module-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Badge enhancements */
.badge { display: inline-flex; align-items: center; font-weight: 700; letter-spacing: 0.02em; }
.badge-green, .badge-success { background: rgba(52,211,153,0.15) !important; color: #059669 !important; }
.badge-amber, .badge-warn, .badge-warning { background: rgba(251,191,36,0.15) !important; color: #d97706 !important; }
.badge-red, .badge-danger { background: rgba(248,113,113,0.15) !important; color: #dc2626 !important; }
.badge-violet, .badge-primary { background: rgba(139,92,246,0.12) !important; color: #7c3aed !important; }
.badge-teal, .badge-info { background: rgba(45,212,191,0.12) !important; color: #0d9488 !important; }

/* Page title */
.page-title { font-family: 'Inter', system-ui, sans-serif; font-size: 1.35rem; font-weight: 700; color: #1e1a2e; }
.page-sub { font-size: 0.875rem; color: #2c2838; margin-top: 4px; }

/* Enhanced toast */
.dwin-toast { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 14px; box-shadow: 0 8px 32px rgba(0,0,0,0.15); }

/* Smooth scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { border-radius: 10px; background: linear-gradient(180deg, rgba(201,162,39,0.3), rgba(139,92,246,0.3)); }

/* Mobile responsive */
@media (max-width: 640px) {
  .grid-auto { grid-template-columns: 1fr; }
  .stat-grid, .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .balance-hero .balance-amount { font-size: 1.75rem; }
}
