/* === Reset & Base === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Vibrant cycling palette */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #e0e7ff;
    --primary-glow: rgba(99, 102, 241, 0.15);

    --accent: #f97316;
    --accent-dark: #ea580c;
    --accent-light: #fff7ed;

    --teal: #14b8a6;
    --teal-dark: #0d9488;
    --teal-light: #ccfbf1;

    --pink: #ec4899;
    --pink-light: #fce7f3;

    --success: #22c55e;
    --success-light: #dcfce7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --info: #3b82f6;
    --info-light: #dbeafe;

    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
    --shadow-colored: 0 4px 16px rgba(99, 102, 241, 0.15);

    --sidebar-width: 260px;
    --header-height: 68px;

    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    background-image: radial-gradient(at 20% 0%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
    radial-gradient(at 80% 100%, rgba(249, 115, 22, 0.04) 0%, transparent 50%),
    radial-gradient(at 0% 80%, rgba(20, 184, 166, 0.04) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* === Layout === */
.app-layout {
    min-height: 100vh;
}

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-left .logo {
    font-size: 1.6rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.header-left .logo:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--accent-dark));
    -webkit-background-clip: text;
    background-clip: text;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 8px;
}

.city-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
}

.city-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.city-select {
    padding: 8px 36px 8px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
    font-weight: 500;
    color: var(--gray-700);
    transition: all var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.city-select:hover {
    border-color: var(--primary);
}

.city-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary-light), #ede9fe);
    border-radius: var(--radius-full);
    color: var(--primary-dark);
    letter-spacing: -0.2px;
}

.app-body {
    display: flex;
    padding-top: var(--header-height);
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    bottom: 0;
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    padding: 24px 0 56px;
    overflow-y: auto;
    transition: transform var(--transition);
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin: 4px 14px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all var(--transition);
    position: relative;
}

.nav-link:hover {
    background: var(--primary-light);
    color: var(--primary);
    text-decoration: none;
    transform: translateX(3px);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.nav-link-soon {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
    justify-content: space-between;
}

.nav-soon-badge {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--gray-200);
    color: var(--gray-500);
    padding: 2px 7px;
    border-radius: 6px;
    line-height: 1;
}

.nav-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 12px 24px;
}

.app-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 32px;
    min-height: calc(100vh - var(--header-height));
}

/* === Mobile Menu Toggle === */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--gray-700);
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 149;
}

/* === Pages === */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
}

.page-title {
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 4px;
    background: linear-gradient(135deg, var(--gray-900), var(--gray-700));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.page-subtitle {
    color: var(--gray-500);
    margin-bottom: 28px;
    font-size: 0.95rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
}

.btn-accent:hover {
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.45);
}

.btn-outline {
    background: white;
    color: var(--gray-700);
    border: 1.5px solid var(--gray-200);
    box-shadow: var(--shadow);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #16a34a);
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
}

.btn-sm {
    padding: 7px 16px;
    font-size: 0.8rem;
}

.btn-full {
    width: 100%;
}

/* === Cards === */
.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 16px;
    transition: all var(--transition);
}

.card.clickable {
    cursor: pointer;
}

.card.clickable:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.15);
}

.card-header {
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-100);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(248, 250, 252, 0.8));
}

.card-header h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-800);
}

.card-body {
    padding: 18px 22px;
}

.card-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--gray-100);
    display: flex;
    gap: 8px;
    background: var(--gray-50);
}

.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

/* === Card accent variations === */
.ride-card {
    border-left: 4px solid var(--primary);
}

.trainer-card {
    border-left: 4px solid var(--accent);
}

.session-card {
    border-left: 4px solid var(--teal);
}

/* === Badges === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-lg {
    padding: 6px 16px;
    font-size: 0.8rem;
}

.badge-road {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #b91c1c;
}

.badge-mtb {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
}

.badge-travel {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}

.badge-gravel {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: #4338ca;
}

.badge-leisure {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.badge-track {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: #4338ca;
}

.badge-open {
    background: var(--success-light);
    color: #166534;
}

.badge-answered {
    background: var(--info-light);
    color: #1e40af;
}

.badge-closed {
    background: var(--gray-200);
    color: var(--gray-500);
}

.badge-in_progress {
    background: var(--info-light);
    color: #1e40af;
}

.badge-completed {
    background: var(--gray-200);
    color: var(--gray-600);
}

.badge-cancelled {
    background: var(--danger-light);
    color: #b91c1c;
}

.badge-pending {
    background: var(--warning-light);
    color: #92400e;
}

.badge-approved {
    background: var(--success-light);
    color: #166534;
}

.badge-rejected {
    background: var(--danger-light);
    color: #b91c1c;
}

.badge-requested {
    background: var(--info-light);
    color: #1e40af;
}

.badge-accepted {
    background: var(--teal-light);
    color: var(--teal-dark);
}

.badge-confirmed_by_trainer {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: #4338ca;
}

.badge-confirmed_by_client {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
    color: #9d174d;
}

/* === Forms === */
.form-container {
    max-width: 640px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    padding: 36px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: all var(--transition);
    background: white;
    color: var(--gray-800);
}

.form-input:hover {
    border-color: var(--gray-300);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Captcha widget spacing */
[id$="-captcha-container"],
#captcha-container {
    margin: 16px 0;
}

.form-error {
    color: var(--danger);
    font-size: 0.85rem;
    margin-bottom: 12px;
    min-height: 20px;
    font-weight: 500;
    padding: 8px 12px;
    background: var(--danger-light);
    border-radius: var(--radius-sm);
    display: none;
}

.form-error:not(:empty) {
    display: block;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

label.checkbox-label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    cursor: pointer;
    color: var(--gray-700);
    font-size: 0.875rem;
    line-height: 1.5;
    user-select: none;
}

label.checkbox-label input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin: 0 14px 0 0;
    padding: 0;
    border: 2px solid var(--gray-300, #d1d5db);
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 13px;
}

label.checkbox-label input[type="checkbox"]:checked {
    background-color: var(--primary, #2563eb);
    border-color: var(--primary, #2563eb);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 8l3.5 3.5L13 4.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

label.checkbox-label:hover input[type="checkbox"]:not(:checked) {
    border-color: var(--primary, #2563eb);
}

.checkbox-text {
    flex: 1;
}

label.checkbox-label a {
    color: var(--primary);
    text-underline-offset: 3px;
    font-weight: 500;
}

.form-consent {
    margin-bottom: 10px;
    padding: 12px 16px;
    background: var(--gray-50, #f9fafb);
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 8px;
    transition: border-color 0.15s;
}

.form-consent:has(input:checked) {
    border-color: var(--primary, #2563eb);
    background: #eff6ff;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* === Auth Pages === */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 60px;
    min-height: calc(100vh - var(--header-height));
}

.auth-card {
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
}

.auth-card .auth-subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 28px;
    font-size: 0.9rem;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* === Filters === */
.filters-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    align-items: center;
    flex-wrap: wrap;
    padding: 18px 22px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-md);
}

.filter-select {
    min-width: 160px;
    border-radius: var(--radius-full) !important;
    padding: 10px 16px !important;
}

/* === Welcome Banner (Dashboard) === */
.welcome-banner {
    position: relative;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9) 0%, rgba(79, 70, 229, 0.85) 40%, rgba(249, 115, 22, 0.8) 100%);
    border-radius: var(--radius-xl);
    padding: 40px 44px;
    margin-bottom: 32px;
    color: white;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.25);
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -40px;
    width: 240px;
    height: 240px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.welcome-banner::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 30%;
    width: 160px;
    height: 160px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.welcome-banner h1 {
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.welcome-banner p {
    font-size: 1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* === Section Headers === */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-100);
}

.section-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
}

.section-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-icon-rides {
    background: linear-gradient(135deg, var(--primary-light), #e0e7ff);
    color: var(--primary);
}

.section-icon-sessions {
    background: linear-gradient(135deg, var(--teal-light), #a7f3d0);
    color: var(--teal-dark);
}

/* === Detail Pages === */
.detail-header {
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gray-900), var(--gray-700));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
}

.detail-info .info-section {
    margin-bottom: 28px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.detail-info h3 {
    font-size: 0.8rem;
    margin-bottom: 16px;
    color: var(--gray-500);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-sidebar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.9);
    height: fit-content;
}

.detail-sidebar h3 {
    font-size: 0.8rem;
    margin-bottom: 16px;
    color: var(--gray-500);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.info-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9rem;
}

.info-table td:first-child {
    color: var(--gray-500);
    font-weight: 600;
    width: 140px;
    font-size: 0.85rem;
}

.info-table tr:last-child td {
    border-bottom: none;
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* === Ride Meta === */
.ride-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 6px;
}

/* === Participants === */
.participant-card {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 8px;
    background: white;
    transition: all var(--transition);
}

.participant-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.participant-name {
    font-weight: 600;
    flex: 1;
    color: var(--gray-800);
}

.participant-actions {
    display: flex;
    gap: 6px;
}

/* === Trainer === */
.trainer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-value {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-value-lg {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--teal-dark);
    background: var(--teal-light);
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.slot-card {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 16px;
    background: white;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.85rem;
    transition: all var(--transition);
}

.slot-card:hover {
    border-color: var(--teal);
    background: var(--teal-light);
}

/* === Reviews === */
.review-card {
    padding: 18px 20px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 12px;
    background: white;
    transition: all var(--transition);
}

.review-card:hover {
    box-shadow: var(--shadow);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.review-author {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--gray-800);
}

.review-score {
    font-weight: 800;
    font-size: 0.9rem;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--accent-light), #fef3c7);
    color: var(--accent-dark);
}

.review-text {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 6px;
    line-height: 1.6;
}

.review-date {
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* === Profile === */
.profile-hero {
    position: relative;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.92) 0%, rgba(79, 70, 229, 0.88) 35%, rgba(168, 85, 247, 0.85) 65%, rgba(249, 115, 22, 0.78) 100%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 48px 48px 44px;
    margin-bottom: 0;
    color: white;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.3);
}

