:root {
    --bg: #0f172a;
    --card: #1e293b;
    --card-2: #172033;
    --accent-green: #22c55e;
    --accent-blue: #3b82f6;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --danger: #f87171;
    --line: #334155;
}

* { box-sizing: border-box; }

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    background: radial-gradient(circle at top right, #1d4ed8 0%, #0f172a 30%), var(--bg);
    color: var(--text);
    min-height: 100vh;
}

html.modal-open,
body.modal-open {
    overflow: hidden;
    overscroll-behavior: none;
}

body.modal-open {
    position: fixed;
    inset: 0;
    width: 100%;
}

body.auth-page {
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.24), transparent 24%),
        radial-gradient(circle at right 12%, rgba(59, 130, 246, 0.3), transparent 26%),
        linear-gradient(180deg, #eff6ff 0%, #dbeafe 48%, #e2e8f0 100%);
    color: #0f172a;
}

body.dashboard-page {
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.24), transparent 24%),
        radial-gradient(circle at right 12%, rgba(59, 130, 246, 0.3), transparent 26%),
        linear-gradient(180deg, #eff6ff 0%, #dbeafe 48%, #e2e8f0 100%);
    color: #0f172a;
}

body.home-page {
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.24), transparent 24%),
        radial-gradient(circle at right 12%, rgba(59, 130, 246, 0.3), transparent 26%),
        linear-gradient(180deg, #eff6ff 0%, #dbeafe 48%, #e2e8f0 100%);
    color: #0f172a;
}

body.friends-page,
body.profiles-page,
body.support-page,
body.settings-page,
body.account-page,
body.premium-page,
body.admin-page {
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.24), transparent 24%),
        radial-gradient(circle at right 12%, rgba(59, 130, 246, 0.3), transparent 26%),
        linear-gradient(180deg, #eff6ff 0%, #dbeafe 48%, #e2e8f0 100%);
    color: #0f172a;
}

a { color: var(--accent-blue); text-decoration: none; }

a:hover { text-decoration: underline; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

body.auth-page .topbar {
    background: rgba(255, 255, 255, 0.72);
    border-bottom-color: rgba(148, 163, 184, 0.42);
}

body.dashboard-page .topbar {
    background: rgba(255, 255, 255, 0.72);
    border-bottom-color: rgba(148, 163, 184, 0.42);
}

body.home-page .topbar {
    background: rgba(255, 255, 255, 0.72);
    border-bottom-color: rgba(148, 163, 184, 0.42);
}

body.friends-page .topbar,
body.profiles-page .topbar,
body.support-page .topbar,
body.settings-page .topbar,
body.account-page .topbar,
body.premium-page .topbar,
body.admin-page .topbar {
    background: rgba(255, 255, 255, 0.72);
    border-bottom-color: rgba(148, 163, 184, 0.42);
}

.topbar nav {
    display: flex;
    gap: 14px;
    align-items: center;
}

.topbar .primary-nav {
    display: flex;
    gap: 14px;
    align-items: center;
}

.topbar .primary-nav a,
.topbar .primary-nav .link-button {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 999px;
    text-decoration: none;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.topbar .primary-nav a:hover,
.topbar .primary-nav a:focus,
.topbar .primary-nav a:active,
.topbar .primary-nav .link-button:hover,
.topbar .primary-nav .link-button:focus,
.topbar .primary-nav .link-button:active {
    text-decoration: none;
    color: #1d4ed8;
    background: rgba(219, 234, 254, 0.9);
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.14);
}

.topbar .primary-nav a.is-active,
.topbar .primary-nav .account-link.is-active,
.topbar .primary-nav .locale-switch-button.is-active {
    color: #1d4ed8 !important;
    background: rgba(191, 219, 254, 0.95);
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.28);
}

.locale-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.2);
}

.locale-switch-button {
    min-width: 46px;
    justify-content: center;
    padding: 0 10px !important;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.mobile-nav-toggle {
    display: none;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.mobile-nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #0f172a;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-weight: 700;
    letter-spacing: 0.4px;
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

body.auth-page .brand,
body.auth-page .topbar a,
body.auth-page .link-button {
    color: #0f172a;
}

body.dashboard-page .brand,
body.dashboard-page .topbar a,
body.dashboard-page .link-button {
    color: #0f172a;
}

body.home-page .brand,
body.home-page .topbar a,
body.home-page .link-button {
    color: #0f172a;
}

body.friends-page .brand,
body.friends-page .topbar a,
body.friends-page .link-button,
body.profiles-page .brand,
body.profiles-page .topbar a,
body.profiles-page .link-button,
body.support-page .brand,
body.support-page .topbar a,
body.support-page .link-button,
body.settings-page .brand,
body.settings-page .topbar a,
body.settings-page .link-button,
body.account-page .brand,
body.account-page .topbar a,
body.account-page .link-button,
body.premium-page .brand,
body.premium-page .topbar a,
body.premium-page .link-button,
body.admin-page .brand,
body.admin-page .topbar a,
body.admin-page .link-button {
    color: #0f172a;
}

.container {
    flex: 1 0 auto;
    width: min(1080px, 92%);
    margin: 28px auto;
    display: grid;
    gap: 18px;
}

body.home-page .container {
    width: min(1180px, 92%);
    gap: 24px;
}

body.demo-page .container {
    width: min(1180px, 92%);
    gap: 24px;
}

.grid.two {
    display: grid;
    gap: 18px;
}

.public-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.home-hero {
    display: grid;
    gap: 22px;
    align-items: center;
}

.demo-hero {
    display: grid;
    gap: 22px;
    align-items: start;
}

.home-hero-copy {
    display: grid;
    gap: 18px;
}

.demo-hero-copy {
    display: grid;
    gap: 18px;
}

.home-hero h1 {
    margin: 0;
    font-size: clamp(1.6rem, 3.2vw, 2.6rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
    max-width: 22ch;
    text-wrap: balance;
}

.home-lead {
    margin: 0;
    max-width: 62ch;
    color: #334155;
    font-size: 1.1rem;
    line-height: 1.7;
}

.home-cta-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.home-primary-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding-inline: 18px 24px;
    border: 0;
    background:
        linear-gradient(135deg, #2563eb, #0f172a 58%, #16a34a);
    box-shadow:
        0 24px 40px rgba(37, 99, 235, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    cursor: pointer;
}

.home-primary-cta:hover,
.home-primary-cta:focus-visible {
    transform: translateY(-1px) scale(1.01);
}

.home-login-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding-inline: 24px;
}

.home-register-modal {
    width: min(760px, 100%);
    padding: 22px;
}

.home-register-card {
    display: grid;
    gap: 18px;
    padding: 18px 6px 6px;
}

.home-register-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.home-register-card-head strong {
    display: block;
    font-size: 1.12rem;
}

.home-register-card-head p,
.home-register-actions p {
    margin: 6px 0 0;
    color: #475569;
    line-height: 1.6;
}

.home-register-link {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}

.home-register-form {
    display: grid;
    gap: 14px;
}

.home-register-form label {
    display: grid;
    gap: 8px;
    color: #0f172a;
    font-weight: 700;
}

.home-register-form input {
    min-height: 48px;
    padding: 0 14px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    font: inherit;
}

.home-register-form input:focus {
    outline: 2px solid rgba(37, 99, 235, 0.18);
    border-color: rgba(37, 99, 235, 0.44);
}

.home-register-actions {
    display: grid;
    gap: 10px;
}

.button.secondary {
    background: rgba(255, 255, 255, 0.84);
    color: #1d4ed8;
    border: 1px solid rgba(96, 165, 250, 0.28);
    box-shadow: none;
}

.home-mini-stats {
    display: grid;
    gap: 14px;
}

.home-mini-card {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
}

.home-mini-card strong {
    font-size: 1rem;
}

.home-mini-card span {
    color: #475569;
    line-height: 1.6;
}

.home-hero-visual {
    display: grid;
}

.demo-hero-side {
    display: grid;
}

.demo-highlight-card {
    display: grid;
    gap: 14px;
    padding: 24px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
}

.demo-highlight-card p {
    margin: 0;
    color: #475569;
    line-height: 1.7;
}

.demo-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.demo-quick-filters span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-weight: 700;
}

.home-track-card {
    display: grid;
    gap: 18px;
    padding: 24px;
    border-radius: 30px;
    background:
        linear-gradient(160deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.9)),
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.2), transparent 24%);
    color: #e2e8f0;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.24);
}

