/* === GOOGLE FONT & BASIC SETUP === */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #0d6efd;
    --secondary-color: #198754;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --text-dark: #212529;
    --text-light: #6c757d;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Hind Siliguri', sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--text-dark);
}

.container {
    padding: 80px 15px 80px; /* Add padding for header and bottom nav */
}


/* === USER-FACING STYLES (LOGIN, REGISTER, DASHBOARD) === */
.header { display: flex; justify-content: space-between; align-items: center; padding: 10px 15px; background-color: #2196F3; color: var(--white); position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; }
.header-title { font-size: 20px; font-weight: 600; }
.icon-btn { background: none; border: none; color: var(--white); font-size: 20px; cursor: pointer; }
.power-btn { background-color: var(--danger-color); padding: 5px 10px; border-radius: 6px; }

.auth-container { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; }
.auth-card { background: var(--white); padding: 30px; border-radius: 12px; box-shadow: var(--shadow); width: 100%; max-width: 400px; text-align: center; }
.auth-card h2 { font-size: 24px; margin-bottom: 8px; color: var(--primary-color); }
.input-group { text-align: left; margin-bottom: 16px; }
.input-group label { display: block; margin-bottom: 6px; font-weight: 500; }
.input-group input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 16px; }
.btn-auth { width: 100%; padding: 14px; background-color: var(--primary-color); color: var(--white); border: none; border-radius: 8px; font-size: 16px; cursor: pointer; }
.auth-switch { margin-top: 20px; }
.auth-switch a { color: var(--primary-color); text-decoration: none; font-weight: 500; }
.alert { padding: 12px; margin-bottom: 15px; border-radius: 8px; }
.alert.success { background-color: #d1e7dd; color: #0f5132; }
.alert.error { background-color: #f8d7da; color: #842029; }

.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; background: var(--white); display: flex; justify-content: space-around; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); z-index: 1000; padding: 5px 0; }
.nav-item { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--text-light); padding: 5px; }
.nav-item i { font-size: 20px; }
.nav-item span { font-size: 12px; margin-top: 4px; }
.nav-item.active { color: var(--primary-color); }
/* === HOME PAGE SERVICES GRID & ICONS === */

.quick-icons {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.icon-item {
    font-size: 24px;
    color: var(--text-light);
    text-decoration: none;
}
.notice-bar {
    background-color: var(--danger-color);
    color: var(--white);
    padding: 8px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* এক লাইনে তিনটি আইটেম দেখাবে */
    gap: 15px;
}
.service-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    padding: 15px;
    transition: transform 0.2s;
}
.service-card:hover {
    transform: translateY(-5px);
}
.service-card img {
    max-width: 50px; /* ছবির সর্বোচ্চ প্রস্থ */
    height: auto;
    margin-bottom: 10px;
}
.service-card p {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}
/* To remove underline from service card links */
.service-link {
    text-decoration: none;
    color: inherit;
}
/* === NEW ADMIN PANEL DESIGN (Dark Sidebar) === */
.admin-wrapper {
    display: flex;
    background-color: var(--light-bg);
}
/* --- এই অংশটুকু পরিবর্তন করুন --- */

.sidebar {
    position: fixed;
    top: 0;
    left: -280px; /* মোবাইলে প্রথমে লুকানো থাকবে */
    width: 260px;
    height: 100%;
    z-index: 1001;
    transition: left 0.3s ease-in-out;
    display: flex; /* এই লাইনটি জরুরি */
    flex-direction: column; /* এই লাইনটি জরুরি */
}
.sidebar.dark-theme {
    background-color: #212529;
    color: #adb5bd;
}
.sidebar-profile {
    /* এখানে কোনো পরিবর্তন নেই */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 15px;
    border-bottom: 1px solid #343a40;
}
.profile-pic { font-size: 50px; color: #fff; margin-bottom: 10px; }
.profile-name { font-weight: 600; color: #fff; }

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto; /* এই লাইনটি স্ক্রল যুক্ত করবে */
    flex-grow: 1; /* এই লাইনটি জরুরি */
}
.sidebar ul li a {
    /* এখানে কোনো পরিবর্তন নেই */
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #adb5bd;
    text-decoration: none;
    transition: all 0.2s;
}

/* --- পরিবর্তন এই পর্যন্ত --- */
.main-content { 
    width: 100%;
    transition: margin-left 0.3s ease-in-out; 
}
.main-header {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--white); padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky; top: 0; z-index: 100;
}
.header-left { display: flex; align-items: center; }
.page-title { margin: 0; font-size: 22px; }
.menu-btn { background: none; border: none; font-size: 22px; cursor: pointer; margin-right: 15px; }
.content-body { padding: 25px; }

