/**
 * Client Dashboard Sync - Dashboard Styles
 * 
 * Modern, responsive CSS for the client dashboard
 */

/* Dashboard Container */
.cds-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Dashboard Header */
.cds-dashboard-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.cds-dashboard-header h2 {
    margin: 0 0 10px 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.cds-dashboard-subtitle {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Dashboard Content */
.cds-dashboard-content {
    margin-top: 30px;
}

/* Cards */
.cds-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cds-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.cds-card-header {
    background: #f8f9fa;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cds-card-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
}

.cds-card-header i {
    margin-right: 8px;
    color: #667eea;
}

.cds-card-badge {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.cds-card-body {
    padding: 25px;
}

/* Order Items */
.cds-order-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    background: #fafbfc;
    transition: all 0.2s ease;
}

.cds-order-item:hover {
    border-color: #667eea;
    background: white;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.1);
}

.cds-order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.cds-order-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    flex: 1;
}

.cds-order-meta {
    margin-bottom: 15px;
}

.cds-meta-item {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    color: #6c757d;
    margin-right: 20px;
}

.cds-meta-item i {
    margin-right: 6px;
    color: #667eea;
}

.cds-order-actions {
    display: flex;
    gap: 10px;
}

/* Invoice Items */
.cds-invoice-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    background: #fafbfc;
    transition: all 0.2s ease;
}

.cds-invoice-item:hover {
    border-color: #28a745;
    background: white;
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.1);
}

.cds-invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cds-invoice-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.cds-amount {
    font-size: 1.2rem;
    font-weight: 700;
    color: #28a745;
}

.cds-invoice-actions {
    display: flex;
    gap: 10px;
}

/* Status Badges */
.cds-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cds-status-working-on-it {
    background: #fff3cd;
    color: #856404;
}

.cds-status-done {
    background: #d4edda;
    color: #155724;
}

.cds-status-stuck {
    background: #f8d7da;
    color: #721c24;
}

.cds-status-not-started {
    background: #e2e3e5;
    color: #383d41;
}

/* Buttons */
.cds-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.cds-btn i {
    margin-right: 6px;
}

.cds-btn-primary {
    background: #667eea;
    color: white;
}

.cds-btn-primary:hover {
    background: #5a6fd8;
    color: white;
    transform: translateY(-1px);
}

.cds-btn-secondary {
    background: #6c757d;
    color: white;
}

.cds-btn-secondary:hover {
    background: #5a6268;
    color: white;
    transform: translateY(-1px);
}

/* States */
.cds-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    margin: 15px 0;
    display: flex;
    align-items: center;
}

.cds-error i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.cds-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

.cds-loading {
    text-align: center;
    padding: 40px 20px;
}

.cds-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .cds-dashboard {
        padding: 15px;
    }
    
    .cds-dashboard-header {
        padding: 20px 15px;
    }
    
    .cds-dashboard-header h2 {
        font-size: 2rem;
    }
    
    .cds-card-header {
        padding: 15px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cds-card-body {
        padding: 20px;
    }
    
    .cds-order-header,
    .cds-invoice-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cds-order-actions,
    .cds-invoice-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .cds-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .cds-dashboard {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .cds-card {
        background: #2d2d2d;
        border: 1px solid #404040;
    }
    
    .cds-card-header {
        background: #333333;
        border-bottom-color: #404040;
    }
    
    .cds-card-header h3 {
        color: #ffffff;
    }
    
    .cds-order-item,
    .cds-invoice-item {
        background: #333333;
        border-color: #404040;
    }
    
    .cds-order-item:hover,
    .cds-invoice-item:hover {
        background: #404040;
    }
    
    .cds-order-header h4,
    .cds-invoice-header h4 {
        color: #ffffff;
    }
}

/* Admin Bar Integration */
#wp-admin-bar-client-dashboard .ab-icon:before {
    content: "\f163";
    top: 2px;
}

#wp-admin-bar-client-dashboard:hover .ab-icon:before {
    color: #667eea;
}

#wp-admin-bar-client-dashboard-orders .ab-item,
#wp-admin-bar-client-dashboard-invoices .ab-item {
    padding-left: 20px;
}

#wp-admin-bar-client-dashboard-orders .ab-item:before {
    content: "\f159";
    margin-right: 5px;
    color: #667eea;
}

#wp-admin-bar-client-dashboard-invoices .ab-item:before {
    content: "\f481";
    margin-right: 5px;
    color: #28a745;
} 