:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--dark-color);
    margin: 0;
    padding: 0;
}

.navbar {
    /* background-color: var(--card-bg); */
    box-shadow: 0 .15rem 1.75rem 0 rgba(58,59,69,.15);
}

.navbar-brand {
    font-weight: 800;
    color: #fff !important;
    font-size: 1.5rem;
}

.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 .15rem 1.75rem 0 rgba(58,59,69,.15);
    transition: transform 0.2s;
    background-color: var(--card-bg);
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    background-color: var(--card-bg);
    border-bottom: 1px solid #e3e6f0;
    font-weight: 700;
    color: var(--primary-color);
    border-top-left-radius: 0.75rem !important;
    border-top-right-radius: 0.75rem !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 0.35rem;
    padding: 0.5rem 1rem;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--primary-color) 10%, #224abe 100%);
    color: white;
}

.sidebar .nav-link {
    color: rgba(255,255,255,.8);
    padding: 1rem;
    font-weight: 600;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255,255,255,.1);
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--info-color) 100%);
}

.login-card {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
}

.balance-card {
    background: linear-gradient(45deg, var(--primary-color), var(--info-color));
    color: white;
}

.balance-card .text-muted {
    color: rgba(255,255,255,0.8) !important;
}

/* Loader - Clean Cycle Only */
.loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: none;
}

.loader-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    box-shadow: none;
    margin-bottom: 10px;
}

.modern-spinner {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 5px solid transparent;
    border-top-color: var(--primary-color);
    border-right-color: var(--info-color);
    animation: spin 1s linear infinite;
}

.modern-spinner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 5px solid transparent;
    border-left-color: var(--primary-color);
    border-bottom-color: var(--info-color);
    opacity: 0.5;
    filter: blur(8px);
    animation: spin 1s linear infinite;
}

.modern-spinner::after {
    display: none;
}

.loader-logo-inner {
    display: block;
    width: 50px;
    height: auto;
    object-fit: contain;
    animation: pulse 1.5s infinite ease-in-out;
    z-index: 2;
}

.loader::after {
    content: none;
}

.loader p {
    display: block !important;
    margin: 0 !important;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

/* Modern Dropdown Style */
select.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 2px solid #eef2f7;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
}

select.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
    outline: none;
}

select.form-select option {
    padding: 10px;
    font-weight: normal;
}

/* Specific style for Data Price Dropdown to make it stand out */
#plan-select {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    font-size: 1.05rem;
}

#plan-select:hover {
    background-color: #fff;
    border-color: var(--primary-color);
}
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    object-fit: contain;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hover-scale { transition: transform 0.3s ease; } .hover-scale:hover { transform: scale(1.05); }

/* Modern Network Cards - Style 3 */
.network-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    position: relative;
    overflow: hidden;
}

.network-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.network-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.network-card:hover::after {
    transform: scaleX(1);
}

.network-card img {
    max-height: 55px;
    width: auto;
    transition: all 0.5s ease;
    filter: grayscale(0%);
}

.network-card:hover img {
    transform: scale(1.1) rotate(3deg);
}

/* --- MOBILE MODERNIZATION --- */

/* Bottom Navigation Bar (Mobile Only) */
.bottom-nav {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05); /* Soft shadow upwards */
    z-index: 1030; /* Above typical content, below modals */
    padding-bottom: env(safe-area-inset-bottom); /* iOS safe area */
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.bottom-nav-menu {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    list-style: none;
    margin: 0;
}

.bottom-nav-item {
    text-align: center;
    flex: 1;
}

.bottom-nav-link {
    color: #858796;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    transition: color 0.2s;
}

.bottom-nav-link i {
    font-size: 1.25rem;
    margin-bottom: 3px;
    transition: transform 0.2s;
}

.bottom-nav-link.active, .bottom-nav-link:hover {
    color: var(--primary-color);
    font-weight: 600;
}

.bottom-nav-link.active i {
    transform: translateY(-2px);
}

/* Floating Action Button (FAB) Style for Center Item */
.bottom-nav-item.fab-container {
    position: relative;
    top: -25px;
}