.profile-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.profile-hero-bg::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -60px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 50%;
}

.profile-hero-bg::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 15%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.profile-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 32px;
}

.profile-avatar {
    position: relative;
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    cursor: pointer;
}

.profile-avatar-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    border: 3px solid rgba(255, 255, 255, 0.4);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
}

.profile-avatar-img {
    display: block;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.4);
    position: relative;
    z-index: 1;
}

.profile-avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--transition);
    z-index: 2;
    pointer-events: none;
}

.profile-avatar:hover .profile-avatar-overlay {
    opacity: 1;
}

.profile-avatar-overlay-icon {
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.profile-avatar-overlay-text {
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.profile-avatar-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    animation: profile-ring-spin 20s linear infinite;
}

@keyframes profile-ring-spin {
    to {
        transform: rotate(360deg);
    }
}

.profile-hero-info h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.profile-hero-email {
    opacity: 0.75;
    font-size: 0.9rem;
    margin-bottom: 14px;
}

.profile-hero-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    letter-spacing: 0.2px;
}

.profile-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.profile-badge-dot-role {
    background: #a5f3fc;
}

.profile-badge-dot-level {
    background: #fbbf24;
}

.profile-badge-dot-city {
    background: #86efac;
}

/* Stats strip */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-top: none;
    margin-bottom: 32px;
    overflow: hidden;
}

.profile-stat {
    padding: 20px 16px;
    text-align: center;
    position: relative;
}

.profile-stat:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    bottom: 20%;
    width: 1px;
    background: var(--gray-200);
}

.profile-stat-value {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.profile-stat-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Edit section */
.profile-edit {
    margin-bottom: 32px;
}

.profile-edit-title {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gray-900), var(--gray-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    letter-spacing: -0.4px;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Card sections */
.profile-card-section {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.95);
    overflow: hidden;
    transition: all var(--transition-slow);
}

.profile-card-section:hover {
    box-shadow: var(--shadow-lg);
}

.profile-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 28px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.9), rgba(241, 245, 249, 0.7));
    border-bottom: 1px solid var(--gray-100);
}

.profile-card-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-700);
    letter-spacing: -0.2px;
}

.profile-card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: center;
}

.profile-card-icon-personal {
    background-color: var(--primary-light);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

.profile-card-icon-prefs {
    background-color: var(--accent-light);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f97316' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

.profile-card-body {
    padding: 28px 28px 24px;
}

/* Profile form fields */
.pf-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    row-gap: 24px;
    align-items: end;
}

.pf-field {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

/* Uniform spacing: standalone field after a grid */
.pf-field-grid + .pf-field {
    margin-top: 24px;
}

/* Uniform spacing: consecutive standalone fields */
.rides-card-body > .pf-field + .pf-field {
    margin-top: 16px;
}

.pf-field-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.pf-field-icon {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    flex-shrink: 0;
    background-size: 14px 14px;
    background-repeat: no-repeat;
    background-position: center;
}

.pf-icon-name {
    background-color: rgba(99, 102, 241, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

.pf-icon-age {
    background-color: rgba(249, 115, 22, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f97316' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E");
}

.pf-icon-city {
    background-color: rgba(34, 197, 94, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
}

.pf-icon-level {
    background-color: rgba(168, 85, 247, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a855f7' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m18 15-6-6-6 6'/%3E%3Cpath d='m18 9-6-6-6 6'/%3E%3C/svg%3E");
}

.pf-field .form-input {
    border-radius: var(--radius);
    background: var(--gray-50);
    border-color: var(--gray-200);
    transition: all var(--transition);
    height: 46px;
    padding: 0 16px;
    font-size: 0.9rem;
    line-height: 46px;
    box-sizing: border-box;
}

.pf-field select.form-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 0 36px 0 16px;
    height: 46px;
    line-height: 46px;
    font-size: 0.9rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.pf-field .form-textarea {
    height: auto;
    padding: 12px 16px;
    line-height: 1.6;
}

.pf-field input[type="file"].form-input {
    height: auto;
    padding: 10px 16px;
    line-height: 1.4;
}

.pf-field .form-input:hover {
    background: white;
    border-color: var(--gray-300);
}

.pf-field .form-input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* --- Styled datetime-local input --- */
.pf-field input[type="datetime-local"].form-input,
.pf-field input[type="date"].form-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 0 16px;
    color: var(--gray-800);
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
}

.pf-field input[type="datetime-local"].form-input::-webkit-calendar-picker-indicator,
.pf-field input[type="date"].form-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    background-color: var(--primary-light);
    transition: all var(--transition);
    filter: none;
    opacity: 1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-size: 16px;
    background-repeat: no-repeat;
    background-position: center;
    width: 28px;
    height: 28px;
}

.pf-field input[type="datetime-local"].form-input::-webkit-calendar-picker-indicator:hover,
.pf-field input[type="date"].form-input::-webkit-calendar-picker-indicator:hover {
    background-color: var(--primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    transform: scale(1.1);
    border-radius: 6px;
}

.pf-field input[type="datetime-local"].form-input::-webkit-datetime-edit {
    padding: 0;
}

.pf-field input[type="datetime-local"].form-input::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

.pf-field-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gray-150, var(--gray-100)), transparent);
    margin: 20px 0;
}

.pf-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Ride type chips */
.chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ride-chip {
    cursor: pointer;
}

.ride-chip input {
    display: none;
}

.ride-chip-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: white;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: all var(--transition);
    box-shadow: var(--shadow);
}

.ride-chip:hover .ride-chip-label {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.ride-chip input:checked + .ride-chip-label {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary-light), #ede9fe);
    color: var(--primary-dark);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.ride-chip-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ride-chip-icon-road {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
}

.ride-chip-icon-mtb {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
}

.ride-chip-icon-travel {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.ride-chip-icon-gravel {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
}

.ride-chip-icon-leisure {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}

/* Actions bar */
.profile-actions-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-100);
}

.profile-save-btn {
    min-width: 200px;
}

/* Toast notification */
.profile-toast {
    position: fixed;
    top: calc(var(--header-height) + 16px);
    right: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--success), #16a34a);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
    z-index: 200;
    opacity: 0;
    transform: translateX(100%) scale(0.9);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.profile-toast-visible {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.profile-toast-icon {
    font-size: 1.2rem;
}

/* ── Global Toast ─── */
.app-toast {
    position: fixed;
    top: calc(var(--header-height) + 16px);
    right: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--success), #16a34a);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
    z-index: 200;
    opacity: 0;
    transform: translateX(100%) scale(0.9);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}
.app-toast-visible {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}
.app-toast-icon { font-size: 1.2rem; }

/* ── Share Button ─── */
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border: none;
    background: rgba(255,255,255,0.18);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    vertical-align: middle;
    margin-left: 10px;
    font-size: 1.1rem;
    line-height: 1;
}
.share-btn:hover { background: rgba(255,255,255,0.32); transform: scale(1.1); }
.share-btn:active { transform: scale(0.95); }
.share-btn svg { width: 18px; height: 18px; fill: currentColor; }

/* ── External Connections Section ─── */
.profile-card-icon-connections {
    background-color: #dbeafe;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E");
}

.connections-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.connection-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-secondary, #f8fafc);
    border-radius: 12px;
    border: 1px solid var(--border-color, #e2e8f0);
    transition: box-shadow 0.2s;
}

.connection-row:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.connection-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.connection-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-size: 24px;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.connection-logo-strava {
    background-color: #fc4c02;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M15.387 17.944l-2.089-4.116h-3.065L15.387 24l5.15-10.172h-3.066m-7.008-5.599l2.836 5.598h4.172L10.463 0l-7 13.828h4.169'/%3E%3C/svg%3E");
}

.connection-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.connection-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary, #1e293b);
}

.connection-status {
    font-size: 0.82rem;
    color: var(--text-muted, #94a3b8);
}

.connection-status-on {
    color: #16a34a;
    font-weight: 500;
}

.connection-actions {
    flex-shrink: 0;
}

/* Strava branded "Connect with Strava" button per guidelines */
.btn-strava-connect {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background-color: #FC5200;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.btn-strava-connect:hover {
    background-color: #e04a00;
}

.btn-strava-logo {
    display: inline-block;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M15.387 17.944l-2.089-4.116h-3.065L15.387 24l5.15-10.172h-3.066m-7.008-5.599l2.836 5.598h4.172L10.463 0l-7 13.828h4.169'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* "Powered by Strava" attribution per guidelines */
.strava-powered {
    font-size: 0.72rem;
    color: #FC5200;
    font-weight: 600;
    letter-spacing: 0.02em;
}

@media (max-width: 600px) {
    .connection-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .connection-actions {
        align-self: flex-end;
    }
}

/* ── Email Subscription Toggles ─── */
.email-sub-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    gap: 16px;
}
.email-sub-item:last-child {
    border-bottom: none;
}
.email-sub-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}
.email-sub-name {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.95rem;
}
.email-sub-desc {
    color: var(--gray-500);
    font-size: 0.82rem;
}

