/**
 * Analytics Dashboard Styles
 */

.sffc-analytics-dashboard {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header */
.sffc-analytics-header {
    background: linear-gradient(135deg, #132D51 0%, #2C5530 100%);
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.sffc-analytics-title h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sffc-analytics-icon {
    font-size: 32px;
}

.sffc-analytics-subtitle {
    margin: 8px 0 0;
    font-size: 16px;
    opacity: 0.9;
}

/* Period Selector */
.sffc-period-selector {
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
    border-radius: 25px;
}

.sffc-period-btn {
    background: transparent;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sffc-period-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sffc-period-btn.active {
    background: white;
    color: #132D51;
}

/* Navigation */
.sffc-analytics-nav {
    display: flex;
    gap: 0;
    background: #f8f9fa;
    border-bottom: 2px solid #e8e8e8;
    overflow-x: auto;
}

.sffc-nav-btn {
    background: transparent;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    font-size: 15px;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.sffc-nav-btn:hover {
    background: #ffffff;
    color: #333;
}

.sffc-nav-btn.active {
    background: #ffffff;
    color: #132D51;
    border-bottom-color: #132D51;
}

.nav-icon {
    font-size: 18px;
}

/* Content Area */
.sffc-analytics-content {
    padding: 30px;
    min-height: 500px;
}

/* Loading State */
.sffc-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.sffc-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2C5530;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.sffc-loading p {
    margin-top: 20px;
    color: #666;
    font-size: 16px;
}

/* Metrics Grid */
.sffc-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.sffc-metric-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.sffc-metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.sffc-metric-highlight {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white;
}

.sffc-metric-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.sffc-metric-value {
    font-size: 36px;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 5px;
}

.sffc-metric-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sffc-metric-highlight .sffc-metric-label {
    color: rgba(255, 255, 255, 0.9);
}

/* Charts Grid */
.sffc-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.sffc-chart-card {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 20px;
}

.sffc-chart-card h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: #333;
}

.sffc-chart-card canvas {
    max-height: 300px;
}

.sffc-chart-card.full-width {
    grid-column: 1 / -1;
}

/* Recent Activity */
.sffc-recent-activity {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 20px;
}

.sffc-recent-activity h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: #333;
}

.sffc-activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sffc-activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.sffc-activity-item:hover {
    background: #e8e8e8;
}

.sffc-activity-icon {
    font-size: 24px;
}

.sffc-activity-details {
    flex: 1;
}

.sffc-activity-title {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.sffc-activity-meta {
    font-size: 13px;
    color: #666;
}

/* Match Analysis */
.sffc-match-analysis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.sffc-factors-card,
.sffc-industries-card {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 20px;
}

.sffc-factors-card h3,
.sffc-industries-card h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: #333;
}

/* Factor Items */
.sffc-factors-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sffc-factor-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sffc-factor-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sffc-factor-icon {
    font-size: 20px;
}

.sffc-factor-name {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.sffc-factor-value {
    font-weight: bold;
    color: #132D51;
}

.sffc-factor-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.sffc-factor-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.sffc-factor-fill.excellent {
    background: #27ae60;
}

.sffc-factor-fill.good {
    background: #3498db;
}

.sffc-factor-fill.needs-improvement {
    background: #f39c12;
}

/* Industries List */
.sffc-industries-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sffc-industry-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.sffc-industry-rank {
    width: 30px;
    height: 30px;
    background: #132D51;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.sffc-industry-info {
    flex: 1;
}

.sffc-industry-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.sffc-industry-stats {
    font-size: 13px;
    color: #666;
}

/* Application Funnel */
.sffc-funnel-card {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

.sffc-funnel-card h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: #333;
}

.sffc-funnel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sffc-funnel-step {
    position: relative;
}

.sffc-funnel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.sffc-funnel-icon {
    font-size: 24px;
}

.sffc-funnel-name {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.sffc-funnel-count {
    font-size: 20px;
    font-weight: bold;
    color: #132D51;
}

.sffc-funnel-bar {
    height: 12px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
}

.sffc-funnel-fill {
    height: 100%;
    background: linear-gradient(90deg, #132D51 0%, #2C5530 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.sffc-funnel-rate {
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    text-align: right;
}

/* Conversion Rates */
.sffc-rates-card {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

.sffc-rates-card h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: #333;
}

.sffc-rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.sffc-rate-item {
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    background: #f8f9fa;
}

.sffc-rate-item.high {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.sffc-rate-item.medium {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.sffc-rate-item.low {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.sffc-rate-value {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
}

.sffc-rate-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Applications List */
.sffc-applications-list {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 20px;
}

.sffc-applications-list h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: #333;
}

.sffc-apps-table table {
    width: 100%;
    border-collapse: collapse;
}

.sffc-apps-table th {
    text-align: left;
    padding: 10px;
    border-bottom: 2px solid #e8e8e8;
    color: #666;
    font-weight: 600;
    font-size: 14px;
}

.sffc-apps-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.sffc-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.sffc-status.pending {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

/* Skills Section */
.sffc-skills-section {
    display: grid;
    gap: 25px;
}

.sffc-skills-card,
.sffc-recommendations-card,
.sffc-opportunities-card {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 20px;
}

.sffc-skills-card h3,
.sffc-recommendations-card h3,
.sffc-opportunities-card h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: #333;
}

.sffc-skills-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sffc-skill-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.sffc-skill-rank {
    width: 25px;
    height: 25px;
    background: #132D51;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

.sffc-skill-info {
    flex: 1;
}

.sffc-skill-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.sffc-skill-stats {
    font-size: 13px;
    color: #666;
}

.sffc-skill-importance {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.sffc-skill-importance.high {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.sffc-skill-importance.medium {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.sffc-skill-importance.low {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

/* Recommendations */
.sffc-recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sffc-recommendation {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2C5530;
}

.sffc-rec-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.sffc-rec-skill {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.sffc-rec-priority {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.sffc-rec-priority.high {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.sffc-rec-priority.medium {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.sffc-rec-priority.low {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.sffc-rec-impact {
    font-size: 13px;
    color: #27ae60;
}

/* Opportunities */
.sffc-opps-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sffc-opp-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sffc-opp-item:hover {
    background: #e8e8e8;
    transform: translateX(5px);
}

.sffc-opp-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.sffc-opp-company {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.sffc-opp-match {
    font-size: 13px;
    color: #132D51;
}

/* Trends Section */
.sffc-trends-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.sffc-categories-card {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 20px;
}

.sffc-categories-card h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: #333;
}

.sffc-categories-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sffc-category-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.sffc-cat-rank {
    width: 25px;
    height: 25px;
    background: #2C5530;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

.sffc-cat-name {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.sffc-cat-views {
    font-size: 13px;
    color: #666;
}

/* Error State */
.sffc-error-message {
    text-align: center;
    padding: 60px 20px;
}

.sffc-error-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.sffc-error-message p {
    color: #666;
    font-size: 16px;
}

/* No Data States */
.sffc-no-activity,
.sffc-no-applications,
.sffc-no-data {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .sffc-analytics-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .sffc-period-selector {
        width: 100%;
        justify-content: center;
    }
    
    .sffc-analytics-nav {
        overflow-x: scroll;
    }
    
    .sffc-analytics-content {
        padding: 20px;
    }
    
    .sffc-metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .sffc-metric-value {
        font-size: 28px;
    }
    
    .sffc-charts-grid {
        grid-template-columns: 1fr;
    }
    
    .sffc-match-analysis {
        grid-template-columns: 1fr;
    }
    
    .sffc-trends-section {
        grid-template-columns: 1fr;
    }
    
    .sffc-rates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sffc-apps-table {
        overflow-x: auto;
    }
    
    .sffc-apps-table table {
        min-width: 500px;
    }
}