/**
 * Dashboard Styles
 * DataOcean - Professional Data Selling Platform
 */

/* Top Orange Bar */
.top-orange-bar {
    height: 4px;
    background: linear-gradient(135deg, #f6721a 0%, #e55a00 100%);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
}

:root {
    --header-height: 64px;
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #011236 0%, #001122 100%);
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}
.sidebar::-webkit-scrollbar {
    width: 0; /* Chrome, Safari, Opera */
    height: 0;
}

/* Ensure sidebar is visible when open - High specificity */
.dashboard-layout .sidebar.open {
    transform: translateX(0) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    left: 0 !important;
    top: 0 !important;
    position: fixed !important;
    z-index: 1000 !important;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ff6600;
    white-space: nowrap;
}

.sidebar-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: none; /* Hidden on desktop by default */
    align-items: center;
    justify-content: center;
    position: relative;
}

.sidebar-close-btn:hover {
    background: rgba(255, 107, 53, 0.3);
    border-color: rgba(255, 107, 53, 0.5);
    transform: scale(1.1);
}

.sidebar-close-btn:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .sidebar-close-btn {
        display: flex !important;
    }
}

/* User Profile in Sidebar */
.user-profile {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff6600 0%, #e55a00 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.user-role {
    font-size: 0.875rem;
    color: #bdc3c7;
    text-transform: capitalize;
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
}

.nav-item.active {
    background-color: rgba(255, 102, 0, 0.2);
    color: var(--primary-orange);
    border-left-color: var(--primary-orange);
}

.nav-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-text {
    font-weight: 500;
}

/* Main Content - Desktop */
@media (min-width: 769px) {
    .main-content {
        flex: 1;
        margin-left: 280px;
        background-color: #f8f9fa;
        min-height: 100vh;
        width: calc(100% - 280px);
        padding-top: calc(var(--header-height) + 8px);
    }
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        width: 100%;
        padding-top: calc(var(--header-height) + 8px);
        transition: margin-left 0.3s ease, width 0.3s ease;
    }
    
    .top-header {
        left: 0 !important;
        width: 100% !important;
        transition: left 0.3s ease, width 0.3s ease;
    }
    
    /* When sidebar is open on mobile, push content to the right */
    body.sidebar-open-mobile .main-content {
        margin-left: 280px !important;
        width: calc(100% - 280px) !important;
    }
    
    body.sidebar-open-mobile .top-header {
        left: 280px !important;
        width: calc(100% - 280px) !important;
    }
    
    /* Ensure the push effect works with higher specificity */
    .dashboard-layout.sidebar-open-mobile .main-content {
        margin-left: 280px !important;
        width: calc(100% - 280px) !important;
    }
    
    .dashboard-layout.sidebar-open-mobile .top-header {
        left: 280px !important;
        width: calc(100% - 280px) !important;
    }
}

/* Top Header - Desktop */
@media (min-width: 769px) {
    .top-header {
        position: fixed !important;
        top: 0 !important;
        left: 280px !important;
        right: 0 !important;
        width: calc(100% - 280px) !important;
        z-index: 1 !important;
        background: white;
        padding: 1rem 2rem;
        padding-top: calc(1rem + 4px);
        height: calc(var(--header-height) + 4px);
        border-bottom: 1px solid #e9ecef;
        display: flex;
        justify-content: space-between;
        align-items: center;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        border-top: 4px solid #FF6600;
    }
}

/* Top Header - Mobile */
@media (max-width: 768px) {
    .top-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1 !important;
        background: white;
        padding: 1rem 2rem;
        padding-top: calc(1rem + 4px);
        height: calc(var(--header-height) + 4px);
        border-bottom: 1px solid #e9ecef;
        display: flex;
        justify-content: space-between;
        align-items: center;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        border-top: 4px solid #FF6600;
        transition: left 0.3s ease, width 0.3s ease;
    }
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    justify-content: space-between;
}

/* Ensure avatar is positioned correctly */
.header-left .user-avatar-small {
    order: 3;
    margin-left: auto;
}

.header-center {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.header-center h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto; /* ensure avatar sits to the right */
}

