@import "../bootstrap-icons-UNAnHWy.css";

:root {
    --fh-accent: #b7ff2a;
    --fh-accent-strong: #9be319;
    --fh-accent-soft: rgba(183, 255, 42, .14);
    --fh-cyan: #37d7ff;
    --fh-border: rgba(226, 232, 240, .14);
    --fh-border-strong: rgba(183, 255, 42, .34);
    --fh-surface: #151a1f;
    --fh-surface-raised: #1b2229;
    --fh-muted-surface: #0b0f12;
    --fh-panel-gradient: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
    --fh-text: #edf2f7;
    --fh-text-muted: #9aa6b2;
    --fh-shadow: 0 1rem 2.5rem rgba(0, 0, 0, .32);
    --bs-body-bg: var(--fh-muted-surface);
    --bs-body-color: var(--fh-text);
    --bs-border-color: var(--fh-border);
    --bs-primary: var(--fh-accent-strong);
    --bs-primary-rgb: 155, 227, 25;
    --bs-link-color: var(--fh-accent);
    --bs-link-hover-color: #d4ff73;
}

body {
    background: var(--fh-muted-surface);
    color: var(--fh-text);
}

.guest-shell {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .055) 0 1px, transparent 1px 12rem),
        linear-gradient(180deg, #080b0e 0%, #14191d 52%, #0b0f12 100%);
}

.guest-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.guest-frame {
    width: min(100%, 1120px);
    margin: 0 auto;
    padding: 2rem 1rem;
}

.landing-view {
    min-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.landing-logo {
    width: min(38rem, 94vw);
    height: auto;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 0 30px rgba(183, 255, 42, .2));
}

