/* Pie Chart Border Color Variables */
:root {
    --pie-chart-border-color: #ffffff;
    --pie-chart-border-width: 1;
}

.dark {
    --pie-chart-border-color: #4a4a4a;
    --pie-chart-border-width: 1;
}

.statistics-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--background-color);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--cliM-border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

#revenue-card{
    gap: 60px;
}

#revenue-card .form-field{
    margin-bottom: 0;
}

.apply-btn{
    background-color: #8672a3;
    color: #ffffff;
}

@media (max-width: 767px){
#revenue-card {
    gap: 30px;
    flex-direction: column;
}
}

.stat-info {    
    display: flex;
    justify-content: space-between;
    width: 100%;
    flex-direction: column;
    gap: 25px;
}

.stat-info h3 {
    margin: 0;
    font-size: 1em;
    color: var(--color);
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    margin: 10px 0;
    color: var(--color);
}

.stat-change {
    color: #4CAF50;
    font-size: 14px;
}

.stat-change span {
    color: var(--sub-color);
}

.stat-change.negative {
    color: #f44336;
}

.stat-actions button, .header-actions button {
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    color: var(--sub-color,);
}

.project-status-section {
    background: var(--background-color);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--cliM-border-color);
    position: relative;
}

.project-status-section h3 svg{
    fill: var(--color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    margin: 0;
    font-size: 1.2em;
    color: var(--color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .section-header {
        align-items: center;
    }
    
    .team-members-section .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.project-item {
    position: relative;
    padding: 15px 0;
    border-bottom: 1px solid var(--cliM-border-color);
}

.project-item h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    margin-bottom: 8px;
}

.dashboard-progress-container {
    position: relative;
    height: 40px;
    background: var(--hover-background);
    border-radius: 4px;
    overflow: hidden;
}

.dashboard-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(76, 175, 80, 0.2); /* Light green for progress */
    transition: width 0.3s ease;
}

/* Make progress fill color follow project status */
.dashboard-progress-container.running .dashboard-progress-bar {
    background: var(--running-bg, #007dff1c);
}

.dashboard-progress-container.completed .dashboard-progress-bar {
    background: var(--completed-bg, rgba(40, 167, 69, 0.2));
}

.dashboard-progress-container.not-started .dashboard-progress-bar {
    background: var(--not-started-bg, #af90c933);
}

/* Optional: paused state if used elsewhere */
.dashboard-progress-container.paused .dashboard-progress-bar {
    background: #fff3cd; /* fallback light amber */
}

.progress-info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    z-index: 2;
}

.status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.status.running {
    background: var(--running-bg);
    color: var(--running-color);
}

.status.completed {
    background: var(--completed-bg);
    color: var(--completed-color);
}

.status.not-started {
    background: var(--not-started-bg);
    color: var(--not-started-color);
}

.percentage {
    color: var(--color);
    font-size: 14px;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .progress-info {
        flex-direction: row;
        padding: 0 10px;
    }
}

@media (prefers-color-scheme: dark) {
    .stat-card,
    .project-status-section {
        background: var(--background-color);
    }

    .dashboard-progress-container {
        background: var(--hover-background);
    }

    .project-item {
        border-bottom-color: var(--cliM-border-color);
    }
}

.project-status-section .search-box {
    position: relative;
    margin: 0;
}

.project-status-section .search-box input {
    width: 100%;
    padding: 10px;
    min-width: 250px;
    border: 1px solid var(--cliM-border-color);
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.2em;
    background: var(--background-color);
    color: var(--color);
}

@media (prefers-color-scheme: dark) {
    .search-box input {
        background: var(--background-color);
        border-color: var(--border-color);
        color: var(--color);
    }
}

/* Options Menu Styling */
.stat-actions {
    position: relative;
}

.stat-actions .options-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--background-color);
    border: 1px solid var(--cliM-border-color);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1;
    min-width: 180px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) var(--background-color);
}

.options-menu.active {
    display: block;
}

.options-menu::-webkit-scrollbar {
    width: 6px;
}

.options-menu::-webkit-scrollbar-track {
    background: var(--background-color);
}

.options-menu::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 3px;
}

.options-menu ul {
    padding: 5px 0;
}

.options-menu li {
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.options-menu a{
    display: flex;
    align-items: center;
    gap: 10px; 
}

.options-menu li:hover {
    background: var(--hover-background);
}

.options-menu li svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}