/* ======== ড্যাশবোর্ড লেআউট ======== */
body {
    background-color: #f4f7f6;
    overflow-x: hidden;
}

#dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ======== সাইডবার (বাম পাশের মেনু) ======== */
#sidebar {
    width: 260px;
    background: var(--dark-bg, #1a1e25);
    color: #fff;
    transition: all 0.3s;
    position: fixed;
    height: 100%;
    z-index: 1000;
    left: -260px;
}

#sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    background: rgba(0,0,0,0.2);
    text-align: center;
}

.sidebar-header .navbar-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.8rem;
}

#sidebar ul.components {
    padding: 20px 0;
    border-bottom: 1px solid #47748b;
}

#sidebar ul p {
    color: #fff;
    padding: 10px 20px;
    font-weight: 600;
}

#sidebar ul li a {
    padding: 15px 20px;
    font-size: 1.1em;
    display: block;
    color: #adb5bd;
    text-decoration: none;
    transition: all 0.3s;
}

#sidebar ul li a:hover {
    color: #fff;
    background: var(--primary-color, #007bff);
}

#sidebar ul li.active > a,
a[aria-expanded="true"] {
    color: #fff;
    background: var(--primary-color, #007bff);
}

/* ======== কন্টেন্ট এরিয়া (ডান পাশ) ======== */
#content {
    width: 100%;
    min-height: 100vh;
    transition: all 0.3s;
    position: absolute;
    top: 0;
    right: 0;
    padding-left: 0;
}

#content.sidebar-active {
    padding-left: 260px;
}

/* ======== টপ নেভিগেশন বার ======== */
.topbar {
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

#sidebarCollapse {
    background: var(--gradient, linear-gradient(90deg, #007bff, #19a18f));
    border: none;
    color: #fff;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
}

/* টপবার ব্যালেন্স */
.topbar-balance {
    display: flex;
    align-items: center;
    background: #f4f7f6;
    border-radius: 20px;
    padding: 5px 15px;
    margin-right: 15px;
    border: 1px solid #e0e0e0;
}
.topbar-balance i {
    color: var(--primary-color, #007bff);
    font-size: 1.2rem;
    margin-right: 8px;
}
.topbar-balance .balance-amount {
    font-weight: 700;
    color: #333;
    font-size: 0.95rem;
}

/* প্রোফাইল ড্রপডাউন */
.profile-dropdown {
    position: relative;
}

.profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--primary-color);
}

.dropdown-menu-custom {
    display: none;
    position: absolute;
    right: 0;
    top: 50px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    width: 200px;
    z-index: 1050;
    animation: fadeIn 0.2s ease-out;
}

.dropdown-menu-custom.show {
    display: block;
}

.dropdown-header {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}
.dropdown-header .username {
    font-weight: 700;
    color: #333;
    margin: 0;
}
.dropdown-header .email {
    font-size: 0.8rem;
    color: #777;
    margin: 0;
    word-break: break-all;
}

.dropdown-menu-custom a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
}
.dropdown-menu-custom a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    color: #777;
}

.dropdown-menu-custom a:hover {
    background: #f4f7f6;
}
.dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 5px 0;
}
.dropdown-menu-custom a.logout {
    color: #dc3545;
}

/* ড্যাশবোর্ডের মূল কন্টেন্ট */
.main-content {
    padding: 20px;
}

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

/* ======== Statistics পেজের স্টাইল ======== */
.stats-tabs .nav-link {
    background-color: #fff;
    border: 1px solid #dee2e6;
    color: var(--dark-text, #333);
    margin: 0 5px;
    font-weight: 600;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
}
.stats-tabs .nav-link:hover {
    background-color: #f4f7f6;
}
.stats-tabs .nav-link.active {
    background: var(--gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}
.stats-table {
    font-size: 0.9rem;
}
.stats-table thead th {
    color: #6c757d;
    font-weight: 600;
    border-bottom-width: 2px;
    vertical-align: middle;
}
.stats-table tbody td {
    vertical-align: middle;
}

/* ======== লাইভ ফিড হরাইজন্টাল স্ক্রলার ======== */
#live-feed-scroller-container {
    width: 100%;
    background: #fff;
    padding: 10px 0;
    border-bottom: 1px solid #dee2e6;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}
#live-feed-scroller-container::-webkit-scrollbar {
    height: 5px;
}
#live-feed-scroller-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 5px;
}
#live-feed-scroller-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.live-feed-item {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    padding: 5px 12px;
    margin-left: 10px;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    cursor: default;
}
.live-feed-item:last-child {
    margin-right: 10px;
}
.live-feed-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}
.live-feed-item .icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-right: 8px;
    font-size: 0.9rem;
}
.live-feed-item.withdrawal .icon {
    background-color: var(--secondary-color, #19a18f); 
}
.live-feed-item.offer .icon {
    background-color: var(--primary-color, #007bff); 
}
.live-feed-item .details {
    line-height: 1.3;
}
.live-feed-item .username {
    font-weight: 700;
    color: #333;
    display: block;
}
.live-feed-item .action {
    color: #555;
}

/* ======== ফিক্সড চ্যাট বাটন ======== */
#chat-toggle-button {
    position: fixed;
    top: 50%; 
    transform: translateY(-50%);
    right: 20px;
    bottom: auto;
    width: 60px;
    height: 60px;
    background: var(--gradient);
    color: #fff;
    border-radius: 50%;
    border: none;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 1040;
    cursor: pointer;
    transition: all 0.3s ease;
}
#chat-toggle-button:hover {
    transform: translateY(-50%) scale(1.1);
}
#chat-toggle-button i.fa-comments {
    display: block;
}
#chat-toggle-button.active i.fa-comments {
    display: none;
}
#chat-toggle-button i.fa-times {
    display: none;
}
#chat-toggle-button.active i.fa-times {
    display: block;
}

