/* Dashboard Enhancements - Metrics, Progress Bars, and Charts */

/* Metric Cards Enhancement */
.metric-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.metric-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.metric-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.metric-label {
    font-size: 0.875rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    font-weight: 500;
}

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

.trend-up {
    color: #10b981;
}

.trend-down {
    color: #ef4444;
}

.trend-neutral {
    color: #6b7280;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.metric-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Progress Bar Styles */
.progress-container {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3182ce 0%, #2563eb 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill.warning {
    background: linear-gradient(90deg, #f59e0b 0%, #f97316 100%);
}

.progress-fill.danger {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.progress-fill.success {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
}

/* Circular Progress */
.circular-progress {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.circular-progress svg {
    transform: rotate(-90deg);
}

.circular-progress-bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 8;
}

.circular-progress-fill {
    fill: none;
    stroke: #3182ce;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.circular-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.circular-progress-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
}

.circular-progress-label {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-indicator.success {
    background: #d1fae5;
    color: #065f46;
}

.status-indicator.warning {
    background: #fed7aa;
    color: #92400e;
}

.status-indicator.danger {
    background: #fee2e2;
    color: #991b1b;
}

.status-indicator.info {
    background: #dbeafe;
    color: #1e3a8a;
}

/* Mini Chart Container */
.mini-chart {
    height: 60px;
    margin-top: 1rem;
    position: relative;
}

.mini-chart canvas {
    max-height: 60px !important;
}

/* Quick Stats Grid */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.quick-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    transition: background 0.2s;
}

.quick-stat:hover {
    background: #f3f4f6;
}

.quick-stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    color: #3182ce;
    font-size: 1.25rem;
}

.quick-stat-content {
    flex: 1;
}

.quick-stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.quick-stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
}

/* Empty State Improvements */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 2px dashed #e5e7eb;
}

.empty-state-icon {
    font-size: 3rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.empty-state-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #3182ce;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
}

.empty-state-action:hover {
    background: #2563eb;
}

/* Loading Skeleton */
.skeleton {
    animation: skeleton-loading 1.5s infinite ease-in-out;
    background: linear-gradient(
        90deg,
        #f3f4f6 25%,
        #e5e7eb 50%,
        #f3f4f6 75%
    );
    background-size: 200% 100%;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 1rem;
    border-radius: 4px;
}

/* Animated Counter */
.animated-counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* Dark Mode Support */
body.dark-mode .metric-card {
    background: #1f2937;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

body.dark-mode .metric-value {
    color: #f9fafb;
}

body.dark-mode .metric-label,
body.dark-mode .metric-subtitle {
    color: #9ca3af;
}

body.dark-mode .progress-bar {
    background: #374151;
}

body.dark-mode .circular-progress-bg {
    stroke: #374151;
}

body.dark-mode .circular-progress-value {
    color: #f9fafb;
}

body.dark-mode .quick-stat {
    background: #374151;
}

body.dark-mode .quick-stat:hover {
    background: #4b5563;
}

body.dark-mode .quick-stat-icon {
    background: #1f2937;
    color: #60a5fa;
}

body.dark-mode .quick-stat-value {
    color: #f9fafb;
}

body.dark-mode .empty-state {
    background: #1f2937;
    border-color: #374151;
}

body.dark-mode .empty-state-title {
    color: #d1d5db;
}

body.dark-mode .empty-state-text {
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .metric-card {
        padding: 1rem;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
    
    .quick-stats {
        grid-template-columns: 1fr;
    }
    
    .circular-progress {
        width: 100px;
        height: 100px;
    }
}