.landing-copy {
    max-width: 38rem;
    color: var(--fh-text-muted);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.landing-footer {
    margin-top: 4rem;
    color: var(--fh-text-muted);
    font-size: .875rem;
}

.login-view {
    min-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: min(100%, 460px);
    margin: 0 auto;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.login-logo {
    width: 4rem;
    height: 4rem;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--fh-border-strong);
    border-radius: 8px;
    background: #0f1519;
    text-decoration: none;
    box-shadow: 0 0 28px rgba(183, 255, 42, .16);
    overflow: hidden;
}

.login-eyebrow {
    color: var(--fh-text-muted);
    font-size: .875rem;
    text-transform: uppercase;
    letter-spacing: 0;
}

.login-title {
    color: var(--fh-text);
    font-size: 2rem;
}

.login-panel {
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    background: var(--fh-panel-gradient), var(--fh-surface);
    padding: 1.5rem;
    box-shadow: var(--fh-shadow);
}

.login-footer {
    margin-top: 1.25rem;
    text-align: center;
    font-size: .9375rem;
}

.login-footer a {
    color: var(--fh-text-muted);
    text-decoration: none;
}

.login-footer a:hover {
    color: var(--fh-accent);
    text-decoration: underline;
}

.authenticated-shell {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 9rem),
        linear-gradient(180deg, #0b0f12 0%, #10161b 100%);
}

.app-navbar {
    border-bottom: 1px solid var(--fh-border);
    background: rgba(11, 15, 18, .92);
    backdrop-filter: blur(14px);
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 0;
    color: var(--fh-text);
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.app-brand:hover {
    color: var(--fh-accent);
}

.brand-symbol {
    display: block;
    width: 3.3rem;
    height: auto;
    object-fit: contain;
}

.brand-symbol-nav {
    width: 3.8rem;
    filter: drop-shadow(0 0 16px rgba(183, 255, 42, .15));
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .75rem;
    border-color: rgba(183, 255, 42, .26);
    background: rgba(183, 255, 42, .06);
    box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .16);
}

.back-button .bi {
    font-size: 1rem;
    line-height: 1;
}

.navbar .nav-link {
    color: var(--fh-text-muted);
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: var(--fh-accent);
}

.app-shell {
    min-height: calc(100vh - 57px);
}

.content-panel {
    background: var(--fh-panel-gradient), var(--fh-surface);
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 .75rem 1.75rem rgba(0, 0, 0, .18);
}

.btn-primary {
    --bs-btn-bg: var(--fh-accent-strong);
    --bs-btn-border-color: var(--fh-accent-strong);
    --bs-btn-color: #111820;
    --bs-btn-hover-bg: #c8ff4b;
    --bs-btn-hover-border-color: #c8ff4b;
    --bs-btn-hover-color: #0b0f12;
    --bs-btn-active-bg: #8fd216;
    --bs-btn-active-border-color: #8fd216;
    --bs-btn-active-color: #0b0f12;
    --bs-btn-disabled-bg: #4d5b37;
    --bs-btn-disabled-border-color: #4d5b37;
    --bs-btn-disabled-color: #a8b39a;
    font-weight: 700;
}

.btn-outline-primary {
    --bs-btn-color: var(--fh-accent);
    --bs-btn-border-color: rgba(183, 255, 42, .42);
    --bs-btn-hover-bg: var(--fh-accent-strong);
    --bs-btn-hover-border-color: var(--fh-accent-strong);
    --bs-btn-hover-color: #0b0f12;
    --bs-btn-active-bg: var(--fh-accent-strong);
    --bs-btn-active-border-color: var(--fh-accent-strong);
    --bs-btn-active-color: #0b0f12;
}

.btn-outline-secondary {
    --bs-btn-color: #c8d1da;
    --bs-btn-border-color: rgba(200, 209, 218, .28);
    --bs-btn-hover-bg: rgba(200, 209, 218, .12);
    --bs-btn-hover-border-color: rgba(200, 209, 218, .42);
    --bs-btn-hover-color: #fff;
}

.form-control,
.form-select {
    background-color: #0f1519;
    border-color: var(--fh-border);
    color: var(--fh-text);
}

.form-control:focus,
.form-select:focus {
    background-color: #111920;
    border-color: var(--fh-accent);
    box-shadow: 0 0 0 .2rem rgba(183, 255, 42, .16);
    color: var(--fh-text);
}

.list-group {
    --bs-list-group-bg: #111820;
    --bs-list-group-border-color: var(--fh-border);
    --bs-list-group-color: var(--fh-text);
}

.badge.text-bg-light {
    background-color: var(--fh-accent-soft) !important;
    color: var(--fh-accent) !important;
}

.app-flashes {
    position: fixed;
    top: 4.5rem;
    left: 50%;
    z-index: 1080;
    display: grid;
    gap: .5rem;
    width: min(28rem, calc(100vw - 2rem));
    transform: translateX(-50%);
    pointer-events: none;
}

.app-flashes .alert {
    margin: 0;
    box-shadow: var(--fh-shadow);
    pointer-events: auto;
}

.app-flashes.is-hiding {
    opacity: 0;
    transform: translate(-50%, -.5rem);
    transition: opacity .18s ease, transform .18s ease;
}

.dashboard-card {
    min-height: 9rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    background: var(--fh-panel-gradient), var(--fh-surface);
    padding: 1.25rem;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 .75rem 1.75rem rgba(0, 0, 0, .16);
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.dashboard-hero,
.dashboard-active-workout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.dashboard-primary-action {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    flex: 0 0 auto;
    min-height: 2.75rem;
    padding-inline: 1rem;
}

.dashboard-active-workout {
    border-color: var(--fh-border-strong);
}

.dashboard-active-workout .btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    flex: 0 0 auto;
}

.dashboard-kicker {
    display: block;
    margin-bottom: .25rem;
    color: var(--fh-accent);
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

.dashboard-stat {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr);
    gap: .2rem .75rem;
    align-items: center;
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    background: var(--fh-panel-gradient), var(--fh-surface);
    padding: .875rem;
}

.dashboard-stat .bi {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    background: var(--fh-accent-soft);
    color: var(--fh-accent);
}

.dashboard-stat span {
    color: var(--fh-text-muted);
    font-size: .8125rem;
    font-weight: 700;
    text-transform: uppercase;
}

.dashboard-stat strong {
    overflow-wrap: anywhere;
    font-size: 1.35rem;
    line-height: 1.1;
}

.dashboard-card:hover {
    border-color: var(--fh-border-strong);
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, .24), 0 0 0 1px rgba(183, 255, 42, .08);
    color: inherit;
    transform: translateY(-1px);
}