/* ======== চ্যাট বক্স কন্টেইনার ======== */
#chat-box-container {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    right: 90px;
    bottom: auto;
    width: 350px;
    height: 450px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 1030;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-50%) scale(0.95);
    visibility: hidden;
    transition: all 0.2s ease-out;
}
#chat-box-container.active {
    opacity: 1;
    transform: translateY(-50%) scale(1);
    visibility: visible;
}
.chat-header {
    background: var(--gradient);
    color: #fff;
    padding: 15px;
    font-weight: 600;
    font-size: 1.2rem;
    text-align: center;
    flex-shrink: 0;
}
.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
}
.chat-message {
    display: flex;
    margin-bottom: 15px;
    max-width: 90%;
}
.chat-message.is-self {
    align-self: flex-end;
}
.chat-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}
.chat-message.is-self .chat-avatar {
    margin-right: 0;
    margin-left: 10px;
    order: 2;
}
.chat-message-content {
    background: #f1f1f1;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.9rem;
    word-break: break-word;
}
.chat-message.is-self .chat-message-content {
    background: var(--primary-color, #007bff);
    color: #fff;
}
.message-author {
    font-weight: 700;
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
}
.chat-message.is-self .message-author {
    color: #f0f0f0;
}
.verified-badge {
    color: #0d6efd;
    font-size: 0.8rem;
    margin-left: 4px;
}
.chat-form {
    display: flex;
    border-top: 1px solid #eee;
    padding: 10px;
    background: #fff;
    flex-shrink: 0;
}
.chat-form input {
    flex-grow: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 0.9rem;
    margin-right: 8px;
}
.chat-form button {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--primary-color, #007bff);
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}


/* ======== *** নতুন: Features Offer Scroller CSS *** ======== */
.offer-scroller-container {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding: 10px 5px; /* কার্ডের ছায়ার জন্য সামান্য প্যাডিং */
}

/* স্ক্রলবার হাইড (ঐচ্ছিক) */
.offer-scroller-container::-webkit-scrollbar {
    height: 8px;
}
.offer-scroller-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 5px;
}

.feature-offer-card {
    display: inline-block; /* এক লাইনে দেখানোর জন্য */
    width: 200px; /* প্রতিটি কার্ডের প্রস্থ */
    vertical-align: top;
    margin-left: 15px;
    background: #fff;
    border-radius: 12px; /* আপনার রিকুয়েস্ট অনুযায়ী রাউন্ড কর্ণার */
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden; /* ইমেজের কর্ণার ঠিক রাখার জন্য */
}
.feature-offer-card:last-child {
    margin-right: 15px;
}
.feature-offer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

.feature-offer-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-bottom: 1px solid #f0f0f0;
}

.feature-offer-details {
    padding: 10px 15px;
}

.feature-offer-name {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    /* লম্বা নাম হলে ... দিয়ে কেটে যাবে */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feature-offer-payout {
    font-weight: 700;
    color: var(--primary-color, #007bff);
    font-size: 1rem;
    margin-top: 5px;
}
/* ======== *** সেকশন শেষ *** ======== */


/* ======== *** নতুন: Offer Modal Box CSS *** ======== */
#offerModal .modal-content {
    border-radius: 15px;
    border: none;
}
#offerModal .modal-header {
    border-bottom: none;
    padding: 1rem 1.5rem;
}
#offerModal .modal-title {
    font-weight: 700;
    color: var(--primary-color);
}
#offerModal .modal-body {
    padding: 0 1.5rem 1.5rem 1.5rem;
}
#offerModalDescription {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
}
#offerModalInfo {
    list-style: none;
    padding-left: 0;
}
#offerModalInfo li {
    font-size: 1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}
#offerModalInfo li i {
    color: var(--secondary-color);
    margin-right: 10px;
    width: 20px;
}
#offerModalStartButton {
    font-size: 1.1rem;
    padding: 10px;
}
/* ======== *** সেকশন শেষ *** ======== */


/* মিডিয়া কোয়েরি (মোবাইল) */
@media (max-width: 768px) {
    #content.sidebar-active {
        position: relative;
    }
    #overlay {
        display: none;
        position: fixed;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.7);
        z-index: 999;
        opacity: 0;
        transition: all 0.5s;
    }
    #overlay.active {
        display: block;
        opacity: 1;
    }
    .topbar-balance {
        display: none; 
    }
    #chat-box-container {
        width: calc(100vw - 20px);
        right: 10px;
        top: auto;
        bottom: 80px;
        height: 400px;
        transform: translateY(0);
    }
    #chat-box-container.active {
        transform: translateY(0);
    }
    #chat-toggle-button {
        top: auto;
        bottom: 10px;
        right: 10px;
        transform: translateY(0);
    }
    #chat-toggle-button:hover {
        transform: scale(1.1);
    }
}
