:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --dark-color: #212529;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f5f6fa;
    color: #212529;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.3px;
}

.container {
    flex: 1;
}

footer {
    margin-top: auto;
}

/* ── Cards ─────────────────────────────────── */
.card {
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    margin-bottom: 0;
    border: 1px solid rgba(0,0,0,0.07);
    border-radius: 10px;
}

.card-header {
    font-weight: 600;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.07);
}

.btn { border-radius: 6px; }
.alert { border-radius: 8px; }

.table {
    background-color: white;
    font-size: 0.92rem;
}

/* ── Stat cards ─────────────────────────────── */
.stat-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.stat-icon {
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.78rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Avatars ─────────────────────────────────── */
.profile-pic {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #dee2e6;
}

.default-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
}

.default-avatar-sm {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ── Leaderboard ─────────────────────────────── */
.leaderboard-rank {
    width: 24px;
    text-align: center;
    font-size: 0.85rem;
}

/* ── Feed ─────────────────────────────────────── */
.feed-card {
    transition: box-shadow 0.15s;
    border-radius: 12px !important;
}
.feed-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1) !important;
}

/* ── Workout cards ───────────────────────────── */
.workout-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border-radius: 12px !important;
}
.workout-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12) !important;
}

/* ── Notifications ───────────────────────────── */
.notification-item {
    padding: 14px 16px;
    border-left: 4px solid var(--info-color);
    margin-bottom: 10px;
    background: #fff;
    border-radius: 0 8px 8px 0;
}

/* ── Admin ───────────────────────────────────── */
.admin-panel {
    border-left: 5px solid var(--danger-color);
}

/* ── Homepage hero margin fix ────────────────── */
.hero-section + .container,
section.py-5 {
    margin-top: 0;
}