.home-track-header {
    display: flex;
    gap: 8px;
}

.home-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.home-dot.is-blue { background: #60a5fa; }
.home-dot.is-green { background: #22c55e; }
.home-dot.is-slate { background: #94a3b8; }

.home-track-grid {
    position: relative;
    min-height: 260px;
    border-radius: 24px;
    background:
        linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
    background-size: 100% 52px, 52px 100%;
    overflow: hidden;
}

.home-track-line {
    position: absolute;
    left: 8%;
    right: 6%;
    height: 3px;
    border-radius: 999px;
    transform-origin: left center;
}

.home-track-line.is-primary {
    top: 38%;
    background: linear-gradient(90deg, #60a5fa, #22c55e);
    transform: rotate(-9deg);
}

.home-track-line.is-secondary {
    top: 54%;
    background: linear-gradient(90deg, rgba(96, 165, 250, 0.6), rgba(56, 189, 248, 0.9));
    transform: rotate(6deg);
}

.home-track-line.is-tertiary {
    top: 68%;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.5), rgba(96, 165, 250, 0.75));
    transform: rotate(-3deg);
}

.home-track-score {
    display: grid;
    gap: 12px;
}

.home-track-score strong {
    display: block;
    font-size: 1.6rem;
    color: #f8fafc;
}

.home-track-score span {
    color: #94a3b8;
}

.home-grid {
    display: grid;
    gap: 18px;
}

.demo-grid {
    display: grid;
    gap: 18px;
}

.demo-user-card {
    display: grid;
    gap: 18px;
}

.demo-user-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.demo-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}

.demo-avatar.is-blue { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.demo-avatar.is-green { background: linear-gradient(135deg, #16a34a, #4ade80); }
.demo-avatar.is-amber { background: linear-gradient(135deg, #d97706, #fbbf24); }

.demo-user-email {
    color: #64748b;
    font-size: 0.95rem;
}

.demo-user-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
}

.demo-user-stats div {
    display: grid;
    gap: 4px;
}

.demo-user-stats span {
    color: #64748b;
    font-size: 0.92rem;
}

.demo-progress {
    overflow: hidden;
    height: 14px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
}

.demo-progress-bar {
    height: 100%;
    border-radius: inherit;
}

.demo-progress-bar.is-blue { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.demo-progress-bar.is-green { background: linear-gradient(90deg, #16a34a, #4ade80); }
.demo-progress-bar.is-amber { background: linear-gradient(90deg, #d97706, #fbbf24); }

.demo-dashboard {
    display: grid;
    gap: 18px;
}

.demo-panel {
    display: grid;
    gap: 16px;
}

.demo-board-list,
.demo-activity-list {
    display: grid;
    gap: 12px;
}

.demo-board-row,
.demo-activity-row {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.demo-board-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.demo-board-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-weight: 800;
}

.demo-board-name {
    font-weight: 700;
}

.demo-chart-wrap {
    min-height: 280px;
}

.demo-panel-wide {
    grid-column: 1 / -1;
}

.demo-activity-row span,
.demo-activity-row small {
    color: #64748b;
}

.demo-cta-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.demo-cta-card p {
    margin: 8px 0 0;
    color: #475569;
    line-height: 1.7;
}

.home-info-card {
    display: grid;
    gap: 16px;
}

.home-info-card h2,
.home-wide-card h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 1.12;
}

.home-feature-list,
.home-steps {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 14px;
}

.home-feature-list li,
.home-steps li {
    display: grid;
    gap: 4px;
    color: #475569;
    line-height: 1.6;
}

.home-feature-list strong,
.home-steps strong {
    color: #0f172a;
}

.home-wide-card {
    display: grid;
    gap: 20px;
}

.home-benefits {
    display: grid;
    gap: 14px;
}

.home-benefit {
    padding: 18px 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.home-benefit strong {
    display: block;
    margin-bottom: 8px;
}

.home-benefit p {
    margin: 0;
    color: #475569;
    line-height: 1.6;
}

@media (min-width: 900px) {
    .grid.two { grid-template-columns: 1.2fr 1fr; }
    .home-hero { grid-template-columns: 1.15fr 0.85fr; }
    .demo-hero { grid-template-columns: 1.15fr 0.85fr; }
    .home-mini-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .demo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .demo-dashboard { grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr); }
    .home-benefits { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .home-register-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .home-register-actions { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    .topbar {
        flex-wrap: wrap;
        gap: 12px;
    }

    .brand {
        max-width: calc(100% - 64px);
    }

    .brand-logo {
        width: 36px;
        height: 36px;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .topbar .primary-nav {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 18px;
        right: 18px;
        width: auto;
        margin-top: 0;
        padding: 14px;
        border-radius: 18px;
        border: 1px solid rgba(148, 163, 184, 0.28);
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
        backdrop-filter: blur(12px);
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .topbar .primary-nav[data-open="true"] {
        display: flex;
    }

    .topbar .primary-nav a,
    .topbar .primary-nav .inline-form,
    .topbar .primary-nav .link-button {
        width: 100%;
    }

    .topbar .primary-nav a,
    .topbar .primary-nav .link-button {
        display: flex;
        align-items: center;
        min-height: 46px;
        padding: 0 14px;
        border-radius: 12px;
        background: rgba(219, 234, 254, 0.68);
        color: #0f172a;
        font-weight: 600;
        text-decoration: none;
    }

    .topbar .primary-nav .inline-form {
        margin: 0;
    }

    .topbar .primary-nav .link-button {
        justify-content: flex-start;
        border: 0;
    }

    .locale-switch {
        width: 100%;
        justify-content: stretch;
    }

    .locale-switch-button {
        flex: 1 1 0;
        justify-content: center !important;
    }

    .home-primary-cta {
        width: 100%;
        justify-content: center;
    }

    .home-cta-row .button.secondary {
        width: 100%;
        justify-content: center;
    }

    .home-register-modal {
        padding: 18px;
    }
}

.card {
    background: linear-gradient(180deg, var(--card), var(--card-2));
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

body.dashboard-page .card {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(241, 245, 249, 0.8)),
        linear-gradient(180deg, #ffffff, #eef4fb);
    border-color: rgba(148, 163, 184, 0.38);
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.12);
    color: #0f172a;
}

body.home-page .card,
body.friends-page .card,
body.profiles-page .card,
body.support-page .card,
body.settings-page .card,
body.account-page .card,
body.premium-page .card,
body.admin-page .card {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(241, 245, 249, 0.8)),
        linear-gradient(180deg, #ffffff, #eef4fb);
    border-color: rgba(148, 163, 184, 0.38);
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.12);
    color: #0f172a;
}

.hero p { color: var(--muted); }
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
}

.hero-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.dashboard-profile-form {
    margin: 0;
}

.dashboard-profile-active {
    margin-top: 0;
    margin-bottom: 0;
}

.hero-profile-premium-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin: 2px 0 16px;
}

.hero-profile-block {
    display: grid;
    gap: 8px;
    min-width: min(320px, 100%);
}

.profiles-grid {
    display: grid;
    gap: 18px;
    align-items: start;
}

.profiles-card,
.profiles-locked-card {
    display: grid;
    gap: 16px;
    align-self: start;
}

.profiles-list {
    display: grid;
    gap: 14px;
}

.profiles-item {
    display: grid;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.profiles-friends-block {
    display: grid;
    gap: 10px;
}

.profiles-friends-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

.modern-form .profiles-friend-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(148, 163, 184, 0.24);
    min-width: 0;
    width: auto;
    white-space: nowrap;
    color: #1e293b;
    font-weight: 500;
    gap: 10px;
}

.modern-form .profiles-friend-chip input {
    flex: 0 0 auto;
    margin: 0;
}

.modern-form .profiles-friend-chip span {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    flex-wrap: nowrap;
}

.modern-form .profiles-friend-chip small {
    display: inline;
    color: #64748b;
}

.profiles-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.profiles-card .button[type="submit"] {
    margin-top: 8px;
}

.profiles-delete-form {
    margin: 0;
}

.danger-link {
    color: #dc2626 !important;
}

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

    .profiles-friends-grid {
        gap: 12px;
    }
}

.hero-title-row h1 {
    margin: 0;
}

.hero-status {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #475569;
    font-size: 0.9rem;
    font-weight: 700;
}

.hero-status.ok {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.24);
    color: #15803d;
}

.hero-status-link {
    text-decoration: none;
}

.hero-status-link:hover {
    text-decoration: none;
    border-color: rgba(37, 99, 235, 0.28);
    color: #1d4ed8;
}

body.dashboard-page .hero p,
body.dashboard-page .stat span,
body.dashboard-page .bike-year-panel small,
body.dashboard-page .link-button {
    color: #475569;
}

.hero-premium-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 10px 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(254, 240, 138, 0.32), rgba(255, 247, 237, 0.92));
    border: 1px solid rgba(245, 158, 11, 0.28);
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.12);
}

.hero-premium-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(135deg, #facc15, #f59e0b);
    color: #7c2d12;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.hero-premium-copy {
    display: grid;
    gap: 2px;
}

.hero-premium-copy strong {
    color: #92400e;
    font-size: 0.95rem;
}

.hero-premium-copy span {
    color: #a16207;
    font-size: 0.9rem;
}

@media (max-width: 760px) {
    .hero-profile-premium-row {
        align-items: stretch;
    }

    .hero-profile-block,
    .hero-premium-chip {
        width: 100%;
    }
}

.stack {
    display: grid;
    gap: 12px;
}

.inline-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.inline-form > * {
    min-width: 0;
}

.inline-form.recalc-form {
    margin-top: auto;
    align-items: flex-end;
}

.recalc-form > label {
    flex: 1 1 220px;
    display: grid;
    align-content: end;
}

.dashboard-period-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-self: end;
}

.dashboard-period-buttons .button {
    width: auto;
}

.recalc-button {
    width: 100%;
    justify-content: center;
    align-self: end;
}

input,
select,
button {
    font: inherit;
}

input,
select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #0b1325;
    color: var(--text);
}

input[type="date"],
input[type="datetime-local"],
input[type="time"] {
    min-width: 0;
    max-width: 100%;
    -webkit-appearance: none;
    appearance: none;
}

body.dashboard-page input,
body.dashboard-page select {
    background: rgba(255, 255, 255, 0.9);
    border-color: #cbd5e1;
    color: #0f172a;
}

body.friends-page input,
body.friends-page select,
body.profiles-page input,
body.profiles-page select,
body.support-page input,
body.support-page select,
body.settings-page input,
body.settings-page select,
body.account-page input,
body.account-page select,
body.account-page textarea,
body.support-page textarea,
body.admin-page input,
body.admin-page select,
body.admin-page textarea {
    background: rgba(255, 255, 255, 0.9);
    border-color: #cbd5e1;
    color: #0f172a;
}

.button {
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    border: 1px solid rgba(37, 99, 235, 0.28);
    color: #eff6ff;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.button.small { padding: 8px 10px; font-size: 0.9rem; }

.icon-button {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.sync-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-family: "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.section-heading-actions {
    align-items: center;
}

.section-heading-form {
    display: flex;
    align-items: center;
    margin: 0;
}

@media (max-width: 640px) {
    .inline-form.recalc-form,
    .activities-filter-form {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .recalc-form > label,
    .activities-filter-form > label {
        flex: none;
        width: 100%;
        min-width: 0;
    }

    .recalc-button,
    .dashboard-period-buttons,
    .dashboard-period-buttons .button,
    .activities-filter-form .button {
        width: 100%;
    }

    .section-heading-form,
    .section-heading-form .sync-button {
        width: 100%;
    }
}

.link-button {
    background: none;
    color: var(--muted);
    border: none;
    cursor: pointer;
    padding: 0;
}

.pill {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
}

.pill.active {
    background: #0b2a18;
    border-color: #166534;
    color: #bbf7d0;
}

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

.stat span {
    color: var(--muted);
    display: block;
    margin-bottom: 4px;
}

.stat strong { font-size: 1.15rem; }

.stat .ok { color: var(--accent-green); }

.bike-year-panel {
    display: grid;
    gap: 10px;
}

.bike-year-panel small {
    color: var(--muted);
}

.compare-stat-row {
    display: grid;
    gap: 8px;
}

.compare-stat-inline {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.compare-stat-inline strong {
    font-size: 1.25rem;
    margin-right: auto;
}

.compare-km-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(96, 165, 250, 0.22));
    border: 1px solid rgba(59, 130, 246, 0.24);
    color: #1d4ed8;
    font-weight: 800;
    white-space: nowrap;
}

.compare-stat-inline span {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: #475569;
    font-size: 0.9rem;
    font-weight: 700;
}

.bike-progress {
    width: 100%;
    height: 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.7);
    overflow: hidden;
}

body.dashboard-page .bike-progress {
    background: rgba(226, 232, 240, 0.9);
    border-color: #cbd5e1;
}

.bike-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
    transition: width 520ms ease-in-out, background 520ms ease-in-out, opacity 220ms ease;
    will-change: width;
}

.empty-friends-state {
    display: grid;
    gap: 14px;
    justify-items: start;
}

.community-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 110px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(219, 234, 254, 0.8));
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
}