.dashboard-card.is-disabled {
    color: var(--fh-text-muted);
}

.dashboard-card-title {
    font-weight: 700;
    font-size: 1.125rem;
}

.dashboard-card-copy {
    color: var(--fh-text-muted);
}

.admin-check-group .form-check {
    margin-bottom: .5rem;
}

.admin-active-check {
    background: rgba(42, 76, 65, .05);
    border: 1px solid var(--fh-border);
    border-radius: .75rem;
    padding: 1rem 1rem 1rem 2.75rem;
}

.exercise-description-panel {
    display: grid;
    gap: 1.25rem;
}

.exercise-description-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.exercise-description-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
}

.exercise-description-meta span {
    display: inline-flex;
    gap: .4rem;
    align-items: center;
    border: 1px solid var(--fh-border);
    border-radius: 999px;
    color: var(--fh-text-muted);
    font-size: .875rem;
    padding: .35rem .7rem;
}

.exercise-description-summary {
    border-left: 4px solid var(--fh-accent);
    color: var(--fh-text);
    font-size: 1.05rem;
    line-height: 1.55;
    margin: 0;
    padding-left: 1rem;
}

.exercise-description-grid {
    display: grid;
    gap: .875rem;
}

.exercise-description-section {
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, .02);
    padding: 1rem;
}

.exercise-description-section h3 {
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .04em;
    margin-bottom: .65rem;
    text-transform: uppercase;
}

.exercise-description-section div {
    color: var(--fh-text-muted);
    line-height: 1.6;
    white-space: pre-line;
}

.choice-checklist {
    display: grid;
    gap: .45rem;
    max-height: 20rem;
    overflow: auto;
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    padding: .75rem;
    background: rgba(255, 255, 255, .02);
}

.choice-search-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: .5rem;
    align-items: center;
    position: sticky;
    top: -.75rem;
    z-index: 1;
    margin: -.75rem -.75rem .35rem;
    padding: .75rem;
    border-bottom: 1px solid var(--fh-border);
    background: var(--fh-surface);
}

.choice-search-counter {
    color: var(--fh-text-muted);
    font-size: .82rem;
    white-space: nowrap;
}

.choice-checklist .form-check {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 2rem;
    margin: 0;
    padding: .35rem .4rem;
    border-radius: 6px;
}

.choice-checklist .form-check:hover {
    background: rgba(183, 255, 42, .07);
}

.choice-checklist .form-check-input {
    float: none;
    flex: 0 0 auto;
    margin: 0;
}

.choice-checklist .form-check-input:checked {
    background-color: var(--fh-accent);
    border-color: var(--fh-accent);
}

.choice-checklist .form-check-label {
    cursor: pointer;
    line-height: 1.3;
}

.choice-search-empty {
    color: var(--fh-text-muted);
    font-size: .9rem;
    padding: .65rem .4rem;
}

.media-embed-frame,
.media-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    object-fit: contain;
}

.technique-video-frame {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 8px;
    background: #000;
}

.workout-history-list {
    display: grid;
    gap: .875rem;
}

.workout-history-card {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr) auto;
    gap: 1rem;
    align-items: center;
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    background: var(--fh-panel-gradient), var(--fh-surface);
    padding: 1rem;
    box-shadow: 0 .75rem 1.75rem rgba(0, 0, 0, .14);
}

.workout-history-status {
    display: inline-flex;
    margin-bottom: .5rem;
    border-radius: 999px;
    padding: .2rem .55rem;
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.workout-history-status.is-active {
    background: rgba(255, 193, 7, .14);
    color: #ffd666;
}

.workout-history-status.is-completed {
    background: var(--fh-accent-soft);
    color: var(--fh-accent);
}

.workout-history-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
    margin: 0;
}

.workout-history-meta div {
    min-width: 0;
}