/* Ensure avatar is visible on desktop */
@media (min-width: 769px) {
    .user-avatar-small {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 1002 !important;
        background: linear-gradient(135deg, #ff6600 0%, #e55a00 100%) !important;
        width: 45px !important;
        height: 45px !important;
        border-radius: 50% !important;
        color: white !important;
        font-weight: bold !important;
        font-size: 1rem !important;
        box-shadow: 0 2px 8px rgba(255, 102, 0, 0.3) !important;
        border: 2px solid white !important;
    }
    
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .header-center {
        display: flex !important;
        justify-content: flex-start !important;
    }
    
    .header-center h1 {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        text-align: left !important;
    }
}

/* Force avatar visibility on all screen sizes */
.user-avatar-small {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: linear-gradient(135deg, #ff6600 0%, #e55a00 100%) !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    color: white !important;
    font-weight: bold !important;
    font-size: 1rem !important;
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.3) !important;
    border: 2px solid white !important;
    position: relative !important;
    z-index: 1002 !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
    transition: transform 0.2s ease !important;
}

.user-avatar-small:hover {
    transform: scale(1.05) !important;
}

.btn-new-order {
    background: linear-gradient(135deg, #ff6600 0%, #e55a00 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease;
}

.btn-new-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

.btn-add-funds {
    background: linear-gradient(135deg, #011236 0%, #001122 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease;
}

.btn-add-funds:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(1, 18, 54, 0.3);
}

.user-menu {
    position: relative;
}

.user-avatar-small {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #ff6600 0%, #e55a00 100%);
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease;
    position: relative;
    z-index: 1002;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.3);
    border: 2px solid white;
}

.user-avatar-small:hover {
    transform: scale(1.05);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 250px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.dropdown-header .user-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.dropdown-header .user-email {
    font-size: 0.875rem;
    color: #6c757d;
}

.dropdown-divider {
    height: 1px;
    background: #e9ecef;
    margin: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #2c3e50;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    text-decoration: none;
    color: #2c3e50;
}

.dropdown-item.logout:hover {
    background-color: #fee;
    color: #dc3545;
}

.dropdown-icon {
    font-size: 1rem;
}

/* Dashboard Stats */
.dashboard-stats {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        padding: 1.5rem;
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        padding: 1rem;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        padding: 1rem;
        gap: 0.75rem;
    }
}

.stat-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    min-height: 80px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6600 0%, #e55a00 100%);
}

