/* Active workout sessions */
.workout-section-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
    margin: 0 auto 1.35rem;
    max-width: 1120px;
    width: 100%;
}

.workout-section-tab {
    background: #10141a;
    border: 1px solid #2a313c;
    border-radius: 999px;
    color: #aeb6c2;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    font-size: .9rem;
    font-weight: 850;
    height: 42px;
    justify-content: center;
    line-height: 1;
    min-width: 0;
    padding: 0 1rem;
    text-align: center;
    white-space: nowrap;
    width: 100%;
}

.workout-section-tab.is-active,
.workout-section-tab:hover,
.workout-section-tab:focus-visible {
    background: #f4f4f5;
    border-color: #f4f4f5;
    color: #07090b;
    outline: 0;
}

.start-workout-button {
    text-align: left;
}

@media (min-width: 641px) {
    .workout-section-tabs {
        gap: .5rem;
        margin-bottom: 1.1rem;
    }

    .workout-section-tab {
        font-size: .82rem;
        height: 34px;
        padding: 0 .85rem;
    }
}

.workout-history-list {
    display: grid;
    gap: .75rem;
}

.workout-history-item {
    align-items: center;
    background: #10141a;
    border: 1px solid #252c37;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .95rem 1rem;
}

.workout-history-item div {
    display: grid;
    gap: .22rem;
}

.workout-history-item span,
.workout-history-item small,
.workout-history-item p {
    color: #8f97a3;
    font-size: .86rem;
    font-weight: 750;
    margin: 0;
}

.workout-history-item strong {
    color: #f5f5f6;
    font-size: 1.05rem;
    font-weight: 900;
}

.active-workout-page {
    max-width: 1180px;
}

.active-timer-panel {
    align-items: center;
    background: linear-gradient(135deg, rgba(216, 255, 53, .1), #0b0f15 70%);
    border: 1px solid rgba(216, 255, 53, .34);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 auto 1rem;
    max-width: 1120px;
    padding: 1rem;
    width: 100%;
}

.active-timer-panel > div:first-child {
    display: grid;
    gap: .25rem;
}

.active-timer-panel strong {
    color: #f5f5f6;
    font-size: clamp(2.3rem, 6vw, 4.5rem);
    font-weight: 950;
    letter-spacing: 0;
    line-height: .95;
}

.active-timer-panel span {
    color: #aeb6c2;
    font-weight: 800;
}

.active-timer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    justify-content: flex-end;
}

