:root {
    --vdst-navy: #052e5f;
    --vdst-blue: #124b92;
    --vdst-bright: #1976d2;
    --vdst-cyan: #46c6e8;
    --vdst-ink: #13233a;
    --vdst-muted: #66758a;
    --vdst-surface: #ffffff;
    --vdst-canvas: #f3f7fb;
    --vdst-line: #dbe5ef;
    --bs-primary: #124b92;
    --bs-primary-rgb: 18, 75, 146;
    --bs-link-color: #124b92;
    --bs-link-hover-color: #073d7a;
}

body {
    color: var(--vdst-ink);
    background:
        radial-gradient(circle at 8% 42%, rgba(70, 198, 232, .08), transparent 22rem),
        var(--vdst-canvas);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.app-navbar {
    z-index: 1030;
    min-height: 82px;
    padding: .65rem 0;
    background:
        radial-gradient(circle at 20% -100%, rgba(70, 198, 232, .35), transparent 22rem),
        linear-gradient(115deg, #052e5f 0%, #0b427f 58%, #073568 100%);
    box-shadow: 0 8px 28px rgba(2, 28, 58, .18);
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: .85rem;
    padding: 0;
    color: #fff;
}

.app-brand:hover,
.app-brand:focus {
    color: #fff;
}

.app-brand__logo {
    width: 38px;
    height: 50px;
    object-fit: contain;
}

.app-brand__divider {
    width: 1px;
    height: 34px;
    background: rgba(255, 255, 255, .28);
}

.app-brand__name,
.app-brand__subtitle {
    display: block;
}

.app-brand__name {
    font-size: 1rem;
    font-weight: 750;
    letter-spacing: .01em;
    line-height: 1.2;
}

.app-brand__subtitle {
    margin-top: .18rem;
    color: rgba(255, 255, 255, .66);
    font-size: .68rem;
    font-weight: 650;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.app-navbar .navbar-nav {
    gap: .25rem;
}

.app-navbar .nav-link {
    position: relative;
    padding: .7rem .9rem !important;
    border-radius: .55rem;
    color: rgba(255, 255, 255, .76);
    font-size: .91rem;
    font-weight: 600;
    transition: background-color .2s ease, color .2s ease;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus,
.app-navbar .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, .11);
}

.app-navbar .nav-link.active::before {
    position: absolute;
    right: .9rem;
    bottom: .32rem;
    left: .9rem;
    height: 2px;
    border-radius: 1rem;
    background: var(--vdst-cyan);
    content: "";
}

.dropdown-menu {
    padding: .45rem;
    border: 1px solid rgba(5, 46, 95, .1);
    border-radius: .8rem;
    box-shadow: 0 16px 40px rgba(15, 42, 68, .16);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .62rem .75rem;
    border-radius: .5rem;
    font-size: .9rem;
}

.dropdown-item i {
    width: 1.15rem;
    color: var(--vdst-blue);
}

.app-user__button {
    display: inline-flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
}

.app-user__button::after {
    margin-left: .45rem;
}

.app-user__avatar {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
}

.page-heading {
    position: relative;
    overflow: hidden;
    padding: 2.65rem 0;
    color: #fff;
    background:
        linear-gradient(105deg, rgba(5, 46, 95, .98), rgba(18, 75, 146, .93)),
        var(--vdst-blue);
}

.page-heading::after {
    position: absolute;
    right: -5%;
    bottom: -78px;
    width: 48%;
    height: 120px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
    content: "";
}

.page-heading__eyebrow,
.section-kicker,
.discipline-card__label {
    display: block;
    margin-bottom: .5rem;
    color: var(--vdst-cyan);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.page-heading h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 780;
    letter-spacing: -.035em;
    line-height: 1.05;
}

.page-heading__bubble {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 50%;
}

.page-heading__bubble--one {
    top: 28px;
    right: 12%;
    width: 72px;
    height: 72px;
}

.page-heading__bubble--two {
    top: 16px;
    right: 20%;
    width: 18px;
    height: 18px;
    background: rgba(70, 198, 232, .22);
}

.overview-intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.overview-intro h2 {
    margin: 0;
    color: var(--vdst-ink);
    font-size: clamp(1.55rem, 3vw, 2.1rem);
    font-weight: 760;
    letter-spacing: -.025em;
}

.overview-intro p {
    max-width: 620px;
    margin: .65rem 0 0;
    color: var(--vdst-muted);
}

.overview-actions {
    display: flex;
    flex: 0 0 auto;
    gap: .7rem;
}

.overview-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
}

.btn {
    border-radius: .6rem;
    font-weight: 650;
}

.btn-primary {
    border-color: var(--vdst-blue);
    background: var(--vdst-blue);
    box-shadow: 0 7px 18px rgba(18, 75, 146, .16);
}

.btn-primary:hover,
.btn-primary:focus {
    border-color: var(--vdst-navy);
    background: var(--vdst-navy);
}

.discipline-grid {
    display: grid;
    gap: 1.35rem;
}

.card {
    border: 1px solid rgba(18, 75, 146, .1);
    border-radius: .95rem;
    background: var(--vdst-surface);
    box-shadow: 0 7px 24px rgba(25, 55, 88, .06);
}

.discipline-card {
    overflow: hidden;
}

.discipline-card > .card-header {
    display: flex;
    align-items: center;
    gap: .95rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--vdst-line);
    background: linear-gradient(90deg, rgba(18, 75, 146, .055), rgba(70, 198, 232, .025));
}

