/* ==========================================================================
   InstaSell Premium Design System
   Author: Senior UI/UX Engineer
   Description: Complete custom CSS for Landing, User & Admin Dashboards
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS VARIABLES (THEMING & DESIGN TOKENS)
   -------------------------------------------------------------------------- */
:root {
    /* Light Theme (Default fallback, but data-theme="dark" overrides) */
    --primary: #4f46e5;      /* Indigo 600 */
    --primary-hover: #4338ca;
    --primary-rgb: 79, 70, 229;
    
    --secondary: #0ea5e9;    /* Sky 500 */
    --success: #10b981;      /* Emerald 500 */
    --warning: #f59e0b;      /* Amber 500 */
    --danger: #ef4444;       /* Red 500 */
    --info: #3b82f6;         /* Blue 500 */
    
    --bg-main: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    
    --glass-bg: 255, 255, 255;
    --glass-border: 226, 232, 240;
    --glass-shadow: rgba(0, 0, 0, 0.05);
    
    --input-bg: #f1f5f9;
    --input-border: #cbd5e1;
    
    --sidebar-width: 260px;
    --topbar-height: 70px;
    --border-radius-sm: 8px;
    --border-radius: 16px;
    --border-radius-lg: 24px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --primary: #6366f1;      /* Indigo 500 */
    --primary-hover: #818cf8;
    --primary-rgb: 99, 102, 241;
    
    --bg-main: #0f172a;      /* Slate 900 */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --glass-bg: 30, 41, 59;  /* Slate 800 */
    --glass-border: 51, 65, 85; /* Slate 700 */
    --glass-shadow: rgba(0, 0, 0, 0.3);
    
    --input-bg: #0f172a;
    --input-border: #334155;
}

/* --------------------------------------------------------------------------
   2. RESET & BASE STYLES
   -------------------------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-size: 15px;
    line-height: 1.5;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(var(--glass-border), 1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* --------------------------------------------------------------------------
   3. UTILITIES & ANIMATIONS
   -------------------------------------------------------------------------- */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-info { color: var(--info) !important; }
.text-muted { color: var(--text-muted) !important; }

.bg-primary-light { background: rgba(var(--primary-rgb), 0.1) !important; color: var(--primary); }
.bg-success-light { background: rgba(16, 185, 129, 0.1) !important; color: var(--success); }
.bg-warning-light { background: rgba(245, 158, 11, 0.1) !important; color: var(--warning); }
.bg-danger-light { background: rgba(239, 68, 68, 0.1) !important; color: var(--danger); }
.bg-info-light { background: rgba(59, 130, 246, 0.1) !important; color: var(--info); }

.border-bottom { border-bottom: 1px solid rgba(var(--glass-border), 1); }
.border-t-primary { border-top: 3px solid var(--primary); }
.border-t-success { border-top: 3px solid var(--success); }
.border-t-warning { border-top: 3px solid var(--warning); }
.border-t-info { border-top: 3px solid var(--info); }
.border-l-primary { border-left: 4px solid var(--primary); }
.border-l-success { border-left: 4px solid var(--success); }
.border-l-warning { border-left: 4px solid var(--warning); }
.border-l-danger { border-left: 4px solid var(--danger); }

.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.full-width { width: 100%; }
.hidden { display: none !important; }
.d-block { display: block; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.p-0 { padding: 0 !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }

/* Grid Utilities (Mobile First) */
.grid-layout-2 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.stats-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) {
    .grid-layout-2 { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
    .stats-grid.grid-4 { grid-template-columns: repeat(4, 1fr); }
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(var(--primary-rgb), 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes skeleton-loading { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.fade-in { animation: fadeIn 0.4s ease forwards; }

/* --------------------------------------------------------------------------
   4. COMPONENTS
   -------------------------------------------------------------------------- */
/* Glassmorphism Base */
.glassmorphism {
    background: rgba(var(--glass-bg), 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(var(--glass-border), 0.8);
    box-shadow: 0 8px 32px 0 var(--glass-shadow);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.btn:active { transform: translateY(0); }

.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); color: white; }
.btn-success { background-color: var(--success); color: white; }
.btn-danger { background-color: var(--danger); color: white; }
.btn-outline { background: transparent; border: 1px solid rgba(var(--glass-border), 1); color: var(--text-main); }
.btn-outline:hover { background: rgba(var(--glass-bg), 1); border-color: var(--primary); color: var(--primary); }
.btn-light { background: white; color: var(--primary); font-weight: 600; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; border-radius: var(--border-radius); }
.btn-rounded { border-radius: 50px; }

.gradient-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
}
.gradient-btn:hover {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.4);
}

.icon-btn {
    background: rgba(var(--glass-border), 0.5);
    border: none;
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}
.icon-btn:hover { background: var(--primary); color: white; }
.icon-btn-sm { width: 28px; height: 28px; border-radius: 50%; background: transparent; border: none; cursor: pointer; color: inherit; }

/* Cards */
.card { border-radius: var(--border-radius); overflow: hidden; margin-bottom: 1.5rem; }
.card-header { padding: 1.25rem 1.5rem; }
.card-header h3 { margin: 0; font-size: 1.1rem; }
.card-body { padding: 1.5rem; }

/* Forms & Inputs */
.input-group { margin-bottom: 1.25rem; text-align: left; }
.input-group label { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; font-weight: 500; color: var(--text-muted); }
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}
.input-wrapper:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1); }
.input-wrapper i:first-child { padding: 0 1rem; color: var(--text-muted); }
.input-wrapper input, .input-wrapper textarea {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 0.95rem;
}
.input-wrapper.no-icon input, .input-wrapper.no-icon textarea { padding-left: 1rem; }
.input-wrapper textarea { resize: vertical; min-height: 80px; }
.toggle-password { padding: 0 1rem; cursor: pointer; color: var(--text-muted); }

