/* DataHub - Modern Data Reselling Website Styles */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables for Design System - Modern Accessible Theme */
:root {
    /* Primary Colors - Modern Blue Palette */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);

    /* Secondary Colors - Modern Purple */
    --secondary-color: #8b5cf6;
    --secondary-dark: #7c3aed;

    /* Accent Colors - High Contrast */
    --accent-color: #059669;
    --accent-warning: #d97706;
    --accent-danger: #dc2626;
    --accent-info: #0284c7;

    /* Neutral Colors - Enhanced Dark Mode */
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --bg-card: #1f2937;
    --bg-hover: #4b5563;

    /* Text Colors - High Contrast */
    --text-primary: #ffffff;
    --text-secondary: #e5e7eb;
    --text-muted: #9ca3af;

    /* Border & Shadow */
    --border-color: #334155;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
}

/* Light Mode Theme */
body.light-mode {
    /* Neutral Colors - Light Mode */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e2e8f0;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;

    /* Text Colors - Light Mode */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    /* Border - Light Mode */
    --border-color: #e2e8f0;

    /* Shadows - Light Mode */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.2);
}

/* Light Mode - Remove animated background */
body.light-mode::before {
    background:
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(16, 185, 129, 0.03) 0%, transparent 50%);
}

/* Light Mode - Navbar */
body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--border-color);
}

