.dashboard-body {
    background-color: #f8f9fa;
}

.dashboard-header {
    background-color: var(--card-background);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.dashboard-container {
    display: flex;
    min-height: calc(100vh - 70px);
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background-color: var(--card-background);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-color);
}

.sidebar-nav ul {
    padding: 1rem 0;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: var(--text-color);
    transition: var(--transition);
    font-weight: 500;
}

.sidebar-nav a i {
    margin-right: 0.8rem;
    width: 20px;
    text-align: center;
}

.sidebar-nav li.active a {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

.sidebar-nav a:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

/* Main Content Styles */
.dashboard-main {
    flex: 1;
    padding: 2rem;
}

.dashboard-section {
    display: none;
}

.dashboard-section.active {
    display: block;
}

.dashboard-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header-section h2 {
    margin: 0;
    font-size: 1.8rem;
}

.date-filter select,
.search-filter input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

.search-filter {
    display: flex;
}

.search-filter input {
    border-radius: 4px 0 0 4px;
    border-right: none;
}

.search-filter button {
    border-radius: 0 4px 4px 0;
    padding: 0.5rem 1rem;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--card-background);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
}

.stat-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(67, 97, 238, 0.1);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 1rem;
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    font-size: 0.9rem;
    margin: 0 0 0.5rem;
    color: var(--text-color);
    opacity: 0.7;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.stat-change {
    font-size: 0.8rem;
    margin: 0;
}

.stat-change.positive {
    color: var(--success-color);
}

.stat-change.negative {
    color: var(--error-color);
}

.stat-change span {
    opacity: 0.7;
    color: var(--text-color);
}

/* Chart Containers */
.chart-container {
    background-color: var(--card-background);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.chart-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-container.half {
    margin-bottom: 0;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.chart-legend {
    display: flex;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 0.5rem;
}

/* Links Table */
.links-table-container {
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.links-table {
    width: 100%;
    border-collapse: collapse;
}

.links-table th,
.links-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.links-table th {
    background-color: rgba(0, 0, 0, 0.02);
    font-weight: 600;
    font-size: 0.9rem;
}

.links-table tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

.links-table .link-actions {
    display: flex;
    gap: 0.5rem;
}

.links-table .link-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.7;
    transition: var(--transition);
}

.links-table .link-actions button:hover {
    opacity: 1;
    color: var(--primary-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.pagination-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: var(--light-text);
    border-color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 0.9rem;
}

/* Dashboard Create Form */
.dashboard-create-form {
    max-width: 100%;
}

/* Settings */
.settings-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.settings-card {
    background-color: var(--card-background);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.settings-card h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .chart-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
    }
    
    .sidebar-nav ul {
        display: flex;
        overflow-x: auto;
        padding: 1rem;
    }
    
    .sidebar-nav li {
        margin-bottom: 0;
        margin-right: 1rem;
    }
    
    .dashboard-main {
        padding: 1.5rem;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .settings-container {
        grid-template-columns: 1fr;
    }
}