/* Toggle switch */
.toggle-input {
    display: none;
}
.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--gray-300);
    border-radius: 12px;
    transition: background var(--transition);
    flex-shrink: 0;
}
.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle-input:checked + .toggle-slider {
    background: var(--primary);
}
.toggle-input:checked + .toggle-slider::after {
    transform: translateX(20px);
}

.form-success {
    color: var(--success, #22c55e);
    font-size: 0.85rem;
    margin-top: 8px;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    line-height: 1.6;
}

/* Avatar fallback (used outside profile too) */
.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));
    border: 3px solid rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* === Dashboard === */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.dashboard-section {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.dashboard-section h3 {
    margin-bottom: 20px;
    color: var(--gray-800);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-section .card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 4px;
}

.dashboard-section .card {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 0;
}

/* Dashboard compact ride cards */
.dash-ride-card {
    display: flex;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--gray-100);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.18s ease;
    overflow: hidden;
}

.dash-ride-card:hover {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.10);
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.18);
}

.dash-ride-left {
    display: flex;
    align-items: center;
    padding: 0 14px;
    flex-shrink: 0;
}

.dash-ride-type-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

.dash-ride-dot-road {
    background: #6366f1;
}

.dash-ride-dot-mtb {
    background: #f59e0b;
}

.dash-ride-dot-travel {
    background: #10b981;
}

.dash-ride-dot-gravel {
    background: #8b5cf6;
}

.dash-ride-dot-leisure {
    background: #06b6d4;
}

.dash-ride-body {
    flex: 1;
    padding: 10px 14px 10px 0;
    min-width: 0;
}

.dash-ride-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}

.dash-ride-title {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-sm {
    font-size: 0.65rem;
    padding: 1px 7px;
    border-radius: 6px;
    flex-shrink: 0;
}

.dash-ride-details {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: var(--gray-500);
    flex-wrap: wrap;
}

.dash-ride-sep {
    color: var(--gray-300);
    font-weight: 700;
}

.dash-ride-participants {
    font-size: 0.72rem;
    color: var(--gray-400);
}

.dash-ride-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-left: 1px solid var(--gray-100);
    flex-shrink: 0;
    min-width: 72px;
}

.dash-ride-date-day {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
}

.dash-ride-date-time {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-500);
}

.dash-ride-card-history {
    opacity: 0.7;
}

.dash-ride-card-history:hover {
    opacity: 1;
}

.badge-completed {
    background: var(--gray-200);
    color: var(--gray-600);
}

/* Coming Soon card */
.coming-soon-card {
    text-align: center;
    padding: 48px 32px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px dashed var(--gray-200);
    border-radius: var(--radius-lg);
}

.coming-soon-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.coming-soon-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.coming-soon-desc {
    font-size: 0.9rem;
    color: var(--gray-400);
    max-width: 360px;
    margin: 0 auto;
    line-height: 1.5;
}

.coming-soon-compact {
    padding: 28px 20px;
}

.coming-soon-compact .coming-soon-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.coming-soon-compact .coming-soon-title {
    font-size: 1rem;
}

.coming-soon-compact .coming-soon-desc {
    font-size: 0.82rem;
}

/* === Admin === */
.admin-stats {
    margin-bottom: 32px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    padding: 28px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.9);
    transition: all var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.stat-card:nth-child(1) {
    border-bottom: 3px solid var(--primary);
}

.stat-card:nth-child(2) {
    border-bottom: 3px solid var(--accent);
}

.stat-card:nth-child(3) {
    border-bottom: 3px solid var(--teal);
}

.stat-card:nth-child(4) {
    border-bottom: 3px solid var(--pink);
}

.stat-card h3 {
    font-size: 2.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.stat-card p {
    color: var(--gray-500);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card.clickable {
    cursor: pointer;
}

.stat-card.stat-card-active {
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-lg), 0 0 0 3px rgba(99, 102, 241, 0.15);
    transform: translateY(-3px);
}

/* ── Profile Pill Tabs ─── */
.profile-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 28px;
    padding: 4px;
    background: var(--gray-100);
    border-radius: 12px;
    width: fit-content;
}

.profile-tab-btn {
    padding: 10px 28px;
    background: transparent;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--gray-500);
    font-weight: 600;
    white-space: nowrap;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.profile-tab-btn:hover {
    color: var(--gray-700);
    background: rgba(255, 255, 255, 0.5);
}

.profile-tab-btn.active {
    color: var(--primary);
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* ── Admin Tabs ─── */
.admin-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--gray-200);
    overflow-x: auto;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    color: var(--gray-500);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-weight: 600;
    white-space: nowrap;
    transition: all var(--transition);
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table th {
    background: var(--gray-50);
    padding: 14px 20px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--gray-500);
    border-bottom: 2px solid var(--gray-200);
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.875rem;
    color: var(--gray-700);
}

