:root {
    --primary-color: #7c3aed;
    --primary-light: #a78bfa;
    --primary-dark: #5b21b6;
    --bg-dark: #f8fafc;
    --card-bg: #1e3a8a;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(0, 0, 0, 0.1);
    --text-main: #0f172a;
    --text-muted: #475569;
    /* Increased brightness for readability */
    --accent-success: #10b981;
    --aura-1: rgba(124, 58, 237, 0.05);
    --aura-2: rgba(59, 130, 246, 0.05);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    background: var(--bg-dark) !important;
    color: var(--text-main) !important;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated Aura Background */
body::before,
body::after {
    content: '';
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: var(--aura-1);
    filter: blur(100px);
    z-index: -1;
    animation: move_aura 20s infinite alternate;
}

body::after {
    background: var(--aura-2);
    width: 800px;
    height: 800px;
    right: -200px;
    top: -200px;
    animation-delay: -5s;
    animation-duration: 25s;
}

@keyframes move_aura {
    0% {
        transform: translate(-10%, -10%) scale(1);
    }

    100% {
        transform: translate(10%, 10%) scale(1.1);
    }
}

/* Navbar */
.premium-nav {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 22px 0;
    border-bottom: 1px solid var(--glass-border);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.7rem;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-brand .fa-bolt {
    -webkit-text-fill-color: var(--primary-color);
    filter: drop-shadow(0 0 8px var(--primary-color));
}

.custom-nav-link {
    color: var(--text-main) !important;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 8px 16px !important;
    border-radius: 20px;
}

.custom-nav-link:hover {
    color: var(--primary-color) !important;
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.welcome-title {
    font-weight: 800;
    font-size: 4rem;
    letter-spacing: -2px;
    margin-bottom: 20px;
    display: inline-block;
}

.welcome-title strong {
    background: linear-gradient(135deg, #1e3a8a 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-section {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 90px 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 0 40px rgba(124, 58, 237, 0.1);
    animation: fadeInUp 0.8s ease-out, floatCard 6s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.welcome-section::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, transparent 60%);
    pointer-events: none;
    border-radius: 32px;
}

@keyframes floatCard {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.wave {
    display: inline-block;
    animation: wave-animation 2.5s infinite;
    transform-origin: 70% 70%;
}

@keyframes wave-animation {
    0% {
        transform: rotate(0.0deg)
    }

    10% {
        transform: rotate(14.0deg)
    }

    20% {
        transform: rotate(-8.0deg)
    }

    30% {
        transform: rotate(14.0deg)
    }

    40% {
        transform: rotate(-4.0deg)
    }

    50% {
        transform: rotate(10.0deg)
    }

    60% {
        transform: rotate(0.0deg)
    }

    100% {
        transform: rotate(0.0deg)
    }
}

/* Glass Cards */
.lite-card {
    background: #1e3a8a;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 50px;
}

.premium-table tbody td {
    padding: 20px 25px !important;
}

@media (max-width: 991px) {
    .table-responsive table {
        min-width: 850px !important;
    }
    
    /* Fail-safe: Ensure ALL tables scroll regardless of wrapper */
    table:not(.ui-datepicker-calendar) {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1600px !important;
    }
}
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.lite-card .card-text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
}

.lite-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    z-index: -1;
}

.lite-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.6);
}

.icon-circle {
    width: 85px;
    height: 85px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(124, 58, 237, 0.05));
    border: 1px solid rgba(124, 58, 237, 0.2);
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 32px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Form Inputs */
.auth-input-group {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 8px 20px;
    transition: all 0.3s;
}

.auth-input-group:focus-within {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--primary-light);
    box-shadow: 0 0 0 5px rgba(124, 58, 237, 0.15);
}

/* Typography Enhancements */
.text-muted {
    color: var(--text-muted) !important;
    font-weight: 500;
}

.fw-800 {
    font-weight: 800;
}

.fw-600 {
    font-weight: 600;
}

/* Buttons */
.btn-primary-purple {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    border: none !important;
    border-radius: 20px;
    padding: 18px 40px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 30px rgba(124, 58, 237, 0.3);
}

.btn-primary-purple:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 40px rgba(124, 58, 237, 0.4);
}

/* Footer & Bottom Text Readability */
.lite-footer {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    padding: 40px 0;
}

.lite-footer p,
.lite-footer a {
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    color: #0f172a !important;
    opacity: 1 !important;
}

.lite-footer a:hover {
    opacity: 1;
    color: var(--primary-light) !important;
}

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 68px;
    height: 68px;
    border-radius: 22px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 15px 30px rgba(34, 197, 94, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    font-size: 32px;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 20px 40px rgba(34, 197, 94, 0.4);
    color: #ffffff !important;
}

/* Logout Button */
.btn-logout-red {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-logout-red:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 15px 30px rgba(239, 68, 68, 0.3);
    color: #ffffff !important;
}

/* Enhanced Glow Cards */
.card-glow-purple {
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.2) !important;
}

.card-glow-blue {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.2) !important;
}

.card-glow-emerald {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.2) !important;
}

.card-glow-purple:hover {
    box-shadow: 0 0 40px rgba(124, 58, 237, 0.4) !important;
    transform: translateY(-10px) scale(1.02);
}

.card-glow-blue:hover {
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.4) !important;
    transform: translateY(-10px) scale(1.02);
}

.card-glow-emerald:hover {
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.4) !important;
    transform: translateY(-10px) scale(1.02);
}