.empty-friends-state p {
    margin: 0;
}

.leaderboard,
.challenge-list,
.friend-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.leaderboard li,
.challenge-list li,
.friend-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.45);
}

body.dashboard-page .leaderboard li,
body.dashboard-page .challenge-list li,
body.dashboard-page .friend-list li {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(148, 163, 184, 0.34);
}

.alert {
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #14532d;
    background: #052e16;
    color: #bbf7d0;
}

.alert.error {
    border-color: #7f1d1d;
    background: #450a0a;
    color: #fecaca;
}

.auth-grid {
    width: min(760px, 100%);
    max-width: none;
    margin: 72px auto;
}

.auth-card {
    width: 100%;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(241, 245, 249, 0.72)),
        linear-gradient(180deg, #ffffff, #eef6ff);
    border-color: rgba(148, 163, 184, 0.42);
    box-shadow: 0 30px 70px rgba(30, 41, 59, 0.16);
    padding: 34px 32px;
    backdrop-filter: blur(18px);
}

.auth-card h1 {
    margin-top: 0;
    font-size: clamp(2.2rem, 3.4vw, 2.9rem);
    letter-spacing: -0.03em;
    color: #0f172a;
}

.auth-card p {
    color: #475569;
}

.invite-banner {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.92), rgba(239, 246, 255, 0.88));
    color: #1e3a8a;
}

