/* Dashboard Personalization Styles */

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.welcome-section h1 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-navy);
    font-size: 2.5rem;
    font-weight: 700;
}

.dashboard-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 1.1rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* Dashboard Widgets */
.dashboard-widget {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.widget-header h3 {
    margin: 0;
    color: var(--primary-navy);
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-subtitle {
    color: #64748b;
    font-size: 0.875rem;
}

/* Quick Actions Widget */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.quick-action-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #3b82f6;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    background: white;
}

.quick-action-item:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
    transform: translateX(2px);
    text-decoration: none;
    color: inherit;
}

.action-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.1);
    font-size: 1.2rem;
}

.action-info h4 {
    margin: 0 0 0.25rem 0;
    color: var(--primary-navy);
    font-size: 1rem;
    font-weight: 600;
}

.action-info p {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
}

/* Activity Widget */
.activity-timeline {
    position: relative;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.activity-item:last-child {
    margin-bottom: 0;
}

.activity-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    font-size: 0.5rem;
    color: var(--primary-navy);
    z-index: 1;
    position: relative;
}

.activity-content {
    flex: 1;
    padding-top: 0.125rem;
}

.activity-text {
    color: #374151;
    font-size: 0.95rem;
    line-height: 1.4;
}

.activity-time {
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Insights Widget */
.insights-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.insight-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid var(--accent-gold);
}

.insight-icon {
    color: var(--accent-gold);
    font-size: 1.1rem;
    margin-top: 0.1rem;
}

.insight-text {
    color: #374151;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Stats Widget */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    background: #fafbfc;
    transition: all 0.2s ease;
}

.stat-item:hover {
    background: white;
    border-color: #e2e8f0;
    transform: translateY(-1px);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-navy);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-change {
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.stat-change.positive {
    color: #059669;
}

.stat-change.negative {
    color: #dc2626;
}

/* Layout Variations */
.layout-compact .dashboard-widget {
    padding: 1rem;
}

.layout-compact .widget-header h3 {
    font-size: 1.1rem;
}

.layout-compact .quick-actions-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.layout-compact .quick-action-item {
    padding: 0.75rem;
}

.layout-compact .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.layout-compact .stat-item {
    padding: 0.75rem;
}

.layout-compact .stat-value {
    font-size: 1.5rem;
}

.layout-detailed .dashboard-widget {
    padding: 2.5rem;
}

.layout-detailed .widget-header h3 {
    font-size: 1.5rem;
}

.layout-detailed .quick-actions-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.layout-detailed .quick-action-item {
    padding: 1.5rem;
}

.layout-detailed .action-icon {
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
}

.layout-detailed .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
}

.layout-detailed .stat-item {
    padding: 1.5rem;
}

.layout-detailed .stat-value {
    font-size: 2.5rem;
}

/* Sidebar Personalization */
.nav-separator {
    list-style: none;
    padding: 0;
}

.sidebar-nav .nav-item .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 0;
}

.sidebar-nav .nav-item .nav-link:hover {
    background: rgba(59, 130, 246, 0.08);
    color: var(--primary-navy);
    text-decoration: none;
}

.sidebar-nav .nav-item .nav-link.active {
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary-navy);
    border-right: 3px solid var(--primary-navy);
    font-weight: 500;
}

.sidebar-nav .nav-item .nav-link i {
    width: 18px;
    text-align: center;
    font-size: 1rem;
}

/* Theme Support */
.theme-dark .dashboard-widget {
    background: #1e293b;
    color: #e2e8f0;
}

.theme-dark .widget-header {
    border-bottom-color: #334155;
}

.theme-dark .widget-header h3 {
    color: #f1f5f9;
}

.theme-dark .quick-action-item {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

.theme-dark .quick-action-item:hover {
    background: #475569;
    color: #f1f5f9;
}

.theme-dark .action-info h4 {
    color: #f1f5f9;
}

.theme-dark .activity-icon {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

.theme-dark .insight-item {
    background: #334155;
}

.theme-dark .stat-item {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

.theme-dark .stat-item:hover {
    background: #475569;
}

.theme-dark .stat-value {
    color: #f1f5f9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        text-align: center;
    }
    
    .welcome-section h1 {
        font-size: 2rem;
    }
    
    .header-actions {
        justify-content: center;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .dashboard-widget {
        padding: 1rem;
    }
    
    .activity-timeline::before {
        left: 0.75rem;
    }
    
    .activity-item {
        gap: 0.75rem;
    }
    
    .activity-icon {
        width: 1.5rem;
        height: 1.5rem;
    }
}

@media (max-width: 480px) {
    .dashboard-header {
        padding: 1rem 0;
    }
    
    .welcome-section h1 {
        font-size: 1.75rem;
    }
    
    .dashboard-subtitle {
        font-size: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
    
    .quick-action-item {
        padding: 0.75rem;
    }
    
    .action-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .widget-header h3 {
        font-size: 1.1rem;
    }
}

/* Animation Effects */
.dashboard-widget {
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quick-action-item,
.activity-item,
.insight-item,
.stat-item {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Loading States */
.widget-loading {
    position: relative;
    overflow: hidden;
}

.widget-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Accessibility */
.quick-action-item:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-navy);
    outline-offset: 2px;
}

.stat-item:focus-within {
    outline: 1px solid var(--primary-navy);
    outline-offset: 1px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .dashboard-widget {
        border: 2px solid #000;
    }
    
    .quick-action-item {
        border: 2px solid #000;
    }
    
    .stat-item {
        border: 2px solid #000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .dashboard-widget,
    .quick-action-item,
    .activity-item,
    .insight-item,
    .stat-item {
        animation: none;
        transition: none;
    }
    
    .dashboard-widget:hover,
    .stat-item:hover {
        transform: none;
    }
}