:root {
    --rp-bg: #f3f6fb;
    --rp-bg-soft: #e9eef8;
    --rp-surface: rgba(255, 255, 255, .9);
    --rp-surface-strong: #ffffff;
    --rp-card: rgba(255, 255, 255, .82);
    --rp-text: #132033;
    --rp-muted: #64748b;
    --rp-border: rgba(97, 119, 153, .28);
    --rp-primary: #6d5dfc;
    --rp-primary-2: #8b5cf6;
    --rp-primary-text: #ffffff;
    --rp-blue: #248bff;
    --rp-cyan: #28b7e8;
    --rp-green: #35d66b;
    --rp-amber: #facc15;
    --rp-red: #fb7185;
    --rp-purple-soft: rgba(109, 93, 252, .16);
    --rp-blue-soft: rgba(36, 139, 255, .14);
    --rp-green-soft: rgba(53, 214, 107, .14);
    --rp-amber-soft: rgba(250, 204, 21, .18);
    --rp-shadow: 0 20px 48px rgba(42, 58, 92, .15);
    --rp-glow: 0 0 32px rgba(109, 93, 252, .24);
}

[data-bs-theme="dark"] {
    --rp-bg: #020713;
    --rp-bg-soft: #08101f;
    --rp-surface: rgba(11, 18, 33, .82);
    --rp-surface-strong: #0d1628;
    --rp-card: rgba(13, 24, 43, .72);
    --rp-text: #f7fbff;
    --rp-muted: #a8b6d6;
    --rp-border: rgba(145, 166, 216, .22);
    --rp-primary: #8b5cf6;
    --rp-primary-2: #6d5dfc;
    --rp-primary-text: #ffffff;
    --rp-blue: #38a8ff;
    --rp-cyan: #4fc3f7;
    --rp-green: #5ff082;
    --rp-amber: #ffd84d;
    --rp-red: #ff7d8d;
    --rp-purple-soft: rgba(139, 92, 246, .2);
    --rp-blue-soft: rgba(56, 168, 255, .16);
    --rp-green-soft: rgba(95, 240, 130, .14);
    --rp-amber-soft: rgba(255, 216, 77, .14);
    --rp-shadow: 0 22px 54px rgba(0, 0, 0, .42);
    --rp-glow: 0 0 40px rgba(139, 92, 246, .32);
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(109, 93, 252, .16), transparent 28rem),
        radial-gradient(circle at 85% 25%, rgba(36, 139, 255, .12), transparent 24rem),
        linear-gradient(180deg, var(--rp-bg), var(--rp-bg-soft));
    color: var(--rp-text);
    font-size: .95rem;
    padding-bottom: 8.75rem;
}

a {
    color: var(--rp-primary);
}

.ui-icon {
    display: inline-block;
    fill: none;
    height: 1em;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
    width: 1em;
}

.app-shell {
    max-width: 1180px;
    padding-top: 1.15rem;
}