.workout-history-meta dt {
    color: var(--fh-text-muted);
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.workout-history-meta dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-weight: 700;
}

.workout-history-actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
}

.workout-history-actions form {
    margin: 0;
}

.workout-history-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.equipment-list-thumb {
    display: grid;
    place-items: center;
    width: 64px;
    height: 48px;
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    background: #06090b;
    color: var(--fh-muted);
    overflow: hidden;
}

.equipment-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 991.98px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .workout-history-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    .dashboard-hero,
    .dashboard-active-workout {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-primary-action,
    .dashboard-active-workout .btn {
        justify-content: center;
        width: 100%;
    }
}


.training-editor-tabs .nav-tabs {
    border-bottom-color: var(--fh-border);
    gap: .25rem;
}

.training-editor-tabs .nav-link {
    border-color: transparent;
    color: var(--fh-text-muted);
    font-weight: 700;
}

.training-editor-tabs .nav-link:hover {
    border-color: var(--fh-border);
    color: var(--fh-text);
}

.training-editor-tabs .nav-link.active {
    border-color: var(--fh-border) var(--fh-border) transparent;
    background: var(--fh-surface);
    color: var(--fh-accent);
}

.training-editor-tab-content {
    padding-top: 1rem;
}

.training-editor-days {
    display: grid;
    gap: 1rem;
}

.training-editor-day {
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    background: #0f161d;
    padding: 1rem;
}

.training-editor-actions {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}

.training-editor-actions form {
    margin: 0;
}

.training-editor-exercises {
    display: grid;
    gap: .5rem;
}

.training-editor-exercise-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    background: #111820;
    padding: .75rem;
}

.training-editor-exercise-row > div:first-child {
    min-width: 0;
}

.profile-layout {
    display: grid;
    gap: 1rem;
    max-width: 1180px;
    margin: 0 auto;
}

.profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    background: var(--fh-panel-gradient), var(--fh-surface);
    padding: 1.25rem;
    box-shadow: var(--fh-shadow);
}

.profile-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.profile-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 4.5rem;
    width: 4.5rem;
    height: 4.5rem;
    border: 1px solid var(--fh-border-strong);
    border-radius: 8px;
    background: #0f1519;
    color: var(--fh-accent);
    font-size: 1.35rem;
    font-weight: 800;
    box-shadow: 0 0 22px rgba(183, 255, 42, .13);
}

.profile-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .5rem;
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1rem;
    align-items: start;
}

.profile-main {
    display: grid;
    gap: 1rem;
}

.profile-sidebar {
    display: grid;
    gap: 1rem;
}

.profile-meta {
    display: grid;
    gap: .875rem;
    margin: 0;
}

.profile-meta div {
    display: grid;
    gap: .15rem;
}

.profile-meta dt,
.profile-preference span {
    color: var(--fh-text-muted);
    font-size: .8125rem;
    font-weight: 700;
    text-transform: uppercase;
}

.profile-meta dd {
    margin: 0;
    color: var(--fh-text);
    overflow-wrap: anywhere;
}

.profile-preference {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr);
    align-items: center;
    gap: .75rem;
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    padding: .75rem;
    background: #111820;
}

.profile-preference + .profile-preference {
    margin-top: .75rem;
}

.profile-preference .bi {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    background: var(--fh-accent-soft);
    color: var(--fh-accent);
}

.profile-preference strong {
    display: block;
    overflow-wrap: anywhere;
}

.workout-layout {
    max-width: 1180px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.workout-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    background: var(--fh-panel-gradient), var(--fh-surface);
    box-shadow: var(--fh-shadow);
    margin-bottom: 1rem;
    padding: .875rem;
}

.workout-topbar-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.workout-menu-toggle,
.workout-menu-close {
    display: none !important;
}

.rest-timer-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    background: var(--fh-panel-gradient), #111820;
    box-shadow: var(--fh-shadow);
    padding: .875rem;
}

.rest-timer-bar .btn-group {
    margin-left: auto;
}

.timer-action-icon {
    display: none;
}