.text-purple-glow {
    color: #a78bfa !important;
    filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.6));
}

.text-blue-glow {
    color: #60a5fa !important;
    filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.6));
}

.text-emerald-glow {
    color: #34d399 !important;
    filter: drop-shadow(0 0 8px rgba(52, 211, 153, 0.6));
}

/* Network Selection Buttons */
.network-btn {
    border: 1px solid var(--glass-border) !important;
    background: #ffffff !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative;
    overflow: hidden;
}

.network-btn:hover {
    transform: translateY(-5px);
    background: #f1f5f9 !important;
}

.btn-check:checked+.network-btn {
    border-width: 2px !important;
    transform: scale(1.05);
}

.network-label {
    color: #0f172a !important;
    /* Default dark */
}

/* Brand Specific Styles */
.network-btn-mtn {
    border-color: rgba(254, 240, 0, 0.2) !important;
}

.btn-check:checked+.network-btn-mtn {
    border-color: #fef000 !important;
    box-shadow: 0 0 25px rgba(254, 240, 0, 0.4);
    background: rgba(254, 240, 0, 0.05) !important;
}

.network-btn-mtn .fw-bold {
    color: #fef000 !important;
    text-shadow: 0 0 10px rgba(254, 240, 0, 0.3);
}

/* PERFECT TELECEL REPLICA */
.network-btn-telecel {
    border-color: rgba(239, 68, 68, 0.2) !important;
}

.network-btn-telecel .network-label {
    color: #ef4444 !important;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.network-btn-telecel .telecel-logo-circle {
    background-color: #ef4444;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
    font-size: 30px;
    line-height: 1;
    margin: auto;
}

.btn-check:checked+.network-btn-telecel {
    border-color: #ef4444 !important;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.05) !important;
}

.network-btn-at {
    border-color: rgba(59, 130, 246, 0.2) !important;
}

.btn-check:checked+.network-btn-at {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.05) !important;
}

.network-btn-at .fw-bold {
    color: #3b82f6 !important;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

/* Alias for AirtelTigo */
.network-btn-airteltigo {
    border-color: rgba(59, 130, 246, 0.2) !important;
}

.btn-check:checked+.network-btn-airteltigo {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.05) !important;
}

.network-btn-airteltigo .fw-bold {
    color: #3b82f6 !important;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.network-icon-container {
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.network-icon-container img {
    max-height: 45px;
    width: auto;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

.network-btn:hover .network-icon-container {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile Responsiveness for Main Site */
@media (max-width: 768px) {
    .welcome-section {
        padding: 30px 10px 10px 10px;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .welcome-section::after {
        display: none !important;
    }

    .welcome-title {
        font-size: 2.2rem !important;
        letter-spacing: -1px;
        word-wrap: break-word;
        line-height: 1.2;
    }

    .welcome-subtitle {
        font-size: 1rem;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    /* Ultra-Premium App-Like Mobile Grid */
    .mobile-premium-grid {
        margin-top: 5px !important;
    }

    .premium-mobile-card {
        padding: 40px 20px;
        border-radius: 28px;
        display: flex;
        flex-direction: column; /* Vertical layout: Icon on top */
        align-items: center;
        text-align: center;
        justify-content: center;
        background: var(--card-bg) !important; /* Professional Dark Blue */
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 20px rgba(124, 58, 237, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.1);
        position: relative;
        overflow: hidden;
        height: auto !important;
        min-height: 200px;
        margin-bottom: 12px;
    }

    .premium-mobile-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.1), transparent 50%);
        z-index: 0;
        pointer-events: none;
    }

    .premium-card-inner {
        position: relative;
        z-index: 1;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .mobile-icon {
        width: 70px !important;
        height: 70px !important;
        min-width: 70px !important;
        font-size: 26px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        margin-bottom: 25px !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
        border-radius: 20px !important;
        position: relative !important;
        left: 0 !important;
        top: 0 !important;
    }

    .lite-card-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .premium-mobile-card .card-title-lg {
        font-size: 1.05rem;
        font-weight: 700;
        margin-bottom: 4px;
        letter-spacing: -0.3px;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    .premium-mobile-card .card-text-muted {
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.6) !important;
        line-height: 1.2;
        max-width: 90%;
        margin: 0 auto;
    }

    .glass-input,
    .glass-select {
        font-size: 1rem;
        padding: 12px 20px;
    }

    .icon-circle {
        width: 60px;
        height: 60px;
        font-size: 24px;
        margin: 0 auto 20px;
        border-radius: 16px;
    }

    .card-title-lg {
        font-size: 1.3rem;
    }

    .btn-primary-purple {
        padding: 15px 20px;
        width: 100%;
        font-size: 1rem;
    }

    .lite-footer {
        padding: 30px 15px;
    }

    /* Mobile Table Scroll (Proper horizontal scrolling) */
    .table-responsive {
        border: none !important;
        background: transparent !important;
        overflow-x: auto !important;
        display: block !important;
        width: 100% !important;
        -webkit-overflow-scrolling: touch !important;
        margin-bottom: 1rem;
    }

    .table-responsive table {
        min-width: 800px !important; /* Force overflow */
        display: table !important; /* Ensure it stays a table */
    }

    .table-responsive tbody tr {
        display: table-row !important;
    }

    .table-responsive tbody td {
        display: table-cell !important;
        white-space: nowrap !important;
        padding: 1.2rem 1rem !important;
        text-align: left !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    }
}