.data-table tr:hover td {
    background: var(--gray-50);
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* === States === */
.loading {
    text-align: center;
    padding: 48px;
    color: var(--gray-400);
    font-weight: 500;
}

.loading::before {
    content: '';
    display: block;
    width: 36px;
    height: 36px;
    margin: 0 auto 16px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.empty-state {
    text-align: center;
    padding: 48px;
    color: var(--gray-400);
}

.empty-state h3 {
    color: var(--gray-500);
    margin-bottom: 8px;
    font-weight: 700;
}

.empty-state p {
    color: var(--gray-400);
    margin-bottom: 16px;
}

.error {
    color: var(--danger);
    text-align: center;
    padding: 20px;
    background: var(--danger-light);
    border-radius: var(--radius);
    font-weight: 500;
}

/* === Pagination === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 280px;
        --header-height: 52px;
    }

    .app-header {
        padding: 0 12px;
    }

    .header-left {
        gap: 8px;
    }

    .header-left .logo {
        font-size: 1.25rem;
    }

    .header-right {
        gap: 8px;
    }

    .header-right .user-name {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .header-right .btn-sm {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .menu-toggle {
        display: flex;
        padding: 6px;
    }

    .app-sidebar {
        transform: translateX(-100%);
        z-index: 150;
        background: white;
        box-shadow: var(--shadow-lg);
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.open {
        display: block;
    }

    .app-content {
        margin-left: 0;
        padding: 16px 12px;
    }

    .header-center {
        display: none;
    }

    .page-title {
        font-size: 1.4rem;
    }

    .welcome-banner {
        padding: 28px 24px;
    }

    .welcome-banner h1 {
        font-size: 1.4rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-section {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .pf-field-row {
        grid-template-columns: 1fr;
    }

    .pf-field-grid {
        grid-template-columns: 1fr;
    }

    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    .profile-hero-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .profile-hero-info {
        text-align: center;
    }

    .profile-hero-badges {
        justify-content: center;
    }

    .profile-hero {
        padding: 32px 24px;
    }

    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-stat:nth-child(2)::after {
        display: none;
    }

    .profile-card-body {
        padding: 20px;
    }

    .profile-card-header {
        padding: 16px 20px;
    }

    .profile-actions-bar {
        flex-direction: column;
    }

    .profile-save-btn {
        width: 100%;
        min-width: auto;
    }

    .card-list {
        grid-template-columns: 1fr;
    }

    .slots-grid {
        grid-template-columns: 1fr;
    }

    .form-container {
        padding: 24px;
    }

    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-select {
        width: 100%;
        min-width: auto;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
    }

    .auth-card {
        padding: 28px 20px;
        margin: 0 16px;
    }

    .data-table {
        font-size: 0.8rem;
    }

    .data-table th, .data-table td {
        padding: 10px 12px;
    }

    .admin-tabs {
        gap: 0;
    }

    .tab-btn {
        padding: 10px 16px;
        font-size: 0.8rem;
    }
}

/* Small mobile (iPhone SE etc.) */
@media (max-width: 480px) {
    :root {
        --header-height: 48px;
    }

    .app-header {
        padding: 0 10px;
    }

    .header-left {
        gap: 6px;
    }

    .header-left .logo {
        font-size: 1rem;
        letter-spacing: -0.3px;
    }

    .header-right {
        gap: 6px;
    }

    .header-right .user-name {
        padding: 4px 8px;
        font-size: 0.7rem;
    }

    .header-right .btn-sm {
        padding: 4px 8px;
        font-size: 0.7rem;
    }

    .menu-toggle {
        padding: 4px;
    }

    .menu-toggle svg {
        width: 20px;
        height: 20px;
    }

    .app-content {
        padding: 12px 10px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .card-list {
        grid-template-columns: 1fr;
    }

    .ride-meta {
        flex-direction: column;
        gap: 4px;
    }

    .participant-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .welcome-banner {
        padding: 24px 16px;
    }

    .welcome-banner h1 {
        font-size: 1.2rem;
    }

    .page-title {
        font-size: 1.2rem;
    }

    .page-container {
        margin: 0;
    }

    /* Rides section on small screens */
    .rides-hero {
        padding: 20px 16px;
        border-radius: var(--radius);
    }

    .rides-hero-content h1 {
        font-size: 1.25rem;
    }

    .rides-hero-content p {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    .rides-hero-content .btn {
        font-size: 0.8rem;
        padding: 8px 16px;
    }

    .rides-hero-badges {
        gap: 6px;
    }

    .rides-hero-badges .profile-badge {
        font-size: 0.7rem;
        padding: 4px 10px;
    }

    .rides-hero-metrics {
        gap: 6px;
    }

    .rides-hero-metric {
        font-size: 0.78rem;
    }

    .rides-hero-bg::before {
        width: 150px;
        height: 150px;
        top: -40px;
        right: -30px;
    }

    .rides-hero-bg::after {
        width: 100px;
        height: 100px;
        bottom: -30px;
    }

    .rides-stats-standalone {
        margin-top: 16px;
    }

    .rides-stat {
        padding: 14px 10px;
    }

    .rides-stat-value {
        font-size: 0.95rem;
    }

    .rides-stat-label {
        font-size: 0.65rem;
    }

    .rides-card-section {
        border-radius: var(--radius);
        margin-bottom: 16px;
    }

    .rides-card-header {
        padding: 12px 16px;
        gap: 8px;
    }

    .rides-card-header h3 {
        font-size: 0.85rem;
    }

    .rides-card-icon {
        width: 30px;
        height: 30px;
        background-size: 16px 16px;
    }

    .rides-card-body {
        padding: 16px;
    }

    .rides-filter-group {
        margin-bottom: 14px;
    }

    .rides-filter-group-label {
        font-size: 0.72rem;
        margin-bottom: 8px;
    }

    .rides-filter-chip-label {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .rides-filter-chip-dot {
        width: 6px;
        height: 6px;
    }

    .rides-filter-actions {
        padding-top: 12px;
        margin-top: 14px;
    }

    .rides-filter-actions .btn {
        width: 100%;
    }

    .ride-card-enhanced {
        border-left-width: 3px;
    }

    .ride-card-enhanced .card-header {
        padding: 14px 14px 10px;
    }

    .ride-card-enhanced .card-body {
        padding: 10px 14px;
    }

    .ride-card-enhanced .card-header h4 {
        font-size: 0.88rem;
    }

    .ride-card-type-icon {
        width: 32px;
        height: 32px;
        background-size: 18px 18px;
    }

    .ride-card-info-row {
        font-size: 0.8rem;
    }

    .ride-card-footer-meta {
        padding: 10px 14px;
        font-size: 0.75rem;
    }

    .rides-actions-bar {
        padding: 16px;
        gap: 8px;
    }

    .rides-actions-bar .btn {
        font-size: 0.82rem;
    }

    .rides-form-grid {
        gap: 16px;
    }

    .pf-field-value {
        padding: 10px 12px;
        font-size: 0.82rem;
        min-height: 38px;
    }

    .participant-card-enhanced {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px;
    }

    .participant-avatar-sm {
        width: 36px;
        height: 36px;
        font-size: 0.75rem;
    }

    /* Profile on small screens */
    .profile-hero {
        padding: 24px 16px;
    }

    .profile-hero-content h2 {
        font-size: 1.3rem;
    }

    .profile-card-body {
        padding: 16px;
    }

    .profile-card-header {
        padding: 12px 16px;
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }

    /* Auth card */
    .auth-card {
        padding: 24px 16px;
        margin: 0 10px;
    }

    .btn {
        font-size: 0.85rem;
    }
}

/* ============================================
   LANDING / AUTH PAGE
   ============================================ */
.landing-page {
    display: flex;
    min-height: 100vh;
    background: var(--gray-50);
}

.landing-hero {
    flex: 1.2;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.92) 0%, rgba(79, 70, 229, 0.85) 40%, rgba(249, 115, 22, 0.75) 100%),
    url('/images/hero-bg.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
}

.landing-hero-overlay {
    position: absolute;
    inset: 0;
    background: url('/images/hero-overlay.jpg') center/cover no-repeat;
    opacity: 0.12;
    mix-blend-mode: overlay;
}

.landing-hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 520px;
}

.landing-title {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -1.5px;
    margin-bottom: 12px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    line-height: 1.1;
}

.landing-tagline {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 48px;
    line-height: 1.5;
}

.landing-features {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.landing-feature {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all var(--transition);
}

.landing-feature:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateX(4px);
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0;
    color: transparent;
    background-size: 24px 24px;
    background-repeat: no-repeat;
    background-position: center;
}

.feature-icon-rides {
    background-color: rgba(34, 197, 94, 0.3);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386efac' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18.5' cy='17.5' r='3.5'/%3E%3Ccircle cx='5.5' cy='17.5' r='3.5'/%3E%3Ccircle cx='15' cy='5' r='1'/%3E%3Cpath d='M12 17.5l3.5-7 2 0'/%3E%3Cpath d='M5.5 17.5L9 12l3.5-2'/%3E%3C/svg%3E");
}

.feature-icon-trainers {
    background-color: rgba(249, 115, 22, 0.3);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fdba74' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='6'/%3E%3Cpath d='M15.477 12.89L17 22l-5-3-5 3 1.523-9.11'/%3E%3C/svg%3E");
}

.feature-icon-community {
    background-color: rgba(236, 72, 153, 0.3);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f9a8d4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

.landing-feature h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.landing-feature p {
    font-size: 0.85rem;
    opacity: 0.8;
    line-height: 1.4;
}

/* Decorative circles */
.landing-decor {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.decor-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.decor-circle-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    background: rgba(255, 255, 255, 0.03);
}

.decor-circle-2 {
    width: 300px;
    height: 300px;
    bottom: -50px;
    left: -80px;
    background: rgba(249, 115, 22, 0.08);
}

.decor-circle-3 {
    width: 200px;
    height: 200px;
    top: 40%;
    right: 10%;
    background: rgba(236, 72, 153, 0.06);
}

/* Form panel */
.landing-form-panel {
    flex: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: white;
}

.landing-form-wrapper {
    width: 100%;
    max-width: 400px;
}

.landing-logo-mobile {
    display: none;
    text-align: center;
    margin-bottom: 24px;
}

.landing-logo-mobile h2 {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-form-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.landing-form-subtitle {
    color: var(--gray-500);
    margin-bottom: 32px;
    font-size: 0.95rem;
}

.landing-form {
    margin-bottom: 24px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.landing-form-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    color: var(--gray-400);
    font-size: 0.85rem;
}

.landing-form-divider::before,
.landing-form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

/* OAuth Buttons */
.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.btn-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid var(--gray-200);
    background: white;
    color: var(--gray-700);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn-oauth:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn-google {
    border-color: #dadce0;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #d2e3fc;
}

.btn-yandex {
    border-color: #fc3f1d;
    color: #fc3f1d;
}

.btn-yandex:hover {
    background: #fff5f2;
    border-color: #e0361a;
}

/* Landing page responsive */
@media (max-width: 960px) {
    .landing-page {
        flex-direction: column;
    }

    .landing-hero {
        flex: none;
        min-height: 340px;
        padding: 40px 24px;
    }

    .landing-title {
        font-size: 2.5rem;
    }

    .landing-tagline {
        margin-bottom: 28px;
        font-size: 1.1rem;
    }

    .landing-features {
        gap: 12px;
    }

    .landing-feature {
        padding: 12px 16px;
    }

    .landing-form-panel {
        padding: 32px 24px;
    }
}

@media (max-width: 640px) {
    .landing-hero {
        min-height: 260px;
        padding: 32px 20px;
    }

    .landing-title {
        font-size: 2rem;
    }

    .landing-features {
        display: none;
    }

    .landing-logo-mobile {
        display: block;
    }

    .landing-form-panel {
        padding: 24px 20px;
    }

    .landing-form-wrapper {
        max-width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   LANGUAGE SWITCHER
   ============================================ */
.lang-switcher {
    display: flex;
    gap: 6px;
    justify-content: center;
    padding: 12px 16px;
    margin-top: auto;
}

.app-sidebar .lang-switcher {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: 1px solid var(--gray-200);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
}

.lang-switcher-auth {
    margin-top: 24px;
}

.lang-btn {
    padding: 6px 16px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-full);
    background: white;
    color: var(--gray-500);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.lang-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.lang-btn-active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.lang-btn-active:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: transparent;
}

/* Admin user cards */
.user-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-card {
    cursor: pointer;
    transition: all var(--transition);
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.user-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-card-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.user-card-info h4 {
    margin: 0;
}

.user-card-actions {
    display: flex;
    gap: 8px;
}

.badge-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
}

.user-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.detail-full {
    grid-column: 1 / -1;
}

/* Review moderation cards */
.review-mod-card {
    border-left: 4px solid var(--pink);
}

/* ============================================
   RIDES SECTION
   ============================================ */

/* --- Rides Hero --- */
.rides-hero {
    position: relative;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.92) 0%, rgba(20, 184, 166, 0.85) 50%, rgba(249, 115, 22, 0.80) 100%);
    border-radius: var(--radius-xl);
    padding: 44px 48px;
    margin-bottom: 24px;
    color: white;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.3);
}

.rides-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.rides-hero-bg::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -60px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 50%;
}

.rides-hero-bg::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 15%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.rides-hero-content {
    position: relative;
    z-index: 1;
}

.rides-hero-content h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.rides-hero-content p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 18px;
}

.rides-hero-content .btn {
    margin-top: 12px;
}

.rides-hero-content .btn-sm {
    font-size: 13px;
    border-color: rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.8);
}

.rides-hero-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.rides-hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.rides-hero-metrics {
    display: flex;
    gap: 24px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.rides-hero-metric {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.rides-hero-metric strong {
    font-weight: 700;
}

/* --- Rides Stats Strip --- */
.rides-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
    overflow: hidden;
}

.rides-stat {
    padding: 20px 16px;
    text-align: center;
    position: relative;
}

.rides-stat:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    bottom: 20%;
    width: 1px;
    background: var(--gray-200);
}

