/* Main Header */
.main-header {
    background-color: #222;
    color: #fff;
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}



.main-nav {
    display: flex;
    gap: 20px;
}

.main-nav .nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 5px 10px;
}

.main-nav .nav-link.active {
    background-color: #333;
    border-radius: 4px;
}

.support-link {
    color: #fff;
    text-decoration: none;
}

/* Sub Navigation */
.sub-nav {
    background-color: #f8f9fa;
    padding: 10px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 999;
}

.sub-nav-link {
    color: #333;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    margin-right: 5px;
    display: inline-block;
    font-size: 14px;
}

.sub-nav-link.active {
    background-color: #e9ecef;
    font-weight: 500;
}

.sub-nav-link i {
    width: 20px;
    text-align: center;
}

/* Dashboard Content */
.dashboard-content {
    /*padding-top: 130px; */
    padding-bottom: 30px;
    min-height: calc(100vh - 120px);
    /* Increased minimum height */
    /* Ensures footer stays at bottom */
}

/* Dashboard Overview */
.dashboard-overview {
    margin-top: 20px;
}

.overview-title h5 {
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
}

.account-balance {
    text-align: right;
}

.balance-amount {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.balance-label {
    font-size: 12px;
    color: #6c757d;
    letter-spacing: 1px;
}

/* Stats Cards */
.stats-cards .stat-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    height: 100%;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-cards .stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.earnings-card {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: white;
}

.conversions-card {
    background: linear-gradient(135deg, #86efac 0%, #4ade80 100%);
    color: white;
}

.hits-card {
    background: linear-gradient(135deg, #7dd3fc 0%, #38bdf8 100%);
    color: white;
}

.rate-card {
    background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
    color: white;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.stat-label {
    font-size: 16px;
    opacity: 0.9;
}

.trend-indicator {
    font-size: 14px;
    margin-left: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.2);
}

.trend-indicator.up {
    background-color: rgba(52, 211, 153, 0.2);
}

.trend-indicator.down {
    background-color: rgba(248, 113, 113, 0.2);
}

/* Form Select with custom arrow */
.form-group {
    position: relative;
}

.form-select {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    padding-right: 30px;
    /* Space for the arrow */
    font-size: 14px;
    width: 150px;
    background-color: #fff;
    appearance: none;
    /* Remove default arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
}

.select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    /* Make sure clicks pass through to select */
    color: #666;
    font-size: 12px;
}

/* Main content area */
.main-content {
    padding: 20px 0;
    min-height: 500px;
}

/* Debug info */
.debug-info {
    margin-bottom: 20px;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 15px 20px;
}

.card-header h5 {
    margin: 0;
    font-weight: 500;
    font-size: 16px;
}

.card-body {
    padding: 20px;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 500;
    color: #6c757d;
    font-size: 14px;
}

.table td {
    vertical-align: middle;
    font-size: 14px;
}

/* Tabs */
.nav-tabs {
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    padding: 10px 20px;
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    color: #007bff;
    border-bottom: 2px solid #007bff;
    background-color: transparent;
}

/* Performance Graph Card */
.performance-graph-card {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid #e0e0e0;
    margin-bottom: 30px;
}

.performance-graph-header {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #f0f0f0;
}

.performance-graph-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
}

.performance-graph-header h5 i {
    margin-right: 8px;
    color: #666;
}

.performance-graph-body {
    padding: 20px;
    background-color: #fff;
}

.graph-legend {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 0 15px;
}

.legend-color {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border-radius: 3px;
}

.conversions-color {
    background-color: #74b9ff;
}

.payouts-color {
    background-color: #81ecec;
}

.hits-color {
    background-color: #ffeaa7;
}

.legend-label {
    font-size: 14px;
    color: #666;
}

.graph-container {
    height: 300px;
    position: relative;
    padding: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .sub-nav-link {
        padding: 8px 10px;
        font-size: 12px;
    }

    .sub-nav-link i {
        margin-right: 0;
    }

    .stat-value {
        font-size: 22px;
    }

    .trend-indicator {
        font-size: 12px;
    }

    .balance-amount {
        font-size: 20px;
    }

    .stats-cards .col-md-3 {
        margin-bottom: 15px;
    }

    .overview-title h5 {
        font-size: 18px;
    }
}

/* Chat Button */
.chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #4caf50;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1000;
}

.chat-button i {
    font-size: 24px;
}

/* Dashboard Stat Boxes */
.stat-box {
    background-color: #fff;
    border-radius: 15px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    margin-bottom: 30px;
    height: 100%;
}

.stat-box-header {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-box-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
}

.stat-box-header h5 i {
    margin-right: 8px;
    color: #666;
}

.stat-box-header .controls {
    display: flex;
    align-items: center;
}

.stat-box-header .controls .form-check {
    margin-left: 15px;
}

.stat-box-body {
    padding: 0;
    max-height: 250px;
    overflow-y: auto;
}

/* Tables in stat boxes */
.stat-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
}

.stat-table th {
    background-color: #f8f9fa;
    padding: 12px 15px;
    font-weight: 500;
    color: #333;
    border: none;
    text-align: left;
    font-size: 14px;
}

.stat-table td {
    padding: 12px 15px;
    border: none;
    border-top: 1px solid #f0f0f0;
    color: #666;
    font-size: 14px;
}

.stat-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.stat-table tr:hover {
    background-color: #f1f5f9;
}

/* Empty state */
.empty-state {
    padding: 30px;
    text-align: center;
    color: #999;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}

/* Chart containers */
.chart-container {
    padding: 20px;
    height: 200px;
}