.dashboard-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.card { color: var(--white); padding: 25px; border-radius: 8px; box-shadow: var(--shadow); }
.card.blue { background: linear-gradient(45deg, #0d6efd, #3c8cff); }
.card.green { background: linear-gradient(45deg, #198754, #28a745); }
.card.orange { background: linear-gradient(45deg, #fd7e14, #ff9b45); }
.card.red { background: linear-gradient(45deg, #dc3545, #ea5a68); }
.card h4 { font-size: 16px; margin-bottom: 10px; font-weight: 500; }
.card p { font-size: 30px; font-weight: 700; }

.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.3s ease; }
.overlay.show { opacity: 1; visibility: visible; }

/* Responsive Design for Admin Panel */
@media (min-width: 992px) {
    .sidebar { left: 0; }
    .main-content { margin-left: 260px; }
    .menu-btn { display: none; } /* Hide menu button on desktop */
}
@media (max-width: 991.98px) {
    .sidebar.open { left: 0; }
    .main-content.shifted { margin-left: 0; } /* Keep main content in place */
}
/* === ADD FUND PAGE STYLES (New Design) === */
.add-fund-wrapper { display: flex; flex-direction: column; gap: 20px; }
.section-card { background: var(--white); padding: 20px; border-radius: 12px; box-shadow: var(--shadow); }
.section-title { font-size: 18px; font-weight: 600; margin-bottom: 20px; color: var(--text-dark); border-bottom: 1px solid #eee; padding-bottom: 10px; }

/* New Payment Method Selection Style */
.payment-method-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* এক লাইনে তিনটি আইটেম দেখাবে */
    gap: 10px; /* আইটেমগুলোর মধ্যে ফাঁকা জায়গা */
}
.payment-card {
    display: flex;
    flex-direction: row; /* লোগো এবং লেখা পাশাপাশি থাকবে */
    align-items: center;
    justify-content: center;
    padding: 12px 5px; /* বাটনের ভেতরের প্যাডিং */
    border: 1px solid #ddd; /* হালকা বর্ডার */
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}
.payment-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}
.payment-card img {
    height: 25px; /* লোগোর সাইজ ছোট করা হয়েছে */
    margin-right: 8px; /* লোগো এবং লেখার মধ্যে ফাঁকা জায়গা */
}
.payment-card span {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}
.payment-card.active {
    border-width: 2px;
    background-color: #eaf2ff;
}
.payment-card.active.bkash { border-color: #d82a77; }
.payment-card.active.nagad { border-color: #f58220; }
.payment-card.active.rocket { border-color: #8a2be2; }

/* Form Container Styles */
.instructions { margin-bottom: 20px; padding: 15px; background-color: #f8f9fa; border-radius: 8px; text-align: center; }
.merchant-number-box { margin-top: 10px; padding: 10px; background: #ffebee; border-radius: 6px; font-size: 18px; font-weight: 700; color: #c62828; letter-spacing: 1px; }

/* === FUND MANAGEMENT BUTTONS === */
.btn-approve, .btn-reject { color: white; padding: 6px 12px; border-radius: 5px; font-size: 14px; border: none; cursor: pointer; }
.btn-approve { background-color: #28a745; }
.btn-reject { background-color: #dc3545; }


/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .sidebar { left: -280px; width: 280px; }
    .main-content.shifted { margin-left: 0; }
    .overlay.show { visibility: visible; }
}

/* === USER BALANCE CARD STYLE === */
.balance-card {
    background: linear-gradient(45deg, #0d6efd, #3c8cff);
    color: #ffffff;
    padding: 20px;
    border-radius: 12px;
    text-align: center !important; /* !important যোগ করা হয়েছে */
    margin-bottom: 20px;
    box-shadow: 0 8px 16px rgba(0, 123, 255, 0.2);
}
.balance-card small {
    font-size: 14px;
    opacity: 0.9;
    display: block;
    margin-bottom: 5px;
}
.balance-card h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
}
/* === MOBILE RECHARGE PAGE STYLES === */
.recharge-wrapper .section-card { margin-bottom: 20px; }
.operator-options {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 10px;
}
.operator-options label {
    cursor: pointer;
    padding: 5px;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.2s;
}
.operator-options input[type="radio"] {
    display: none; /* Hide the actual radio button */
}
.operator-options img {
    height: 35px;
    width: 35px;
    object-fit: contain;
}
.operator-options input[type="radio"]:checked + img {
    transform: scale(1.2);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
}

.recharge-type-options {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}


/* === REGULAR OFFER PAGE STYLES === */
.operator-filter {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 10px;
    background-color: var(--white);
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}
.op-filter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    padding: 5px;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.2s;
    text-decoration: none;
}
.op-filter-btn img {
    height: 35px;
    width: 35px;
    object-fit: contain;
}
.op-filter-btn.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
}

.offer-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}
.offer-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    flex-direction: column;
    border-left: 5px solid var(--secondary-color);
}
.offer-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}
.offer-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.price-tag {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
}
.price-tag s {
    font-size: 16px;
    color: var(--text-light);
    margin-right: 8px;
}
.validity-tag {
    background-color: #e9ecef;
    color: var(--text-dark);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.buy-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: auto;
}

/* === MODAL (POP-UP) STYLES === */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
}
.modal-content {
    background-color: #fefefe;
    margin: 40% auto;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
}
.close-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}


/* === BKASH SERVICE MENU STYLES (Improved Design) === */
.service-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 15px; 
    margin-top: 20px;
}

.service-menu-item {
    background: var(--white);
    padding: 25px 15px; 
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    cursor: pointer;
    border: 1px solid #eee;
    transition: all 0.2s ease-in-out;
}

.service-menu-item:hover {
    transform: translateY(-5px);
    background-color: #eaf2ff;
    border-color: var(--primary-color);
}

.service-menu-item i {
    font-size: 32px; /* আইকন বড় করা হয়েছে */
    color: var(--primary-color);
    margin-bottom: 15px; 
    display: block;
}

.service-menu-item span {
    font-weight: 600;
    font-size: 16px; /* লেখা বড় করা হয়েছে */
    color: var(--text-dark);
}

/* === HISTORY PAGE STYLES === */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.history-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 5px solid var(--primary-color);
}
.history-details {
    flex-grow: 1;
}
.history-type {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}
.history-info {
    font-size: 14px;
    color: var(--text-light);
    margin: 4px 0;
}
.history-date {
    font-size: 12px;
    color: #999;
}
.history-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.history-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

/* === PROFILE PAGE STYLES === */
.profile-header-card {
    text-align: center;
    padding-top: 30px;
    padding-bottom: 30px;
}
.profile-avatar {
    font-size: 80px;
    color: var(--primary-color);
    margin-bottom: 10px;
}
.profile-header-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}
.profile-header-card p {
    color: var(--text-light);
    margin-bottom: 20px;
}
.profile-stats {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 20px;
}
.profile-stats div {
    display: flex;
    flex-direction: column;
}
.profile-stats span {
    font-size: 14px;
    color: var(--text-light);
}
.profile-stats strong {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

.btn-logout {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px;
    background-color: var(--danger-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    margin-top: 20px;
}

.status-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 20px;
    color: #fff;
}
.status-badge.status-pending {
    background-color: #ffc107; /* Yellow */
}
.status-badge.status-approved {
    background-color: #28a745; /* Green */
}
.status-badge.status-rejected {
    background-color: #dc3545; /* Red */
}

