/* ============================================================
   Modeer - Enhanced Dashboard Styles
   ============================================================ */

/* Dashboard Container */
.dashboard-container {
    padding: 20px;
    display: grid;
    gap: 20px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--modeer-gradient);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
    border-color: var(--modeer-indigo-border);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.stat-card-icon.primary {
    background: var(--modeer-indigo-soft);
    color: var(--modeer-indigo);
}

.stat-card-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.stat-card-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.stat-card-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.stat-card-icon.info {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

.stat-trend {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius-xs);
}

.stat-trend.up {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.stat-trend.down {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-family: var(--font-arabic);
}

.stat-card-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quick-action-btn:hover {
    background: var(--modeer-indigo-soft);
    border-color: var(--modeer-indigo);
    color: var(--modeer-indigo);
}

/* Dashboard Section */
.dashboard-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.dashboard-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.dashboard-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-section-title i {
    color: var(--modeer-indigo);
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--bg-surface-2);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.activity-item:hover {
    background: var(--modeer-indigo-soft);
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.activity-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* Revenue Chart Container */
.revenue-chart-container {
    height: 300px;
    position: relative;
}

/* Service Distribution */
.service-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-surface-2);
    border-radius: var(--radius-md);
}

.service-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.service-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.service-count {
    color: var(--modeer-indigo);
    font-weight: 600;
}

/* Top Customers */
.top-customers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.top-customer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--bg-surface-2);
    border-radius: var(--radius-md);
}

.customer-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--modeer-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.customer-info {
    flex: 1;
}

.customer-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.customer-service {
    font-size: 12px;
    color: var(--text-muted);
}

.customer-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--modeer-indigo);
}

/* Expiring Soon */
.expiring-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.expiring-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-surface-2);
    border-radius: var(--radius-md);
    border-left: 3px solid;
}

.expiring-item.urgent {
    border-left-color: #EF4444;
}

.expiring-item.warning {
    border-left-color: #F59E0B;
}

.expiring-item.normal {
    border-left-color: #10B981;
}

.expiring-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.expiring-date {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius-xs);
}

.expiring-item.urgent .expiring-date {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.expiring-item.warning .expiring-date {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.expiring-item.normal .expiring-date {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

/* Welcome Header Enhancement */
.welcome-header-enhanced {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.welcome-text {
    flex: 1;
    min-width: 200px;
}

.welcome-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.welcome-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

.welcome-date {
    font-size: 13px;
    color: var(--text-muted);
    background: var(--bg-surface-2);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Grid Layout for Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.dashboard-grid .stats-section {
    grid-column: span 12;
}

.dashboard-grid .revenue-section {
    grid-column: span 8;
}

.dashboard-grid .activity-section {
    grid-column: span 4;
}

.dashboard-grid .services-section {
    grid-column: span 6;
}

.dashboard-grid .expiring-section {
    grid-column: span 6;
}

@media (max-width: 1200px) {
    .dashboard-grid .revenue-section,
    .dashboard-grid .activity-section,
    .dashboard-grid .services-section,
    .dashboard-grid .expiring-section {
        grid-column: span 12;
    }
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--bg-surface-2) 25%, var(--bg-surface) 50%, var(--bg-surface-2) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

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

.skeleton-text {
    height: 16px;
    width: 60%;
    margin-bottom: 8px;
}

.skeleton-value {
    height: 32px;
    width: 40%;
}

/* Empty State */
.dashboard-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.dashboard-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.dashboard-empty p {
    font-size: 14px;
}