.invite-banner strong {
    color: #0f172a;
    font-size: 1rem;
}

.invite-banner span:last-child {
    color: #475569;
}

.invite-banner-kicker {
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-card label {
    display: grid;
    gap: 6px;
    color: #1e293b;
    font-weight: 600;
}

.auth-card input {
    background: rgba(255, 255, 255, 0.92);
    border-color: #cbd5e1;
    color: #0f172a;
    min-height: 54px;
    padding: 14px 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

.auth-card input::placeholder {
    color: #64748b;
}

.auth-card .button {
    min-height: 54px;
    font-size: 1rem;
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
}

body.auth-page .alert.error {
    background: rgba(254, 226, 226, 0.9);
    border-color: rgba(239, 68, 68, 0.38);
    color: #991b1b;
}

body.auth-page .alert {
    background: rgba(220, 252, 231, 0.88);
    border-color: rgba(34, 197, 94, 0.28);
    color: #166534;
}

body.dashboard-page .alert {
    background: rgba(220, 252, 231, 0.85);
    border-color: rgba(34, 197, 94, 0.28);
    color: #166534;
}

body.dashboard-page .alert.error {
    background: rgba(254, 226, 226, 0.9);
    border-color: rgba(239, 68, 68, 0.38);
    color: #991b1b;
}

body.friends-page .alert,
body.profiles-page .alert,
body.support-page .alert,
body.settings-page .alert,
body.account-page .alert,
body.admin-page .alert {
    background: rgba(220, 252, 231, 0.85);
    border-color: rgba(34, 197, 94, 0.28);
    color: #166534;
}

body.friends-page .alert.error,
body.profiles-page .alert.error,
body.support-page .alert.error,
body.settings-page .alert.error,
body.account-page .alert.error,
body.admin-page .alert.error {
    background: rgba(254, 226, 226, 0.9);
    border-color: rgba(239, 68, 68, 0.38);
    color: #991b1b;
}

textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    font: inherit;
    resize: vertical;
}

.account-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
    font-weight: 700;
}

@media (min-width: 720px) {
    .auth-card {
        padding: 42px 44px;
    }
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 10px;
    text-align: left;
}

