
:root {
  --primary: #4f46e5; --primary-dark: #3730a3; --secondary: #ec4899;
  --bg-body: #f8fafc; --bg-card: #ffffff; --text-main: #0f172a; --text-muted: #64748b;
  --border: #e2e8f0; --nav-bg: #ffffff; --nav-active: #4f46e5;
  --radius-lg: 20px; --radius-md: 12px;
  --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.05); --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1);
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }
body { background: var(--bg-body); color: var(--text-main); font-size: 14px; }
a { text-decoration: none; color: inherit; }

/* Layout */
.app-layout { display: flex; height: 100vh; overflow: hidden; width: 100%; position: relative;}

/* Sidebar Overlay for Mobile */
.mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 40; opacity: 0; transition: opacity 0.3s; }
.mobile-overlay.active { display: block; opacity: 1; }

/* ---------------------------------
   SIDEBAR NAV (ICONS + TEXT) 
--------------------------------- */
.sidebar-nav {
    width: 260px; background: var(--nav-bg); display: flex; flex-direction: column;
    padding: 25px 0; box-shadow: 4px 0 15px rgba(0,0,0,0.05); z-index: 50;
    border-right: 1px solid var(--border); flex-shrink: 0; transition: transform 0.3s ease;
}
.sidebar-brand { display: flex; align-items: center; gap: 15px; padding: 0 25px; margin-bottom: 40px; }
.sidebar-brand .logo-box {
    width: 40px; height: 40px; background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    color: white; font-size: 18px; box-shadow: 0 4px 10px rgba(79, 70, 229, 0.4);
}
.sidebar-brand .brand-text { font-size: 18px; font-weight: 700; color: var(--text-main); letter-spacing: -0.5px; }

.sidebar-links { display: flex; flex-direction: column; gap: 5px; width: 100%; padding: 0 15px; }
.sidebar-links a {
    display: flex; align-items: center; gap: 15px; padding: 14px 20px;
    color: var(--text-muted); font-size: 14px; font-weight: 600;
    border-radius: 10px; transition: all 0.2s ease;
}
.sidebar-links a i { font-size: 18px; width: 24px; text-align: center; }
.sidebar-links a:hover { color: var(--primary); background: #f1f5f9; }
.sidebar-links a.active { color: white; background: var(--nav-active); box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3); }

.sidebar-bottom { margin-top: auto; padding: 0 15px; width: 100%; }
.sidebar-bottom a {
    display: flex; align-items: center; gap: 15px; padding: 14px 20px;
    font-size: 14px; font-weight: 600; border-radius: 10px; transition: all 0.2s ease;
}
.sidebar-bottom .logout { color: #ef4444; }
.sidebar-bottom .logout i { font-size: 18px; width: 24px; text-align: center; }
.sidebar-bottom .logout:hover { background: rgba(239, 68, 68, 0.1); color: #f87171; }

/* Admin Nav Overrides */
.admin-nav { background: #0f172a; border-right: none; }
.admin-nav .brand-text { color: white; }
.admin-nav .sidebar-links a { color: #94a3b8; }
.admin-nav .sidebar-links a:hover { color: white; background: rgba(255,255,255,0.1); }
.admin-nav .sidebar-links a.active { background: #0ea5e9; box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3); color: white;}

/* Main Content */
.main-content { flex: 1; padding: 25px 40px; overflow-y: auto; background: var(--bg-body); width: 100%; }
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.top-bar-left { display: flex; align-items: center; gap: 15px; }
.hamburger { display: none; font-size: 24px; color: var(--text-main); cursor: pointer; }
.top-bar-icons { display: flex; gap: 20px; font-size: 22px; color: var(--text-muted); }
.page-header { margin-bottom: 25px; }
.page-header h1 { font-size: 24px; font-weight: 700; display: flex; align-items: center; gap: 10px; }

/* Layout Grids */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; }
.card { background: var(--bg-card); border-radius: var(--radius-md); padding: 25px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); margin-bottom: 25px; overflow: hidden; }
.premium-card { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; border: none; }

/* Dynamic List / Balances */
.balance-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.currency-badge { background: #f1f5f9; padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--text-main); }
.premium-card .balance-item { border-color: rgba(255,255,255,0.1); }
.premium-card .currency-badge { background: rgba(255,255,255,0.2); color: white; }

/* Tables */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
.table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.table th { padding: 15px; text-align: left; font-size: 12px; text-transform: uppercase; color: var(--text-muted); border-bottom: 2px solid var(--border); }
.table td { padding: 15px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.badge { padding: 6px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; display: inline-block; text-transform: capitalize; }
.badge-pending { background: #fef3c7; color: #b45309; }
.badge-completed, .badge-active { background: #dcfce7; color: #15803d; }
.badge-rejected, .badge-failed { background: #fee2e2; color: #b91c1c; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.form-control { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; outline: none; box-sizing: border-box; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); }
.btn { border: none; padding: 12px 24px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: #ef4444; color: white; }
.btn-success { background: #10b981; color: white; }
.btn-outline { border: 1px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-block { width: 100%; }

/* Alerts */
.alert { padding: 15px; border-radius: 10px; margin-bottom: 20px; font-size: 13px; font-weight: 600; }
.alert-danger { background: #fee2e2; color: #b91c1c; border-left: 4px solid #ef4444; }
.alert-success { background: #dcfce7; color: #15803d; border-left: 4px solid #22c55e; }

/* Auth Layout */
.auth-body { display: flex; align-items: center; justify-content: center; background: var(--bg-body); min-height: 100vh; padding: 20px; }
.auth-card { background: white; padding: 40px; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 100%; max-width: 450px; text-align: center; }

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .sidebar-nav {
        position: fixed; top: 0; left: 0; height: 100vh; transform: translateX(-100%);
    }
    .sidebar-nav.open { transform: translateX(0); }
    .hamburger { display: block; }
    .main-content { padding: 20px 15px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .card { padding: 15px; }
    .top-bar { margin-bottom: 20px; }
    .page-header h1 { font-size: 20px; }
}
