/* ==========================================
   Coffee Vending System - Dashboard Styles
   ========================================== */

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 20px;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.dashboard-subtitle {
    font-size: 1rem;
    color: var(--gray-600);
    margin-bottom: 0;
}

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

.stat-card {
    background: #fff;
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--box-shadow-sm);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    box-shadow: var(--box-shadow);
    transform: translateY(-2px);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
}

.stat-card.success::before {
    background: var(--success-color);
}

.stat-card.warning::before {
    background: var(--warning-color);
}

.stat-card.danger::before {
    background: var(--danger-color);
}

.stat-card.info::before {
    background: var(--info-color);
}

.stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-card.success .stat-icon {
    background: var(--success-light);
    color: var(--success-color);
}

.stat-card.warning .stat-icon {
    background: var(--warning-light);
    color: var(--warning-color);
}

.stat-card.danger .stat-icon {
    background: var(--danger-light);
    color: var(--danger-color);
}

.stat-card.info .stat-icon {
    background: var(--info-light);
    color: var(--info-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.stat-change {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

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

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

/* Dashboard Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: #fff;
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--box-shadow-sm);
}

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

.chart-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.chart-actions {
    display: flex;
    gap: 0.5rem;
}

.chart-btn {
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition-base);
}

.chart-btn:hover {
    background: var(--gray-200);
    color: var(--dark-color);
}

.chart-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Dashboard Tables Section */
.tables-section {
    margin-bottom: 2rem;
}

.table-card {
    background: #fff;
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--box-shadow-sm);
}

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

.table-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

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

/* Dashboard Activity Feed */
.activity-section {
    background: #fff;
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--box-shadow-sm);
}

.activity-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.activity-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.activity-icon.success {
    background: var(--success-light);
    color: var(--success-color);
}

.activity-icon.warning {
    background: var(--warning-light);
    color: var(--warning-color);
}

.activity-icon.danger {
    background: var(--danger-light);
    color: var(--danger-color);
}

.activity-icon.info {
    background: var(--info-light);
    color: var(--info-color);
}

.activity-content {
    flex: 1;
}

.activity-text {
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
    color: var(--dark-color);
}

.activity-time {
    font-size: 0.75rem;
    color: var(--gray-600);
}

/* Dashboard Quick Actions */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    color: var(--dark-color);
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: var(--box-shadow-sm);
}

.quick-action-btn:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: var(--box-shadow);
    transform: translateY(-2px);
}

.quick-action-btn i {
    font-size: 1rem;
}

/* Responsive Dashboard */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .charts-section {
        grid-template-columns: 1fr;
    }

    .chart-container {
        height: 250px;
    }

    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .table-actions {
        width: 100%;
    }

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

    .quick-action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Dashboard Loading State */
.dashboard-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.dashboard-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid var(--primary-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Dashboard Empty State */
.dashboard-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-600);
}

.dashboard-empty-icon {
    font-size: 4rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.dashboard-empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.dashboard-empty-text {
    font-size: 1rem;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}