.bottom-nav-item.fab-container .bottom-nav-link {
    background: linear-gradient(135deg, var(--primary-color), #224abe);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(78, 115, 223, 0.4);
    border: 4px solid #fff; /* Blend with bg */
}

.bottom-nav-item.fab-container .bottom-nav-link i {
    font-size: 1.5rem;
    margin: 0;
}

/* Mobile Specific Adjustments */
@media (max-width: 768px) {
    .bottom-nav {
        display: block;
    }
    
    body {
        padding-bottom: 80px; /* Space for bottom nav */
    }

    /* Hide sidebar on mobile if we have bottom nav */
    .offcanvas.sidebar {
        display: none; /* Only use offcanvas for 'More' menu if needed */
    }

    /* Modern Card Tweaks for Mobile */
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card {
        border-radius: 16px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.03); /* Softer shadow */
        margin-bottom: 1rem;
    }

    /* Quick Actions Grid */
    .quick-action-item {
        background: #fff;
        border-radius: 16px;
        padding: 15px;
        text-align: center;
        box-shadow: 0 2px 5px rgba(0,0,0,0.02);
        border: 1px solid #f0f2f5;
        transition: transform 0.1s;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .quick-action-item:active {
        transform: scale(0.96);
        background-color: #f8f9fc;
    }

    .quick-action-icon {
        width: 45px;
        height: 45px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.4rem;
        margin-bottom: 8px;
    }
    
    /* Balance Card Refinement */
    .balance-card {
        border-radius: 20px;
        background: linear-gradient(135deg, var(--primary-color), #224abe);
        padding: 10px;
    }
    
    .balance-card .card-body {
        padding: 1.5rem;
    }
}


    .card {
        border-radius: 16px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.03); /* Softer shadow */
        margin-bottom: 1rem;
    }

    /* Quick Actions Grid */
    .quick-action-item {
        background: #fff;
        border-radius: 16px;
        padding: 15px;
        text-align: center;
        box-shadow: 0 2px 5px rgba(0,0,0,0.02);
        border: 1px solid #f0f2f5;
        transition: transform 0.1s;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .quick-action-item:active {
        transform: scale(0.96);
        background-color: #f8f9fc;
    }

    .quick-action-icon {
        width: 45px;
        height: 45px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.4rem;
        margin-bottom: 8px;
    }
    
    /* Balance Card Refinement */
    .balance-card {
        border-radius: 20px;
        background: linear-gradient(135deg, var(--primary-color), #224abe);
        padding: 10px;
    }
    
    .balance-card .card-body {
        padding: 1.5rem;
    }
}


/* Icon Background Utilities */
.bg-blue-light { background-color: rgba(78, 115, 223, 0.1); }
.bg-green-light { background-color: rgba(28, 200, 138, 0.1); }
.bg-yellow-light { background-color: rgba(246, 194, 62, 0.1); }
.bg-cyan-light { background-color: rgba(54, 185, 204, 0.1); }
.bg-purple-light { background-color: rgba(111, 66, 193, 0.1); }


/* Services Bottom Sheet logic */
.action-icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: transform 0.2s;
}

.action-icon-circle:active {
    transform: scale(0.9);
}

.text-purple { color: #6f42c1; }

/* Bottom Sheet Modal Animation & Position */
@media (max-width: 576px) {
    .bottom-sheet-modal .modal-dialog {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        max-width: 100%;
        transform: translate(0, 100%);
        transition: transform 0.3s ease-out;
    }
    
    .bottom-sheet-modal.show .modal-dialog {
        transform: translate(0, 0);
    }

    .bottom-sheet-modal .modal-content {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        border-top-left-radius: 24px;
        border-top-right-radius: 24px;
        border: none;
        padding-bottom: 20px; /* Safe area */
    }
}


/* Custom Utilities for Modern Balance Card */
.letter-spacing-1 {
    letter-spacing: 1px;
}
.backdrop-blur {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 8px;
        padding-right: 8px;
    }
    .balance-card {
        margin-top: 5px;
        margin-bottom: 20px;
    }
}


/* LARGE MODE DASHBOARD OVERRIDES */
.quick-action-icon {
    width: 60px !important;
    height: 60px !important;
    font-size: 1.75rem !important;
    border-radius: 16px !important;
    margin-bottom: 10px !important;
}

.quick-action-item {
    padding: 20px !important;
    border-radius: 20px !important;
}

.quick-action-item .small {
    font-size: 0.9rem !important;
}

.balance-card {
    border-radius: 24px !important;
    box-shadow: 0 10px 30px rgba(78, 115, 223, 0.3) !important;
}

@media (max-width: 768px) {
   .col-6 {
       /* Give the grid items a bit more breathing room on mobile */
       padding: 8px !important; 
   }
}

