:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --mtn: #FFCC00;
    --telecel: #E31C1C;
    --at: #0055A4;
    --dark: #0f172a;
    --light: #f8fafc;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --font-main: 'Outfit', 'Inter', sans-serif;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, #d946ef 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e7ff 0%, #f1f5f9 100%);
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Navbar */
.navbar {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #475569;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: color 0.3s ease;
}

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

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--dark);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 1rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--primary), #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

/* Network Selector */
.network-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.network-card {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    text-decoration: none;
    color: var(--dark);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
    display: block;
}

.network-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
}

.network-card.mtn::before { background: var(--mtn); }
.network-card.telecel::before { background: var(--telecel); }
.network-card.at::before { background: var(--at); }

.network-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.network-card.mtn:hover { border-color: var(--mtn); }
.network-card.telecel:hover { border-color: var(--telecel); }
.network-card.at:hover { border-color: var(--at); }

.network-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.network-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.network-card p {
    color: #64748b;
}

/* Bundle Grid */
.bundle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.bundle-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.bundle-card:hover {
    transform: scale(1.02);
}

.bundle-amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.bundle-price {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.buy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.2);
    width: auto;
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

/* Professional Tables Redefined */
.table-container {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    max-width: 100%;
}

.pro-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.pro-table th {
    background: #f8fafc;
    padding: 1rem 1.25rem;
    font-size: 0.7rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #f1f5f9;
}

.pro-table td {
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    border-bottom: 1px solid #f1f5f9;
}

.pro-table tr:hover td {
    background: #f8fafc;
}

/* Sidebar Toggle Fix */
.sidebar-toggle {
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 0.75rem;
}

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

.modal-content {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: #64748b;
}

/* Enhanced Admin Layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    background: #f1f5f9;
    background-image: radial-gradient(#cbd5e1 0.5px, transparent 0.5px);
    background-size: 20px 20px;
}

.admin-sidebar {
    width: 260px;
    background: #0f172a;
    color: white;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 10px 0 30px rgba(0,0,0,0.1);
}

@media (max-width: 1024px) {
    .admin-sidebar {
        left: -260px;
    }
    .admin-sidebar.mobile-show {
        left: 0;
    }
    .admin-content {
        margin-left: 0 !important;
        padding: 1.5rem !important;
    }
    .sidebar-toggle {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .mobile-header {
        display: flex !important;
    }
}

.sidebar-logo {
    font-size: 1.75rem;
    font-weight: 900;
    color: white;
    margin-bottom: 3rem;
    padding: 0.5rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-logo span {
    color: var(--primary);
}

.sidebar-nav a {
    color: #94a3b8;
    text-decoration: none;
    padding: 0.875rem 1.25rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 0.25rem;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transform: translateX(5px);
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.admin-content {
    flex: 1;
    margin-left: 260px;
    padding: 3rem;
}

/* Professional Cards */
.admin-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.admin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: var(--primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.025em;
}

/* Search & Filter Bar */
.search-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    max-width: 800px;
}

@media (max-width: 640px) {
    .search-bar {
        flex-direction: column;
    }
}


.search-input {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    font-size: 0.9375rem;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Badge Styles */
.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    transition: all 0.3s ease;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #e0f2fe; color: #075985; }
.badge-warning { background: #fef9c3; color: #854d0e; }

/* Collapsible Sidebar & Responsive Tables */
.admin-sidebar.collapsed {
    width: 80px;
}

.admin-sidebar.collapsed .sidebar-logo span,
.admin-sidebar.collapsed .sidebar-nav span,
.admin-sidebar.collapsed .admin-profile-info {
    display: none;
}

.admin-sidebar.collapsed .sidebar-nav a {
    justify-content: center;
    padding: 1rem;
}

.admin-content.expanded {
    margin-left: 80px;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: var(--primary);
}

/* Responsive Table (Card Layout) */
@media (max-width: 1024px) {
    .pro-table thead {
        display: none;
    }
    
    .pro-table tr {
        display: block;
        margin-bottom: 1.5rem;
        border: 1px solid #e2e8f0;
        border-radius: 20px;
        background: #f8fafc;
        padding: 1rem;
    }
    
    .pro-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #f1f5f9;
        text-align: right;
    }
    
    .pro-table td:last-child {
        border-bottom: none;
    }
    
    .pro-table td::before {
        content: attr(data-label);
        font-weight: 800;
        text-transform: uppercase;
        font-size: 0.7rem;
        color: #64748b;
        text-align: left;
    }
}

/* Row Hover Animation */
.pro-table tbody tr {
    transition: all 0.2s ease;
}

.pro-table tbody tr:hover {
    background: #f1f5f9;
    transform: scale(1.005);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.admin-sidebar {
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-content {
    transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}


/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .container {
        padding: 1rem;
    }
}

/* Laravel Pagination Fix */
nav[role="navigation"] svg {
    width: 20px !important;
    height: 20px !important;
}

nav[role="navigation"] .flex.justify-between.flex-1 {
    display: none !important; /* Hide the simple mobile view */
}

nav[role="navigation"] .hidden.sm\:flex-1 {
    display: flex !important;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

@media (min-width: 640px) {
    nav[role="navigation"] .hidden.sm\:flex-1 {
        flex-direction: row;
        justify-content: space-between;
    }
}

nav[role="navigation"] .relative.z-0 {
    display: inline-flex;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

nav[role="navigation"] .relative.z-0 a,
nav[role="navigation"] .relative.z-0 span[aria-disabled="true"] span,
nav[role="navigation"] .relative.z-0 span[aria-current="page"] span {
    padding: 0.5rem 1rem;
    background: white;
    border-right: 1px solid #e2e8f0;
    text-decoration: none;
    color: #64748b;
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

nav[role="navigation"] .relative.z-0 a:hover {
    background: #f8fafc;
    color: var(--primary);
}

nav[role="navigation"] .relative.z-0 span[aria-current="page"] span {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

nav[role="navigation"] .relative.z-0 a:last-child,
nav[role="navigation"] .relative.z-0 span:last-child {
    border-right: none;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
