/* 📊 Dashboard Styles */

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Dashboard Cards */
.dashboard-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.dashboard-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.card-header i {
    width: 20px;
    height: 20px;
    color: #6b7280;
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Metrics */
.metric {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}

.metric-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.metric-change {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

.metric-change.positive {
    background-color: #dcfce7;
    color: #166534;
}

.metric-change.negative {
    background-color: #fef2f2;
    color: #991b1b;
}

.metric-change.neutral {
    background-color: #f3f4f6;
    color: #6b7280;
}

/* Recent Analyses */
.recent-analyses {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.recent-analyses h3 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.analyses-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.analysis-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.analysis-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.analysis-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.analysis-title {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.875rem;
}

.analysis-meta {
    font-size: 0.75rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.analysis-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.analysis-badge {
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-weight: 500;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.analysis-badge.redirect-analyzer {
    background-color: #dbeafe;
    color: #1e40af;
}

.analysis-badge.position-tracker {
    background-color: #d1fae5;
    color: #065f46;
}

.analysis-badge.technical-audit {
    background-color: #fef3c7;
    color: #92400e;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: #d1d5db;
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin: 0 0 1.5rem;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

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

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #374151;
    transition: all 0.2s ease;
}

.quick-action:hover {
    background: #f9fafb;
    border-color: #3b82f6;
    color: #374151;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.quick-action-icon {
    width: 32px;
    height: 32px;
    color: #3b82f6;
}

.quick-action-title {
    font-weight: 600;
    font-size: 0.875rem;
    text-align: center;
}

.quick-action-description {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
    line-height: 1.4;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    position: relative;
}

.project-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.project-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.project-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.25rem;
}

.project-domain {
    font-size: 0.875rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.project-languages {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.language-info,
.language-analysis {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
}

.language-info {
    background: #eff6ff;
    border-color: #dbeafe;
    color: #1e40af;
}

.language-analysis {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.project-menu {
    position: relative;
}

.project-menu-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: #6b7280;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-menu-button:hover {
    background: #f3f4f6;
    color: #374151;
}

.project-menu .user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.25rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    z-index: 1001;
    overflow: hidden;
}

.project-menu .user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

.project-menu .user-dropdown a:hover {
    background-color: #f3f4f6;
}

.project-menu .user-dropdown a.text-red-600 {
    color: #dc2626;
}

.project-menu .dropdown-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 0.25rem 0;
}

.project-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1rem 0;
}

.project-stat {
    text-align: center;
}

.project-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    display: block;
}

.project-stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-top: 0.25rem;
}

.project-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.project-actions .btn {
    flex: 1;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-indicator.active .status-dot {
    background-color: #10b981;
}

.status-indicator.inactive .status-dot {
    background-color: #6b7280;
}

.status-indicator.error .status-dot {
    background-color: #ef4444;
}

/* Charts Container (Future) */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.chart-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.chart-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.chart-container {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    border: 2px dashed #e5e7eb;
    border-radius: 0.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .project-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }
    
    .project-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .analysis-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .analysis-stats {
        align-self: stretch;
        justify-content: space-between;
    }
}