.rest-timer-main {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.rest-timer-time {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}

.workout-layout.is-resting .rest-timer-time {
    color: var(--fh-accent);
}

.workout-exercise-stack {
    position: relative;
    display: grid;
    gap: 1.25rem;
    min-width: 0;
}

.workout-flashes {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 30;
    display: grid;
    gap: .5rem;
    width: min(20rem, calc(100% - 24rem));
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: opacity .18s ease, transform .18s ease;
}

.workout-flashes .alert {
    border: 1px solid var(--fh-border-strong);
    border-radius: 999px;
    margin-bottom: 0;
    box-shadow: var(--fh-shadow);
    padding: .5rem 2.5rem .5rem .9rem;
    text-align: center;
    pointer-events: auto;
}

.workout-flashes .btn-close {
    top: 50%;
    right: .75rem;
    width: .75rem;
    height: .75rem;
    padding: .25rem;
    transform: translateY(-50%);
}

.workout-flashes.is-hiding {
    opacity: 0;
    transform: translate(-50%, calc(-50% - .5rem));
}

.workout-content {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.workout-exercise-nav {
    position: sticky;
    top: 146px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    background: var(--fh-panel-gradient), var(--fh-surface);
    box-shadow: var(--fh-shadow);
    padding: .75rem;
}

.workout-exercise-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .25rem .25rem .5rem;
}

.workout-exercise-nav-item {
    display: inline-flex;
    align-items: flex-start;
    gap: .65rem;
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    background: #111820;
    padding: .65rem .75rem;
    color: inherit;
    text-decoration: none;
}

.workout-exercise-nav-item span {
    display: grid;
    place-items: center;
    flex: 0 0 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--fh-muted-surface);
    font-size: .75rem;
    font-weight: 800;
}

.workout-exercise-nav-item strong {
    min-width: 0;
    font-size: .9rem;
    line-height: 1.2;
    white-space: normal;
}

.workout-exercise-nav-item.is-complete {
    border-color: rgba(183, 255, 42, .55);
    background: rgba(183, 255, 42, .13);
}

.workout-exercise-nav-item.is-partial {
    border-color: rgba(255, 193, 7, .55);
    background: rgba(255, 193, 7, .13);
}

.workout-exercise-nav-item.is-active {
    border-color: var(--fh-border-strong);
    box-shadow: 0 0 0 3px rgba(183, 255, 42, .12), 0 .5rem 1rem rgba(0, 0, 0, .18);
}

.workout-exercise-nav-item.is-complete span {
    background: var(--fh-accent-strong);
    color: #111820;
}

.workout-exercise-nav-item.is-partial span {
    background: #f79009;
    color: #fff;
}

.workout-card {
    display: none;
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    background: var(--fh-panel-gradient), var(--fh-surface);
    box-shadow: var(--fh-shadow);
    padding: 1.1rem;
    scroll-margin-top: 10.25rem;
}

.workout-card.is-active {
    display: block;
}

.workout-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .75rem;
}

.workout-card-heading {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr);
    align-items: start;
    gap: .75rem;
    min-width: 0;
}

.workout-card-heading h2 {
    overflow-wrap: anywhere;
}

.workout-card-tools {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .4rem;
    flex-shrink: 0;
}

.workout-card-tools form {
    margin: 0;
}

.exercise-replacement-results {
    display: grid;
    gap: .4rem;
    max-height: min(52vh, 24rem);
    overflow-y: auto;
    padding-right: .15rem;
}

.exercise-replacement-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    width: 100%;
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    background: #0b1115;
    color: var(--fh-text);
    padding: .8rem .9rem;
    text-align: left;
}

.exercise-replacement-result:hover,
.exercise-replacement-result:focus {
    border-color: var(--fh-accent);
    outline: none;
}

.exercise-replacement-result.is-current {
    color: var(--fh-muted);
}

.exercise-replacement-result small {
    color: var(--fh-accent);
    font-weight: 800;
    white-space: nowrap;
}

.exercise-replacement-empty {
    border: 1px dashed var(--fh-border);
    border-radius: 8px;
    color: var(--fh-muted);
    padding: 1rem;
    text-align: center;
}