.recent-activities-list {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.recent-activity-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.recent-activity-main {
    display: grid;
    gap: 4px;
}

.recent-activity-main strong {
    color: #0f172a;
    font-size: 1rem;
}

.recent-activity-main span {
    color: #64748b;
    font-size: 0.92rem;
}

.recent-activity-main small {
    color: #475569;
    font-size: 0.84rem;
    line-height: 1.4;
}

.recent-activity-side {
    display: grid;
    justify-items: end;
    gap: 8px;
}

.recent-activity-km {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    color: #2563eb;
    font-size: 1.25rem;
    font-weight: 800;
    white-space: nowrap;
}

.recent-activity-km small {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
}

.recent-activity-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.recent-activity-meta span {
    display: inline-flex;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(219, 234, 254, 0.7);
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 700;
}

.chart-card {
    overflow: hidden;
}

.chart-intro {
    margin: 0 0 14px;
    color: #475569;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    margin-bottom: 16px;
}

.chart-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: #334155;
    font-size: 0.88rem;
    font-weight: 700;
}

.chart-legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.72);
}

.chart-legend-text {
    line-height: 1;
}

.chart-canvas-wrap {
    position: relative;
    width: 100%;
    min-height: 360px;
}

#progressChart {
    width: 100%;
    height: 100% !important;
}

@media (max-width: 720px) {
    .chart-canvas-wrap {
        min-height: 300px;
    }
}

.friends-shell,
.settings-shell {
    gap: 20px;
}

.connections-shell {
    gap: 0;
    margin-bottom: 24px;
    align-self: start;
}

.activities-shell h1 {
    margin: 6px 0 0;
    font-size: clamp(2rem, 3.4vw, 2.7rem);
    letter-spacing: -0.04em;
}

.activities-filter-form {
    margin-bottom: 18px;
    align-items: flex-end;
}

.activities-filter-form > label {
    flex: 1 1 180px;
    display: grid;
    gap: 8px;
}

.friends-hero,
.settings-hero {
    padding: 26px 26px 24px;
}

.friends-hero-grid {
    display: grid;
    gap: 24px;
    align-items: start;
}

.friends-hero-copy {
    display: grid;
    gap: 0;
}

.friends-hero-detail {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 18px 0 4px;
}

.friends-hero-icon {
    flex: 0 0 auto;
}

.friends-hero-note {
    display: grid;
    gap: 6px;
}

.friends-hero-note strong {
    color: #0f172a;
    font-size: 1rem;
}

.friends-hero-note span {
    color: #475569;
}

.friends-hero-invite {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.friends-hero-invite h2 {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
}

.community-search-form {
    margin-bottom: 10px;
}

.community-search-form label {
    display: grid;
    gap: 8px;
}

.community-search-form[data-loading="true"] {
    opacity: 0.72;
}

.friends-eyebrow {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.friends-hero h1,
.settings-hero h1 {
    margin: 14px 0 10px;
    font-size: clamp(2.1rem, 3.8vw, 3rem);
    letter-spacing: -0.04em;
}

.friends-hero p,
.settings-hero p,
.muted-block,
.settings-note span {
    color: #475569;
}

.friends-grid,
.settings-grid {
    align-items: start;
}

.friends-panel,
.settings-form-card,
.settings-guide-card {
    padding: 24px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 6px 0 0;
    font-size: 1.45rem;
    letter-spacing: -0.03em;
}

.section-heading-secondary {
    margin-top: 26px;
}

.section-kicker {
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.friends-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    padding: 9px 12px;
    border-radius: 16px;
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
    font-weight: 800;
}

.friends-count.pending {
    background: rgba(251, 191, 36, 0.16);
    color: #b45309;
}

.friends-count.all {
    background: rgba(34, 197, 94, 0.14);
    color: #15803d;
}

.friend-list-modern,
.request-list,
.community-list {
    display: grid;
    gap: 12px;
}

.friend-list-modern li,
.friend-request-card,
.community-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.friend-meta {
    display: grid;
    gap: 4px;
}

.friend-meta strong {
    font-size: 1rem;
    color: #0f172a;
}

.friend-meta small {
    color: #64748b;
}

.community-card-actions {
    flex: 0 0 auto;
}

.friend-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.14);
    color: #15803d;
    font-size: 0.82rem;
    font-weight: 700;
}

.friend-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.friend-remove-button {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(239, 68, 68, 0.22);
    border-radius: 999px;
    background: rgba(254, 226, 226, 0.9);
    color: #dc2626;
    font-size: 1.2rem;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 18px rgba(239, 68, 68, 0.12);
}

.friend-connection-status {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.friend-connection-status.is-connected {
    background: rgba(34, 197, 94, 0.14);
    color: #15803d;
}

.friend-selection-list li {
    gap: 12px;
}

.friend-checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: inherit;
}

.friend-checkbox-row input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.friend-option-meta {
    display: inline-flex;
    align-items: center;
}

.friend-empty-row {
    justify-content: flex-start;
    color: #64748b;
}

.modern-form label {
    display: grid;
    gap: 8px;
    color: #1e293b;
    font-weight: 600;
    min-width: 0;
}

.modern-form input {
    min-height: 52px;
    padding: 14px 16px;
    font-weight: 400;
    min-width: 0;
    max-width: 100%;
}

.full-button {
    width: 100%;
    justify-content: center;
    min-height: 52px;
}

.setup-steps {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 12px;
    color: #334155;
}

.callback-copy-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.callback-copy-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.callback-copy-input {
    flex: 1 1 320px;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(96, 165, 250, 0.26);
    background: rgba(255, 255, 255, 0.88);
    color: #0f172a;
    font: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.callback-copy-button {
    flex: 0 0 auto;
    min-height: 46px;
    white-space: nowrap;
}

.setup-steps strong {
    color: #0f172a;
}

.settings-note {
    display: grid;
    gap: 8px;
    margin-top: 22px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(59, 130, 246, 0.18);
    background: rgba(219, 234, 254, 0.48);
}

.connections-card {
    display: grid;
    gap: 10px;
    max-width: 760px;
    padding: 16px 18px;
    align-self: start;
}

.connections-intro h1 {
    margin: 6px 0 4px;
    font-size: clamp(2.1rem, 3.8vw, 3rem);
    letter-spacing: -0.04em;
}

.connections-intro p {
    margin: 0;
    color: #475569;
}

.connections-brand {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
}

.connections-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: rgba(255, 237, 213, 0.9);
    border: 1px solid rgba(252, 76, 2, 0.14);
    overflow: hidden;
    padding: 12px;
}

.connections-brand-logo {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.connections-brand-copy h2 {
    margin: 0 0 4px;
}

.connections-brand-copy p {
    margin: 0;
    color: #475569;
}

.connections-status {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    padding: 11px 13px;
    border-radius: 18px;
}

.connections-status.is-connected {
    background: rgba(240, 253, 244, 0.92);
    border: 1px solid rgba(34, 197, 94, 0.22);
}

.connections-status.is-idle {
    background: rgba(255, 251, 235, 0.92);
    border: 1px solid rgba(251, 146, 60, 0.22);
}

.connections-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
}