@media (max-width: 768px) {
    .stat-card {
        padding: 1rem;
        min-height: 70px;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .stat-card {
        padding: 0.75rem;
        min-height: 60px;
        gap: 0.5rem;
        border-radius: 8px;
    }
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.stat-card:active {
    transform: translateY(-1px) scale(1.01);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #ff6600 0%, #e55a00 100%);
    color: white;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .stat-icon {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
        border-radius: 6px;
    }
}

.wallet-card .stat-icon {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.spent-card .stat-icon {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.delivered-card .stat-icon {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

.pending-card .stat-icon {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #7f8c8d;
    font-weight: 500;
}

@media (max-width: 768px) {
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .stat-value {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
}

/* Dashboard Content */
.dashboard-content {
    padding: 0 2rem 2rem;
}

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

.content-card {
    background: linear-gradient(145deg, #ffffff 0%, #fdfdfd 100%);
    border-radius: 16px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.content-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.12);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.card-body {
    padding: 0;
}

/* Orders Table */
.table-container {
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.orders-table th,
.orders-table td {
    padding: 0.6rem 0.6rem;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.orders-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #f1f3f4;
    font-size: 0.875rem;
}

.orders-table tbody tr:hover {
    background-color: #f8f9fa;
}

.network-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    background: #ffeb3b;
    color: #f57f17;
}

.network-telecel {
    background: #e3f2fd;
    color: #1976d2;
}

.network-airteltigo {
    background: #fce4ec;
    color: #c2185b;
}

.status-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-delivered {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-pending {
    background: #fff3e0;
    color: #f57c00;
}

.status-failed {
    background: #ffebee;
    color: #d32f2f;
}

/* Transactions List */
.transactions-list {
    max-height: 400px;
    overflow-y: auto;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f3f4;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-info {
    flex: 1;
}

.transaction-type {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.transaction-date {
    font-size: 0.75rem;
    color: #7f8c8d;
}

.transaction-amount {
    font-weight: 700;
    font-size: 0.875rem;
}

.transaction-credit {
    color: #27ae60;
}

.transaction-debit {
    color: #e74c3c;
}

/* Loading States */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #f39c12;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-row {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
}

.loading-item {
    padding: 2rem;
    text-align: center;
    color: #7f8c8d;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #011236;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    z-index: 1300; /* above header content */
}

.mobile-menu-toggle:hover {
    background-color: rgba(1, 18, 54, 0.1);
}

/* Floating Chat Button */
.floating-chat-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--primary-blue);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
}

.floating-chat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

.chat-icon {
    font-size: 1.5rem;
    color: white;
}

/* Show floating chat button on mobile */
@media (max-width: 768px) {
    .floating-chat-btn {
        display: flex;
    }
}

/* Chat Modal */
.chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.chat-modal.show {
    display: flex;
}

.chat-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    height: 80%;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.chat-header {
    background: var(--primary-blue);
    color: #ffffff;
    padding: 1rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
}

.message-content {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.bot-message .message-content {
    background: #ffffff;
    color: #000000;
    border: 1px solid #e5e7eb;
}

.user-message .message-content {
    background: var(--primary-blue);
    color: #ffffff;
}

.message-time {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
    text-align: right;
}

.bot-message .message-time {
    text-align: left;
}

.chat-input-container {
    padding: 1rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 0.5rem;
}

#chat-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
}

#chat-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(1, 17, 54, 0.2);
}

.chat-send {
    background: var(--primary-blue);
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s;
}

.chat-send:hover {
    transform: translateY(-1px);
}

/* Payment Method Options */
.payment-method-options {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    flex: 1;
}

.payment-option:hover {
    background-color: #f8f9fa;
}

.payment-option input[type="radio"] {
    display: none; /* Hide the default radio button */
}

.payment-option span {
    margin-left: 10px;
    font-weight: 500;
}

.payment-option input[type="radio"]:checked + span {
    color: var(--primary-blue);
}

.payment-option input[type="radio"]:checked + span::before {
    content: '✔';
    margin-right: 8px;
    color: var(--primary-blue);
}

.payment-option.selected {
    background-color: #e9f2ff;
    border-color: var(--primary-blue);
}

/* Desktop chat modal */
@media (min-width: 769px) {
    .chat-modal-content {
        width: 400px;
        height: 500px;
    }
}

/* Mobile Layout Styles */
.mobile-welcome {
    display: block;
    background: white;
    padding: 1.5rem 2rem;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.mobile-welcome h2 {
    font-size: 1.5rem;
    margin: 0;
    color: #011236;
    font-weight: 600;
}

.mobile-actions {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin: 0;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.mobile-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: white;
    min-height: 60px;
}

.mobile-action-btn.new-order {
    background: linear-gradient(135deg, #FF6600 0%, #ff8533 100%);
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

.mobile-action-btn.add-funds {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.mobile-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.mobile-action-btn .btn-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 1.2rem;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: flex-start;
}

.logo-small {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #FF6600 0%, #ff8533 100%);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-welcome {
        display: block !important;
        flex-direction: column !important;
        text-align: center !important;
        padding: 2rem 1rem !important;
    }
    
    .mobile-welcome h2 {
        margin-bottom: 1.5rem !important;
    }
    
    .mobile-actions {
        flex-direction: column !important;
        max-width: 300px;
        margin: 0 auto !important;
    }
    
    .header-center {
        display: flex;
    }
    
    .user-avatar-small {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.mobile-overlay.show {
    display: block;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .sidebar {
        width: 250px;
    }
    
    .main-content {
        margin-left: 250px;
    }
}

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

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 280px;
    }
    
    .sidebar.open {
        transform: translateX(0) !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        left: 0 !important;
        top: 0 !important;
    }
    
    /* Mobile Overlay */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    
    .mobile-overlay.show {
        opacity: 1;
        visibility: visible;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .top-header {
        padding: 1rem;
        background: white;
        border-bottom: 1px solid #dee2e6;
    }
    
    .header-left {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 1rem;
    }
    
    .header-left h1 {
        font-size: 1.25rem;
        margin: 0;
    }
    
    .header-right {
        display: none;
    }
    
    .btn-new-order,
    .btn-add-funds {
        flex: 1;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        max-width: 150px;
    }
    
    .user-menu { position: relative; top: auto; right: auto; }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .content-card {
        margin: 0.5rem 0;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .orders-table {
        font-size: 0.875rem;
    }
    
    .orders-table th,
    .orders-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .transaction-item {
        padding: 1rem;
    }
    
    .user-dropdown {
        right: -50px;
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .top-header {
        padding: 0.75rem;
        position: fixed;
        top: 4px;
        left: 0;
        right: 0;
        z-index: 1000;
    }
    
    .header-left {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 1rem;
        margin-bottom: 1rem;
    }
    
    .header-left h1 {
        font-size: 1.1rem;
        margin: 0;
        flex: 1;
    }
    
    .header-right {
        display: flex;
        gap: 0.5rem;
        justify-content: center;
        width: 100%;
    }
    
    .btn-new-order,
    .btn-add-funds {
        flex: 1;
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .btn-new-order .btn-icon,
    .btn-add-funds .btn-icon {
        margin-right: 0.25rem;
    }
    
    .user-menu {
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
    }
    
    .stat-card {
        padding: 0.75rem;
        text-align: center;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .sidebar-header {
        padding: 1rem;
    }
    
    .user-profile {
        padding: 1rem;
    }
    
    .nav-item {
        padding: 1rem;
    }
    
    .orders-table {
        font-size: 0.75rem;
    }
    
    .orders-table th,
    .orders-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .network-badge,
    .status-badge {
        font-size: 0.625rem;
        padding: 0.125rem 0.5rem;
    }
    
    .transaction-item {
        padding: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .transaction-amount {
        align-self: flex-end;
    }
    
    .user-dropdown {
        right: 0;
        left: auto;
        min-width: 180px;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
        max-height: 90vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .profile-avatar-section {
        padding: 1rem;
        text-align: center;
    }
    
    .profile-stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .security-item {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .security-status {
        width: 100%;
        justify-content: space-between;
    }
}

/* Extra small devices */
@media (max-width: 320px) {
    .top-header {
        padding: 0.5rem;
    }
    
    .dashboard-stats {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .stat-card {
        padding: 0.5rem;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    .btn-new-order,
    .btn-add-funds {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    .sidebar-header .logo-text {
        font-size: 1rem;
    }
    
    .user-name {
        font-size: 0.875rem;
    }
    
    .nav-text {
        font-size: 0.875rem;
    }
}

/* Order Summary */
.order-summary {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item span:first-child {
    font-weight: 500;
    color: #6c757d;
}

.summary-item span:last-child {
    font-weight: 600;
    color: #2c3e50;
}

/* Modal Improvements */
.modal-content {
    max-width: 500px;
    width: 95%;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* No Data States */
.no-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: #6c757d;
    font-size: 1rem;
}

.error-row,
.error-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    color: #dc3545;
}

/* Animation for stat updates */
.stat-value {
    transition: transform 0.2s ease;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #011236;
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #dc3545;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #011236;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #ff6600;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(255, 102, 0, 0.25);
}

.form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.order-summary {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

.order-summary h4 {
    margin: 0 0 0.75rem 0;
    color: #011236;
    font-size: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.summary-item:last-child {
    margin-bottom: 0;
    font-weight: 600;
    border-top: 1px solid #dee2e6;
    padding-top: 0.5rem;
}

.btn-secondary {
    background: #6c757d;
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6600 0%, #e55a00 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 102, 0, 0.3);
}

/* Responsive improvements */
@media (max-width: 480px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .orders-table {
        font-size: 0.75rem;
    }

    .orders-table th,
    .orders-table td {
        padding: 0.5rem;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn {
        width: 100%;
        margin: 0.25rem 0;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