/* Light Mode - Form Controls */
body.light-mode .form-control {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.light-mode .form-control::placeholder {
    color: var(--text-muted);
}

/* Light Mode - Wallet Badge */
body.light-mode .wallet-badge {
    color: white;
}

/* Light Mode - Auth Pages */
body.light-mode {
    background: var(--bg-primary);
}

body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode h5 {
    color: var(--text-primary);
}

body.light-mode .card {
    background: var(--bg-card);
    border-color: var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Light Mode - Ensure text is visible in cards */
body.light-mode .card h1,
body.light-mode .card h2,
body.light-mode .card h3,
body.light-mode .card h4,
body.light-mode .card h5,
body.light-mode .card h6 {
    color: var(--text-primary) !important;
}

body.light-mode .card p {
    color: var(--text-secondary);
}

body.light-mode .card .text-muted {
    color: var(--text-muted) !important;
}

body.light-mode .text-center h3,
body.light-mode .text-center p {
    color: var(--text-primary);
}

body.light-mode .form-label {
    color: var(--text-primary);
}

body.light-mode .text-muted {
    color: var(--text-muted) !important;
}

body.light-mode a {
    color: var(--primary-color);
}

body.light-mode footer {
    background: var(--bg-secondary) !important;
    border-top-color: var(--border-color) !important;
}

body.light-mode footer p {
    color: var(--text-muted) !important;
}

/* Light Mode - Tables */
body.light-mode thead {
    background: var(--bg-tertiary);
}

body.light-mode th {
    color: var(--text-primary);
}

body.light-mode td {
    color: var(--text-secondary);
    border-bottom-color: var(--border-color);
}

body.light-mode tr:hover {
    background: var(--bg-hover);
}

/* Light Mode - Alerts */
body.light-mode .alert {
    color: inherit;
}

/* Light Mode - Modal */
body.light-mode .modal-content {
    background: var(--bg-card);
    border-color: var(--border-color);
}

/* Light Mode - Hero Section */
body.light-mode .hero {
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
}

body.light-mode .hero h1,
body.light-mode .hero p {
    color: var(--text-primary);
}

/* Light Mode - Step Cards */
body.light-mode .step-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

body.light-mode .step-number {
    background: var(--primary-gradient);
    color: white;
}

body.light-mode .step-title {
    color: var(--text-primary);
}

/* Light Mode - Stat Cards */
body.light-mode .stat-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

body.light-mode .stat-value {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode .stat-label {
    color: var(--text-muted);
}

/* Light Mode - All Sections */
body.light-mode section {
    background: var(--bg-primary);
}

body.light-mode .features,
body.light-mode .steps-section {
    background: var(--bg-secondary) !important;
}

/* Light Mode - Buttons */
body.light-mode .btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

body.light-mode .btn-secondary:hover {
    background: var(--bg-hover);
}

/* Light Mode - Navbar Menu */
body.light-mode .navbar-menu a {
    color: var(--text-secondary);
}

body.light-mode .navbar-menu a:hover,
body.light-mode .navbar-menu a.active {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* Light Mode - Navbar Brand */
body.light-mode .navbar-brand {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Light Mode - CTA Section */
body.light-mode .cta-section {
    background: linear-gradient(135deg, #e0e7ff 0%, #c4b5fd 100%) !important;
}

body.light-mode .cta-section h2,
body.light-mode .cta-section p {
    color: #1e1b4b !important;
}

/* Light Mode - Product Cards */
body.light-mode .product-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

body.light-mode .product-card:hover {
    border-color: var(--primary-color);
}

body.light-mode .product-name,
body.light-mode .product-description {
    color: var(--text-primary);
}

/* Light Mode - WAEC Card */
body.light-mode .waec-card {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

/* Light Mode - Result Display */
body.light-mode .result-display {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

/* Light Mode - How To Use */
body.light-mode .how-to-use {
    background: var(--bg-secondary);
    border-left-color: var(--primary-color);
}

body.light-mode .how-to-use li {
    color: var(--text-secondary);
}

/* Light Mode - Purchase Section */
body.light-mode .purchase-section {
    background: var(--bg-card);
}

/* Light Mode - Price Box */
body.light-mode .price-box {
    background: var(--bg-secondary);
}

/* Light Mode - Badges */
body.light-mode .badge-success {
    background: rgba(16, 185, 129, 0.15);
}

body.light-mode .badge-danger {
    background: rgba(239, 68, 68, 0.15);
}

body.light-mode .badge-warning {
    background: rgba(245, 158, 11, 0.15);
}

/* API Status Cards */
.api-status-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

/* Light Mode - API Status Cards */
body.light-mode .api-balance-card,
body.light-mode .api-status-card {
    background: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Floating Theme Button */
.floating-theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--primary-gradient);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
}

.floating-theme-toggle:hover {
    transform: scale(1.1);
}

/* Light Mode - Floating Theme Button */
body.light-mode .floating-theme-toggle {
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Performance Dashboard - Dark Mode (Default) */
.performance-dashboard {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    border: none;
}

.performance-dashboard h3 {
    color: white;
}

.performance-stat {
    text-align: center;
    padding: 0.5rem;
}

.performance-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.performance-value.profit {
    color: #38ef7d;
}

.performance-label {
    opacity: 0.8;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Light Mode - Performance Dashboard */
body.light-mode .performance-dashboard {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
}

body.light-mode .performance-dashboard h3 {
    color: white !important;
}

body.light-mode .performance-dashboard .performance-value {
    color: white !important;
}

body.light-mode .performance-dashboard .performance-value.profit {
    color: #a7f3d0 !important;
}

body.light-mode .performance-dashboard .performance-label {
    color: rgba(255, 255, 255, 0.85) !important;
}

body.light-mode .performance-label {
    color: rgba(255, 255, 255, 0.85);
}

/* Light Mode - Stat Card Mini (Revenue, Cost, Profit cards) */
body.light-mode .stat-card-mini {
    background: var(--bg-card);
    border-color: var(--border-color);
}

body.light-mode .stat-card-mini .value {
    color: var(--text-primary);
}

body.light-mode .stat-card-mini .label {
    color: var(--text-secondary);
}

body.light-mode .stat-card-mini.revenue-card {
    border-left: 4px solid #10b981;
}

body.light-mode .stat-card-mini.cost-card {
    border-left: 4px solid #f59e0b;
}

body.light-mode .stat-card-mini.profit-card {
    border-left: 4px solid #6366f1;
}

body.light-mode .stat-card-mini.profit-card .value {
    color: #059669;
}

/* Smooth transition for all elements */
*,
*::before,
*::after {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.2s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 16px;
    font-weight: 400;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundPulse 15s ease-in-out infinite;
}

@keyframes backgroundPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-color);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Navigation */
.navbar {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-menu {
    display: flex;
    gap: var(--spacing-lg);
    list-style: none;
    align-items: center;
}

.navbar-menu a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.navbar-menu a:hover,
.navbar-menu a.active {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.wallet-badge {
    background: var(--primary-gradient);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow-glow);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.card-header {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

.btn-success {
    background: var(--accent-color);
    color: white;
}

.btn-danger {
    background: var(--accent-danger);
    color: white;
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.85rem;
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge-success {
    color: #fff;
    background-color: #10b981;
}

.badge-warning {
    color: #212529;
    background-color: #f59e0b;
}

.badge-danger {
    color: #fff;
    background-color: #ef4444;
}

.badge-info {
    color: #fff;
    background-color: #3b82f6;
}

.badge-secondary {
    color: #fff;
    background-color: #6b7280;
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-text {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Alerts */
.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    border-left: 4px solid;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--accent-danger);
    color: var(--accent-danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--accent-warning);
    color: var(--accent-warning);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent-info);
    color: var(--accent-info);
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Stats Cards */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--bg-tertiary);
}

th {
    padding: var(--spacing-md);
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

tr:hover {
    background: var(--bg-hover);
}

/* Badges */
.badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-color);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-danger);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--accent-warning);
}

.badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-info);
}

.badge-secondary {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-muted);
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--bg-tertiary);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: var(--spacing-xl) auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    margin-bottom: var(--spacing-lg);
}

.modal-close {
    float: right;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-muted);
}

.text-primary {
    color: var(--primary-color);
}

.text-success {
    color: var(--accent-color);
}

.text-danger {
    color: var(--accent-danger);
}

.text-warning {
    color: var(--accent-warning);
}

.mt-1 {
    margin-top: var(--spacing-sm);
}

.mt-2 {
    margin-top: var(--spacing-md);
}

.mt-3 {
    margin-top: var(--spacing-lg);
}

.mt-4 {
    margin-top: var(--spacing-xl);
}

.mb-1 {
    margin-bottom: var(--spacing-sm);
}

.mb-2 {
    margin-bottom: var(--spacing-md);
}

.mb-3 {
    margin-bottom: var(--spacing-lg);
}

.mb-4 {
    margin-bottom: var(--spacing-xl);
}

.p-1 {
    padding: var(--spacing-sm);
}

.p-2 {
    padding: var(--spacing-md);
}

.p-3 {
    padding: var(--spacing-lg);
}

.p-4 {
    padding: var(--spacing-xl);
}

.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-1 {
    gap: var(--spacing-sm);
}

.gap-2 {
    gap: var(--spacing-md);
}

.gap-3 {
    gap: var(--spacing-lg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: var(--spacing-lg);
        border-top: 1px solid var(--border-color);
    }

    .navbar-menu.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .card {
        padding: var(--spacing-lg);
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }

    .navbar,
    .btn,
    .modal {
        display: none;
    }
}

/* Badge Colors for Levels */
.badge-bronze {
    background: #cd7f32;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.badge-silver {
    background: #c0c0c0;
    color: black;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.badge-gold {
    background: #ffd700;
    color: black;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}


/* Wallet Page Styles */
.paystack-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    position: relative;
    overflow: hidden;
}

.paystack-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.paystack-card h3,
.paystack-card p,
.paystack-card label {
    color: white !important;
}

.paystack-card .form-text {
    color: rgba(255, 255, 255, 0.8) !important;
}

.btn-paystack {
    background: white;
    color: #667eea;
    font-weight: 600;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.btn-paystack:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.amount-presets {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.amount-preset {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.amount-preset:hover {
    background: rgba(255, 255, 255, 0.3);
}

.amount-preset.active {
    background: white;
    color: #667eea;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    margin-top: 1rem;
}

.security-badge svg {
    width: 16px;
    height: 16px;
}

.balance-card {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    text-align: center;
    padding: 2rem;
}

.balance-amount {
    font-size: 3rem;
    font-weight: 700;
    margin: 1rem 0;
}

.balance-label {
    opacity: 0.9;
    font-size: 1rem;
}

.payment-methods {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.payment-method-icon {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
}


/* Profit Report Styles */
.profit-card {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    text-align: center;
    padding: 2rem;
}

.profit-amount {
    font-size: 3rem;
    font-weight: 700;
}

.revenue-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cost-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.stat-card-mini {
    padding: 1.5rem;
    text-align: center;
    border-radius: 12px;
}

.stat-card-mini .value {
    font-size: 2rem;
    font-weight: 600;
}

.stat-card-mini .label {
    opacity: 0.9;
    margin-top: 0.5rem;
}

.filter-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    align-items: flex-end;
}

.filter-bar .form-group {
    margin: 0;
}

.filter-bar label {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    display: block;
}

.positive {
    color: #10b981;
}

.negative {
    color: #ef4444;
}


/* Transaction Page Styles */
.btn-check-status {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-check-status:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.btn-check-status:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-check-status.loading {
    background: #888;
}

.status-cell {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    align-items: flex-start;
}

.status-update {
    font-size: 0.7rem;
    color: var(--accent-color);
    /* Corrected from --success */
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.refresh-all-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}


/* Buy Data Page Styles */
.bundle-card {
    cursor: pointer;
    transition: all var(--transition-base);
}

.bundle-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
}

.bundle-card.selected {
    border: 2px solid var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}


/* Referral Page Styles */
.level-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.level-bronze {
    background: #cd7f32;
    color: white;
}

.level-silver {
    background: #c0c0c0;
    color: black;
}

.level-gold {
    background: #ffd700;
    color: black;
}

.progress-container {
    background: #e0e0e0;
    border-radius: 10px;
    height: 20px;
    width: 100%;
    margin: 1rem 0;
    overflow: hidden;
}

.progress-bar-fill {
    background: var(--primary-color);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.tier-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    opacity: 0.7;
}

.tier-card.active {
    border-color: var(--primary-color);
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tier-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.tier-reward {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Light Mode Tier Card Overrides */
body.light-mode .tier-card {
    background: #ffffff;
    border-color: #e2e8f0;
    opacity: 1;
}

body.light-mode .tier-range {
    color: #64748b;
}

body.light-mode .tier-benefits li {
    color: #374151;
}

body.light-mode .tier-benefits li strong {
    color: #111827;
}

body.light-mode .tier-title.bronze {
    color: #b45309;
}

body.light-mode .tier-title.silver {
    color: #57534e;
}

body.light-mode .tier-title.gold {
    color: #ca8a04;
}

/* Admin Users Page Styles */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1rem;
}

.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-bar input {
    flex: 1;
    min-width: 200px;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-tab {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-secondary);
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.filter-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.action-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    border: none;
}

.modal-centered {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-centered.show {
    display: flex;
}

.modal-centered .modal-content {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
}

/* Light Mode Text Refinements */
body.light-mode p {
    color: var(--text-secondary);
}

body.light-mode strong,
body.light-mode b {
    color: var(--text-primary);
}

body.light-mode small {
    color: var(--text-muted);
}

body.light-mode code {
    background: rgba(0, 0, 0, 0.05);
    color: #d63384;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
}

body.light-mode .text-muted {
    color: var(--text-muted) !important;
}

body.light-mode .text-primary {
    color: var(--primary-dark) !important;
}

body.light-mode .text-success {
    color: #059669 !important;
    /* emerald-600 */
}

body.light-mode .text-danger {
    color: #dc2626 !important;
    /* red-600 */
}

/* Ensure inputs in light mode are readable */
body.light-mode input:not([type="submit"]):not([type="button"]),
body.light-mode select,
body.light-mode textarea {
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

body.light-mode select option {
    background-color: white;
    color: #0f172a;
}

/* Fix table text in light mode */
body.light-mode table td {
    color: var(--text-secondary);
}

body.light-mode table th {
    color: var(--text-primary);
    background-color: #f1f5f9;
    /* slate-100 */
}

/* Fix Card Headers */
body.light-mode .card-title,
body.light-mode .card-header h3 {
    color: var(--text-primary);
}

body.light-mode .page-header h1 {
    color: var(--text-primary);
}


/* Better badge contrast in light mode */
body.light-mode .badge-success {
    color: #059669;
    background: rgba(16, 185, 129, 0.2);
}

body.light-mode .badge-danger {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.2);
}

body.light-mode .badge-warning {
    color: #d97706;
    background: rgba(245, 158, 11, 0.2);
}

body.light-mode .badge-info {
    color: #2563eb;
    background: rgba(59, 130, 246, 0.2);
}

body.light-mode .badge-secondary {
    color: #475569;
    background: rgba(148, 163, 184, 0.3);
}

/* Fix Button Text in Light Mode */
body.light-mode .btn-primary,
body.light-mode .btn-success,
body.light-mode .btn-danger,
body.light-mode .btn-warning,
body.light-mode .btn-info {
    color: white !important;
}

body.light-mode a.btn-primary:hover,
body.light-mode a.btn-success:hover,
body.light-mode a.btn-danger:hover {
    color: white !important;
}

/* Admin Transaction Page Styles */
.btn-check-status {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-check-status:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.btn-check-status:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.status-cell {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    align-items: flex-start;
}

.status-update {
    font-size: 0.7rem;
    color: var(--success);
}

.filter-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.filter-bar select {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.pending-badge {
    background: #f59e0b;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.btn-check-all {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-check-all:hover {
    background: var(--primary-dark);
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    display: none;
}


/* Profit Report Styles */
.stat-card-mini {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.stat-card-mini .value {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.stat-card-mini .label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.revenue-card {
    border-left: 4px solid #6366f1;
}

.revenue-card .value {
    color: #6366f1;
}

.cost-card {
    border-left: 4px solid #f43f5e;
}

.cost-card .value {
    color: #f43f5e;
}

.profit-card {
    border-left: 4px solid #10b981;
}

.profit-card .value {
    color: #10b981;
}

/* Light Mode - Stat Card Mini Colors */
body.light-mode .revenue-card .value {
    color: #4f46e5;
}

body.light-mode .cost-card .value {
    color: #dc2626;
}

body.light-mode .profit-card .value {
    color: #059669;
}

.card-all-time {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
}

body.light-mode .card-all-time {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
}

body.light-mode .card-all-time .text-muted,
body.light-mode .card-all-time div[style*="opacity"] {
    color: rgba(255, 255, 255, 0.8) !important;
    opacity: 1 !important;
}

/* Ensure positive/negative colors work in light mode */
.positive {
    color: #10b981;
}

.negative {
    color: #ef4444;
}

body.light-mode .positive {
    color: #059669;
}

body.light-mode .negative {
    color: #dc2626;
}