/* Invisplan Client Manager - Dashboard Styles */

:root {
    --icm-primary: #667eea;
    --icm-secondary: #764ba2;
    --icm-success: #10b981;
    --icm-warning: #f59e0b;
    --icm-danger: #ef4444;
    --icm-info: #3b82f6;
    --icm-light: #f8f9fa;
    --icm-dark: #1a202c;
    --icm-border: #e5e7eb;
    --icm-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --icm-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Dashboard Wrapper */
.icm-dashboard-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Welcome Section */
.icm-welcome-section {
    margin-bottom: 30px;
}

.icm-welcome-section h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--icm-dark);
    margin: 0 0 8px 0;
    background: linear-gradient(135deg, var(--icm-primary) 0%, var(--icm-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.icm-subtitle {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

/* Stats Grid */
.icm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.icm-stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--icm-shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.icm-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--icm-primary) 0%, var(--icm-secondary) 100%);
}

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

.icm-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icm-stat-icon svg {
    width: 28px;
    height: 28px;
}

.icm-card-pending .icm-stat-icon {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: var(--icm-warning);
}

.icm-card-upcoming .icm-stat-icon {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: var(--icm-info);
}

.icm-card-traffic .icm-stat-icon {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: var(--icm-primary);
}

.icm-card-visitors .icm-stat-icon {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: var(--icm-secondary);
}

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

.icm-stat-content h3 {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.icm-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--icm-dark);
    margin: 0 0 4px 0;
}

.icm-currency {
    font-size: 18px;
    font-weight: 600;
    color: #9ca3af;
}

.icm-stat-label {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}

/* Main Grid */
.icm-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

@media (max-width: 1024px) {
    .icm-main-grid {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.icm-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--icm-shadow);
    overflow: hidden;
}

.icm-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--icm-border);
}

.icm-card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--icm-dark);
}

.icm-card-body {
    padding: 24px;
}

/* Chart Card */
.icm-chart-card canvas {
    max-height: 300px;
}

/* Fees Timeline */
.icm-fees-timeline {
    position: relative;
}

.icm-fee-timeline-item {
    position: relative;
    padding-left: 32px;
    padding-bottom: 24px;
}

.icm-fee-timeline-item:last-child {
    padding-bottom: 0;
}

.icm-fee-timeline-item::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 24px;
    bottom: 0;
    width: 2px;
    background: var(--icm-border);
}

.icm-fee-timeline-item:last-child::before {
    display: none;
}

.icm-fee-timeline-marker {
    position: absolute;
    left: 0;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--icm-info);
    z-index: 1;
}

.icm-fee-timeline-item.icm-overdue .icm-fee-timeline-marker {
    border-color: var(--icm-danger);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

.icm-fee-timeline-content {
    background: var(--icm-light);
    border-radius: 8px;
    padding: 16px;
    transition: background 0.2s ease;
}

.icm-fee-timeline-content:hover {
    background: #f3f4f6;
}

.icm-fee-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.icm-fee-timeline-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--icm-dark);
}

.icm-fee-amount {
    font-size: 16px;
    font-weight: 700;
    color: var(--icm-primary);
    white-space: nowrap;
}

.icm-fee-timeline-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 14px;
    color: #6b7280;
}

/* Badges */
.icm-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.icm-badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.icm-badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.icm-badge-success {
    background: #d1fae5;
    color: #065f46;
}

/* Empty State */
.icm-empty-message {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
}

.icm-empty-message p {
    margin: 0;
    font-size: 16px;
}

/* Notice */
.icm-notice {
    background: #dbeafe;
    border-left: 4px solid var(--icm-info);
    padding: 16px;
    border-radius: 6px;
    margin: 20px 0;
    color: #1e40af;
}

/* Fees List (for shortcode) */
.icm-fees-list {
    display: grid;
    gap: 16px;
}

.icm-fee-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--icm-shadow);
    border-left: 4px solid var(--icm-info);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.icm-fee-item:hover {
    transform: translateX(4px);
    box-shadow: var(--icm-shadow-lg);
}

.icm-fee-status-pending {
    border-left-color: var(--icm-warning);
}

.icm-fee-status-paid {
    border-left-color: var(--icm-success);
}

.icm-fee-status-overdue {
    border-left-color: var(--icm-danger);
}

.icm-fee-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.icm-fee-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--icm-dark);
}

.icm-fee-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.icm-label {
    font-weight: 600;
    color: #6b7280;
    font-size: 14px;
}

.icm-value {
    color: var(--icm-dark);
    font-size: 14px;
}

.icm-fee-countdown {
    margin-top: 8px;
    padding: 12px;
    background: var(--icm-light);
    border-radius: 6px;
    text-align: center;
}

.icm-countdown-days {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--icm-primary);
}

.icm-countdown-label {
    font-size: 14px;
    color: #6b7280;
}

.icm-overdue-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--icm-danger);
}

/* Responsive */
@media (max-width: 768px) {
    .icm-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .icm-stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .icm-fee-timeline-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .icm-fee-details {
        grid-template-columns: 1fr;
    }
}