.connections-status.is-connected .connections-status-icon {
    color: #15803d;
    background: rgba(34, 197, 94, 0.12);
}

.connections-status.is-idle .connections-status-icon {
    color: #c2410c;
    background: rgba(251, 146, 60, 0.14);
}

.connections-status-copy {
    display: grid;
    gap: 2px;
}

.connections-status-copy strong {
    color: #0f172a;
    font-size: 0.96rem;
}

.connections-status-copy span {
    color: #475569;
    line-height: 1.45;
}

.connections-actions,
.connections-missing {
    display: grid;
    gap: 6px;
}

.support-shell {
    gap: 18px;
}

.support-hero,
.support-form-card,
.support-faq-card,
.support-ticket-panel {
    display: grid;
    gap: 14px;
}

.support-grid {
    align-items: start;
}

.support-faq-list,
.support-ticket-list,
.support-reply-list,
.admin-support-list,
.admin-support-thread,
.admin-faq-list {
    display: grid;
    gap: 12px;
}

.support-faq-item,
.support-ticket-card,
.support-reply-item,
.admin-support-ticket,
.admin-support-reply,
.admin-faq-form {
    display: grid;
    gap: 10px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
}

.support-faq-item strong,
.support-ticket-head strong,
.support-reply-item strong,
.admin-support-message strong,
.admin-support-reply strong {
    color: #0f172a;
}

.support-faq-item p,
.support-ticket-card p,
.support-reply-item p,
.admin-support-message p,
.admin-support-reply p {
    margin: 0;
    color: #475569;
    line-height: 1.65;
}

.support-ticket-head,
.admin-support-head,
.admin-faq-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.support-ticket-head small,
.support-reply-item small,
.admin-support-reply small {
    color: #64748b;
}

.support-ticket-card.is-resolved {
    background: rgba(248, 250, 252, 0.82);
}

.admin-support-ticket {
    gap: 14px;
}

.admin-support-form {
    max-width: 720px;
}

.admin-faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.admin-faq-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-faq-checkbox input {
    width: 18px;
    height: 18px;
    margin: 0;
    min-height: 18px;
    padding: 0;
}

.admin-shell {
    gap: 18px;
}

.admin-hero {
    display: grid;
    gap: 10px;
}

.admin-hero h1 {
    margin: 0;
    font-size: clamp(2.1rem, 3.8vw, 3rem);
    letter-spacing: -0.04em;
}

.admin-hero p {
    margin: 0;
    color: #475569;
}

.admin-summary-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-summary-card {
    display: grid;
    gap: 8px;
}

.admin-summary-card strong {
    font-size: 2rem;
    line-height: 1;
    color: #0f172a;
}

.admin-summary-card span:last-child,
.admin-status-card small,
.admin-user-metrics span,
.admin-invite-meta small {
    color: #475569;
}

.admin-grid {
    align-items: start;
}

.admin-panel {
    display: grid;
    gap: 16px;
}

.admin-section-actions,
.admin-list-meta,
.admin-pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-section-actions {
    justify-content: flex-end;
}

.admin-search-form {
    max-width: 560px;
}

.admin-status-list,
.admin-invite-list,
.admin-users-list {
    display: grid;
    gap: 12px;
}

.admin-status-card,
.admin-user-card {
    display: grid;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.admin-status-head,
.admin-user-badges,
.admin-user-actions,
.admin-invite-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-user-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.admin-user-main,
.admin-user-friends {
    display: grid;
    gap: 10px;
}

.admin-user-friends strong {
    color: #0f172a;
}

.admin-user-friends span {
    color: #475569;
}

.admin-user-actions {
    justify-content: flex-end;
}

.admin-user-actions form {
    margin: 0;
}

.admin-action-button {
    min-width: 0;
    white-space: nowrap;
}

.admin-action-premium {
    padding-inline: 12px;
}

.admin-action-delete {
    min-width: 36px;
    padding-inline: 0;
    justify-content: center;
    color: #dc2626;
    font-size: 1.1rem;
    font-weight: 800;
}

@media (max-width: 640px) {
    .connections-brand {
        grid-template-columns: 1fr;
    }

    .admin-faq-grid {
        grid-template-columns: 1fr;
    }

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

.settings-diagnostic {
    display: grid;
    gap: 12px;
    margin-top: 20px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.68);
}

.settings-diagnostic-list {
    display: grid;
    gap: 10px;
}

.settings-diagnostic-item {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.88);
    border: 1px solid rgba(226, 232, 240, 0.9);
    min-width: 0;
}

.settings-diagnostic-item strong {
    color: #0f172a;
    font-size: 0.9rem;
}

.settings-diagnostic-item span {
    color: #475569;
    word-break: break-word;
}

.invite-form {
    margin-bottom: 12px;
}

.invite-status-list {
    display: grid;
    gap: 10px;
    margin-top: 6px;
}

.invite-status-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.72);
}

.activities-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 14px 0 18px;
    color: rgba(15, 23, 42, 0.68);
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(96, 165, 250, 0.28);
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 700;
}

.pagination-link.is-active {
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    color: #fff;
    border-color: transparent;
}

.activity-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #334155;
}

.activity-toggle input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.activity-row-muted {
    opacity: 0.55;
}

.premium-shell {
    display: grid;
    gap: 18px;
}

.premium-hero-grid,
.premium-grid {
    display: grid;
    gap: 20px;
}

.premium-copy,
.premium-summary,
.premium-product-card,
.premium-info-card {
    display: grid;
    gap: 16px;
}