.custom-select {
    padding: 0.6rem 2rem 0.6rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-main);
    outline: none;
    cursor: pointer;
    appearance: none;
}

/* Checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    user-select: none;
}
.checkbox-container input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.checkmark {
    height: 20px;
    width: 20px;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: var(--transition);
}
.checkbox-container:hover input ~ .checkmark { border-color: var(--primary); }
.checkbox-container input:checked ~ .checkmark { background-color: var(--primary); border-color: var(--primary); }
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.checkbox-container input:checked ~ .checkmark:after { display: block; }

/* --------------------------------------------------------------------------
   5. LAYOUT & PAGES
   -------------------------------------------------------------------------- */

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-main);
    z-index: 9999;
    flex-direction: column;
    transition: opacity 0.5s ease;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}
.spinner.border-danger { border-top-color: var(--danger); }

/* Landing Page Specific */
.landing-body { position: relative; overflow-x: hidden; }
.navbar { position: fixed; top: 0; width: 100%; z-index: 1000; padding: 1rem 0; border-bottom: 1px solid rgba(var(--glass-border), 0.5); }
.nav-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 2rem; }
.logo { display: flex; align-items: center; gap: 0.5rem; font-size: 1.5rem; font-weight: 700; font-family: 'Poppins', sans-serif; }
.logo-icon { color: var(--primary); }
.text-gradient { background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-actions { display: flex; align-items: center; gap: 1rem; }

.hero-section { min-height: 100vh; padding: 120px 2rem 60px; position: relative; text-align: center; overflow: hidden; }
.hero-content { position: relative; z-index: 10; max-width: 800px; }
.glass-badge { display: inline-block; padding: 0.5rem 1rem; border-radius: 50px; font-size: 0.85rem; font-weight: 500; margin-bottom: 1.5rem; background: rgba(var(--glass-bg), 0.5); backdrop-filter: blur(10px); border: 1px solid rgba(var(--glass-border), 1); }
.hero-title { font-size: 3.5rem; line-height: 1.2; margin-bottom: 1.5rem; }
.hero-subtitle { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2.5rem; max-width: 600px; margin-inline: auto; }
.hero-buttons { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 4rem; }

.hero-stats { display: flex; justify-content: space-around; padding: 2rem; border-radius: var(--border-radius-lg); max-width: 700px; margin: 0 auto; }
.stat-item h3 { font-size: 2rem; margin-bottom: 0.2rem; color: var(--primary); }
.stat-item p { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }

/* Landing Blobs */
.blob { position: absolute; filter: blur(80px); z-index: 1; opacity: 0.5; }
.blob-1 { top: 10%; left: -10%; width: 400px; height: 400px; background: var(--primary); border-radius: 50%; animation: pulse 8s infinite alternate; }
.blob-2 { bottom: -10%; right: -10%; width: 500px; height: 500px; background: var(--secondary); border-radius: 50%; animation: pulse 10s infinite alternate-reverse; }

.features-section { padding: 5rem 2rem; max-width: 1200px; margin: 0 auto; position: relative; z-index: 10; }
.section-header { margin-bottom: 3rem; }
.section-title { font-size: 2.5rem; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.feature-card { padding: 2rem; border-radius: var(--border-radius); transition: transform 0.3s; text-align: left; }
.feature-card:hover { transform: translateY(-10px); }
.feature-icon { width: 60px; height: 60px; border-radius: 16px; display: flex; justify-content: center; align-items: center; font-size: 1.5rem; margin-bottom: 1.5rem; }

.glass-footer { border-top: 1px solid rgba(var(--glass-border), 0.5); padding: 2rem; text-align: center; }
.footer-content { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-links { display: flex; gap: 1.5rem; }

/* App Layout (Dashboard) */
.app-container { display: flex; height: 100vh; overflow: hidden; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100%;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(var(--glass-border), 1);
    transition: transform 0.3s ease;
}
.sidebar-header { padding: 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.user-profile-mini { padding: 1.5rem; text-align: center; border-bottom: 1px solid rgba(var(--glass-border), 1); }
.avatar { width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 1rem; display: flex; justify-content: center; align-items: center; font-size: 1.5rem; color: white; background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.avatar-sm { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 1rem 0; }
.nav-item { display: flex; align-items: center; padding: 0.8rem 1.5rem; color: var(--text-muted); font-weight: 500; gap: 1rem; position: relative; }
.nav-item i { width: 20px; text-align: center; font-size: 1.1rem; }
.nav-item:hover, .nav-item.active { color: var(--primary); background: rgba(var(--primary-rgb), 0.05); }
.nav-item.active::before { content: ''; position: absolute; left: 0; top: 0; height: 100%; width: 4px; background: var(--primary); border-radius: 0 4px 4px 0; }
.sidebar-footer { padding: 1rem 0; border-top: 1px solid rgba(var(--glass-border), 1); }
.badge { padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: transparent;
    transition: margin-left 0.3s ease;
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(var(--glass-border), 1);
    position: sticky; top: 0; z-index: 90;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 1rem; }
.page-title { margin: 0; font-size: 1.25rem; }
.wallet-chip {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1rem; border-radius: 50px;
    background: rgba(var(--glass-bg), 0.8);
    font-weight: 600; color: var(--text-main);
}
.gradient-border { position: relative; border: 1px solid transparent; background-clip: padding-box; }
.gradient-border::before {
    content: ''; position: absolute; top: -1px; left: -1px; right: -1px; bottom: -1px; z-index: -1;
    border-radius: 50px; background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.notification-wrapper { position: relative; }
.badge-dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; }

/* Content Wrapper */
.content-wrapper { flex: 1; overflow-y: auto; padding: 2rem; position: relative; }
.view { display: none; }
.view.active { display: block; }

/* Dashboard Cards */
.wallet-overview-card {
    border-radius: var(--border-radius);
    padding: 2rem; color: white; margin-bottom: 2rem;
    display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.3);
    flex-wrap: wrap; gap: 1rem;
}
.balance-text { font-size: 2.5rem; font-weight: 700; margin: 0.5rem 0; color: white; }
.sm-text { font-size: 0.85rem; opacity: 0.8; }

.stat-card {
    padding: 1.5rem; border-radius: var(--border-radius);
    display: flex; align-items: center; gap: 1rem;
}
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; justify-content: center; align-items: center; font-size: 1.25rem; }
.stat-details p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.stat-details h3 { margin: 0; font-size: 1.25rem; }

/* Tables */
.table-responsive { width: 100%; overflow-x: auto; }
.custom-table { width: 100%; border-collapse: collapse; text-align: left; }
.custom-table th { padding: 1rem 1.5rem; background: rgba(var(--glass-border), 0.3); font-weight: 600; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }
.custom-table td { padding: 1rem 1.5rem; border-bottom: 1px solid rgba(var(--glass-border), 0.5); font-size: 0.95rem; }
.custom-table tbody tr:hover { background: rgba(var(--glass-border), 0.2); }
.custom-table tbody tr:last-child td { border-bottom: none; }

.badge-status { padding: 0.3rem 0.8rem; border-radius: 50px; font-size: 0.75rem; font-weight: 600; text-transform: capitalize; }
.status-pending { background: rgba(245, 158, 11, 0.1); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.status-approved { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.status-rejected { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }

/* Empty State */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }

/* Submission & Withdraw Styles */
.info-card { background: rgba(var(--glass-bg), 0.3); }
.guideline-list { padding: 0; margin: 0; }
.guideline-list li { margin-bottom: 0.8rem; display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.9rem; }
.guideline-list i { margin-top: 4px; }

.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.method-card { position: relative; cursor: pointer; }
.method-card input { position: absolute; opacity: 0; }
.method-content { border: 1px solid var(--input-border); border-radius: var(--border-radius-sm); padding: 1rem; text-align: center; transition: var(--transition); background: var(--input-bg); }
.method-icon { height: 30px; margin-bottom: 0.5rem; display: block; margin-inline: auto; }
.method-card input:checked + .method-content { border-color: var(--primary); background: rgba(var(--primary-rgb), 0.05); box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2); }

.copy-input-group { display: flex; border-radius: var(--border-radius-sm); overflow: hidden; border: 1px solid var(--input-border); }
.copy-input-group input { flex: 1; padding: 0.8rem 1rem; border: none; background: var(--input-bg); color: var(--text-main); outline: none; }
.copy-input-group .btn { border-radius: 0; }

.filter-bar { padding: 1rem 1.5rem; display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.search-box { position: relative; flex: 1; min-width: 200px; }
.search-box i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.search-box input { width: 100%; padding: 0.6rem 1rem 0.6rem 2.5rem; background: var(--input-bg); border: 1px solid var(--input-border); border-radius: var(--border-radius-sm); color: var(--text-main); outline: none; }

/* Admin Specific Overrides */
.admin-mode { --primary: var(--danger); --primary-hover: #dc2626; --primary-rgb: 239, 68, 68; }
.border-bottom-danger { border-bottom: 1px solid rgba(239, 68, 68, 0.3) !important; }
.action-group { display: flex; gap: 0.5rem; }

/* --------------------------------------------------------------------------
   6. MODALS & TOASTS
   -------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px);
    z-index: 1050; display: none; justify-content: center; align-items: center;
    padding: 1rem; opacity: 0; transition: opacity 0.3s ease;
}
.modal-overlay.active { display: flex; opacity: 1; }
.modal-content {
    background: var(--bg-main); width: 100%; max-width: 450px;
    border-radius: var(--border-radius-lg); padding: 2rem; position: relative;
    transform: translateY(20px); transition: transform 0.3s ease;
}
.modal-overlay.active .modal-content { transform: translateY(0); }
.close-btn { position: absolute; top: 1.5rem; right: 1.5rem; background: transparent; border: none; font-size: 1.2rem; color: var(--text-muted); cursor: pointer; }
.close-btn:hover { color: var(--danger); }
.modal-header { text-align: center; margin-bottom: 2rem; }
.modal-header h2 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.modal-header p { color: var(--text-muted); }
.form-options { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.text-link { color: var(--primary); font-size: 0.9rem; font-weight: 500; }
.text-link:hover { text-decoration: underline; }
.modal-footer-text { text-align: center; margin-top: 1.5rem; font-size: 0.9rem; color: var(--text-muted); }

/* Toast System */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
    min-width: 250px; padding: 1rem 1.25rem; border-radius: var(--border-radius-sm);
    display: flex; align-items: center; gap: 10px;
    background: rgba(var(--glass-bg), 0.9); backdrop-filter: blur(10px);
    border-left: 4px solid var(--text-main); color: var(--text-main);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(120%); transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.toast.show { transform: translateX(0); }
.toast i { font-size: 1.2rem; }
.toast-success { border-left-color: var(--success); }
.toast-success i { color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-error i { color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-warning i { color: var(--warning); }
.toast-info { border-left-color: var(--info); }
.toast-info i { color: var(--info); }

/* Skeleton Loader */
.skeleton-text {
    height: 15px; background: linear-gradient(90deg, rgba(var(--glass-border), 0.5) 25%, rgba(var(--glass-border), 1) 50%, rgba(var(--glass-border), 0.5) 75%);
    background-size: 200% 100%; animation: skeleton-loading 1.5s infinite;
    border-radius: 4px; margin-bottom: 5px; color: transparent !important; user-select: none;
}
.skeleton-text.sm { width: 60%; margin: 0 auto; }

/* --------------------------------------------------------------------------
   7. RESPONSIVE MEDIA QUERIES
   -------------------------------------------------------------------------- */
.d-mobile { display: none; }

@media (max-width: 992px) {
    .d-mobile { display: inline-flex; }
    .d-none-mobile { display: none; }
    
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); box-shadow: 10px 0 30px rgba(0,0,0,0.5); }
    
    .main-content { margin-left: 0; }
    
    .hero-title { font-size: 2.5rem; }
    .hero-stats { flex-direction: column; gap: 1.5rem; }
    
    .filter-bar { flex-direction: column; align-items: stretch; }
    .search-box { min-width: 100%; }
    .wrap-mobile { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

@media (max-width: 576px) {
    .card-body { padding: 1rem; }
    .wallet-overview-card { padding: 1.5rem; text-align: center; justify-content: center; }
    .method-grid { grid-template-columns: 1fr; }
    .stats-grid.grid-4, .stats-grid.grid-3, .grid-layout-2 { grid-template-columns: 1fr; }
    
    .modal-content { padding: 1.5rem; width: 95%; }
    .toast-container { right: 10px; left: 10px; bottom: 10px; }
    .toast { min-width: 100%; }
}