.rides-stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2px;
}

.rides-stat-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Standalone variant — detached from hero, own border-radius */
.rides-stats-standalone {
    grid-template-columns: repeat(2, 1fr);
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    margin-top: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

/* --- Rides Card Section --- */
.rides-card-section {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.95);
    overflow: hidden;
    transition: all var(--transition-slow);
    margin-bottom: 0;
}

.rides-card-section:hover {
    box-shadow: var(--shadow-lg);
}

.rides-card-section + .rides-card-section {
    margin-top: 20px;
}

.rides-form-grid > .rides-card-section + .rides-card-section {
    margin-top: 0;
}

.rides-form-grid > .rides-card-section {
    margin-bottom: 0;
}

.rides-card-section + .card-list {
    margin-top: 24px;
}

.rides-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 28px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.9), rgba(241, 245, 249, 0.7));
    border-bottom: 1px solid var(--gray-100);
}

.rides-card-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-700);
    letter-spacing: -0.2px;
}

.rides-card-body {
    padding: 28px;
}

.rides-card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: center;
}

.rides-card-icon-filters {
    background-color: rgba(99, 102, 241, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3'/%3E%3C/svg%3E");
}

.rides-card-icon-details {
    background-color: rgba(59, 130, 246, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E");
}

.rides-card-icon-description {
    background-color: rgba(168, 85, 247, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a855f7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3C/svg%3E");
}

.rides-card-icon-participants {
    background-color: rgba(236, 72, 153, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ec4899' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

.rides-card-icon-basic {
    background-color: rgba(20, 184, 166, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314b8a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18.5' cy='17.5' r='3.5'/%3E%3Ccircle cx='5.5' cy='17.5' r='3.5'/%3E%3Ccircle cx='15' cy='5' r='1'/%3E%3Cpath d='M12 17.5l3.5-7 2 0'/%3E%3Cpath d='M5.5 17.5L9 12l3.5-2'/%3E%3C/svg%3E");
}

.rides-card-icon-schedule {
    background-color: rgba(249, 115, 22, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f97316' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}

.rides-card-icon-settings {
    background-color: rgba(100, 116, 139, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

/* --- Form field icons (rides-specific) --- */
.pf-icon-title {
    background-color: rgba(99, 102, 241, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z'/%3E%3C/svg%3E");
}

.pf-icon-description {
    background-color: rgba(168, 85, 247, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a855f7' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3C/svg%3E");
}

.pf-icon-type {
    background-color: rgba(20, 184, 166, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314b8a6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18.5' cy='17.5' r='3.5'/%3E%3Ccircle cx='5.5' cy='17.5' r='3.5'/%3E%3Ccircle cx='15' cy='5' r='1'/%3E%3Cpath d='M12 17.5l3.5-7 2 0'/%3E%3Cpath d='M5.5 17.5L9 12l3.5-2'/%3E%3C/svg%3E");
}

.pf-icon-datetime {
    background-color: rgba(249, 115, 22, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f97316' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}

.pf-icon-distance {
    background-color: rgba(34, 197, 94, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='22 12 18 12 15 21 9 3 6 12 2 12'/%3E%3C/svg%3E");
}

.pf-icon-clock {
    background-color: rgba(249, 115, 22, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f97316' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E");
}

.pf-icon-participants {
    background-color: rgba(236, 72, 153, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ec4899' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

/* --- Rides filter selects (country/city) --- */
.rides-filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-100);
}

@media (max-width: 600px) {
    .rides-filter-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

.rides-filter-select-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rides-filter-select-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rides-filter-select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--gray-800);
    background: white;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    outline: none;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%236366f1' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
}

.rides-filter-select:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.rides-filter-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow), var(--shadow-md);
}

/* --- Rides filter layout --- */
.rides-filter-group {
    margin-bottom: 20px;
}

.rides-filter-group:last-child {
    margin-bottom: 0;
}

.rides-filter-group-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rides-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rides-filter-chip {
    cursor: pointer;
}

.rides-filter-chip input {
    display: none;
}

.rides-filter-chip-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: all var(--transition);
    box-shadow: var(--shadow);
    user-select: none;
}

.rides-filter-chip:hover .rides-filter-chip-label {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.rides-filter-chip input:checked + .rides-filter-chip-label {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary-light), #ede9fe);
    color: var(--primary-dark);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.rides-filter-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rides-filter-actions {
    display: flex;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
    margin-top: 20px;
}

/* --- Read-only field value (detail page) --- */
.pf-field-value {
    padding: 12px 16px;
    background: var(--gray-50);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--gray-800);
    font-weight: 500;
    min-height: 44px;
    display: flex;
    align-items: center;
}

/* --- Enhanced Ride Card (list page) --- */
.ride-card-enhanced {
    border-left: 4px solid var(--primary);
    position: relative;
}

.ride-card-enhanced .card-header {
    gap: 12px;
}

.ride-card-type-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-size: 22px 22px;
    background-repeat: no-repeat;
    background-position: center;
}

.ride-card-type-icon-road {
    background-color: #fee2e2;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b91c1c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18.5' cy='17.5' r='3.5'/%3E%3Ccircle cx='5.5' cy='17.5' r='3.5'/%3E%3Ccircle cx='15' cy='5' r='1'/%3E%3Cpath d='M12 17.5l3.5-7 2 0'/%3E%3Cpath d='M5.5 17.5L9 12l3.5-2'/%3E%3C/svg%3E");
}

.ride-card-type-icon-mtb {
    background-color: #dcfce7;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23166534' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18.5' cy='17.5' r='3.5'/%3E%3Ccircle cx='5.5' cy='17.5' r='3.5'/%3E%3Ccircle cx='15' cy='5' r='1'/%3E%3Cpath d='M12 17.5l3.5-7 2 0'/%3E%3Cpath d='M5.5 17.5L9 12l3.5-2'/%3E%3C/svg%3E");
}

.ride-card-type-icon-travel {
    background-color: #dbeafe;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e40af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18.5' cy='17.5' r='3.5'/%3E%3Ccircle cx='5.5' cy='17.5' r='3.5'/%3E%3Ccircle cx='15' cy='5' r='1'/%3E%3Cpath d='M12 17.5l3.5-7 2 0'/%3E%3Cpath d='M5.5 17.5L9 12l3.5-2'/%3E%3C/svg%3E");
}

.ride-card-type-icon-gravel {
    background-color: #e0e7ff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234338ca' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18.5' cy='17.5' r='3.5'/%3E%3Ccircle cx='5.5' cy='17.5' r='3.5'/%3E%3Ccircle cx='15' cy='5' r='1'/%3E%3Cpath d='M12 17.5l3.5-7 2 0'/%3E%3Cpath d='M5.5 17.5L9 12l3.5-2'/%3E%3C/svg%3E");
}

.ride-card-type-icon-leisure {
    background-color: #fef3c7;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2392400e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18.5' cy='17.5' r='3.5'/%3E%3Ccircle cx='5.5' cy='17.5' r='3.5'/%3E%3Ccircle cx='15' cy='5' r='1'/%3E%3Cpath d='M12 17.5l3.5-7 2 0'/%3E%3Cpath d='M5.5 17.5L9 12l3.5-2'/%3E%3C/svg%3E");
}

.ride-card-description {
    font-size: 0.85rem;
    color: var(--gray-500);
    line-height: 1.5;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-100);
}

.ride-card-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--gray-500);
    padding: 3px 0;
}

.ride-card-info-row strong {
    color: var(--gray-700);
    font-weight: 600;
}

.ride-card-footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 22px;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
    font-size: 0.8rem;
    color: var(--gray-500);
}

.ride-card-footer-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- Event Card --- */
.event-card {
    border-left-width: 4px;
    border-left-style: solid;
}

.event-card-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.event-card-title-row h4 {
    margin: 0;
    line-height: 1.3;
}

.event-card-club {
    display: block;
    font-size: 0.78rem;
    color: var(--gray-400);
    font-weight: 500;
    margin-top: 2px;
}

.event-card-badges {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.event-card-details {
    margin-top: 8px;
}

.event-type-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-size: 22px 22px;
    background-repeat: no-repeat;
    background-position: center;
}

.event-type-icon-ride {
    background-color: #dbeafe;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18.5' cy='17.5' r='3.5'/%3E%3Ccircle cx='5.5' cy='17.5' r='3.5'/%3E%3Ccircle cx='15' cy='5' r='1'/%3E%3Cpath d='M12 17.5l3.5-7 2 0'/%3E%3Cpath d='M5.5 17.5L9 12l3.5-2'/%3E%3C/svg%3E");
}

.event-type-icon-training {
    background-color: #dcfce7;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8h1a4 4 0 010 8h-1'/%3E%3Cpath d='M2 8h16v9a4 4 0 01-4 4H6a4 4 0 01-4-4V8z'/%3E%3Cline x1='6' y1='1' x2='6' y2='4'/%3E%3Cline x1='10' y1='1' x2='10' y2='4'/%3E%3Cline x1='14' y1='1' x2='14' y2='4'/%3E%3C/svg%3E");
}

.event-type-icon-meetup {
    background-color: #fef3c7;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d97706' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 00-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 010 7.75'/%3E%3C/svg%3E");
}

.event-type-icon-race {
    background-color: #fee2e2;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z'/%3E%3Cline x1='4' y1='22' x2='4' y2='15'/%3E%3C/svg%3E");
}

.event-info-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background-size: 16px 16px;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.5;
}

.event-info-icon-date {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}

.event-info-icon-location {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
}

.event-info-icon-people {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 00-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 010 7.75'/%3E%3C/svg%3E");
}

.event-info-icon-open {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E");
}

@media (max-width: 768px) {
    .event-card .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .event-type-icon {
        width: 36px;
        height: 36px;
        background-size: 18px 18px;
    }
}

/* --- Club Events Grid --- */
.club-events-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.club-event-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 16px 18px;
    transition: all var(--transition);
}

.club-event-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--gray-300);
}

.club-event-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.club-event-card-header .event-type-icon {
    width: 36px;
    height: 36px;
    background-size: 18px 18px;
}

.club-event-card-title {
    flex: 1;
    min-width: 0;
}

.club-event-card-title h4 {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.club-event-card-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.club-event-card-meta {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--gray-100);
    font-size: 0.8rem;
    color: var(--gray-500);
}

.club-event-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- Enhanced Participant Card --- */
.participant-card-enhanced {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 16px 18px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 10px;
    background: white;
    transition: all var(--transition);
}

.participant-card-enhanced:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.participant-avatar-sm {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), #ede9fe);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid rgba(99, 102, 241, 0.15);
}

.participant-card-enhanced .participant-name {
    font-weight: 600;
    flex: 1;
    color: var(--gray-800);
}

.participant-card-enhanced .participant-actions {
    display: flex;
    gap: 6px;
}

/* --- Form Result --- */
.form-result {
    margin-top: 16px;
}

/* --- Status page action button spacing --- */
.status-action {
    display: inline-block;
    margin-top: 24px;
}

/* --- Section spacing --- */
.rides-card-section + .rides-card-section {
    margin-top: 24px;
}

.ride-detail-actions {
    display: flex;
    gap: 12px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.club-join-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: var(--primary-light);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius);
    font-size: 0.88rem;
    color: var(--gray-600);
}

#my-tickets {
    margin-top: 24px;
}

/* --- Rides Actions Bar --- */
.rides-actions-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding: 0;
    flex-wrap: wrap;
}