.premium-coupon-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.premium-price-preview {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.premium-price-preview strong {
    color: #0f172a;
}

.premium-price-preview small {
    color: #475569;
}

.admin-coupon-form {
    gap: 12px;
}

.premium-copy h1 {
    margin: 0;
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.05;
}

.premium-copy p,
.premium-product-text {
    margin: 0;
    color: #475569;
    line-height: 1.7;
}

.premium-points,
.premium-metrics {
    display: grid;
    gap: 12px;
}

.premium-point,
.premium-metrics div {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.premium-point strong,
.premium-metrics strong {
    display: block;
    margin-bottom: 6px;
}

.premium-point span,
.premium-metrics span {
    color: #475569;
}

.premium-feature-list {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 10px;
    color: #334155;
}

.premium-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.premium-feature-card {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 14px 15px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
}

.premium-feature-card span:last-child {
    color: #334155;
    line-height: 1.45;
    font-weight: 600;
}

.premium-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.premium-feature-icon-green {
    background: linear-gradient(135deg, #dcfce7, #86efac);
    color: #166534;
}

.premium-feature-icon-gold {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #a16207;
}

.premium-feature-icon-blue {
    background: linear-gradient(135deg, #dbeafe, #93c5fd);
    color: #1d4ed8;
}

.premium-feature-icon-slate {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    color: #475569;
}

.premium-offer-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.16), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(220, 252, 231, 0.72));
    border: 1px solid rgba(34, 197, 94, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.premium-offer-panel-head {
    display: grid;
    gap: 6px;
}

.premium-offer-panel-head strong {
    color: #0f172a;
}

.premium-offer-panel-head p {
    margin: 0;
    color: #475569;
    line-height: 1.6;
}

.premium-offer-panel-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.premium-offer-panel-stat {
    display: grid;
    gap: 6px;
    padding: 14px 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(34, 197, 94, 0.12);
    text-align: center;
}

.premium-offer-panel-stat strong {
    font-size: 1.15rem;
    color: #166534;
    line-height: 1.1;
}

.premium-offer-panel-stat span {
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.4;
}

.modern-form .premium-terms-check {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    line-height: 1.45;
}

.modern-form .premium-terms-check input {
    margin: 0;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    min-height: 16px;
    padding: 0;
}

.modern-form .premium-terms-check span {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
}

.premium-status-strip {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    color: #475569;
}

.premium-free-visual {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.2), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(219, 234, 254, 0.78));
    border: 1px solid rgba(96, 165, 250, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.premium-active-visual,
.premium-upgrade-teaser {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 24px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.premium-active-visual {
    background:
        radial-gradient(circle at top left, rgba(250, 204, 21, 0.22), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(254, 249, 195, 0.82));
    border: 1px solid rgba(234, 179, 8, 0.26);
}

.premium-upgrade-teaser {
    background:
        radial-gradient(circle at top right, rgba(250, 204, 21, 0.2), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(254, 240, 138, 0.42));
    border: 1px solid rgba(245, 158, 11, 0.24);
}

.premium-active-visual-head,
.premium-upgrade-teaser-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.premium-active-pill,
.premium-active-days {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.premium-active-pill {
    background: rgba(234, 179, 8, 0.14);
    color: #a16207;
}

.premium-active-days {
    background: rgba(15, 23, 42, 0.06);
    color: #475569;
}

.premium-active-track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.premium-active-lane {
    height: 16px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    overflow: hidden;
    position: relative;
}

.premium-active-lane::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: inherit;
}

.premium-active-lane-strong::after {
    background: linear-gradient(90deg, #eab308, #f59e0b);
}

.premium-active-lane-mid::after {
    background: linear-gradient(90deg, rgba(234, 179, 8, 0.85), rgba(59, 130, 246, 0.72));
}

.premium-active-cards {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 12px;
}

.premium-active-card {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(234, 179, 8, 0.16);
}

.premium-active-card strong,
.premium-upgrade-teaser strong {
    color: #0f172a;
}

.premium-active-card small,
.premium-upgrade-teaser p {
    color: #64748b;
    line-height: 1.6;
}

.premium-active-card-accent {
    place-items: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(254, 249, 195, 0.95), rgba(255, 255, 255, 0.9));
}

.premium-active-card-accent strong {
    font-size: 1.85rem;
    line-height: 1;
    color: #a16207;
}

.premium-upgrade-teaser p {
    margin: 0;
}

.premium-upgrade-signal {
    width: 56px;
    height: 14px;
    border-radius: 999px;
    background:
        linear-gradient(90deg, rgba(34, 197, 94, 0.92) 0 33%, rgba(59, 130, 246, 0.92) 33% 66%, rgba(245, 158, 11, 0.92) 66% 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.premium-upgrade-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.premium-upgrade-points span {
    padding: 11px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(245, 158, 11, 0.18);
    color: #475569;
    font-size: 0.88rem;
    text-align: center;
}

.premium-free-visual-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.premium-free-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.premium-free-caption,
.premium-summary-note {
    margin: 0;
    color: #475569;
    line-height: 1.6;
}

.premium-free-track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.premium-free-node {
    position: relative;
    height: 14px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.25);
    overflow: hidden;
}

.premium-free-node::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: inherit;
}

.premium-free-node-active::after {
    background: linear-gradient(90deg, #22c55e, #3b82f6);
}

.premium-free-node-locked::after {
    background: repeating-linear-gradient(
        135deg,
        rgba(148, 163, 184, 0.34) 0 8px,
        rgba(226, 232, 240, 0.9) 8px 16px
    );
}

.premium-free-runners {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.premium-free-runner {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 14px 10px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.2);
    text-align: center;
}

.premium-free-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.95rem;
    color: #0f172a;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(59, 130, 246, 0.2));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.premium-free-runner small {
    color: #64748b;
    line-height: 1.4;
}

.premium-free-runner-locked {
    background: rgba(248, 250, 252, 0.74);
}

.premium-free-runner-locked .premium-free-avatar {
    color: #64748b;
    background: linear-gradient(135deg, rgba(203, 213, 225, 0.5), rgba(226, 232, 240, 0.95));
}

.premium-flow-visual {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: 20px;
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(224, 242, 254, 0.76));
    border: 1px solid rgba(125, 211, 252, 0.35);
}

.premium-flow-stage {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.premium-flow-stage strong,
.premium-flow-stage small {
    grid-column: 2;
}

.premium-flow-stage strong {
    color: #0f172a;
    font-size: 0.94rem;
}

.premium-flow-stage small {
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.35;
}

.premium-flow-icon {
    grid-row: 1 / span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e0f2fe, #bfdbfe);
    color: #1d4ed8;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.premium-flow-icon-blue {
    background: linear-gradient(135deg, #dbeafe, #93c5fd);
    color: #1d4ed8;
}

.premium-flow-icon-green {
    background: linear-gradient(135deg, #dcfce7, #86efac);
    color: #166534;
}

.premium-flow-arrow {
    height: 12px;
    margin: -1px auto;
    width: 2px;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.18), rgba(34, 197, 94, 0.42));
    border-radius: 999px;
}

.friend-badge.muted {
    background: rgba(148, 163, 184, 0.16);
    color: #64748b;
}

.site-footer {
    margin-top: 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.56);
    backdrop-filter: blur(10px);
}

.site-footer-inner {
    width: min(1180px, 92%);
    margin: 0 auto;
    padding: 20px 0 28px;
    display: grid;
    gap: 16px;
}

.site-footer-brand {
    display: grid;
    gap: 6px;
    color: #475569;
}

.site-footer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.site-footer-creator {
    margin-left: auto;
    text-align: right;
}

.site-footer-partners {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.site-footer-partners a {
    display: inline-flex;
    align-items: center;
}

.site-footer-partners img {
    display: block;
    height: 28px;
    width: auto;
    object-fit: contain;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-link-button {
    appearance: none;
    border: 1px solid rgba(96, 165, 250, 0.24);
    background: rgba(255, 255, 255, 0.86);
    color: #1d4ed8;
    font-weight: 700;
    border-radius: 999px;
    padding: 10px 14px;
    cursor: pointer;
}

.friends-sharing-consent-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 8px;
    color: #334155;
    line-height: 1.55;
}

.friends-sharing-consent-check input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    flex: 0 0 18px;
}

.friends-sharing-consent-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.settings-danger-zone {
    margin-top: 20px;
    padding: 18px;
    border: 1px solid rgba(239, 68, 68, 0.18);
    border-radius: 22px;
    background: rgba(254, 242, 242, 0.7);
}

.settings-danger-zone p {
    margin: 0 0 14px;
    color: #7f1d1d;
    line-height: 1.6;
}

.danger-button,
.danger-button:hover,
.danger-button:focus {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.friends-invite-button,
.friends-invite-button:hover,
.friends-invite-button:focus,
.friends-invite-button:active {
    transition: none;
    box-shadow: none;
    transform: none;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.48);
}

.modal-card {
    position: relative;
    width: min(680px, 100%);
    max-height: 85vh;
    overflow: auto;
    border-radius: 28px;
    padding: 24px;
    background: linear-gradient(180deg, #ffffff, #eff6ff);
    color: #0f172a;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.24);
}

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 140;
}

.cookie-banner-inner {
    width: min(1100px, 100%);
    margin: 0 auto;
    padding: 16px 18px;
    border: 1px solid rgba(96, 165, 250, 0.22);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.cookie-banner-copy {
    display: grid;
    gap: 4px;
    color: #1e293b;
}

.cookie-banner-copy strong {
    font-size: 0.98rem;
}

.cookie-banner-copy p {
    margin: 0;
    color: #475569;
    line-height: 1.55;
}

.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.modal-card-wide {
    width: min(860px, 100%);
}

.modal-card h2 {
    margin-top: 0;
}

.modal-card p {
    color: #334155;
    line-height: 1.7;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: none;
    background: rgba(226, 232, 240, 0.9);
    color: #0f172a;
    font-size: 1.4rem;
    cursor: pointer;
}

.error-404-page .container {
    width: min(1180px, 92%);
}

.error-404-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 0 72px;
    flex: 1 0 auto;
}

.error-404-card {
    width: min(1040px, 100%);
    display: grid;
    gap: 28px;
    padding: 30px;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.14);
    border: 1px solid rgba(191, 219, 254, 0.9);
}

.error-404-copy {
    display: grid;
    gap: 14px;
    color: #0f172a;
}

.error-404-code {
    font-size: clamp(4rem, 10vw, 7.5rem);
    line-height: 0.92;
    font-weight: 900;
    letter-spacing: -0.08em;
    color: #1d4ed8;
}

.error-404-copy h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.02;
}

.error-404-copy p {
    margin: 0;
    max-width: 34rem;
    color: #475569;
    font-size: 1.02rem;
    line-height: 1.7;
}

.error-404-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.error-404-visual {
    display: grid;
    gap: 16px;
    align-content: center;
}

.error-404-track {
    position: relative;
    min-height: 220px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.18), transparent 30%),
        linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid rgba(148, 163, 184, 0.24);
    overflow: hidden;
}

