/* Making Miles Dashboard - Modern Styles */

.making-miles-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Card Styling */
.making-miles-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.3s ease;
}

.making-miles-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.making-miles-card h3 {
    margin: 0 0 24px 0;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

/* CARD 1: TEAM PROGRESS */
.making-miles-team-progress {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.making-miles-team-progress h3 {
    color: #ffffff;
    margin-bottom: 20px;
}

.making-miles-progress-main {
    margin-bottom: 30px;
}

.making-miles-progress-stats {
    display: flex;
    align-items: baseline;
    margin-bottom: 12px;
}

.making-miles-current {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
    margin-right: 8px;
}

.making-miles-goal {
    font-size: 24px;
    font-weight: 400;
    opacity: 0.9;
}

.making-miles-progress-bar-container {
    width: 100%;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.making-miles-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    transition: width 0.6s ease;
    position: relative;
}

.making-miles-progress-label {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.making-miles-progress-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.making-miles-metric-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.making-miles-metric-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.making-miles-metric-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.making-miles-metric-label {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

/* CARD 2: ACTIVITY BREAKDOWN */
.making-miles-activity-breakdown {
    background: #ffffff;
}

.making-miles-activity-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.making-miles-activity-type {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.making-miles-activity-type:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.making-miles-activity-icon {
    font-size: 40px;
    min-width: 40px;
}

.making-miles-activity-info {
    flex: 1;
}

.making-miles-activity-name {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.making-miles-activity-distance {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
}

.making-miles-activity-percentage {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

/* Activity type specific colors */
.making-miles-run {
    border-left: 4px solid #ef4444;
}

.making-miles-ride {
    border-left: 4px solid #3b82f6;
}

.making-miles-walk {
    border-left: 4px solid #10b981;
}

.making-miles-hike {
    border-left: 4px solid #f59e0b;
}

.making-miles-swim {
    border-left: 4px solid #06b6d4;
}

.making-miles-rowing {
    border-left: 4px solid #8b5cf6;
}

/* CARD 3: LEADERBOARD */
.making-miles-leaderboard-card {
    background: #ffffff;
}

.making-miles-leaderboard-table {
    overflow-x: auto;
}

.making-miles-leaderboard-table table {
    width: 100%;
    border-collapse: collapse;
}

.making-miles-leaderboard-table thead {
    background: #f9fafb;
}

.making-miles-leaderboard-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.making-miles-leaderboard-table td {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.making-miles-leaderboard-table tr:last-child td {
    border-bottom: none;
}

.making-miles-leaderboard-table tr:hover {
    background: #f9fafb;
}

.making-miles-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #667eea;
    color: #ffffff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
}

.making-miles-leaderboard-table tr:nth-child(1) .making-miles-rank {
    background: #fbbf24;
}

.making-miles-leaderboard-table tr:nth-child(2) .making-miles-rank {
    background: #9ca3af;
}

.making-miles-leaderboard-table tr:nth-child(3) .making-miles-rank {
    background: #d97706;
}

.making-miles-athlete-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.making-miles-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

.making-miles-athlete-name {
    font-weight: 600;
    color: #111827;
}

.view-on-strava {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s ease;
}

.view-on-strava:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* CARD 4: RECENT ACTIVITIES */
.making-miles-recent-activities-card {
    background: #ffffff;
}

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

.making-miles-card-header h3 {
    margin: 0;
}

.making-miles-activity-filter select {
    padding: 8px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.making-miles-activity-filter select:hover {
    border-color: #667eea;
}

.making-miles-activity-filter select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.making-miles-activities-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.making-miles-activity {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.making-miles-activity:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.making-miles-activity-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.making-miles-activity-athlete {
    flex: 1;
}

.making-miles-activity-athlete .making-miles-athlete-name {
    display: block;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.making-miles-activity-date {
    font-size: 13px;
    color: #6b7280;
}

.making-miles-activity-details h4 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.making-miles-activity-name {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.making-miles-activity-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.making-miles-activity-type,
.making-miles-activity-distance {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.making-miles-view-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s ease;
}

.making-miles-view-link:hover {
    color: #764ba2;
}

/* FOOTER */
.making-miles-footer {
    text-align: center;
    padding: 30px 20px;
    color: #6b7280;
    font-size: 14px;
}

.making-miles-strava-attribution {
    margin-top: 16px;
    opacity: 0.7;
}

.strava-compatible-logo {
    display: inline-block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .making-miles-dashboard {
        padding: 16px;
    }
    
    .making-miles-card {
        padding: 20px;
    }
    
    .making-miles-current {
        font-size: 36px;
    }
    
    .making-miles-goal {
        font-size: 18px;
    }
    
    .making-miles-progress-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .making-miles-activity-types-grid {
        grid-template-columns: 1fr;
    }
    
    .making-miles-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .making-miles-activity-filter {
        width: 100%;
    }
    
    .making-miles-activity-filter select {
        width: 100%;
    }
    
    .making-miles-leaderboard-table {
        font-size: 14px;
    }
    
    .making-miles-leaderboard-table th,
    .making-miles-leaderboard-table td {
        padding: 12px 8px;
    }
}

@media (max-width: 480px) {
    .making-miles-progress-metrics {
        grid-template-columns: 1fr;
    }
    
    .making-miles-activity-stats {
        flex-direction: column;
        gap: 8px;
    }
}

/* Loading States */
.making-miles-loading {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

/* Empty States */
.making-miles-card p {
    color: #6b7280;
    margin: 0;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.making-miles-card {
    animation: slideIn 0.5s ease-out;
}

.making-miles-card:nth-child(2) {
    animation-delay: 0.1s;
}

.making-miles-card:nth-child(3) {
    animation-delay: 0.2s;
}

.making-miles-card:nth-child(4) {
    animation-delay: 0.3s;
}