.workout-card-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    border-radius: 999px;
    background: var(--fh-muted-surface);
    padding: .35rem .65rem;
    font-weight: 800;
}

.workout-card-status.is-complete {
    background: var(--fh-accent-soft);
    color: var(--fh-accent);
}

.workout-card-status.is-partial {
    background: #fef0c7;
    color: #b54708;
}

.workout-note,
.last-performance {
    border-radius: 8px;
    background: var(--fh-muted-surface);
    padding: .75rem;
    color: #c8d1da;
}

.performed-set-list {
    display: grid;
    gap: .5rem;
    margin-top: 1rem;
}

.performed-set-row {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr) auto auto;
    align-items: center;
    gap: .6rem;
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    background: #111820;
    padding: .65rem;
}

.performed-set-row > span:first-child {
    display: grid;
    place-items: center;
    height: 2rem;
    border-radius: 50%;
    background: var(--fh-muted-surface);
    font-weight: 800;
}

.performed-set-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.performed-set-actions {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.performed-set-actions form {
    margin: 0;
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
}

.icon-button .bi {
    font-size: 1.05rem;
    line-height: 1;
}

.technique-icon-button {
    margin-top: .1rem;
}

.set-entry-panel,
.set-modal-form {
    display: grid;
    gap: .9rem;
}

.set-entry-panel {
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    background: #10171c;
    padding: 1rem;
}

.set-entry-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: .75rem;
}

.same-side-toggle {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: 0 0 .75rem;
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    background: #0f1519;
    padding: .5rem .75rem;
}

.side-sync-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .75rem;
}

.side-sync-toggles .same-side-toggle {
    margin: 0;
}

.same-side-toggle .form-check-input {
    border-color: rgba(183, 255, 42, .48);
    margin: 0;
}

.same-side-toggle .form-check-input:checked {
    background-color: var(--fh-accent-strong);
    border-color: var(--fh-accent-strong);
}

.same-side-toggle .form-check-input:focus {
    border-color: var(--fh-accent);
    box-shadow: 0 0 0 .2rem rgba(183, 255, 42, .16);
}

.same-side-toggle .form-check-label {
    font-weight: 700;
}

.side-entry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: .75rem;
}

.duration-entry-panel {
    display: grid;
    gap: .5rem;
}

.duration-phase-label {
    color: var(--fh-muted);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-align: center;
    text-transform: uppercase;
}

.duration-countdown {
    border: 1px solid rgba(183, 255, 42, .26);
    border-radius: 8px;
    background: rgba(183, 255, 42, .08);
    color: var(--fh-accent);
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    padding: 1rem;
    text-align: center;
}

.duration-countdown[data-phase="prestart"] {
    border-color: rgba(255, 193, 7, .42);
    background: rgba(255, 193, 7, .12);
    color: #ffc107;
}

.duration-countdown[data-phase="active"] {
    border-color: rgba(183, 255, 42, .34);
    background: rgba(183, 255, 42, .1);
    color: var(--fh-accent);
}

.side-entry-panel {
    display: grid;
    gap: .75rem;
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    background: #0d1318;
    padding: .75rem;
}

.side-entry-panel h3 {
    margin: 0;
    color: var(--fh-accent);
    font-size: .85rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
}

.set-stepper > span {
    display: block;
    border-bottom: 2px solid var(--fh-accent);
    color: #c8d1da;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .02em;
    margin-bottom: .5rem;
    padding-bottom: .25rem;
    text-transform: uppercase;
}

.set-stepper {
    display: block;
}

.set-stepper-hint {
    display: block;
    margin-top: .4rem;
    color: var(--fh-text-muted);
    text-align: center;
}

.set-stepper-control {
    display: grid;
    grid-template-columns: 3rem 5.75rem 3rem;
    align-items: center;
    gap: .5rem;
    justify-content: center;
}

.set-stepper-control .btn {
    height: 2.75rem;
    border: 1px solid var(--fh-border);
    border-radius: 4px;
    background: #151d23;
    color: var(--fh-text);
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}