.error-404-track-line {
    position: absolute;
    border-radius: 999px;
}

.error-404-track-line.is-blue {
    width: 86%;
    height: 12px;
    left: 7%;
    top: 34%;
    background: linear-gradient(90deg, #93c5fd, #2563eb);
    transform: rotate(-7deg);
}

.error-404-track-line.is-green {
    width: 72%;
    height: 12px;
    left: 14%;
    bottom: 28%;
    background: linear-gradient(90deg, #86efac, #16a34a);
    transform: rotate(8deg);
}

.error-404-pin {
    position: absolute;
    right: 16%;
    top: 22%;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: #fff;
    color: #0f172a;
    font-size: 2rem;
    font-weight: 900;
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.2);
}

.error-404-mini-card {
    display: grid;
    gap: 6px;
    padding: 18px 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #334155;
}

.error-404-mini-card strong {
    color: #0f172a;
}

@media (max-width: 720px) {
    .error-404-layout {
        padding: 28px 0 48px;
    }

    .error-404-card {
        padding: 22px;
    }

    .error-404-actions .button {
        width: 100%;
        justify-content: center;
    }

    .cookie-banner-inner,
    .cookie-banner-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .cookie-banner-actions {
        width: 100%;
    }

    .cookie-banner-actions .button {
        width: 100%;
        justify-content: center;
    }

    .friend-list-modern li,
    .friend-request-card,
    .community-card,
    .section-heading,
    .admin-user-card {
        align-items: flex-start;
    }

    .friend-list-modern li,
    .friend-request-card,
    .community-card,
    .admin-user-card {
        flex-direction: column;
    }

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

    .admin-user-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .admin-user-actions form {
        flex: 0 0 auto;
    }

    .admin-action-premium {
        padding-inline: 10px;
    }

    .callback-copy-row {
        align-items: stretch;
    }

    .callback-copy-inline {
        align-items: stretch;
    }

    .callback-copy-button {
        width: 100%;
        justify-content: center;
    }

    .premium-free-track,
    .premium-free-runners,
    .premium-active-track,
    .premium-active-cards,
    .premium-upgrade-points,
    .premium-feature-grid,
    .premium-offer-panel-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 920px) {
    .error-404-card {
        grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.8fr);
        align-items: center;
    }

    .friends-hero-grid {
        grid-template-columns: 1.35fr 0.95fr;
    }

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

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