.discipline-card__icon {
    display: grid;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: .75rem;
    color: #fff;
    background: linear-gradient(145deg, var(--vdst-blue), var(--vdst-bright));
    box-shadow: 0 7px 14px rgba(18, 75, 146, .18);
}

.discipline-card__label {
    margin-bottom: .15rem;
    color: var(--vdst-muted);
    font-size: .61rem;
}

.discipline-card h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 750;
}

.discipline-card__heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem;
}

.discipline-card__short-name {
    padding: .18rem .42rem;
    border: 1px solid rgba(18, 75, 146, .16);
    border-radius: .35rem;
    color: var(--vdst-blue);
    background: rgba(18, 75, 146, .06);
    font-size: .63rem;
    font-weight: 800;
    letter-spacing: .055em;
    line-height: 1;
}

.discipline-card__count {
    margin-left: auto;
    padding: .35rem .6rem;
    border: 1px solid #dbe7f3;
    border-radius: 99rem;
    color: var(--vdst-blue);
    background: #f4f8fc;
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
}

.discipline-card > .card-body {
    padding: .3rem 1.15rem .75rem;
}

.card-header {
    padding: .9rem 1.1rem;
    border-color: var(--vdst-line);
    color: var(--vdst-ink);
    background: #f8fbfe;
}

.card-footer {
    padding: .85rem 1.1rem;
    border-color: var(--vdst-line);
    background: #f8fbfe;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: #f7fafd;
    margin-bottom: 0;
    color: var(--vdst-ink);
    font-size: .88rem;
}

.table > thead > tr > th {
    padding: .78rem .7rem;
    border-bottom-color: #cbd8e5;
    color: #65758a;
    font-size: .69rem;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table > tbody > tr > * {
    padding: .74rem .7rem;
    border-bottom-color: #e7edf4;
    vertical-align: middle;
}

.table > tbody > tr:last-child > * {
    border-bottom: 0;
}

.table a {
    text-decoration: none;
}

.record-overview-table .record-cell--value {
    color: var(--vdst-blue);
    font-size: .98rem;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    white-space: nowrap;
}

.record-overview-table .record-cell--athlete {
    color: var(--vdst-ink);
    font-weight: 700;
    white-space: nowrap;
}

.record-overview-table .record-cell--club,
.record-overview-table .record-cell--competition,
.record-overview-table .record-cell--meta {
    color: var(--vdst-muted);
    font-size: .82rem;
}

.form-control,
.form-select {
    min-height: 42px;
    border-color: #cbd8e5;
    border-radius: .55rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--vdst-bright);
    box-shadow: 0 0 0 .2rem rgba(25, 118, 210, .12);
}

.age-group-field {
    margin: 1.5rem 0 0;
    padding: 0;
    border: 0;
}

.age-group-field__header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .75rem;
}

.age-group-field legend {
    margin: 0;
    color: var(--vdst-ink);
    font-size: 1rem;
    font-weight: 650;
}

.age-group-field__header p,
.age-group-field__summary {
    margin: .2rem 0 0;
    color: var(--vdst-muted);
    font-size: .84rem;
}

.age-group-field__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .4rem;
}

.age-group-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: .65rem;
}