.app-header {
    backdrop-filter: blur(18px);
    background: rgba(2, 7, 19, .9);
    border-bottom: 1px solid rgba(145, 166, 216, .1);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

[data-bs-theme="light"] .app-header {
    background: rgba(243, 246, 251, .92);
    color: var(--rp-text);
}

.app-header-inner {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding-bottom: .9rem;
    padding-top: .9rem;
}

.brand-lockup {
    align-items: center;
    color: inherit;
    display: inline-flex;
    gap: .85rem;
    text-decoration: none;
}

.brand-lockup:hover {
    color: inherit;
}

.brand-mark {
    align-items: center;
    background: linear-gradient(135deg, #6d5dfc, #8b5cf6);
    border-radius: 14px;
    box-shadow: 0 0 28px rgba(139, 92, 246, .38);
    color: #fff;
    display: inline-flex;
    font-size: 1.15rem;
    font-weight: 900;
    height: 54px;
    justify-content: center;
    width: 54px;
}

.app-logo-img {
    display: block;
    height: 100%;
    max-height: 48px;
    max-width: 48px;
    object-fit: contain;
    width: 100%;
}

.brand-name {
    font-size: clamp(1.7rem, 4vw, 2.35rem);
    font-weight: 900;
    letter-spacing: 0;
}

.desktop-nav {
    display: none;
    gap: .35rem;
    margin-left: auto;
}

.nav-link {
    border-radius: 999px;
    color: var(--rp-muted);
    font-weight: 700;
    padding: .5rem .85rem;
}

.nav-link:hover,
.nav-link.active {
    background: var(--rp-purple-soft);
    color: var(--rp-primary);
}

.header-actions {
    align-items: center;
    display: flex;
    gap: .6rem;
}

.theme-toggle,
.ghost-button,
.secondary-button {
    align-items: center;
    background: var(--rp-card);
    border: 1px solid var(--rp-border);
    border-radius: 999px;
    color: var(--rp-text);
    display: inline-flex;
    font-weight: 800;
    gap: .45rem;
    justify-content: center;
    min-height: 42px;
    padding: .45rem .85rem;
    text-decoration: none;
}

.theme-dot {
    background: linear-gradient(135deg, #c4b5fd, #8b5cf6);
    border-radius: 999px;
    display: inline-block;
    height: 14px;
    width: 14px;
}

.avatar-bubble,
.user-dot {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 900;
    justify-content: center;
}

.avatar-bubble {
    background: linear-gradient(135deg, #dbeafe, #8b5cf6);
    border: 3px solid rgba(255, 255, 255, .35);
    color: #07111f;
    height: 44px;
    width: 44px;
}

.account-menu {
    position: relative;
}

.account-menu-toggle {
    border: 3px solid rgba(255, 255, 255, .35);
    cursor: pointer;
    padding: 0;
}

.account-menu-toggle:focus-visible {
    outline: 3px solid rgba(196, 181, 253, .72);
    outline-offset: 3px;
}

.account-menu-panel {
    backdrop-filter: blur(18px);
    background: rgba(9, 17, 32, .96);
    border: 1px solid rgba(145, 166, 216, .22);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .48), 0 0 28px rgba(139, 92, 246, .2);
    display: none;
    min-width: 230px;
    padding: .55rem;
    position: absolute;
    right: 0;
    top: calc(100% + .65rem);
    z-index: 40;
}

.account-menu.open .account-menu-panel {
    display: grid;
    gap: .25rem;
}

.account-menu-header {
    border-bottom: 1px solid rgba(145, 166, 216, .16);
    display: grid;
    gap: .12rem;
    margin-bottom: .25rem;
    padding: .6rem .7rem .75rem;
}

.account-menu-header strong {
    color: #fff;
    font-size: .95rem;
}

.account-menu-header span {
    color: #a8b6d6;
    font-size: .78rem;
    font-weight: 700;
}

.account-menu-item {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 14px;
    color: #dbe7ff;
    display: grid;
    font-weight: 800;
    gap: .55rem;
    grid-template-columns: 1rem minmax(0, 1fr) auto;
    min-height: 42px;
    padding: .55rem .7rem;
    text-align: left;
    text-decoration: none;
    width: 100%;
}

.account-menu-item:hover,
.account-menu-item:focus-visible {
    background: rgba(139, 92, 246, .16);
    color: #fff;
    outline: 0;
}

.account-menu-item small {
    color: #8ea0c2;
    font-size: .68rem;
    font-weight: 800;
}

.account-menu-item-disabled {
    color: #8ea0c2;
    cursor: default;
}

.account-menu-item-disabled:hover {
    background: transparent;
    color: #8ea0c2;
}

.account-menu-button {
    cursor: pointer;
    font-family: inherit;
}

.account-menu-form {
    margin: 0;
}

.logout-form {
    display: none;
}

.footer {
    color: var(--rp-muted);
    padding: 1.5rem 0;
}

.page-heading {
    align-items: end;
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.1rem;
}

.page-heading h1 {
    font-size: clamp(2rem, 7vw, 3.45rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.03;
    margin: 0;
}

.page-heading p {
    color: var(--rp-muted);
    font-size: clamp(1rem, 3vw, 1.35rem);
    margin: .35rem 0 0;
}

.connectors-heading {
    margin-bottom: 1rem;
}

.connector-message {
    align-items: center;
    background: rgba(139, 92, 246, .14);
    border: 1px solid rgba(196, 181, 253, .3);
    border-radius: 18px;
    box-shadow: 0 0 28px rgba(139, 92, 246, .16);
    color: var(--rp-text);
    display: flex;
    font-weight: 800;
    gap: .65rem;
    margin-bottom: 1rem;
    padding: .85rem 1rem;
}

.connector-message .ui-icon {
    color: #c4b5fd;
    flex: 0 0 auto;
    font-size: 1.1rem;
}

.connector-message.warning {
    background: rgba(249, 115, 22, .13);
    border-color: rgba(249, 115, 22, .32);
    box-shadow: 0 0 28px rgba(249, 115, 22, .13);
}

.connector-grid {
    display: grid;
    gap: 1rem;
    padding-bottom: 1rem;
}

.connector-card {
    background:
        linear-gradient(135deg, rgba(139, 92, 246, .12), transparent 42%),
        linear-gradient(160deg, rgba(13, 24, 43, .92), rgba(6, 14, 27, .86));
    border: 1px solid rgba(145, 166, 216, .22);
    border-radius: 24px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .24);
    display: grid;
    gap: 1rem;
    min-width: 0;
    padding: 1.05rem;
}

[data-bs-theme="light"] .connector-card {
    background:
        linear-gradient(135deg, rgba(109, 93, 252, .1), transparent 42%),
        rgba(255, 255, 255, .9);
}

.connector-card-head {
    align-items: start;
    display: grid;
    gap: .85rem;
    grid-template-columns: 58px minmax(0, 1fr);
}

.connector-logo-tile {
    align-items: center;
    border-radius: 18px;
    display: inline-flex;
    height: 58px;
    justify-content: center;
    overflow: hidden;
    width: 58px;
}

.connector-logo-tile img {
    display: block;
    height: 74%;
    object-fit: contain;
    width: 74%;
}

.connector-logo-tile svg {
    display: block;
    fill: currentColor;
    height: 36px;
    width: 36px;
}

.connector-logo-strava {
    background: linear-gradient(135deg, #fc4c02, #ff8a4a);
    box-shadow: 0 0 26px rgba(252, 76, 2, .28);
    color: #fff;
}

.connector-logo-garmin {
    background: linear-gradient(135deg, #0ea5e9, #1d4ed8);
    box-shadow: 0 0 26px rgba(14, 165, 233, .25);
    color: #eaf8ff;
}

.connector-copy {
    min-width: 0;
}

.connector-copy h2 {
    color: var(--rp-text);
    font-size: 1.35rem;
    font-weight: 900;
    margin: .05rem 0 .18rem;
}

.connector-copy p,
.connector-note {
    color: var(--rp-muted);
    font-weight: 700;
    margin: 0;
}

.connector-status {
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
    grid-column: 2;
    justify-self: start;
    letter-spacing: 0;
    padding: .28rem .62rem;
}

.connector-status-not-connected {
    background: rgba(145, 166, 216, .12);
    color: #b9c6e6;
}

.connector-status-connected {
    background: rgba(95, 240, 130, .14);
    color: var(--rp-green);
}

.connector-status-needs-attention {
    background: rgba(255, 216, 77, .14);
    color: var(--rp-amber);
}

.connector-status-syncing {
    background: rgba(56, 168, 255, .16);
    color: var(--rp-blue);
}

.connector-status-coming-soon {
    background: rgba(196, 181, 253, .14);
    color: #c4b5fd;
}

.connector-meta {
    background: rgba(3, 7, 18, .22);
    border: 1px solid rgba(145, 166, 216, .14);
    border-radius: 16px;
    display: grid;
    gap: .12rem;
    padding: .75rem .85rem;
}

[data-bs-theme="light"] .connector-meta {
    background: rgba(241, 245, 249, .72);
}

.connector-meta span {
    color: var(--rp-muted);
    font-size: .74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.connector-meta strong {
    color: var(--rp-text);
    font-size: .92rem;
}

.connector-actions {
    margin: 0;
}

.connector-actions-split {
    display: grid;
    gap: .65rem;
}

.connector-action-form {
    margin: 0;
}

.connector-button {
    min-height: 46px;
    width: 100%;
}

.connector-button:disabled {
    cursor: not-allowed;
    opacity: .62;
}

.connector-card-disabled {
    opacity: .86;
}

.connector-secondary-slot {
    min-height: .1rem;
}

.connector-inline-link {
    color: var(--rp-primary);
    display: inline-flex;
    font-size: .88rem;
    font-weight: 900;
    margin-top: .45rem;
    text-decoration: none;
}

.connector-inline-link:hover {
    color: var(--rp-text);
}

.strava-api-settings {
    background: rgba(3, 7, 18, .18);
    border: 1px solid rgba(145, 166, 216, .14);
    border-radius: 18px;
    display: grid;
    gap: .8rem;
    padding: .85rem;
}

[data-bs-theme="light"] .strava-api-settings {
    background: rgba(241, 245, 249, .68);
}

.strava-api-settings-head h3 {
    color: var(--rp-text);
    font-size: 1rem;
    font-weight: 950;
    margin: 0;
}

.strava-api-settings-head p {
    color: var(--rp-muted);
    font-size: .82rem;
    font-weight: 700;
    margin: .2rem 0 0;
}

.strava-api-form {
    display: grid;
    gap: .7rem;
    margin: 0;
}

.strava-api-field {
    display: grid;
    gap: .28rem;
}

.strava-api-field label {
    color: var(--rp-muted);
    font-size: .74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.strava-api-field input {
    background: rgba(3, 7, 18, .28);
    border: 1px solid rgba(145, 166, 216, .22);
    border-radius: 14px;
    color: var(--rp-text);
    font-weight: 800;
    min-height: 42px;
    min-width: 0;
    padding: .55rem .68rem;
    width: 100%;
}

[data-bs-theme="light"] .strava-api-field input {
    background: rgba(255, 255, 255, .92);
}

.strava-api-field input::placeholder {
    color: var(--rp-muted);
    opacity: .9;
}

.strava-callback-helper {
    gap: .2rem;
}

.strava-callback-helper small {
    color: var(--rp-muted);
    font-size: .76rem;
    font-weight: 700;
}

.strava-api-remove-form {
    margin: 0;
}

@media (min-width: 768px) {
    .connector-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.activities-page {
    display: grid;
    gap: .9rem;
}

.activities-heading {
    align-items: start;
    gap: .85rem;
}

.activities-heading-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.activities-heading-actions form {
    margin: 0;
}

.activities-summary-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.activity-summary-card {
    background:
        linear-gradient(135deg, rgba(56, 168, 255, .16), transparent 62%),
        linear-gradient(160deg, rgba(13, 24, 43, .82), rgba(6, 14, 27, .68));
    border: 1px solid var(--rp-border);
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .2);
    min-width: 0;
    padding: .72rem .78rem;
}

[data-bs-theme="light"] .activity-summary-card {
    background:
        linear-gradient(135deg, rgba(36, 139, 255, .1), transparent 62%),
        rgba(255, 255, 255, .88);
}

.activity-summary-card span {
    color: var(--rp-muted);
    display: block;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.activity-summary-card strong {
    color: var(--rp-text);
    display: block;
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1.15;
    margin-top: .2rem;
    overflow-wrap: anywhere;
}

.activity-filter-panel {
    background: rgba(13, 24, 43, .58);
    border: 1px solid var(--rp-border);
    border-radius: 18px;
    display: grid;
    gap: .85rem;
    padding: .78rem;
}

[data-bs-theme="light"] .activity-filter-panel {
    background: rgba(255, 255, 255, .78);
}

.activity-filter-panel fieldset {
    border: 0;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.activity-filter-panel legend {
    color: var(--rp-muted);
    font-size: .74rem;
    font-weight: 900;
    margin-bottom: .45rem;
    text-transform: uppercase;
}

.activity-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.activity-filter-pill {
    cursor: pointer;
    flex: 1 1 auto;
    min-width: 6.4rem;
}

.activity-filter-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.activity-filter-pill span {
    align-items: center;
    background: rgba(145, 166, 216, .12);
    border: 1px solid rgba(145, 166, 216, .22);
    border-radius: 999px;
    color: var(--rp-text);
    display: flex;
    font-size: .86rem;
    font-weight: 900;
    justify-content: center;
    min-height: 42px;
    padding: .48rem .75rem;
    text-align: center;
}

.activity-filter-pill.active span,
.activity-filter-pill input:checked + span {
    background: rgba(196, 181, 253, .24);
    border-color: rgba(196, 181, 253, .5);
    color: #ddd6fe;
}

[data-bs-theme="light"] .activity-filter-pill.active span,
[data-bs-theme="light"] .activity-filter-pill input:checked + span {
    color: #4c1d95;
}

.activity-filter-submit {
    min-height: 44px;
    width: 100%;
}

.activity-card-grid {
    display: grid;
    gap: .85rem;
}

.gear-page {
    display: grid;
    gap: 1rem;
}

.gear-filter-panel {
    grid-template-columns: 1fr;
}

.gear-card-grid {
    display: grid;
    gap: .85rem;
}

.activity-card {
    background:
        radial-gradient(circle at 100% 0%, rgba(56, 168, 255, .13), transparent 16rem),
        linear-gradient(135deg, rgba(95, 240, 130, .1), transparent 52%),
        linear-gradient(160deg, rgba(13, 24, 43, .92), rgba(6, 14, 27, .84));
    border: 1px solid rgba(145, 166, 216, .22);
    border-radius: 18px;
    box-shadow: 0 16px 38px rgba(0, 0, 0, .25);
    display: grid;
    gap: .65rem;
    min-width: 0;
    padding: .82rem;
}

.activity-premium-card {
    background:
        radial-gradient(circle at 100% 0%, rgba(252, 76, 2, .16), transparent 17rem),
        linear-gradient(135deg, rgba(56, 168, 255, .12), transparent 54%),
        linear-gradient(160deg, rgba(10, 20, 38, .96), rgba(4, 10, 22, .9));
    border-color: rgba(145, 166, 216, .24);
    border-radius: 20px;
    box-shadow: 0 18px 46px rgba(0, 0, 0, .3), 0 0 26px rgba(252, 76, 2, .08);
    gap: .72rem;
    overflow: hidden;
    padding: .86rem;
}

.gear-card {
    background:
        linear-gradient(135deg, rgba(56, 168, 255, .12), transparent 54%),
        linear-gradient(160deg, rgba(13, 24, 43, .9), rgba(6, 14, 27, .82));
    border: 1px solid rgba(145, 166, 216, .2);
    border-radius: 20px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, .22);
    display: grid;
    gap: .75rem;
    min-width: 0;
    padding: .9rem;
}

[data-bs-theme="light"] .gear-card {
    background:
        linear-gradient(135deg, rgba(56, 168, 255, .1), transparent 54%),
        rgba(255, 255, 255, .88);
}

.gear-card-head {
    align-items: start;
    display: grid;
    gap: .65rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.gear-card-head h2 {
    color: var(--rp-text);
    font-size: 1.05rem;
    font-weight: 950;
    line-height: 1.15;
    margin: 0;
    overflow-wrap: anywhere;
}

.gear-card-head p {
    color: var(--rp-muted);
    font-size: .82rem;
    font-weight: 800;
    margin: .22rem 0 0;
    overflow-wrap: anywhere;
}

.activity-card-link {
    color: inherit;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.activity-card-link:hover,
.activity-card-link:focus-visible {
    border-color: rgba(95, 240, 130, .48);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .3), 0 0 22px rgba(95, 240, 130, .11);
    color: inherit;
    transform: translateY(-1px);
}

.activity-card-link:focus-visible {
    outline: 3px solid rgba(56, 168, 255, .45);
    outline-offset: 3px;
}

[data-bs-theme="light"] .activity-card {
    background:
        linear-gradient(135deg, rgba(53, 214, 107, .1), transparent 52%),
        rgba(255, 255, 255, .88);
}

[data-bs-theme="light"] .activity-premium-card {
    background:
        radial-gradient(circle at 100% 0%, rgba(252, 76, 2, .12), transparent 17rem),
        linear-gradient(135deg, rgba(36, 139, 255, .09), transparent 54%),
        rgba(255, 255, 255, .9);
}

.activity-card-head {
    align-items: start;
    display: grid;
    gap: .5rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.activity-card-head h2 {
    color: var(--rp-text);
    font-size: 1.02rem;
    font-weight: 900;
    line-height: 1.18;
    margin: 0;
    overflow-wrap: anywhere;
}

.activity-card-head p {
    color: var(--rp-muted);
    font-size: .78rem;
    font-weight: 800;
    margin: .2rem 0 0;
}

.activity-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    min-width: 0;
}

.activity-card-meta span,
.activity-meta-chip {
    background: rgba(145, 166, 216, .1);
    border: 1px solid rgba(145, 166, 216, .15);
    border-radius: 999px;
    color: var(--rp-muted);
    font-size: .7rem;
    font-weight: 900;
    max-width: 100%;
    overflow: hidden;
    padding: .22rem .46rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-card-body {
    display: grid;
    align-items: start;
    gap: .62rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-width: 0;
}

.activity-card-map-wrap {
    align-self: start;
    min-width: 0;
}

.activity-card-map {
    background:
        linear-gradient(135deg, rgba(252, 76, 2, .08), transparent 55%),
        rgba(3, 7, 18, .28);
    border: 1px solid rgba(145, 166, 216, .16);
    border-radius: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
    aspect-ratio: 1 / 1;
    height: auto;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    pointer-events: none;
    position: relative;
    width: 100%;
    z-index: 0;
}

.activity-card-map.leaflet-container,
.activity-card-map .leaflet-container {
    background: #d7e1d9;
}

.activity-card-map .leaflet-tile-pane {
    filter: saturate(.86) contrast(.98) brightness(.95);
}

.activity-card-map-empty {
    align-items: center;
    color: var(--rp-muted);
    display: flex;
    font-size: .82rem;
    font-weight: 900;
    justify-content: center;
    min-height: 0;
    padding: 1rem;
    text-align: center;
}

.activity-card-route-marker {
    background: transparent;
    border: 0;
}

.activity-card-route-marker span {
    align-items: center;
    border: 2px solid #fff;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .28);
    color: #fff;
    display: flex;
    font-size: .58rem;
    font-weight: 950;
    height: 20px;
    justify-content: center;
    width: 20px;
}

.activity-card-route-marker .start {
    background: #16a34a;
}

.activity-card-route-marker .finish {
    background: #fc4c02;
}

.activity-card-stats {
    align-self: stretch;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .04), transparent 55%),
        rgba(3, 7, 18, .3);
    border: 1px solid rgba(145, 166, 216, .14);
    border-radius: 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(5, minmax(0, 1fr));
    margin: 0;
    min-width: 0;
    overflow: hidden;
    padding: .26rem .42rem;
}

[data-bs-theme="light"] .activity-card-stats {
    background: rgba(241, 245, 249, .74);
}

.activity-stat-row {
    align-items: center;
    display: grid;
    gap: .3rem;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    min-width: 0;
    min-height: 0;
    padding: .15rem 0;
}

.activity-stat-row + .activity-stat-row {
    border-top: 1px solid rgba(145, 166, 216, .12);
}

.activity-stat-row dt {
    align-items: center;
    color: var(--rp-muted);
    display: inline-flex;
    font-size: .59rem;
    font-weight: 950;
    gap: .22rem;
    letter-spacing: 0;
    line-height: 1;
    margin: 0;
    min-width: 0;
    text-transform: uppercase;
}

.activity-stat-label span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-stat-icon {
    color: #9fb7ff;
    flex: 0 0 auto;
    fill: none;
    height: 12px;
    opacity: .86;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.1;
    width: 12px;
}

.activity-stat-icon circle {
    fill: none;
}

.activity-stat-row dd {
    color: var(--rp-text);
    font-size: .76rem;
    font-weight: 950;
    line-height: 1;
    margin: 0;
    overflow-wrap: anywhere;
    text-align: right;
}

.activity-type-pill {
    background: rgba(56, 168, 255, .16);
    border: 1px solid rgba(56, 168, 255, .34);
    border-radius: 999px;
    color: var(--rp-blue);
    font-size: .72rem;
    font-weight: 900;
    padding: .28rem .55rem;
    white-space: nowrap;
}

.activity-metrics {
    display: grid;
    gap: .42rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.activity-metrics div {
    background: rgba(3, 7, 18, .22);
    border: 1px solid rgba(145, 166, 216, .12);
    border-radius: 12px;
    min-width: 0;
    padding: .48rem .52rem;
}

[data-bs-theme="light"] .activity-metrics div {
    background: rgba(241, 245, 249, .72);
}

.activity-metrics dt {
    color: var(--rp-muted);
    font-size: .68rem;
    font-weight: 900;
    margin: 0;
    text-transform: uppercase;
}

.activity-metrics dd {
    color: var(--rp-text);
    font-size: .86rem;
    font-weight: 900;
    line-height: 1.15;
    margin: .16rem 0 0;
    overflow-wrap: anywhere;
}

.activity-card-open {
    align-items: center;
    color: #c4b5fd;
    display: inline-flex;
    font-size: .78rem;
    font-weight: 950;
    justify-self: start;
}

.activities-empty-state {
    margin-top: .25rem;
}

.activity-detail-page {
    display: grid;
    gap: .82rem;
    min-width: 0;
}

.activity-detail-hero {
    background:
        radial-gradient(circle at 100% 0%, rgba(95, 240, 130, .13), transparent 17rem),
        linear-gradient(135deg, rgba(56, 168, 255, .18), transparent 58%),
        linear-gradient(160deg, rgba(13, 24, 43, .96), rgba(5, 12, 25, .9));
    border: 1px solid rgba(145, 166, 216, .24);
    border-radius: 19px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .3), 0 0 26px rgba(56, 168, 255, .08);
    display: grid;
    gap: .7rem;
    min-width: 0;
    padding: .82rem;
}

[data-bs-theme="light"] .activity-detail-hero {
    background:
        linear-gradient(135deg, rgba(56, 168, 255, .12), transparent 58%),
        rgba(255, 255, 255, .9);
}

.activity-detail-topbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: space-between;
}

.activity-back-link,
.activity-strava-link {
    min-height: 38px;
    padding: .42rem .72rem;
}

.activity-detail-title-row {
    align-items: start;
    display: grid;
    gap: .65rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.activity-detail-title-row h1 {
    color: var(--rp-text);
    font-size: clamp(1.35rem, 7vw, 2rem);
    font-weight: 950;
    letter-spacing: 0;
    line-height: 1.02;
    margin: 0;
    overflow-wrap: anywhere;
}

.activity-detail-title-row p,
.activity-detail-meta {
    color: var(--rp-muted);
    font-size: .78rem;
    font-weight: 800;
}

.activity-detail-title-row p {
    margin: .35rem 0 0;
}

.activity-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .38rem;
}

.activity-detail-meta span {
    background: rgba(145, 166, 216, .12);
    border: 1px solid rgba(145, 166, 216, .18);
    border-radius: 999px;
    max-width: 100%;
    overflow: hidden;
    padding: .24rem .5rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-flag-row {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.activity-detail-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.activity-detail-actions form,
.activity-charts-section form,
.activity-chart-empty form {
    margin: 0;
}

.activity-detail-stat-grid {
    display: grid;
    gap: .46rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.activity-detail-stat-grid article {
    background:
        linear-gradient(145deg, rgba(14, 25, 46, .78), rgba(5, 12, 25, .64));
    border: 1px solid rgba(145, 166, 216, .16);
    border-radius: 13px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
    min-width: 0;
    padding: .54rem .58rem;
}

.activity-detail-stat-grid article.featured {
    border-color: rgba(56, 168, 255, .26);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 0 18px rgba(56, 168, 255, .08);
}

[data-bs-theme="light"] .activity-detail-stat-grid article {
    background: rgba(255, 255, 255, .82);
}

.activity-detail-stat-grid span {
    color: var(--rp-muted);
    display: block;
    font-size: .66rem;
    font-weight: 900;
    text-transform: uppercase;
}

.activity-detail-stat-grid strong {
    color: var(--rp-text);
    display: block;
    font-size: .93rem;
    font-weight: 950;
    line-height: 1.12;
    margin-top: .18rem;
    overflow-wrap: anywhere;
}

.activity-detail-stat-grid strong small {
    color: var(--rp-muted);
    font-size: .68rem;
    font-weight: 900;
}

.activity-status-chip {
    background: rgba(196, 181, 253, .14);
    border: 1px solid rgba(196, 181, 253, .28);
    border-radius: 999px;
    color: #ddd6fe;
    font-size: .68rem;
    font-weight: 950;
    padding: .22rem .48rem;
}

.activity-status-chip.danger {
    background: rgba(251, 113, 133, .14);
    border-color: rgba(251, 113, 133, .32);
    color: #fca5a5;
}

[data-bs-theme="light"] .activity-status-chip {
    color: #5b21b6;
}

[data-bs-theme="light"] .activity-status-chip.danger {
    color: #9f1239;
}

.activity-gear-card {
    background:
        linear-gradient(135deg, rgba(196, 181, 253, .12), transparent 55%),
        rgba(13, 24, 43, .62);
    border: 1px solid rgba(145, 166, 216, .18);
    border-radius: 17px;
    display: grid;
    gap: .55rem;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    padding: .72rem;
}

[data-bs-theme="light"] .activity-gear-card {
    background:
        linear-gradient(135deg, rgba(139, 92, 246, .08), transparent 55%),
        rgba(255, 255, 255, .84);
}

.activity-gear-card div {
    min-width: 0;
}

.activity-gear-card span {
    color: var(--rp-muted);
    display: block;
    font-size: .66rem;
    font-weight: 900;
    text-transform: uppercase;
}

.activity-gear-card strong {
    color: var(--rp-text);
    display: block;
    font-size: .96rem;
    font-weight: 950;
    line-height: 1.15;
    margin-top: .15rem;
    overflow-wrap: anywhere;
}

.activity-gear-card small {
    color: var(--rp-muted);
    display: block;
    font-size: .78rem;
    font-weight: 800;
    margin-top: .1rem;
    overflow-wrap: anywhere;
}

.activity-route-card {
    background:
        linear-gradient(135deg, rgba(95, 240, 130, .11), transparent 55%),
        rgba(13, 24, 43, .64);
    border: 1px solid rgba(145, 166, 216, .18);
    border-radius: 18px;
    display: grid;
    gap: .65rem;
    min-width: 0;
    padding: .78rem;
}

[data-bs-theme="light"] .activity-route-card {
    background:
        linear-gradient(135deg, rgba(53, 214, 107, .09), transparent 55%),
        rgba(255, 255, 255, .84);
}

.activity-route-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: .75rem;
}

.activity-route-head h2 {
    color: var(--rp-text);
    font-size: 1.02rem;
    font-weight: 950;
    margin: 0;
}

.activity-route-head span,
.activity-route-card p,
.activity-route-empty {
    color: var(--rp-muted);
    font-size: .78rem;
    font-weight: 800;
}

.activity-route-card p {
    margin: 0;
}

.activity-route-map {
    background: rgba(3, 7, 18, .3);
    border: 1px solid rgba(145, 166, 216, .16);
    border-radius: 15px;
    height: 300px;
    min-width: 0;
    overflow: hidden;
    width: 100%;
    z-index: 0;
}

.activity-route-empty {
    align-items: center;
    background: rgba(3, 7, 18, .22);
    border: 1px solid rgba(145, 166, 216, .14);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    min-height: 150px;
    padding: 1rem;
    text-align: center;
}

.activity-route-map .leaflet-control-container {
    font-family: inherit;
}

.activity-route-map .leaflet-control-zoom a,
.activity-route-map .leaflet-control-attribution {
    background: rgba(13, 24, 43, .88);
    border-color: rgba(145, 166, 216, .2);
    color: var(--rp-text);
}

.activity-route-map .leaflet-control-zoom a {
    border-bottom-color: rgba(145, 166, 216, .18);
}

.activity-route-map .leaflet-control-attribution a {
    color: var(--rp-blue);
}

.activity-route-map-empty {
    align-items: center;
    color: var(--rp-muted);
    display: flex;
    font-size: .88rem;
    font-weight: 800;
    justify-content: center;
}

.activity-charts-section {
    background:
        linear-gradient(135deg, rgba(196, 181, 253, .1), transparent 55%),
        rgba(13, 24, 43, .64);
    border: 1px solid rgba(145, 166, 216, .18);
    border-radius: 18px;
    display: grid;
    gap: .7rem;
    min-width: 0;
    padding: .78rem;
}

[data-bs-theme="light"] .activity-charts-section {
    background:
        linear-gradient(135deg, rgba(139, 92, 246, .08), transparent 55%),
        rgba(255, 255, 255, .84);
}

.activity-chart-grid {
    display: grid;
    gap: .75rem;
    min-width: 0;
}

.activity-chart-card {
    background:
        linear-gradient(145deg, rgba(3, 7, 18, .34), rgba(14, 25, 46, .42));
    border: 1px solid rgba(145, 166, 216, .14);
    border-radius: 15px;
    display: grid;
    gap: .5rem;
    min-width: 0;
    padding: .68rem;
}

[data-bs-theme="light"] .activity-chart-card {
    background: rgba(241, 245, 249, .7);
}

.activity-chart-card-head {
    align-items: center;
    display: flex;
    gap: .5rem;
    justify-content: space-between;
    min-width: 0;
}

.activity-chart-card h3 {
    color: var(--rp-text);
    font-size: .9rem;
    font-weight: 950;
    margin: 0;
}

.activity-chart-card-head span {
    background: rgba(145, 166, 216, .1);
    border: 1px solid rgba(145, 166, 216, .16);
    border-radius: 999px;
    color: var(--rp-muted);
    flex: 0 1 auto;
    font-size: .68rem;
    font-weight: 950;
    max-width: 58%;
    overflow: hidden;
    padding: .2rem .42rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-chart-frame {
    height: 238px;
    min-width: 0;
    position: relative;
}

.activity-chart-frame canvas {
    display: block;
    height: 100% !important;
    width: 100% !important;
}

.activity-chart-empty {
    align-items: start;
    background: rgba(3, 7, 18, .22);
    border: 1px solid rgba(145, 166, 216, .14);
    border-radius: 15px;
    display: grid;
    gap: .7rem;
    padding: .85rem;
}

.activity-chart-empty p {
    color: var(--rp-muted);
    font-size: .88rem;
    font-weight: 800;
    margin: 0;
}

.activity-detail-empty {
    display: grid;
    gap: .75rem;
    justify-items: start;
    padding: 1rem;
}

.activity-detail-empty h1 {
    color: var(--rp-text);
    font-size: 1.35rem;
    font-weight: 950;
    margin: 0;
}

@media (min-width: 768px) {
    .activities-summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .activity-filter-panel {
        grid-template-columns: 1.2fr 1.1fr 1fr auto;
        align-items: end;
    }

    .activity-filter-submit {
        min-width: 7rem;
        width: auto;
    }

    .activity-card-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .activity-premium-card {
        padding: 1rem;
    }

    .activity-card-body {
        align-items: stretch;
        grid-template-columns: minmax(0, 1fr) minmax(190px, 230px);
    }

    .activity-card-map {
        aspect-ratio: auto;
        height: 226px;
    }

    .activity-card-stats {
        grid-template-columns: minmax(0, 1fr);
        padding: .42rem .56rem;
    }

    .activity-stat-row {
        min-height: 40px;
        padding: .28rem 0;
    }

    .activity-stat-row dt {
        font-size: .64rem;
    }

    .activity-stat-row dd {
        font-size: .88rem;
    }

    .gear-filter-panel {
        grid-template-columns: 1fr auto;
        align-items: end;
    }

    .gear-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .activity-detail-stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .activity-gear-card {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .activity-route-map {
        height: 420px;
    }

    .activity-chart-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .activity-chart-frame {
        height: 260px;
    }
}

.app-card,
.glow-card,
.stat-card,
.event-card {
    background: linear-gradient(145deg, var(--rp-card), rgba(20, 34, 59, .1));
    border: 1px solid var(--rp-border);
    border-radius: 22px;
    box-shadow: var(--rp-shadow);
    color: var(--rp-text);
}

.glow-card {
    box-shadow: var(--rp-shadow), var(--rp-glow);
    overflow: hidden;
    position: relative;
}

.glow-card::before,
.app-card::before,
.event-card::before {
    background: linear-gradient(135deg, rgba(139, 92, 246, .22), transparent 35%, rgba(56, 168, 255, .12));
    border-radius: inherit;
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.next-event-card,
.detail-hero {
    min-height: 340px;
}

.hero-image {
    background-size: cover;
    inset: 0;
    position: absolute;
}

.hero-image img,
.event-thumb img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.hero-image img {
    opacity: .72;
}

.hero-coast {
    background:
        linear-gradient(90deg, rgba(2, 7, 19, .92), rgba(2, 7, 19, .62), rgba(2, 7, 19, .22)),
        radial-gradient(circle at 80% 18%, rgba(244, 114, 182, .58), transparent 12rem),
        linear-gradient(135deg, #061321 5%, #14324b 38%, #244d45 60%, #6d5dfc 100%);
}

.hero-content {
    max-width: 720px;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.hero-content h1,
.hero-content h2 {
    color: #fff;
    font-size: clamp(2rem, 6vw, 3.35rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.08;
    margin: .5rem 0 1rem;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .5);
}

.eyebrow,
.summary-label {
    color: #b794ff;
    font-size: .85rem;
    font-weight: 900;
    letter-spacing: 0;
    margin-bottom: .2rem;
    text-transform: uppercase;
}

.meta-list {
    color: #d7def7;
    display: grid;
    gap: .5rem;
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 1.35rem;
}

.pill-row,
.filter-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.user-pill,
.status-pill,
.event-chip {
    align-items: center;
    border: 1px solid var(--rp-border);
    border-radius: 999px;
    display: inline-flex;
    font-weight: 800;
    gap: .35rem;
    line-height: 1.1;
    padding: .38rem .72rem;
}

.user-pill {
    background: var(--rp-purple-soft);
    border-color: rgba(139, 92, 246, .45);
    color: #b794ff;
}

.status-pill small {
    color: inherit;
    font-weight: 600;
    opacity: .85;
}

.status-pill.signed,
.event-chip.signed {
    background: var(--rp-green-soft);
    border-color: rgba(53, 214, 107, .5);
    color: var(--rp-green);
}

.status-pill.signed .status-symbol {
    background: rgba(13, 72, 38, .88);
    border: 1px solid rgba(104, 255, 142, .85);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(76, 220, 120, .18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    box-sizing: border-box;
}

.status-pill.signed .status-symbol .ui-icon {
    color: #76ff9a;
    stroke: #76ff9a;
    width: 12px;
    height: 12px;
}

.calendar-event-status-row .status-pill.signed .status-symbol {
    width: 20px;
    height: 20px;
}

.calendar-event-status-row .status-pill.signed .status-symbol .ui-icon {
    width: 10px;
    height: 10px;
}

.event-compact-statuses .status-pill.signed .status-symbol {
    width: 18px;
    height: 18px;
}

.event-compact-statuses .status-pill.signed .status-symbol .ui-icon {
    width: 9px;
    height: 9px;
}

.status-pill.maybe,
.event-chip.maybe {
    background: var(--rp-amber-soft);
    border-color: rgba(250, 204, 21, .55);
    color: var(--rp-amber);
}

.status-pill.interested {
    background: var(--rp-blue-soft);
    border-color: rgba(56, 168, 255, .55);
    color: #8abfff;
}

.status-pill.not-going,
.plan-card.not-going {
    background: rgba(251, 113, 133, .14);
    border-color: rgba(251, 113, 133, .45);
    color: var(--rp-red);
}

.status-pill.not-set,
.plan-card.not-set {
    background: rgba(148, 163, 184, .12);
    border-color: rgba(148, 163, 184, .3);
    color: var(--rp-muted);
}

.user-dot {
    color: #ffffff;
    height: 28px;
    width: 28px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--user-color, #7c3aed) 70%, #000000), var(--user-color, #7c3aed));
    border: 1px solid color-mix(in srgb, var(--user-color, #7c3aed) 40%, #ffffff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.primary-glow-button {
    align-items: center;
    background: linear-gradient(135deg, #7c3aed, #6d5dfc);
    border: 1px solid rgba(196, 181, 253, .35);
    border-radius: 16px;
    box-shadow: 0 0 28px rgba(139, 92, 246, .46);
    color: #fff;
    display: inline-flex;
    font-size: 1.05rem;
    font-weight: 900;
    gap: .75rem;
    justify-content: center;
    margin-top: 1.2rem;
    min-height: 58px;
    padding: .85rem 1.6rem;
    text-decoration: none;
}

.primary-glow-button:hover {
    color: #fff;
}

.warning-glow-button {
    align-items: center;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    border: 1px solid rgba(254, 215, 170, .35);
    border-radius: 16px;
    box-shadow: 0 0 28px rgba(245, 158, 11, .46);
    color: #fff;
    display: inline-flex;
    font-size: 1.05rem;
    font-weight: 900;
    gap: .75rem;
    justify-content: center;
    min-height: 58px;
    padding: .85rem 1.6rem;
    text-decoration: none;
    cursor: pointer;
}

.warning-glow-button:hover {
    color: #fff;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 0 35px rgba(245, 158, 11, .6);
}

.full-width {
    width: 100%;
}

.stat-grid,
.quick-actions,
.info-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1.1rem;
}

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

.stat-card,
.action-card {
    align-items: center;
    display: flex;
    gap: 1rem;
    padding: 1.1rem;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
}

.stat-card span,
.action-card strong,
.info-card span {
    color: var(--rp-muted);
    font-weight: 800;
}

.stat-card small,
.action-card small {
    color: var(--rp-muted);
    display: block;
}

.icon-card {
    align-items: center;
    background: var(--rp-purple-soft);
    border: 1px solid rgba(139, 92, 246, .5);
    border-radius: 16px;
    color: #b794ff;
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 900;
    height: 58px;
    justify-content: center;
    width: 58px;
}

.blue .icon-card,
.icon-card.blue {
    background: var(--rp-blue-soft);
    border-color: rgba(56, 168, 255, .45);
    color: var(--rp-blue);
}

.green .icon-card {
    background: var(--rp-green-soft);
    border-color: rgba(53, 214, 107, .45);
    color: var(--rp-green);
}

.section-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: 1.65rem 0 .85rem;
}

.section-heading h2 {
    font-size: 1.35rem;
    font-weight: 900;
    margin: 0;
}

.split-heading a,
.text-action,
.details-link,
.back-link {
    color: #b794ff;
    font-weight: 900;
    text-decoration: none;
}

.quick-actions {
    grid-template-columns: 1fr;
}

.action-card {
    position: relative;
    text-decoration: none;
}

.action-card .chevron {
    color: var(--rp-muted);
    margin-left: auto;
}

.event-list {
    display: grid;
    gap: 1rem;
}

.event-card {
    align-items: center;
    display: grid;
    gap: 1rem;
    grid-template-columns: 86px 1fr;
    padding: 1rem;
    position: relative;
}

.feature-card {
    grid-template-columns: 128px 1fr;
}

.event-thumb {
    border-radius: 16px;
    min-height: 86px;
    overflow: hidden;
}

.feature-card .event-thumb {
    min-height: 128px;
}

.thumb-coast {
    background: linear-gradient(135deg, #5bb7ff, #17476c 45%, #5c8d42);
}

.thumb-vineyard {
    background: linear-gradient(135deg, #f8d76a, #3f7f3d 48%, #163a28);
}

.thumb-city {
    background: linear-gradient(135deg, #f0a4ff, #233d75 44%, #f97316);
}

.thumb-trail {
    background: linear-gradient(135deg, #5ff082, #123d2c 50%, #6d5dfc);
}

.thumb-road {
    background: linear-gradient(135deg, #38a8ff, #102a4b 52%, #8b5cf6);
}

.thumb-ultra {
    background: linear-gradient(135deg, #8b5cf6, #34134f 48%, #fb7185);
}

.thumb-other {
    background: linear-gradient(135deg, #64748b, #172033);
}

.event-summary {
    min-width: 0;
}

.event-summary h3 {
    font-size: clamp(1.15rem, 3vw, 1.55rem);
    font-weight: 900;
    margin: .15rem 0 .4rem;
}

.event-summary p {
    color: var(--rp-muted);
    margin: .12rem 0;
}

.event-status-stack {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.details-link {
    font-size: 1.4rem;
    justify-self: end;
}

.event-chip {
    color: var(--rp-muted);
    padding: .35rem .75rem;
}

.event-chip.active {
    background: var(--rp-purple-soft);
    border-color: rgba(139, 92, 246, .7);
    color: #b794ff;
    box-shadow: 0 0 22px rgba(139, 92, 246, .24);
}

.event-chip.trail {
    background: var(--rp-green-soft);
    border-color: rgba(53, 214, 107, .42);
    color: var(--rp-green);
}

.event-chip.road {
    background: var(--rp-blue-soft);
    border-color: rgba(56, 168, 255, .45);
    color: var(--rp-blue);
}

.event-chip.ultra {
    background: var(--rp-purple-soft);
    border-color: rgba(139, 92, 246, .52);
    color: #c4b5fd;
}

.calendar-toolbar {
    align-items: center;
    display: grid;
    gap: .75rem;
    grid-template-columns: auto 1fr auto;
    margin-bottom: 1rem;
}

.calendar-toolbar h2 {
    border: 1px solid var(--rp-border);
    border-radius: 18px;
    font-size: 1.3rem;
    font-weight: 900;
    margin: 0;
    padding: .7rem;
    text-align: center;
}

.today-button {
    display: none;
}

.calendar-card,
.selected-day-panel {
    padding: 1rem;
    position: relative;
}

.calendar-weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-weekdays {
    color: var(--rp-muted);
    font-size: .8rem;
    font-weight: 900;
    margin-bottom: .5rem;
    text-align: center;
    text-transform: uppercase;
}

.calendar-cell {
    align-items: center;
    aspect-ratio: 1;
    border: 1px solid var(--rp-border);
    color: var(--rp-muted);
    display: flex;
    flex-direction: column;
    gap: .18rem;
    justify-content: center;
    min-width: 0;
    position: relative;
    text-decoration: none;
}

.calendar-cell:hover,
.calendar-cell:focus-visible {
    color: var(--rp-text);
    text-decoration: none;
}

.calendar-cell.today {
    background: var(--rp-blue-soft);
    border-radius: 14px;
    color: var(--rp-text);
}

.calendar-cell.selected {
    background: linear-gradient(135deg, #6d5dfc, #8b5cf6);
    border-radius: 16px;
    box-shadow: 0 0 28px rgba(139, 92, 246, .52);
    color: #fff;
}

.day-number {
    font-size: clamp(.95rem, 4vw, 1.5rem);
    font-weight: 900;
    text-decoration: none;
}

.event-dot {
    background: #8b5cf6;
    border-radius: 999px;
    height: 6px;
    width: 6px;
}

.calendar-users {
    display: flex;
    gap: .15rem;
}

.calendar-users .user-dot {
    font-size: .7rem;
    height: 24px;
    width: 24px;
}

.selected-day-panel h2 {
    color: #b794ff;
    font-weight: 900;
    margin-bottom: 1rem;
}

.day-event-row {
    align-items: center;
    border: 1px solid var(--rp-border);
    border-radius: 16px;
    display: grid;
    gap: .75rem;
    grid-template-columns: 62px 1fr;
    margin-bottom: .75rem;
    padding: .85rem;
}

.event-time {
    border-right: 2px solid #b794ff;
    padding-right: .7rem;
}

.event-time strong {
    display: block;
    font-size: 1.25rem;
}

.event-time span {
    color: var(--rp-muted);
    font-weight: 800;
}

.calendar-page {
    padding-bottom: 1rem;
}

.calendar-grid-card {
    overflow: hidden;
}

.calendar-day-number {
    line-height: 1;
}

.calendar-selected-day-panel {
    margin-top: .95rem;
}

.calendar-selected-date-title {
    color: #b794ff;
    font-size: clamp(1.45rem, 5vw, 2.15rem);
    font-weight: 950;
    line-height: 1.08;
    margin: 0 0 1rem;
}

.calendar-selected-events {
    display: grid;
    gap: .8rem;
}

.calendar-event-card {
    align-items: center;
    background:
        linear-gradient(135deg, rgba(139, 92, 246, .12), transparent 42%),
        linear-gradient(145deg, rgba(13, 24, 43, .82), rgba(9, 17, 31, .66));
    border: 1px solid rgba(145, 166, 216, .22);
    border-radius: 20px;
    color: var(--rp-text);
    display: grid;
    gap: .9rem;
    grid-template-columns: 58px minmax(0, 1fr) 28px;
    min-width: 0;
    padding: .9rem;
    text-decoration: none;
}

[data-bs-theme="light"] .calendar-event-card {
    background:
        linear-gradient(135deg, rgba(109, 93, 252, .1), transparent 42%),
        rgba(255, 255, 255, .82);
}

.calendar-event-card:hover,
.calendar-event-card:focus-visible {
    border-color: rgba(139, 92, 246, .58);
    box-shadow: 0 0 26px rgba(139, 92, 246, .22);
    color: var(--rp-text);
    outline: none;
    transform: translateY(-1px);
}

.calendar-event-card:active {
    transform: scale(.99);
}

.calendar-event-date-badge {
    align-items: center;
    align-self: start;
    background: rgba(139, 92, 246, .14);
    border: 1px solid rgba(183, 148, 255, .42);
    border-radius: 16px;
    color: #d8c8ff;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    min-height: 58px;
    min-width: 58px;
}

[data-bs-theme="light"] .calendar-event-date-badge {
    color: #5b21b6;
}

.calendar-event-date-badge strong {
    font-size: 1.25rem;
    line-height: 1;
}

.calendar-event-date-badge small {
    color: var(--rp-muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.calendar-event-main {
    display: grid;
    gap: .42rem;
    min-width: 0;
}

.calendar-event-title {
    color: var(--rp-text);
    display: -webkit-box;
    font-size: clamp(1.1rem, 3.4vw, 1.42rem);
    font-weight: 950;
    line-height: 1.08;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.calendar-event-location {
    align-items: center;
    color: var(--rp-muted);
    display: inline-flex;
    font-size: .92rem;
    font-weight: 750;
    gap: .4rem;
    min-width: 0;
}

.calendar-event-location .ui-icon {
    color: #b7c4e5;
    flex: 0 0 auto;
}

.calendar-event-chips,
.calendar-event-status-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .36rem;
    min-width: 0;
}

.calendar-event-chips .event-chip {
    font-size: .76rem;
    max-width: 100%;
    overflow-wrap: anywhere;
    padding: .26rem .5rem;
}

.calendar-event-status-row .status-pill {
    font-size: .78rem;
    gap: .28rem;
    padding: .22rem .48rem .22rem .24rem;
}

.calendar-event-status-row .user-dot {
    font-size: .72rem;
    height: 24px;
    width: 24px;
}

.calendar-event-status-row .status-symbol .ui-icon {
    height: .85rem;
    width: .85rem;
}

.calendar-event-chevron {
    align-items: center;
    color: #b794ff;
    display: inline-flex;
    font-size: 1.2rem;
    justify-content: center;
}

.filter-row {
    margin-bottom: 1rem;
    overflow-x: auto;
    padding-bottom: .2rem;
}

.search-row {
    display: grid;
    gap: .75rem;
    grid-template-columns: 1fr auto;
    margin-bottom: 1rem;
}

.search-box {
    background: var(--rp-card);
    border: 1px solid var(--rp-border);
    border-radius: 18px;
    color: var(--rp-text);
    min-height: 58px;
    padding: 0 1rem;
    width: 100%;
}

.search-box::placeholder {
    color: var(--rp-muted);
}

.filter-button {
    border-radius: 18px;
    min-width: 80px;
}

.events-page {
    padding-bottom: 1rem;
}

.events-filter-card {
    background: rgba(12, 22, 41, .68);
    border: 1px solid rgba(114, 138, 184, .24);
    border-radius: 8px;
    display: grid;
    gap: .65rem;
    margin-bottom: 1rem;
    padding: .75rem;
}

[data-bs-theme="light"] .events-filter-card {
    background: rgba(255, 255, 255, .78);
}

.events-filter-section {
    align-items: center;
    display: grid;
    gap: .65rem;
    grid-template-columns: 120px minmax(0, 1fr);
}

.events-filter-section-title {
    color: var(--rp-muted);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.events-filter-options {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    min-width: 0;
}

.events-filter-separator {
    background: rgba(130, 150, 190, .16);
    display: block;
    height: 1px;
}

.event-chip.interested {
    background: var(--rp-blue-soft);
    border-color: rgba(56, 168, 255, .55);
    color: #8abfff;
}

.event-chip.not-going {
    background: rgba(248, 113, 113, .12);
    border-color: rgba(248, 113, 113, .5);
    color: #fca5a5;
}

.events-list-compact {
    display: grid;
    gap: .85rem;
}

.event-compact-card {
    align-items: center;
    background: linear-gradient(145deg, rgba(12, 22, 41, .82), rgba(7, 13, 26, .72));
    border: 1px solid rgba(114, 138, 184, .28);
    border-radius: 22px;
    box-shadow: var(--rp-shadow);
    color: var(--rp-text);
    display: grid;
    gap: .9rem;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    min-height: 108px;
    min-width: 0;
    padding: .85rem;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

[data-bs-theme="light"] .event-compact-card {
    background: rgba(255, 255, 255, .86);
}

.event-compact-card:hover,
.event-compact-card:focus-visible {
    border-color: rgba(196, 181, 253, .48);
    box-shadow: var(--rp-shadow), 0 0 28px rgba(139, 92, 246, .24);
    color: var(--rp-text);
    outline: none;
    transform: translateY(-1px);
}

.event-compact-card:active {
    transform: scale(.99);
}

.event-compact-thumb {
    aspect-ratio: 1.1;
    border-radius: 16px;
    min-height: 78px;
    width: 100%;
}

.event-compact-main {
    display: grid;
    gap: .28rem;
    min-width: 0;
}

.event-compact-title {
    color: var(--rp-text);
    display: -webkit-box;
    font-size: clamp(1.06rem, 2.5vw, 1.38rem);
    font-weight: 950;
    line-height: 1.12;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.event-compact-meta {
    align-items: center;
    color: var(--rp-muted);
    display: inline-flex;
    font-size: .86rem;
    font-weight: 730;
    gap: .42rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-compact-meta .ui-icon {
    color: #b7c4e5;
    flex: 0 0 auto;
}

.event-compact-bottom {
    align-items: center;
    display: flex;
    gap: .5rem;
    justify-content: space-between;
    min-width: 0;
}

.event-compact-chips,
.event-compact-statuses {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .34rem;
    min-width: 0;
}

.event-compact-chips {
    overflow: hidden;
}

.event-compact-chips .event-chip,
.event-compact-statuses .status-pill {
    font-size: .72rem;
    padding: .24rem .46rem;
}

.event-compact-statuses .status-pill {
    gap: .24rem;
    padding-left: .2rem;
}

.event-compact-statuses .user-dot {
    font-size: .68rem;
    height: 22px;
    width: 22px;
}

.event-compact-statuses .status-symbol .ui-icon {
    height: .78rem;
    width: .78rem;
}

.event-compact-chevron {
    align-items: center;
    color: #b794ff;
    display: inline-flex;
    font-size: 1.15rem;
    justify-content: center;
}

.back-link {
    display: inline-flex;
    margin-bottom: 1rem;
}

.event-detail-page {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
    width: 100%;
}

.event-detail-hero {
    box-sizing: border-box;
    border-radius: 28px;
    max-width: 100%;
    min-height: 360px;
    min-width: 0;
    overflow: hidden;
    width: 100%;
}

.event-detail-hero.glow-card {
    background: rgba(7, 13, 26, .82);
    border-color: rgba(145, 166, 216, .28);
}

.event-detail-hero::after {
    background:
        linear-gradient(90deg, rgba(2, 7, 19, .96), rgba(2, 7, 19, .7) 52%, rgba(2, 7, 19, .28)),
        linear-gradient(180deg, rgba(2, 7, 19, .08), rgba(2, 7, 19, .78));
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 1;
}

.event-detail-hero-image {
    background-size: cover;
    background-position: center;
    inset: 0;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    position: absolute;
}

.event-detail-hero-image img {
    display: block;
    height: 100%;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

.event-detail-hero-content {
    box-sizing: border-box;
    color: #fff;
    max-width: 760px;
    min-width: 0;
    padding: clamp(1.15rem, 4vw, 2.2rem);
    position: relative;
    width: 100%;
    z-index: 2;
}

.event-detail-kicker-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-bottom: .8rem;
}

.event-detail-kicker,
.event-detail-course-count {
    border: 1px solid rgba(196, 181, 253, .42);
    border-radius: 999px;
    color: #c4b5fd;
    display: inline-flex;
    font-size: .76rem;
    font-weight: 950;
    letter-spacing: .08em;
    line-height: 1;
    padding: .42rem .72rem;
    text-transform: uppercase;
}

.event-detail-course-count {
    background: rgba(11, 18, 33, .64);
    color: #d7def7;
    letter-spacing: 0;
    text-transform: none;
}

.event-detail-title {
    color: #fff;
    display: -webkit-box;
    font-size: clamp(2rem, 5.6vw, 3.45rem);
    font-weight: 950;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    letter-spacing: 0;
    line-height: 1.03;
    margin: 0 0 1rem;
    max-width: 100%;
    overflow: hidden;
    overflow-wrap: anywhere;
    text-shadow: 0 3px 24px rgba(0, 0, 0, .56);
}

.event-detail-meta {
    color: #d7def7;
    display: grid;
    gap: .5rem;
    font-size: clamp(.95rem, 2.3vw, 1.25rem);
    font-weight: 780;
}

.event-detail-location-meta {
    align-items: flex-start !important;
}

.event-detail-location-meta .ui-icon {
    margin-top: .16rem;
}

.event-detail-location-stack {
    display: grid !important;
    gap: .2rem;
    line-height: 1.32;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
}

.event-detail-location-stack strong {
    color: #fff;
    font-size: .98em;
    font-weight: 850;
}

.event-detail-meta span {
    align-items: center;
    display: inline-flex;
    gap: .55rem;
    max-width: 100%;
    min-width: 0;
}

.event-detail-meta .ui-icon {
    flex: 0 0 auto;
}

.event-detail-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 1rem;
}

.event-detail-inline-facts {
    display: flex !important;
    flex-wrap: wrap;
    gap: .35rem .8rem !important;
}

.event-detail-inline-facts span {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 999px;
    color: #edf3ff;
    font-size: .86rem;
    padding: .34rem .58rem;
}

.event-info-grid {
    box-sizing: border-box;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

.event-info-card {
    box-sizing: border-box;
    display: grid;
    gap: .45rem;
    max-width: 100%;
    min-height: 150px;
    min-width: 0;
    padding: 1rem;
    position: relative;
}

.event-info-icon {
    align-items: center;
    border-radius: 18px;
    display: inline-flex;
    height: 58px;
    justify-content: center;
    width: 58px;
}

.event-info-icon.purple {
    background: rgba(139, 92, 246, .18);
    border: 2px solid rgba(167, 139, 250, .52);
    color: #c4b5fd;
}

.event-info-icon.blue {
    background: rgba(56, 168, 255, .14);
    border: 2px solid rgba(56, 168, 255, .5);
    color: var(--rp-blue);
}

.event-info-icon .ui-icon {
    height: 1.45rem;
    width: 1.45rem;
}

.event-info-label {
    color: var(--rp-muted);
    font-weight: 900;
}

.event-info-value {
    color: var(--rp-text);
    font-size: clamp(1.05rem, 3vw, 1.45rem);
    font-weight: 950;
    line-height: 1.2;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
}

.event-info-link {
    align-self: end;
    color: #b794ff;
    font-weight: 900;
}

.event-distance-list {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    min-width: 0;
}

.event-distance-chip {
    background: var(--rp-purple-soft);
    border: 1px solid rgba(139, 92, 246, .45);
    border-radius: 999px;
    color: #c4b5fd;
    display: inline-block;
    font-size: .82rem;
    font-weight: 850;
    line-height: 1.15;
    max-width: 100%;
    overflow: hidden;
    padding: .35rem .65rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plan-card-grid {
    box-sizing: border-box;
    display: grid;
    gap: .9rem;
    max-width: 100%;
    min-width: 0;
    padding: 1rem;
    position: relative;
    width: 100%;
}

.event-plan-card {
    align-items: flex-start;
}

.event-plan-save {
    justify-self: start;
    min-width: 132px;
}

.event-plan-heading {
    margin-top: 1.15rem;
}

.event-plan-shell,
.group-plan-shell {
    display: grid;
    gap: .75rem;
    padding: 1rem;
    position: relative;
}

.event-plan-summary,
.group-plan-card {
    align-items: center;
    background: rgba(4, 10, 21, .58);
    border: 1px solid rgba(145, 166, 216, .18);
    border-radius: 18px;
    display: grid;
    gap: .85rem;
    grid-template-columns: 52px minmax(0, 1fr);
    min-width: 0;
    padding: .9rem;
}

.event-plan-avatar,
.group-plan-avatar {
    align-items: center;
    background: var(--user-color);
    border: 2px solid rgba(255, 255, 255, .22);
    border-radius: 50%;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .26);
    color: #fff;
    display: inline-flex;
    font-size: 1.1rem;
    font-weight: 950;
    height: 52px;
    justify-content: center;
    width: 52px;
}

.event-plan-main,
.group-plan-body {
    min-width: 0;
}

.event-plan-main h3,
.group-plan-body h3 {
    color: var(--rp-text);
    font-size: 1.05rem;
    font-weight: 900;
    margin: 0 0 .35rem;
}

.event-plan-meta,
.group-plan-meta {
    align-items: center;
    color: var(--rp-muted);
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .65rem;
    font-size: .9rem;
    font-weight: 760;
}

.event-plan-status {
    align-items: center;
    color: #86efac;
    display: inline-flex;
    gap: .35rem;
    font-weight: 900;
}

.event-plan-status .ui-icon {
    height: 1rem;
    width: 1rem;
}

.event-plan-divider {
    background: rgba(145, 166, 216, .32);
    display: inline-flex;
    height: 1rem;
    width: 1px;
}

.event-plan-note-pill {
    background: rgba(139, 92, 246, .16);
    border: 1px solid rgba(196, 181, 253, .28);
    border-radius: 999px;
    color: #c4b5fd;
    font-size: .76rem;
    font-weight: 900;
    padding: .18rem .48rem;
}

.event-plan-editor {
    border-top: 1px solid rgba(145, 166, 216, .14);
    padding-top: .75rem;
}

.event-plan-editor summary {
    color: #b794ff;
    cursor: pointer;
    font-weight: 900;
    list-style: none;
}

.event-plan-editor summary::-webkit-details-marker {
    display: none;
}

.event-plan-editor summary::after {
    content: "›";
    display: inline-block;
    font-size: 1.2rem;
    margin-left: .35rem;
    transform: rotate(90deg);
}

.event-plan-editor[open] summary {
    margin-bottom: .75rem;
}

.event-plan-editor[open] summary::after {
    transform: rotate(-90deg);
}

.event-plan-editor .status-form {
    display: grid;
    gap: .7rem;
}

.event-plan-editor .status-fields {
    display: grid;
    gap: .55rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.event-plan-editor .form-control {
    border-radius: 12px;
    min-height: 42px;
}

.detail-hero {
    min-height: 380px;
}

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

.info-card {
    display: grid;
    gap: .35rem;
    padding: 1rem;
    position: relative;
}

.info-card strong {
    font-size: 1.25rem;
}

.info-card small {
    color: var(--rp-muted);
}

.plan-grid {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    position: relative;
}

.plan-card {
    align-items: center;
    border: 1px solid var(--rp-border);
    border-radius: 18px;
    display: flex;
    gap: 1rem;
    padding: 1rem;
}

.plan-card.signed {
    background: var(--rp-green-soft);
    border-color: rgba(53, 214, 107, .45);
}

.plan-card.maybe {
    background: var(--rp-amber-soft);
    border-color: rgba(250, 204, 21, .45);
}

.plan-card.interested {
    background: var(--rp-blue-soft);
    border-color: rgba(56, 168, 255, .45);
}

.plan-card h3 {
    font-size: 1.1rem;
    font-weight: 900;
    margin: 0;
}

.plan-card p {
    color: var(--rp-muted);
    margin: .2rem 0 0;
}

.event-plan-note,
.group-plan-note {
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--rp-border);
    border-radius: 8px;
    color: var(--rp-text);
    font-size: .86rem;
    margin-top: .55rem;
    padding: .55rem .65rem;
}

.event-plan-inline-note {
    margin-top: 0.25rem;
    font-size: .9rem;
    font-weight: 760;
    line-height: 1.35;
    color: var(--rp-muted);
}

.status-icon {
    align-items: center;
    border: 2px solid currentColor;
    border-radius: 999px;
    display: inline-flex;
    font-weight: 900;
    height: 52px;
    justify-content: center;
    width: 52px;
}

.detail-body {
    box-sizing: border-box;
    display: grid;
    gap: 1rem;
    margin-top: 1.6rem;
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

.detail-copy {
    max-width: 860px;
    min-width: 0;
}

.event-about-highlights {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: .85rem 0 1rem;
}

.event-about-highlight {
    align-items: center;
    display: grid;
    gap: .65rem;
    grid-template-columns: 48px minmax(0, 1fr);
    min-width: 0;
}

.event-about-highlight > span {
    align-items: center;
    background: rgba(139, 92, 246, .24);
    border: 1px solid rgba(196, 181, 253, .24);
    border-radius: 50%;
    color: #b794ff;
    display: inline-flex;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.event-about-highlight .ui-icon {
    height: 1.35rem;
    width: 1.35rem;
}

.event-about-highlight strong,
.event-about-highlight small {
    display: block;
    line-height: 1.3;
    min-width: 0;
    overflow-wrap: anywhere;
}

.event-about-highlight strong {
    color: var(--rp-text);
    font-weight: 900;
}

.event-about-highlight small {
    color: var(--rp-muted);
}

.detail-body h2 {
    font-weight: 900;
}

.detail-body p {
    color: var(--rp-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.event-location-heading {
    margin-top: 1.4rem;
}

.event-location-card {
    box-sizing: border-box;
    display: grid;
    gap: .85rem;
    max-width: 100%;
    min-width: 0;
    padding: 1rem;
    width: 100%;
}

.event-location-summary {
    align-items: flex-start;
    display: grid;
    gap: .75rem;
    grid-template-columns: 42px minmax(0, 1fr);
    max-width: 100%;
    min-width: 0;
}

.event-location-icon {
    align-items: center;
    background: rgba(255, 149, 64, .12);
    border: 1px solid rgba(255, 149, 64, .42);
    border-radius: 14px;
    color: #ff9b45;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.event-location-icon .ui-icon {
    height: 1.1rem;
    width: 1.1rem;
}

.event-location-summary strong {
    color: var(--rp-text);
    display: block;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.event-location-summary span,
.event-location-summary small {
    color: var(--rp-muted);
    display: block;
    line-height: 1.4;
    margin-top: .18rem;
    overflow-wrap: anywhere;
}

.event-map-panel {
    display: grid;
    gap: .8rem;
    max-width: 100%;
    min-width: 0;
}

.event-detail-map-container {
    background: rgba(12, 22, 41, .72);
    border: 1px solid rgba(114, 138, 184, .32);
    border-radius: 8px;
    box-sizing: border-box;
    height: clamp(250px, 42vw, 380px);
    max-width: 100%;
    min-height: 250px;
    min-width: 0;
    overflow: hidden;
    position: relative;
    width: 100%;
    z-index: 1;
}

.event-detail-map-container.leaflet-container {
    background: #101827;
}

.event-detail-map-container .leaflet-control-attribution,
.event-detail-map-container .leaflet-control-zoom a,
.event-detail-map-container .leaflet-popup-content-wrapper,
.event-detail-map-container .leaflet-popup-tip {
    background: rgba(8, 16, 31, .92);
    color: var(--rp-text);
}

.event-detail-map-container .leaflet-control-attribution a {
    color: #8abfff;
}

.event-detail-map-container .leaflet-control-zoom a {
    border-color: rgba(145, 166, 216, .25);
}

.event-map-actions {
    align-items: stretch;
    display: flex;
    gap: .8rem;
    justify-content: space-between;
}

.event-map-address {
    align-items: flex-start;
    color: var(--rp-muted);
    display: flex;
    flex: 1 1 auto;
    font-size: .9rem;
    gap: .45rem;
    line-height: 1.35;
    min-width: 0;
}

.event-map-address .ui-icon {
    color: #ff9b45;
    flex: 0 0 auto;
    height: 1rem;
    margin-top: .12rem;
    width: 1rem;
}

.event-map-fallback {
    align-items: center;
    background:
        linear-gradient(135deg, rgba(12, 22, 41, .92), rgba(7, 13, 26, .88));
    border: 1px solid rgba(114, 138, 184, .28);
    border-radius: 8px;
    box-sizing: border-box;
    color: var(--rp-muted);
    display: grid;
    justify-items: center;
    max-width: 100%;
    min-height: 230px;
    min-width: 0;
    padding: 1.25rem;
    text-align: center;
    width: 100%;
}

.event-map-fallback strong {
    color: var(--rp-text);
    font-size: 1.05rem;
    line-height: 1.3;
    margin-top: .35rem;
}

.event-map-fallback span,
.event-map-fallback small {
    display: block;
    line-height: 1.4;
    margin-top: .25rem;
}

.event-map-unavailable {
    color: #ffb875 !important;
    font-size: .78rem;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.route-preview {
    background:
        radial-gradient(circle at 65% 45%, rgba(139, 92, 246, .8) 0 4px, transparent 5px),
        linear-gradient(135deg, #0f8aa8, #17492f 42%, #5c7c2d);
    border: 1px solid rgba(56, 168, 255, .45);
    border-radius: 18px;
    min-height: 180px;
}

.route-preview-empty {
    align-items: center;
    background: rgba(12, 22, 41, .72);
    color: var(--rp-muted);
    display: flex;
    font-size: .92rem;
    font-weight: 800;
    justify-content: center;
    text-align: center;
}

.link-list {
    box-sizing: border-box;
    display: grid;
    max-width: 100%;
    min-width: 0;
    padding: .25rem 1rem;
    position: relative;
    width: 100%;
}

.link-list a {
    align-items: center;
    border-bottom: 1px solid var(--rp-border);
    color: var(--rp-text);
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 28px;
    font-weight: 800;
    gap: .8rem;
    min-height: 62px;
    min-width: 0;
    padding: .55rem 0;
    text-decoration: none;
}

.link-list .link-list-icon,
.link-list .link-list-arrow {
    align-items: center;
    border: 1px solid rgba(56, 168, 255, .25);
    border-radius: 12px;
    color: #b794ff;
    display: inline-flex;
    flex: 0 0 auto;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.link-list .link-list-arrow {
    background: transparent;
    border: 0;
    color: var(--rp-muted);
    height: 28px;
    width: 28px;
}

.link-list .link-list-label {
    min-width: 0;
    overflow-wrap: anywhere;
}

.link-list a:last-child {
    border-bottom: 0;
}

.detail-actions {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
    margin-top: 1rem;
}

.secondary-button {
    border-radius: 16px;
    min-height: 58px;
}

.bottom-nav {
    backdrop-filter: blur(18px);
    background: rgba(8, 16, 31, .92);
    border: 1px solid rgba(145, 166, 216, .18);
    border-radius: 24px;
    bottom: .7rem;
    box-shadow: 0 0 30px rgba(0, 0, 0, .35);
    display: grid;
    gap: .25rem;
    grid-template-columns: repeat(5, 1fr);
    left: .75rem;
    padding: .55rem;
    position: fixed;
    right: .75rem;
    z-index: 20;
}

.bottom-nav-form {
    display: contents;
}

.bottom-nav-item {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 18px;
    color: #a8b6d6;
    display: flex;
    flex-direction: column;
    font-weight: 800;
    gap: .25rem;
    min-height: 58px;
    text-decoration: none;
}

.bottom-nav-item.active {
    color: #c4b5fd;
    text-shadow: 0 0 20px rgba(139, 92, 246, .75);
}

.bottom-nav-item.active .bottom-nav-icon {
    background: linear-gradient(135deg, #c4b5fd, #8b5cf6);
    border-radius: 12px;
    box-shadow: 0 0 22px rgba(139, 92, 246, .82);
    color: #f8f7ff;
    height: 34px;
    width: 34px;
}

.bottom-nav-icon {
    align-items: center;
    display: inline-flex;
    font-weight: 900;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.dashboard-heading {
    align-items: end;
    display: flex;
    justify-content: space-between;
    margin: .45rem 0 1rem;
}

.dashboard-heading h1 {
    color: var(--rp-text);
    font-size: clamp(1.9rem, 5.8vw, 3.35rem);
    font-weight: 950;
    letter-spacing: 0;
    line-height: 1.02;
    margin: 0;
    white-space: nowrap;
}

.dashboard-heading p {
    color: #b8c4e3;
    font-size: clamp(1rem, 2.7vw, 1.35rem);
    font-weight: 650;
    margin: .35rem 0 0;
}

[data-bs-theme="light"] .dashboard-heading p {
    color: var(--rp-muted);
}

.dashboard-hero {
    border: 1px solid rgba(139, 92, 246, .72);
    border-radius: 30px;
    box-shadow:
        0 26px 70px rgba(0, 0, 0, .44),
        0 0 42px rgba(139, 92, 246, .35),
        inset 0 0 0 1px rgba(196, 181, 253, .12);
    min-height: clamp(230px, 32vw, 380px);
    overflow: hidden;
    position: relative;
}

a.dashboard-hero {
    display: block;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

a.dashboard-hero:hover,
a.dashboard-hero:focus {
    transform: translateY(-2px);
    border-color: rgba(139, 92, 246, 1);
    box-shadow:
        0 30px 75px rgba(0, 0, 0, .5),
        0 0 48px rgba(139, 92, 246, .45),
        inset 0 0 0 1px rgba(196, 181, 253, .2);
    outline: none;
}

a.dashboard-hero:focus-visible {
    outline: 2px solid var(--rp-primary);
    outline-offset: 4px;
}

.dashboard-hero::before {
    background:
        radial-gradient(circle at 76% 16%, rgba(244, 114, 182, .48), transparent 18rem),
        radial-gradient(circle at 42% 100%, rgba(109, 93, 252, .18), transparent 20rem);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 1;
}

.dashboard-hero-bg {
    background:
        linear-gradient(90deg, rgba(2, 7, 19, .96) 0%, rgba(2, 7, 19, .84) 34%, rgba(2, 7, 19, .28) 100%),
        linear-gradient(145deg, #050b18 0%, #10233e 42%, #194f58 62%, #331b5f 100%);
    inset: 0;
    position: absolute;
}

.dashboard-hero-bg img {
    display: block;
    height: 100%;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

.dashboard-hero-bg::after {
    background:
        radial-gradient(ellipse at 78% 52%, rgba(77, 143, 172, .62), transparent 20rem),
        linear-gradient(150deg, transparent 0 50%, rgba(54, 83, 82, .7) 51% 56%, transparent 57%),
        linear-gradient(156deg, transparent 0 61%, rgba(137, 91, 180, .55) 62% 65%, transparent 66%);
    content: "";
    inset: 0;
    opacity: .9;
    position: absolute;
}

.dashboard-hero.has-image .dashboard-hero-bg {
    background: #020713;
}

.dashboard-hero.has-image::before {
    display: none;
}

.dashboard-hero.has-image .dashboard-hero-bg::after {
    background:
        linear-gradient(90deg, rgba(2, 7, 19, .92), rgba(2, 7, 19, .64) 48%, rgba(2, 7, 19, .24)),
        linear-gradient(180deg, rgba(2, 7, 19, .16), rgba(2, 7, 19, .72));
    opacity: 1;
}

[data-bs-theme="light"] .dashboard-hero.has-image .dashboard-hero-bg::after {
    background:
        linear-gradient(90deg, rgba(2, 7, 19, .92), rgba(2, 7, 19, .64) 48%, rgba(2, 7, 19, .24)),
        linear-gradient(180deg, rgba(2, 7, 19, .16), rgba(2, 7, 19, .72));
}

.dashboard-hero-content {
    color: #fff;
    max-width: 760px;
    padding: clamp(1.35rem, 4.4vw, 2.55rem);
    position: relative;
    z-index: 2;
}

.dashboard-kicker {
    color: #a78bfa;
    font-size: clamp(.9rem, 2vw, 1.15rem);
    font-weight: 950;
    letter-spacing: .02em;
    margin: 0 0 .75rem;
    text-transform: uppercase;
}

.dashboard-hero h2 {
    color: #fff;
    font-size: clamp(2rem, 6.2vw, 3.9rem);
    font-weight: 950;
    letter-spacing: 0;
    line-height: 1.03;
    margin: 0 0 1.05rem;
    max-width: 680px;
    text-shadow: 0 3px 24px rgba(0, 0, 0, .55);
}

.dashboard-hero-title {
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-empty-copy {
    color: #c6d1ec;
    font-size: 1.03rem;
    line-height: 1.45;
    max-width: 560px;
}

.dashboard-hero-meta {
    color: #c6d1ec;
    display: grid;
    gap: .75rem;
    font-size: clamp(1rem, 2.4vw, 1.35rem);
    font-weight: 750;
    margin-bottom: 1.45rem;
}

.dashboard-hero-meta span,
.upcoming-event-main p {
    align-items: center;
    display: inline-flex;
    gap: .65rem;
}

.meta-icon {
    align-items: center;
    border: 2px solid rgba(198, 209, 236, .72);
    border-radius: 8px;
    color: #c6d1ec;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .7rem;
    font-weight: 950;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.meta-icon .ui-icon {
    height: .82rem;
    width: .82rem;
}

.dashboard-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.status-symbol {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
}

.status-symbol .ui-icon {
    height: 1rem;
    stroke-width: 2.8;
    width: 1rem;
}

.dashboard-hero-button {
    gap: .6rem;
    min-width: 220px;
}

.dashboard-stat-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 1.25rem 0 1.55rem;
}

.dashboard-stat-card {
    align-items: center;
    background: linear-gradient(145deg, rgba(12, 22, 41, .82), rgba(7, 13, 26, .68));
    border: 1px solid rgba(114, 138, 184, .28);
    border-radius: 24px;
    box-shadow: var(--rp-shadow), inset 0 0 0 1px rgba(255, 255, 255, .025);
    display: flex;
    gap: 1rem;
    min-height: 128px;
    min-width: 0;
    padding: 1.1rem;
    position: relative;
}

.dashboard-stat-link {
    color: var(--rp-text);
    cursor: pointer;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.dashboard-stat-link:hover,
.dashboard-stat-link:focus-visible {
    border-color: rgba(196, 181, 253, .48);
    box-shadow: var(--rp-shadow), 0 0 30px rgba(139, 92, 246, .28);
    color: var(--rp-text);
    outline: 0;
    transform: translateY(-2px);
}

.dashboard-stat-link:active {
    transform: translateY(0) scale(.985);
}

.dashboard-stat-arrow {
    align-items: center;
    color: rgba(198, 209, 236, .72);
    display: inline-flex;
    font-size: 1rem;
    margin-left: auto;
}

[data-bs-theme="light"] .dashboard-stat-card,
[data-bs-theme="light"] .quick-action-card,
[data-bs-theme="light"] .upcoming-event-card {
    background: rgba(255, 255, 255, .86);
}

.dashboard-stat-icon {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 950;
    height: 66px;
    justify-content: center;
    width: 66px;
}

.dashboard-stat-card.purple .dashboard-stat-icon {
    background: rgba(139, 92, 246, .18);
    border: 2px solid rgba(167, 139, 250, .7);
    box-shadow: 0 0 26px rgba(139, 92, 246, .28);
    color: #c4b5fd;
}

.dashboard-stat-card.blue .dashboard-stat-icon {
    background: rgba(56, 168, 255, .16);
    border: 2px solid rgba(56, 168, 255, .62);
    box-shadow: 0 0 26px rgba(56, 168, 255, .22);
    color: var(--rp-blue);
}

.dashboard-stat-card.green .dashboard-stat-icon {
    background: rgba(95, 240, 130, .14);
    border: 2px solid rgba(95, 240, 130, .62);
    box-shadow: 0 0 26px rgba(95, 240, 130, .2);
    color: var(--rp-green);
}

.dashboard-stat-card span:not(.dashboard-stat-icon) {
    color: #b794ff;
    display: block;
    font-weight: 900;
}

.dashboard-stat-card.blue span:not(.dashboard-stat-icon) {
    color: var(--rp-blue);
}

.dashboard-stat-card.green span:not(.dashboard-stat-icon) {
    color: var(--rp-green);
}

.dashboard-stat-card strong {
    color: var(--rp-text);
    display: block;
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 950;
    line-height: .95;
    margin: .15rem 0;
}

.dashboard-stat-card small {
    color: var(--rp-muted);
    font-size: 1rem;
    font-weight: 700;
}

.dashboard-section-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: 1.55rem 0 .9rem;
}

.dashboard-section-heading h2 {
    color: var(--rp-text);
    font-size: clamp(1.4rem, 4vw, 1.85rem);
    font-weight: 950;
    margin: 0;
}

.dashboard-section-heading a {
    color: #b794ff;
    font-weight: 900;
    text-decoration: none;
}

.quick-action-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 1.55rem;
}

.quick-action-card {
    align-items: center;
    background: linear-gradient(145deg, rgba(12, 22, 41, .82), rgba(7, 13, 26, .68));
    border: 1px solid rgba(139, 92, 246, .32);
    border-radius: 20px;
    box-shadow: var(--rp-shadow);
    color: var(--rp-text);
    display: grid;
    gap: .85rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 104px;
    min-width: 0;
    padding: .95rem;
    text-decoration: none;
}

.quick-action-card:hover {
    color: var(--rp-text);
    transform: translateY(-1px);
}

.quick-action-icon {
    align-items: center;
    background: linear-gradient(135deg, #7c3aed, #6d5dfc);
    border-radius: 16px;
    box-shadow: 0 0 24px rgba(139, 92, 246, .35);
    color: #fff;
    display: inline-flex;
    font-weight: 950;
    height: 58px;
    justify-content: center;
    width: 58px;
}

.quick-action-card.blue {
    border-color: rgba(56, 168, 255, .34);
}

.quick-action-card.blue .quick-action-icon {
    background: linear-gradient(135deg, #2563eb, #38a8ff);
    box-shadow: 0 0 24px rgba(56, 168, 255, .28);
}

.quick-action-card.cyan {
    border-color: rgba(79, 195, 247, .34);
}

.quick-action-card.cyan .quick-action-icon {
    background: linear-gradient(135deg, #38a8ff, #4fc3f7);
    box-shadow: 0 0 24px rgba(79, 195, 247, .28);
}

.quick-action-card.green {
    border-color: rgba(95, 240, 130, .34);
}

.quick-action-card.green .quick-action-icon {
    background: linear-gradient(135deg, #16a34a, #95f082);
    box-shadow: 0 0 24px rgba(95, 240, 130, .28);
}

.quick-action-card.orange {
    border-color: rgba(255, 149, 64, .45);
    box-shadow: 0 0 24px rgba(255, 149, 64, .08);
}

.quick-action-card.orange:hover {
    border-color: rgba(255, 149, 64, .7);
    box-shadow: 0 0 28px rgba(255, 149, 64, .16), 0 8px 20px rgba(0, 0, 0, .2);
}

.quick-action-card.orange .quick-action-icon {
    border: 1px solid rgba(255, 149, 64, .55);
    background: rgba(255, 149, 64, .12);
    box-shadow: none;
    color: #ff9b45;
}

.quick-action-card strong {
    color: #c4b5fd;
    display: block;
    font-size: 1.05rem;
    font-weight: 950;
}

.quick-action-card.blue strong,
.quick-action-card.cyan strong {
    color: var(--rp-blue);
}

.quick-action-card.green strong {
    color: var(--rp-green);
}

.quick-action-card.orange strong {
    color: #ff9b45;
    text-align: center;
    display: block;
    width: 100%;
}

.quick-action-card.orange span:nth-child(2) {
    text-align: center;
    width: 100%;
}

.quick-action-card.orange .quick-action-arrow {
    color: rgba(255, 149, 64, .6);
}

.quick-action-card.orange:hover .quick-action-arrow {
    color: #ff9b45;
}

.quick-action-card small {
    color: var(--rp-muted);
    display: block;
    font-weight: 700;
    margin-top: .15rem;
}

.quick-action-arrow {
    align-items: center;
    color: #c6d1ec;
    display: inline-flex;
    font-size: 1.55rem;
    font-weight: 900;
}

.training-snapshot-grid {
    display: grid;
    gap: .8rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.training-snapshot-card {
    background:
        linear-gradient(135deg, rgba(95, 240, 130, .1), transparent 52%),
        linear-gradient(145deg, rgba(12, 22, 41, .82), rgba(7, 13, 26, .7));
    border: 1px solid rgba(145, 166, 216, .22);
    border-radius: 18px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, .2);
    display: grid;
    gap: .7rem;
    min-width: 0;
    padding: .85rem;
}

[data-bs-theme="light"] .training-snapshot-card {
    background:
        linear-gradient(135deg, rgba(53, 214, 107, .1), transparent 52%),
        rgba(255, 255, 255, .88);
}

.training-snapshot-head {
    align-items: center;
    display: grid;
    gap: .55rem;
    grid-template-columns: auto minmax(0, 1fr);
}

.training-snapshot-head .user-dot {
    height: 32px;
    width: 32px;
}

.training-snapshot-head h3 {
    color: var(--rp-text);
    font-size: .95rem;
    font-weight: 950;
    line-height: 1.15;
    margin: 0;
}

.training-snapshot-head p {
    color: var(--rp-muted);
    font-size: .74rem;
    font-weight: 800;
    margin: .12rem 0 0;
}

.training-metrics {
    display: grid;
    gap: .45rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.training-metrics-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.training-metrics div {
    background: rgba(3, 7, 18, .22);
    border: 1px solid rgba(145, 166, 216, .12);
    border-radius: 12px;
    min-width: 0;
    padding: .48rem .52rem;
}

[data-bs-theme="light"] .training-metrics div {
    background: rgba(241, 245, 249, .72);
}

.training-metrics dt {
    color: var(--rp-muted);
    font-size: .64rem;
    font-weight: 900;
    margin: 0;
    text-transform: uppercase;
}

.training-metrics dd {
    color: var(--rp-text);
    font-size: .82rem;
    font-weight: 950;
    line-height: 1.12;
    margin: .16rem 0 0;
    overflow-wrap: anywhere;
}

.training-last-run {
    display: grid;
    gap: .12rem;
    min-width: 0;
}

.training-last-run strong {
    color: var(--rp-text);
    font-size: .92rem;
    font-weight: 950;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.training-last-run span {
    color: var(--rp-muted);
    font-size: .76rem;
    font-weight: 800;
}

.training-empty {
    background: rgba(145, 166, 216, .1);
    border: 1px solid rgba(145, 166, 216, .16);
    border-radius: 14px;
    display: grid;
    gap: .35rem;
    padding: .65rem;
}

.training-empty p {
    color: var(--rp-muted);
    font-weight: 800;
    margin: 0;
}

.training-empty a {
    color: #b794ff;
    font-size: .82rem;
    font-weight: 950;
    text-decoration: none;
}

.dashboard-upcoming-list {
    display: grid;
    gap: .85rem;
}

.upcoming-event-card {
    align-items: center;
    background: linear-gradient(145deg, rgba(12, 22, 41, .82), rgba(7, 13, 26, .72));
    border: 1px solid rgba(114, 138, 184, .28);
    border-radius: 22px;
    box-shadow: var(--rp-shadow);
    display: grid;
    gap: 1rem;
    grid-template-columns: 92px 1fr;
    padding: .95rem;
}

.upcoming-event-card-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.upcoming-event-card-link:hover,
.upcoming-event-card-link:focus-visible {
    border-color: rgba(139, 92, 246, .45);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .3), 0 0 22px rgba(139, 92, 246, .1);
    transform: translateY(-1px);
}

.upcoming-event-card .event-thumb {
    aspect-ratio: 1.25;
    min-height: 82px;
}

.upcoming-event-main h3,
.dashboard-empty-state h3 {
    color: var(--rp-text);
    font-size: clamp(1.18rem, 3vw, 1.6rem);
    font-weight: 950;
    margin: 0 0 .4rem;
}

.upcoming-event-main {
    min-width: 0;
}

.upcoming-event-main p,
.dashboard-empty-state p {
    color: var(--rp-muted);
    font-weight: 700;
    margin: .1rem 0;
}

.upcoming-status-stack {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.dashboard-empty-state {
    grid-template-columns: 92px 1fr auto;
}

@media (max-width: 640px) {
    body {
        font-size: .86rem;
        padding-bottom: calc(7.0rem + env(safe-area-inset-bottom));
    }

    .app-shell {
        padding-bottom: calc(5.9rem + env(safe-area-inset-bottom));
        padding-top: .5rem;
    }

    .app-header-inner {
        gap: .5rem;
        padding-bottom: .48rem;
        padding-top: .48rem;
    }

    .brand-lockup {
        gap: .65rem;
        min-width: 0;
    }

    .brand-mark {
        border-radius: 13px;
        font-size: .88rem;
        height: 40px;
        width: 40px;
    }

    .brand-name {
        font-size: clamp(1.3rem, 5.4vw, 1.7rem);
    }

    .header-actions {
        gap: .45rem;
    }

    .theme-toggle {
        font-size: .82rem;
        min-height: 34px;
        padding: .32rem .62rem;
    }

    .avatar-bubble {
        border-width: 2px;
        height: 36px;
        width: 36px;
    }

    .account-menu-panel {
        border-radius: 18px;
        max-width: calc(100vw - 1.5rem);
        min-width: 214px;
        top: calc(100% + .5rem);
        max-height: calc(100dvh - 165px - env(safe-area-inset-bottom));
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    }

    @supports not (height: 100dvh) {
        .account-menu-panel {
            max-height: calc(100vh - 165px - env(safe-area-inset-bottom));
        }
    }

    .account-menu-item {
        min-height: 44px;
        padding: .58rem .72rem;
    }

    .connectors-heading {
        margin-bottom: .75rem;
    }

    .connectors-heading h1 {
        font-size: 1.75rem;
    }

    .connectors-heading p {
        font-size: .9rem;
    }

    .connector-grid {
        gap: .75rem;
        padding-bottom: calc(7.5rem + env(safe-area-inset-bottom));
    }



    .connector-card {
        border-radius: 20px;
        gap: .82rem;
        padding: .85rem;
    }

    .connector-card-head {
        gap: .75rem;
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .connector-logo-tile {
        border-radius: 15px;
        height: 48px;
        width: 48px;
    }

    .connector-logo-tile svg {
        height: 30px;
        width: 30px;
    }

    .connector-copy h2 {
        font-size: 1.08rem;
    }

    .connector-copy p,
    .connector-note {
        font-size: .8rem;
    }

    .connector-status {
        font-size: .66rem;
        padding: .24rem .54rem;
    }

    .connector-meta {
        border-radius: 14px;
        padding: .62rem .7rem;
    }

    .connector-button {
        min-height: 44px;
    }

    .events-page {
        padding-bottom: calc(7.4rem + env(safe-area-inset-bottom));
    }



    .events-heading {
        align-items: center;
        margin-bottom: .62rem;
    }

    .events-heading h1 {
        font-size: 1.7rem;
    }

    .events-heading p {
        font-size: .86rem;
    }

    .events-heading .compact-button {
        border-radius: 12px;
        font-size: .76rem;
        margin-top: 0;
        min-height: 34px;
        padding: .42rem .7rem;
    }

    .events-filter-card {
        gap: .5rem;
        margin-bottom: .65rem;
        padding: .55rem;
    }

    .events-filter-section {
        align-items: start;
        gap: .4rem;
        grid-template-columns: 1fr;
    }

    .events-filter-section-title {
        font-size: .64rem;
    }

    .events-filter-options {
        gap: .35rem;
    }

    .events-filter-card .event-chip {
        font-size: .7rem;
        padding: .26rem .5rem;
    }

    .events-search-row {
        gap: .45rem;
        margin-bottom: .7rem;
    }

    .events-search-row .search-box {
        border-radius: 14px;
        font-size: .82rem;
        min-height: 40px;
        padding: 0 .72rem;
    }

    .events-search-row .filter-button {
        border-radius: 14px;
        font-size: .78rem;
        min-height: 40px;
        min-width: 68px;
        padding: .35rem .62rem;
    }

    .events-list-compact {
        gap: .62rem;
    }

    .event-compact-card {
        border-radius: 18px;
        gap: .6rem;
        grid-template-columns: 64px minmax(0, 1fr) 18px;
        min-height: 88px;
        padding: .5rem .62rem;
    }

    .event-compact-card:hover,
    .event-compact-card:focus-visible {
        transform: none;
    }

    .event-compact-card:active {
        transform: scale(.985);
    }

    .event-compact-thumb {
        border-radius: 14px;
        height: 64px;
        min-height: 64px;
        width: 64px;
    }

    .event-compact-main {
        gap: .18rem;
    }

    .event-compact-title {
        font-size: .98rem;
        line-height: 1.08;
    }

    .event-compact-meta {
        font-size: .72rem;
        gap: .28rem;
        line-height: 1.15;
    }

    .event-compact-meta .ui-icon {
        height: .8rem;
        width: .8rem;
    }

    .event-compact-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: .3rem;
    }

    .event-compact-chips,
    .event-compact-statuses {
        gap: .25rem;
    }

    .event-compact-chips .event-chip {
        font-size: .62rem;
        line-height: 1;
        padding: .18rem .34rem;
    }

    .event-compact-statuses .status-pill {
        font-size: .64rem;
        gap: .18rem;
        line-height: 1;
        padding: .16rem .34rem .16rem .16rem;
    }

    .event-compact-statuses .user-dot {
        font-size: .6rem;
        height: 19px;
        width: 19px;
    }

    .event-compact-statuses .status-symbol .ui-icon {
        height: .68rem;
        width: .68rem;
    }

    .event-compact-status-text {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .event-compact-chevron {
        font-size: .95rem;
    }

    .page-heading.calendar-page-heading {
        margin-bottom: .7rem;
    }

    .page-heading.calendar-page-heading h1 {
        font-size: 1.72rem;
    }

    .page-heading.calendar-page-heading p {
        font-size: .88rem;
    }

    .calendar-page {
        padding-bottom: calc(7.4rem + env(safe-area-inset-bottom));
    }



    .calendar-toolbar {
        gap: .45rem;
        margin-bottom: .62rem;
    }

    .calendar-toolbar h2 {
        border-radius: 14px;
        font-size: 1rem;
        min-height: 38px;
        padding: .48rem .55rem;
    }

    .calendar-toolbar .ghost-button {
        min-height: 38px;
        min-width: 38px;
        padding: .35rem .6rem;
    }

    .calendar-card,
    .selected-day-panel {
        border-radius: 22px;
        padding: .78rem;
    }

    .calendar-weekdays {
        font-size: .62rem;
        margin-bottom: .35rem;
    }

    .calendar-cell {
        border-color: rgba(145, 166, 216, .18);
        gap: .12rem;
        min-height: 42px;
    }

    .calendar-cell.today,
    .calendar-cell.selected {
        border-radius: 12px;
    }

    .calendar-cell.selected {
        box-shadow: 0 0 20px rgba(139, 92, 246, .46);
    }

    .day-number {
        font-size: .88rem;
    }

    .event-dot {
        height: 5px;
        width: 5px;
    }

    .calendar-users {
        gap: .08rem;
    }

    .calendar-users .user-dot {
        font-size: .62rem;
        height: 20px;
        width: 20px;
    }

    .calendar-selected-day-panel {
        margin-top: .62rem;
    }

    .calendar-selected-date-title {
        font-size: 1.46rem;
        line-height: 1.02;
        margin-bottom: .72rem;
    }

    .calendar-selected-events {
        gap: .62rem;
    }

    .calendar-event-card {
        border-radius: 17px;
        gap: .62rem;
        grid-template-columns: 44px minmax(0, 1fr) 18px;
        padding: .62rem;
    }

    .calendar-event-card:hover,
    .calendar-event-card:focus-visible {
        transform: none;
    }

    .calendar-event-card:active {
        transform: scale(.985);
    }

    .calendar-event-date-badge {
        border-radius: 13px;
        min-height: 44px;
        min-width: 44px;
    }

    .calendar-event-date-badge strong {
        font-size: 1rem;
    }

    .calendar-event-date-badge small {
        font-size: .6rem;
    }

    .calendar-event-main {
        gap: .3rem;
    }

    .calendar-event-title {
        font-size: 1rem;
        line-height: 1.08;
    }

    .calendar-event-location {
        font-size: .74rem;
        gap: .28rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .calendar-event-location .ui-icon {
        height: .82rem;
        width: .82rem;
    }

    .calendar-event-chips,
    .calendar-event-status-row {
        gap: .26rem;
    }

    .calendar-event-chips .event-chip {
        font-size: .64rem;
        line-height: 1.05;
        padding: .2rem .4rem;
    }

    .calendar-event-status-row .status-pill {
        font-size: .68rem;
        gap: .2rem;
        max-width: 100%;
        padding: .18rem .38rem .18rem .18rem;
    }

    .calendar-event-status-row .user-dot {
        font-size: .62rem;
        height: 20px;
        width: 20px;
    }

    .calendar-event-status-row .status-symbol .ui-icon {
        height: .72rem;
        width: .72rem;
    }

    .calendar-status-text {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .calendar-event-chevron {
        font-size: .96rem;
    }

    .dashboard-heading {
        margin: .05rem 0 .45rem;
    }

    .dashboard-heading h1 {
        font-size: clamp(1.4rem, 5.9vw, 1.62rem);
        line-height: 1;
    }

    .dashboard-heading p {
        font-size: .86rem;
        margin-top: .2rem;
    }

    .dashboard-hero {
        border-radius: 18px;
        box-shadow:
            0 16px 38px rgba(0, 0, 0, .34),
            0 0 24px rgba(139, 92, 246, .25),
            inset 0 0 0 1px rgba(196, 181, 253, .1);
        max-height: none;
        min-height: auto;
        height: auto;
    }

    .dashboard-hero-content {
        padding: .86rem;
    }

    .dashboard-kicker {
        font-size: .66rem;
        margin-bottom: .34rem;
    }

    .dashboard-hero h2 {
        font-size: clamp(1.45rem, 6vw, 1.95rem);
        line-height: 1;
        margin-bottom: .44rem;
    }

    .dashboard-hero-title {
        max-width: 100%;
        white-space: nowrap;
    }

    .dashboard-empty-copy {
        font-size: .84rem;
        line-height: 1.28;
        margin-bottom: .65rem;
    }

    .dashboard-hero-meta {
        gap: .28rem;
        font-size: .78rem;
        line-height: 1.2;
        margin-bottom: .48rem;
    }

    .dashboard-hero-meta span,
    .upcoming-event-main p {
        gap: .42rem;
    }

    .meta-icon {
        border-radius: 6px;
        border-width: 1px;
        font-size: .54rem;
        height: 17px;
        width: 17px;
    }

    .dashboard-status-row {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: .35rem;
        margin-bottom: .52rem;
    }

    .dashboard-status-row .status-pill {
        font-size: .72rem;
        gap: .45rem;
        padding: .24rem 1.1rem;
        width: 220px;
        max-width: 100%;
        justify-content: flex-start;
        box-sizing: border-box;
    }

    .dashboard-status-row .status-symbol {
        flex: 0 0 auto;
        display: inline-flex;
    }

    .dashboard-status-row .user-dot {
        font-size: .7rem;
        height: 22px;
        width: 22px;
        flex: 0 0 auto;
    }

    .dashboard-status-row .status-symbol .ui-icon {
        height: .85rem;
        width: .85rem;
    }

    .dashboard-hero-button {
        border-radius: 12px;
        font-size: .8rem;
        min-height: 36px;
        min-width: 0;
        padding: .48rem .8rem;
    }

    .dashboard-stat-grid,
    .quick-action-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .5rem;
    }

    .dashboard-stat-grid {
        margin: .62rem 0 .72rem;
    }

    .dashboard-stat-card {
        align-items: flex-start;
        border-radius: 15px;
        flex-direction: column;
        gap: .28rem;
        min-height: 78px;
        padding: .44rem .42rem;
    }

    .dashboard-stat-link:hover,
    .dashboard-stat-link:focus-visible {
        transform: none;
    }

    .dashboard-stat-link:active {
        transform: scale(.98);
    }

    .dashboard-stat-arrow {
        font-size: .75rem;
        position: absolute;
        right: .42rem;
        top: .42rem;
    }

    .dashboard-stat-icon {
        border-width: 1px !important;
        font-size: .68rem;
        height: 28px;
        width: 28px;
    }

    .dashboard-stat-card span:not(.dashboard-stat-icon) {
        font-size: .66rem;
        line-height: 1.08;
    }

    .dashboard-stat-card strong {
        font-size: 1.18rem;
        margin: .02rem 0;
    }

    .dashboard-stat-card small {
        font-size: .61rem;
        line-height: 1.1;
    }

    .dashboard-section-heading {
        margin: .72rem 0 .45rem;
    }

    .dashboard-section-heading h2 {
        font-size: 1.18rem;
    }

    /* Refined quick-action-card rules moved to max-width: 700px block */

    .dashboard-upcoming-list .upcoming-event-card {
        border-radius: 18px;
        column-gap: 1rem;
        grid-template-columns: 64px minmax(0, 1fr) minmax(36px, auto) auto;
        min-height: 82px;
        padding: .5rem;
        row-gap: .35rem;
    }

    .dashboard-upcoming-list .upcoming-event-card .event-thumb {
        height: 64px;
        min-height: 64px;
        min-width: 64px;
        width: 64px;
    }

    .dashboard-upcoming-list .upcoming-event-main {
        min-width: 0;
        padding-left: .35rem;
    }

    .upcoming-event-main h3,
    .dashboard-empty-state h3 {
        font-size: 1rem;
        line-height: 1.12;
    }

    .upcoming-event-main p,
    .dashboard-empty-state p {
        font-size: .72rem;
    }

    .upcoming-status-stack {
        display: grid;
        gap: .3rem;
        justify-items: end;
        min-width: 0;
    }

    .upcoming-status-stack .status-pill {
        font-size: 0;
        gap: 0;
        padding: .18rem;
    }

    .upcoming-status-stack .user-dot {
        font-size: .72rem;
        height: 24px;
        width: 24px;
    }

    .upcoming-event-card .details-link {
        font-size: 1rem;
    }

    .bottom-nav {
        border-radius: 18px 18px 0 0;
        bottom: 0;
        left: 0;
        right: 0;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
        padding: .48rem .38rem calc(.48rem + env(safe-area-inset-bottom));
    }


    .bottom-nav-item {
        font-size: .72rem;
        gap: .16rem;
        min-height: 54px;
    }

    .bottom-nav-icon {
        height: 24px;
        width: 24px;
    }

    .bottom-nav-item.active .bottom-nav-icon {
        height: 34px;
        width: 34px;
    }

    .bottom-nav-item .bottom-nav-icon img.avatar-img-sm {
        width: 24px;
        height: 24px;
    }

    .bottom-nav-item.active .bottom-nav-icon img.avatar-img-sm {
        width: 34px;
        height: 34px;
    }


    .event-detail-page {
        display: grid;
        gap: .85rem;
        max-width: 100%;
        overflow-x: clip;
        padding-bottom: calc(8.5rem + env(safe-area-inset-bottom));
        width: 100%;
    }

    .event-detail-page > *,
    .event-detail-page .app-card,
    .event-detail-page .glow-card {
        box-sizing: border-box;
        max-width: 100%;
        min-width: 0;
    }



    .event-detail-page .back-link {
        margin-bottom: -.25rem;
    }

    .event-detail-hero {
        border-radius: 22px;
        max-height: 340px;
        max-width: 100%;
        min-height: 300px;
        width: 100%;
    }

    .event-detail-hero-content {
        padding: 1rem;
    }

    .event-detail-title {
        font-size: clamp(1.55rem, 7.4vw, 2.2rem);
        line-height: 1.02;
        margin-bottom: .62rem;
        -webkit-line-clamp: 3;
    }

    .event-detail-meta {
        font-size: .85rem;
        gap: .35rem;
        line-height: 1.2;
    }

    .event-detail-meta span {
        gap: .4rem;
    }

    .event-detail-location-stack strong {
        font-size: .9rem;
    }

    .event-detail-chip-row {
        gap: .38rem;
        margin-top: .7rem;
    }

    .event-detail-chip-row .event-chip,
    .event-distance-chip {
        font-size: .72rem;
        max-width: 100%;
        padding: .3rem .5rem;
    }

    .event-detail-kicker-row {
        gap: .42rem;
        margin-bottom: .6rem;
    }

    .event-detail-kicker,
    .event-detail-course-count {
        font-size: .68rem;
        padding: .34rem .55rem;
    }

    .event-info-grid {
        gap: .62rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 100%;
        min-width: 0;
        width: 100%;
    }

    .event-info-card {
        border-radius: 18px;
        gap: .32rem;
        min-width: 0;
        min-height: 112px;
        padding: .75rem;
    }

    .event-info-card.is-distance {
        grid-column: span 2;
        min-height: auto;
    }

    .event-info-icon {
        border-radius: 13px;
        height: 38px;
        width: 38px;
    }

    .event-info-icon .ui-icon {
        height: 1.05rem;
        width: 1.05rem;
    }

    .event-info-label {
        font-size: .78rem;
        line-height: 1.1;
    }

    .event-info-value {
        font-size: 1rem;
        line-height: 1.2;
    }

    .event-info-link {
        font-size: .92rem;
    }

    .event-distance-list {
        gap: .32rem;
    }

    .section-heading.split-heading {
        margin: .7rem 0 .45rem;
    }

    .section-heading.split-heading h2 {
        font-size: 1.35rem;
    }

    .section-heading.split-heading a {
        font-size: .92rem;
    }

    .plan-card-grid {
        border-radius: 20px;
        gap: .75rem;
        max-width: 100%;
        min-width: 0;
        padding: .75rem;
    }

    .event-plan-shell,
    .group-plan-shell {
        border-radius: 20px;
        gap: .65rem;
        padding: .75rem;
    }

    .event-plan-summary,
    .group-plan-card {
        border-radius: 16px;
        gap: .7rem;
        grid-template-columns: 44px minmax(0, 1fr);
        padding: .75rem;
    }

    .event-plan-avatar,
    .group-plan-avatar {
        font-size: 1rem;
        height: 44px;
        width: 44px;
    }

    .event-plan-main h3,
    .group-plan-body h3 {
        font-size: 1rem;
    }

    .event-plan-meta,
    .group-plan-meta {
        font-size: .82rem;
        gap: .28rem .5rem;
    }

    .event-plan-editor .status-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .plan-card.plan-card-compact {
        align-items: start;
        border-radius: 18px;
        display: grid;
        gap: .7rem;
        grid-template-columns: 34px minmax(0, 1fr);
        padding: .8rem;
    }

    .plan-card.plan-card-compact .user-dot {
        height: 34px;
        margin-top: 2.3rem;
        width: 34px;
    }

    .group-plan-card.plan-card-compact .user-dot {
        margin-top: 0;
    }

    .plan-card.plan-card-compact .status-form {
        gap: .55rem;
        min-width: 0;
    }

    .plan-card.plan-card-compact h3 {
        font-size: 1.05rem;
    }

    .plan-card.plan-card-compact .status-fields {
        gap: .45rem;
    }

    .plan-card.plan-card-compact .form-control {
        border-radius: 14px;
        font-size: .9rem;
        min-height: 38px;
        padding: .42rem .75rem;
    }

    .plan-card.plan-card-compact button {
        min-height: 40px;
        padding: .45rem .85rem;
    }

    .detail-body {
        margin-top: .5rem;
    }

    .detail-body p {
        font-size: .92rem;
        line-height: 1.45;
    }

    .event-about-highlights {
        gap: .65rem;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .event-about-highlight {
        align-content: start;
        gap: .45rem;
        grid-template-columns: minmax(0, 1fr);
    }

    .event-about-highlight > span {
        height: 42px;
        width: 42px;
    }

    .event-about-highlight strong {
        font-size: .86rem;
    }

    .event-about-highlight small {
        font-size: .78rem;
    }

    .event-location-card {
        padding: .8rem;
    }

    .event-location-summary {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .event-location-icon {
        border-radius: 12px;
        height: 38px;
        width: 38px;
    }

    .event-detail-map-container {
        height: 280px;
        max-width: 100%;
        min-height: 280px;
        width: 100%;
    }

    .event-map-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .event-map-address {
        font-size: .84rem;
    }

    .event-map-fallback {
        min-height: 220px;
    }

    .btn-google-maps {
        min-height: 52px;
        width: 100%;
    }

    .link-list a {
        grid-template-columns: 42px minmax(0, 1fr) 24px;
        min-height: 50px;
    }

    .link-list .link-list-icon {
        border-radius: 11px;
        height: 36px;
        width: 36px;
    }

    .link-list .link-list-arrow {
        height: 24px;
        width: 24px;
    }

    .detail-actions {
        padding-bottom: .75rem;
    }

    .route-preview {
        min-height: 120px;
    }
}

@media (max-width: 380px) {
    .brand-name {
        font-size: 1.35rem;
    }

    .theme-toggle {
        padding-inline: .55rem;
    }

    .dashboard-heading h1 {
        font-size: 1.55rem;
    }

    .dashboard-stat-card {
        padding-inline: .45rem;
    }

    /* Refined strong override moved to end of file */
}

@media (min-width: 640px) {
    .dashboard-stat-grid,
    .quick-action-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .app-header-inner {
        padding-bottom: 1.35rem;
        padding-top: 1.35rem;
    }

    .dashboard-heading {
        margin-top: 1.35rem;
    }

    .upcoming-event-card {
        grid-template-columns: 128px 1fr auto 36px;
        padding: 1.05rem 1.2rem;
    }

    .upcoming-event-card .event-thumb {
        min-height: 92px;
    }

    .upcoming-status-stack {
        display: grid;
        min-width: 170px;
    }
}

.auth-shell {
    display: grid;
    min-height: calc(100vh - 170px);
    place-items: center;
}

.auth-panel {
    background: var(--rp-card);
    border: 1px solid var(--rp-border);
    border-radius: 24px;
    box-shadow: var(--rp-shadow), var(--rp-glow);
    max-width: 430px;
    padding: 1.5rem;
    width: 100%;
}

.auth-brand {
    align-items: center;
    display: flex;
    gap: .9rem;
    margin-bottom: 1rem;
}

.auth-brand h1 {
    font-size: 2rem;
    font-weight: 900;
    margin: 0;
}

.auth-copy {
    color: var(--rp-muted);
}

.form-control {
    background: var(--rp-card);
    border-color: var(--rp-border);
    border-radius: 14px;
    color: var(--rp-text);
}

.form-control:focus {
    background: var(--rp-card);
    border-color: var(--rp-primary);
    box-shadow: 0 0 0 .2rem rgba(139, 92, 246, .16);
    color: var(--rp-text);
}

.btn-primary {
    background: linear-gradient(135deg, #7c3aed, #6d5dfc);
    border-color: transparent;
    border-radius: 14px;
    color: #fff;
    font-weight: 900;
}

.compact-button {
    font-size: .95rem;
    min-height: 44px;
    padding: .55rem 1rem;
}

.empty-state {
    padding: 1.4rem;
    position: relative;
}

.empty-state h2,
.empty-state h3 {
    font-weight: 900;
    margin-bottom: .35rem;
}

.empty-state p,
.form-hint {
    color: var(--rp-muted);
}

.inline-empty {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: .5rem 0;
}

.muted-action {
    color: var(--rp-muted);
}

.edit-form {
    display: grid;
    gap: 1rem;
}

.form-card {
    padding: 1.1rem;
    position: relative;
}

.form-card h2 {
    font-size: 1.25rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.form-grid,
.distance-row,
.status-fields {
    display: grid;
    gap: .85rem;
}

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

.field label {
    color: var(--rp-muted);
    display: block;
    font-size: .85rem;
    font-weight: 900;
    margin-bottom: .3rem;
}

.distance-editor {
    display: grid;
    gap: 1rem;
}

.distance-row {
    border: 1px solid var(--rp-border);
    border-radius: 18px;
    padding: .9rem;
}

.status-form {
    display: grid;
    flex: 1;
    gap: .75rem;
}

.status-fields {
    grid-template-columns: 1fr;
}

.danger-zone {
    margin-top: 1rem;
}

.danger-button {
    border-color: rgba(251, 113, 133, .45);
    color: var(--rp-red);
}

.import-summary {
    margin-bottom: 1rem;
}

.import-log {
    overflow-x: auto;
}

.diagnostics-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: 1fr;
    margin: 1rem 0;
}

.diagnostics-grid div {
    border: 1px solid var(--rp-border);
    border-radius: 14px;
    padding: .75rem;
}

.diagnostics-grid span {
    color: var(--rp-muted);
    display: block;
    font-size: .8rem;
    font-weight: 900;
    margin-bottom: .25rem;
    text-transform: uppercase;
}

.diagnostics-grid strong {
    color: var(--rp-text);
    overflow-wrap: anywhere;
}

.import-log table {
    border-collapse: collapse;
    min-width: 780px;
    width: 100%;
}

.import-log th,
.import-log td {
    border-bottom: 1px solid var(--rp-border);
    color: var(--rp-muted);
    padding: .8rem;
    text-align: left;
    vertical-align: top;
}

.import-log th {
    color: var(--rp-text);
    font-size: .8rem;
    font-weight: 900;
    text-transform: uppercase;
}

.import-log strong {
    color: var(--rp-text);
    display: block;
}

.import-thumb {
    border-radius: 10px;
    display: inline-block;
    height: 48px;
    overflow: hidden;
    width: 64px;
}

.import-thumb img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.event-chip.added {
    background: var(--rp-green-soft);
    border-color: rgba(53, 214, 107, .5);
    color: var(--rp-green);
}

.event-chip.updated {
    background: var(--rp-blue-soft);
    border-color: rgba(56, 168, 255, .5);
    color: var(--rp-blue);
}

.event-chip.skipped {
    background: rgba(148, 163, 184, .12);
    color: var(--rp-muted);
}

.event-chip.failed {
    background: rgba(251, 113, 133, .14);
    border-color: rgba(251, 113, 133, .45);
    color: var(--rp-red);
}

@media (min-width: 640px) {
    .stat-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .quick-actions {
        grid-template-columns: repeat(3, 1fr);
    }

    .today-button {
        display: inline-flex;
    }

    .calendar-toolbar {
        grid-template-columns: auto 1fr auto auto;
    }

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

    .field.wide {
        grid-column: 1 / -1;
    }

    .distance-row {
        grid-template-columns: repeat(4, 1fr);
    }

    .status-fields {
        grid-template-columns: repeat(3, 1fr);
    }

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

@media (min-width: 768px) {
    body {
        padding-bottom: 0;
    }

    .desktop-nav {
        display: flex;
    }

    .logout-form {
        display: block;
    }

    .bottom-nav {
        display: none;
    }

    .event-card {
        grid-template-columns: 120px 1fr auto 32px;
    }

    .feature-card {
        grid-template-columns: 160px 1fr 210px;
    }

    .event-thumb,
    .feature-card .event-thumb {
        min-height: 150px;
    }

    .event-status-stack {
        display: grid;
    }

    .day-event-row {
        grid-template-columns: 74px 1fr auto 28px;
    }

    .info-grid {
        grid-template-columns: repeat(4, 1fr);
    }

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

    .detail-body {
        grid-template-columns: 1fr 320px;
    }

    .detail-actions {
        grid-template-columns: 1fr 1fr;
    }
}

@media print {
    :root,
    [data-bs-theme="dark"],
    [data-bs-theme="light"] {
        --rp-bg: #ffffff;
        --rp-bg-soft: #ffffff;
        --rp-surface: #ffffff;
        --rp-surface-strong: #ffffff;
        --rp-card: #ffffff;
        --rp-text: #111827;
        --rp-muted: #4b5563;
        --rp-border: #d1d5db;
        --rp-shadow: none;
        --rp-glow: none;
    }

    body {
        background: #ffffff;
        color: #111827;
    }

    .app-header,
    .bottom-nav,
    .footer,
    .theme-toggle,
    .logout-form {
        display: none;
    }
}

/* Avatar profile image integrations */
.avatar-bubble {
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.avatar-bubble img.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.avatar-fallback-initial {
    align-items: center;
    display: inline-flex;
    font-weight: 950;
    height: 100%;
    justify-content: center;
    line-height: 1;
    width: 100%;
}
.bottom-nav-item .bottom-nav-icon img.avatar-img-sm {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 50%;
}
.bottom-nav-avatar-fallback {
    align-items: center;
    background: linear-gradient(135deg, #dbeafe, #8b5cf6);
    border-radius: 50%;
    color: #07111f;
    display: inline-flex;
    font-size: .78rem;
    font-weight: 950;
    height: 24px;
    justify-content: center;
    line-height: 1;
    width: 24px;
}

.bottom-nav-item.active .bottom-nav-avatar-fallback {
    height: 34px;
    width: 34px;
}

/* Profile page styles */
.profile-container {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .profile-container {
        grid-template-columns: 320px 1fr;
    }
}
.profile-card {
    background: var(--rp-card);
    border: 1px solid var(--rp-border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--rp-shadow);
    backdrop-filter: blur(12px);
}
.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}
.profile-avatar-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--rp-primary);
    overflow: hidden;
    background: var(--rp-bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    transition: border-color 0.2s;
}
.profile-avatar-wrapper:hover {
    border-color: var(--rp-blue);
}
.profile-avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-avatar-upload-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.75rem;
    padding: 0.25rem 0;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s;
}
.profile-avatar-wrapper:hover .profile-avatar-upload-overlay {
    opacity: 1;
}
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.profile-stat-card {
    background: var(--rp-surface-strong);
    border: 1px solid var(--rp-border);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.profile-stat-card span {
    font-size: 0.8rem;
    color: var(--rp-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.profile-stat-card strong {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--rp-text);
}
.profile-stat-card small {
    font-size: 0.75rem;
    color: var(--rp-muted);
}
.cropper-container-wrapper {
    max-width: 100%;
    max-height: 400px;
    background-color: #000;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    overflow: hidden;
}
.cropper-container-wrapper img {
    display: block;
    max-width: 100%;
}

.dashboard-last-runs-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
    margin-bottom: 2rem;
}
@media (min-width: 992px) {
    .dashboard-last-runs-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.schedule-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 1.55rem;
}

.schedule-summary-card {
    min-height: 120px;
    border-radius: 24px;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    background: linear-gradient(135deg, rgba(10, 18, 35, .95), rgba(15, 12, 28, .95));
    border: 1px solid rgba(130, 150, 190, .28);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.schedule-summary-card:hover {
    transform: translateY(-1px);
}

.schedule-summary-card-custom {
    border-color: color-mix(in srgb, var(--user-color, #7c3aed) 55%, transparent);
    box-shadow: 0 0 28px color-mix(in srgb, var(--user-color, #7c3aed) 12%, transparent);
}

.schedule-summary-card-custom:hover {
    border-color: color-mix(in srgb, var(--user-color, #7c3aed) 80%, transparent);
    box-shadow: 0 0 32px color-mix(in srgb, var(--user-color, #7c3aed) 22%, transparent), 0 10px 25px rgba(0, 0, 0, .2);
}

.schedule-summary-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(145, 166, 216, .1);
    border: 1px solid rgba(145, 166, 216, .15);
}

.schedule-summary-card-custom .schedule-summary-icon {
    background: color-mix(in srgb, var(--user-color, #7c3aed) 15%, transparent);
    border-color: color-mix(in srgb, var(--user-color, #7c3aed) 25%, transparent);
    color: var(--user-color, #7c3aed);
}

.schedule-summary-icon .ui-icon {
    width: 22px;
    height: 22px;
}

.schedule-summary-title {
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 12px;
    white-space: nowrap;
    width: 100%;
    text-align: center;
}

.schedule-summary-card-custom .schedule-summary-title {
    color: var(--user-color, #7c3aed);
}

.schedule-summary-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.schedule-summary-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.schedule-summary-metric strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
    color: #fff;
    width: 100%;
    text-align: center;
}

.schedule-summary-metric span {
    display: block;
    margin-top: 6px;
    font-size: .9rem;
    font-weight: 700;
    color: rgba(210, 220, 245, .8);
    width: 100%;
    text-align: center;
}

.summary-card-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rp-muted);
    font-size: 1.25rem;
    transition: transform .18s ease, color .18s ease;
}

.schedule-summary-card:hover .summary-card-arrow {
    color: #fff;
    transform: translateX(2px);
}

.schedule-summary-card-custom .summary-card-arrow {
    color: color-mix(in srgb, var(--user-color, #7c3aed) 50%, transparent);
}

.schedule-summary-card-custom:hover .summary-card-arrow {
    color: var(--user-color, #7c3aed);
}

[data-bs-theme="light"] .schedule-summary-card {
    background: rgba(255, 255, 255, .85);
    border-color: rgba(145, 166, 216, .2);
}

[data-bs-theme="light"] .schedule-summary-card-custom {
    border-color: color-mix(in srgb, var(--user-color, #7c3aed) 35%, transparent);
}

@media (max-width: 700px) {
    .schedule-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .schedule-summary-card {
        min-height: auto;
        padding: 12px;
    }

    .schedule-summary-icon {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }

    .schedule-summary-icon .ui-icon {
        width: 15px;
        height: 15px;
    }

    .schedule-summary-title {
        font-size: 0.78rem;
        line-height: 1.1;
        margin-bottom: 8px;
        white-space: nowrap;
    }

    .schedule-summary-metrics {
        gap: 8px;
    }

    .schedule-summary-metric strong {
        font-size: 1.35rem;
    }

    .schedule-summary-metric span {
        font-size: .68rem;
    }

    .summary-card-arrow {
        display: none;
    }

    /* Mobile refinements for quick action cards */
    .quick-action-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .quick-action-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 6px;
        min-height: 82px;
        padding: 8px 4px;
        border-radius: 14px;
    }

    .quick-action-arrow {
        display: none;
    }

    .quick-action-icon {
        border-radius: 11px;
        height: 38px;
        width: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
    }

    .quick-action-icon .ui-icon {
        width: 18px;
        height: 18px;
    }

    .quick-action-card > span:nth-child(2) {
        text-align: center;
        width: 100%;
        min-width: 0;
        margin-top: 2px;
        display: block;
    }

    .quick-action-card strong {
        font-size: .85rem;
        line-height: 1.1;
        overflow-wrap: anywhere;
        display: block;
        width: 100%;
        text-align: center;
    }

    .quick-action-card small {
        display: none;
    }
}

[data-bs-theme="light"] .quick-action-card.orange {
    border-color: rgba(255, 149, 64, .35);
}

@media (max-width: 380px) {
    .quick-action-card strong {
        font-size: .78rem;
    }
}

/* Loading Overlay & Spinner styles */
.runplan-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(2, 6, 18, .78);
    backdrop-filter: blur(8px);
}

.runplan-loading-overlay.is-visible {
    display: flex;
}

.runplan-loading-card {
    width: min(360px, 92vw);
    border-radius: 24px;
    padding: 28px 24px;
    text-align: center;
    background: linear-gradient(135deg, rgba(12, 18, 38, .96), rgba(18, 12, 35, .96));
    border: 1px solid rgba(155, 110, 255, .35);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .5), 0 0 36px rgba(139, 92, 246, .16);
}

.runplan-spinner {
    width: 46px;
    height: 46px;
    margin: 0 auto 18px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, .12);
    border-top-color: #9b6eff;
    animation: runplanSpin .85s linear infinite;
}

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

.runplan-loading-title {
    font-weight: 800;
    font-size: 1.2rem;
    color: #fff;
}

.runplan-loading-subtitle {
    margin-top: 8px;
    color: rgba(220, 230, 255, .72);
    font-size: .9rem;
}

/* Treadmill Placeholder Styles */
.runplan-treadmill-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(36, 139, 255, 0.04), var(--rp-blue-soft));
    border: 1px solid rgba(36, 139, 255, 0.22);
    box-shadow: 0 8px 32px rgba(36, 139, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 1rem;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* Specific radius matching for detail page */
.activity-route-empty.runplan-treadmill-placeholder {
    border-radius: 15px;
    min-height: 240px;
}

/* JS-injected map container placeholder style overrides */
.activity-route-map.runplan-treadmill-placeholder {
    border-radius: 15px;
    height: 300px;
    background: linear-gradient(135deg, rgba(36, 139, 255, 0.04), var(--rp-blue-soft));
    border: 1px solid rgba(36, 139, 255, 0.22);
}

.runplan-treadmill-artwork {
    color: var(--rp-blue);
    margin-bottom: 10px;
    filter: drop-shadow(0 0 8px rgba(36, 139, 255, 0.35));
    display: flex;
    align-items: center;
    justify-content: center;
}

.runplan-treadmill-artwork svg {
    width: 48px;
    height: 48px;
}

.runplan-treadmill-title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.runplan-treadmill-subtitle {
    font-size: 0.78rem;
    color: #91a6d8;
    opacity: 0.85;
}

/* Event Photo Manual Upload Tile */
.event-meta-upload-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.event-meta-fields {
    width: 100%;
}

.event-photo-tile-container {
    display: flex;
    flex-direction: column;
    width: 140px;
}

.event-photo-tile-container label {
    color: var(--rp-muted);
    font-size: .85rem;
    font-weight: 900;
    margin-bottom: .3rem;
}

.event-photo-tile {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 8px;
    border: 2px dashed var(--rp-border-color);
    background: var(--rp-bg-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233a4f7c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E") no-repeat center;
    background-size: 24px;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-photo-tile:hover {
    border-color: var(--rp-blue);
    background-color: var(--rp-surface-strong);
}

.event-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.event-photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: bold;
}

.event-photo-overlay .ui-icon {
    width: 20px;
    height: 20px;
    stroke: #ffffff;
}

.event-photo-tile:hover .event-photo-overlay {
    opacity: 1;
}

.event-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    color: var(--rp-muted);
    font-size: 0.75rem;
    font-weight: bold;
    width: 100%;
    height: 100%;
    background: var(--rp-bg-soft);
}

.event-photo-placeholder .ui-icon {
    width: 24px;
    height: 24px;
    stroke: var(--rp-muted);
    transition: stroke 0.2s ease;
}

.event-photo-tile:hover .event-photo-placeholder {
    color: var(--rp-blue);
}

.event-photo-tile:hover .event-photo-placeholder .ui-icon {
    stroke: var(--rp-blue);
}

/* Form grid inner to maintain columns */
.form-grid-inner {
    display: grid;
    gap: .85rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .event-meta-upload-container {
        grid-template-columns: 1fr auto;
        align-items: end;
    }
    
    .form-grid-inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   RunPlan Upgraded Gear & Shoe Styles
   ============================================================ */

.gear-toggle-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.toggle-label {
    font-size: 0.9rem;
    color: var(--rp-muted);
    font-weight: 700;
}

.premium-gear-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 1.25rem;
}

@media (min-width: 768px) {
    .premium-gear-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

.premium-gear-card-link {
    color: inherit;
    text-decoration: none;
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.premium-gear-card-link:hover {
    transform: translateY(-4px);
}

.premium-gear-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
    min-height: 380px;
    background: linear-gradient(135deg, rgba(16, 24, 48, 0.8), rgba(8, 12, 24, 0.9));
    border: 1px solid color-mix(in srgb, var(--shoe-primary, #ff6b35) 15%, rgba(145, 166, 216, 0.15));
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 15px color-mix(in srgb, var(--shoe-primary, #ff6b35) 6%, transparent);
    backdrop-filter: blur(12px);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.premium-gear-card-link:hover .premium-gear-card {
    border-color: color-mix(in srgb, var(--shoe-primary, #ff6b35) 45%, rgba(145, 166, 216, 0.3));
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 25px color-mix(in srgb, var(--shoe-primary, #ff6b35) 15%, transparent);
}

.gear-card-inactive {
    opacity: 0.5;
    filter: grayscale(40%);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3) !important;
}

.gear-card-image-box {
    position: relative;
    height: 180px;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.gear-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gear-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
}

.placeholder-shoe-icon {
    width: 48px;
    height: 48px;
    color: var(--rp-muted);
    opacity: 0.35;
}

.gear-owner-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(5, 8, 22, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--rp-text);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 800;
    backdrop-filter: blur(4px);
}

.gear-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 800;
    backdrop-filter: blur(4px);
    border: 1px solid transparent;
}

.gear-status-badge.active {
    background: rgba(25, 135, 84, 0.2);
    border-color: rgba(25, 135, 84, 0.4);
    color: #4ade80;
}

.gear-status-badge.inactive {
    background: rgba(220, 53, 69, 0.2);
    border-color: rgba(220, 53, 69, 0.4);
    color: #f87171;
}

.gear-status-badge.large {
    font-size: 0.85rem;
    padding: 4px 12px;
}

.gear-card-details {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.gear-display-name {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--rp-text);
    margin: 0;
    line-height: 1.25;
}

.gear-sub-name {
    font-size: 0.82rem;
    color: var(--rp-muted);
    font-weight: 700;
    margin: 0.25rem 0 1rem 0;
}

.gear-card-metrics {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 14px;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.metric-km-box {
    display: flex;
    align-items: baseline;
}

.metric-km-val {
    font-size: 2.2rem;
    font-weight: 950;
    line-height: 1;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--rp-text) 30%, color-mix(in srgb, var(--shoe-primary, #ff6b35) 60%, var(--rp-text)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--rp-muted);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.2rem;
}

.gear-card-footer {
    margin-top: 0.85rem;
    display: flex;
    justify-content: center;
}

.card-btn {
    font-size: 0.75rem;
    font-weight: 800;
    color: color-mix(in srgb, var(--shoe-primary, #ff6b35) 85%, var(--rp-text));
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px dashed transparent;
    transition: border-color 0.25s ease;
}

.premium-gear-card-link:hover .card-btn {
    border-bottom-color: var(--shoe-primary, #ff6b35);
}

/* ============================================================
   Detail/Edit Page Specific Layout
   ============================================================ */

.gear-detail-page {
    margin-top: 1rem;
}

.detail-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.back-link {
    margin-bottom: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.gear-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .gear-detail-grid {
        grid-template-columns: 1.2fr 1fr;
    }
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 576px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-grid .full-width {
        grid-column: span 2;
    }
}

.color-picker-wrapper {
    display: flex;
    gap: 0.5rem;
}

.form-control-color {
    padding: 0.25rem;
    width: 44px;
    height: 38px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--rp-border);
    cursor: pointer;
}

.color-hex-text {
    flex-grow: 1;
}

.form-group-toggle {
    grid-column: span 2;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-start;
}

@media (min-width: 576px) {
    .form-group-toggle {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }
    
    .toggle-desc {
        width: 100%;
        margin-top: 0.2rem;
    }
}

.toggle-title {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--rp-text);
    margin-right: auto;
}

.toggle-desc {
    font-size: 0.75rem;
    color: var(--rp-muted);
}

.form-footer {
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 1.25rem;
    display: flex;
    justify-content: flex-end;
}

/* Image Column Styles */
.gear-image-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.shoe-hero-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    align-items: center;
}

.hero-image-box {
    width: 100%;
    height: 240px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 1.25rem;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4);
}

.hero-shoe-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.hero-shoe-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--rp-muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.placeholder-hero-icon {
    width: 64px;
    height: 64px;
    opacity: 0.25;
}

.hero-card-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.metric-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.5rem;
}

.metric-block .metric-val {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--rp-text);
}

.metric-block .metric-lbl {
    font-size: 0.7rem;
    color: var(--rp-muted);
    font-weight: 800;
    text-transform: uppercase;
}

.upload-form-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.upload-form-box form {
    width: 100%;
}

.upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    cursor: pointer;
    font-weight: 800;
}

.search-images-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    font-weight: 800;
}

.candidate-paste-card {
    padding: 1.25rem;
}

.section-desc {
    font-size: 0.78rem;
    color: var(--rp-muted);
    margin-bottom: 0.85rem;
}

.input-action-row {
    display: flex;
    gap: 0.5rem;
}

.input-action-row input {
    flex-grow: 1;
}

.candidates-gallery-card {
    padding: 1.25rem;
}

.gallery-empty {
    text-align: center;
    padding: 2rem 1rem;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--rp-muted);
    font-size: 0.8rem;
}

.candidates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.candidate-item-card {
    position: relative;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.candidate-item-card.selected {
    border-color: var(--shoe-primary, #ff6b35);
    box-shadow: 0 0 10px color-mix(in srgb, var(--shoe-primary, #ff6b35) 20%, transparent);
}

.candidate-thumb-box {
    position: relative;
    height: 100px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.candidate-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selected-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--shoe-primary, #ff6b35);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 1px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.candidate-actions {
    display: flex;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.1);
}

.candidate-btn {
    flex-grow: 1;
    border: none;
    background: transparent;
    color: var(--rp-text);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.35rem 0.25rem;
    cursor: pointer;
    text-align: center;
    text-transform: uppercase;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.candidate-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.candidate-btn.select-btn {
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    color: #4ade80;
}

.candidate-btn.delete-btn {
    color: #f87171;
}

.candidate-btn.delete-btn:hover {
    background: rgba(220, 53, 69, 0.15);
}

/* ============================================================
   RunPlan Activity Details Redesign (Stage 1)
   ============================================================ */

.activity-detail-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-bottom: 2rem;
}

/* Page body background override for Details page to remove top purple/blue global gradients */
body:has(.activity-detail-page) {
    background: var(--rp-bg);
}

/* Subtler card accent glow instead of global purple/blue card wash */
.activity-detail-page .app-card::before {
    background: linear-gradient(135deg, rgba(56, 168, 255, 0.05), transparent 40%);
}

.activity-detail-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.activity-hero-card {
    padding: 1.5rem;
    background: #0a1220;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.hero-top-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    position: relative;
}

.owner-avatar-box {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.owner-avatar-box .avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.owner-avatar-box .avatar-initial {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--rp-text);
}

.title-date-box {
    flex-grow: 1;
    min-width: 200px;
}

.title-date-box h1 {
    font-size: 1.4rem;
    font-weight: 950;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: var(--rp-text);
}

.activity-date {
    font-size: 0.82rem;
    color: var(--rp-muted);
    margin: 0.25rem 0 0 0;
    font-weight: 700;
}

.primary-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (min-width: 576px) {
    .primary-metrics-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.metric-cell {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 0.75rem;
    align-items: center;
    justify-content: center;
}

.metric-cell .metric-label {
    font-size: 0.72rem;
    color: var(--rp-muted);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.metric-cell .metric-value {
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--rp-text);
}

.metric-cell .metric-value small {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--rp-muted);
}

.hero-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06) 20%, rgba(255, 255, 255, 0.06) 80%, transparent);
    margin: 1.25rem 0;
}

.secondary-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem 1rem;
}

@media (min-width: 768px) {
    .secondary-metrics-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.secondary-cell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.secondary-cell .cell-label {
    font-size: 0.78rem;
    color: var(--rp-muted);
    font-weight: 700;
}

.secondary-cell .cell-value {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--rp-text);
}

.secondary-cell .cell-value.locked {
    color: var(--rp-muted);
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.activity-meta-strip {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(10, 18, 32, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    margin-bottom: 1.25rem;
}

.activity-meta-items {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
}

.activity-meta-tile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    padding: 0.35rem 0.6rem;
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 180px;
    max-width: 320px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.activity-meta-tile:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.02);
}

.activity-meta-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.activity-meta-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.activity-meta-thumb .placeholder-shoe-icon,
.activity-meta-thumb .placeholder-device-icon {
    width: 24px;
    height: 24px;
    color: var(--rp-muted);
}

.activity-meta-content {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.activity-meta-title {
    font-size: 0.8rem;
    color: var(--rp-text);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-meta-subtitle {
    font-size: 0.7rem;
    color: var(--rp-muted);
    font-weight: 500;
}

.activity-action-sync-streams {
    font-size: 0.75rem !important;
    min-height: 28px !important;
    padding: 0.25rem 0.6rem !important;
    border-radius: 4px !important;
    gap: 0.25rem !important;
}

@media (max-width: 576px) {
    .activity-meta-tile {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

@media (min-width: 768px) {
    .activity-meta-tile {
        flex: 0 1 auto;
        min-width: 200px;
        max-width: 280px;
    }
}

.activity-insight-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .activity-insight-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.insight-card {
    padding: 1.25rem;
    background: rgba(10, 18, 32, 0.82);
}

.insight-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 0.5rem;
}

.insight-card-header h3 {
    font-size: 1rem;
    font-weight: 900;
    color: var(--rp-text);
    margin: 0;
}

.insight-card-header .accent-icon {
    width: 20px;
    height: 20px;
    color: #ff6b35;
}

.insight-paragraph {
    font-size: 0.86rem;
    color: #8ea0c2;
    line-height: 1.45;
    margin: 0;
}

.snapshot-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.snapshot-item {
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
}

.snapshot-label {
    font-size: 0.7rem;
    color: var(--rp-muted);
    font-weight: 700;
}

.snapshot-value {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--rp-text);
    margin-top: 0.15rem;
}

.snapshot-value.muted {
    font-size: 0.75rem;
    color: var(--rp-muted);
    font-weight: 700;
}

/* Splits card styles */
.activity-splits-card {
    padding: 1.25rem;
    background: rgba(10, 18, 32, 0.85);
}

.activity-splits-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.activity-splits-head h2 {
    font-size: 1.1rem;
    font-weight: 900;
    margin: 0;
    color: var(--rp-text);
}

.activity-splits-head span {
    font-size: 0.75rem;
    color: var(--rp-muted);
    font-weight: 700;
}

.splits-table-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.splits-header-row {
    display: flex;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--rp-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.splits-body {
    display: flex;
    flex-direction: column;
}

.split-row {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.split-row-data {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--rp-text);
    font-weight: 800;
}

.col-km {
    width: 15%;
}

.col-pace {
    width: 35%;
    font-weight: 900;
}

.col-elev {
    width: 25%;
    text-align: right;
    color: #4ade80;
}

.col-hr {
    width: 25%;
    text-align: right;
    color: #f43f5e;
}

.split-bar-wrapper {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 2px;
    margin-top: 0.4rem;
    overflow: hidden;
}

.split-pace-bar {
    height: 100%;
    background: linear-gradient(90deg, #38a8ff, #00f2fe);
    border-radius: 2px;
}

.splits-empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--rp-muted);
    font-size: 0.85rem;
    border: 1px dashed rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

/* Route map card override */
.activity-route-card {
    padding: 1.25rem;
    background: rgba(10, 18, 32, 0.85);
}

.activity-route-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.activity-route-head h2 {
    font-size: 1.1rem;
    font-weight: 900;
    margin: 0;
    color: var(--rp-text);
}

.activity-route-head span {
    font-size: 0.75rem;
    color: var(--rp-muted);
    font-weight: 700;
}

/* Charts card overrides */
.activity-charts-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.activity-charts-head h2 {
    font-size: 1.2rem;
    font-weight: 950;
    color: var(--rp-text);
    margin-bottom: 0;
}

.activity-chart-empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--rp-muted);
    font-size: 0.85rem;
    background: rgba(10, 18, 32, 0.85);
}

/* Make charts display in a 2-column grid on desktop, 1-column on mobile */
.activity-chart-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .activity-chart-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.activity-chart-card {
    padding: 1.25rem;
    background: #0a1220;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.activity-chart-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    width: 100%;
}

.activity-chart-card-head h3 {
    font-size: 0.95rem;
    font-weight: 900;
    color: var(--rp-text);
    margin: 0;
}

.performance-chart-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Pill Accents (8% transparent background, 20% border, full accent text color) */
.chart-pace .performance-chart-pill {
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.2);
    color: #00f2fe;
}

.chart-heartrate .performance-chart-pill {
    background: rgba(244, 63, 94, 0.08);
    border: 1px solid rgba(244, 63, 94, 0.2);
    color: #f43f5e;
}

.chart-elevation .performance-chart-pill {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.chart-cadence .performance-chart-pill {
    background: rgba(196, 181, 253, 0.08);
    border: 1px solid rgba(196, 181, 253, 0.2);
    color: #c4b5fd;
}

.chart-power .performance-chart-pill {
    background: rgba(249, 115, 22, 0.08);
    border: 1px solid rgba(249, 115, 22, 0.2);
    color: #f97316;
}

.activity-chart-frame {
    height: 160px;
    position: relative;
    width: 100%;
}

@media (min-width: 768px) {
    .activity-chart-frame {
        height: 220px;
    }
}

/* Mobile & PWA Layout Refinements (Compact margins, card paddings, and safe margins) */
@media (max-width: 767px) {
    .activity-detail-page {
        gap: 0.85rem;
    }

    .activity-hero-card {
        padding: 1rem;
        border-radius: 18px;
    }

    .primary-metrics-grid {
        gap: 0.65rem;
        margin-top: 1rem;
    }

    .metric-cell {
        padding: 0.5rem;
        border-radius: 10px;
    }

    .metric-cell .metric-value {
        font-size: 1.2rem;
    }

    .metric-cell .metric-label {
        font-size: 0.65rem;
    }

    .secondary-metrics-grid {
        gap: 0.5rem;
    }

    .secondary-cell {
        padding: 0.35rem 0.5rem;
        border-radius: 6px;
    }

    .secondary-cell .cell-label {
        font-size: 0.72rem;
    }

    .secondary-cell .cell-value {
        font-size: 0.82rem;
    }

    .activity-insight-grid {
        gap: 0.85rem;
    }

    .insight-card {
        padding: 0.85rem;
        border-radius: 14px;
    }

    .activity-splits-card {
        padding: 0.85rem;
        border-radius: 14px;
    }

    .activity-route-card {
        padding: 0.85rem;
        border-radius: 14px;
    }

    .activity-chart-card {
        padding: 0.85rem;
        border-radius: 14px;
    }

    .activity-chart-grid {
        gap: 0.85rem;
    }
}

/* Lazy Loading / Infinite Scroll styles */
.infinite-scroll-loading,
.infinite-scroll-end,
.infinite-scroll-error {
    text-align: center;
    padding: 1.5rem 1rem;
    color: var(--rp-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.infinite-scroll-loading .spinner-box {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.infinite-scroll-loading .loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spinner-rotate 0.8s linear infinite;
}

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

.infinite-scroll-end p {
    margin: 0;
    opacity: 0.6;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.infinite-scroll-error p {
    margin: 0;
    color: #ef4444;
}

/* Event Location Geo Map Fix Styles */
.btn-google-maps {
    align-items: center;
    background: linear-gradient(135deg, #f97316, #ffb347);
    border: 1px solid rgba(255, 184, 117, .72);
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(249, 115, 22, .22);
    color: #1f1308;
    display: inline-flex;
    font-size: .95rem;
    font-weight: 900;
    gap: 8px;
    justify-content: center;
    min-height: 48px;
    padding: .72rem 1rem;
    text-decoration: none;
    transition: all .2s ease-in-out;
    white-space: nowrap;
}

.btn-google-maps:hover {
    background: linear-gradient(135deg, #fb923c, #ffd18a);
    border-color: rgba(255, 209, 138, .92);
    color: #170d05;
    box-shadow: 0 14px 32px rgba(249, 115, 22, .3);
    transform: translateY(-1px);
}

@media (max-width: 767px) {
    .event-map-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn-google-maps {
        min-height: 52px;
        width: 100%;
    }
}

/* Dashboard New Event Lottie Siren Style */
.new-event-siren-lottie {
    display: inline-flex;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

/* Fallback dot if Lottie player fails to initialize */
.new-event-siren-lottie.lottie-fallback-dot {
    width: 24px;
    height: 24px;
    background-color: #f59e0b; /* Amber warning dot */
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.8);
}

@media (max-width: 767px) {
    .new-event-siren-lottie {
        width: 28px;
        height: 28px;
    }
}

/* Dashboard New Event Alert Layout */
.new-event-alert-container {
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.15);
}

.new-event-alert-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.new-event-alert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.new-event-alert-message {
    font-size: 1.15rem;
    line-height: 1.3;
    display: flex;
    align-items: center;
}

.new-event-alert-actions {
    display: flex;
    align-items: center;
    gap: 0.50rem;
    flex-shrink: 0;
}

.new-event-alert-actions .new-event-view-btn {
    background: var(--rp-primary) !important;
    border-color: var(--rp-primary) !important;
    font-weight: 600 !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 1.25rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.new-event-alert-actions .new-event-view-btn:hover {
    background: #6d5dfc !important;
    border-color: #6d5dfc !important;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.5);
}

.new-event-alert-actions .new-event-clear-btn {
    background: var(--rp-blue) !important;
    border-color: var(--rp-blue) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 1.25rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.new-event-alert-actions .new-event-clear-btn:hover {
    background: #248bff !important;
    border-color: #248bff !important;
    box-shadow: 0 0 15px rgba(36, 139, 255, 0.5);
    color: #ffffff !important;
}

/* Mobile responsive styles */
@media (max-width: 640px) {
    .new-event-alert-inner {
        gap: 0.75rem;
    }
    
    .new-event-siren-lottie {
        width: 56px !important;
        height: 56px !important;
        transform: scale(1.2);
    }
    
    .new-event-alert-message {
        font-size: clamp(1.0rem, 3.5vw, 1.15rem);
        line-height: 1.2;
    }
    
    .new-event-alert-actions {
        flex-direction: column;
        align-items: stretch;
        width: 90px;
        gap: 0.45rem;
    }
    
    .new-event-alert-actions .new-event-view-btn,
    .new-event-alert-actions .new-event-clear-btn {
        width: 100%;
        min-height: 36px;
        padding: 0 0.5rem;
        font-size: 0.85rem;
        text-align: center;
    }
}

/* New Events View Compact Header Card */
.new-events-view-card {
    background: var(--rp-card);
    border: 1px solid var(--rp-border);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--rp-shadow);
}

.new-events-view-card__text {
    flex: 1;
}

.new-events-view-card__text h1 {
    font-size: 1.6rem;
    font-weight: 900;
    margin: 0;
    line-height: 1.2;
    color: var(--rp-text);
}

.new-events-view-card__text p {
    color: var(--rp-muted);
    font-size: 0.95rem;
    margin: 0.35rem 0 0 0;
}

.new-events-view-card__actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.new-events-view-card__actions .btn-clear-new-events {
    margin-top: 0 !important;
    white-space: nowrap;
    min-width: 170px;
    text-align: center;
    justify-content: center;
}

/* Mobile Layout for New Events Header Card */
@media (max-width: 640px) {
    .new-events-view-card {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem 1.25rem;
    }
    
    .new-events-view-card__text h1 {
        font-size: 1.35rem;
    }
    
    .new-events-view-card__text p {
        font-size: 0.88rem;
    }
    
    .new-events-view-card__actions {
        width: 100%;
    }
    
    .new-events-view-card__actions .btn-clear-new-events {
        width: 100%;
        min-height: 42px;
        font-size: 0.9rem;
    }
}