.set-stepper-control .btn:hover {
    background: var(--fh-accent-soft);
    color: var(--fh-accent);
}

.set-stepper-control input {
    appearance: textfield;
    -moz-appearance: textfield;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--fh-border);
    background: transparent;
    padding: .35rem .25rem .55rem;
    text-align: center;
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.15;
}

.set-stepper-control input::-webkit-outer-spin-button,
.set-stepper-control input::-webkit-inner-spin-button {
    appearance: none;
    margin: 0;
}

.set-entry-actions {
    position: relative;
    display: grid;
    grid-template-columns: 3rem 1fr;
    align-items: stretch;
    gap: .75rem;
}

.set-entry-actions:has(.set-note-details[open]) {
    margin-bottom: 3.75rem;
}

.note-icon-button {
    width: 100%;
    height: 100%;
    list-style: none;
}

.note-icon-button::-webkit-details-marker {
    display: none;
}

.set-note-details {
    display: block;
    grid-column: 1;
    height: 100%;
}

.set-note-details input {
    position: absolute;
    top: calc(100% + .5rem);
    left: 0;
    right: 0;
}

.technique-panel {
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    padding: 1rem;
    background: #10171c;
}

.technique-cover {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: #06090b;
}

.technique-section + .technique-section {
    margin-top: 1rem;
}

.technique-section h3 {
    font-size: 1rem;
}

.technique-section p {
    white-space: pre-line;
}

.technique-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
    margin-top: 1rem;
}

.technique-gallery img {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    border-radius: 8px;
    background: #06090b;
}

.summary-hero,
.summary-stat {
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    background: var(--fh-panel-gradient), var(--fh-surface);
    padding: 1.25rem;
}

.summary-hero {
    text-align: center;
    margin-bottom: 1rem;
}

.summary-mark {
    width: 4rem;
    height: 4rem;
    display: grid;
    place-items: center;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--fh-accent-soft);
    color: var(--fh-accent);
    font-weight: 800;
    font-size: 2rem;
}

.summary-stat span {
    display: block;
    color: var(--fh-text-muted);
    font-size: .875rem;
}

.summary-stat strong {
    font-size: 1.4rem;
}

.summary-exercise + .summary-exercise {
    border-top: 1px solid var(--fh-border);
    margin-top: 1rem;
    padding-top: 1rem;
}

@media (max-width: 991.98px) {
    .rest-timer-bar {
        min-height: 4.25rem;
        align-items: center;
        flex-direction: row;
        text-align: left;
    }

    .rest-timer-bar .btn-group {
        justify-content: flex-end;
        margin-left: auto;
    }

    .workout-flashes {
        position: absolute;
        top: calc(100% + .35rem);
        width: min(20rem, calc(100% - 1rem));
        transform: translateX(-50%);
    }

    .workout-flashes.is-hiding {
        transform: translate(-50%, -.5rem);
    }
}