.age-group-option {
    display: flex;
    min-height: 52px;
    align-items: center;
    gap: .7rem;
    padding: .75rem .85rem;
    border: 1px solid #cbd8e5;
    border-radius: .65rem;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.age-group-option:hover {
    border-color: #91afd0;
    background: #f8fbfe;
}

.age-group-option:has(input:focus-visible) {
    border-color: var(--vdst-bright);
    box-shadow: 0 0 0 .2rem rgba(25, 118, 210, .12);
}

.age-group-option:has(input:checked) {
    border-color: var(--vdst-blue);
    background: #edf5fd;
    box-shadow: inset 0 0 0 1px var(--vdst-blue);
}

.age-group-option .form-check-input {
    flex: 0 0 auto;
    margin: 0;
}

.age-group-option__label {
    flex: 1 1 auto;
    font-weight: 600;
}

.age-group-option__check {
    color: var(--vdst-blue);
    opacity: 0;
}

.age-group-option:has(input:checked) .age-group-option__check {
    opacity: 1;
}

.age-group-field--invalid .age-group-selector {
    padding: .25rem;
    border: 1px solid var(--bs-danger);
    border-radius: .8rem;
}

@media (max-width: 575.98px) {
    .age-group-field__header {
        align-items: stretch;
        flex-direction: column;
    }

    .age-group-field__actions {
        justify-content: flex-start;
    }
}

.club-autocomplete {
    position: relative;
}

.club-autocomplete__menu {
    position: absolute;
    z-index: 1080;
    top: calc(100% + .3rem);
    right: 0;
    left: 0;
    max-height: 15rem;
    overflow-y: auto;
    padding: .35rem;
    border: 1px solid #cbd8e5;
    border-radius: .65rem;
    color: var(--vdst-ink);
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 42, 68, .18);
}

.club-autocomplete__option {
    display: block;
    width: 100%;
    padding: .58rem .7rem;
    border: 0;
    border-radius: .45rem;
    color: var(--vdst-ink);
    background: transparent;
    font: inherit;
    line-height: 1.35;
    text-align: left;
}

.club-autocomplete__option:hover,
.club-autocomplete__option:focus,
.club-autocomplete__option.is-active {
    color: var(--vdst-navy);
    background: #eaf4fa;
    outline: none;
}

.empty-state {
    padding: 4rem 1.5rem;
    border: 1px dashed #b9cadb;
    border-radius: 1rem;
    text-align: center;
    background: rgba(255, 255, 255, .7);
}

.empty-state__icon {
    display: grid;
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    place-items: center;
    border-radius: 50%;
    color: var(--vdst-blue);
    background: #eaf2fa;
    font-size: 1.5rem;
}

.empty-state h2 {
    font-size: 1.25rem;
}

.empty-state p {
    color: var(--vdst-muted);
}

.app-footer {
    margin-top: 2rem;
    color: rgba(255, 255, 255, .72);
    background: var(--vdst-navy);
}

.app-footer__inner {
    display: flex;
    min-height: 108px;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding-top: 1.4rem;
    padding-bottom: 1.4rem;
}

.app-footer__mark {
    display: grid;
    width: 40px;
    height: 48px;
    place-items: center;
    border-radius: .45rem;
    background: rgba(255, 255, 255, .08);
}

.app-footer__mark img {
    width: 25px;
    height: 35px;
    object-fit: contain;
}

.app-footer strong,
.app-footer small {
    display: block;
}

.app-footer strong {
    color: #fff;
    font-size: .88rem;
}

.app-footer small,
.app-footer p {
    margin-top: .15rem;
    font-size: .75rem;
}

.dt-force-left {
    text-align: left !important;
}

table.dataTable th.dt-right div.dt-column-header,
table.dataTable th.dt-right div.dt-column-footer,
table.dataTable td.dt-right div.dt-column-header,
table.dataTable td.dt-right div.dt-column-footer {
    flex-direction: row !important;
}

.display-htmx-indicator {
    display: none;
}

.htmx-request .display-htmx-indicator,
.htmx-request.display-htmx-indicator {
    display: flex;
}

@media (max-width: 991.98px) {
    .app-navbar {
        min-height: auto;
    }

    .app-navbar .navbar-collapse {
        margin-top: .8rem;
        padding: .8rem;
        border: 1px solid rgba(255, 255, 255, .12);
        border-radius: .75rem;
        background: rgba(2, 30, 60, .38);
    }

    .app-navbar .navbar-nav {
        align-items: stretch !important;
    }

    .app-navbar .nav-link.active::before {
        display: none;
    }

    .app-user {
        margin-top: .5rem;
        padding: .35rem .85rem;
    }

    .overview-intro {
        align-items: start;
        flex-direction: column;
    }
}

@media (max-width: 767.98px) {
    .page-heading {
        padding: 2rem 0 2.35rem;
    }

    .page-heading__bubble--one {
        right: -24px;
    }

    .overview-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .overview-actions .btn {
        justify-content: center;
    }

    .discipline-card > .card-header {
        flex-wrap: wrap;
    }

    .discipline-card__count {
        width: fit-content;
        margin-left: 57px;
    }

    .app-footer__inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 420px) {
    .app-brand__subtitle {
        display: none;
    }

    .app-brand__name {
        font-size: .9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
