/**
 * WooCommerce Enhanced Dashboard Styles
 * 
 * @package WooCommerce_Enhanced_Dashboard
 */

.woo-enhanced-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Welcome Section */
.dashboard-welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.welcome-text h2 {
    margin: 0 0 5px 0;
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
}

.welcome-text p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    color: white;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.stat-total { border-left-color: #6366f1; }
.stat-processing { border-left-color: #f59e0b; }
.stat-completed { border-left-color: #10b981; }
.stat-pending { border-left-color: #ef4444; }

.stat-label {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
}

.stat-icon {
    opacity: 0.2;
}

.stat-icon svg {
    width: 48px;
    height: 48px;
}

/* Main Grid */
.dashboard-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 968px) {
    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-section {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.section-title {
    margin: 0 0 5px 0;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.section-subtitle {
    margin: 0 0 20px 0;
    color: #6b7280;
    font-size: 14px;
}

/* Orders Table */
.orders-table-wrapper {
    overflow-x: auto;
}

.styled-orders-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.styled-orders-table thead th {
    text-align: left;
    padding: 12px 15px;
    font-weight: 600;
    color: #6b7280;
    font-size: 13px;
    text-transform: uppercase;
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.styled-orders-table tbody tr {
    background: white;
    transition: background 0.2s;
}

.styled-orders-table tbody tr:hover {
    background: #f9fafb;
}

.styled-orders-table tbody tr td {
    padding: 16px 15px;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.styled-orders-table tbody tr:last-child td {
    border-bottom: none;
}

.order-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.order-link:hover {
    text-decoration: underline;
}

/* Status badges */
.order-status {
    display: inline-block;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 12px;
    text-transform: capitalize;
}

.status-processing { 
    background: #dbeafe; 
    color: #1e40af; 
}

.status-completed { 
    background: #d1fae5; 
    color: #065f46; 
}

.status-pending { 
    background: #fef3c7; 
    color: #92400e; 
}

.status-on-hold { 
    background: #fed7aa; 
    color: #9a3412; 
}

.status-cancelled { 
    background: #fee2e2; 
    color: #991b1b; 
}

.status-refunded { 
    background: #e5e7eb; 
    color: #374151; 
}

.status-failed {
    background: #fee2e2; 
    color: #991b1b;
}

/* Activity Log */
.activity-log {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
}

.activity-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
}

.activity-item:last-child {
    margin-bottom: 0;
}

.activity-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-right: 12px;
    margin-top: 4px;
}

.icon-success { background: #10b981; }
.icon-warning { background: #f59e0b; }
.icon-danger { background: #ef4444; }
.icon-default { background: #9ca3af; }

.activity-content {
    flex: 1;
}

.activity-text {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

.activity-meta {
    font-size: 12px;
    color: #9ca3af;
}

/* Chart Section */
.chart-section {
    min-height: 350px;
}

.chart-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    margin: 20px auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-welcome {
        text-align: center;
        flex-direction: column;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .styled-orders-table {
        font-size: 13px;
    }
    
    .styled-orders-table thead th,
    .styled-orders-table tbody td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .welcome-text h2 {
        font-size: 24px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .stat-icon svg {
        width: 36px;
        height: 36px;
    }
}