/* --- Rides Form Grid --- */
.rides-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
    margin-bottom: 24px;
    align-items: start;
}

.rides-form-full {
    grid-column: 1 / -1;
}

/* Ride Map */
.ride-map-container {
    height: 400px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    margin-top: 24px;
}

.ride-map-container .maplibregl-map {
    height: 100%;
    width: 100%;
}

.ride-map-container .maplibregl-ctrl-logo {
    display: none !important;
}

.gpx-filename {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* Rides section responsive */
@media (max-width: 1024px) {
    .rides-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .rides-hero {
        padding: 28px 20px;
    }

    .rides-hero-content h1 {
        font-size: 1.5rem;
    }

    .rides-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .rides-stat:nth-child(2)::after {
        display: none;
    }

    .rides-card-body {
        padding: 20px;
    }

    .rides-card-header {
        padding: 16px 20px;
    }

    .rides-actions-bar {
        flex-direction: column;
    }

    .rides-actions-bar .btn {
        width: 100%;
    }

    .rides-form-grid {
        grid-template-columns: 1fr;
    }

    .rides-hero-metrics {
        flex-direction: column;
        gap: 8px;
    }

    .ride-card-footer-meta {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }
}

/* ─── PIN Code Input ──────────────────────────────────────────────── */
.pin-label {
    text-align: center;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-secondary, #64748b);
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.pin-input-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 16px 0 8px;
}

.pin-input-box {
    width: 56px;
    height: 68px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 1.9rem;
    font-weight: 700;
    text-align: center;
    outline: none;
    background: #f8fafc;
    color: #1e293b;
    transition: border-color .15s, box-shadow .15s, transform .12s, background .15s;
    caret-color: transparent;
    padding: 0;
    -moz-appearance: textfield;
}

.pin-input-box::-webkit-outer-spin-button,
.pin-input-box::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pin-input-box:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .18);
    background: #fff;
    transform: scale(1.08);
    z-index: 1;
    position: relative;
}

.pin-input-box.pin-filled {
    border-color: #6366f1;
    background: #eef2ff;
    color: #4338ca;
}

.pin-input-box.pin-filled:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, .22);
}

@keyframes pinShake {
    0%, 100% {
        transform: translateX(0) scale(1);
    }
    20% {
        transform: translateX(-5px) scale(1);
    }
    40% {
        transform: translateX(5px) scale(1);
    }
    60% {
        transform: translateX(-5px) scale(1);
    }
    80% {
        transform: translateX(5px) scale(1);
    }
}

.pin-shake {
    animation: pinShake .4s ease;
}

@media (max-width: 480px) {
    .pin-input-group {
        gap: 8px;
    }

    .pin-input-box {
        width: 46px;
        height: 56px;
        font-size: 1.5rem;
        border-radius: 10px;
    }
}

/* ─── Short Code Modal ─────────────────────────────────────────────── */
.sc-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn .2s ease;
}

.sc-modal-dialog {
    background: var(--bg-card, #fff);
    border-radius: 20px;
    padding: 40px 36px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .18);
    animation: slideUp .25s ease;
}

.sc-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sc-modal-icon::after {
    content: "⚡";
    font-size: 28px;
    display: block;
    text-align: center;
    line-height: 64px;
    width: 100%;
}

.sc-modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--text-primary, #111);
}

.sc-modal-desc {
    color: var(--text-secondary, #555);
    font-size: .95rem;
    margin: 0 0 28px;
    line-height: 1.5;
}

.sc-modal-actions {
    display: flex;
    gap: 12px;
    flex-direction: column;
}

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--text-secondary, #777);
    font-size: .9rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: color .2s;
}