@media (max-width: 767.98px) {
    .container-fluid:has(.workout-layout) {
        padding-right: .5rem;
        padding-left: .5rem;
    }

    .training-editor-exercise-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .training-editor-actions {
        width: 100%;
    }

    .training-editor-actions .btn:not(.icon-button),
    .training-editor-actions form {
        flex: 1 1 auto;
    }

    .training-editor-actions form .btn:not(.icon-button) {
        width: 100%;
    }

    .profile-hero,
    .profile-identity {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-status {
        justify-content: flex-start;
    }

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

    .workout-layout {
        max-width: 860px;
        width: 100%;
    }

    .workout-topbar {
        align-items: stretch;
        flex-direction: column;
        margin-bottom: .75rem;
        padding: .65rem;
    }

    .workout-topbar-actions {
        justify-content: space-between;
    }

    .workout-menu-toggle,
    .workout-menu-close {
        display: inline-grid !important;
        place-items: center;
        flex: 0 0 auto;
    }

    .workout-content {
        display: block;
    }

    .workout-exercise-nav {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1050;
        width: min(22rem, calc(100vw - 2rem));
        max-height: none;
        border-radius: 0 8px 8px 0;
        padding: 1rem;
        transform: translateX(-105%);
        transition: transform .18s ease;
    }

    .workout-exercise-nav.is-open {
        transform: translateX(0);
    }

    .workout-card {
        padding: .75rem;
        scroll-margin-top: 8.5rem;
    }

    .rest-timer-bar {
        gap: .5rem;
        min-height: 3.5rem;
        padding: .55rem .65rem;
    }

    .workout-menu-toggle {
        width: 2.35rem;
        height: 2.35rem;
        min-width: 2.35rem;
        padding: 0;
    }

    .rest-timer-bar .small {
        font-size: .72rem;
        line-height: 1;
    }

    .rest-timer-time {
        font-size: 1.35rem;
    }

    .rest-timer-bar .btn {
        min-width: 2.65rem;
        padding: .4rem .55rem;
        line-height: 1;
    }

    .timer-action-icon {
        display: inline;
        font-size: 1.05rem;
        font-weight: 700;
    }

    .timer-action-label {
        display: none;
    }

    .workout-flashes .alert {
        border-radius: 8px;
        padding-top: .45rem;
        padding-bottom: .45rem;
    }

    .performed-set-row {
        grid-template-columns: 2rem minmax(0, 1fr) auto auto;
        gap: .55rem;
        padding: .55rem;
    }

    .performed-set-actions {
        justify-content: flex-end;
    }

    .performed-set-row > span:nth-child(3) {
        font-size: .8rem;
    }

    .performed-set-actions .icon-button {
        width: 2.15rem;
        height: 2.15rem;
    }

    .workout-card-header {
        gap: .65rem;
    }

    .workout-card-heading {
        grid-template-columns: 2.35rem minmax(0, 1fr);
        gap: .55rem;
    }

    .workout-card-status {
        min-width: 2.65rem;
        padding: .3rem .5rem;
    }

    .set-entry-panel {
        padding: .7rem;
    }

    .side-sync-toggles {
        gap: .4rem;
    }

    .same-side-toggle {
        padding: .45rem .55rem;
    }
}

@media (max-width: 430px) {
    .container-fluid:has(.workout-layout) {
        padding-right: .35rem;
        padding-left: .35rem;
    }

    .workout-card {
        padding: .6rem;
    }

    .set-entry-panel {
        padding: .55rem;
    }

    .side-entry-grid {
        gap: .4rem;
    }

    .side-entry-panel {
        padding: .45rem;
    }

    .side-entry-panel .set-stepper-control {
        grid-template-columns: 2rem minmax(2.75rem, 1fr) 2rem;
        gap: .25rem;
    }

    .side-entry-panel .set-stepper-control .btn {
        min-width: 2rem;
        height: 2.35rem;
        font-size: 1.35rem;
        padding: 0;
    }

    .side-entry-panel .set-stepper-control input {
        font-size: 1.35rem;
        padding-right: .1rem;
        padding-left: .1rem;
    }

    .set-stepper > span {
        font-size: .72rem;
        margin-bottom: .35rem;
    }

    .side-entry-panel h3 {
        font-size: .78rem;
    }
}

.empty-state {
    min-height: 9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.markdown-body {
    line-height: 1.65;
}

.media-dropzone {
    border: 1px dashed #9aa7b8;
    border-radius: 8px;
    padding: 1rem;
    background: #10171c;
}

.media-dropzone.is-dragging {
    border-color: var(--fh-accent);
    background: var(--fh-accent-soft);
}

.media-preview {
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: .75rem;
    background: #111820;
}

.media-preview img,
.media-preview video {
    max-width: 100%;
    max-height: 220px;
    border-radius: 6px;
    display: block;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.media-item {
    border: 1px solid var(--fh-border);
    border-radius: 8px;
    background: #111820;
    overflow: hidden;
}

.media-item.is-dragging {
    opacity: .55;
}

.media-thumb {
    aspect-ratio: 4 / 3;
    background: #0f1519;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-placeholder {
    color: var(--fh-text-muted);
    font-size: .875rem;
}

.drag-handle {
    cursor: grab;
    color: var(--fh-text-muted);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: 0;
}
