/* Dashboard Specific Styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.dashboard-header h2 {
    color: #2c3e50;
    margin: 0;
}

.date-range select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: white;
    font-family: "Sansation", sans-serif;
    font-size: 0.9rem;
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    width: 95vw;
    max-width: calc(100% - 5vw);
    margin-left: auto;
    margin-right: auto;
}

.kpi-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border-left: 4px solid #3498db;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 300px;
    width: 100%;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.kpi-card.revenue {
    border-left-color: #27ae60;
}

.kpi-card.expenses {
    border-left-color: #e74c3c;
}

.kpi-card.profit {
    border-left-color: #f39c12;
}

.kpi-card.orders {
    border-left-color: #9b59b6;
}

.kpi-card.customers {
    border-left-color: #3498db;
}

.kpi-card.invoices {
    border-left-color: #e67e22;
}

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.5rem;
}

.kpi-card.revenue .kpi-icon {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.kpi-card.expenses .kpi-icon {
    background: linear-gradient(135deg, #e74c3c 0%, #ec7063 100%);
}

.kpi-card.profit .kpi-icon {
    background: linear-gradient(135deg, #f39c12 0%, #f4d03f 100%);
}

.kpi-card.orders .kpi-icon {
    background: linear-gradient(135deg, #9b59b6 0%, #bb6bd9 100%);
}

.kpi-card.customers .kpi-icon {
    background: linear-gradient(135deg, #3498db 0%, #5dade2 100%);
}

.kpi-card.invoices .kpi-icon {
    background: linear-gradient(135deg, #e67e22 0%, #f8c471 100%);
}

.kpi-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kpi-content h3 {
    margin: 0 0 0.5rem 0;
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: 400;
    white-space: nowrap;
}

.kpi-content h2 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1.6rem;
    font-weight: 700;
    word-break: break-word;
    line-height: 1.2;
}

.kpi-change {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-weight: 600;
}

.kpi-change.positive {
    background-color: #d5f4e6;
    color: #27ae60;
}

.kpi-change.negative {
    background-color: #fadbd8;
    color: #e74c3c;
}

.kpi-subtitle {
    color: #95a5a6;
    font-size: 0.8rem;
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.chart-container h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.chart-container canvas {
    width: 100% !important;
    height: 300px !important;
}

/* Recent Activity */
.recent-activity {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.activity-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.activity-section h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
    border-bottom: 1px solid #ecf0f1;
    padding-bottom: 0.5rem;
}

.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.activity-icon.income {
    background-color: #27ae60;
}

.activity-icon.expense {
    background-color: #e74c3c;
}

.activity-icon.order {
    background-color: #3498db;
}

.activity-icon.invoice {
    background-color: #e67e22;
}

.activity-content {
    flex: 1;
}

.activity-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    color: #2c3e50;
}

.activity-content p {
    margin: 0 0 0.25rem 0;
    font-size: 0.8rem;
    color: #7f8c8d;
}

.activity-date {
    font-size: 0.7rem;
    color: #bdc3c7;
}

.activity-status {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-completed {
    background-color: #d5f4e6;
    color: #27ae60;
}

.status-overdue {
    background-color: #fadbd8;
    color: #e74c3c;
}

.status-processing {
    background-color: #cce5ff;
    color: #0066cc;
}

.view-all-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.8rem;
    transition: background-color 0.2s ease;
}

.view-all-btn:hover {
    background-color: #2980b9;
}

/* Quick Actions */
.quick-actions {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.quick-actions h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: "Sansation", sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.action-btn i {
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .charts-section {
        grid-template-columns: 1fr;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .recent-activity {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* Error State Styles */
.dashboard-error {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.error-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.error-content i {
    font-size: 3rem;
    color: #e74c3c;
}

.error-content h3 {
    color: #c0392b;
    margin: 0;
}

.error-content p {
    color: #666;
    margin: 0;
}

.retry-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: "Sansation", sans-serif;
    transition: background 0.2s ease;
}

.retry-btn:hover {
    background: #c0392b;
}

/* No Data State */
.no-data {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.no-data i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.no-data p {
    margin: 0;
    font-style: italic;
}