.btn-ghost:hover {
    color: var(--text-primary, #333);
}

/* ─── Short Code input (large digits) ─────────────────────────────── */
.form-input-code {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: .5em;
    text-align: center;
    padding: 16px 12px;
}

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

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

/* ══ Activities Page ═════════════════════════════════════════════ */

.activity-stats-strip {
    margin-bottom: 24px;
}

.activity-period-toggle {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.period-btn {
    padding: 6px 18px;
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--bg-secondary, #f8fafc);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted, #64748b);
    transition: all 0.2s;
}

.period-btn-active {
    background: var(--primary, #6366f1);
    color: #fff;
    border-color: var(--primary, #6366f1);
}

.activity-stats-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.activity-stat-card {
    flex: 1;
    min-width: 120px;
    background: var(--bg-secondary, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.activity-stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
}

.activity-stat-label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
    margin-top: 4px;
}

.activity-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.activity-sync-msg {
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
}

/* Upload card */
.activity-upload-wrap {
    margin: 16px 0 24px;
}

.activity-upload-card {
    background: #fff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 14px;
    padding: 8px;
}

.activity-upload-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    border: 2px dashed var(--border-color, #cbd5e1);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    text-align: center;
}

.activity-upload-dropzone:hover {
    border-color: var(--primary, #6366f1);
    background: rgba(99, 102, 241, 0.03);
}


.upload-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    background: var(--primary-light, #e0e7ff);
    border-radius: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E");
    background-size: 24px;
    background-repeat: no-repeat;
    background-position: center;
}

.upload-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary, #1e293b);
    margin: 0 0 4px;
}

.upload-hint {
    font-size: 0.82rem;
    color: var(--text-muted, #94a3b8);
    margin: 0;
}

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

.activity-empty {
    text-align: center;
    color: var(--text-muted, #64748b);
    padding: 48px 0;
    font-size: 1rem;
}

/* Activity Card */
.activity-card {
    background: #fff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 14px;
    padding: 18px 22px;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
    border-left: 4px solid var(--primary, #6366f1);
}

.activity-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border-color: var(--primary-light, #c7d2fe);
}

.activity-card-open {
    border-left-color: #FC5200;
}

.activity-card-actions {
    margin-top: 10px !important;
}

.activity-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.activity-card-date {
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
    font-weight: 500;
}

.activity-card-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary, #1e293b);
    display: flex;
    align-items: center;
    gap: 6px;
}

.strava-badge-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FC5200'%3E%3Cpath d='M15.387 17.944l-2.089-4.116h-3.065L15.387 24l5.15-10.172h-3.066m-7.008-5.599l2.836 5.598h4.172L10.463 0l-7 13.828h4.169'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    flex-shrink: 0;
}

.activity-card-summary {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.activity-metric {
    display: flex;
    flex-direction: column;
    min-width: 80px;
}

.activity-metric-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
}

.activity-metric-label {
    font-size: 0.72rem;
    color: var(--text-muted, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Expanded section */
.activity-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.activity-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.activity-detail-label {
    color: var(--text-muted, #64748b);
    font-size: 0.85rem;
}

.activity-detail-value {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary, #1e293b);
}

.activity-description {
    margin-top: 12px;
    color: var(--text-secondary, #475569);
    font-size: 0.9rem;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .activity-stats-grid {
        gap: 8px;
    }
    .activity-stat-card {
        min-width: 90px;
        padding: 12px 8px;
    }
    .activity-stat-value {
        font-size: 1.1rem;
    }
    .activity-card-summary {
        gap: 12px;
    }
    .activity-detail-grid {
        grid-template-columns: 1fr;
    }
    .activity-card-actions {
        margin-top: 20px;
    }
}

/* ========== Calendar ========== */

/* Nav controls */
.cal-nav { margin-top: 24px; }
.cal-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cal-arrow-btn {
    width: 36px; height: 36px;
    border: none; border-radius: var(--radius-full);
    background: var(--gray-100); color: var(--gray-700);
    font-size: 0.85rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, color .15s;
}
.cal-arrow-btn:hover { background: var(--primary-light); color: var(--primary); }
.cal-month-title {
    font-size: 1.3rem; font-weight: 700;
    min-width: 180px; text-align: center;
}
.cal-today-btn { margin-left: 8px; }

/* Legend */
.cal-legend {
    display: flex; gap: 16px; margin-top: 12px;
}
.cal-legend-item {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.82rem; color: var(--gray-500);
}
.cal-legend-dot {
    width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0;
}
.cal-legend-dot-event { background: var(--primary); }
.cal-legend-dot-my { background: var(--primary); }
.cal-legend-dot-ride { background: var(--teal); }
.cal-legend-dot-club { background: var(--accent); }
.cal-legend-dot-pending { background: var(--gray-300); border: 1.5px dashed var(--gray-500); width: 10px; height: 10px; }

/* Filters */
.cal-filters { margin-top: 12px; }

/* Grid */
.cal-wrapper { margin-top: 16px; }
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.cal-dow {
    text-align: center; font-weight: 700; font-size: 0.78rem;
    padding: 10px 0; color: var(--gray-400); text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Cells */
.cal-cell {
    position: relative;
    min-height: 88px;
    padding: 6px 8px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s, transform .1s;
    display: flex; flex-direction: column;
    background: #fff;
}
.cal-cell:hover {
    border-color: var(--primary);
    background: var(--primary-glow);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99,102,241,.12);
}
.cal-cell-out {
    border: none; cursor: default; background: transparent; min-height: 0;
}
.cal-cell-out:hover { transform: none; box-shadow: none; background: transparent; border: none; }
.cal-cell-today {
    border-color: var(--primary);
    box-shadow: inset 0 0 0 2px var(--primary);
}
.cal-cell-today .cal-day {
    background: var(--primary); color: #fff;
    border-radius: var(--radius-full);
    width: 28px; height: 28px; line-height: 28px; text-align: center;
    display: inline-block;
}
.cal-cell-event {
    background: var(--primary-light);
    border-color: rgba(99,102,241,.3);
}
.cal-cell-past {
    opacity: 0.55;
}
.cal-cell-past:hover { transform: none; box-shadow: none; cursor: default; }

.cal-day {
    font-weight: 600; font-size: 0.88rem; color: var(--gray-700);
    position: relative; z-index: 1;
}

/* Chips container inside cell */
.cal-cell-chips {
    position: absolute;
    bottom: 4px; left: 4px; right: 4px;
    display: flex; flex-direction: column; gap: 2px;
    z-index: 1;
}

/* Event chip */
.cal-event-chip {
    padding: 2px 6px;
    background: var(--primary); border-radius: var(--radius-sm);
    overflow: hidden;
}
.cal-event-chip-text {
    color: #fff; font-size: 0.68rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: block;
}

/* Ride chip */
.cal-ride-chip {
    padding: 2px 6px;
    background: var(--teal); border-radius: var(--radius-sm);
    overflow: hidden;
}
.cal-ride-chip-text {
    color: #fff; font-size: 0.68rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: block;
}

/* Source category chips */
.cal-chip-my { background: var(--primary); }
.cal-chip-club { background: var(--accent); }

/* Available (not joined) chip — outline style */
.cal-chip-available {
    padding: 2px 6px;
    background: transparent;
    border: 1.5px solid var(--gray-400);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
}
.cal-chip-available-text {
    color: var(--gray-500); font-size: 0.68rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: block;
}

/* Note chip */
.cal-note-chip {
    padding: 2px 6px;
    background: var(--warning, #f59e0b); border-radius: var(--radius-sm);
    overflow: hidden; cursor: pointer;
}
.cal-note-chip-text {
    color: #fff; font-size: 0.68rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: block;
}

/* Pending chip */
.cal-chip-pending { opacity: 0.6; border: 1.5px dashed rgba(255,255,255,0.7); }

/* Legend dot for available */
.cal-legend-dot-available { background: transparent; border: 2px solid var(--gray-400); width: 10px; height: 10px; }

/* Event popup items */
.cal-popup-event {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}
.cal-popup-event:last-child { border-bottom: none; }
.cal-popup-event-info { flex: 1; min-width: 0; }
.cal-popup-event-info h4 { font-size: 0.92rem; font-weight: 600; margin: 0 0 4px; color: var(--gray-800); }
.cal-popup-event-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 0.78rem; color: var(--gray-500); }
.cal-popup-event-meta .badge-sm { font-size: 0.68rem; padding: 2px 6px; }
.cal-popup-event-info .text-muted { font-size: 0.78rem; margin: 2px 0 0; }
.cal-popup-event-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

/* Plus icon — centered in cell */
.cal-cell-plus {
    position: absolute;
    top: 4px; right: 4px;
    width: 20px; height: 20px;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    color: var(--gray-400);
    font-size: 0.75rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity .15s, background .15s, color .15s;
    z-index: 2;
    cursor: pointer;
}
.cal-cell:hover .cal-cell-plus {
    opacity: 1;
}
.cal-cell-plus:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,.35);
}

/* ========== Calendar Modal ========== */
.cal-modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
}
.cal-modal-overlay.open {
    opacity: 1; pointer-events: auto;
}
.cal-modal {
    background: var(--bg-card, #fff);
    border-radius: var(--radius-lg);
    padding: 0;
    max-width: 460px; width: 100%;
    box-shadow: 0 24px 64px rgba(0,0,0,.2);
    animation: slideUp .25s ease;
    overflow: hidden;
}
.cal-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px 12px;
    border-bottom: 1px solid var(--gray-100);
}
.cal-modal-date {
    font-size: 1rem; font-weight: 700; color: var(--gray-700);
}
.cal-modal-close {
    width: 32px; height: 32px; border: none; border-radius: var(--radius-full);
    background: var(--gray-100); color: var(--gray-500);
    font-size: 1.2rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.cal-modal-close:hover { background: var(--danger-light); color: var(--danger); }

.cal-modal-body {
    padding: 20px 24px;
}
.cal-modal-form-title {
    font-size: 1.1rem; font-weight: 700; margin-bottom: 16px;
}
.cal-modal-event-title {
    font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; color: var(--gray-800);
}
.cal-modal-event-desc {
    font-size: 0.92rem; color: var(--gray-500); line-height: 1.5; white-space: pre-wrap;
}

/* Ride card inside modal */
.cal-modal-ride {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px; margin-bottom: 8px;
    background: var(--teal-light); border-radius: var(--radius);
    border-left: 4px solid var(--teal);
}
.cal-modal-ride-header {
    display: flex; align-items: center; gap: 10px;
    min-width: 0; flex: 1;
}
.cal-modal-ride-icon {
    flex-shrink: 0; color: var(--teal);
    display: flex; align-items: center;
}
.cal-modal-ride-title {
    font-weight: 600; font-size: 0.92rem; color: var(--gray-800);
    display: block;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-modal-ride-time {
    font-size: 0.8rem; color: var(--gray-500); display: block;
}
.cal-modal-divider {
    border: none; border-top: 1px solid var(--gray-200);
    margin: 12px 0;
}

.cal-modal-footer {
    display: flex; gap: 8px; justify-content: flex-end;
    padding: 12px 24px 20px;
    border-top: 1px solid var(--gray-100);
}

/* Mobile */
@media (max-width: 600px) {
    .cal-cell { min-height: 56px; padding: 4px; }
    .cal-event-chip-text { font-size: 0.65rem; }
    .cal-cell-plus { font-size: 1rem; }
    .cal-month-title { font-size: 1rem; min-width: 140px; }
    .cal-modal { max-width: 100%; border-radius: var(--radius) var(--radius) 0 0; }
    .cal-modal-overlay { align-items: flex-end; padding: 0; }
}

/* --- Clubs --- */
.form-success {
    color: var(--success, #16a34a);
    font-size: 0.85rem;
    margin-bottom: 12px;
    min-height: 20px;
    font-weight: 500;
    padding: 8px 12px;
    background: rgba(22, 163, 74, 0.1);
    border-radius: var(--radius-sm);
}

.club-avatar-upload {
    display: flex;
    align-items: center;
    gap: 16px;
}

.club-avatar-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gray-100);
    border: 2px dashed var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.club-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.club-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.club-tab-btn {
    font-size: 0.9rem;
    padding: 8px 20px;
}

.club-tab-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* === Notifications === */
.notif-wrapper { position: relative; }

.notif-bell-btn {
    background: none; border: none; cursor: pointer;
    padding: 8px; border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition); position: relative;
}
.notif-bell-btn:hover { background: var(--gray-100); }
.notif-bell-btn svg { width: 22px; height: 22px; stroke: var(--gray-600); }

.notif-badge {
    position: absolute; top: 2px; right: 2px;
    background: var(--danger, #ef4444); color: white;
    font-size: 0.6rem; font-weight: 700;
    min-width: 17px; height: 17px;
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px; line-height: 1;
    border: 2px solid white;
}

.notif-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    width: 380px; max-height: 480px;
    background: white; border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    border: 1px solid var(--gray-200);
    z-index: 200; display: flex; flex-direction: column; overflow: hidden;
}

.notif-dropdown-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px; border-bottom: 1px solid var(--gray-100);
}
.notif-dropdown-title { font-weight: 700; font-size: 0.95rem; color: var(--gray-800); }
.notif-mark-all { font-size: 0.7rem; padding: 4px 10px; }

.notif-list { overflow-y: auto; flex: 1; max-height: 360px; }

.notif-item {
    display: flex; padding: 12px 16px;
    border-bottom: 1px solid var(--gray-50);
    transition: background var(--transition);
    cursor: pointer;
}
.notif-item:hover { background: var(--gray-50); }

.notif-unread { background: #eef2ff; border-left: 3px solid var(--primary); }
.notif-unread:hover { background: #e0e7ff; }

.notif-item-body { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.notif-item-text { font-size: 0.85rem; color: var(--gray-700); line-height: 1.4; }
.notif-unread .notif-item-text { font-weight: 600; color: var(--gray-800); }
.notif-item-time { font-size: 0.72rem; color: var(--gray-400); }

.notif-empty { padding: 32px 16px; text-align: center; color: var(--gray-400); font-size: 0.875rem; }

.notif-dropdown-footer { padding: 8px 16px; border-top: 1px solid var(--gray-100); text-align: center; }
.notif-show-more { width: 100%; }

.hidden { display: none !important; }

@media (max-width: 768px) {
    .notif-dropdown {
        position: fixed; top: var(--header-height, 60px);
        left: 0; right: 0; width: 100%;
        max-height: calc(100vh - var(--header-height, 60px));
        border-radius: 0;
    }
}

/* =========================================
   FormatUtil — Distance labels
   ========================================= */
.ride-distance-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ride-distance-label {
    display: inline-block;
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

.ride-distance-short {
    background: var(--success-light, #dcfce7);
    color: #166534;
}

.ride-distance-medium {
    background: var(--warning-light, #fef9c3);
    color: #92400e;
}

.ride-distance-long {
    background: #fff7ed;
    color: #ea580c;
}

.ride-distance-marathon {
    background: var(--danger-light, #fee2e2);
    color: #b91c1c;
}

/* =========================================
   FormatUtil — Participants progress bar
   ========================================= */
.ride-participants-bar-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ride-participants-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
}

.ride-participants-bar {
    width: 56px;
    height: 5px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
}

.ride-participants-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.ride-participants-bar-fill.participants-low {
    background: var(--success);
}

.ride-participants-bar-fill.participants-medium {
    background: var(--warning);
}

.ride-participants-bar-fill.participants-high {
    background: var(--accent);
}

/* =========================================
   FormatUtil — Status badges with icons
   ========================================= */
.badge-status-open {
    background: var(--success-light, #dcfce7);
    color: #166534;
}

.badge-status-progress {
    background: var(--info-light, #dbeafe);
    color: #1e40af;
}

.badge-status-completed {
    background: var(--gray-200);
    color: var(--gray-600);
}

.badge-status-cancelled {
    background: var(--danger-light, #fee2e2);
    color: #b91c1c;
}

.badge-icon {
    font-size: 0.6em;
    margin-right: 4px;
    vertical-align: middle;
}

/* Tooltip hint for formatted dates */
.ride-date-display {
    cursor: default;
}

/* =========================================
   Dashboard — Stats strip
   ========================================= */
.dashboard-stats-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.dashboard-stat-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    transition: box-shadow var(--transition), transform var(--transition);
}

.dashboard-stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.dashboard-stat-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.dashboard-stat-label {
    font-size: 0.78rem;
    color: var(--gray-500);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
}

/* Notification group headers */
.notif-group-header {
    padding: 6px 16px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
}

.notif-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-right: 10px;
}

.notif-icon-ride { background: var(--primary-light, #e0e7ff); color: var(--primary); }
.notif-icon-club { background: var(--success-light, #dcfce7); color: var(--success); }
.notif-icon-event { background: var(--accent-light, #fff7ed); color: var(--accent); }

@media (max-width: 768px) {
    .dashboard-stats-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .dashboard-stat-card {
        padding: 14px 10px;
    }
    .dashboard-stat-value {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .dashboard-stats-strip {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
}

/* =========================================
   Activity — Metric icons
   ========================================= */
.activity-metric-icon {
    font-size: 1rem;
    line-height: 1;
    margin-bottom: 2px;
}

.activity-stat-icon {
    font-size: 1.2rem;
    line-height: 1;
    margin-bottom: 4px;
    display: block;
}

/* =========================================
   Profile — Ride type tags
   ========================================= */
.profile-ride-types-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.profile-ride-types-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-right: 4px;
}

/* =========================================
   Admin — Tables & Search
   ========================================= */
.admin-search-bar {
    margin-bottom: 20px;
}

.admin-search-input {
    max-width: 400px;
}

.admin-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    background: rgba(255, 255, 255, 0.92);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-table thead {
    background: var(--gray-50);
    position: sticky;
    top: 0;
    z-index: 1;
}

.admin-table th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--gray-500);
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

.admin-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
    vertical-align: middle;
}

.admin-table-row:hover td {
    background: var(--gray-50);
}

.admin-row-banned td {
    opacity: 0.6;
}

.admin-actions-cell {
    white-space: nowrap;
    display: flex;
    gap: 6px;
}

@media (max-width: 768px) {
    .admin-table { font-size: 0.8rem; }
    .admin-table th, .admin-table td { padding: 8px 10px; }
    .admin-search-input { max-width: 100%; }
}

/* =========================================
   Dashboard — Event Feed
   ========================================= */
.dashboard-feed {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
}

.dashboard-feed h3 {
    margin-bottom: 16px;
    color: var(--gray-800);
    font-weight: 700;
    font-size: 1.1rem;
}

.dashboard-feed-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 4px;
}

.dashboard-feed-list::-webkit-scrollbar {
    width: 5px;
}
.dashboard-feed-list::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
}

.feed-day-header {
    padding: 6px 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--gray-100);
    margin-top: 8px;
}

.feed-day-header:first-child {
    margin-top: 0;
}

.feed-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--gray-100);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none;
    color: inherit;
}

.feed-item:hover {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.10);
    transform: translateY(-1px);
    border-color: var(--primary-light);
}

.feed-item-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.feed-icon-ride { background: var(--primary-light, #e0e7ff); }
.feed-icon-event { background: var(--accent-light, #fff7ed); }
.feed-icon-training { background: var(--teal-light, #ccfbf1); }
.feed-icon-meetup { background: var(--success-light, #dcfce7); }
.feed-icon-race { background: var(--danger-light, #fee2e2); }

.feed-item-body {
    flex: 1;
    min-width: 0;
}

.feed-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feed-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--gray-500);
    margin-top: 2px;
    flex-wrap: wrap;
}

.feed-item-meta .dash-ride-sep {
    color: var(--gray-300);
}

.feed-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.feed-item-time {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
}

/* =========================================
   Dashboard — Collapsible Stats
   ========================================= */
.stats-collapsible {
    margin-bottom: 20px;
}

.stats-collapsible-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.stats-collapsible-header:hover {
    background: rgba(255, 255, 255, 0.95);
}

.stats-collapsible-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600);
}

.stats-collapsible-arrow {
    font-size: 0.7rem;
    color: var(--gray-400);
    transition: transform 0.2s ease;
}

.stats-collapsible.open .stats-collapsible-arrow {
    transform: rotate(180deg);
}

.stats-collapsible-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.stats-collapsible.open .stats-collapsible-body {
    max-height: 200px;
}

.stats-collapsible-body .dashboard-stats-strip {
    margin-top: 12px;
    margin-bottom: 0;
}

/* =========================================
   Dashboard — Mini History
   ========================================= */
.history-mini {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    padding: 24px 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.history-mini-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.history-mini-header h3 {
    color: var(--gray-800);
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
}

.history-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.history-mini-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--gray-100);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.18s ease;
}

.history-mini-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.history-mini-card-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-mini-card-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
    display: flex;
    gap: 6px;
    align-items: center;
}

@media (max-width: 768px) {
    .dashboard-feed { padding: 18px; }
    .dashboard-feed-list { max-height: 400px; }
    .history-mini-grid { grid-template-columns: 1fr; }
    .history-mini { padding: 18px; }
}

/* --- Clickable participant names --- */
.clickable {
    cursor: pointer;
    transition: color .15s ease, opacity .15s ease;
}
.clickable:hover {
    color: var(--primary, #6366f1);
    opacity: 0.85;
}

/* --- Participant row (events, clubs) --- */
.participant-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

/* --- Current user highlight in participant lists --- */
.participant-self-avatar {
    box-shadow: 0 0 0 2.5px var(--primary, #6366f1);
}
.participant-self-name {
    font-weight: 700;
}

/* --- User Profile Modal --- */
.upm-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn .2s ease;
}
.upm-dialog {
    background: var(--bg-card, #fff);
    border-radius: 20px;
    padding: 32px 28px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .18);
    animation: slideUp .25s ease;
}
.upm-loading {
    padding: 24px 0;
    color: var(--text-secondary, #64748b);
    font-size: 0.95rem;
}
.upm-error {
    padding: 24px 0;
    color: var(--danger, #ef4444);
    font-size: 0.95rem;
}
.upm-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.upm-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-weight: 700;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 1px;
}
.upm-name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
}
.upm-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}
.upm-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.upm-info-row:last-child {
    border-bottom: none;
}
.upm-label {
    font-size: 0.85rem;
    color: var(--text-secondary, #64748b);
    font-weight: 500;
}
.upm-value {
    font-size: 0.9rem;
    color: var(--text-primary, #1e293b);
    font-weight: 600;
}
.upm-close-btn {
    width: 100%;
    margin-top: 4px;
}