.active-completion-summary {
    align-items: center;
    background: linear-gradient(135deg, rgba(216, 255, 53, .12), #0b0f15 72%);
    border: 1px solid rgba(216, 255, 53, .35);
    border-radius: 10px;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(220px, .85fr) minmax(0, 1.15fr) auto;
    margin: 0 auto 1rem;
    max-width: 1120px;
    padding: 1rem;
    width: 100%;
}

.active-completion-copy {
    display: grid;
    gap: .25rem;
}

.active-completion-copy h2 {
    color: #f5f5f6;
    font-size: clamp(1.55rem, 3vw, 2.2rem);
    font-weight: 950;
    line-height: 1;
    margin: 0;
}

.active-completion-copy p:not(.system-label) {
    color: #aeb6c2;
    font-weight: 760;
    margin: 0;
}

.active-completion-stats {
    display: grid;
    gap: .6rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.active-completion-stats div {
    background: #151b23;
    border: 1px solid #2a313c;
    border-radius: 8px;
    display: grid;
    gap: .18rem;
    min-height: 66px;
    padding: .75rem;
}

.active-completion-stats span {
    color: #8f97a3;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.active-completion-stats strong {
    color: #f5f5f6;
    font-size: 1.35rem;
    font-weight: 950;
    line-height: 1;
}

.active-completion-actions {
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.active-completion-actions .auth-submit,
.active-completion-actions .secondary-action {
    justify-content: center;
    margin: 0;
    min-width: 150px;
    text-decoration: none;
}

.active-workout-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) 320px;
    margin: 0 auto;
    max-width: 1120px;
    width: 100%;
}

.active-workout-main,
.active-session-notes {
    background: #0b0f15;
    border: 1px solid #252c37;
    border-radius: 8px;
    padding: 1rem;
}

.active-section-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.active-section-heading h2,
.active-session-notes h2 {
    color: #f5f5f6;
    font-size: 1.45rem;
    font-weight: 900;
    margin: .2rem 0 0;
}

.active-exercise-list {
    display: grid;
    gap: .9rem;
}

.active-exercise-card {
    background: #070a0e;
    border: 1px solid #222a35;
    border-radius: 8px;
    display: grid;
    gap: .85rem;
    overflow: hidden;
    padding: 1rem;
    position: relative;
}

.active-exercise-card::before {
    background: #d7ff63;
    content: "";
    height: 3px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.active-rest-chip {
    background: rgba(216, 255, 53, .1);
    border: 1px solid rgba(216, 255, 53, .25);
    border-radius: 999px;
    color: #d7ff63;
    font-size: .8rem;
    font-weight: 900;
    justify-self: start;
    line-height: 1.2;
    max-width: 100%;
    overflow-wrap: anywhere;
    padding: .35rem .65rem;
}

.active-rest-timer {
    align-items: center;
    background: linear-gradient(135deg, rgba(216, 255, 53, .12), #10161d 74%);
    border: 1px solid rgba(216, 255, 53, .32);
    border-radius: 10px;
    display: grid;
    gap: .65rem;
    grid-template-columns: minmax(0, 1fr) auto;
    overflow: hidden;
    padding: .85rem;
    position: relative;
}

.active-rest-timer.is-complete {
    background: linear-gradient(135deg, rgba(92, 200, 255, .14), #10161d 74%);
    border-color: rgba(92, 200, 255, .34);
}

.active-rest-timer-copy {
    display: grid;
    gap: .12rem;
}

.active-rest-timer-copy span {
    color: #d7ff63;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: .72rem;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.active-rest-timer.is-complete .active-rest-timer-copy span {
    color: #8fdcff;
}

.active-rest-timer-copy strong {
    color: #f5f5f6;
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    font-weight: 950;
    line-height: 1;
}

.active-rest-timer-copy p {
    color: #aeb6c2;
    font-size: .88rem;
    font-weight: 760;
    margin: 0;
}

.active-rest-timer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    justify-content: flex-end;
}

.active-rest-timer-actions button {
    background: #151b23;
    border: 1px solid #2a313c;
    border-radius: 999px;
    color: #f5f5f6;
    cursor: pointer;
    font-size: .82rem;
    font-weight: 900;
    line-height: 1.1;
    min-height: 32px;
    min-width: 64px;
    padding: 0 .75rem;
    white-space: nowrap;
}

.active-rest-progress {
    background: rgba(255, 255, 255, .08);
    border-radius: 999px;
    bottom: 0;
    height: 4px;
    left: 0;
    overflow: hidden;
    position: absolute;
    right: 0;
}

.active-rest-progress span {
    background: #d7ff63;
    display: block;
    height: 100%;
    transition: width .2s linear;
}

.active-rest-timer.is-complete .active-rest-progress span {
    background: #8fdcff;
}

.active-set-table {
    display: grid;
    gap: .55rem;
    overflow-x: auto;
}

.active-set-row {
    align-items: center;
    background: #0d1218;
    border: 1px solid #202733;
    border-radius: 8px;
    display: grid;
    gap: .5rem;
    padding: .6rem;
}

.active-set-row.is-next {
    background: linear-gradient(135deg, rgba(216, 255, 53, .1), #0d1218 70%);
    border-color: rgba(216, 255, 53, .52);
    box-shadow: inset 3px 0 0 #d7ff63;
}

.active-set-row.is-completed {
    background: #10141a;
    border-color: rgba(216, 255, 53, .2);
    opacity: .76;
}

.active-set-row.is-completed .set-number {
    color: #d7ff63;
}

.active-set-row--weighted-reps {
    grid-template-columns: 42px minmax(74px, .8fr) minmax(66px, .7fr) minmax(66px, .6fr) minmax(82px, .8fr) minmax(120px, 1fr) minmax(78px, auto);
    min-width: 760px;
}

.active-set-row--timed {
    grid-template-columns: 42px minmax(80px, .8fr) minmax(66px, .6fr) minmax(82px, .8fr) minmax(120px, 1fr) minmax(78px, auto);
    min-width: 650px;
}

.active-set-row--timed-weighted {
    grid-template-columns: 42px minmax(74px, .8fr) minmax(80px, .8fr) minmax(66px, .6fr) minmax(82px, .8fr) minmax(120px, 1fr) minmax(78px, auto);
    min-width: 760px;
}

.active-set-head {
    background: transparent;
    border-color: transparent;
    color: #8f97a3;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .08em;
    padding-bottom: 0;
    text-transform: uppercase;
}

.active-set-row input {
    background: #10161d;
    border: 1px solid #2a313c;
    border-radius: 7px;
    color: #f5f5f6;
    min-height: 38px;
    min-width: 0;
    padding: .5rem .55rem;
    width: 100%;
}

.active-set-row input:disabled,
.active-session-notes textarea:disabled,
.template-exercise-footer input:disabled {
    opacity: .72;
}

.active-set-row button {
    background: #151b23;
    border: 1px solid #2a313c;
    border-radius: 7px;
    color: #f5f5f6;
    line-height: 1.1;
    min-height: 38px;
    min-width: 72px;
    padding: 0 .65rem;
    white-space: nowrap;
}

.active-session-notes {
    align-self: start;
    display: grid;
    gap: .85rem;
}

.active-session-notes dl {
    display: grid;
    gap: .65rem;
    margin: 0;
}

.active-session-notes dl div {
    background: #10141a;
    border: 1px solid #242b36;
    border-radius: 8px;
    padding: .7rem;
}

.active-session-notes dt {
    color: #8f97a3;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.active-session-notes dd {
    color: #f5f5f6;
    font-weight: 850;
    margin: .2rem 0 0;
}

@media (max-width: 980px) {
    .active-workout-layout {
        grid-template-columns: 1fr;
    }

    .active-completion-summary {
        grid-template-columns: 1fr;
    }

    .active-completion-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .active-timer-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .active-timer-actions {
        justify-content: stretch;
    }

    .active-timer-actions .auth-submit,
    .active-timer-actions .secondary-action {
        flex: 1 1 160px;
    }

    .active-completion-actions .auth-submit,
    .active-completion-actions .secondary-action {
        flex: 1 1 180px;
    }
}

@media (max-width: 640px) {
    .workout-section-tabs {
        grid-template-columns: 1fr;
    }

    .workout-history-item,
    .active-section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .template-exercise-group-head,
    .active-exercise-group-head {
        align-items: stretch;
        flex-direction: column;
    }

    .template-group-picker {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .template-group-picker .auth-submit,
    .template-group-picker .secondary-action {
        width: 100%;
    }

    .active-rest-timer {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .active-rest-timer-actions {
        justify-content: stretch;
    }

    .active-rest-timer-actions button {
        flex: 1;
    }

    .active-completion-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.danger-action {
    border-color: rgba(255, 107, 107, .5) !important;
    color: #ff8f8f !important;
}

.danger-action:hover,
.danger-action:focus-visible {
    background: rgba(255, 107, 107, .12) !important;
    border-color: #ff6b6b !important;
    color: #ffd0d0 !important;
}

.exercise-page-status {
    margin: 0 auto 1rem;
    max-width: 1180px;
}

.exercise-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1rem;
}

.exercise-detail-actions .auth-submit,
.exercise-detail-actions .secondary-action {
    margin-top: 0;
    width: auto;
}

.start-empty-workout-button {
    align-items: center;
    background: linear-gradient(135deg, rgba(216, 255, 53, .12), #15191f 72%);
    border: 1px solid rgba(216, 255, 53, .42);
    border-radius: 18px;
    color: #8f97a3;
    display: grid;
    gap: .9rem;
    grid-template-columns: 54px minmax(0, 1fr) 28px;
    margin-bottom: 1rem;
    min-height: 92px;
    padding: 1rem 1.15rem;
    text-align: left;
    width: 100%;
}

.start-empty-workout-button:hover,
.start-empty-workout-button:focus-visible {
    border-color: var(--ln-lime);
    outline: 0;
}

.workout-history-item {
    color: inherit;
    text-decoration: none;
}

.workout-history-item:hover,
.workout-history-item:focus-visible {
    border-color: var(--ln-lime);
    outline: 0;
}

.dashboard-panel-heading,
.progress-chart-heading {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.dashboard-panel-heading a {
    color: var(--ln-lime);
    font-weight: 900;
    text-decoration: none;
}

.dashboard-recent-list {
    display: grid;
    gap: .75rem;
    margin-top: 1rem;
}

.workout-detail-page,
.progress-page {
    max-width: 1180px;
}

.workout-detail-summary,
.progress-metric-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 auto;
    max-width: 1120px;
    width: 100%;
}

.workout-detail-summary article {
    background: #0b0f15;
    border: 1px solid #252c37;
    border-radius: 8px;
    display: grid;
    gap: .4rem;
    padding: 1rem;
}

.workout-detail-summary span,
.progress-record-card span,
.progress-chart-heading span {
    color: #8f97a3;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.workout-detail-summary strong {
    color: #f5f5f6;
    font-size: 2rem;
    font-weight: 950;
    line-height: 1;
}

.workout-detail-layout,
.progress-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) 320px;
    margin: 0 auto;
    max-width: 1120px;
    width: 100%;
}

.progress-layout {
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
}

.workout-detail-exercises,
.progress-record-grid,
.progress-chart-list {
    display: grid;
    gap: .9rem;
}

.progress-record-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workout-detail-set-list {
    display: grid;
    gap: .55rem;
}

.workout-detail-set,
.progress-record-card,
.progress-chart-card {
    background: #10141a;
    border: 1px solid #252c37;
    border-radius: 12px;
    display: grid;
    gap: .4rem;
    padding: .9rem;
}

.workout-detail-set {
    grid-template-columns: 72px minmax(0, 1fr) minmax(120px, .85fr);
}

.workout-detail-set strong,
.progress-record-card strong {
    color: #f5f5f6;
    font-size: 1.12rem;
    font-weight: 950;
}

.workout-detail-set small,
.progress-record-card small {
    color: #8f97a3;
    font-weight: 750;
}

.progress-record-card h3,
.progress-chart-heading h3 {
    color: #f5f5f6;
    font-size: 1.05rem;
    font-weight: 950;
    margin: 0;
}

.progress-bars {
    display: grid;
    gap: .65rem;
}

.progress-bar-row {
    align-items: center;
    display: grid;
    gap: .75rem;
    grid-template-columns: 64px minmax(0, 1fr) 70px;
}

.progress-bar-row span,
.progress-bar-row strong {
    color: #aeb6c2;
    font-size: .82rem;
    font-weight: 850;
}

.progress-bar-row div {
    background: #1a2029;
    border-radius: 999px;
    height: 9px;
    overflow: hidden;
}

.progress-bar-row i {
    background: var(--ln-lime);
    border-radius: inherit;
    display: block;
    height: 100%;
}

@media (max-width: 980px) {
    .workout-detail-layout,
    .progress-layout,
    .workout-detail-summary,
    .progress-metric-grid,
    .progress-record-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .exercise-detail-actions,
    .dashboard-panel-heading,
    .progress-chart-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .exercise-detail-actions .auth-submit,
    .exercise-detail-actions .secondary-action {
        width: 100%;
    }

    .workout-detail-set,
    .progress-bar-row {
        grid-template-columns: 1fr;
    }
}
