/* Reset e configurações básicas */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Compact exercise replacement picker */
.replacement-option__matches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.42rem;
}

.replacement-option__body .replacement-option__matches span {
    margin: 0;
    padding: 0.18rem 0.35rem;
    border: 1px solid rgba(101, 231, 164, 0.16);
    border-radius: 999px;
    color: #a9e7c8;
    background: rgba(101, 231, 164, 0.07);
    font-size: 0.58rem;
    line-height: 1.15;
}

.replacement-option__body .replacement-option__matches span i {
    color: #65e7a4;
}

.replacement-option__body .replacement-option__equipment {
    margin-top: 0.42rem;
}

.replacement-show-more {
    width: 100%;
    min-height: 2.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.65rem;
    border: 1px solid rgba(127, 169, 255, 0.22);
    border-radius: 10px;
    color: #b9ceff;
    background: rgba(79, 141, 255, 0.07);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 560px) {
    #viewWorkoutPlanDetails .replacement-panel {
        position: fixed;
        inset: auto 0.5rem max(0.5rem, env(safe-area-inset-bottom));
        z-index: 1900;
        width: auto;
        max-width: none;
        max-height: calc(100dvh - 4.5rem);
        margin: 0;
        padding: 0.7rem;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        border: 1px solid rgba(127, 169, 255, 0.18);
        border-radius: 18px 18px 12px 12px;
        background:
            radial-gradient(circle at 50% -30%, rgba(79, 141, 255, 0.16), transparent 20rem),
            #0b1410;
        box-shadow: 0 -18px 60px rgba(0, 0, 0, 0.62), 0 0 0 100vmax rgba(2, 7, 5, 0.68);
    }

    #viewWorkoutPlanDetails .replacement-panel__header {
        min-height: 0;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 0.55rem;
        padding: 0 0 0.55rem;
    }

    #viewWorkoutPlanDetails .replacement-panel__header > div {
        min-width: 0;
    }

    #viewWorkoutPlanDetails .replacement-panel__header span {
        font-size: 0.54rem;
        letter-spacing: 0.06em;
    }

    #viewWorkoutPlanDetails .replacement-panel__header h6 {
        margin-top: 0.08rem;
        overflow-wrap: anywhere;
        font-size: 0.9rem;
        line-height: 1.18;
    }

    #viewWorkoutPlanDetails .replacement-panel__header p {
        margin-top: 0.12rem;
        font-size: 0.62rem;
        line-height: 1.3;
    }

    #viewWorkoutPlanDetails .replacement-close {
        width: 1.9rem;
        min-width: 1.9rem;
        height: 1.9rem;
        min-height: 1.9rem;
        padding: 0;
        border-radius: 7px;
        font-size: 0.72rem;
    }

    #viewWorkoutPlanDetails .replacement-message {
        margin-bottom: 0.45rem;
        font-size: 0.65rem;
    }

    #viewWorkoutPlanDetails .replacement-options {
        display: grid;
        grid-auto-columns: auto;
        grid-auto-flow: row;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.45rem;
        overflow: visible;
        padding: 0;
        scroll-snap-type: none;
    }

    #viewWorkoutPlanDetails .replacement-option {
        min-width: 0;
        min-height: 0;
        display: grid;
        grid-template-columns: 3.6rem minmax(0, 1fr) 5.6rem;
        grid-template-rows: auto;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem;
        overflow: hidden;
        border-radius: 11px;
        scroll-snap-align: none;
    }

    #viewWorkoutPlanDetails .replacement-option > img,
    #viewWorkoutPlanDetails .replacement-option > .exercise-image-placeholder {
        width: 3.6rem;
        height: 3.6rem;
        min-height: 3.6rem;
        align-self: center;
        border-radius: 8px;
        object-fit: cover;
    }

    #viewWorkoutPlanDetails .replacement-option__body {
        min-width: 0;
        align-self: center;
        padding: 0;
    }

    #viewWorkoutPlanDetails .replacement-option__body h6 {
        overflow-wrap: anywhere;
        font-size: 0.73rem;
        line-height: 1.2;
    }

    #viewWorkoutPlanDetails .replacement-option__body p {
        display: -webkit-box;
        margin-top: 0.15rem;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        color: #a9aaa2;
        font-size: 0.58rem;
        line-height: 1.25;
    }

    #viewWorkoutPlanDetails .replacement-option__matches {
        gap: 0.2rem;
        margin-top: 0.28rem;
    }

    #viewWorkoutPlanDetails .replacement-option__body .replacement-option__matches span {
        padding: 0.12rem 0.28rem;
        font-size: 0.5rem;
    }

    #viewWorkoutPlanDetails .replacement-option__body .replacement-option__matches span:nth-child(n + 3) {
        display: none;
    }

    #viewWorkoutPlanDetails .replacement-option__body .replacement-option__equipment {
        margin-top: 0.28rem;
        font-size: 0.55rem;
        line-height: 1.15;
    }

    #viewWorkoutPlanDetails .replacement-apply {
        grid-column: 3;
        grid-row: 1;
        width: 5.6rem;
        min-width: 0;
        min-height: 2.65rem;
        margin: 0;
        padding: 0.4rem 0.35rem;
        align-self: center;
        border-radius: 9px;
        font-size: 0.62rem;
        font-weight: 850;
        line-height: 1.15;
        white-space: normal;
    }

    #viewWorkoutPlanDetails .replacement-show-more {
        min-height: 2.55rem;
        margin-top: 0.5rem;
        font-size: 0.67rem;
    }
}

.user-avatar-image {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.professional-student-avatar img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.network-request-count {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    color: #07130c;
    background: var(--primary-green);
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1.15rem;
}

.network-sheet {
    width: min(720px, 100%);
}

.network-settings,
.network-search,
.network-sheet > section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.network-avatar-editor,
.network-search > div,
.network-card,
.network-card__actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.network-avatar-editor > img,
.network-avatar-editor > span,
.network-card__avatar {
    width: 3.25rem;
    height: 3.25rem;
    flex: 0 0 auto;
    border-radius: 50%;
    object-fit: cover;
    display: grid;
    place-items: center;
    color: #07130c;
    background: var(--primary-green);
    font-weight: 800;
}

.network-card__avatar img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.network-search input {
    flex: 1;
}

.network-list {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.75rem;
}

.network-card {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
}

.network-card > div:nth-child(2) {
    min-width: 0;
    flex: 1;
    display: grid;
}

.network-card small {
    color: var(--muted-text);
}

.meal-checkin {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
    margin-top: 0.8rem;
}

.meal-checkin button {
    padding: 0.55rem 0.35rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--muted-text);
    background: var(--surface-soft);
}

.meal-checkin button.is-selected {
    border-color: var(--primary-green);
    color: var(--dark-green);
    background: var(--green-soft);
}

.meal-checkin i {
    margin-right: 0.3rem;
}

.diet-day-complete {
    width: 100%;
    margin-top: 0.9rem;
}

.review-sheet,
.review-details-sheet {
    width: min(880px, 100%);
}

.review-target-card,
.review-focus-grid label,
.review-outcomes label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.7rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
}

.review-target-card + .review-target-card {
    margin-top: 0.5rem;
}

.review-target-card span {
    display: grid;
}

.review-target-card small,
.review-status small {
    color: var(--muted-text);
}

.review-focus-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.review-status {
    display: flex;
    justify-content: space-between;
    padding: 0.7rem;
    border-radius: 12px;
    background: var(--green-soft);
}

.review-details-sheet blockquote,
.review-evaluation,
.review-completion,
.review-decision {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.review-comparison {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.review-plan {
    min-width: 0;
    padding: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
}

.review-plan > div {
    margin-top: 0.7rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--border);
}

.review-plan p {
    margin-top: 0.3rem;
    color: var(--muted-text);
}

.review-completion label,
.review-decision label {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.7rem;
}

.review-outcomes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0.8rem 0;
}

.professional-review-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--dark-green);
    font-weight: 700;
}

@media (max-width: 640px) {
    .review-focus-grid,
    .review-comparison,
    .review-outcomes {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .network-card {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .network-card__actions {
        width: 100%;
    }
}

/* Tokens do sistema — tema claro (fonte única de verdade; seções antigas abaixo são legado) */
:root {
    color-scheme: light;
    --primary-green: #3b82f6;
    --dark-green: #1d4ed8;
    --black: #17352a;
    --dark-gray: #fffdf8;
    --light-gray: #edf3ec;
    --white: #20372e;
    --gray-text: #5f6f66;
    --muted-text: #6d7b73;
    --surface: #fffdf8;
    --surface-raised: #ffffff;
    --surface-soft: #f1f5ef;
    --border: rgba(42, 82, 64, 0.15);
    --border-strong: rgba(42, 82, 64, 0.25);
    --green-soft: rgba(45, 212, 191, 0.12);
    --blue-soft: rgba(60, 103, 175, 0.1);
    --shadow-light: rgba(49, 72, 57, 0.08);
    --shadow-medium: rgba(49, 72, 57, 0.14);
    --shadow-heavy: rgba(49, 72, 57, 0.22);
    /* Escala de raios */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 999px;
    /* Elevações */
    --elev-sm: 0 1px 2px rgba(49, 72, 57, 0.05), 0 2px 8px rgba(49, 72, 57, 0.06);
    --elev-md: 0 4px 12px rgba(49, 72, 57, 0.08), 0 8px 24px rgba(49, 72, 57, 0.1);
    --elev-lg: 0 12px 32px rgba(49, 72, 57, 0.14), 0 16px 48px rgba(49, 72, 57, 0.12);
    /* Materiais de vidro (usar só em chrome sobre conteúdo) */
    --glass-bg: rgba(255, 253, 248, 0.82);
    --glass-bg-strong: rgba(255, 253, 248, 0.92);
    --glass-blur: saturate(180%) blur(18px);
    --transition: 180ms ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--black);
    color: var(--white);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Telas principais */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active,
.screen:not(.hidden) {
    display: block;
}

/* === WORKSPACE PROFISSIONAL === */
.professional-heading {
    align-items: flex-end;
}

.professional-student-grid,
.professional-plan-grid {
    display: grid;
    gap: 1rem;
}

.professional-draft-section {
    margin: 1.25rem 0;
}

.professional-draft-list {
    display: grid;
    gap: 0.625rem;
}

.professional-draft-list > button {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr) auto;
    gap: 1rem;
    align-items: center;
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.875rem;
    color: inherit;
    text-align: left;
    background: var(--surface-raised);
}

.professional-draft-list span {
    display: grid;
    gap: 0.2rem;
}

.professional-draft-list small,
.professional-draft-list .muted {
    color: var(--gray-text);
}

@media (max-width: 560px) {
    .professional-draft-list > button {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .professional-draft-list > button span:nth-child(2) {
        display: none;
    }

    .chat-header-actions {
        width: 100%;
    }
}

/* === TELA PRINCIPAL === */
.header {
    background: linear-gradient(135deg, var(--dark-gray) 0%, var(--black) 100%);
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
    padding: 1.5rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 1rem;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header h1 i {
    color: var(--primary-green);
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.user-info span {
    color: var(--gray-text);
    font-weight: 500;
}

.btn-profile,
.btn-logout,
.btn-admin {
    background: rgba(0, 255, 0, 0.1);
    color: var(--primary-green);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-profile:hover,
.btn-logout:hover,
.btn-admin:hover {
    background: var(--primary-green);
    color: var(--black);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.3);
}

.nav-tabs {
    background: var(--dark-gray);
    border-bottom: 1px solid rgba(0, 255, 0, 0.1);
    padding: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    overflow-x: auto;
}

.nav-btn {
    background: transparent;
    color: var(--gray-text);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    font-size: 0.9rem;
}

.nav-btn.active {
    background: var(--primary-green);
    color: var(--black);
    border-color: var(--primary-green);
    box-shadow: 0 2px 8px rgba(0, 255, 0, 0.3);
}

.nav-btn:not(.active):hover {
    background: rgba(0, 255, 0, 0.1);
    color: var(--primary-green);
    border-color: rgba(0, 255, 0, 0.3);
}

/* Conteúdo das abas */
.tab-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.content-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-header h2 i {
    color: var(--primary-green);
}

.content-header p {
    color: var(--gray-text);
    margin-top: 0.5rem;
}

/* Botões secundários */
.btn-secondary,
.btn-add,
.btn-edit,
.btn-delete {
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gray-text);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.btn-add {
    background: var(--primary-green);
    color: var(--black);
    box-shadow: 0 2px 8px rgba(0, 255, 0, 0.3);
}

.btn-add:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.4);
    filter: brightness(1.1);
}

.btn-edit {
    background: #ffa500;
    color: var(--black);
}

.btn-edit:hover {
    background: #ff8c00;
    transform: translateY(-1px);
}

.btn-delete {
    background: #ff4444;
    color: var(--white);
}

.btn-delete:hover {
    background: #cc0000;
    transform: translateY(-1px);
}

/* Filtros */
.filters {
    background: var(--dark-gray);
    border: 1px solid rgba(0, 255, 0, 0.1);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filters input,
.filters select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: var(--white);
    font-size: 0.9rem;
    min-width: 150px;
}

.filters input:focus,
.filters select:focus {
    border-color: var(--primary-green);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 255, 0, 0.1);
}

/* Tabelas */
.table-container {
    background: var(--dark-gray);
    border: 1px solid rgba(0, 255, 0, 0.1);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th {
    background: rgba(0, 255, 0, 0.1);
    color: var(--primary-green);
    font-weight: 600;
    padding: 1rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
}

.data-table td {
    padding: 0.875rem 0.75rem;
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table tr:hover {
    background: rgba(0, 255, 0, 0.05);
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* Modais */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--dark-gray);
    border: 1px solid rgba(0, 255, 0, 0.2);
    border-radius: var(--border-radius);
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 255, 0, 0.1);
}

.modal-header h3 {
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-header p {
    color: var(--gray-text);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.btn-close {
    background: none;
    border: none;
    color: var(--gray-text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-close:hover {
    color: var(--primary-green);
    background: rgba(0, 255, 0, 0.1);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Formulários em modais */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--gray-text);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 0.75rem;
    color: var(--white);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-green);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 2px rgba(0, 255, 0, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Chat */
.chat-container {
    background: var(--dark-gray);
    border: 1px solid rgba(0, 255, 0, 0.1);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    padding-right: 0.5rem;
    max-height: 400px;
}

.chat-message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background: var(--primary-green);
    color: var(--black);
}

.user-message .message-avatar {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.message-content {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    max-width: 70%;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.bot-message .message-content {
    border: 1px solid rgba(0, 255, 0, 0.2);
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-content {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.chat-quick-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.chat-quick-actions .btn {
    background: rgba(0, 255, 0, 0.1);
    color: var(--primary-green);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.chat-quick-actions .btn:hover {
    background: var(--primary-green);
    color: var(--black);
}

.chat-input-container {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.audio-controls {
    display: flex;
    gap: 0.5rem;
}

.voice-btn,
.speak-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 255, 0, 0.1);
    color: var(--primary-green);
    border: 1px solid rgba(0, 255, 0, 0.3);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-btn:hover,
.speak-btn:hover {
    background: var(--primary-green);
    color: var(--black);
}

.chat-input-container input {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--white);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.chat-input-container input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.chat-input-container input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 2px rgba(0, 255, 0, 0.1);
}

.send-btn {
    background: var(--primary-green);
    color: var(--black);
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.3);
}

/* Estatísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-card {
    background: var(--dark-gray);
    border: 1px solid rgba(0, 255, 0, 0.1);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: rgba(0, 255, 0, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.stat-card h3 {
    color: var(--primary-green);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-card div {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--dark-gray);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    color: var(--white);
    font-weight: 500;
    z-index: 10000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    animation: none;
    transform: none;
    transition: none;
}

.toast.success {
    border-color: rgba(0, 255, 0, 0.5);
    background: rgba(0, 255, 0, 0.1);
    color: var(--primary-green);
}

.toast.error {
    border-color: rgba(255, 0, 0, 0.5);
    background: rgba(255, 0, 0, 0.1);
    color: #ff4444;
}

/* Utilitários */
.hidden {
    display: none !important;
}

/* === RESPONSIVIDADE MOBILE === */
@media (max-width: 768px) {
    .login-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .logo-text {
        font-size: 1.75rem;
    }
    
    .logo-icon {
        font-size: 2rem;
    }
    
    .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .user-info {
        justify-content: space-between;
        width: 100%;
    }
    
    .nav-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
    }
    
    .content-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 600px;
    }
    
    .chat-container {
        margin: 1rem;
        padding: 1rem;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .chat-input-container {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .audio-controls {
        order: 2;
        width: 100%;
        justify-content: center;
    }
    
    .chat-input-container input {
        order: 1;
        width: 100%;
    }
    
    .send-btn {
        order: 3;
        width: 100%;
    }
    
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .modal-actions button {
        width: 100%;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters input,
    .filters select {
        min-width: unset;
        width: 100%;
    }
    
    .toast {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        width: auto;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem 1rem;
    }
    
    .tab-btn {
        font-size: 0.85rem;
        padding: 0.625rem 0.75rem;
    }
    
    .btn-primary {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .nav-btn {
        font-size: 0.85rem;
        padding: 0.625rem 1rem;
    }
    
    .content-header h2 {
        font-size: 1.25rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem 0.375rem;
        font-size: 0.8rem;
    }
    
    .chat-messages {
        max-height: 300px;
    }
    
    .message-content {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Melhorias de acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Scrollbar customizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-gray);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 0, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 0, 0.5);
}

/* Seleção de texto */
::selection {
    background: rgba(0, 255, 0, 0.3);
    color: var(--white);
}

/* Focus states para acessibilidade */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* === EXPERIÊNCIA DE PLANOS E NAVEGAÇÃO === */
.nav-tabs {
    padding: 0.75rem 1rem;
}

.nav-tabs-inner {
    width: min(1200px, 100%);
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.consistency-chart {
    margin: 0.75rem 0;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface-raised);
}

.consistency-chart figcaption {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--gray-text);
    font-size: 0.72rem;
}

.consistency-chart figcaption strong {
    color: var(--white);
}

.consistency-chart ol {
    height: 9rem;
    display: grid;
    grid-template-columns: repeat(8, minmax(2rem, 1fr));
    gap: 0.5rem;
    align-items: end;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.consistency-chart li {
    height: 100%;
    display: grid;
    grid-template-rows: 1rem minmax(0, 1fr) 1rem;
    gap: 0.25rem;
    align-items: end;
    color: var(--gray-text);
    text-align: center;
    font-size: 0.65rem;
}

.consistency-chart li i {
    width: 100%;
    min-height: 3px;
    display: block;
    border-radius: 6px 6px 2px 2px;
    background: var(--action);
}

.consistency-chart li.is-fulfilled i {
    background: var(--success);
}

.consistency-chart li.is-current small {
    color: var(--white);
    font-weight: 800;
}

.consistency-chart--empty {
    min-height: auto;
}

@media (max-width: 520px) {
    .consistency-chart {
        overflow-x: auto;
    }

    .consistency-chart figcaption {
        min-width: 22rem;
        flex-direction: column;
    }

    .consistency-chart ol {
        min-width: 22rem;
    }
}

.nav-btn {
    border-color: rgba(173, 187, 179, 0.18);
}

.nav-btn.active {
    box-shadow: 0 8px 18px rgba(41, 185, 121, 0.22);
}

.content-heading {
    max-width: 680px;
}

.content-kicker,
.plan-type {
    color: var(--primary-green);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.content-heading h2 {
    margin-top: 0.25rem;
}

.content-heading p {
    max-width: 620px;
    margin-top: 0.4rem;
}

.progress-subnav {
    display: flex;
    gap: 0.35rem;
    margin: 0 0 1rem;
    padding-bottom: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.progress-subnav::-webkit-scrollbar { display: none; }

.progress-subnav button {
    min-height: 2.75rem;
    flex: 0 0 auto;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--gray-text);
    background: var(--glass-bg);
}

.progress-subnav button.is-active {
    border-color: rgba(40, 122, 85, 0.35);
    color: var(--primary-green);
    background: rgba(40, 122, 85, 0.1);
}

.plans-grid > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.plan-card,
.plans-empty {
    background: linear-gradient(145deg, rgba(30, 47, 39, 0.92), rgba(17, 29, 24, 0.96));
    border: 1px solid rgba(173, 187, 179, 0.14);
    border-radius: 20px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

.plan-card {
    padding: 1.25rem;
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: 1rem;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.plan-card--clickable {
    cursor: pointer;
}

.plan-card--clickable:focus-visible {
    outline: 2px solid rgba(94, 230, 168, 0.55);
    outline-offset: 2px;
}

.plan-card:hover {
    transform: translateY(-3px);
    border-color: rgba(94, 230, 168, 0.38);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
}

.plan-card__icon,
.plan-summary__icon {
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--primary-green);
    background: rgba(94, 230, 168, 0.1);
    border: 1px solid rgba(94, 230, 168, 0.16);
    font-size: 1.15rem;
}

.plan-card--workout .plan-card__icon,
.workout-summary .plan-summary__icon {
    color: #9bb9ff;
    background: rgba(115, 146, 255, 0.12);
    border-color: rgba(115, 146, 255, 0.2);
}

.plan-card__body { min-width: 0; }

.plan-card__topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.plan-count,
.exercise-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    color: #d3dfd8;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.25rem 0.55rem;
    font-size: 0.75rem;
    white-space: nowrap;
}

.plan-card h3 {
    color: var(--white);
    font-size: 1.08rem;
    line-height: 1.35;
    margin-bottom: 0.4rem;
}

.plan-card p {
    color: var(--gray-text);
    font-size: 0.88rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.plan-date {
    display: block;
    color: #8ea097;
    font-size: 0.76rem;
    margin-top: 0.75rem;
}

.plan-card__actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 0.6rem;
    margin-top: 0.2rem;
}

.btn-view,
.btn-adjust {
    flex: 1;
    border: 1px solid rgba(94, 230, 168, 0.32);
    border-radius: 10px;
    padding: 0.7rem 1rem;
    background: rgba(94, 230, 168, 0.12);
    color: var(--primary-green);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-view:hover,
.btn-adjust:hover { background: var(--primary-green); color: var(--black); }

.plan-delete {
    width: 2.6rem;
    justify-content: center;
    padding: 0;
}

.plans-empty {
    grid-column: 1 / -1;
    padding: 3.5rem 1.5rem;
    text-align: center;
}

.plans-empty > i {
    color: var(--primary-green);
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

.plans-empty h3 { margin-bottom: 0.35rem; }
.plans-empty p { color: var(--gray-text); max-width: 420px; margin: 0 auto 1.25rem; }
.plans-empty .btn-primary { margin: 0 auto; }

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

body.modal-open { overflow: hidden; }

.legal-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    color: var(--text-secondary, #aebdca);
    font-size: 0.78rem;
    line-height: 1.45;
    margin: 0.65rem 0;
}

.legal-check input { width: 1rem; height: 1rem; margin-top: 0.15rem; flex: 0 0 auto; }
.legal-check a { color: var(--primary-green, #65e7a4); }
.account-sheet { max-width: 560px; }
.account-consent-status { color: #9fb6ca; font-size: 0.8rem; margin-bottom: 1rem; }
.account-sheet .field-group input { width: 100%; }
.btn-danger { border: 0; border-radius: 10px; padding: 0.75rem 1rem; color: #fff; background: #b91c1c; font: inherit; font-weight: 800; cursor: pointer; }

.modal-content {
    border-color: rgba(94, 230, 168, 0.2);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.52);
}

.btn-close {
    min-width: 2.75rem;
    min-height: 2.75rem;
    display: grid;
    place-items: center;
}

.plan-modal .modal-content {
    width: min(880px, calc(100vw - 2rem));
    max-width: none;
    max-height: min(88vh, 860px);
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.plan-modal .modal-header {
    flex: 0 0 auto;
    padding: 1.25rem 1.5rem;
    margin: 0;
    background: rgba(8, 17, 14, 0.48);
}

.plan-details-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.plan-modal .modal-actions {
    flex: 0 0 auto;
    margin: 0;
    padding: 1rem 1.5rem;
    background: rgba(8, 17, 14, 0.54);
}

.plan-summary {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
    background: linear-gradient(115deg, rgba(94, 230, 168, 0.1), rgba(94, 230, 168, 0.025));
    border: 1px solid rgba(94, 230, 168, 0.14);
    border-radius: 16px;
}

.plan-current-action {
    display: flex;
    justify-content: flex-end;
    margin: 0.75rem 0;
}

.plan-use-current {
    min-height: 2.75rem;
}

.plan-summary span {
    color: var(--primary-green);
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.plan-summary p { color: #d2ddd6; margin-top: 0.25rem; font-size: 0.9rem; }
.plan-summary small { color: #91a097; font-size: 0.75rem; text-align: right; }

.diet-nutrition-summary {
    padding: 1rem;
    margin: 0 0 1rem;
    border: 1px solid rgba(94, 230, 168, 0.14);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(20, 38, 30, 0.88), rgba(9, 20, 15, 0.9));
}

.plan-details-section > .diet-nutrition-summary {
    margin: 0.8rem 0.8rem 0;
    background: rgba(7, 17, 12, 0.56);
}

.diet-nutrition-summary > header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.diet-nutrition-summary > header span {
    color: var(--primary-green);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.diet-nutrition-summary > header h4 { color: var(--white); margin-top: 0.15rem; }
.diet-nutrition-summary > header small { color: #8fa298; font-size: 0.7rem; }

.diet-nutrition-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
}

.diet-nutrition-stat {
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
}

.diet-nutrition-stat > div { display: flex; align-items: center; gap: 0.4rem; color: #9caf9f; font-size: 0.7rem; }
.diet-nutrition-stat > div i { color: var(--primary-green); }
.diet-nutrition-stat > strong { display: block; margin-top: 0.45rem; color: var(--white); font-size: 1.25rem; line-height: 1; }
.diet-nutrition-stat > strong small { margin-left: 0.2rem; color: #a9b7af; font-size: 0.65rem; font-weight: 600; }
.diet-nutrition-stat > p { margin-top: 0.35rem; overflow: hidden; color: #87998f; font-size: 0.65rem; text-overflow: ellipsis; white-space: nowrap; }
.diet-nutrition-stat.na-meta { border-color: rgba(94, 230, 168, 0.2); background: rgba(94, 230, 168, 0.055); }

.diet-nutrition-progress {
    display: block;
    height: 3px;
    margin-top: 0.55rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
}

.diet-nutrition-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #34b97e, #69e7ae); }

.plan-details-section {
    border: 1px solid rgba(173, 187, 179, 0.12);
    background: rgba(6, 14, 11, 0.22);
    border-radius: 16px;
    overflow: hidden;
    margin-top: 1rem;
}

.plan-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.035);
    color: var(--white);
    font-weight: 700;
}

.plan-section-title > span i { color: var(--primary-green); margin-right: 0.35rem; }
.plan-section-title small { color: var(--gray-text); font-size: 0.75rem; font-weight: 500; }
.meal-list, .exercise-list { padding: 0.8rem; display: grid; gap: 0.7rem; }

.meal-card {
    border-radius: 12px;
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.meal-card__header { display: flex; gap: 0.75rem; }
.meal-card__icon { color: var(--primary-green); padding-top: 0.1rem; }
.meal-card h5, .exercise-card h5 { color: var(--white); font-size: 0.97rem; }
.meal-card__header p { color: var(--gray-text); font-size: 0.86rem; margin-top: 0.2rem; }

.meal-macros {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
    margin-top: 0.85rem;
}

.meal-macros span {
    min-width: 0;
    padding: 0.55rem 0.35rem;
    text-align: center;
    border-radius: 9px;
    background: rgba(94, 230, 168, 0.07);
}

.meal-macros b { display: block; color: var(--white); font-size: 0.85rem; }
.meal-macros small { color: #8fa298; font-size: 0.64rem; }

.plan-note {
    color: #c6d4cc;
    font-size: 0.8rem;
    margin-top: 0.75rem;
    padding: 0.6rem 0.7rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
}

.plan-note i { color: #f0c868; }

.exercise-card {
    display: grid;
    grid-template-columns: 2.2rem 132px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.9rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.exercise-card__number {
    width: 2.2rem;
    height: 2.2rem;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(115, 146, 255, 0.15);
    color: #b8c8ff;
    font-size: 0.82rem;
    font-weight: 800;
}

.exercise-card__image {
    min-height: 112px;
    overflow: hidden;
    border-radius: 10px;
    background: var(--black);
}

.exercise-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 112px;
    object-fit: cover;
}

.exercise-image-placeholder {
    display: grid;
    width: 100%;
    min-height: 112px;
    height: 100%;
    place-items: center;
    color: var(--primary-green);
    background: radial-gradient(circle at 50% 35%, rgba(57, 255, 20, 0.1), transparent 58%), var(--black);
    font-size: 1.45rem;
}

.exercise-card__image > .exercise-image-placeholder {
    min-height: inherit;
}

.replacement-option > .exercise-image-placeholder {
    min-height: 86px;
    border-radius: 10px;
}

.exercise-card__prescription {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin: 0.45rem 0 0.65rem;
}

.exercise-card__prescription strong { color: var(--white); font-size: 1.12rem; }
.exercise-card__prescription small { color: var(--gray-text); font-size: 0.7rem; font-weight: 500; }
.exercise-card__prescription > span { color: #718079; }
.plan-details-empty { padding: 2rem; text-align: center; color: var(--gray-text); }

.precision-high, .precision-moderate, .precision-low {
    display: inline-flex;
    border-radius: 999px;
    padding: 0.15rem 0.45rem;
    font-size: 0.75rem;
    font-weight: 700;
}
.precision-high { color: var(--primary-green); background: rgba(94, 230, 168, 0.12); }
.precision-moderate { color: #f0c868; background: rgba(240, 200, 104, 0.12); }
.precision-low { color: #f09a9a; background: rgba(240, 120, 120, 0.12); }

@media (max-width: 768px) {
    .header { padding: 1rem; }
    .nav-tabs { overflow-x: auto; padding: 0.65rem 1rem; }
    .nav-tabs-inner { width: max-content; justify-content: flex-start; flex-wrap: nowrap; }
    .nav-btn { width: auto; padding: 0.65rem 0.9rem; }
    .tab-content { padding: 1.25rem 1rem 2rem; }
    .content-header { align-items: flex-start; text-align: left; margin-bottom: 1.25rem; }
    .content-header > .btn-secondary { width: 100%; justify-content: center; }
    .plans-grid > div { grid-template-columns: 1fr; }
    .plan-card { padding: 1rem; }
    .plan-card__topline { align-items: flex-start; flex-direction: column; }
    .chat-container { margin: 0; }
    .modal.show { padding: 0; align-items: flex-end; }
    .modal-content { width: 100%; max-height: 92dvh; margin: 0; border-radius: 20px 20px 0 0; }
    .plan-modal .modal-content { width: 100%; max-height: 92dvh; border-radius: 20px 20px 0 0; }
    .plan-modal .modal-header { padding: 1rem 1.1rem; }
    .plan-details-container { padding: 1rem; }
    .plan-modal .modal-actions { padding: 0.85rem 1rem max(0.85rem, env(safe-area-inset-bottom)); }
    .plan-summary { grid-template-columns: auto 1fr; gap: 0.75rem; }
    .plan-summary small { grid-column: 1 / -1; text-align: left; }
    .meal-macros { grid-template-columns: repeat(2, 1fr); }
    .diet-nutrition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .exercise-card { grid-template-columns: 2.2rem 96px minmax(0, 1fr); }
    .exercise-card__image, .exercise-card__image img { min-height: 104px; }
    .modal-actions { margin-top: 1.25rem; }
}

@media (max-width: 480px) {
    .user-info { gap: 0.5rem; }
    .user-info span { width: 100%; }
    .btn-profile, .btn-logout, .btn-admin { flex: 1; justify-content: center; padding: 0.5rem; }
    .plan-card { grid-template-columns: 2.5rem minmax(0, 1fr); gap: 0.75rem; }
    .plan-card__icon { width: 2.5rem; height: 2.5rem; border-radius: 11px; }
    .plan-card__actions { flex-direction: column; }
    .plan-delete { width: 100%; min-height: 2.5rem; }
    .plan-section-title { align-items: flex-start; flex-direction: column; gap: 0.25rem; }
    .diet-nutrition-summary > header { align-items: flex-start; flex-direction: column; gap: 0.2rem; }
    .diet-nutrition-stat { padding: 0.65rem; }
    .exercise-card { grid-template-columns: 2.2rem minmax(0, 1fr); }
    .exercise-card__image { grid-column: 2; min-height: 138px; }
    .exercise-card__image img { min-height: 138px; }
    .exercise-card__content { grid-column: 2; }
}

/* === PLANOS GUIADOS, DIAS E SESSÕES === */
.plan-wizard-modal {
    --plan-accent: #5ee6a8;
    --plan-blue: #8aa9ff;
    --plan-surface: #111d18;
    --plan-surface-raised: #182821;
    background: rgba(2, 8, 6, 0.86);
}

.plan-wizard-modal .plan-wizard {
    width: min(860px, calc(100vw - 2rem));
    max-width: none;
    max-height: min(92vh, 900px);
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(94, 230, 168, 0.24);
    border-radius: 22px;
    background:
        radial-gradient(circle at 10% 0%, rgba(94, 230, 168, 0.08), transparent 34%),
        linear-gradient(150deg, #17251f 0%, #101a16 58%, #0d1713 100%);
}

.plan-wizard > form {
    display: flex;
    flex-direction: column;
    max-height: min(92vh, 900px);
    min-height: min(720px, 88vh);
}

.plan-wizard__header {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.5rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(6, 15, 11, 0.42);
}

.plan-wizard__heading {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.plan-wizard__heading h3 {
    margin-top: 0.15rem;
    color: #f5faf7;
    font-size: clamp(1.15rem, 3vw, 1.45rem);
    line-height: 1.25;
}

.plan-wizard__heading p {
    margin-top: 0.2rem;
    color: #9fb0a7;
    font-size: 0.84rem;
}

.plan-wizard__icon {
    width: 3rem;
    height: 3rem;
    flex: 0 0 3rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(94, 230, 168, 0.22);
    border-radius: 14px;
    color: var(--plan-accent);
    background: rgba(94, 230, 168, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.plan-wizard__icon--workout {
    color: #adc0ff;
    border-color: rgba(138, 169, 255, 0.25);
    background: rgba(138, 169, 255, 0.12);
}

.plan-wizard__header .btn-close,
.replacement-close {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
}

.plan-wizard__progress {
    flex: 0 0 auto;
    padding: 0.85rem 1.5rem 0.65rem;
    background: rgba(5, 13, 10, 0.28);
}

.plan-wizard__steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    list-style: none;
}

.plan-wizard__steps li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 0;
    color: #718078;
}

.plan-wizard__steps li > span {
    width: 1.7rem;
    height: 1.7rem;
    flex: 0 0 1.7rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 800;
    background: #101a16;
}

.plan-wizard__steps small {
    overflow: hidden;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.plan-wizard__steps li.active,
.plan-wizard__steps li.complete {
    color: var(--plan-accent);
}

.plan-wizard__steps li.active > span,
.plan-wizard__steps li.complete > span {
    border-color: rgba(94, 230, 168, 0.38);
    color: #07120d;
    background: var(--plan-accent);
    box-shadow: 0 0 0 4px rgba(94, 230, 168, 0.07);
}

.plan-wizard__track {
    height: 3px;
    margin-top: 0.7rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
}

.plan-wizard__track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #32b87d, var(--plan-accent));
    transition: width 220ms ease;
}

.plan-wizard__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 1.35rem 1.5rem 1.5rem;
    scrollbar-gutter: stable;
}

.plan-wizard__body[aria-busy="true"] {
    opacity: 0.66;
    pointer-events: none;
}

.wizard-step-heading {
    margin-bottom: 1.25rem;
    outline: none;
}

.wizard-step-heading > span {
    color: var(--plan-accent);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.wizard-step-heading h4 {
    margin-top: 0.2rem;
    color: #f4faf6;
    font-size: clamp(1.2rem, 3vw, 1.55rem);
    line-height: 1.25;
}

.wizard-step-heading p {
    max-width: 630px;
    margin-top: 0.35rem;
    color: #9caca3;
    font-size: 0.88rem;
}

.wizard-field,
.wizard-fieldset {
    min-width: 0;
    margin: 0 0 1rem;
}

.wizard-fieldset {
    border: 0;
}

.wizard-field > label,
.wizard-fieldset > legend {
    display: block;
    margin-bottom: 0.5rem;
    color: #dce7e1;
    font-size: 0.83rem;
    font-weight: 700;
}

.wizard-field > label span {
    color: #788b81;
    font-size: 0.72rem;
    font-weight: 500;
}

.wizard-field-hint {
    margin: -0.3rem 0 0.65rem;
    color: #82948a;
    font-size: 0.76rem;
}

.wizard-field input,
.wizard-field select,
.wizard-field textarea {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.72rem 0.85rem;
    border: 1px solid rgba(177, 199, 188, 0.17);
    border-radius: 10px;
    outline: none;
    color: #f5faf7;
    background: rgba(3, 10, 7, 0.46);
    font: inherit;
    font-size: 0.9rem;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.wizard-field textarea {
    min-height: 86px;
    resize: vertical;
}

.wizard-field input::placeholder,
.wizard-field textarea::placeholder {
    color: #607168;
}

.wizard-field input:hover,
.wizard-field select:hover,
.wizard-field textarea:hover {
    border-color: rgba(177, 199, 188, 0.28);
}

.wizard-field input:focus,
.wizard-field select:focus,
.wizard-field textarea:focus {
    border-color: var(--plan-accent);
    background: rgba(3, 10, 7, 0.7);
    box-shadow: 0 0 0 3px rgba(94, 230, 168, 0.11);
}

.wizard-field input[aria-invalid="true"],
.wizard-field select[aria-invalid="true"],
.wizard-field textarea[aria-invalid="true"] {
    border-color: #f18888;
}

.wizard-field-row,
.wizard-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.wizard-field-row > *,
.wizard-field-grid > * {
    min-width: 0;
}

.wizard-choice-grid,
.wizard-check-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
}

.wizard-choice-grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.wizard-check-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wizard-choice,
.wizard-check {
    position: relative;
    display: block;
    min-width: 0;
    cursor: pointer;
}

.wizard-choice--selected {
    grid-column: span 2;
}

.wizard-choice--selected .wizard-choice__surface {
    min-height: 4rem;
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
}

.wizard-choice input,
.wizard-check input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.wizard-choice__surface,
.wizard-check__surface {
    width: 100%;
    max-width: 100%;
    min-height: 3.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(177, 199, 188, 0.14);
    border-radius: 11px;
    color: #b8c6be;
    background: rgba(255, 255, 255, 0.025);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.25;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.wizard-choice__surface > span {
    min-width: 0;
    flex: 1;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.wizard-choice__surface > i,
.wizard-check__surface > i {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 1.15rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    color: transparent;
    font-size: 0.56rem;
}

.wizard-check__surface {
    justify-content: flex-start;
    min-height: 2.75rem;
}

.wizard-check__surface > i {
    border-radius: 4px;
}

.wizard-equipment-details {
    margin-top: 0.75rem;
    padding: 0.8rem;
    border: 1px solid rgba(177, 199, 188, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.wizard-equipment-details > span {
    display: block;
    margin-bottom: 0.6rem;
    color: #b8c6be;
    font-size: 0.76rem;
    font-weight: 700;
}

.wizard-equipment-details .wizard-check-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.wizard-check__surface > span {
    min-width: 0;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.wizard-choice:hover .wizard-choice__surface,
.wizard-check:hover .wizard-check__surface {
    border-color: rgba(94, 230, 168, 0.32);
    color: #ecf6f0;
    transform: translateY(-1px);
}

.wizard-choice input:checked + .wizard-choice__surface,
.wizard-check input:checked + .wizard-check__surface {
    border-color: rgba(94, 230, 168, 0.48);
    color: #eafff3;
    background: rgba(94, 230, 168, 0.11);
    box-shadow: inset 0 0 0 1px rgba(94, 230, 168, 0.06);
}

.wizard-choice input:checked + .wizard-choice__surface > i,
.wizard-check input:checked + .wizard-check__surface > i {
    border-color: var(--plan-accent);
    color: #07120d;
    background: var(--plan-accent);
}

.wizard-choice input:focus-visible + .wizard-choice__surface,
.wizard-check input:focus-visible + .wizard-check__surface {
    outline: 2px solid var(--plan-accent);
    outline-offset: 2px;
}

.wizard-field-error {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    margin-top: 0.42rem;
    color: #ffaaaa;
    font-size: 0.75rem;
    line-height: 1.35;
}

.wizard-character-count {
    display: block;
    margin-top: 0.3rem;
    color: #71847a;
    font-size: 0.7rem;
    text-align: right;
}

.wizard-review {
    margin-top: 0.5rem;
    padding: 1rem;
    border: 1px solid rgba(94, 230, 168, 0.16);
    border-radius: 14px;
    background: linear-gradient(120deg, rgba(94, 230, 168, 0.08), rgba(94, 230, 168, 0.025));
}

.wizard-review__title {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.wizard-review__title > i {
    margin-top: 0.2rem;
    color: var(--plan-accent);
}

.wizard-review__title strong,
.wizard-review__title span {
    display: block;
}

.wizard-review__title strong {
    color: #edf7f1;
    font-size: 0.9rem;
}

.wizard-review__title span {
    margin-top: 0.15rem;
    color: #91a49a;
    font-size: 0.75rem;
}

.wizard-review dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.wizard-review dl > div {
    min-width: 0;
    padding: 0.55rem 0.65rem;
    border-radius: 9px;
    background: rgba(2, 9, 6, 0.32);
}

.wizard-review dt {
    color: #73867c;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.wizard-review dd {
    overflow-wrap: anywhere;
    margin-top: 0.15rem;
    color: #dce8e1;
    font-size: 0.76rem;
}

.plan-wizard__error {
    flex: 0 0 auto;
    margin: 0 1.5rem 0.85rem;
    padding: 0.72rem 0.85rem;
    border: 1px solid rgba(241, 136, 136, 0.34);
    border-radius: 10px;
    color: #ffc1c1;
    background: rgba(193, 57, 57, 0.11);
    font-size: 0.82rem;
}

.plan-wizard__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.5rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(4, 12, 8, 0.58);
}

.plan-wizard__navigation {
    display: flex;
    gap: 0.65rem;
}

.plan-wizard__actions button,
.plan-day-tab,
.start-workout-button,
.finish-workout-button,
.machine-busy-button,
.restore-exercise-button,
.replacement-apply,
.replacement-close,
.plan-wizard-cta,
.plans-empty .btn-primary,
.plans-loading {
    min-height: 2.75rem;
}

.btn-view,
.plan-delete,
.chat-quick-actions .btn {
    min-height: 2.75rem;
}

.plan-delete {
    min-width: 2.75rem;
}

.plan-wizard__actions .btn-primary {
    min-width: 9.5rem;
    margin: 0;
}

.plan-wizard__actions button:disabled,
.start-workout-button:disabled,
.finish-workout-button:disabled,
.restore-exercise-button:disabled,
.replacement-apply:disabled {
    cursor: wait;
    opacity: 0.62;
    transform: none;
}

.plans-loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 180px;
    color: #9db0a6;
    border: 1px solid rgba(173, 187, 179, 0.12);
    border-radius: 18px;
    background: rgba(24, 40, 33, 0.55);
}

.plan-day-tabs {
    display: flex;
    gap: 0.55rem;
    margin: 0 0 1rem;
    padding: 0.2rem 0 0.35rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.plan-day-tab {
    min-width: 112px;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 0.6rem 0.8rem;
    border: 1px solid rgba(173, 187, 179, 0.14);
    border-radius: 11px;
    color: #9aada3;
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
    transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease;
}

.plan-day-tab span {
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.plan-day-tab strong {
    max-width: 180px;
    overflow: hidden;
    margin-top: 0.1rem;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plan-day-tab:hover {
    border-color: rgba(94, 230, 168, 0.32);
    color: #e3eee8;
    transform: translateY(-1px);
}

.plan-day-tab.active {
    border-color: rgba(94, 230, 168, 0.42);
    color: #eafff3;
    background: rgba(94, 230, 168, 0.1);
    box-shadow: inset 0 -2px 0 var(--primary-green);
}

.plan-day-tabs--workout .plan-day-tab:hover,
.plan-day-tabs--workout .plan-day-tab.active {
    border-color: rgba(138, 169, 255, 0.4);
}

.plan-day-tabs--workout .plan-day-tab.active {
    background: rgba(138, 169, 255, 0.11);
    box-shadow: inset 0 -2px 0 #8aa9ff;
}

.meal-card--detailed {
    padding: 1rem;
}

.meal-card--detailed .meal-card__header {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
}

.meal-card__order {
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: #08120e;
    background: #5ee6a8;
    font-size: 0.75rem;
    font-weight: 800;
}

.meal-card__eyebrow {
    display: block;
    color: #71867a;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.meal-prep-time {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    color: #b6c6bd;
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.7rem;
    white-space: nowrap;
}

.meal-items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem 1.25rem;
    margin: 0.85rem 0 0;
    padding: 0.75rem 0.85rem 0.75rem 1.8rem;
    border-radius: 10px;
    color: #d6e1db;
    background: rgba(3, 10, 7, 0.28);
    font-size: 0.82rem;
}

.meal-items li::marker {
    color: #5ee6a8;
}

.meal-description {
    margin-top: 0.75rem;
    color: #d1ddd6;
    font-size: 0.84rem;
}

.meal-macro-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.meal-macro-heading span {
    color: #cad7d0;
    font-size: 0.75rem;
    font-weight: 700;
}

.meal-macro-heading small {
    color: #71837a;
    font-size: 0.65rem;
}

.meal-card--detailed .meal-macros {
    margin-top: 0.4rem;
}

.meal-preparation,
.meal-substitutions {
    margin-top: 0.75rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
}

.meal-preparation strong,
.meal-substitutions > strong {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #dce7e1;
    font-size: 0.76rem;
}

.meal-preparation strong i,
.meal-substitutions > strong i {
    color: #5ee6a8;
}

.meal-preparation p {
    margin-top: 0.35rem;
    color: #a8b7af;
    font-size: 0.78rem;
    white-space: pre-line;
}

.meal-substitutions ul {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.45rem;
    list-style: none;
}

.meal-substitutions li {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #b5c3bb;
    font-size: 0.76rem;
}

.meal-substitutions li span {
    color: #e2ebe6;
    font-weight: 600;
}

.meal-substitutions li i {
    color: #64776d;
    font-size: 0.65rem;
}

.workout-summary__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
}

.workout-summary .workout-summary__meta small {
    padding: 0.2rem 0.45rem;
    border: 1px solid rgba(138, 169, 255, 0.16);
    border-radius: 999px;
    color: #b8c7f5;
    background: rgba(138, 169, 255, 0.07);
    font-size: 0.65rem;
}

.workout-day-panel {
    overflow: hidden;
    border: 1px solid rgba(138, 169, 255, 0.15);
    border-radius: 16px;
    background: rgba(6, 12, 18, 0.22);
}

.workout-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(110deg, rgba(138, 169, 255, 0.1), rgba(138, 169, 255, 0.02));
}

.workout-day-header > div:first-child > span {
    color: #91a9ef;
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.workout-day-header h4 {
    margin-top: 0.1rem;
    color: #f4f7ff;
    font-size: 1.15rem;
}

.workout-day-header p {
    margin-top: 0.2rem;
    color: #9da9b9;
    font-size: 0.8rem;
}

.start-workout-button,
.finish-workout-button,
.machine-busy-button,
.restore-exercise-button,
.replacement-apply {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-radius: 9px;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 750;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.start-workout-button {
    padding: 0.65rem 1rem;
    border: 1px solid rgba(138, 169, 255, 0.38);
    color: #dce5ff;
    background: rgba(138, 169, 255, 0.14);
}

.start-workout-button:hover,
.replacement-apply:hover {
    color: #07101f;
    background: #9bb3ff;
    transform: translateY(-1px);
}

.active-session-bar {
    min-width: 285px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.6rem 0.55rem 0.75rem;
    border: 1px solid rgba(94, 230, 168, 0.22);
    border-radius: 11px;
    background: rgba(94, 230, 168, 0.08);
}

.active-session-bar > div {
    flex: 1;
}

.active-session-bar span,
.active-session-bar small {
    display: block;
}

.active-session-bar span {
    color: #9ff1c8;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.active-session-bar span i {
    margin-right: 0.25rem;
    font-size: 0.45rem;
    animation: sessionPulse 1.8s ease-in-out infinite;
}

.active-session-bar small {
    margin-top: 0.1rem;
    color: #8da097;
    font-size: 0.65rem;
}

@keyframes sessionPulse {
    50% { opacity: 0.35; }
}

.active-workout-dock {
    position: fixed;
    right: 1.1rem;
    bottom: 1.1rem;
    z-index: 700;
    width: min(390px, calc(100vw - 2rem));
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(101, 231, 164, 0.42);
    border-radius: 15px;
    color: #fff;
    text-align: left;
    background: linear-gradient(120deg, rgba(19, 58, 43, 0.98), rgba(11, 27, 35, 0.98));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(101, 231, 164, 0.08);
    backdrop-filter: blur(18px);
    cursor: pointer;
}

.active-workout-dock__pulse {
    position: relative;
    width: 2.65rem;
    height: 2.65rem;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #072016;
    background: #65e7a4;
}

.active-workout-dock__pulse::after {
    content: "";
    position: absolute;
    inset: -0.25rem;
    border: 1px solid rgba(101, 231, 164, 0.5);
    border-radius: 14px;
    animation: sessionPulse 1.8s ease-in-out infinite;
}

.active-workout-dock__copy {
    min-width: 0;
}

.active-workout-dock__copy small,
.active-workout-dock__copy strong {
    display: block;
}

.active-workout-dock__copy small {
    color: #72e2a7;
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.active-workout-dock__copy strong {
    margin-top: 0.08rem;
    overflow: hidden;
    color: #ecf7f1;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.active-workout-dock time {
    color: #fff;
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
    font-weight: 850;
    letter-spacing: 0.035em;
}

.active-workout-dock > i {
    color: #7fa192;
    font-size: 0.7rem;
}

.active-workout-dock:hover {
    border-color: rgba(101, 231, 164, 0.7);
    transform: translateY(-2px);
}

.active-workout-shell {
    position: relative;
    display: grid;
    gap: 0.9rem;
}

.active-workout-toolbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(150px, 0.7fr);
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(79, 141, 255, 0.34);
    border-radius: 14px;
    background: rgba(10, 20, 31, 0.96);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(18px);
}

.active-workout-status span,
.active-workout-status strong,
.active-workout-timer small,
.active-workout-timer time {
    display: block;
}

.active-workout-status span {
    color: #8fb3ff;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.active-workout-status span i {
    margin-right: 0.3rem;
    color: #65e7a4;
    font-size: 0.5rem;
    animation: sessionPulse 1.8s ease-in-out infinite;
}

.active-workout-status strong {
    margin-top: 0.15rem;
    overflow: hidden;
    color: #f2f6ff;
    font-size: 0.92rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.active-workout-timer {
    min-width: 8.5rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 11px;
    text-align: center;
    background: rgba(255, 255, 255, 0.045);
}

.active-workout-timer small {
    color: #8391a3;
    font-size: 0.62rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.active-workout-timer time {
    margin-top: 0.08rem;
    color: #fff;
    font-size: 1.35rem;
    font-variant-numeric: tabular-nums;
    font-weight: 850;
    letter-spacing: 0.045em;
    line-height: 1.1;
}

.active-workout-progress > span {
    display: block;
    margin-bottom: 0.35rem;
    color: #97a5b5;
    font-size: 0.68rem;
    text-align: right;
}

.active-workout-progress > span b {
    color: #dfe8ff;
}

.active-workout-progress > div {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.active-workout-progress > div i {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: linear-gradient(90deg, #397cf0, #69e3a4);
    transition: width 300ms ease;
}

.current-exercise-stage {
    position: relative;
    display: grid;
    grid-template-columns: minmax(300px, 0.92fr) minmax(0, 1.08fr);
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(79, 141, 255, 0.22);
    border-radius: 18px;
    background:
        radial-gradient(circle at 15% 0%, rgba(79, 141, 255, 0.12), transparent 23rem),
        rgba(12, 21, 28, 0.9);
    touch-action: pan-y;
    transition: transform 180ms ease, opacity 180ms ease;
}

.workout-swipe-action {
    position: absolute;
    z-index: 2;
    top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    opacity: 0;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.05em;
    pointer-events: none;
    text-transform: uppercase;
}

.workout-swipe-action--complete {
    right: 1rem;
    color: #65e7a4;
    background: rgba(12, 38, 25, 0.92);
}

.workout-swipe-action--replace {
    left: 1rem;
    color: #9abbff;
    background: rgba(16, 30, 58, 0.92);
}

.current-exercise-stage.is-dragging {
    transform: translateX(var(--swipe-x));
    transition: none;
    user-select: none;
}

.current-exercise-stage.is-swiping-right .workout-swipe-action--complete,
.current-exercise-stage.is-swiping-left .workout-swipe-action--replace {
    opacity: 1;
}

.current-exercise-stage.is-committing-right {
    opacity: 0;
    transform: translateX(120%) rotate(4deg);
}

.current-exercise-stage.is-committing-left {
    opacity: 0;
    transform: translateX(-120%) rotate(-4deg);
}

.workout-swipe-hint {
    display: none;
}

.current-exercise-media {
    min-height: 360px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    background: #f5f5f1;
}

.current-exercise-media > img,
.current-exercise-media > .exercise-image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 360px;
}

.current-exercise-media > img {
    display: block;
    padding: 0.5rem;
    object-fit: contain;
}

.current-exercise-media > img.is-loading {
    opacity: 0;
}

.current-exercise-media > .exercise-media-loading {
    display: none;
    grid-area: 1 / 1;
    color: #555;
}

.current-exercise-media > img {
    grid-area: 1 / 1;
}

.current-exercise-media:has(> img.is-loading) > .exercise-media-loading {
    display: block;
}

.current-exercise-content {
    min-width: 0;
    align-self: center;
}

.current-exercise-kicker {
    display: block;
    margin-bottom: 0.4rem;
    color: #82aaff;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.current-exercise-content h3 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.55rem, 3.1vw, 2.35rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.current-exercise-prescription {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
}

.current-exercise-prescription strong {
    min-width: 5.2rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #fff;
    text-align: center;
    background: rgba(255, 255, 255, 0.045);
    font-size: 1.35rem;
    line-height: 1.1;
}

.current-exercise-prescription strong small {
    display: block;
    margin-top: 0.18rem;
    color: #8795a4;
    font-size: 0.58rem;
    font-weight: 650;
    text-transform: uppercase;
}

.current-exercise-prescription > span {
    color: #657386;
    font-size: 1rem;
}

.current-exercise-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.7rem;
}

.current-exercise-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.32rem 0.55rem;
    border-radius: 999px;
    color: #aebccc;
    background: rgba(255, 255, 255, 0.055);
    font-size: 0.68rem;
}

.current-exercise-meta i,
.current-exercise-note > i {
    color: #82aaff;
}

.current-exercise-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.45rem;
    color: #b5c0ca;
    font-size: 0.75rem;
}

.current-exercise-note strong {
    display: block;
    color: #738291;
    font-size: 0.6rem;
    text-transform: uppercase;
}

.current-exercise-instruction {
    display: flex;
    gap: 0.45rem;
    margin-top: 0.75rem;
    padding: 0.65rem;
    border-left: 3px solid #4f8dff;
    border-radius: 0 9px 9px 0;
    color: #b7c3ce;
    background: rgba(79, 141, 255, 0.07);
    font-size: 0.74rem;
}

.workout-set-entry {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.9rem;
    padding: 0.75rem;
    border: 1px solid rgba(101, 231, 164, 0.16);
    border-radius: 13px;
    background: rgba(101, 231, 164, 0.045);
}

.workout-set-entry__heading,
.workout-set-entry__labels,
.workout-set-row {
    display: grid;
    grid-template-columns: 3.4rem minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 0.55rem;
}

.workout-set-entry__heading {
    grid-template-columns: minmax(0, 1fr) auto;
}

.workout-set-entry__heading small {
    display: block;
    color: #65e7a4;
    font-size: 0.58rem;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.workout-set-entry__heading h4 {
    margin-top: 0.12rem;
    color: #eefaf4;
    font-size: 0.86rem;
}

.workout-set-entry__heading button {
    padding: 0.38rem 0.55rem;
    border: 1px solid rgba(101, 231, 164, 0.3);
    border-radius: 8px;
    color: #9ff0c5;
    background: rgba(101, 231, 164, 0.08);
    font: inherit;
    font-size: 0.66rem;
    font-weight: 800;
    cursor: pointer;
}

.workout-set-entry__labels {
    color: #718279;
    font-size: 0.57rem;
    font-weight: 750;
    text-transform: uppercase;
}

.workout-set-row strong {
    width: 1.8rem;
    height: 1.8rem;
    display: grid;
    place-items: center;
    border-radius: 7px;
    color: #72dfa7;
    background: rgba(101, 231, 164, 0.1);
    font-size: 0.7rem;
}

.workout-set-row label span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.workout-set-row input {
    width: 100%;
    min-height: 2.35rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9px;
    color: #f4f8f6;
    background: rgba(4, 12, 8, 0.68);
    font: inherit;
    font-size: 0.78rem;
}

.workout-set-row input:focus {
    border-color: var(--action);
    outline: 2px solid rgba(59, 130, 246, 0.12);
}

.workout-set-warmup {
    grid-column: 2 / -1;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #91a39a;
    font-size: 0.64rem;
    cursor: pointer;
}

.workout-set-warmup input {
    width: 1rem;
    min-height: 1rem;
    accent-color: var(--action);
}

.workout-set-row .workout-set-warmup span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
}

.workout-set-complete {
    grid-column: 3;
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid rgba(101, 231, 164, 0.28);
    border-radius: 9px;
    color: #9ff0c5;
    background: rgba(101, 231, 164, 0.08);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
}

.workout-set-row.is-complete input {
    border-color: rgba(101, 231, 164, 0.3);
    background: rgba(101, 231, 164, 0.07);
}

.workout-set-row.is-complete > strong,
.workout-set-row.is-complete .workout-set-complete {
    color: #06150e;
    background: #65e7a4;
}

.workout-rest {
    position: sticky;
    z-index: 25;
    top: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(96, 165, 250, 0.42);
    border-radius: 12px;
    background: rgba(5, 18, 36, 0.96);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.workout-rest small,
.workout-rest strong {
    display: block;
}

.workout-rest small {
    color: #9fb6ca;
    font-size: 0.68rem;
    font-weight: 800;
}

.workout-rest strong {
    color: #f7fbff;
    font-size: 1.35rem;
    font-variant-numeric: tabular-nums;
}

.workout-rest__actions {
    display: flex;
    gap: 0.4rem;
}

.workout-rest__actions button {
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9px;
    color: #e5eff8;
    background: rgba(255, 255, 255, 0.07);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
}

.workout-set-entry > p {
    color: #718279;
    font-size: 0.62rem;
}

.current-exercise-actions {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 0.55rem;
    margin-top: 1rem;
}

.complete-exercise-button,
.replace-current-exercise-button,
.finish-workout-link,
.active-workout-finish {
    min-height: 3.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 11px;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}

.complete-exercise-button {
    border: 1px solid rgba(59, 130, 246, 0.42);
    color: #f8fbff;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

.complete-exercise-button:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.replace-current-exercise-button {
    border: 1px solid rgba(114, 159, 255, 0.4);
    color: #b9ceff;
    background: rgba(79, 141, 255, 0.1);
}

.replace-current-exercise-button:hover,
.replace-current-exercise-button[aria-expanded="true"] {
    border-color: rgba(114, 159, 255, 0.68);
    background: rgba(79, 141, 255, 0.18);
}

.current-exercise-actions .restore-exercise-button {
    grid-column: 1 / -1;
}

.complete-exercise-button:disabled,
.replace-current-exercise-button:disabled,
.active-workout-finish:disabled {
    opacity: 0.6;
    cursor: wait;
}

.active-workout-queue {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
}

.active-workout-queue summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0.9rem;
    color: #cbd5df;
    font-size: 0.75rem;
    cursor: pointer;
    list-style: none;
}

.active-workout-queue summary::-webkit-details-marker {
    display: none;
}

.active-workout-queue summary strong {
    color: #75dda7;
    font-size: 0.68rem;
}

.active-workout-queue ol {
    display: grid;
    gap: 0.3rem;
    padding: 0 0.65rem 0.65rem;
    list-style: none;
}

.active-workout-queue li {
    display: grid;
    grid-template-columns: 1.75rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem;
    border-radius: 9px;
    color: #8795a2;
    background: rgba(255, 255, 255, 0.025);
    font-size: 0.72rem;
}

.active-workout-queue li > span {
    width: 1.55rem;
    height: 1.55rem;
    display: grid;
    place-items: center;
    border-radius: 7px;
    color: #8190a0;
    background: rgba(255, 255, 255, 0.055);
    font-size: 0.62rem;
}

.active-workout-queue li.is-current {
    color: #dce7ff;
    background: rgba(79, 141, 255, 0.09);
}

.active-workout-queue li.is-current > span {
    color: #fff;
    background: #397ce9;
}

.active-workout-queue li.is-current small {
    color: #8eb4ff;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
}

.active-workout-queue li.is-complete {
    color: #759185;
    text-decoration: line-through;
}

.active-workout-queue li.is-complete > span {
    color: #072014;
    background: #65d99c;
}

.finish-workout-link {
    min-height: 2.5rem;
    justify-self: center;
    padding: 0.4rem 0.7rem;
    border: 0;
    color: #9b7777;
    background: transparent;
    font-size: 0.68rem;
}

.finish-workout-link:hover {
    color: #ffc0c0;
}

.workout-complete-state {
    min-height: 420px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 1rem;
    padding: 2rem;
    border: 1px solid rgba(101, 231, 164, 0.2);
    border-radius: 18px;
    text-align: center;
    background: radial-gradient(circle at 50% 10%, rgba(101, 231, 164, 0.12), transparent 22rem), rgba(10, 20, 16, 0.86);
}

.workout-complete-state > span {
    width: 4.25rem;
    height: 4.25rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #082016;
    background: #65e7a4;
    box-shadow: 0 0 0 10px rgba(101, 231, 164, 0.08);
    font-size: 1.45rem;
}

.workout-complete-state small {
    color: #65e7a4;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.workout-complete-state h4 {
    margin-top: 0.3rem;
    font-size: 1.5rem;
}

.workout-complete-state p {
    margin-top: 0.3rem;
    color: #91a099;
    font-size: 0.78rem;
}

.active-workout-finish {
    padding: 0.7rem 1.2rem;
    color: #fff;
    border-color: rgba(101, 231, 164, 0.4);
    background: #2dbb72;
}

.completed-workout-summary,
.workout-share-shell {
    display: grid;
    gap: 1rem;
    max-width: 780px;
    margin: 0 auto;
    padding: 1.25rem;
    border: 1px solid rgba(101, 231, 164, 0.18);
    border-radius: 18px;
    background: radial-gradient(circle at 10% 0%, rgba(101, 231, 164, 0.1), transparent 24rem), rgba(10, 20, 16, 0.9);
}

.completed-workout-summary > header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.completed-workout-summary > header > span {
    width: 3.4rem;
    height: 3.4rem;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    color: #082016;
    background: #65e7a4;
    box-shadow: 0 0 0 8px rgba(101, 231, 164, 0.07);
}

.completed-workout-summary header small,
.workout-share-shell header > span {
    color: #65e7a4;
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.completed-workout-summary header h3,
.workout-share-shell header h3 {
    margin-top: 0.14rem;
    color: #fff;
    font-size: clamp(1.45rem, 4vw, 2rem);
}

.completed-workout-summary header p,
.workout-share-shell header p {
    margin-top: 0.2rem;
    color: #8ea097;
    font-size: 0.75rem;
}

.completed-workout-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.65rem;
}

.completed-workout-metrics article {
    display: grid;
    gap: 0.18rem;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
}

.completed-workout-metrics i {
    color: #65e7a4;
    font-size: 0.72rem;
}

.completed-workout-metrics strong {
    color: #fff;
    font-size: 1.15rem;
    font-variant-numeric: tabular-nums;
}

.completed-workout-metrics span {
    color: #7f9188;
    font-size: 0.62rem;
    text-transform: uppercase;
}

.completed-workout-exercises h4 {
    margin-bottom: 0.55rem;
    color: #dce9e2;
    font-size: 0.78rem;
}

.completed-workout-exercises ul {
    display: grid;
    gap: 0.45rem;
    list-style: none;
}

.completed-workout-exercises li,
.workout-share-received {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.035);
}

.completed-workout-exercises li strong,
.completed-workout-exercises li span,
.workout-share-received strong,
.workout-share-received span {
    display: block;
}

.completed-workout-exercises li strong,
.workout-share-received strong {
    color: #e9f2ed;
    font-size: 0.78rem;
}

.completed-workout-exercises li span,
.workout-share-received span {
    margin-top: 0.16rem;
    color: #778980;
    font-size: 0.64rem;
}

.completed-workout-exercises li b {
    color: #9ce9bf;
    font-size: 0.74rem;
    white-space: nowrap;
}

.completed-workout-exercises li.has-personal-record {
    border: 1px solid rgba(255, 198, 74, 0.2);
    background: rgba(255, 198, 74, 0.06);
}

.completed-workout-exercises li em,
.workout-share-card li em {
    margin-left: 0.35rem;
    color: #ffd479;
    font-size: 0.56rem;
    font-style: normal;
    text-transform: uppercase;
}

.completed-workout-exercise-links {
    display: flex !important;
    gap: 0.35rem;
    margin-top: 0.35rem !important;
}

.completed-workout-exercise-links button {
    padding: 0.2rem 0.35rem;
    border: 0;
    border-radius: 6px;
    color: #8fcdae;
    background: rgba(101, 231, 164, 0.07);
    font: inherit;
    font-size: 0.57rem;
    cursor: pointer;
}

.workout-result-highlight,
.workout-weekly-result,
.workout-achievements-result {
    padding: 0.85rem;
    border: 1px solid rgba(255, 198, 74, 0.18);
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(255, 198, 74, 0.08), rgba(101, 231, 164, 0.04));
}

.workout-result-highlight > div,
.workout-achievements-result > div,
.workout-weekly-result > div:first-child {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.workout-result-highlight > div > i,
.workout-achievements-result i {
    color: #ffd479;
    font-size: 1.15rem;
}

.workout-result-highlight small,
.workout-result-highlight strong,
.workout-achievements-result span,
.workout-achievements-result strong,
.workout-achievements-result small {
    display: block;
}

.workout-result-highlight small,
.workout-achievements-result > span,
.workout-weekly-result span {
    color: #b99a5d;
    font-size: 0.6rem;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.workout-result-highlight p {
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    margin-top: 0.5rem;
    color: #dce9e2;
    font-size: 0.7rem;
}

.workout-result-highlight p span {
    color: #baf1d3;
    font-weight: 800;
}

.workout-weekly-result > div:first-child {
    justify-content: space-between;
}

.workout-weekly-result__bar,
.progress-weekly-bar {
    height: 8px;
    margin-top: 0.65rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.workout-weekly-result__bar i,
.progress-weekly-bar i {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: linear-gradient(90deg, #43cc87, #8af1bb);
}

.workout-weekly-result > p {
    margin-top: 0.55rem;
    color: #9eb1a7;
    font-size: 0.68rem;
}

.workout-achievements-result > div {
    margin-top: 0.5rem;
}

.workout-achievements-result small {
    margin-top: 0.1rem;
    color: #8d9d95;
    font-size: 0.62rem;
}

.activities-list,
.activity-date-group,
.activity-date-group > div,
.workout-progress-overview {
    display: grid;
    gap: 0.8rem;
}

.activity-date-group > h3 {
    color: #8fa299;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: capitalize;
}

.activity-history-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
}

.activity-history-card__icon {
    width: 2.7rem;
    height: 2.7rem;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #65e7a4;
    background: rgba(101, 231, 164, 0.09);
}

.activity-history-card span,
.activity-history-card h3,
.activity-history-card p {
    display: block;
}

.activity-history-card > div > span {
    color: #71847a;
    font-size: 0.58rem;
}

.activity-history-card h3 {
    margin-top: 0.12rem;
    color: #eef7f2;
    font-size: 0.9rem;
}

.activity-history-card p {
    margin-top: 0.18rem;
    color: #8fa097;
    font-size: 0.68rem;
}

.activity-history-card .activity-pr {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.35rem;
    color: #ffd479;
    font-weight: 800;
}

.activity-history-card > button {
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 9px;
    color: #91a79c;
    background: rgba(255, 255, 255, 0.045);
    cursor: pointer;
}

.workout-progress-overview {
    margin: 1rem 0;
}

.progress-section-heading span {
    color: #65e7a4;
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.progress-section-heading h3 {
    margin-top: 0.15rem;
    font-size: 1rem;
}

.progress-weekly-card {
    padding: 1rem;
    border: 1px solid rgba(101, 231, 164, 0.18);
    border-radius: 15px;
    background: radial-gradient(circle at 90% 0%, rgba(101, 231, 164, 0.12), transparent 15rem), rgba(10, 20, 16, 0.76);
}

.progress-weekly-card > div > span,
.progress-mini-grid article > span {
    color: #76cfa0;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
}

.progress-weekly-card h3 {
    margin-top: 0.2rem;
    font-size: 1.2rem;
}

.progress-weekly-card p,
.progress-mini-grid p {
    margin-top: 0.2rem;
    color: #83958c;
    font-size: 0.66rem;
}

.progress-weekly-card footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    margin-top: 0.65rem;
    color: #abc0b5;
    font-size: 0.68rem;
}

.progress-weekly-card button,
.progress-weekly-form input {
    min-height: 2.2rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid rgba(59, 130, 246, 0.24);
    border-radius: 8px;
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.07);
    font: inherit;
    font-size: 0.65rem;
}

.progress-weekly-form {
    display: flex;
    gap: 0.45rem;
    margin-top: 0.7rem;
}

.progress-weekly-form input {
    width: 5rem;
    color: #fff;
}

.progress-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.progress-mini-grid article {
    min-width: 0;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.progress-mini-grid article > i {
    margin-bottom: 0.45rem;
    color: #65e7a4;
}

.progress-mini-grid strong {
    display: block;
    margin-top: 0.25rem;
    overflow: hidden;
    color: #e7f1ec;
    font-size: 0.75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.exercise-progress-panel {
    display: grid;
    gap: 0.8rem;
}

.exercise-progress-hero {
    padding: 1rem;
    border-radius: 14px;
    color: #06150d;
    background: linear-gradient(135deg, #78ecad, #43cc87);
}

.exercise-progress-hero small,
.exercise-progress-hero strong {
    display: block;
}

.exercise-progress-hero strong {
    margin-top: 0.2rem;
    font-size: 1.7rem;
}

.exercise-progress-panel ol {
    display: grid;
    gap: 0.4rem;
    list-style: none;
}

.exercise-progress-panel li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
}

.exercise-progress-panel li > i {
    color: #ffd479;
}

.exercise-progress-panel li span {
    display: block;
    color: #84968d;
    font-size: 0.62rem;
}

.workout-share-button,
.completed-workout-close,
.workout-share-shell header button {
    min-height: 2.8rem;
    border-radius: 10px;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
}

.workout-share-button {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    min-height: 4rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(59, 130, 246, 0.42);
    color: #f8fbff;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.24);
    text-align: left;
}

.workout-share-button > i:first-child {
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
}

.workout-share-button span,
.workout-share-button strong,
.workout-share-button small {
    display: block;
}

.workout-share-button strong {
    font-size: 0.88rem;
}

.workout-share-button small {
    margin-top: 0.1rem;
    color: rgba(248, 250, 252, 0.82);
    font-size: 0.63rem;
    font-weight: 700;
}

.workout-share-button:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.workout-save-button {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    min-height: 4rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e9f2ed;
    background: rgba(255, 255, 255, 0.05);
    text-align: left;
}

.workout-save-button > i:first-child {
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #7ceeb1;
}

.workout-save-button span,
.workout-save-button strong,
.workout-save-button small {
    display: block;
}

.workout-save-button strong {
    font-size: 0.88rem;
}

.workout-save-button small {
    margin-top: 0.1rem;
    color: #a9b7b0;
    font-size: 0.63rem;
    font-weight: 700;
}

.workout-save-button:hover {
    border-color: #65e7a4;
    background: rgba(255, 255, 255, 0.09);
    transform: translateY(-1px);
}

.completed-workout-close,
.workout-share-shell header button {
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a9b7b0;
    background: rgba(255, 255, 255, 0.04);
}

.completed-workout-empty,
.workout-share-coming-soon {
    padding: 0.9rem;
    border-radius: 11px;
    color: #82938a;
    background: rgba(255, 255, 255, 0.035);
    font-size: 0.72rem;
    text-align: center;
}

.workout-share-shell header button {
    min-height: 2.25rem;
    margin-bottom: 1rem;
    padding: 0.35rem 0.65rem;
}

.workout-share-received {
    justify-content: flex-start;
}

.workout-share-received > i {
    color: #65e7a4;
    font-size: 1.25rem;
}

.workout-share-shell {
    max-width: 1120px;
}

.workout-share-shell__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.workout-share-shell__actions .btn-secondary {
    min-height: 2.5rem;
    padding: 0.5rem 1rem;
    color: #e9f2ed;
    background: #243b31;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.workout-share-shell__actions .btn-secondary:hover:not(:disabled) {
    background: #2d4a3c;
}

.workout-share-header button {
    justify-self: start;
}

.workout-share-editor {
    display: grid;
    grid-template-columns: minmax(280px, 0.78fr) minmax(340px, 1.22fr);
    align-items: start;
    gap: 1rem;
}

.workout-share-options,
.workout-share-option,
.workout-share-preview {
    display: grid;
    gap: 0.75rem;
}

.workout-share-option,
.workout-share-preview {
    padding: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
}

.workout-share-option__heading,
.workout-share-preview__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.workout-share-option__heading {
    justify-content: flex-start;
}

.workout-share-option__heading > span {
    width: 2.15rem;
    height: 2.15rem;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 9px;
    color: #65e7a4;
    background: rgba(101, 231, 164, 0.1);
}

.workout-share-option h4,
.workout-share-preview h4 {
    color: #eaf4ef;
    font-size: 0.82rem;
}

.workout-share-option p,
.workout-share-preview__heading small {
    margin-top: 0.12rem;
    color: #7d8f86;
    font-size: 0.64rem;
}

.workout-share-preview__heading span {
    display: block;
    color: #65e7a4;
    font-size: 0.58rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.workout-share-photo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.workout-share-photo-actions label,
.workout-share-photo-actions button {
    min-height: 2.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.45rem 0.7rem;
    border-radius: 9px;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
}

.workout-share-photo-actions label,
.workout-share-photo-actions .workout-share-photo-select {
    border: 1px solid rgba(59, 130, 246, 0.32);
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.08);
}

.workout-share-photo-actions button {
    border: 1px solid rgba(255, 145, 145, 0.2);
    color: #dca2a2;
    background: rgba(190, 62, 62, 0.08);
}

.workout-share-exercise-controls {
    display: grid;
    gap: 0.4rem;
    list-style: none;
}

.workout-share-exercise-controls li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.65rem;
    border: 1px solid transparent;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.028);
}

.workout-share-exercise-controls li.is-selected {
    border-color: rgba(59, 130, 246, 0.14);
    background: rgba(59, 130, 246, 0.045);
}

.workout-share-exercise-controls strong,
.workout-share-exercise-controls span {
    display: block;
}

.workout-share-exercise-controls strong {
    color: #dfeae4;
    font-size: 0.72rem;
}

.workout-share-exercise-controls span {
    margin-top: 0.12rem;
    color: #7e9187;
    font-size: 0.62rem;
}

.workout-share-exercise-controls button {
    min-width: 7rem;
    min-height: 2.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    color: #85958d;
    background: rgba(255, 255, 255, 0.035);
    font: inherit;
    font-size: 0.62rem;
    font-weight: 800;
    cursor: pointer;
}

.workout-share-exercise-controls button[aria-pressed="true"] {
    border-color: rgba(101, 231, 164, 0.32);
    color: #9ce9bf;
    background: rgba(101, 231, 164, 0.1);
}

.workout-share-card {
    position: relative;
    isolation: isolate;
    width: min(100%, 320px);
    aspect-ratio: 9 / 16;
    justify-self: center;
    overflow: hidden;
    border: 1px solid rgba(101, 231, 164, 0.15);
    border-radius: 18px;
    color: #fff;
    background: #0a0a0a;
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.45);
}

.workout-share-card--stories {
    background: linear-gradient(180deg, #0f172a, #0b1120);
}

.workout-share-card--stories.is-dark {
    background: linear-gradient(180deg, #0a0a0a, #080808);
}

.workout-share-card__photo,
.workout-share-card__shade {
    position: absolute;
    z-index: -2;
    inset: 0;
    width: 100%;
    height: 100%;
}

.workout-share-card__photo {
    object-fit: cover;
    transform-origin: center center;
    will-change: transform;
}

.workout-share-card__shade {
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(3, 10, 7, 0.38) 0%, rgba(3, 10, 7, 0.5) 30%, rgba(3, 10, 7, 0.94) 82%),
        linear-gradient(90deg, rgba(3, 10, 7, 0.58), transparent 70%);
}

.workout-share-card:not(.has-photo) .workout-share-card__shade {
    background: linear-gradient(180deg, rgba(3, 10, 7, 0.02), rgba(3, 10, 7, 0.58));
}

.workout-share-card__content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: clamp(0.8rem, 3%, 1.2rem);
    padding-bottom: clamp(1.2rem, 4%, 1.6rem);
    pointer-events: none;
}

.workout-share-card__content-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transform-origin: bottom center;
    cursor: default;
    transition: transform 0.1s ease;
    will-change: transform;
    pointer-events: auto;
}

.workout-share-card__kicker {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 0.25rem;
    padding: 0.25rem 0.45rem;
    border: 1px solid rgba(144, 240, 189, 0.3);
    border-radius: 999px;
    color: #b7f5d4;
    background: rgba(5, 22, 14, 0.58);
    font-size: clamp(0.42rem, 1.2vw, 0.52rem);
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.workout-share-card__title {
    margin-top: 0.45rem;
}

.workout-share-card__title h5 {
    max-width: 95%;
    color: #fff;
    font-size: clamp(0.9rem, 3vw, 1.3rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

.workout-share-card__subtitle {
    margin-top: 0.2rem;
    color: rgba(255, 255, 255, 0.55);
    font-size: clamp(0.44rem, 1.3vw, 0.56rem);
    font-weight: 500;
}

.workout-share-card__separator {
    width: 100%;
    height: 1px;
    margin-top: 0.4rem;
    background: rgba(255, 255, 255, 0.1);
}

.workout-share-card__indicators {
    display: flex;
    gap: 0.2rem;
    margin-top: 0.6rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
}

.workout-share-card__indicator {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    text-align: center;
}

.workout-share-card__indicator strong {
    color: #fff;
    font-size: clamp(0.6rem, 1.8vw, 0.78rem);
    font-weight: 800;
}

.workout-share-card__indicator small {
    color: rgba(255, 255, 255, 0.5);
    font-size: clamp(0.4rem, 1.2vw, 0.5rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.workout-share-card__exercise-list {
    display: grid;
    gap: 0.2rem;
    margin-top: 0.35rem;
    list-style: none;
}

.workout-share-card__exercise-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.workout-share-card__exercise-list li span {
    min-width: 0;
    overflow: hidden;
    color: #fff;
    font-size: clamp(0.44rem, 1.3vw, 0.56rem);
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.workout-share-card__exercise-list li em {
    color: #fbbf24;
    font-style: normal;
    font-weight: 800;
}

.workout-share-card__exercise-list li small {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.5);
    font-size: clamp(0.4rem, 1.1vw, 0.5rem);
    font-weight: 600;
}

.workout-share-card__exercise-list .workout-share-card__extra {
    border-bottom: none;
    color: rgba(255, 255, 255, 0.35);
    font-size: clamp(0.4rem, 1.1vw, 0.5rem);
    font-weight: 600;
}

.workout-share-card__empty {
    margin: 0.4rem 0 auto;
    padding: 0.5rem;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #c0cec7;
    background: rgba(3, 10, 7, 0.3);
    font-size: 0.55rem;
    text-align: center;
}

.workout-share-card__footer {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.workout-share-card__footer span {
    color: rgba(52, 211, 153, 0.7);
    font-size: clamp(0.42rem, 1.2vw, 0.52rem);
    font-weight: 700;
    letter-spacing: 0.06em;
}

.workout-share-card__logo {
    max-width: clamp(70px, 22vw, 100px);
    height: auto;
    opacity: 0.85;
    filter: brightness(1.2) drop-shadow(1px 0 0 white) drop-shadow(-1px 0 0 white) drop-shadow(0 1px 0 white) drop-shadow(0 -1px 0 white) drop-shadow(1px 1px 0 white) drop-shadow(-1px 1px 0 white) drop-shadow(1px -1px 0 white) drop-shadow(-1px -1px 0 white);
}

.workout-share-empty {
    padding: 0.7rem;
    border-radius: 9px;
    color: #7e9187;
    background: rgba(255, 255, 255, 0.028);
    font-size: 0.68rem;
    text-align: center;
}

.workout-share-mode-toggle {
    display: flex;
    gap: 0.35rem;
    padding: 0.2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
}

.workout-share-mode-toggle button {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 0.6rem;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #7d8f86;
    background: transparent;
    font: inherit;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.workout-share-mode-toggle button.is-active {
    color: #eaf4ef;
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.25);
}

.workout-share-mode-toggle button:not(.is-active):hover {
    color: #b0c4b8;
    background: rgba(255, 255, 255, 0.04);
}

.workout-share-slider {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.3rem 0;
}

.workout-share-slider label {
    flex: 0 0 auto;
    color: #8ea097;
    font-size: 0.68rem;
    font-weight: 650;
    min-width: 4.5rem;
}

.workout-share-slider input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
}

.workout-share-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--action);
    border: 2px solid #0a0a0a;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.workout-share-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.workout-share-slider input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--action);
    border: 2px solid #0a0a0a;
    cursor: pointer;
}

.workout-share-slider small {
    flex: 0 0 auto;
    color: #93c5fd;
    font-size: 0.62rem;
    font-weight: 700;
    min-width: 2.8rem;
    text-align: right;
}

.finish-workout-button {
    min-height: 2.75rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(255, 150, 150, 0.25);
    color: #ffc0c0;
    background: rgba(190, 62, 62, 0.1);
}

.finish-workout-button:hover {
    border-color: rgba(255, 150, 150, 0.46);
    background: rgba(190, 62, 62, 0.2);
}

.session-loading,
.legacy-plan-badge {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.75rem;
    border-radius: 9px;
    color: #96a4af;
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.73rem;
}

.session-inline-error {
    margin: 0.75rem 0.8rem 0;
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(241, 136, 136, 0.28);
    border-radius: 9px;
    color: #ffc0c0;
    background: rgba(193, 57, 57, 0.09);
    font-size: 0.78rem;
}

.session-inline-error button {
    min-height: 2.75rem;
    margin-left: 0.65rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid currentColor;
    border-radius: 8px;
    color: inherit;
    background: transparent;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.workout-day-panel > .plan-section-title {
    margin-top: 0.25rem;
    background: transparent;
}

.workout-day-panel .session-exercise-card {
    grid-template-columns: 2.2rem 132px minmax(0, 1fr);
    align-items: start;
    border-color: rgba(138, 169, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.workout-day-panel .exercise-card--overridden {
    border-color: rgba(94, 230, 168, 0.25);
    background: linear-gradient(115deg, rgba(94, 230, 168, 0.07), rgba(255, 255, 255, 0.025));
}

.exercise-card__title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.exercise-card__title-row h5 {
    font-size: 1rem;
}

.exercise-card__title-row small {
    display: block;
    margin-top: 0.1rem;
    color: #7f8e99;
    font-size: 0.67rem;
    text-transform: capitalize;
}

.session-override-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.25rem;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    color: #9cf0c5;
    background: rgba(94, 230, 168, 0.11);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.exercise-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.6rem;
}

.exercise-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 999px;
    color: #9daab3;
    background: rgba(255, 255, 255, 0.035);
    font-size: 0.64rem;
}

.exercise-meta i {
    color: #8aa9ff;
}

.exercise-guidance {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin-top: 0.38rem;
    color: #abb7bf;
    font-size: 0.72rem;
}

.exercise-guidance > i {
    width: 1rem;
    padding-top: 0.15rem;
    color: #8aa9ff;
    text-align: center;
}

.exercise-guidance span,
.exercise-guidance strong {
    display: block;
}

.exercise-guidance strong {
    margin-bottom: 0.05rem;
    color: #73818a;
    font-size: 0.61rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.exercise-session-actions {
    grid-column: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.1rem;
}

.machine-busy-button,
.restore-exercise-button {
    padding: 0.55rem 0.75rem;
}

.machine-busy-button {
    border: 1px solid rgba(240, 200, 104, 0.28);
    color: #efd78f;
    background: rgba(240, 200, 104, 0.08);
}

.machine-busy-button:hover,
.machine-busy-button[aria-expanded="true"] {
    border-color: rgba(240, 200, 104, 0.48);
    background: rgba(240, 200, 104, 0.15);
}

.restore-exercise-button {
    border: 1px solid rgba(94, 230, 168, 0.24);
    color: #9cecc3;
    background: rgba(94, 230, 168, 0.07);
}

.restore-exercise-button:hover {
    border-color: rgba(94, 230, 168, 0.43);
    background: rgba(94, 230, 168, 0.13);
}

.replacement-panel {
    grid-column: 1 / -1;
    margin-top: 0.35rem;
    padding: 0.9rem;
    border: 1px solid rgba(240, 200, 104, 0.18);
    border-radius: 12px;
    outline: none;
    background: linear-gradient(140deg, rgba(44, 39, 22, 0.52), rgba(10, 16, 13, 0.72));
}

.replacement-panel:focus {
    box-shadow: 0 0 0 2px rgba(240, 200, 104, 0.16);
}

.replacement-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.7rem;
}

.replacement-panel__header span {
    color: #d4b85e;
    font-size: 0.61rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.replacement-panel__header h6 {
    margin-top: 0.1rem;
    color: #f2eee0;
    font-size: 0.93rem;
}

.replacement-panel__header p {
    margin-top: 0.1rem;
    color: #9f9a88;
    font-size: 0.72rem;
}

.replacement-close {
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    color: #aaa490;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.replacement-close:hover {
    color: #f1d779;
    background: rgba(240, 200, 104, 0.1);
}

.replacement-panel .session-inline-error {
    margin: 0 0 0.7rem;
}

.replacement-message {
    margin-bottom: 0.6rem;
    color: #b9b19a;
    font-size: 0.75rem;
}

.replacement-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.replacement-option {
    min-width: 0;
    display: grid;
    grid-template-rows: 92px 1fr auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
}

.replacement-option > img {
    width: 100%;
    height: 92px;
    object-fit: cover;
    background: #050907;
}

.replacement-option__body {
    min-width: 0;
    padding: 0.65rem 0.7rem;
}

.replacement-option__body h6 {
    overflow-wrap: anywhere;
    color: #f2f1e9;
    font-size: 0.8rem;
}

.replacement-option__body p {
    margin-top: 0.25rem;
    color: #9d9c92;
    font-size: 0.67rem;
    line-height: 1.4;
}

.replacement-option__body span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.45rem;
    color: #c3bdac;
    font-size: 0.64rem;
}

.replacement-option__body span i {
    color: #d9bd62;
}

.replacement-apply {
    width: calc(100% - 1rem);
    margin: 0 0.5rem 0.5rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid rgba(138, 169, 255, 0.3);
    color: #d6e0ff;
    background: rgba(138, 169, 255, 0.11);
}

.replacement-panel__loading,
.replacement-empty {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #b6ad92;
    font-size: 0.78rem;
}

@media (max-width: 768px) {
    .plan-wizard-modal.show {
        align-items: stretch;
        padding: 0;
    }

    .plan-wizard-modal .plan-wizard {
        width: 100%;
        height: 100dvh;
        max-height: none;
        margin: 0;
        border-width: 0;
        border-radius: 0;
    }

    .plan-wizard > form {
        width: 100%;
        height: 100dvh;
        min-height: 0;
        max-height: none;
    }

    .plan-wizard__header {
        padding: max(0.9rem, env(safe-area-inset-top)) 1rem 0.85rem;
    }

    .plan-wizard__heading {
        align-items: flex-start;
    }

    .plan-wizard__icon {
        width: 2.65rem;
        height: 2.65rem;
        flex-basis: 2.65rem;
    }

    .plan-wizard__progress {
        padding: 0.7rem 1rem 0.55rem;
    }

    .plan-wizard__body {
        padding: 1.1rem 1rem 1.35rem;
    }

    .plan-wizard__error {
        margin: 0 1rem 0.65rem;
    }

    .plan-wizard__actions {
        padding: 0.75rem 1rem max(0.75rem, env(safe-area-inset-bottom));
    }

    .wizard-field-row,
    .wizard-field-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .wizard-choice-grid,
    .wizard-check-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wizard-review dl {
        grid-template-columns: 1fr;
    }

    .plan-day-tabs {
        margin-right: -1rem;
        padding-right: 1rem;
    }

    .meal-items {
        grid-template-columns: 1fr;
    }

    .workout-day-header {
        align-items: stretch;
        flex-direction: column;
    }

    .start-workout-button,
    .active-session-bar {
        width: 100%;
    }

    .active-session-bar {
        min-width: 0;
    }

    .replacement-options {
        grid-template-columns: 1fr;
    }

    .replacement-option {
        grid-template-columns: 100px minmax(0, 1fr) auto;
        grid-template-rows: auto;
        align-items: stretch;
    }

    .replacement-option > img {
        height: 100%;
        min-height: 116px;
    }

    .replacement-apply {
        width: auto;
        min-width: 96px;
        margin: 0.5rem 0.5rem 0.5rem 0;
        align-self: center;
    }
}

@media (max-width: 480px) {
    .plan-wizard__steps li {
        gap: 0.25rem;
    }

    .plan-wizard__steps small {
        font-size: 0.6rem;
    }

    .plan-wizard__actions {
        gap: 0.5rem;
    }

    .plan-wizard__actions > .btn-secondary {
        display: none;
    }

    .plan-wizard__navigation {
        width: 100%;
    }

    .plan-wizard__navigation button {
        flex: 1;
    }

    .wizard-choice-grid,
    .wizard-check-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .plan-summary.workout-summary {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .workout-day-panel .session-exercise-card {
        grid-template-columns: 2rem minmax(0, 1fr);
    }

    .workout-day-panel .exercise-card__number {
        width: 2rem;
        height: 2rem;
    }

    .workout-day-panel .exercise-card__image,
    .workout-day-panel .exercise-card__content,
    .exercise-session-actions {
        grid-column: 2;
    }

    .workout-day-panel .exercise-card__image,
    .workout-day-panel .exercise-card__image img {
        min-height: 145px;
    }

    .exercise-session-actions {
        flex-direction: column;
    }

    .machine-busy-button,
    .restore-exercise-button {
        width: 100%;
    }

    .replacement-panel {
        grid-column: 1 / -1;
        padding: 0.75rem;
    }

    .replacement-option {
        grid-template-columns: 78px minmax(0, 1fr);
    }

    .replacement-option > img {
        min-height: 100px;
    }

    .replacement-apply {
        grid-column: 1 / -1;
        width: calc(100% - 1rem);
        margin: 0 0.5rem 0.5rem;
    }

    .meal-card--detailed .meal-card__header {
        grid-template-columns: 2rem minmax(0, 1fr);
    }

    .meal-prep-time {
        grid-column: 2;
        width: max-content;
    }

    .meal-substitutions li {
        align-items: flex-start;
        flex-wrap: wrap;
    }
}

/* === MOBILE-FIRST PREMIUM REDESIGN === */
:root {
    color-scheme: dark;
    --primary-green: #3b82f6;
    --dark-green: #1d4ed8;
    --app-blue: #4f8dff;
    --app-blue-soft: #82adff;
    --black: #050b08;
    --dark-gray: #0d1713;
    --light-gray: #14211c;
    --white: #f4f8f6;
    --gray-text: #91a099;
    --muted-text: #68766f;
    --surface: #101a16;
    --surface-raised: #15221d;
    --surface-soft: #192620;
    --border: rgba(202, 224, 213, 0.11);
    --border-strong: rgba(202, 224, 213, 0.2);
    --green-soft: rgba(45, 212, 191, 0.12);
    --blue-soft: rgba(79, 141, 255, 0.12);
    --danger: #ff6b6b;
    --warning: #f3c563;
    --shadow-light: rgba(0, 0, 0, 0.18);
    --shadow-medium: rgba(0, 0, 0, 0.32);
    --shadow-heavy: rgba(0, 0, 0, 0.55);
    --border-radius: 16px;
    --transition: 180ms ease;
}

html {
    min-width: 320px;
    background: #050b08;
    scroll-behavior: smooth;
}

body {
    min-height: 100dvh;
    overflow-x: hidden;
    color: var(--white);
    background:
        radial-gradient(circle at 10% -10%, rgba(38, 148, 95, 0.16), transparent 32rem),
        radial-gradient(circle at 100% 18%, rgba(29, 86, 66, 0.1), transparent 28rem),
        #07100c;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--primary-green);
    outline-offset: 3px;
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 3000;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    color: #06100b;
    background: var(--primary-green);
    font-weight: 800;
    transform: translateY(-160%);
    transition: transform var(--transition);
}

.skip-link:focus {
    transform: translateY(0);
}

/* Auth */
.auth-modal-content {
    position: relative;
    max-width: 440px;
    padding: 0;
}

.auth-modal-close {
    position: absolute;
    z-index: 2;
    top: 0.85rem;
    right: 0.85rem;
}

.login-card {
    padding: 2rem 1.35rem 1.5rem;
    border: 1px solid var(--border-strong);
    border-radius: 26px;
    background: rgba(13, 23, 19, 0.9);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48), inset 0 1px rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(24px);
}

.login-card:hover {
    border-color: var(--border-strong);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48), inset 0 1px rgba(255, 255, 255, 0.04);
}

.login-header {
    margin-bottom: 1.75rem;
}

.logo-container {
    gap: 0.65rem;
}

.brand-mark {
    width: 2.65rem;
    height: 2.65rem;
    flex: 0 0 2.65rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(98, 230, 154, 0.28);
    border-radius: 13px;
    color: #07110c;
    background: linear-gradient(145deg, #78efa9, #3fbe7b);
    box-shadow: 0 10px 24px rgba(48, 183, 113, 0.22), inset 0 1px rgba(255, 255, 255, 0.34);
}

.logo-icon {
    color: inherit;
    font-size: 1.2rem;
    text-shadow: none;
}

.logo-text {
    font-size: 1.75rem;
    letter-spacing: -0.045em;
}

.login-subtitle {
    margin-top: 0.35rem;
    color: var(--gray-text);
    font-size: 0.9rem;
}

.login-tabs {
    margin-bottom: 1.5rem;
    padding: 0.28rem;
    border: 1px solid rgba(255, 255, 255, 0.045);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.28);
}

.auth-choice-panel {
    display: grid;
    gap: 0.75rem;
}

.auth-choice-button {
    width: 100%;
    min-height: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(98, 230, 154, 0.22);
    border-radius: 12px;
    color: #07100b;
    background: var(--primary-green);
    font-weight: 800;
}

.auth-choice-button--secondary {
    color: var(--white);
    background: rgba(255, 255, 255, 0.06);
}

.auth-choice-button--google {
    color: var(--white);
    background: #111827;
}

body[data-auth-required="true"] .auth-modal-close,
body[data-onboarding-required="true"] #profileModal .btn-close,
body[data-onboarding-required="true"] #profileSkipButton {
    display: none;
}

.tab-btn {
    min-height: 2.7rem;
    border-radius: 9px;
    color: #839089;
    font-size: 0.84rem;
}

.tab-btn.active {
    color: #07100b;
    background: var(--primary-green);
    box-shadow: 0 6px 18px rgba(53, 187, 116, 0.22);
}

.auth-form {
    gap: 1rem;
}

.guest-auth-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guest-auth-actions .btn-primary,
.guest-auth-actions .btn-secondary {
    min-height: 2.5rem;
    padding: 0.55rem 0.8rem;
    font-size: 0.78rem;
}

.guest-presentation {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
}

.guest-presentation > i {
    width: 2.8rem;
    height: 2.8rem;
    flex: 0 0 2.8rem;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--primary-green);
    background: rgba(98, 230, 154, 0.1);
}

.guest-presentation > div {
    flex: 1;
}

.guest-presentation strong {
    display: block;
    margin-bottom: 0.2rem;
}

.guest-presentation p {
    color: var(--gray-text);
    font-size: 0.8rem;
}

.guest-presentation--standalone {
    min-height: 180px;
    margin-top: 1rem;
}

.home-onboarding-summary {
    display: grid;
    gap: 0.8rem;
    margin-bottom: 0.9rem;
    padding: 1rem;
    border: 1px solid rgba(98, 230, 154, 0.18);
    border-radius: 14px;
    background: rgba(98, 230, 154, 0.08);
}

.home-onboarding-summary strong {
    font-size: 0.98rem;
}

.home-onboarding-summary p {
    color: var(--gray-text);
    font-size: 0.85rem;
    line-height: 1.5;
}

.home-onboarding-summary__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.home-onboarding-summary__actions button {
    min-height: 2.6rem;
    padding: 0.55rem 0.8rem;
    border-radius: 10px;
}

.plan-wizard-cta small {
    padding: 0.15rem 0.35rem;
    border-radius: 999px;
    color: inherit;
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.6rem;
    text-transform: uppercase;
}

@media (max-width: 560px) {
    .guest-auth-actions .btn-secondary { display: none; }
    .guest-presentation { align-items: flex-start; flex-wrap: wrap; }
    .guest-presentation .btn-primary { width: 100%; }
}

/* Shared controls */
.form-group {
    gap: 0.4rem;
}

.form-group label {
    color: #a9b6af;
    font-size: 0.78rem;
    font-weight: 650;
}

.form-group label i {
    color: var(--primary-green);
}

.form-group input,
.form-group select,
.form-group textarea,
.filters input,
.filters select {
    width: 100%;
    min-height: 3rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: none;
    color: var(--white);
    background: rgba(3, 9, 6, 0.46);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.filters input:focus,
.filters select:focus {
    border-color: rgba(98, 230, 154, 0.64);
    background: rgba(3, 9, 6, 0.72);
    box-shadow: 0 0 0 3px rgba(98, 230, 154, 0.1);
}

.btn-primary,
.btn-secondary,
.btn-add,
.btn-edit,
.btn-delete,
.btn-view {
    min-height: 2.8rem;
    border-radius: 10px;
    font-weight: 750;
    letter-spacing: -0.01em;
}

.btn-primary,
.btn-add {
    border: 1px solid rgba(59, 130, 246, 0.34);
    color: #f8fbff;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.2), inset 0 1px rgba(255, 255, 255, 0.28);
}

.btn-primary {
    margin-top: 0;
}

.btn-primary--blue {
    border-color: rgba(117, 166, 255, 0.4);
    color: #f7f9ff;
    background: linear-gradient(135deg, #568fff, #3071e8);
    box-shadow: 0 10px 25px rgba(40, 102, 220, 0.25), inset 0 1px rgba(255, 255, 255, 0.25);
}

.btn-secondary {
    border: 1px solid var(--border-strong);
    color: #bdc8c2;
    background: rgba(255, 255, 255, 0.055);
}

.btn-delete {
    color: #ff9c9c;
    background: rgba(255, 107, 107, 0.09);
}

.message,
.modal-message {
    min-height: 0;
    margin-top: 0.75rem;
    padding: 0;
    border: 0;
    border-radius: 10px;
    font-size: 0.8rem;
}

.message:not(:empty),
.modal-message:not(:empty) {
    padding: 0.7rem 0.8rem;
}

.message.info,
.modal-message.info {
    color: #b9d0ff;
    background: rgba(79, 141, 255, 0.1);
    border: 1px solid rgba(79, 141, 255, 0.22);
}

/* Application shell */
#mainScreen {
    min-height: 100dvh;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 300;
    height: calc(4.25rem + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    box-sizing: border-box;
    border-bottom: 1px solid rgba(205, 230, 217, 0.07);
    background: rgba(7, 16, 12, 0.82);
    backdrop-filter: blur(22px) saturate(140%);
}

.app-header__inner {
    width: min(1240px, 100%);
    height: 4.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--white);
    text-decoration: none;
}

.app-brand .brand-mark {
    width: 2.25rem;
    height: 2.25rem;
    flex-basis: 2.25rem;
    border-radius: 11px;
    font-size: 0.92rem;
}

.app-brand > span:last-child {
    display: flex;
    flex-direction: column;
}

.app-brand strong {
    font-size: 0.98rem;
    letter-spacing: -0.035em;
}

.app-brand small {
    color: var(--muted-text);
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.app-version {
    display: inline-block;
    margin-left: 0.35rem;
    color: #93c5fd;
    font-size: 0.62em;
    font-weight: 700;
    letter-spacing: 0.02em;
    vertical-align: middle;
}

.app-header__actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.header-icon-button,
.round-action,
.icon-add-button,
.filter-reset,
.back-button,
.entry-action {
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    color: #afbbb5;
    background: rgba(255, 255, 255, 0.045);
    cursor: pointer;
}

.header-icon-button {
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 50%;
}

.user-initial {
    width: 1.85rem;
    height: 1.85rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #07110c;
    background: linear-gradient(145deg, #79eca9, #3eba78);
    font-size: 0.72rem;
    font-weight: 800;
}

.app-shell {
    min-height: calc(100dvh - 4.25rem);
}

.app-content {
    width: 100%;
    min-width: 0;
    padding-bottom: calc(6.2rem + env(safe-area-inset-bottom));
}

.tab-content {
    width: min(100%, 760px);
    max-width: none;
    margin: 0 auto;
    padding: 1.1rem 0.9rem 2rem;
}

.nav-tabs {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 600;
    padding: 0;
    border: 0;
    border-top: 1px solid rgba(210, 232, 221, 0.1);
    background: rgba(8, 16, 12, 0.92);
    box-shadow: 0 -12px 34px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(24px) saturate(140%);
}

.nav-tabs-inner {
    width: min(100%, 620px);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    margin: 0 auto;
    padding: 0.4rem 0.35rem max(0.4rem, env(safe-area-inset-bottom));
}

.nav-btn {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 3.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.24rem;
    padding: 0.35rem 0.15rem;
    border: 0;
    border-radius: 12px;
    color: #78867f;
    background: transparent;
    box-shadow: none;
    font-size: 0.65rem;
    font-weight: 650;
    cursor: pointer;
}

.nav-btn > i {
    font-size: 1rem;
}

.nav-btn.active {
    border: 0;
    color: var(--primary-green);
    background: linear-gradient(to bottom, rgba(98, 230, 154, 0.1), transparent);
    box-shadow: inset 0 2px var(--primary-green);
}

.nav-btn.is-locked {
    color: #66716b;
}

.premium-nav-dot {
    position: absolute;
    top: 0.55rem;
    right: calc(50% - 0.9rem);
    width: 0.36rem;
    height: 0.36rem;
    border-radius: 50%;
    background: var(--warning);
    box-shadow: 0 0 0 2px #09130f;
}

.nav-btn:not(.is-locked) .premium-nav-dot {
    display: none;
}

/* Dashboard */
.home-greeting {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    margin: 0.1rem 0 1rem;
}

.home-greeting__avatar,
.profile-avatar {
    position: relative;
    display: grid;
    place-items: center;
    border: 1px solid rgba(98, 230, 154, 0.25);
    border-radius: 50%;
    color: #07110c;
    background: linear-gradient(145deg, #77eca8, #39b873);
    box-shadow: 0 8px 24px rgba(38, 164, 94, 0.2);
    font-weight: 800;
}

.home-greeting__avatar {
    width: 3rem;
    height: 3rem;
}

.online-dot {
    position: absolute;
    right: 0.05rem;
    bottom: 0.1rem;
    width: 0.66rem;
    height: 0.66rem;
    border: 2px solid #08110d;
    border-radius: 50%;
    background: var(--primary-green);
}

.eyebrow,
.content-kicker,
.plan-type {
    display: block;
    color: var(--primary-green);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.095em;
    text-transform: uppercase;
}

.content-kicker--blue {
    color: var(--app-blue-soft);
}

.home-greeting h1 {
    margin-top: 0.05rem;
    color: var(--white);
    font-size: 1.25rem;
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.home-greeting p {
    margin-top: 0.12rem;
    color: var(--gray-text);
    font-size: 0.72rem;
}

.home-assistant-button {
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    margin-left: auto;
    border: 1px solid rgba(98, 230, 154, 0.24);
    border-radius: 50%;
    color: var(--primary-green);
    background: rgba(98, 230, 154, 0.08);
}

.chat-header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.billing-payment-sheet {
    max-width: 34rem;
}

.billing-payment-options {
    display: grid;
    gap: 0.75rem;
}

.billing-payment-options > button {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.875rem;
    align-items: center;
    width: 100%;
    min-height: 4.5rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: inherit;
    text-align: left;
    background: var(--surface-raised);
}

.billing-payment-options > button > span {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--primary-green);
    background: var(--green-soft);
}

.billing-payment-options > button div {
    display: grid;
    gap: 0.2rem;
}

.billing-payment-options small {
    color: var(--gray-text);
}

.round-action,
.icon-add-button,
.filter-reset,
.back-button {
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 50%;
}

.daily-summary,
.diary-panel,
.profile-hero,
.profile-menu,
.chat-container {
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 52%),
        rgba(14, 24, 20, 0.88);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.16), inset 0 1px rgba(255, 255, 255, 0.025);
}

.daily-summary {
    padding: 0.9rem;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.section-heading h2 {
    margin-top: 0.12rem;
    color: var(--white);
    font-size: 0.95rem;
    letter-spacing: -0.025em;
}

.section-heading--compact {
    margin-bottom: 0.65rem;
}

.text-button {
    padding: 0.35rem 0;
    border: 0;
    color: #7ddfa7;
    background: none;
    font-size: 0.66rem;
    font-weight: 750;
    cursor: pointer;
}

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

.macro-card {
    position: relative;
    min-width: 0;
    padding: 0.62rem 0.35rem 0.48rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.065);
    border-radius: 12px;
    text-align: center;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
}

.macro-card__icon {
    width: 1.55rem;
    height: 1.55rem;
    display: grid;
    place-items: center;
    margin: 0 auto 0.35rem;
    border-radius: 50%;
    color: var(--primary-green);
    background: rgba(98, 230, 154, 0.1);
    font-size: 0.68rem;
}

.macro-card--protein .macro-card__icon {
    color: #7ba8ff;
    background: rgba(79, 141, 255, 0.11);
}

.macro-card--carbs .macro-card__icon {
    color: #f1c75e;
    background: rgba(241, 199, 94, 0.11);
}

.macro-card--fat .macro-card__icon {
    color: #b58aff;
    background: rgba(181, 138, 255, 0.11);
}

.macro-card strong,
.macro-card small,
.macro-card b {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.macro-card strong {
    font-size: clamp(0.72rem, 3.4vw, 0.98rem);
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.macro-card small {
    margin-top: 0.1rem;
    color: #68766f;
    font-size: clamp(0.48rem, 2vw, 0.58rem);
}

.macro-card b {
    margin-top: 0.25rem;
    color: #aebbb4;
    font-size: clamp(0.5rem, 2.1vw, 0.62rem);
    font-weight: 650;
}

.macro-progress {
    height: 3px;
    display: block;
    margin-top: 0.45rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
}

.macro-progress i {
    width: 0;
    height: 100%;
    display: block;
    border-radius: inherit;
    background: var(--primary-green);
    transition: width 420ms ease;
}

.macro-card--protein .macro-progress i { background: #5f96ff; }
.macro-card--carbs .macro-progress i { background: #e5b83f; }
.macro-card--fat .macro-progress i { background: #a36cf0; }

.diary-panel {
    margin-top: 0.8rem;
    padding: 0.9rem;
}

.compact-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 0.45rem;
    margin: 0 0 0.7rem;
    padding: 0;
    border: 0;
    background: none;
}

.compact-filters label {
    min-width: 0;
}

.compact-filters label > span {
    display: block;
    margin: 0 0 0.18rem 0.15rem;
    color: var(--muted-text);
    font-size: 0.56rem;
    font-weight: 700;
    text-transform: uppercase;
}

.compact-filters input {
    min-width: 0;
    min-height: 2.45rem;
    padding: 0.5rem 0.55rem;
    color-scheme: dark;
    font-size: 0.7rem;
}

.compact-filters .filter-reset {
    width: 2.45rem;
    height: 2.45rem;
    align-self: end;
    border-radius: 10px;
}

.meal-entry-list,
.measurement-list {
    display: grid;
    gap: 0.45rem;
}

.diary-meal-card {
    display: grid;
    grid-template-columns: 2.35rem minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    padding: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.028);
    transition: border-color var(--transition), background var(--transition);
}

.diary-meal-card__icon {
    width: 2.35rem;
    height: 2.35rem;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: var(--primary-green);
    background: var(--green-soft);
    font-size: 0.82rem;
}

.diary-meal-card__content {
    min-width: 0;
}

.diary-meal-card__content > div:first-child {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.diary-meal-card__content strong {
    overflow: hidden;
    font-size: 0.76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.diary-meal-card__content time {
    color: #59665f;
    font-size: 0.54rem;
    white-space: nowrap;
}

.diary-meal-card__content p {
    overflow: hidden;
    margin-top: 0.1rem;
    color: #8d9a94;
    font-size: 0.64rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.diary-meal-card__macros {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.24rem;
}

.diary-meal-card__macros span {
    color: #64726b;
    font-size: 0.52rem;
}

.diary-meal-card__energy {
    text-align: right;
}

.diary-meal-card__energy strong,
.diary-meal-card__energy small {
    display: block;
}

.diary-meal-card__energy strong {
    font-size: 0.76rem;
}

.diary-meal-card__energy small {
    color: #68766f;
    font-size: 0.52rem;
}

.entry-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.diary-meal-card .entry-actions {
    flex-direction: column;
}

.entry-action {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 7px;
    font-size: 0.62rem;
}

.entry-action--danger {
    color: #e98f8f;
}

.dashboard-add {
    width: 100%;
    margin-top: 0.65rem;
    justify-content: center;
}

.quick-grid {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.8rem;
}

.quick-grid > button,
.profile-menu > button {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--white);
    text-align: left;
    background: rgba(16, 27, 22, 0.8);
    cursor: pointer;
}

.quick-grid > button > span,
.profile-menu > button > span {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: var(--primary-green);
    background: var(--green-soft);
}

.quick-grid > button:nth-child(2) > span {
    color: var(--app-blue-soft);
    background: var(--blue-soft);
}

.quick-grid strong,
.quick-grid small,
.profile-menu strong,
.profile-menu small {
    display: block;
}

.quick-grid strong,
.profile-menu strong {
    font-size: 0.75rem;
}

.quick-grid small,
.profile-menu small {
    margin-top: 0.08rem;
    color: var(--gray-text);
    font-size: 0.62rem;
}

.quick-grid > button > i,
.profile-menu > button > i {
    color: #59665f;
    font-size: 0.65rem;
}

/* Section headers and plan lists */
.content-header {
    align-items: flex-end;
    margin: 0.2rem 0 1rem;
    gap: 0.85rem;
}

.content-heading {
    min-width: 0;
}

.content-heading h2 {
    margin-top: 0.18rem;
    color: var(--white);
    font-size: clamp(1.35rem, 6vw, 1.75rem);
    line-height: 1.15;
    letter-spacing: -0.045em;
}

.content-heading p {
    margin-top: 0.35rem;
    color: var(--gray-text);
    font-size: 0.74rem;
}

.content-header .plan-wizard-cta {
    width: 100%;
    justify-content: center;
}

.back-button {
    width: 2.2rem;
    height: 2.2rem;
    margin-bottom: 0.65rem;
    border-radius: 10px;
}

.plan-filter-bar {
    display: flex;
    gap: 0.4rem;
    margin: 0 -0.9rem 0.75rem;
    padding: 0 0.9rem 0.3rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.plan-filter-bar::-webkit-scrollbar {
    display: none;
}

.plan-filter-bar label {
    flex: 0 0 auto;
}

.plan-filter-bar select {
    min-height: 2.25rem;
    padding: 0.45rem 1.8rem 0.45rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #bec9c3;
    background: #111c17;
    font-size: 0.67rem;
    font-weight: 650;
}

.plans-grid > div {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
}

.plan-card,
.plans-empty,
.plans-loading {
    border: 1px solid var(--border);
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.018)), #101a16;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
}

.plan-card {
    grid-template-columns: 2.85rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem;
}

.plan-card--clickable:focus-visible {
    outline: 2px solid rgba(98, 230, 154, 0.55);
    outline-offset: 2px;
}

.plan-card:hover {
    transform: none;
    border-color: rgba(98, 230, 154, 0.25);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
}

.plan-card__icon,
.plan-summary__icon {
    width: 2.85rem;
    height: 2.85rem;
    border: 1px solid rgba(98, 230, 154, 0.18);
    border-radius: 12px;
    color: var(--primary-green);
    background: var(--green-soft);
    font-size: 0.95rem;
}

.plan-card--workout .plan-card__icon,
.workout-summary .plan-summary__icon {
    color: #a9c2ff;
    border-color: rgba(79, 141, 255, 0.24);
    background: linear-gradient(145deg, #2d69c6, #17488d);
}

.plan-card__topline {
    justify-content: flex-start;
    margin-bottom: 0.18rem;
}

.plan-type {
    font-size: 0.54rem;
}

.plan-count {
    padding: 0.18rem 0.4rem;
    color: #83918a;
    background: rgba(255, 255, 255, 0.035);
    font-size: 0.54rem;
}

.plan-card h3 {
    margin: 0;
    font-size: 0.83rem;
}

.plan-card p {
    margin-top: 0.15rem;
    color: #85938c;
    font-size: 0.62rem;
    -webkit-line-clamp: 1;
}

.plan-date {
    display: none;
}

.plan-card__actions {
    grid-column: auto;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0;
}

.btn-view,
.btn-adjust {
    min-height: 2.2rem;
    padding: 0.45rem 0.65rem;
    border-color: rgba(98, 230, 154, 0.28);
    color: #a3edc2;
    background: rgba(98, 230, 154, 0.07);
    font-size: 0.62rem;
    white-space: nowrap;
}

.plan-card--workout .btn-view,
.plan-card--workout .btn-adjust {
    border-color: rgba(79, 141, 255, 0.4);
    color: #a9c3ff;
    background: rgba(79, 141, 255, 0.08);
}

.plan-delete {
    width: auto;
    min-width: 0;
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    border-radius: 7px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.plans-empty {
    padding: 2.8rem 1.1rem;
}

.plans-empty > i {
    color: var(--primary-green);
    font-size: 1.55rem;
}

.plans-empty h3 {
    font-size: 1rem;
}

.plans-empty p {
    color: var(--gray-text);
    font-size: 0.75rem;
}

/* Chat */
.chat-container {
    height: min(68dvh, 700px);
    min-height: 500px;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto auto;
    margin: 0;
    padding: 0.7rem;
    overflow: hidden;
}

.chat-messages {
    min-height: 0;
    padding: 0.35rem;
    overflow-y: auto;
}

.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-bottom: 0.7rem;
}

.chat-message.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #07110c;
    background: var(--primary-green);
    font-size: 0.72rem;
}

.user-message .message-avatar {
    color: #eef4ff;
    background: var(--app-blue);
}

.message-content {
    max-width: 82%;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 4px 13px 13px 13px;
    color: #dbe4df;
    background: rgba(255, 255, 255, 0.045);
    font-size: 0.75rem;
    white-space: pre-wrap;
}

.user-message .message-content {
    border-color: rgba(79, 141, 255, 0.25);
    border-radius: 13px 4px 13px 13px;
    background: rgba(79, 141, 255, 0.12);
}

.typing-indicator {
    display: inline-flex;
    gap: 0.2rem;
}

.typing-indicator span {
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 50%;
    background: var(--primary-green);
    animation: typingBounce 1s ease-in-out infinite alternate;
}

.typing-indicator span:nth-child(2) { animation-delay: 150ms; }
.typing-indicator span:nth-child(3) { animation-delay: 300ms; }

@keyframes typingBounce {
    to { opacity: 0.35; transform: translateY(-3px); }
}

.chat-quick-actions {
    display: flex;
    gap: 0.45rem;
    padding: 0.55rem 0.15rem;
    overflow-x: auto;
}

.chat-quick-actions .btn {
    flex: 0 0 auto;
    min-height: 2.35rem;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #aebbb4;
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.66rem;
}

.chat-input-container {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(3, 9, 6, 0.48);
}

.chat-input-container input {
    min-width: 0;
    flex: 1;
    padding: 0.55rem 0.25rem;
    border: 0;
    outline: 0;
    color: var(--white);
    background: transparent;
    font-size: 0.74rem;
}

.audio-controls {
    display: flex;
    gap: 0.2rem;
}

.voice-btn,
.speak-btn,
.send-btn {
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
    flex: 0 0 2.25rem;
    border: 0;
    border-radius: 10px;
    color: #829089;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.voice-btn.recording {
    color: #fff;
    background: var(--danger);
    animation: sessionPulse 1.2s ease infinite;
}

.send-btn {
    color: #07110c;
    background: var(--primary-green);
}

/* Profile and measurements */
.profile-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
}

.profile-avatar {
    width: 3.6rem;
    height: 3.6rem;
    font-size: 1.05rem;
}

.profile-hero h2 {
    margin-top: 0.15rem;
    font-size: 1.15rem;
    letter-spacing: -0.035em;
}

.profile-hero p {
    margin-top: 0.1rem;
    color: #7fdca5;
    font-size: 0.65rem;
}

.profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.3rem;
    padding: 0.15rem 0.45rem;
    border: 1px solid rgba(125, 224, 171, 0.22);
    border-radius: 999px;
    color: #bfe9cf;
    background: rgba(45, 212, 191, 0.08);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.profile-link-button {
    margin-top: 0.4rem;
    padding: 0;
    border: 0;
    color: #9beabe;
    background: transparent;
    font-size: 0.62rem;
    font-weight: 700;
    text-align: left;
}

.profile-link-button:hover {
    color: #d0f8df;
}

.profile-highlights-sheet {
    max-width: 720px;
}

.achievement-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}

.achievement-summary-card {
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(16, 27, 22, 0.82);
}

.achievement-summary-card strong {
    display: block;
    font-size: 1.15rem;
    line-height: 1;
}

.achievement-summary-card span {
    display: block;
    margin-top: 0.25rem;
    color: var(--gray-text);
    font-size: 0.62rem;
}

.achievement-panel {
    margin-top: 0.85rem;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(16, 27, 22, 0.72);
}

.section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.section-header h3 {
    font-size: 0.95rem;
}

.section-header small {
    color: var(--gray-text);
    font-size: 0.62rem;
}

.profile-highlights-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.9rem;
}

.profile-highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.6rem;
}

.profile-highlight-card {
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--white);
    background: rgba(16, 27, 22, 0.82);
    text-align: left;
}

.profile-highlight-card.is-selected {
    border-color: rgba(155, 234, 190, 0.45);
    background: rgba(45, 212, 191, 0.12);
}

.profile-highlight-card.is-locked {
    border-style: dashed;
    opacity: 0.9;
}

.profile-highlight-card__meta {
    margin-top: 0.4rem;
    color: var(--gray-text);
    font-size: 0.62rem;
}

.profile-highlight-card small {
    display: block;
    margin-top: 0.35rem;
    color: #b4c4bc;
    font-size: 0.6rem;
    line-height: 1.35;
}

.profile-highlight-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(155, 234, 190, 0.18);
    color: #d4f7df;
    background: rgba(45, 212, 191, 0.08);
    font-size: 0.62rem;
    font-weight: 700;
}

.profile-hero .btn-secondary {
    min-height: 2.35rem;
    padding: 0.45rem 0.65rem;
    font-size: 0.64rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 0.75rem 0;
}

.stat-card {
    min-height: 7rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 15px;
    text-align: left;
    background: rgba(16, 27, 22, 0.8);
}

.stat-card--large {
    grid-column: 1 / -1;
    min-height: 5.4rem;
}

.stat-card__icon {
    width: 2.55rem;
    height: 2.55rem;
    flex: 0 0 2.55rem;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: var(--primary-green);
    background: var(--green-soft);
}

.stat-card__icon--blue {
    color: var(--app-blue-soft);
    background: var(--blue-soft);
}

.stat-card small {
    display: block;
    color: var(--gray-text);
    font-size: 0.62rem;
}

.stat-card strong,
.stat-card #latestMeasurement > strong {
    display: block;
    margin-top: 0.15rem;
    color: var(--white);
    font-size: 1.15rem;
    line-height: 1.2;
}

.stat-card #latestMeasurement > span {
    display: block;
    margin-top: 0.18rem;
    color: #74827b;
    font-size: 0.6rem;
}

.profile-menu {
    display: grid;
    gap: 0;
    padding: 0.3rem;
    overflow: hidden;
}

.profile-menu > button {
    border: 0;
    border-radius: 12px;
    background: transparent;
}

.profile-menu > button + button {
    border-top: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 0;
}

.profile-menu__danger > span,
.profile-menu__danger strong {
    color: #ee8e8e !important;
}

.exercise-card__image img[src*="/wger/"],
.replacement-option > img[src*="/wger/"] {
    padding: 0.12rem;
    object-fit: contain;
    background: #f5f5f1;
}

.measurement-list {
    grid-template-columns: 1fr;
}

.measurement-card {
    padding: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: rgba(16, 27, 22, 0.82);
}

.measurement-card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.measurement-card__date {
    color: var(--gray-text);
    font-size: 0.62rem;
}

.measurement-card h3 {
    margin-top: 0.15rem;
    font-size: 1.08rem;
    letter-spacing: -0.035em;
}

.measurement-card__metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.measurement-card__metrics > div {
    padding: 0.55rem;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.035);
}

.measurement-card__metrics small,
.measurement-card__metrics strong {
    display: block;
}

.measurement-card__metrics small {
    color: #6f7d76;
    font-size: 0.55rem;
}

.measurement-card__metrics strong {
    margin-top: 0.08rem;
    font-size: 0.72rem;
}

.measurement-card__notes {
    margin-top: 0.6rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--gray-text);
    font-size: 0.65rem;
}

.empty-state {
    min-height: 12rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 1.5rem;
    border: 1px dashed var(--border-strong);
    border-radius: 15px;
    color: var(--gray-text);
    text-align: center;
    background: rgba(255, 255, 255, 0.018);
}

.empty-state--compact {
    min-height: 6rem;
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
}

.empty-state > span {
    width: 2.8rem;
    height: 2.8rem;
    flex: 0 0 2.8rem;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--primary-green);
    background: var(--green-soft);
}

.empty-state strong,
.empty-state p {
    display: block;
}

.empty-state strong {
    color: #cbd6d0;
    font-size: 0.75rem;
}

.empty-state p {
    margin-top: 0.12rem;
    font-size: 0.62rem;
}

/* Modals */
.modal {
    z-index: 1000;
    padding: 0.75rem;
    background: rgba(2, 7, 4, 0.78);
    backdrop-filter: blur(12px);
}

.modal.show {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.modal-content {
    width: 100%;
    max-width: 620px;
    max-height: 92dvh;
    margin: 0;
    padding: 1rem;
    overflow-y: auto;
    border: 1px solid var(--border-strong);
    border-radius: 22px 22px 12px 12px;
    background:
        radial-gradient(circle at 0 0, rgba(98, 230, 154, 0.07), transparent 18rem),
        #111b17;
    box-shadow: 0 -18px 60px rgba(0, 0, 0, 0.52), inset 0 1px rgba(255, 255, 255, 0.04);
}

.modal-content > h2 {
    margin-bottom: 1rem;
    font-size: 1.15rem;
    letter-spacing: -0.035em;
}

.modal-header {
    align-items: flex-start;
    margin-bottom: 1rem;
}

.modal-header h3 {
    font-size: 1.15rem;
    letter-spacing: -0.035em;
}

.modal-header p {
    margin-top: 0.2rem;
    color: var(--gray-text);
    font-size: 0.7rem;
}

.btn-close {
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    border: 0;
    border-radius: 50%;
    color: #a4b0aa;
    background: rgba(255, 255, 255, 0.055);
    cursor: pointer;
}

.modal-actions {
    gap: 0.55rem;
    margin-top: 1rem;
}

.modal-actions > button {
    flex: 1;
    justify-content: center;
}

.form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.profile-sheet__header {
    display: flex;
}

/* Plan details */
.plan-modal .modal-content {
    width: min(960px, calc(100vw - 1.5rem));
    max-height: 94dvh;
    border-radius: 22px;
    background: #0d1612;
}

.plan-modal .modal-header {
    min-height: 3.8rem;
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    background: rgba(9, 17, 13, 0.9);
}

.plan-modal .modal-header::after {
    content: "";
    width: 2.5rem;
}

.plan-modal .modal-header h3 {
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plan-details-container {
    padding: 0.9rem;
}

.plan-summary {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.7rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: rgba(98, 230, 154, 0.055);
}

.plan-summary > small {
    display: none;
}

.plan-summary p {
    margin-top: 0.14rem;
    color: #9aa7a0;
    font-size: 0.68rem;
}

.plan-day-tabs {
    gap: 0.42rem;
    margin: 0 -0.9rem 0.65rem;
    padding: 0 0.9rem 0.25rem;
    scrollbar-width: none;
}

.plan-day-tabs::-webkit-scrollbar {
    display: none;
}

.plan-day-tab {
    min-width: auto;
    min-height: 2.3rem;
    flex: 0 0 auto;
    align-items: center;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
}

.plan-day-tab span {
    display: none;
}

.plan-day-tab strong {
    margin: 0;
    font-size: 0.66rem;
}

.plan-day-tab.active {
    color: #07110c;
    background: var(--primary-green);
    box-shadow: none;
}

.plan-day-tabs--workout .plan-day-tab.active {
    color: #fff;
    background: var(--app-blue);
    box-shadow: 0 6px 18px rgba(45, 105, 220, 0.24);
}

.plan-details-section,
.workout-day-panel {
    border: 0;
    border-radius: 0;
    background: transparent;
}

.plan-section-title {
    padding: 0.6rem 0.2rem;
    background: transparent;
    font-size: 0.72rem;
}

.meal-list,
.exercise-list {
    gap: 0.5rem;
    padding: 0;
}

.meal-card,
.exercise-card {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.032);
}

.meal-card--detailed {
    padding: 0.75rem;
}

.meal-macros {
    gap: 0.32rem;
}

.meal-macros span {
    padding: 0.45rem 0.2rem;
    background: rgba(98, 230, 154, 0.055);
}

.workout-day-header {
    align-items: stretch;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.75rem 0;
    border: 0;
    background: transparent;
}

.workout-day-header h4 {
    font-size: 1rem;
}

.start-workout-button {
    width: 100%;
    color: #fff;
    border-color: rgba(79, 141, 255, 0.48);
    background: linear-gradient(135deg, #568fff, #3072ea);
}

.active-session-bar {
    width: 100%;
    min-width: 0;
    border-color: rgba(79, 141, 255, 0.36);
    background: rgba(79, 141, 255, 0.09);
}

.active-session-bar span {
    color: #9bbcff;
}

.active-session-bar > i {
    color: #8eb4ff;
}

.finish-workout-button {
    color: #fff;
    border-color: rgba(79, 141, 255, 0.42);
    background: #397ce9;
}

.finish-workout-button--full {
    width: calc(100% - 1.4rem);
    min-height: 3rem;
    margin: 0.7rem;
}

.workout-day-panel .session-exercise-card,
.exercise-card {
    grid-template-columns: 1.8rem 88px minmax(0, 1fr);
    gap: 0.55rem;
    padding: 0.55rem;
    border-radius: 12px;
}

.workout-day-panel .exercise-card__number,
.exercise-card__number {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 7px;
    font-size: 0.65rem;
}

.workout-day-panel .exercise-card__image,
.workout-day-panel .exercise-card__image img,
.exercise-card__image,
.exercise-card__image img {
    min-height: 88px;
    height: 88px;
    border-radius: 9px;
}

.exercise-card__title-row h5 {
    font-size: 0.78rem;
}

.exercise-card__prescription {
    flex-wrap: wrap;
    gap: 0.3rem;
    margin: 0.25rem 0 0.35rem;
}

.exercise-card__prescription strong {
    font-size: 0.78rem;
}

.exercise-card__prescription small {
    font-size: 0.54rem;
}

.exercise-meta {
    gap: 0.2rem;
    margin-bottom: 0.25rem;
}

.exercise-meta span {
    padding: 0.16rem 0.3rem;
    font-size: 0.5rem;
}

.exercise-guidance,
.exercise-card .plan-note {
    font-size: 0.58rem;
}

.exercise-session-actions {
    grid-column: 2 / -1;
    margin-top: 0;
}

.machine-busy-button,
.restore-exercise-button {
    flex: 1;
    min-height: 2.25rem;
    padding: 0.45rem 0.55rem;
    font-size: 0.62rem;
}

.machine-busy-button {
    color: #8eb5ff;
    border-color: rgba(79, 141, 255, 0.42);
    background: rgba(79, 141, 255, 0.07);
}

/* Wizard refinements */
.plan-wizard-modal .plan-wizard {
    border-color: var(--border-strong);
    background:
        radial-gradient(circle at 0 0, rgba(98, 230, 154, 0.08), transparent 23rem),
        #101a16;
}

.plan-wizard__header,
.plan-wizard__actions {
    border-color: var(--border);
}

.plan-wizard__steps li.active > span,
.plan-wizard__steps li.complete > span {
    color: #06110b;
    background: var(--primary-green);
}

.wizard-choice__surface,
.wizard-check__surface {
    background: rgba(255, 255, 255, 0.025);
}

.wizard-choice input:checked + .wizard-choice__surface,
.wizard-check input:checked + .wizard-check__surface {
    background: var(--green-soft);
}

/* Feedback */
.toast,
#globalLoading {
    position: fixed;
    top: calc(4.8rem + env(safe-area-inset-top));
    right: 0.8rem;
    left: 0.8rem;
    z-index: 2500;
    width: auto;
    max-width: 420px;
    margin: 0 auto;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    color: #dce6e1;
    background: rgba(17, 29, 23, 0.96);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(16px);
    font-size: 0.74rem;
}

.toast.success { color: #9beabe; border-color: rgba(98, 230, 154, 0.3); }
.toast.error { color: #ffaaaa; border-color: rgba(255, 107, 107, 0.3); }
.toast.info { color: #acc8ff; border-color: rgba(79, 141, 255, 0.3); }

.awesomplete {
    width: 100%;
}

.awesomplete > ul {
    border: 1px solid var(--border-strong) !important;
    border-radius: 12px !important;
    color: #dce6e1;
    background: #15231d !important;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4) !important;
}

.awesomplete > ul > li[aria-selected="true"] {
    color: #07110c;
    background: var(--primary-green) !important;
}

/* Mobile full-screen experiences */
@media (max-width: 768px) {
    .active-workout-dock {
        right: 0.7rem;
        bottom: calc(5.25rem + env(safe-area-inset-bottom));
        left: 0.7rem;
        width: auto;
        padding: 0.62rem 0.7rem;
        border-radius: 13px;
    }

    .active-workout-dock__pulse {
        width: 2.35rem;
        height: 2.35rem;
    }

    .active-workout-dock__copy small {
        font-size: 0.55rem;
    }

    .active-workout-dock__copy strong {
        font-size: 0.72rem;
    }

    .active-workout-dock time {
        font-size: 0.76rem;
    }

    .app-brand small {
        display: none;
    }

    .content-header {
        align-items: stretch;
        flex-direction: column;
        text-align: left;
    }

    .content-header > .btn-secondary,
    .content-header > .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .plan-modal.show {
        align-items: stretch;
        padding: 0;
    }

    .plan-modal .modal-content {
        width: 100%;
        height: 100dvh;
        max-height: none;
        border: 0;
        border-radius: 0;
    }

    .plan-modal .modal-header {
        min-height: calc(3.75rem + env(safe-area-inset-top));
        padding: max(0.75rem, env(safe-area-inset-top)) 0.9rem 0.65rem;
    }

    .plan-modal .modal-header h3 {
        overflow: hidden;
        font-size: 0.95rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .plan-modal .modal-actions {
        display: none;
    }

    .plan-details-container {
        padding: 0.75rem 0.7rem calc(1.2rem + env(safe-area-inset-bottom));
    }

    .active-workout-shell {
        gap: 0.7rem;
    }

    .active-workout-toolbar {
        top: 0;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.6rem;
        margin: -0.15rem -0.15rem 0;
        padding: 0.65rem 0.7rem;
        border-radius: 12px;
    }

    .active-workout-status span {
        font-size: 0.58rem;
    }

    .active-workout-status strong {
        max-width: 48vw;
        font-size: 0.76rem;
    }

    .active-workout-timer {
        min-width: 7.4rem;
        padding: 0.4rem 0.6rem;
    }

    .active-workout-timer small {
        font-size: 0.52rem;
    }

    .active-workout-timer time {
        font-size: 1.15rem;
    }

    .active-workout-progress {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 0.6rem;
    }

    .active-workout-progress > span {
        margin: 0;
        font-size: 0.58rem;
        text-align: left;
    }

    .current-exercise-stage {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        padding: 0.7rem;
        border-radius: 14px;
    }

    .current-exercise-media,
    .current-exercise-media > img,
    .current-exercise-media > .exercise-image-placeholder {
        min-height: clamp(330px, 55dvh, 520px);
    }

    .current-exercise-stage {
        gap: 0.65rem;
    }

    .workout-swipe-hint {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        margin: -0.15rem 0 0.65rem;
        padding: 0 0.35rem;
        color: #8f9fac;
        font-size: 0.68rem;
        font-weight: 700;
    }

    .workout-swipe-hint span {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
    }

    .workout-swipe-hint span:first-child i {
        color: #9abbff;
    }

    .workout-swipe-hint span:last-child i {
        color: #65e7a4;
    }

    .replacement-options {
        grid-auto-columns: minmax(220px, 78vw);
        grid-auto-flow: column;
        grid-template-columns: none;
        overflow-x: auto;
        padding-bottom: 0.3rem;
        scroll-snap-type: x mandatory;
    }

    .replacement-option {
        scroll-snap-align: start;
    }

    .current-exercise-content h3 {
        font-size: clamp(1.45rem, 8vw, 2rem);
    }

    .current-exercise-prescription {
        margin: 0.75rem 0;
    }

    .current-exercise-prescription strong {
        min-width: 0;
        flex: 1;
        font-size: 1.15rem;
    }

    .current-exercise-actions {
        grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    }

    .workout-set-entry {
        padding: 0.65rem;
    }

    .workout-set-entry__heading,
    .workout-set-entry__labels,
    .workout-set-row {
        grid-template-columns: 2.5rem minmax(0, 1fr) minmax(0, 1fr);
        gap: 0.35rem;
    }

    .workout-set-entry__heading {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .completed-workout-summary,
    .workout-share-shell {
        padding: 0.9rem;
    }

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

    .completed-workout-summary > .workout-share-button {
        position: sticky;
        z-index: 20;
        bottom: calc(0.35rem + env(safe-area-inset-bottom));
    }

    .workout-share-preview {
        padding: 0.65rem;
    }

    .workout-share-card {
        width: 100%;
        max-width: 440px;
    }

    .workout-share-exercise-controls li {
        padding: 0.55rem;
    }

    .workout-share-exercise-controls button {
        min-width: 6.3rem;
    }

    .completed-workout-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .completed-workout-exercises li {
        align-items: flex-start;
    }

    .complete-exercise-button,
    .replace-current-exercise-button {
        min-height: 3.4rem;
        padding: 0.55rem;
        font-size: 0.72rem;
    }

    .workout-complete-state {
        min-height: 65dvh;
        padding: 1.25rem;
    }

    .replacement-panel {
        position: fixed;
        inset: 0;
        z-index: 1800;
        display: block;
        margin: 0;
        padding: max(1rem, env(safe-area-inset-top)) 0.85rem max(1rem, env(safe-area-inset-bottom));
        overflow-y: auto;
        border: 0;
        border-radius: 0;
        background:
            radial-gradient(circle at 50% -10%, rgba(79, 141, 255, 0.12), transparent 25rem),
            #0b1410;
        box-shadow: none;
    }

    .replacement-panel__header {
        min-height: 4.4rem;
        margin-bottom: 0.8rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--border);
    }

    .replacement-panel__header span {
        color: #7fa9ff;
    }

    .replacement-panel__header h6 {
        margin-top: 0.2rem;
        font-size: 1rem;
    }

    .replacement-panel__header p {
        max-width: 32rem;
        margin-top: 0.25rem;
        color: var(--gray-text);
    }

    .replacement-options {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .replacement-option {
        min-height: 7rem;
        grid-template-columns: 5.3rem minmax(0, 1fr) auto;
        grid-template-rows: auto;
        align-items: stretch;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.035);
    }

    .replacement-option > img {
        width: 5.3rem;
        height: 100%;
        min-height: 7rem;
    }

    .replacement-option__body {
        align-self: center;
    }

    .replacement-apply {
        width: auto;
        min-width: 5.5rem;
        margin: 0.6rem 0.55rem 0.6rem 0;
        align-self: center;
        color: #fff;
        border-color: rgba(79, 141, 255, 0.42);
        background: #3478e6;
    }

    .plan-wizard-modal.show {
        padding: 0;
    }

    .plan-wizard__header {
        min-height: 4.2rem;
        padding: max(0.8rem, env(safe-area-inset-top)) 0.9rem 0.7rem;
    }

    .plan-wizard__heading p,
    .plan-wizard__icon {
        display: none;
    }

    .plan-wizard__heading h3 {
        font-size: 0.98rem;
    }

    .plan-wizard__progress {
        padding: 0.7rem 0.9rem 0.55rem;
    }

    .plan-wizard__body {
        padding: 1rem 0.9rem 1.2rem;
    }

    .plan-wizard__actions {
        padding: 0.7rem 0.9rem max(0.7rem, env(safe-area-inset-bottom));
    }
}

@media (max-width: 430px) {
    .tab-content {
        padding-right: 0.7rem;
        padding-left: 0.7rem;
    }

    .home-greeting__avatar {
        width: 2.75rem;
        height: 2.75rem;
    }

    .daily-summary,
    .diary-panel {
        padding: 0.72rem;
    }

    .diary-meal-card {
        grid-template-columns: 2.15rem minmax(0, 1fr) auto;
        gap: 0.48rem;
        padding: 0.52rem;
    }

    .diary-meal-card__icon {
        width: 2.15rem;
        height: 2.15rem;
    }

    .diary-meal-card .entry-actions {
        grid-column: 2 / -1;
        flex-direction: row;
        justify-content: flex-end;
        margin-top: -0.2rem;
    }

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

    .plan-card__icon {
        width: 2.55rem;
        height: 2.55rem;
    }

    .plan-card__actions {
        grid-column: 1 / -1;
        flex-direction: row;
    }

    .btn-view {
        flex: 1;
    }

    .plan-delete {
        width: auto;
        min-height: 44px;
    }

    .workout-day-panel .session-exercise-card,
    .exercise-card {
        grid-template-columns: 1.65rem 76px minmax(0, 1fr);
    }

    .workout-day-panel .exercise-card__number,
    .exercise-card__number {
        width: 1.65rem;
        height: 1.65rem;
    }

    .workout-day-panel .exercise-card__image,
    .workout-day-panel .exercise-card__image img,
    .exercise-card__image,
    .exercise-card__image img {
        min-height: 78px;
        height: 78px;
    }

    .workout-day-panel .exercise-card__image,
    .exercise-card__image {
        grid-column: 2;
    }

    .workout-day-panel .exercise-card__content,
    .exercise-card__content {
        grid-column: 3;
    }

    .exercise-card__prescription strong {
        font-size: 0.68rem;
    }

    .exercise-guidance,
    .exercise-card .plan-note {
        display: none;
    }

    .replacement-option {
        grid-template-columns: 4.7rem minmax(0, 1fr);
    }

    .replacement-option > img {
        width: 4.7rem;
        min-height: 6.5rem;
    }

    .replacement-apply {
        grid-column: 1 / -1;
        width: calc(100% - 1rem);
        margin: 0 0.5rem 0.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (min-width: 600px) {
    .tab-content {
        padding: 1.5rem 1.25rem 2.5rem;
    }

    .macro-card {
        padding: 0.85rem 0.6rem 0.65rem;
    }

    .macro-card strong {
        font-size: 1.05rem;
    }

    .quick-grid,
    .measurement-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-header {
        flex-direction: row;
        align-items: flex-end;
    }

    .content-header .plan-wizard-cta {
        width: auto;
    }

    .plans-grid > div {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .plans-grid--workout > div {
        grid-template-columns: 1fr;
    }

    .plan-card--workout {
        grid-template-columns: 3rem minmax(0, 1fr) auto;
    }

    .modal.show {
        align-items: center;
    }

    .modal-content {
        border-radius: 22px;
    }
}

@media (min-width: 960px) {
    html {
        font-size: 18px;
    }

    body {
        background:
            radial-gradient(circle at 8% 10%, rgba(35, 155, 94, 0.14), transparent 35rem),
            radial-gradient(circle at 94% 50%, rgba(28, 86, 64, 0.08), transparent 34rem),
            #07100c;
    }

    .app-header__inner {
        padding: 0 1.5rem;
    }

    .app-shell {
        width: min(1280px, 100%);
        display: grid;
        grid-template-columns: 124px minmax(0, 1fr);
        gap: 1.25rem;
        margin: 0 auto;
        padding: 1.25rem 1.5rem 2rem;
    }

    .app-content {
        padding: 0;
    }

    .nav-tabs {
        position: sticky;
        top: 5.5rem;
        right: auto;
        bottom: auto;
        left: auto;
        align-self: start;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    .nav-tabs-inner {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        padding: 0.45rem;
        border: 1px solid var(--border);
        border-radius: 19px;
        background: rgba(14, 24, 20, 0.82);
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
    }

    .nav-btn {
        min-height: 4.6rem;
        font-size: 0.78rem;
    }

    .nav-btn > i {
        font-size: 1.15rem;
    }

    .nav-btn.active {
        box-shadow: inset 3px 0 var(--primary-green);
    }

    .tab-content {
        width: min(100%, 1120px);
        padding: 0;
    }

    #dietTab {
        display: grid;
        grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.72fr);
        gap: 0.8rem;
    }

    #dietTab.hidden {
        display: none;
    }

    .home-greeting {
        grid-column: 1 / -1;
    }

    .daily-summary {
        grid-column: 1 / -1;
    }

    .diary-panel {
        margin: 0;
    }

    .quick-grid {
        align-content: start;
        grid-template-columns: 1fr;
        margin: 0;
    }

    .quick-grid > button {
        min-height: 5.2rem;
    }

    .content-heading h2 {
        font-size: 2rem;
    }

    .app-brand strong {
        font-size: 1.08rem;
    }

    .app-brand small,
    .eyebrow,
    .content-kicker,
    .plan-type {
        font-size: 0.72rem;
    }

    .home-greeting h1 {
        font-size: 1.55rem;
    }

    .home-greeting p,
    .content-heading p {
        font-size: 0.9rem;
    }

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

    .text-button,
    .btn-view,
    .machine-busy-button,
    .restore-exercise-button {
        font-size: 0.78rem;
    }

    .macro-card strong {
        font-size: 1.08rem;
    }

    .macro-card small,
    .compact-filters label > span {
        font-size: 0.72rem;
    }

    .macro-card b {
        font-size: 0.75rem;
    }

    .compact-filters input,
    .plan-filter-bar select {
        font-size: 0.85rem;
    }

    .diary-meal-card__content strong,
    .diary-meal-card__energy strong {
        font-size: 0.9rem;
    }

    .diary-meal-card__content p,
    .quick-grid small,
    .profile-menu small {
        font-size: 0.78rem;
    }

    .diary-meal-card__content time,
    .diary-meal-card__macros span,
    .diary-meal-card__energy small {
        font-size: 0.68rem;
    }

    .quick-grid strong,
    .profile-menu strong {
        font-size: 0.92rem;
    }

    .plan-type,
    .plan-count {
        font-size: 0.68rem;
    }

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

    .plan-card p {
        font-size: 0.78rem;
    }

    .message-content,
    .chat-input-container input {
        font-size: 0.9rem;
    }

    .chat-quick-actions .btn,
    .profile-hero p,
    .profile-hero .btn-secondary {
        font-size: 0.78rem;
    }

    .stat-card small,
    .measurement-card__date {
        font-size: 0.76rem;
    }

    .stat-card #latestMeasurement > span,
    .measurement-card__metrics small {
        font-size: 0.72rem;
    }

    .measurement-card__metrics strong {
        font-size: 0.9rem;
    }

    .measurement-card__notes {
        font-size: 0.8rem;
    }

    .exercise-card__title-row h5 {
        font-size: 0.95rem;
    }

    .exercise-card__prescription strong {
        font-size: 0.95rem;
    }

    .exercise-card__prescription small,
    .exercise-meta span {
        font-size: 0.7rem;
    }

    .exercise-guidance,
    .exercise-card .plan-note {
        font-size: 0.75rem;
    }

    .empty-state strong {
        font-size: 0.9rem;
    }

    .empty-state p {
        font-size: 0.78rem;
    }

    .profile-hero,
    .stats-grid,
    .profile-menu {
        max-width: 860px;
        margin-right: auto;
        margin-left: auto;
    }

    .stats-grid {
        grid-template-columns: 1.35fr 1fr 1fr;
    }

    .stat-card--large {
        grid-column: auto;
    }
}

@media (hover: hover) and (pointer: fine) {
    .btn-primary:hover,
    .btn-add:hover {
        transform: translateY(-1px);
        filter: brightness(1.06);
    }

    .nav-btn:hover,
    .quick-grid > button:hover,
    .profile-menu > button:hover,
    .diary-meal-card:hover,
    .measurement-card:hover {
        border-color: rgba(98, 230, 154, 0.22);
        background-color: rgba(98, 230, 154, 0.035);
    }

    .entry-action:hover,
    .round-action:hover,
    .header-icon-button:hover {
        color: var(--primary-green);
        border-color: rgba(98, 230, 154, 0.28);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- CARDÁPIO DE HOJE --- */
.today-cardapio {
    margin-bottom: 1rem;
}

.today-cardapio__rotate {
    display: flex;
    gap: 0.35rem;
}

.day-chip {
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--border, #244033);
    border-radius: 999px;
    background: rgba(16, 27, 22, 0.8);
    color: var(--muted, #8aa79a);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.day-chip.is-active {
    background: var(--accent, #5ee6a8);
    border-color: var(--accent, #5ee6a8);
    color: #06110c;
}

.today-cardapio__body {
    display: grid;
    gap: 0.6rem;
}

.cardapio-list {
    display: grid;
    gap: 0.6rem;
}

.cardapio-item {
    border: 1px solid var(--border, #244033);
    border-radius: 14px;
    background: rgba(16, 27, 22, 0.8);
    padding: 0.75rem;
    display: grid;
    gap: 0.6rem;
}

.cardapio-item.is-done {
    border-color: rgba(94, 230, 168, 0.45);
    background: rgba(94, 230, 168, 0.07);
}

.cardapio-item__head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.7rem;
    align-items: start;
}

.cardapio-item__icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: rgba(94, 230, 168, 0.12);
    color: var(--accent, #5ee6a8);
    font-size: 1rem;
}

.cardapio-item__copy strong {
    color: var(--white, #fff);
    font-size: 0.92rem;
}

.cardapio-item__copy p {
    color: var(--muted, #8aa79a);
    font-size: 0.82rem;
    margin: 0.15rem 0 0.4rem;
}

.cardapio-item__macros {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.cardapio-item__macros span {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--muted, #8aa79a);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
}

.cardapio-item__status {
    font-size: 1.2rem;
    color: var(--accent, #5ee6a8);
}

.cardapio-item:not(.is-done) .cardapio-item__status {
    color: var(--muted, #4c645a);
}

.cardapio-item__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.btn-quick {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border-radius: 10px;
    border: none;
    background: var(--action);
    color: #f8fbff;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-quick--soft {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white, #fff);
}

.cardapio-done-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent, #5ee6a8);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.cardapio-footer {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.cardapio-progress {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--primary-green);
    font-size: 0.82rem;
    font-weight: 650;
    margin-bottom: 0.65rem;
}

.empty-state--all-done {
    border-color: rgba(98, 230, 154, 0.3);
    background: rgba(98, 230, 154, 0.05);
}

.empty-state--all-done > span {
    color: var(--primary-green);
}

/* --- Seletor de ingredientes (plano alimentar) --- */
.ingredient-picker {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ingredient-picker input {
    width: 100%;
    min-height: 3rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: none;
    color: var(--white);
    background: rgba(3, 9, 6, 0.46);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.ingredient-picker input:focus {
    border-color: rgba(59, 130, 246, 0.64);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ingredient-add {
    flex: 0 0 2.9rem;
    height: 2.9rem;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 11px;
    color: var(--action);
    background: rgba(59, 130, 246, 0.1);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}

.ingredient-add:hover {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(59, 130, 246, 0.18);
}

.ingredient-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.55rem;
}

.ingredient-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.32rem 0.4rem 0.32rem 0.75rem;
    border: 1px solid rgba(98, 230, 154, 0.4);
    border-radius: 999px;
    color: var(--primary-green);
    background: rgba(98, 230, 154, 0.1);
    font-size: 0.8rem;
    font-weight: 600;
}

.ingredient-chip__remove {
    width: 1.35rem;
    height: 1.35rem;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: var(--primary-green);
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.ingredient-chip__remove:hover {
    color: #fff;
    background: rgba(98, 230, 154, 0.35);
}

.cardapio-footer .btn-add,
.cardapio-footer .btn-secondary {
    justify-content: center;
}

.modal-hint {
    color: var(--muted, #8aa79a);
    font-size: 0.85rem;
    margin: 0.5rem 0 0.8rem;
}

.form-textarea {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--border, #244033);
    border-radius: 10px;
    background: rgba(6, 17, 12, 0.9);
    color: var(--white, #fff);
    font-family: inherit;
    resize: vertical;
    margin-bottom: 0.6rem;
}

.suggest-preview {
    display: grid;
    gap: 0.55rem;
    margin-bottom: 0.6rem;
}

.suggest-meal {
    border: 1px solid var(--border, #244033);
    border-radius: 12px;
    padding: 0.6rem 0.7rem;
    background: rgba(16, 27, 22, 0.8);
    display: grid;
    gap: 0.4rem;
}

.suggest-meal strong {
    color: var(--white, #fff);
    font-size: 0.88rem;
}

.suggest-meal p {
    color: var(--muted, #8aa79a);
    font-size: 0.8rem;
    margin: 0;
}

/* --- CONTROLES DE APLICATIVO (Criar Conta, Perfil, Refeição) --- */
.btn-primary--block {
    width: 100%;
    justify-content: center;
    min-height: 3.1rem;
}

.auth-helper {
    text-align: center;
    color: var(--muted-text, #68766f);
    font-size: 0.78rem;
}

.field-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.field-label {
    color: #a9b6af;
    font-size: 0.78rem;
    font-weight: 650;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.field-label i {
    color: var(--primary-green);
}

.field-input {
    position: relative;
    display: flex;
    align-items: center;
}

.field-input__icon {
    position: absolute;
    left: 0.9rem;
    color: #6c7b73;
    font-size: 0.95rem;
    pointer-events: none;
}

.field-input__core,
.field-input > input:not([type='hidden']) {
    width: 100%;
    min-height: 3.1rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: none;
    color: var(--white);
    background: rgba(3, 9, 6, 0.46);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.field-input__icon ~ input:not([type='hidden']) {
    padding-left: 2.6rem;
}

.field-input input:focus {
    border-color: rgba(98, 230, 154, 0.64);
    background: rgba(3, 9, 6, 0.72);
    box-shadow: 0 0 0 3px rgba(98, 230, 154, 0.1);
}

.field-input.has-reveal input:not([type='hidden']) {
    padding-right: 3rem;
}

.field-reveal {
    position: absolute;
    right: 0.5rem;
    width: 2.3rem;
    height: 2.3rem;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #a4b0aa;
    background: transparent;
    cursor: pointer;
    transition: color var(--transition), background var(--transition);
}

.field-reveal:hover {
    color: var(--primary-green);
    background: rgba(255, 255, 255, 0.06);
}

.field-textarea {
    width: 100%;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: none;
    color: var(--white);
    background: rgba(3, 9, 6, 0.46);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.field-textarea:focus {
    border-color: rgba(98, 230, 154, 0.64);
    box-shadow: 0 0 0 3px rgba(98, 230, 154, 0.1);
}

.profile-section {
    display: grid;
    gap: 0.6rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
}

.profile-section:last-of-type {
    border-bottom: 0;
}

.profile-section--row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.profile-section__label,
.profile-section__head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.profile-section__head {
    margin-bottom: 0.1rem;
}

.profile-section__icon {
    width: 2.15rem;
    height: 2.15rem;
    flex: 0 0 2.15rem;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--primary-green);
    background: rgba(98, 230, 154, 0.11);
    font-size: 0.9rem;
}

.profile-section__label > div,
.profile-section__head > div {
    display: grid;
    gap: 0.05rem;
}

.profile-section__label strong,
.profile-section__head strong {
    color: var(--white);
    font-size: 0.92rem;
    letter-spacing: -0.01em;
}

.profile-section__label small,
.profile-section__head small {
    color: var(--muted-text, #68766f);
    font-size: 0.74rem;
}

.profile-section__col {
    display: grid;
    gap: 0.75rem;
}

.choice-grid {
    display: grid;
    gap: 0.55rem;
}

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

.choice-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: rgba(16, 27, 22, 0.8);
    color: var(--white);
    text-align: left;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.choice-card:hover {
    border-color: var(--border-strong);
}

.choice-card.is-active {
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(59, 130, 246, 0.09);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.choice-card__icon {
    width: 2.1rem;
    height: 2.1rem;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--muted-text, #68766f);
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
}

.choice-card.is-active .choice-card__icon {
    color: var(--primary-green);
    background: rgba(59, 130, 246, 0.16);
}

.choice-card__label {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.stepper {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.stepper__btn {
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 2.5rem;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.stepper__btn:hover {
    border-color: rgba(59, 130, 246, 0.5);
    color: var(--action);
    background: rgba(59, 130, 246, 0.1);
}

.stepper__input {
    width: 100%;
    min-height: 2.5rem;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    color: var(--white);
    background: rgba(3, 9, 6, 0.46);
    font-size: 0.95rem;
    font-weight: 650;
    -moz-appearance: textfield;
}

.stepper__input::-webkit-inner-spin-button,
.stepper__input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quick-chips {
    display: flex;
    gap: 0.5rem;
}

.chip-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.9rem;
    border: 1px solid var(--border);
    border-radius: 11px;
    color: #a4b0aa;
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.chip-btn.is-active {
    border-color: rgba(59, 130, 246, 0.6);
    color: var(--primary-green);
    background: rgba(59, 130, 246, 0.1);
}

.macros-ai {
    width: 100%;
    justify-content: center;
    min-height: 3rem;
}

.diet-photo-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.diet-photo-btn {
    border: 1px dashed var(--border);
    background: rgba(16, 27, 22, 0.5);
    color: var(--action);
}

.diet-photo-preview {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.diet-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.diet-photo-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.7rem;
    cursor: pointer;
}

.macro-grid {
    display: grid;
    gap: 0.6rem;
    margin-top: 0.65rem;
}

/* Dentro de modais (janela "Adicionar Refeição"), os steppers de macros
   empilham em uma coluna — não usamo o grid de 4 colunas do dashboard. */
.modal .macro-grid {
    grid-template-columns: 1fr;
}

.macro-stepper {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: rgba(16, 27, 22, 0.8);
}

.macro-stepper__icon {
    width: 2.2rem;
    height: 2.2rem;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--primary-green);
    background: rgba(98, 230, 154, 0.11);
}

.macro-stepper label {
    color: #a9b6af;
    font-size: 0.82rem;
    font-weight: 650;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.macro-stepper .stepper {
    width: min(200px, 46vw);
    justify-self: end;
}

.macro-stepper .stepper__btn {
    width: 2.2rem;
    height: 2.2rem;
    flex: 0 0 2.2rem;
}

.collapse {
    margin: 0.85rem 0 0.2rem;
}

.collapse > summary {
    list-style: none;
    cursor: pointer;
    color: var(--muted-text, #68766f);
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0;
}

.collapse > summary::-webkit-details-marker {
    display: none;
}

.collapse > summary:hover {
    color: var(--primary-green);
}

.collapse > summary i {
    color: var(--primary-green);
}

.collapse .field-textarea {
    margin-top: 0.5rem;
}

.sheet-actions {
    position: sticky;
    bottom: 0;
    display: flex;
    gap: 0.6rem;
    margin: 0 -1rem;
    padding: 0.9rem 1rem;
    border-top: 1px solid var(--border);
    background: linear-gradient(to top, #111b17 75%, rgba(17, 27, 23, 0.9));
    backdrop-filter: blur(8px);
}

.sheet-actions > button {
    flex: 1;
    justify-content: center;
    min-height: 3rem;
}

@media (max-width: 560px) {
    .choice-grid--2 {
        grid-template-columns: 1fr 1fr;
    }

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

    .macro-stepper .stepper {
        width: min(150px, 38vw);
    }
}

@media (max-width: 380px) {
    .choice-card__label {
        font-size: 0.76rem;
    }
}

/* Edição segura do plano fora de uma sessão ativa. */
.workout-plan-edit-heading > div,
.workout-edit-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.workout-plan-edit-heading button,
.workout-edit-actions button,
.workout-add-panel__heading button {
    border: 1px solid rgba(138, 169, 255, 0.24);
    border-radius: 9px;
    padding: 0.48rem 0.7rem;
    color: #c8d5ff;
    background: rgba(138, 169, 255, 0.09);
    cursor: pointer;
}

.workout-edit-actions {
    grid-column: 3;
    margin-top: 0.65rem;
}

.workout-edit-actions .workout-remove-exercise {
    color: #ffb0b0;
    border-color: rgba(255, 120, 120, 0.2);
    background: rgba(255, 100, 100, 0.07);
}

.workout-add-panel {
    margin: 0.8rem;
    padding: 1rem;
    border: 1px solid rgba(138, 169, 255, 0.2);
    border-radius: 14px;
    color: #aebbb4;
    background: rgba(12, 24, 31, 0.72);
}

.workout-add-panel__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.workout-add-panel__heading span { color: #9bb9ff; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.workout-add-panel__heading h5 { margin-top: 0.15rem; color: var(--white); }

.workout-add-fields {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(90px, 1fr));
    gap: 0.65rem;
}

.workout-add-fields label { color: #9eafa6; font-size: 0.72rem; font-weight: 700; }
.workout-add-fields label small { display: block; margin-top: 0.3rem; color: #71827a; font-size: 0.65rem; font-weight: 500; }
.workout-add-fields input,
.workout-add-fields select { width: 100%; margin-top: 0.3rem; }
.workout-add-save { width: 100%; margin-top: 0.8rem; justify-content: center; }

@media (max-width: 768px) {
    .workout-plan-edit-heading > div { width: 100%; justify-content: space-between; }
    .workout-edit-actions { grid-column: 2 / -1; flex-wrap: wrap; }
    .workout-add-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .workout-add-fields label:first-child { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
    .workout-edit-actions { grid-column: 1 / -1; }
    .workout-edit-actions button { flex: 1; }
    .workout-add-fields { grid-template-columns: 1fr; }
    .workout-add-fields label:first-child { grid-column: auto; }
}

@media (max-width: 640px) {
    .progress-mini-grid { grid-template-columns: 1fr; }
    .activity-history-card { gap: 0.6rem; padding: 0.75rem; }
    .activity-history-card__icon { width: 2.3rem; height: 2.3rem; }
    .progress-weekly-card footer { align-items: flex-start; flex-direction: column; }
    .completed-workout-exercises li { flex-direction: column; }
    .completed-workout-exercises li > b { white-space: normal; }
}

/* Authentication and plan selection */
.google-auth { margin-top: 1rem; }
.auth-divider { display: flex; align-items: center; gap: .75rem; color: var(--muted-text); font-size: .9rem; margin: .75rem 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.google-signin-button { min-height: 44px; display: flex; justify-content: center; }
.google-signup-step h2 { margin: .75rem 0 .35rem; color: var(--white); font-size: 1.45rem; }
.google-signup-step > p { margin: 0 0 1.25rem; color: var(--muted-text); line-height: 1.5; }
.google-signup-back { min-height: 2.5rem; padding: .4rem .65rem; border: 1px solid var(--border); border-radius: 10px; color: var(--white); background: rgba(255, 255, 255, .04); }
.google-username-form { margin-top: .75rem; }
.google-username-form p { color: var(--muted-text); }
.plans-sheet { width: min(1080px, calc(100vw - 2rem)); max-width: 1080px; }
.pricing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.pricing-card { display: flex; flex-direction: column; gap: .9rem; padding: 1.25rem; border: 1px solid var(--border); border-radius: 18px; background: #fff; }
.pricing-card.is-current { border: 2px solid var(--primary-green); box-shadow: 0 8px 26px rgba(36, 116, 76, .12); }
.pricing-card h4 { color: var(--white); font-size: 1.1rem; }
.pricing-card__price { display: flex; align-items: baseline; gap: .25rem; }
.pricing-card__price strong { color: var(--white); font-size: 1.8rem; }
.pricing-card__price span, .billing-notice { color: var(--muted-text); }
.pricing-card__savings { color: var(--muted-text); font-size: .82rem; margin: -.35rem 0 .9rem; }
.pricing-card ul { display: grid; gap: .65rem; padding: 0; margin: 0 0 auto; list-style: none; }
.pricing-card li { display: flex; gap: .5rem; color: var(--white); line-height: 1.4; }
.pricing-card li i { color: var(--primary-green); margin-top: .2rem; }
.billing-notice { margin: 1rem 0 0; text-align: center; }
.pricing-status { color: var(--muted-text); font-weight: 600; }
.professional-request { display: grid; gap: .75rem; margin-top: 1rem; padding: 1.25rem; border: 1px solid var(--border); border-radius: 16px; background: #fff; }
.professional-request h4 { color: var(--white); }
.professional-request label { display: grid; gap: .3rem; color: var(--white); font-weight: 600; }
.subscription-manage { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; padding: 1rem 1.25rem; border: 1px solid var(--border); border-radius: 14px; background: #f1f5ef; }
.subscription-manage div { display: grid; gap: .15rem; }
.subscription-manage strong { text-transform: capitalize; }
@media (max-width: 900px) { .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pricing-grid { grid-template-columns: 1fr; } .plans-sheet { width: 100%; } }

/* === PRIMEIRA ENTREGA DE UX: TEMA CLARO E ACESSIBILIDADE === */
:root {
    color-scheme: light;
    --primary-green: #3b82f6;
    --dark-green: #1d4ed8;
    --black: #17352a;
    --dark-gray: #fffdf8;
    --light-gray: #edf3ec;
    --white: #20372e;
    --gray-text: #5f6f66;
    --muted-text: #6d7b73;
    --surface: #fffdf8;
    --surface-raised: #ffffff;
    --surface-soft: #f1f5ef;
    --border: rgba(42, 82, 64, 0.15);
    --border-strong: rgba(42, 82, 64, 0.25);
    --green-soft: rgba(45, 212, 191, 0.12);
    --blue-soft: rgba(60, 103, 175, 0.1);
    --shadow-light: rgba(49, 72, 57, 0.08);
    --shadow-medium: rgba(49, 72, 57, 0.14);
    --shadow-heavy: rgba(49, 72, 57, 0.22);
}

html,
body {
    background: #f6f1e7;
}

body {
    color: var(--white);
    background:
        radial-gradient(circle at 4% 0%, rgba(229, 192, 118, 0.2), transparent 30rem),
        radial-gradient(circle at 100% 22%, rgba(112, 167, 129, 0.12), transparent 28rem),
        #f6f1e7;
    font-size: 16px;
}

.app-header {
    border-color: var(--border);
    background: rgba(255, 253, 248, 0.92);
    box-shadow: 0 8px 28px rgba(55, 73, 61, 0.07);
}

.app-brand small,
.home-greeting p,
.content-heading p,
.quick-grid small,
.profile-menu small {
    color: var(--gray-text);
}

.brand-mark,
.home-greeting__avatar,
.profile-avatar,
.user-initial {
    color: #fff;
    border-color: rgba(59, 130, 246, 0.25);
    background: linear-gradient(145deg, #60a5fa, #2563eb);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.17);
}

.online-dot {
    border-color: #fffdf8;
    background: #3f9a6d;
}

.professional-header-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid #3b82f6;
    border-radius: 11px;
    color: #fff;
    background: #3b82f6;
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.18);
    font-weight: 750;
    cursor: pointer;
}

.nav-tabs {
    border-color: var(--border);
    background: rgba(255, 253, 248, 0.95);
    box-shadow: 0 -8px 28px rgba(55, 73, 61, 0.1);
}

.nav-tabs-inner {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.nav-btn {
    color: #68776f;
}

.nav-btn.active {
    color: #1d4ed8;
    background: linear-gradient(to bottom, rgba(59, 130, 246, 0.11), transparent);
    box-shadow: inset 0 2px #3b82f6;
}

.home-actions {
    grid-column: 1 / -1;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 253, 248, 0.88);
    box-shadow: 0 12px 30px rgba(55, 73, 61, 0.08);
}

.home-actions__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.home-actions__grid > button {
    min-width: 0;
    min-height: 112px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--white);
    text-align: left;
    background: #fff;
    box-shadow: 0 5px 16px rgba(55, 73, 61, 0.05);
    cursor: pointer;
}

.home-actions__grid > button:hover {
    border-color: rgba(59, 130, 246, 0.38);
    transform: translateY(-2px);
}

.home-actions__grid > button > span {
    width: 2.35rem;
    height: 2.35rem;
    display: grid;
    place-items: center;
    margin-bottom: 0.2rem;
    border-radius: 11px;
    color: #3b82f6;
    background: #eff6ff;
}

.home-actions__grid strong,
.home-actions__grid small {
    display: block;
}

.home-actions__grid strong {
    font-size: 0.88rem;
}

.home-actions__grid small {
    color: var(--gray-text);
    font-size: 0.75rem;
    line-height: 1.35;
}

.home-ai-action {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.65rem;
    padding: 0.65rem 1rem;
    border: 1px solid rgba(96, 78, 148, 0.22);
    border-radius: 12px;
    color: #594681;
    background: #f4effb;
    font-weight: 750;
    cursor: pointer;
}

.home-ai-action small {
    padding: 0.12rem 0.35rem;
    border-radius: 999px;
    color: #fff;
    background: #6c5598;
    font-size: 0.75rem;
}

.daily-summary,
.diary-panel,
.today-cardapio,
.profile-hero,
.profile-menu,
.chat-container,
.plan-card,
.plans-empty,
.meal-card,
.exercise-card,
.stat-card,
.measurement-card,
.professional-student-card,
.professional-plan-card,
.professional-plan-section {
    border-color: var(--border);
    color: var(--white);
    background: linear-gradient(145deg, rgba(16, 27, 22, 0.96), rgba(12, 20, 16, 0.92));
    box-shadow: 0 12px 30px rgba(55, 73, 61, 0.08);
}

.plan-card,
.meal-card,
.exercise-card {
    background: rgba(255, 253, 248, 0.98);
}

.plan-card__body,
.plan-card__body h3,
.plan-card__body p,
.plan-card__body .plan-date,
.meal-card h5,
.meal-card p,
.exercise-card h5,
.exercise-card p {
    color: #20372e;
}

.plan-card:hover,
.stat-card:hover,
.professional-student-card:hover {
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 16px 32px rgba(55, 73, 61, 0.12);
}

.macro-card,
.meal-card,
.exercise-card,
.profile-menu > button,
.quick-grid > button,
.choice-card,
.macro-stepper,
.professional-profile-grid article,
.professional-measure-grid article {
    border-color: var(--border);
    color: var(--white);
    background: rgba(255, 255, 255, 0.03);
}

.macro-card small,
.macro-card b,
.meal-card__header p,
.plan-card p,
.plan-date,
.plan-summary p,
.plan-summary small,
.plan-note,
.exercise-card__prescription small,
.current-exercise-note,
.current-exercise-instruction,
.exercise-guidance {
    color: var(--gray-text);
}

.form-group input,
.form-group select,
.form-group textarea,
.field-input,
.field-textarea,
.stepper__input,
.wizard-field input,
.wizard-field select,
.wizard-field textarea,
.filters input,
.filters select,
.chat-input-container input,
.form-textarea {
    border-color: var(--border);
    color: var(--white);
    background: #0a1222;
}

.modal {
    background: rgba(44, 56, 48, 0.48);
}

.modal-content,
.plan-wizard-modal .plan-wizard,
.login-card {
    border-color: var(--border-strong);
    color: var(--white);
    background: linear-gradient(180deg, rgba(16, 24, 40, 0.98), rgba(11, 18, 32, 0.98));
    box-shadow: 0 24px 70px rgba(50, 66, 55, 0.22);
}

.sheet-actions,
.plan-modal .modal-header,
.plan-modal .modal-actions,
.plan-wizard__header,
.plan-wizard__progress,
.plan-wizard__actions {
    border-color: var(--border);
    background: rgba(10, 18, 34, 0.96);
}

.plan-wizard__heading h3,
.wizard-step-heading h4,
.wizard-field > label,
.wizard-fieldset > legend,
.wizard-choice__surface,
.wizard-check__surface,
.wizard-review__title strong,
.professional-editor-basics label,
.professional-editor-day label,
.professional-exercise-row label,
.professional-meal-row label {
    color: var(--white);
}

.plan-wizard__heading p,
.wizard-step-heading p,
.wizard-field-hint,
.wizard-review__title span {
    color: var(--gray-text);
}

.wizard-choice input:checked + .wizard-choice__surface,
.wizard-check input:checked + .wizard-check__surface {
    color: #eafff3;
    background: rgba(94, 230, 168, 0.12);
}

.message-content,
.bot-message .message-content,
.user-message .message-content {
    border-color: var(--border);
    color: var(--white);
    background: #f3f6f1;
}

.toast {
    border-color: var(--border-strong);
    color: var(--white);
    background: #fffdf8;
    box-shadow: 0 12px 32px rgba(50, 66, 55, 0.16);
}

.toast.success {
    color: #1f6848;
    background: #eef8f1;
}

button,
[role="button"] {
    min-height: 44px;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea {
    min-height: 44px;
}

.header-icon-button,
.round-action,
.icon-add-button,
.filter-reset,
.back-button,
.btn-close,
.voice-btn,
.speak-btn,
.stepper__btn {
    min-width: 48px;
    min-height: 48px;
}

.app-brand {
    min-height: 48px;
}

small,
.eyebrow,
.content-kicker,
.plan-type,
.plan-count,
.text-button,
.compact-filters label > span,
.exercise-meta span,
.exercise-guidance,
.exercise-guidance strong,
.plan-note,
.current-exercise-note,
.current-exercise-note strong,
.current-exercise-instruction {
    font-size: max(0.75rem, 12px) !important;
}

@media (min-width: 960px) {
    body {
        background:
            radial-gradient(circle at 5% 0%, rgba(229, 192, 118, 0.2), transparent 34rem),
            radial-gradient(circle at 96% 40%, rgba(112, 167, 129, 0.11), transparent 34rem),
            #f6f1e7;
    }

    .nav-tabs-inner {
        background: rgba(255, 253, 248, 0.94);
        box-shadow: 0 14px 34px rgba(55, 73, 61, 0.1);
    }

    .nav-btn.active {
        box-shadow: inset 3px 0 #3b82f6;
    }
}

@media (max-width: 720px) {
    .home-actions__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-actions__grid > button {
        min-height: 120px;
    }

    .plan-note,
    .current-exercise-note,
    .current-exercise-instruction {
        display: flex !important;
        visibility: visible !important;
    }
}

@media (max-width: 560px) {
    .professional-header-button span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .professional-header-button {
        width: 48px;
        padding: 0;
    }
}

/* ============================================================
   DESIGN SYSTEM v2 — Liquid Glass refinado, mobile-first iOS
   Camada autoritativa (cascade final). Chrome em vidro;
   conteúdo sólido e escaneável.
   ============================================================ */

/* ---------- Header compacto em vidro ---------- */
.app-header {
    height: 3.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: none;
}

.app-shell {
    min-height: calc(100dvh - 3.5rem);
}

.app-brand strong {
    font-size: 0.92rem;
}

/* Ações do header: pill Premium + Google dedicado + auth */
.app-header__actions {
    gap: 0.4rem;
}

.guest-auth-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.google-header-button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0 0.9rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-full);
    color: #1f2937;
    background: #fff;
    box-shadow: var(--elev-sm);
    font-size: 0.84rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    cursor: pointer;
}

.google-header-button .google-g {
    flex: none;
}

@media (hover: hover) and (pointer: fine) {
    .google-header-button:hover {
        border-color: rgba(42, 82, 64, 0.35);
        box-shadow: var(--elev-md);
        transform: translateY(-1px);
    }
}

.premium-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.75rem;
    border: 1px solid rgba(59, 130, 246, 0.28);
    border-radius: var(--radius-full);
    color: #1d4ed8;
    background: var(--green-soft);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.premium-pill i {
    font-size: 0.72rem;
}

@media (hover: hover) and (pointer: fine) {
.premium-pill:hover {
        border-color: rgba(59, 130, 246, 0.5);
        background: rgba(59, 130, 246, 0.16);
    }
}

.premium-pill--lg {
    margin-top: 0.55rem;
    padding: 0.45rem 0.95rem;
    font-size: 0.85rem;
}

/* Em telas menores o Google assume como CTA principal do header */
@media (max-width: 560px) {
    .google-header-button span {
        font-size: 0.8rem;
    }

    .guest-auth-actions .btn-secondary {
        display: none;
    }
}

@media (max-width: 480px) {
    #premiumHeaderPill {
        display: none;
    }

    .guest-auth-actions .btn-primary {
        display: none;
    }
}

@media (max-width: 380px) {
    .google-header-button span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .google-header-button {
        width: 40px;
        padding: 0;
    }
}

/* ---------- Tab bar estilo iOS ---------- */
.nav-tabs {
    border-top: 1px solid var(--border);
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: none;
}

.nav-tabs-inner {
    width: min(100%, 560px);
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 0.35rem 0.5rem max(0.35rem, env(safe-area-inset-bottom));
}

.nav-btn {
    min-height: 3.6rem;
    border-radius: var(--radius-md);
    color: #68776f;
    font-size: 0.68rem;
    transition: color var(--transition), background var(--transition);
}

.nav-btn > i {
    font-size: 1.15rem;
    transition: transform var(--transition);
}

.nav-btn.active {
    color: #1f704d;
    background: radial-gradient(120% 90% at 50% 0%, rgba(40, 122, 85, 0.12), transparent 70%);
    box-shadow: none;
}

.nav-btn.active > i {
    transform: translateY(-1px);
}

/* ---------- Home: saudação e hierarquia de ações ---------- */
.home-greeting {
    grid-template-columns: auto minmax(0, 1fr);
    margin: 0.25rem 0 1rem;
}

.home-greeting h1 {
    font-size: 1.45rem;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.home-greeting p {
    color: var(--gray-text);
    font-size: 0.85rem;
}

.home-actions {
    padding: 0.85rem;
    border-radius: var(--radius-lg);
}

.home-actions__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.home-actions__grid .home-action {
    min-height: 96px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--white);
    text-align: left;
    background: #fff;
    box-shadow: var(--elev-sm);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
}

.home-actions__grid .home-action > span {
    width: 2.2rem;
    height: 2.2rem;
    display: grid;
    place-items: center;
    margin-bottom: 0.25rem;
    border-radius: 10px;
    color: #3b82f6;
    background: #eff6ff;
}

.home-actions__grid .home-action strong {
    font-size: 0.88rem;
    letter-spacing: -0.02em;
}

.home-actions__grid .home-action small {
    color: var(--gray-text);
    font-size: 0.74rem;
    line-height: 1.3;
}

.home-actions__grid .home-action--primary {
    grid-column: 1 / -1;
    min-height: 84px;
    flex-direction: row;
    align-items: center;
    gap: 0.7rem;
    border-color: transparent;
    color: #fff;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.home-actions__grid .home-action--primary > span {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.home-actions__grid .home-action--primary small {
    color: rgba(255, 255, 255, 0.82);
}

.home-actions__grid .home-action--ghost {
    grid-column: 1 / -1;
    min-height: 56px;
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    border-style: dashed;
    background: transparent;
    box-shadow: none;
}

.home-actions__grid .home-action--ghost > span {
    width: 2rem;
    height: 2rem;
    margin-bottom: 0;
}

@media (hover: hover) and (pointer: fine) {
    .home-actions__grid .home-action:hover {
        border-color: rgba(59, 130, 246, 0.38);
        box-shadow: var(--elev-md);
        transform: translateY(-2px);
    }

    .home-actions__grid .home-action--ghost:hover {
        background: rgba(59, 130, 246, 0.05);
    }
}

.home-ai-action {
    margin-top: 0.6rem;
    border-radius: var(--radius-full);
}

/* ---------- FAB (Criar plano) ---------- */
.fab {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: calc(5.4rem + env(safe-area-inset-bottom));
    z-index: 500;
    width: 56px;
    height: 56px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.36);
    font-size: 1.15rem;
    cursor: pointer;
}

body[data-active-tab="diet_plans"] .fab--diet-plans,
body[data-active-tab="workout_plans"] .fab--workout-plans {
    display: flex;
}

.fab:focus-visible,
.google-header-button:focus-visible,
.premium-pill:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* ---------- Content headers mais compactos ---------- */
.content-header {
    margin-bottom: 0.9rem;
}

.content-heading h2 {
    font-size: 1.3rem;
    letter-spacing: -0.03em;
}

.content-heading p {
    margin-top: 0.1rem;
    color: var(--gray-text);
    font-size: 0.85rem;
}

/* ---------- Desktop: adaptação real, não esticada ---------- */
@media (min-width: 960px) {
    .nav-tabs {
        position: sticky;
        top: 3.5rem;
        z-index: 600;
        border-top: 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-tabs-inner {
        width: min(100%, 720px);
        padding: 0.3rem 0.5rem;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .nav-btn.active {
        background: radial-gradient(120% 100% at 50% 100%, rgba(40, 122, 85, 0.12), transparent 72%);
    }

    .fab {
        right: calc(50vw - 380px);
    }
}

/* ---------- Portões de acessibilidade ---------- */
@media (prefers-reduced-motion: reduce) {
    .fab,
    .home-action,
    .google-header-button,
    .premium-pill,
    .nav-btn,
    .nav-btn > i {
        transition: none !important;
        transform: none !important;
    }
}

@media (prefers-reduced-transparency: reduce) {
    .app-header,
    .nav-tabs {
        background: #fffdf8;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

/* ---------- Final visual overrides: treino, estados e controles ---------- */
.btn-secondary {
    border: 1px solid var(--border-strong);
    color: #1d4ed8;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--elev-sm);
}

.header-icon-button,
.round-action,
.icon-add-button,
.filter-reset,
.back-button,
.btn-close,
.voice-btn,
.speak-btn,
.stepper__btn,
.replacement-close,
.replacement-apply,
.workout-edit-actions button,
.workout-day-panel .start-workout-button,
.workout-day-panel .finish-workout-button,
.workout-day-panel .plan-section-title button,
.workout-set-entry__heading button,
.replace-current-exercise-button,
.machine-busy-button,
.restore-exercise-button {
    border: 1px solid var(--border);
    color: #1d4ed8;
    background: #fff;
    box-shadow: var(--elev-sm);
}

.header-icon-button:hover,
.round-action:hover,
.icon-add-button:hover,
.filter-reset:hover,
.back-button:hover,
.btn-close:hover,
.voice-btn:hover,
.speak-btn:hover,
.stepper__btn:hover,
.replacement-close:hover,
.replacement-apply:hover,
.workout-edit-actions button:hover,
.workout-day-panel .start-workout-button:hover,
.workout-day-panel .finish-workout-button:hover,
.workout-day-panel .plan-section-title button:hover,
.workout-set-entry__heading button:hover,
.replace-current-exercise-button:hover,
.machine-busy-button:hover,
.restore-exercise-button:hover {
    border-color: rgba(59, 130, 246, 0.35);
    background: #fff;
    box-shadow: var(--elev-md);
}

.empty-state,
.session-inline-error,
.plans-loading,
.activity-date-group,
.activity-history-card,
.progress-weekly-card,
.progress-mini-grid article,
.diet-nutrition-summary,
.diet-cardapio-item,
.meal-card,
.day-chip,
.suggest-meal,
.chat-quick-actions .btn,
.chat-input-container,
.chat-message .message-content,
.plan-filter-bar select,
.compact-filters input,
.compact-filters select,
.form-group input,
.form-group select,
.form-group textarea,
.field-input,
.field-textarea,
.stepper__input,
.wizard-field input,
.wizard-field select,
.wizard-field textarea,
.filters input,
.filters select,
.modal-content .field-input,
.modal-content .field-textarea {
    color: var(--white);
    background: #fff;
}

.empty-state,
.plans-empty,
.activity-history-card,
.progress-weekly-card,
.progress-mini-grid article,
.diet-nutrition-summary,
.meal-card,
.day-chip,
.suggest-meal,
.plan-filter-bar select,
.chat-quick-actions .btn,
.chat-input-container,
.workout-today-card__shell,
.workout-current-sheet,
.workout-current-modal__body,
.workout-current-modal__plan,
.workout-current-day,
.workout-day-panel,
.active-session-bar,
.workout-complete-state,
.completed-workout-summary,
.replacement-panel,
.replacement-option,
.professional-editor-sheet,
.professional-editor-day,
.professional-editor-basics,
.professional-profile-grid article,
.professional-measure-grid article {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--elev-sm);
}

.current-exercise-stage {
    border-color: var(--border);
    background: #fff;
    box-shadow: var(--elev-sm);
}

.active-workout-toolbar {
    border-color: var(--border);
    background: rgba(255, 253, 248, 0.95);
    box-shadow: 0 4px 16px rgba(55, 73, 61, 0.08);
}

.active-workout-dock {
    border-color: var(--border);
    background: rgba(255, 253, 248, 0.97);
    box-shadow: 0 8px 24px rgba(55, 73, 61, 0.1);
    color: #20372e;
}

.active-workout-dock__copy small {
    color: #3d7a5a;
}

.active-workout-dock__copy strong {
    color: #1a2b22;
}

.active-workout-dock time {
    color: #1a2b22;
}

.active-workout-dock > i {
    color: #6a8a7a;
}

.active-workout-status span {
    color: #4a6580;
}

.active-workout-timer small {
    color: #596a7a;
}

.active-workout-timer time {
    color: #1a2b36;
}

.active-workout-progress > span b {
    color: #2d4050;
}

.cardapio-item {
    border-color: var(--border);
    background: rgba(255, 253, 248, 0.9);
    color: #20372e;
}

.diary-meal-card {
    border-color: var(--border);
    background: rgba(255, 253, 248, 0.9);
    color: #20372e;
}

.active-workout-timer {
    border-color: var(--border);
    background: rgba(255, 253, 248, 0.6);
}

.active-workout-progress > div {
    background: rgba(0, 0, 0, 0.08);
}

.workout-share-shell {
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: var(--elev-sm);
}

.workout-share-option,
.workout-share-preview {
    border-color: var(--border);
    background: rgba(255, 253, 248, 0.6);
    color: #20372e;
}

.workout-share-shell header button,
.completed-workout-close {
    border-color: var(--border);
    color: #4a6a5a;
    background: rgba(255, 253, 248, 0.9);
}

.workout-share-shell__actions .btn-secondary {
    color: #fff;
    background: #2dbb72;
    border-color: rgba(45, 187, 114, 0.4);
}

.completed-workout-metrics article {
    border-color: var(--border);
    background: rgba(255, 253, 248, 0.6);
    color: #20372e;
}

.completed-workout-metrics strong {
    color: #1a2b22;
}

.completed-workout-exercises li,
.workout-share-received {
    border-color: var(--border);
    background: rgba(255, 253, 248, 0.6);
    color: #20372e;
}

.active-workout-queue {
    border-color: var(--border);
    background: rgba(255, 253, 248, 0.6);
}

.workout-swipe-action--complete {
    color: #2dbb72;
    background: rgba(45, 187, 114, 0.12);
}

.workout-swipe-action--replace {
    color: #397ce9;
    background: rgba(57, 124, 233, 0.12);
}

.workout-share-editor {
    color: #20372e;
}

.workout-share-option h4,
.workout-share-preview h4 {
    color: #1a2b22;
}

.workout-share-option p,
.workout-share-preview p {
    color: #5a7a6a;
}

.workout-share-shell header h3 {
    color: #1a2b22;
}

.workout-share-shell header p {
    color: #5a7a6a;
}

.workout-share-preview__heading span,
.workout-share-preview__heading small {
    color: #5a7a6a;
}

.workout-share-exercise-controls label {
    color: #20372e;
}

.workout-current-day {
    position: relative;
    color: var(--white);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.workout-current-day strong,
.workout-current-day small {
    color: var(--white);
}

.workout-current-day.is-selected {
    border-color: rgba(59, 130, 246, 0.55);
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.16), rgba(59, 130, 246, 0.08));
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.14);
}

.workout-current-day.is-selected::after {
    content: "✓";
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    width: 1rem;
    height: 1rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: var(--action);
    font-size: 0.65rem;
    font-weight: 800;
}

.workout-current-day:hover {
    transform: translateY(-1px);
    border-color: rgba(59, 130, 246, 0.35);
}

.workout-current-day:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.8);
    outline-offset: 2px;
}

.workout-current-modal__status {
    margin: 0;
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(40, 122, 85, 0.18);
    background: rgba(40, 122, 85, 0.08);
    color: var(--white);
    font-weight: 700;
}

.workout-current-modal__status.is-invalid {
    border-color: rgba(159, 29, 49, 0.22);
    background: rgba(159, 29, 49, 0.08);
}

.workout-current-modal__status.is-valid {
    border-color: rgba(40, 122, 85, 0.22);
    background: rgba(40, 122, 85, 0.12);
}

.plans-loading,
.empty-state,
.session-inline-error {
    padding: 1rem;
}

.session-inline-error {
    color: #9f1d31;
    background: rgba(255, 236, 236, 0.92);
    border-color: rgba(159, 29, 49, 0.18);
}

.activity-history-card,
.progress-mini-grid article,
.workout-day-panel,
.workout-complete-state,
.completed-workout-summary,
.replacement-panel {
    color: var(--white);
}

.activity-history-card h3,
.activity-date-group h3,
.progress-weekly-card h3,
.progress-mini-grid strong,
.workout-day-panel h4,
.workout-complete-state h4,
.completed-workout-summary h3,
.replacement-panel h6,
.workout-current-sheet h4,
.workout-current-sheet p,
.workout-current-modal__body p {
    color: var(--white);
}

.activity-history-card p,
.activity-date-group p,
.progress-weekly-card p,
.progress-mini-grid p,
.workout-day-panel p,
.workout-complete-state p,
.completed-workout-summary p,
.replacement-panel p,
.workout-current-sheet small,
.workout-current-modal__hint,
.workout-today-card__shell p {
    color: var(--gray-text);
}

.plan-current-pill,
.workout-today-card__badge,
.workout-current-day.is-selected,
.workout-today-card__day.is-active {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.28);
}

/* --- Dark surface cleanup: remove leftover light cards under the dark identity --- */
.home-actions__grid > button:not(.home-action--primary):not(.home-action--ghost),
.home-actions__grid .home-action:not(.home-action--primary):not(.home-action--ghost),
.home-ai-action,
.pricing-card,
.professional-request,
.subscription-manage,
.plan-modal .modal-header,
.plan-modal .modal-actions,
.plan-wizard-modal .plan-wizard,
.session-inline-error,
.empty-state,
.plans-empty,
.activity-date-group,
.activity-history-card,
.progress-weekly-card,
.progress-mini-grid article,
.diet-nutrition-summary,
.meal-card,
.day-chip,
.suggest-meal,
.chat-quick-actions .btn,
.chat-input-container,
.chat-message .message-content,
.plan-filter-bar select,
.compact-filters input,
.compact-filters select,
.form-group input,
.form-group select,
.form-group textarea,
.field-input,
.field-textarea,
.stepper__input,
.wizard-field input,
.wizard-field select,
.wizard-field textarea,
.filters input,
.filters select,
.modal-content .field-input,
.modal-content .field-textarea,
.workout-today-card__shell,
.workout-current-sheet,
.workout-current-modal__body,
.workout-current-modal__plan,
.workout-day-panel,
.active-session-bar,
.workout-complete-state,
.completed-workout-summary,
.replacement-panel,
.workout-set-entry,
.workout-set-row,
.exercise-session-actions,
.workout-edit-actions,
.session-exercise-card,
.active-workout-toolbar,
.active-workout-dock,
.current-exercise-stage,
.active-workout-queue,
.workout-share-shell,
.workout-share-preview,
.workout-share-options,
.workout-share-option,
.workout-share-shell header button,
.workout-share-button,
.workout-share-photo-actions label,
.workout-share-photo-actions .workout-share-photo-select,
.workout-share-exercise-controls li,
.workout-share-mode-toggle,
.workout-share-mode-toggle button,
.workout-share-slider input[type="range"],
.profile-menu,
.profile-menu > button,
.choice-card,
.macro-stepper,
.profile-card,
.metric,
.card,
.pricing-card,
.professional-request,
.subscription-manage,
.review-card,
.item,
.candidate,
.table-wrap,
th,
td,
.login-tabs,
.login-card,
.auth-modal-content,
.guest-presentation,
.guest-presentation--standalone,
.plan-card,
.meal-card,
.exercise-card,
.stat-card,
.measurement-card,
.professional-plan-card,
.professional-student-card,
.macro-card,
.session-card,
.progress-card,
.mini,
.modal-card {
    background: var(--surface-raised);
    border-color: var(--border);
    color: var(--white);
}

.home-actions__grid > button:not(.home-action--primary):not(.home-action--ghost),
.home-actions__grid .home-action:not(.home-action--primary):not(.home-action--ghost),
.home-ai-action {
    box-shadow: var(--elev-sm);
}

.home-actions__grid .home-action:not(.home-action--primary):not(.home-action--ghost) > span,
.home-actions__grid > button:not(.home-action--primary):not(.home-action--ghost) > span {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.14);
}

.home-actions__grid .home-action:not(.home-action--primary):not(.home-action--ghost) small,
.home-actions__grid > button:not(.home-action--primary):not(.home-action--ghost) small,
.home-ai-action small {
    color: var(--gray-text);
}

.home-actions__grid .home-action strong,
.home-actions__grid > button strong,
.home-ai-action strong,
.home-ai-action p,
.home-ai-action span {
    color: var(--white);
}

.home-ai-action {
    background: linear-gradient(180deg, rgba(16, 24, 40, 0.98), rgba(11, 18, 32, 0.98));
}

.pricing-card,
.professional-request,
.subscription-manage,
.profile-card,
.metric,
.card,
.review-card,
.item,
.candidate,
.modal-card,
.choice-card,
.macro-stepper,
.professional-plan-card,
.professional-student-card,
.macro-card,
.session-card,
.progress-card,
.mini {
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.plan-modal .modal-header,
.plan-modal .modal-actions,
.plan-wizard-modal .plan-wizard,
.active-workout-toolbar,
.active-workout-dock,
.workout-share-shell,
.workout-share-preview,
.workout-share-options,
.workout-share-option,
.workout-share-shell header button,
.workout-share-button,
.workout-share-photo-actions label,
.workout-share-photo-actions .workout-share-photo-select,
.workout-share-exercise-controls li,
.workout-share-mode-toggle,
.workout-share-mode-toggle button,
.workout-share-slider input[type="range"] {
    border-color: var(--border);
    background: rgba(8, 14, 26, 0.96);
}

.workout-today-card__shell,
.workout-current-sheet,
.workout-current-modal__body,
.workout-current-modal__plan,
.workout-day-panel,
.active-session-bar,
.workout-complete-state,
.completed-workout-summary,
.replacement-panel,
.workout-set-entry,
.workout-set-row,
.exercise-session-actions,
.workout-edit-actions,
.session-exercise-card,
.current-exercise-stage,
.active-workout-queue {
    background: rgba(8, 14, 26, 0.94);
}

.diary-meal-card,
.cardapio-item,
.empty-state,
.suggest-meal,
.activity-date-group,
.activity-history-card,
.progress-weekly-card,
.progress-mini-grid article,
.diet-nutrition-summary,
.chat-quick-actions .btn,
.chat-input-container,
.chat-message .message-content,
.plan-filter-bar select,
.compact-filters input,
.compact-filters select,
.form-group input,
.form-group select,
.form-group textarea,
.field-input,
.field-textarea,
.stepper__input,
.wizard-field input,
.wizard-field select,
.wizard-field textarea,
.filters input,
.filters select,
.modal-content .field-input,
.modal-content .field-textarea,
.workout-current-modal__plan,
.workout-current-modal__body,
.workout-current-sheet,
.workout-day-panel,
.active-session-bar,
.workout-complete-state,
.completed-workout-summary,
.replacement-panel,
.workout-set-entry,
.workout-set-row,
.exercise-session-actions,
.workout-edit-actions,
.session-exercise-card,
.workout-current-modal__status,
.active-workout-toolbar,
.active-workout-dock,
.profile-menu > button,
.choice-card,
.review-card,
.pricing-card,
.professional-request,
.subscription-manage,
.candidate,
.item,
.metric,
.plan-card,
.meal-card,
.exercise-card,
.stat-card,
.measurement-card,
.professional-plan-card,
.professional-student-card,
.macro-card,
.session-card,
.progress-card,
.mini {
    color: var(--white);
}

.diary-meal-card strong,
.cardapio-item__copy strong,
.suggest-meal strong,
.workout-current-sheet strong,
.workout-day-panel strong,
.active-session-bar strong,
.workout-complete-state strong,
.completed-workout-summary strong,
.replacement-panel strong,
.workout-set-entry strong,
.session-exercise-card strong,
.active-workout-toolbar strong,
.active-workout-dock strong,
.pricing-card strong,
.professional-request strong,
.subscription-manage strong,
.empty-state strong,
.review-card strong,
.profile-card strong,
.choice-card strong,
.card strong,
.metric strong,
.mini strong,
.item strong,
.candidate strong,
.modal-card strong {
    color: var(--white);
}

.diary-meal-card small,
.cardapio-item small,
.suggest-meal small,
.workout-current-sheet small,
.workout-day-panel small,
.active-session-bar small,
.workout-complete-state small,
.completed-workout-summary small,
.replacement-panel small,
.workout-set-entry small,
.session-exercise-card small,
.active-workout-toolbar small,
.active-workout-dock small,
.pricing-card small,
.professional-request small,
.subscription-manage small,
.empty-state small,
.review-card small,
.profile-card small,
.choice-card small,
.card small,
.metric small,
.mini small,
.item small,
.candidate small,
.modal-card small {
    color: var(--gray-text);
}

.workout-today-card {
    margin: 0 0 1rem;
}

.workout-today-card__shell {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
}

.workout-today-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.workout-today-card__badge,
.plan-current-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 700;
}

.workout-today-card__week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem;
}

.workout-today-card__day,
.workout-current-day {
    display: grid;
    gap: 0.15rem;
    padding: 0.65rem 0.45rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface-soft);
    text-align: center;
}

.workout-today-card__day strong,
.workout-current-day strong {
    font-size: 0.78rem;
}

.workout-today-card__day small,
.workout-current-day small {
    color: var(--gray-text);
    font-size: 0.68rem;
}

.workout-today-card__day.is-planned,
.workout-today-card__day.is-active,
.workout-current-day.is-selected {
    border-color: rgba(59, 130, 246, 0.25);
    background: rgba(59, 130, 246, 0.08);
}

.workout-today-card__footer {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.workout-current-sheet {
    padding: 1rem;
}

.workout-current-modal__body {
    display: grid;
    gap: 0.85rem;
    padding: 0;
    border: 0;
    box-shadow: none;
}

.workout-current-modal__plan {
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--elev-sm);
}

.workout-current-modal__days {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

@media (min-width: 560px) {
    .workout-current-modal__days {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.workout-current-modal__hint {
    font-size: 0.8rem;
    padding: 0 0.15rem;
}

.workout-day-panel,
.active-session-bar,
.workout-complete-state,
.completed-workout-summary,
.replacement-panel,
.workout-set-entry,
.workout-set-row,
.exercise-session-actions,
.workout-edit-actions,
.session-exercise-card {
    background: #fff;
}

.workout-day-panel .session-exercise-card {
    border: 1px solid var(--border);
    background: #fff;
}

.workout-day-panel .exercise-card__content,
.workout-day-panel .exercise-card__image,
.workout-day-panel .exercise-card__number,
.workout-day-panel .exercise-card__prescription,
.workout-day-panel .exercise-guidance,
.workout-day-panel .plan-note,
.workout-day-panel .current-exercise-note,
.workout-day-panel .current-exercise-instruction,
.workout-day-panel .exercise-meta,
.workout-day-panel .exercise-meta span,
.workout-day-panel .exercise-meta small {
    color: var(--white);
}

.workout-set-entry__labels span,
.workout-set-row label span {
    color: var(--gray-text);
}

.workout-set-row input,
.workout-set-entry input,
.workout-set-entry textarea,
.workout-set-entry select {
    color: var(--white);
    background: #fff;
    border: 1px solid var(--border);
}

.active-session-bar {
    padding: 0.9rem 1rem;
    border: 1px solid rgba(40, 122, 85, 0.2);
    background: rgba(40, 122, 85, 0.08);
}

.workout-complete-state,
.completed-workout-summary {
    padding: 1rem;
}

.replacement-panel__header,
.replacement-option,
.replacement-option__body,
.replacement-option__body span {
    color: var(--white);
}

.replacement-panel__loading {
    color: var(--white);
}

.plans-loading,
.guest-presentation,
.guest-presentation--standalone {
    color: var(--white);
    background: #fff;
}

/* === FIT-TRACKER.AI DARK IDENTITY === */
:root {
    color-scheme: dark;
    --primary-green: #3b82f6;
    --dark-green: #1d4ed8;
    --action: #3b82f6;
    --action-hover: #2563eb;
    --action-strong: #1d4ed8;
    --action-soft: rgba(59, 130, 246, 0.14);
    --action-border: rgba(59, 130, 246, 0.45);
    --success: #2dd4bf;
    --success-soft: rgba(45, 212, 191, 0.12);
    --success-border: rgba(45, 212, 191, 0.3);
    --black: #050b16;
    --dark-gray: #0b1220;
    --light-gray: #111827;
    --white: #f8fafc;
    --gray-text: #a4b4c7;
    --muted-text: #7f8ea5;
    --surface: #0b1220;
    --surface-raised: #10192c;
    --surface-soft: #0f172a;
    --border: rgba(148, 163, 184, 0.18);
    --border-strong: rgba(148, 163, 184, 0.3);
    --green-soft: var(--success-soft);
    --blue-soft: var(--action-soft);
    --shadow-light: rgba(0, 0, 0, 0.18);
    --shadow-medium: rgba(0, 0, 0, 0.28);
    --shadow-heavy: rgba(0, 0, 0, 0.44);
    --app-blue: var(--action);
    --app-blue-soft: #93c5fd;
    --plan-blue: #60a5fa;
    --plan-accent: var(--success);
    --danger: #ef4444;
    --warning: #f59e0b;
}

html,
body {
    background: #050b16;
}

body {
    color: var(--white);
    background:
        radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.16), transparent 30rem),
        radial-gradient(circle at 100% 0%, rgba(45, 212, 191, 0.12), transparent 26rem),
        linear-gradient(180deg, #050b16, #08101d 45%, #050b16);
}

a {
    color: var(--app-blue-soft);
}

a:hover {
    color: #dbeafe;
}

.brand-mark,
.home-greeting__avatar,
.profile-avatar,
.user-initial {
    color: #fff;
    background: linear-gradient(135deg, #2dd4bf, #3b82f6);
    border-color: rgba(148, 163, 184, 0.16);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.brand-mark--image,
.logo-container .brand-mark--image,
.app-brand .brand-mark--image {
    display: grid;
    place-items: center;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.brand-mark--image img,
.logo-container .brand-mark--image img,
.app-brand .brand-mark--image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.app-header,
.nav-tabs,
.modal-content,
.chat-container,
.profile-menu,
.quick-grid > button,
.home-action,
.home-hero,
.plan-card,
.meal-card,
.exercise-card,
.stat-card,
.measurement-card,
.professional-plan-card,
.professional-student-card,
.professional-plan-section,
.today-cardapio,
.daily-summary,
.diary-panel,
.macro-card,
.session-card,
.progress-card,
.review-card,
.mini,
.item,
.candidate,
.table-wrap,
table,
.diet-nutrition-summary,
.plan-details-section,
.workout-share-card,
.session-exercise-card,
.workout-day-panel .session-exercise-card,
.replacement-option,
.replacement-option__body,
.replacement-panel__header,
.guest-presentation,
.guest-presentation--standalone {
    background: var(--surface-raised);
    border-color: var(--border);
    color: var(--white);
}

.app-header,
.nav-tabs,
.modal-content,
.profile-menu,
.chat-container,
.table-wrap,
.workout-share-card {
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
}

.app-brand strong,
.logo-text,
.title,
.section-head h2,
.section-head h3,
.plan-card h3,
.meal-card h5,
.exercise-card h5,
.stat-card strong,
.measurement-card strong,
.professional-plan-card h4,
.professional-student-card h4,
.workout-share-card__title h5 {
    color: var(--white);
}

.app-brand small,
.home-greeting p,
.content-heading p,
.quick-grid small,
.profile-menu small,
.plan-card p,
.meal-card p,
.exercise-card p,
.stat-card p,
.measurement-card p,
.review-card .meta,
.plan-date,
.workout-share-card__subtitle,
.workout-share-card__empty,
.muted,
.sub,
.login-subtitle {
    color: var(--gray-text);
}

.nav-btn,
.tab-btn,
.control,
.filters input,
.filters select,
.filters textarea,
.modal-body input,
.modal-body select,
.modal-body textarea,
.form-group input,
.form-group select,
.form-group textarea,
.workout-set-row input,
.workout-set-entry input,
.workout-set-entry textarea,
.workout-set-entry select {
    background: #0a1222;
    color: var(--white);
    border-color: var(--border);
}

.nav-btn.active,
.tab.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.24), rgba(45, 212, 191, 0.16));
    border-color: rgba(59, 130, 246, 0.38);
}

.app-header,
.nav-tabs,
.plan-card,
.meal-card,
.exercise-card,
.stat-card,
.measurement-card,
.professional-plan-card,
.professional-student-card,
.professional-plan-section,
.today-cardapio,
.daily-summary,
.diary-panel,
.macro-card,
.session-card,
.progress-card,
.review-card,
.mini,
.item,
.candidate,
.diet-nutrition-summary,
.workout-share-card,
.chat-container,
.profile-menu,
.modal-content {
    background: linear-gradient(180deg, rgba(16, 24, 40, 0.96), rgba(11, 18, 32, 0.96));
}

.btn-primary,
.action.primary,
.btn-add,
.btn-quick,
.btn-view,
.btn-adjust,
.dashboard-add,
.icon-add-button,
.ingredient-add,
.fab,
.home-action--primary,
.professional-header-button,
.premium-pill,
.google-header-button,
.header-icon-button,
.nav-btn.active,
.tab.active {
    color: #fff;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 12px 26px rgba(59, 130, 246, 0.18);
}

.btn-primary:hover,
.action.primary:hover,
.btn-add:hover,
.btn-quick:hover,
.btn-view:hover,
.btn-adjust:hover,
.dashboard-add:hover,
.icon-add-button:hover,
.ingredient-add:hover,
.fab:hover,
.home-action--primary:hover,
.professional-header-button:hover,
.premium-pill:hover,
.google-header-button:hover,
.header-icon-button:hover {
    background: linear-gradient(135deg, #93c5fd, #3b82f6);
    color: #fff;
}

.btn-secondary,
.action,
.control,
.tab-btn,
.tab,
.nav-btn,
.header-icon-button,
.premium-pill {
    background: rgba(10, 18, 34, 0.96);
    color: var(--white);
    border-color: var(--border);
}

.btn-secondary:hover,
.action:hover,
.tab-btn:hover,
.tab:hover,
.nav-btn:hover {
    border-color: rgba(59, 130, 246, 0.4);
    color: #fff;
}

.btn-delete,
.entry-action--danger,
.action.danger,
.workout-remove-exercise,
.finish-workout-button {
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.32);
}

.btn-delete:hover,
.entry-action--danger:hover,
.action.danger:hover,
.workout-remove-exercise:hover,
.finish-workout-button:hover {
    background: rgba(239, 68, 68, 0.18);
    color: #fff;
}

.plan-status--published,
.chip.good,
.precision-high,
.diet-nutrition-progress i,
.completed-workout-summary .success,
.success,
.positive,
.na-meta,
.progress-bar__fill,
.workout-share-card__indicator strong,
.workout-share-card__kicker {
    color: #d1fae5;
    background-color: rgba(45, 212, 191, 0.12);
}

.diet-nutrition-progress i {
    background: linear-gradient(90deg, #2dd4bf, #3b82f6);
}

.plan-card--workout .plan-card__icon,
.workout-summary .plan-summary__icon,
.stat-card__icon--blue,
.progress-card__icon,
.workout-share-card__footer span,
.workout-share-card__indicator small,
.action.secondary,
.btn-link,
.link,
.nav-tabs a,
.google-header-button span {
    color: var(--app-blue-soft);
}

.plan-card--workout .plan-card__icon,
.workout-summary .plan-summary__icon,
.stat-card__icon--blue,
.progress-card__icon {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.25);
}

.plan-card__topline,
.workout-share-card__separator,
.meal-card__separator,
.exercise-card__separator,
.section-head,
.modal-head,
.plan-day-tab,
.topbar,
.filters,
.profile-menu > button,
.workout-share-shell__actions,
.calendar-header,
.home-actions,
.workout-share-mode-toggle,
.workout-share-slider,
.plan-card__actions,
.btn-group,
.item,
.candidate,
.review-card,
.table-wrap,
th,
td,
.session-exercise-card,
.replacement-panel__header,
.replacement-option,
.replacement-option__body,
.workout-day-panel .session-exercise-card {
    border-color: var(--border);
}

.login-tabs,
.login-card,
.auth-modal-content,
.home-actions,
.workout-share-options,
.workout-share-option,
.home-hero,
.profile-menu,
.chat-input,
.profile-card,
.metric,
.card,
.plans-empty,
.plans-loading,
.guest-presentation,
.guest-presentation--standalone {
    background: rgba(8, 14, 26, 0.9);
    border-color: var(--border);
}

.app-header,
.nav-tabs {
    background: rgba(8, 14, 26, 0.92);
}

.login-subtitle,
.content-heading p,
.home-greeting p,
.meal-description,
.exercise-meta,
.replacement-option__body span,
.workout-share-card__subtitle,
.workout-share-card__empty,
.plan-note,
.current-exercise-note,
.current-exercise-instruction,
.suggest-preview,
.session-loading,
.legacy-plan-badge,
.profile-menu small,
.plan-date,
.chat-message .message-content,
.modal-hint,
.plan-summary p,
.professional-plan-card p,
.professional-student-card p,
.chart-note,
.time-label {
    color: var(--gray-text);
}

.plan-card,
.meal-card,
.exercise-card,
.stat-card,
.measurement-card,
.professional-plan-card,
.professional-student-card,
.macro-card,
.session-card,
.progress-card,
.review-card,
.mini,
.item,
.candidate,
.card,
.modal-card,
.home-action,
.quick-grid > button,
.profile-menu > button {
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.plan-card--clickable:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-adjust:focus-visible,
.btn-view:focus-visible,
.nav-btn:focus-visible,
.tab:focus-visible,
.action:focus-visible,
.control:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.75);
    outline-offset: 2px;
}

/* Final dark surface overrides: keep these after every legacy light rule. */
.pricing-card,
.professional-request,
.subscription-manage,
.plan-modal .modal-header,
.plan-modal .modal-actions,
.plan-wizard-modal .plan-wizard,
.empty-state,
.plans-empty,
.activity-date-group,
.activity-history-card,
.progress-weekly-card,
.progress-mini-grid article,
.diet-nutrition-summary,
.meal-card,
.day-chip,
.suggest-meal,
.chat-quick-actions .btn,
.chat-input-container,
.chat-message .message-content,
.plan-filter-bar select,
.compact-filters input,
.compact-filters select,
.form-group input,
.form-group select,
.form-group textarea,
.field-input,
.field-textarea,
.stepper__input,
.wizard-field input,
.wizard-field select,
.wizard-field textarea,
.filters input,
.filters select,
.modal-content .field-input,
.modal-content .field-textarea,
.workout-today-card__shell,
.workout-current-sheet,
.workout-current-modal__body,
.workout-current-modal__plan,
.workout-day-panel,
.active-session-bar,
.workout-complete-state,
.completed-workout-summary,
.replacement-panel,
.workout-set-entry,
.workout-set-row,
.exercise-session-actions,
.workout-edit-actions,
.session-exercise-card,
.active-workout-toolbar,
.active-workout-dock,
.current-exercise-stage,
.active-workout-queue,
.workout-share-shell,
.workout-share-preview,
.workout-share-options,
.workout-share-option,
.workout-share-shell header button,
.workout-share-button,
.workout-share-photo-actions label,
.workout-share-photo-actions .workout-share-photo-select,
.workout-share-exercise-controls li,
.workout-share-mode-toggle,
.workout-share-mode-toggle button,
.profile-menu,
.profile-menu > button,
.choice-card,
.macro-stepper,
.profile-card,
.metric,
.card,
.review-card,
.item,
.candidate,
.table-wrap,
th,
td,
.login-tabs,
.login-card,
.auth-modal-content,
.guest-presentation,
.guest-presentation--standalone,
.plan-card,
.meal-card,
.exercise-card,
.stat-card,
.measurement-card,
.professional-plan-card,
.professional-student-card,
.macro-card,
.session-card,
.progress-card,
.mini,
.modal-card,
.home-actions__grid > button:not(.home-action--primary):not(.home-action--ghost),
.home-actions__grid .home-action:not(.home-action--primary):not(.home-action--ghost),
.home-ai-action {
    background: rgba(8, 14, 26, 0.96) !important;
    border-color: var(--border) !important;
    color: var(--white) !important;
}

.home-actions__grid .home-action:not(.home-action--primary):not(.home-action--ghost) > span,
.home-actions__grid > button:not(.home-action--primary):not(.home-action--ghost) > span,
.cardapio-item__icon,
.diary-meal-card__icon,
.workout-share-card__indicator,
.workout-share-card__footer span,
.active-workout-dock__pulse,
.active-session-bar > i,
.workout-current-day.is-selected::after {
    color: #3b82f6 !important;
    background-color: rgba(59, 130, 246, 0.14) !important;
}

.home-actions__grid .home-action:not(.home-action--primary):not(.home-action--ghost) small,
.home-actions__grid > button:not(.home-action--primary):not(.home-action--ghost) small,
.home-ai-action small,
.diary-meal-card__content p,
.diary-meal-card__content time,
.diary-meal-card__macros span,
.diary-meal-card__energy small,
.cardapio-item__copy p,
.cardapio-item__macros span,
.suggest-meal small,
.workout-current-sheet small,
.workout-day-panel small,
.active-session-bar span,
.workout-complete-state small,
.completed-workout-summary small,
.replacement-panel small,
.workout-set-entry small,
.session-exercise-card small,
.active-workout-toolbar small,
.active-workout-dock small,
.pricing-card small,
.professional-request small,
.subscription-manage small,
.empty-state small,
.review-card small,
.profile-card small,
.choice-card small,
.card small,
.metric small,
.mini small,
.item small,
.candidate small,
.modal-card small {
    color: var(--gray-text) !important;
}

.diary-meal-card__content strong,
.cardapio-item__copy strong,
.suggest-meal strong,
.workout-current-sheet strong,
.workout-day-panel strong,
.active-session-bar strong,
.workout-complete-state strong,
.completed-workout-summary strong,
.replacement-panel strong,
.workout-set-entry strong,
.session-exercise-card strong,
.active-workout-toolbar strong,
.active-workout-dock strong,
.pricing-card strong,
.professional-request strong,
.subscription-manage strong,
.empty-state strong,
.review-card strong,
.profile-card strong,
.choice-card strong,
.card strong,
.metric strong,
.mini strong,
.item strong,
.candidate strong,
.modal-card strong,
.home-ai-action strong,
.home-ai-action p,
.home-ai-action span {
    color: var(--white) !important;
}

/* Extra-targeted fixes for the screens the user called out explicitly. */
.diary-meal-card,
.cardapio-item,
.meal-card,
.exercise-card,
.workout-day-panel,
.workout-today-card__shell,
.workout-current-sheet,
.workout-current-modal__plan,
.active-session-bar,
.current-exercise-stage,
.workout-day-panel .session-exercise-card,
.workout-set-entry,
.workout-set-row,
.exercise-session-actions,
.workout-edit-actions,
.replacement-panel,
.workout-complete-state,
.completed-workout-summary {
    background: rgba(8, 14, 26, 0.96) !important;
    border-color: var(--border) !important;
}

.diary-meal-card__content strong,
.diary-meal-card__energy strong,
.cardapio-item__copy strong,
.cardapio-item__status,
.meal-card h5,
.meal-card p,
.exercise-card h5,
.exercise-card p,
.workout-day-panel p,
.workout-day-panel small,
.workout-day-panel strong,
.workout-current-sheet strong,
.workout-current-sheet small,
.workout-current-modal__plan strong,
.workout-current-modal__plan small,
.active-session-bar span,
.active-session-bar small,
.current-exercise-stage strong,
.current-exercise-stage small,
.workout-set-entry strong,
.workout-set-entry small,
.workout-set-row strong,
.workout-set-row small,
.workout-edit-actions button,
.replacement-panel strong,
.replacement-panel small,
.workout-complete-state strong,
.workout-complete-state small,
.completed-workout-summary strong,
.completed-workout-summary small {
    color: var(--white) !important;
}

.diary-meal-card__content time,
.diary-meal-card__content p,
.diary-meal-card__macros span,
.diary-meal-card__energy small,
.cardapio-item__copy p,
.cardapio-item__macros span,
.meal-card__header p,
.exercise-card__prescription small,
.exercise-card__prescription > span,
.workout-day-panel p,
.workout-day-panel small,
.workout-current-sheet small,
.workout-current-modal__plan small,
.replacement-panel p,
.workout-complete-state p,
.completed-workout-summary p,
.active-session-bar small {
    color: var(--gray-text) !important;
}

.diary-meal-card__icon,
.cardapio-item__icon,
.workout-current-day.is-selected::after,
.active-session-bar > i,
.workout-today-card__badge,
.plan-current-pill {
    background: rgba(59, 130, 246, 0.14) !important;
    color: #3b82f6 !important;
}

.completed-workout-summary,
.workout-share-shell {
    background: radial-gradient(circle at 10% 0%, rgba(59, 130, 246, 0.12), transparent 24rem), rgba(8, 14, 26, 0.98) !important;
    border-color: var(--border) !important;
}

.completed-workout-summary *,
.workout-share-shell * {
    color: var(--white);
}

.completed-workout-summary p,
.completed-workout-summary small,
.completed-workout-summary li,
.completed-workout-summary .completed-workout-empty,
.workout-share-shell p,
.workout-share-shell small {
    color: var(--gray-text) !important;
}

.completed-workout-summary .workout-result-highlight,
.completed-workout-summary .workout-weekly-result,
.completed-workout-summary .workout-achievements-result,
.completed-workout-summary .completed-workout-exercises li {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(148, 163, 184, 0.16) !important;
}

.profile-measurement-cta {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.9rem;
    margin: 0 0 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 18px;
    color: #eff6ff;
    text-align: left;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.94), rgba(59, 130, 246, 0.72));
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.24);
}

/* Treino: execução diária primeiro; planejamento em segundo nível. */
.workout-page-header {
    margin-bottom: 1rem;
}

.workout-page-header .content-heading {
    display: grid;
    gap: 0.18rem;
}

.workout-page-header .content-heading h2 {
    margin: 0;
    font-size: clamp(1.65rem, 4vw, 2rem);
}

.workout-today-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.9rem;
    min-width: 0;
}

.workout-hub-hero,
.workout-hub-section,
.workout-hub-library-link,
.workout-plans-library {
    min-width: 0;
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(8, 14, 26, 0.96);
    box-shadow: var(--elev-sm);
}

.workout-hub-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(1rem, 3vw, 1.4rem);
    border-color: rgba(59, 130, 246, 0.3);
    background:
        radial-gradient(circle at 92% 0%, rgba(59, 130, 246, 0.2), transparent 18rem),
        linear-gradient(145deg, rgba(13, 24, 45, 0.99), rgba(8, 14, 26, 0.98));
    box-shadow: 0 20px 48px rgba(2, 8, 23, 0.3);
}

.workout-hub-hero--completed,
.workout-hub-hero--partial {
    border-color: rgba(52, 211, 153, 0.24);
    background:
        radial-gradient(circle at 92% 0%, rgba(52, 211, 153, 0.13), transparent 18rem),
        linear-gradient(145deg, rgba(9, 25, 31, 0.99), rgba(8, 14, 26, 0.98));
}

.workout-hub-hero__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.workout-hub-hero__header > div {
    min-width: 0;
}

.workout-hub-state,
.workout-hub-duration,
.workout-hub-plan__meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.workout-hub-state {
    width: fit-content;
    margin-bottom: 0.55rem;
    padding: 0.36rem 0.62rem;
    border-radius: 999px;
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.14);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.workout-hub-hero--completed .workout-hub-state,
.workout-hub-hero--partial .workout-hub-state {
    color: #6ee7b7;
    background: rgba(52, 211, 153, 0.12);
}

.workout-hub-hero__header small,
.workout-hub-exercise small,
.workout-hub-section-title span,
.workout-hub-plan p,
.workout-hub-library-link p {
    color: var(--gray-text);
}

.workout-hub-hero__header h3 {
    margin: 0.18rem 0 0;
    color: var(--white);
    font-size: clamp(1.45rem, 5vw, 2rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.workout-hub-hero__header p {
    margin: 0.45rem 0 0;
    color: #b9c5d8;
}

.workout-hub-duration {
    flex: 0 0 auto;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(147, 197, 253, 0.18);
    border-radius: 12px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.55);
    font-size: 0.78rem;
    font-weight: 700;
}

.workout-hub-sequence {
    margin-top: 0.85rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.13);
}

.workout-hub-details {
    margin-top: 0.8rem;
}

.workout-hub-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    min-height: 2.65rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 13px;
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.08);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 750;
    list-style: none;
}

.workout-hub-details summary::-webkit-details-marker {
    display: none;
}

.workout-hub-details summary:hover {
    border-color: rgba(147, 197, 253, 0.34);
    background: rgba(59, 130, 246, 0.12);
}

.workout-hub-details summary:focus-visible {
    outline: 2px solid rgba(96, 165, 250, 0.8);
    outline-offset: 2px;
}

.workout-hub-details summary > span {
    align-items: center;
    gap: 0.45rem;
}

.workout-hub-details__show {
    display: inline-flex;
}

.workout-hub-details__hide {
    display: none;
}

.workout-hub-details[open] .workout-hub-details__show {
    display: none;
}

.workout-hub-details[open] .workout-hub-details__hide {
    display: inline-flex;
}

.workout-hub-details summary small {
    flex: 0 0 auto;
    color: var(--gray-text);
    font-size: 0.72rem;
    font-weight: 650;
}

.workout-hub-section-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.workout-hub-section-title span {
    display: block;
    margin-bottom: 0.14rem;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.workout-hub-section-title h3,
.workout-hub-section-title h4,
.workout-hub-plan h3,
.workout-hub-library-link h3 {
    margin: 0;
    color: var(--white);
    letter-spacing: -0.02em;
}

.workout-hub-section-title h4 {
    font-size: 1rem;
}

.workout-hub-section-title > small {
    flex: 0 0 auto;
    color: #93c5fd;
    font-weight: 700;
}

.workout-hub-sequence ol {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.workout-hub-exercise {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    padding: 0.7rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
}

.workout-hub-exercise > span {
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.14);
    font-size: 0.78rem;
    font-weight: 800;
}

.workout-hub-exercise div {
    min-width: 0;
}

.workout-hub-exercise strong,
.workout-hub-exercise small {
    display: block;
}

.workout-hub-exercise strong {
    overflow: hidden;
    color: var(--white);
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workout-hub-exercise small {
    margin-top: 0.12rem;
    font-size: 0.72rem;
}

.workout-hub-primary {
    width: 100%;
    margin-top: 1rem;
}

.workout-hub-empty-copy {
    max-width: 34rem;
    margin: 1rem 0 0;
    color: var(--gray-text);
}

.workout-hub-section,
.workout-hub-library-link {
    padding: 1rem;
}

.workout-hub-week .workout-today-card__week {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    grid-template-columns: repeat(7, minmax(4.35rem, 1fr));
    padding-bottom: 0.15rem;
    scrollbar-width: thin;
}

.workout-hub-week .workout-today-card__day {
    min-width: 0;
    background: rgba(255, 255, 255, 0.025);
}

.workout-hub-week .workout-today-card__day.is-active {
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.15);
}

.workout-hub-week .workout-today-card__day small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workout-hub-plan,
.workout-hub-library-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.workout-hub-plan__copy,
.workout-hub-library-link > div {
    min-width: 0;
}

.workout-hub-plan p,
.workout-hub-library-link p {
    margin: 0.3rem 0 0;
    font-size: 0.84rem;
}

.workout-hub-plan__meta {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.65rem;
    color: #a8b6ca;
    font-size: 0.74rem;
}

.workout-hub-plan__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.45rem;
}

.workout-hub-library-link {
    background: rgba(8, 14, 26, 0.68);
}

.workout-plans-library {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
    padding: 1rem;
}

.workout-plans-library.hidden {
    display: none;
}

.workout-plans-library > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.workout-plans-library > header h2 {
    margin: 0.1rem 0 0;
    color: var(--white);
    font-size: 1.2rem;
}

.workout-plans-library .plan-filter-bar {
    margin: 0;
}

.workout-library-create {
    width: fit-content;
}

@media (min-width: 720px) {
    .workout-hub-sequence ol {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workout-hub-primary {
        width: auto;
        min-width: 12rem;
    }
}

@media (max-width: 600px) {
    .workout-hub-hero__header,
    .workout-hub-plan,
    .workout-hub-library-link {
        align-items: stretch;
        flex-direction: column;
    }

    .workout-hub-duration {
        width: fit-content;
    }

    .workout-hub-plan__actions {
        justify-content: space-between;
        padding-top: 0.15rem;
    }

    .workout-hub-library-link > button,
    .workout-library-create {
        width: 100%;
    }

    .workout-plans-library .plan-filter-bar {
        display: grid;
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .workout-plans-library .plan-filter-bar label,
    .workout-plans-library .plan-filter-bar select {
        width: 100%;
    }
}

.profile-measurement-cta > span {
    width: 2.8rem;
    height: 2.8rem;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.14);
}

.profile-measurement-cta strong,
.profile-measurement-cta small,
.profile-measurement-cta > i {
    color: #fff;
}

.profile-measurement-cta small {
    opacity: 0.86;
}

.activity-history-card {
    cursor: pointer;
}

.activity-history-card:focus-visible,
.profile-measurement-cta:focus-visible,
.workout-delete-button:focus-visible,
.cancel-workout-button:focus-visible,
.activity-history-card__open:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

.activity-history-card__open {
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 9px;
    color: #91a79c;
    background: rgba(255, 255, 255, 0.045);
    cursor: pointer;
}

.cancel-workout-button,
.workout-delete-button {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(239, 68, 68, 0.22);
    border-radius: 12px;
    color: #fecaca;
    background: rgba(239, 68, 68, 0.08);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.workout-delete-button {
    margin-top: 0.25rem;
}

.cancel-workout-button,
.workout-delete-button {
    color: #fecaca !important;
}

.cancel-workout-button i,
.workout-delete-button i {
    color: inherit !important;
}

#statsTab .profile-hero,
#statsTab .stat-card,
#statsTab .profile-menu {
    background: linear-gradient(145deg, rgba(16, 27, 22, 0.96), rgba(12, 20, 16, 0.92)) !important;
    color: var(--white) !important;
}

#statsTab .stat-card small,
#statsTab .stat-card #latestMeasurement > span,
#statsTab .profile-menu small,
#statsTab .profile-hero p {
    color: var(--gray-text) !important;
}

#statsTab .profile-menu > button {
    background: rgba(255, 255, 255, 0.03) !important;
}

/* Achievements hub */
#achievementsTab { width: 100%; }
.achievements-heading { margin-bottom: 1rem; }

.achievement-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 9rem;
    padding: 1.2rem;
    border: 1px solid rgba(211, 169, 92, 0.24);
    border-radius: 22px;
    background: radial-gradient(circle at 92% 10%, rgba(213, 167, 81, 0.18), transparent 15rem), linear-gradient(145deg, #151712, #101410 58%, #17150f);
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.28), inset 0 1px rgba(255, 255, 255, 0.04);
}

.achievement-hero h3 {
    margin-top: 0.2rem;
    color: #fffaf0;
    font-size: clamp(1.4rem, 4vw, 2rem);
    letter-spacing: -0.045em;
}

.achievement-hero p {
    max-width: 34rem;
    margin-top: 0.35rem;
    color: #aeb8b0;
    font-size: 0.76rem;
}

.achievement-hero__stats { display: flex; flex: none; gap: 0.5rem; }
.achievement-hero__stats span {
    min-width: 5.2rem;
    padding: 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: #9da9a1;
    background: rgba(255, 255, 255, 0.035);
    font-size: 0.62rem;
    text-align: center;
}

.achievement-hero__stats strong { display: block; color: #f3d59b; font-size: 1.2rem; }
.achievement-filters {
    display: flex;
    gap: 0.35rem;
    margin: 0.85rem 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.achievement-filters::-webkit-scrollbar { display: none; }
.achievement-filters button {
    min-height: 2.3rem;
    flex: none;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #849189;
    background: rgba(255, 255, 255, 0.025);
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
}

.achievement-filters button.is-active {
    border-color: rgba(215, 175, 101, 0.35);
    color: #f2d399;
    background: rgba(204, 155, 70, 0.11);
}

.achievement-showcase,
.achievement-catalog-section {
    margin-top: 0.9rem;
    padding: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(12, 20, 16, 0.78);
}

.achievement-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem; }
.achievement-slot {
    min-height: 5rem;
    display: grid;
    grid-template-columns: auto 1fr;
    align-content: center;
    gap: 0.1rem 0.55rem;
    padding: 0.75rem;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: #657169;
    background: rgba(255, 255, 255, 0.018);
    text-align: left;
}

button.achievement-slot { cursor: pointer; }

.achievement-slot > span {
    grid-row: 1 / 3;
    width: 1.7rem;
    height: 1.7rem;
    display: grid;
    place-items: center;
    align-self: center;
    border-radius: 50%;
    color: #9a814f;
    background: rgba(201, 159, 79, 0.09);
    font-size: 0.64rem;
    font-weight: 800;
}

.achievement-slot strong { color: #89958d; font-size: 0.7rem; }
.achievement-slot small { font-size: 0.58rem; }
.achievement-slot.is-filled {
    border-style: solid;
    border-color: rgba(197, 156, 79, 0.24);
    color: #b8a171;
    background: linear-gradient(145deg, rgba(194, 148, 66, 0.09), rgba(255, 255, 255, 0.02));
}

.achievement-slot.is-filled strong { color: #f3e7cc; }
.achievement-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
.achievement-card {
    position: relative;
    min-height: 14rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    gap: 0.8rem;
    padding: 0.95rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(27, 34, 29, 0.96), rgba(13, 21, 17, 0.96));
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
}

.achievement-card.is-unlocked {
    border-color: rgba(201, 161, 86, 0.25);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18), inset 0 1px rgba(255, 255, 255, 0.05);
}

.achievement-card.is-locked { filter: saturate(0.55); }
.achievement-medallion {
    position: relative;
    z-index: 1;
    width: 3.25rem;
    height: 3.25rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(206, 164, 87, 0.32);
    border-radius: 50%;
    color: #dfba73;
    background: radial-gradient(circle at 35% 28%, #5b4728, #241f15 70%);
    box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.18), 0 8px 20px rgba(0, 0, 0, 0.25);
}

.achievement-tier--prata .achievement-medallion {
    border-color: rgba(194, 205, 201, 0.38);
    color: #d9e2de;
    background: radial-gradient(circle at 35% 28%, #52605a, #202723 70%);
}

.achievement-tier--ouro .achievement-medallion,
.achievement-tier--platina .achievement-medallion,
.achievement-card--badge .achievement-medallion {
    border-color: rgba(226, 183, 99, 0.45);
    color: #f4cc7e;
    background: radial-gradient(circle at 35% 28%, #786038, #2d271b 70%);
}

.achievement-card.is-locked .achievement-medallion {
    border-color: rgba(255, 255, 255, 0.09);
    color: #657068;
    background: radial-gradient(circle at 35% 28%, #303833, #181d1a 70%);
}

.achievement-card__body { position: relative; z-index: 1; min-width: 0; }
.achievement-card__eyebrow {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    color: #c6a968;
    font-size: 0.56rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.achievement-card__eyebrow small { color: #66736b; }
.achievement-card h4 { margin-top: 0.35rem; color: #f4f1e8; font-size: 0.95rem; letter-spacing: -0.025em; }
.achievement-card p { min-height: 2.6em; margin-top: 0.35rem; color: #9aa79f; font-size: 0.67rem; line-height: 1.45; }
.achievement-card time { display: block; margin-top: 0.6rem; color: #7e8b83; font-size: 0.58rem; }
.achievement-card footer { position: relative; z-index: 1; grid-column: 1 / -1; align-self: end; }
.achievement-progress { margin-top: 0.75rem; }
.achievement-progress > div { display: flex; justify-content: space-between; color: #8e9a92; font-size: 0.58rem; }
.achievement-progress > i { height: 0.3rem; display: block; margin-top: 0.28rem; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, 0.06); }
.achievement-progress > i > span { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, #8d6a34, #d7ae63); }
.achievement-pin-action {
    width: 100%;
    min-height: 2.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid rgba(204, 162, 84, 0.28);
    border-radius: 11px;
    color: #e8c982;
    background: rgba(197, 148, 62, 0.08);
    font-size: 0.64rem;
    font-weight: 800;
    cursor: pointer;
}

.achievement-pin-action.is-selected { border-color: rgba(98, 230, 154, 0.28); color: #9beabe; background: rgba(98, 230, 154, 0.08); }
.achievement-pin-action:disabled,
.achievement-slot:disabled { cursor: wait; opacity: 0.72; }
.achievement-locked-label { min-height: 2.45rem; display: flex; align-items: center; gap: 0.4rem; color: #68746c; font-size: 0.62rem; font-weight: 700; }
.achievement-empty,
.achievement-load-error {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    gap: 0.3rem;
    min-height: 10rem;
    padding: 1rem;
    color: #849087;
    text-align: center;
}

.achievement-empty i { color: #8e7442; font-size: 1.4rem; }
.achievement-empty p,
.achievement-load-error p { font-size: 0.65rem; }
.achievement-load-error button { min-height: 2.4rem; padding: 0.45rem 0.8rem; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface-raised); }

@media (max-width: 680px) {
    .achievement-hero { align-items: flex-start; flex-direction: column; }
    .achievement-hero__stats { width: 100%; }
    .achievement-hero__stats span { flex: 1; }
    .achievement-slots,
    .achievement-card-grid { grid-template-columns: 1fr; }
    .achievement-slot { min-height: 4.2rem; }
}

/* ========================
   PROFILE DASHBOARD
   ======================== */

.profile-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-dashboard-section {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem;
}

.profile-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.profile-section-heading h3 { margin: 0; font-size: 1rem; }
.profile-section-heading > button {
    min-height: 2rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.7rem;
    white-space: nowrap;
}

/* Identity Card */
.profile-identity-card {
    background: linear-gradient(135deg, #181d23 0%, #1f2733 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.profile-identity-card__top {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.profile-identity-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0b4d38, #0a6b4c);
    display: grid;
    place-items: center;
    color: #b9ffd6;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.profile-identity-copy { flex: 1; min-width: 0; }
.profile-identity-copy h2 { margin: 0; font-size: 1.1rem; line-height: 1.2; }
.profile-identity-copy p { margin: 0.1rem 0 0; color: var(--text-secondary); font-size: 0.75rem; }
.profile-icon-action {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    display: grid;
    place-items: center;
    cursor: pointer;
}
.profile-icon-action:hover,
.profile-icon-action:focus-visible { background: rgba(255,255,255,0.08); color: #fff; }

.profile-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.profile-badges.hidden { display: none; }
.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 0.65rem;
    color: var(--text-secondary);
}

.profile-plan-cta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.8rem;
    border-radius: 10px;
    border: 1px solid rgba(217,169,78,0.25);
    background: linear-gradient(135deg, rgba(217,169,78,0.1), rgba(217,169,78,0.04));
    color: var(--premium-text, #d9a94e);
    cursor: pointer;
    text-align: left;
    width: 100%;
}
.profile-plan-cta strong { font-size: 0.8rem; }
.profile-plan-cta small { display: block; font-size: 0.65rem; color: var(--text-secondary); margin-top: 0.1rem; }
.profile-plan-cta i:last-child { margin-left: auto; font-size: 0.6rem; color: var(--text-muted); }

/* Guest Panel */
.profile-guest-panel {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1rem;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 14px;
}
.profile-guest-panel > span:first-child {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(16,185,129,0.1);
    display: grid;
    place-items: center;
    color: #10b981;
    flex-shrink: 0;
}
.profile-guest-panel h3 { margin: 0; font-size: 0.9rem; }
.profile-guest-panel p { margin: 0.2rem 0 0.6rem; font-size: 0.7rem; color: var(--text-secondary); }
.profile-guest-panel button {
    padding: 0.5rem 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--emerald-500, #10b981);
    background: var(--emerald-500, #10b981);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}
.profile-guest-panel.hidden { display: none; }

/* Quick Actions */
.profile-quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}
.profile-quick-actions button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.8rem 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-base);
    color: var(--text-primary);
    cursor: pointer;
    text-align: center;
}
.profile-quick-actions button span {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(16,185,129,0.08);
    display: grid;
    place-items: center;
    color: var(--emerald-500, #10b981);
    font-size: 0.85rem;
}
.profile-quick-actions button strong { font-size: 0.72rem; font-weight: 600; }
.profile-quick-actions button:hover span { background: rgba(16,185,129,0.16); }

/* Evolution Grid */
.profile-evolution-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
}
.profile-evolution-card {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-base);
    min-height: 62px;
}
.profile-evolution-card--wide { cursor: pointer; }
.profile-evolution-card--wide:hover { border-color: var(--emerald-500, #10b981); }
.profile-evolution-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(16,185,129,0.1);
    display: grid;
    place-items: center;
    color: var(--emerald-500, #10b981);
    font-size: 0.8rem;
    flex-shrink: 0;
}
.profile-evolution-card__icon--blue { background: rgba(59,130,246,0.1); color: #3b82f6; }
.profile-evolution-card small { display: block; color: var(--text-muted); font-size: 0.62rem; }
.profile-evolution-card strong { display: block; font-size: 0.95rem; line-height: 1.2; }
.profile-evolution-card p { margin: 0.1rem 0 0; font-size: 0.62rem; color: var(--text-muted); }
.profile-evolution-card i.fa-chevron-right { margin-left: auto; font-size: 0.55rem; color: var(--text-muted); }

/* Recent Activities */
.profile-recent-activities {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.profile-recent-activities__empty {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem;
    border-radius: 12px;
    border: 1px dashed var(--border-strong);
    color: var(--text-muted);
    font-size: 0.75rem;
}
.profile-recent-card {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem 0.8rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-base);
    cursor: pointer;
}
.profile-recent-card:hover { border-color: var(--emerald-500, #10b981); }
.profile-recent-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(16,185,129,0.1);
    display: grid;
    place-items: center;
    color: var(--emerald-500, #10b981);
    font-size: 0.8rem;
    flex-shrink: 0;
}
.profile-recent-card div { flex: 1; min-width: 0; }
.profile-recent-card strong { display: block; font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-recent-card p { margin: 0.15rem 0 0; font-size: 0.65rem; color: var(--text-secondary); }
.profile-recent-card i.fa-chevron-right { font-size: 0.55rem; color: var(--text-muted); }

/* Settings List */
.profile-settings-list {
    display: flex;
    flex-direction: column;
}
.profile-settings-list button {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    background: transparent;
    text-align: left;
    color: var(--text-primary);
    cursor: pointer;
    width: 100%;
}
.profile-settings-list button:last-child { border-bottom: none; }
.profile-settings-list button > span:first-child {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.profile-settings-list button div { flex: 1; min-width: 0; }
.profile-settings-list button strong { display: block; font-size: 0.8rem; }
.profile-settings-list button small { display: block; font-size: 0.65rem; color: var(--text-secondary); margin-top: 0.05rem; }
.profile-settings-list button i.fa-chevron-right { font-size: 0.55rem; color: var(--text-muted); flex-shrink: 0; }
.profile-settings-list button:hover > span:first-child { border-color: var(--emerald-500, #10b981); color: var(--emerald-500, #10b981); }
.profile-settings-list__danger button,
.profile-settings-list button.profile-settings-list__danger { color: #ef4444; }
.profile-settings-list button.profile-settings-list__danger > span:first-child { border-color: rgba(239,68,68,0.25); color: #ef4444; }

/* ========================
   PROFILE SUBPAGES
   ======================== */

.profile-subpage-header {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}
.profile-subpage-header--simple { padding-bottom: 0; }
.profile-subpage-back {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-raised);
    color: var(--text-secondary);
    display: grid;
    place-items: center;
    cursor: pointer;
}
.profile-subpage-back:hover { border-color: var(--emerald-500, #10b981); color: var(--emerald-500, #10b981); }
.profile-subpage-header h2 { margin: 0; font-size: 1.2rem; }
.profile-subpage-header p { margin: 0.15rem 0 0; font-size: 0.72rem; color: var(--text-secondary); }
.profile-subpage-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--emerald-500, #10b981);
    background: var(--emerald-500, #10b981);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    width: fit-content;
}

/* Measurement Summary */
.measurement-summary {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.9rem;
    margin-bottom: 0.8rem;
}
.measurement-summary__hero {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.measurement-summary__hero small { display: block; color: var(--text-muted); font-size: 0.62rem; }
.measurement-summary__hero strong { display: block; font-size: 1.4rem; line-height: 1.2; }
.measurement-summary__delta {
    padding: 0.25rem 0.55rem;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}
.measurement-summary__delta--up { background: rgba(239,68,68,0.1); color: #ef4444; }
.measurement-summary__delta--down { background: rgba(16,185,129,0.1); color: #10b981; }
.measurement-summary__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px solid var(--border);
    font-size: 0.65rem;
    color: var(--text-secondary);
}
.measurement-summary__empty {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
}
.measurement-summary__empty i { font-size: 1rem; color: var(--text-muted); margin-top: 0.1rem; }
.measurement-summary__empty strong { display: block; font-size: 0.8rem; }
.measurement-summary__empty p { margin: 0.15rem 0 0.5rem; font-size: 0.68rem; color: var(--text-secondary); }
.measurement-summary__empty button {
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--emerald-500, #10b981);
    background: var(--emerald-500, #10b981);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
}

/* Profile Filter Disclosure */
.profile-filter-disclosure {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-base);
    margin-bottom: 0.8rem;
    overflow: hidden;
}
.profile-filter-disclosure summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.8rem;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--text-secondary);
    list-style: none;
}
.profile-filter-disclosure summary::-webkit-details-marker { display: none; }
.profile-filter-disclosure summary span { display: flex; align-items: center; gap: 0.4rem; }
.profile-filter-disclosure summary i { font-size: 0.55rem; transition: transform 0.2s ease; }
.profile-filter-disclosure[open] summary i.fa-chevron-down { transform: rotate(180deg); }
.profile-filter-disclosure .filters { padding: 0.6rem 0.8rem; border-top: 1px solid var(--border); }

/* Load More */
.profile-load-more {
    display: flex;
    justify-content: center;
    padding: 0.8rem 0 0.2rem;
}
.profile-load-more button {
    padding: 0.5rem 1.1rem;
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    background: var(--surface-raised);
    color: var(--text-secondary);
    font-size: 0.72rem;
    cursor: pointer;
}
.profile-load-more button:hover { border-color: var(--emerald-500, #10b981); color: var(--emerald-500, #10b981); }

/* ========================
   RESPONSIVE
   ======================== */

@media (min-width: 640px) {
    .profile-quick-actions { grid-template-columns: repeat(3, 1fr); }
    .profile-evolution-grid { grid-template-columns: 1fr 1fr; }
    .profile-evolution-card--wide { grid-column: 1 / -1; }
}

@media (max-width: 420px) {
    .profile-identity-card__top { gap: 0.55rem; }
    .profile-identity-avatar { width: 46px; height: 46px; font-size: 1rem; }
    .profile-quick-actions { gap: 0.45rem; }
    .profile-quick-actions button { padding: 0.65rem 0.4rem; }
    .profile-quick-actions button span { width: 34px; height: 34px; font-size: 0.8rem; }
    .profile-quick-actions button strong { font-size: 0.68rem; }
}

.professional-student-card:focus-visible,
.professional-draft-list > button:focus-visible {
    outline: 3px solid var(--app-blue-soft);
    outline-offset: 3px;
}

.review-card.review-card--new {
    border-color: var(--success);
    background: var(--success-soft);
    box-shadow: 0 0 0 3px var(--success-border);
}

.modal.show.modal--active {
    z-index: 1100;
}

/* Hoje: execução diária, sem alterar os demais destinos. */
#dietTab .lucide {
    width: 1em;
    height: 1em;
    flex: 0 0 auto;
    stroke-width: 2;
}
@keyframes today-icon-spin { to { transform: rotate(360deg); } }
#dietTab .today-icon--spin { animation: today-icon-spin 1s linear infinite; }
#dietTab {
    max-width: 820px;
    margin-inline: auto;
    padding-bottom: 1.5rem;
}
#dietTab:not(.hidden) { display: block; }
#dietTab .today-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.35rem;
}
#dietTab .today-heading h1 {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(1.75rem, 4vw, 2.1rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
}
#dietTab .today-heading p {
    margin: 0.4rem 0 0;
    color: #8fa0b5;
    font-size: 0.82rem;
    font-weight: 500;
}
#dietTab .home-greeting__avatar {
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), 0 8px 20px rgba(0, 0, 0, 0.24);
    transition: transform 180ms ease, box-shadow 180ms ease;
}
#dietTab .home-greeting__avatar:hover { transform: translateY(-1px); }
#dietTab .home-greeting__avatar:focus-visible {
    outline: 3px solid rgba(147, 197, 253, 0.75);
    outline-offset: 3px;
}
#dietTab .today-muted {
    color: #8fa0b5;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.45;
}
#dietTab .today-workout {
    position: relative;
    overflow: hidden;
    padding: 1.15rem;
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-radius: 18px;
    background:
        radial-gradient(circle at 92% 5%, rgba(96, 165, 250, 0.15), transparent 10rem),
        linear-gradient(145deg, rgba(23, 40, 70, 0.96), rgba(13, 24, 43, 0.96));
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
#dietTab .today-workout::after {
    position: absolute;
    width: 7rem;
    height: 7rem;
    top: -4.5rem;
    right: -2rem;
    border: 1px solid rgba(147, 197, 253, 0.09);
    border-radius: 50%;
    content: '';
}
#dietTab .today-workout__head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}
#dietTab .today-workout__icon {
    width: 2.55rem;
    height: 2.55rem;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid rgba(147, 197, 253, 0.24);
    border-radius: 12px;
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.14);
    font-size: 0.95rem;
}
#dietTab .today-workout h2 {
    margin: 0.18rem 0 0;
    color: #f8fafc;
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
}
#dietTab .today-workout .btn-primary {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 2.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin-top: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, #4f8dff, #3268e8);
    box-shadow: 0 9px 22px rgba(37, 99, 235, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    font-size: 0.88rem;
    font-weight: 800;
    transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}
#dietTab .today-workout .btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 11px 26px rgba(37, 99, 235, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
#dietTab .today-workout .btn-primary:focus-visible {
    outline: 3px solid rgba(147, 197, 253, 0.7);
    outline-offset: 3px;
}
#dietTab .today-workout-status {
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0.2rem;
    color: #d8e3ef;
    font-size: 0.82rem;
    font-weight: 650;
}
#dietTab .today-food {
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}
#dietTab .today-food-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
#dietTab .today-food h2 {
    margin: 0;
    color: #f3f8f5;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
#dietTab #todayMealCount { margin: 0.18rem 0 0.7rem; }
#dietTab .today-meal {
    padding: 0.95rem;
    border: 1px solid rgba(45, 212, 191, 0.18);
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(16, 36, 43, 0.82), rgba(13, 25, 38, 0.82));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
#dietTab .today-meal__intro {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
#dietTab .today-meal__intro .today-muted { margin: 0; }
#dietTab .today-meal__icon {
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #83e5cf;
    background: rgba(45, 212, 191, 0.1);
    font-size: 0.88rem;
}
#dietTab .today-food h3 {
    margin: 0.12rem 0 0;
    color: #f1f8f5;
    font-size: 1rem;
    font-weight: 750;
}
#dietTab .today-food-description {
    margin: 0.75rem 0 0.9rem;
    color: #c8d5df;
    font-size: 0.84rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
#dietTab .today-food-primary {
    width: 100%;
    min-height: 2.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.62rem 0.9rem;
    border: 1px solid rgba(45, 212, 191, 0.36);
    border-radius: 10px;
    color: #d7fff5;
    background: rgba(45, 212, 191, 0.12);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}
#dietTab:not(.today-workout-priority) .today-food-primary {
    color: #062019;
    background: linear-gradient(135deg, #5ee0bd, #2bbba7);
    box-shadow: 0 7px 18px rgba(20, 184, 166, 0.2);
}
#dietTab .today-food-primary:hover {
    border-color: rgba(94, 234, 212, 0.65);
    background-color: rgba(45, 212, 191, 0.18);
    transform: translateY(-1px);
}
#dietTab .today-food-primary:focus-visible,
#dietTab .text-button:focus-visible {
    outline: 3px solid rgba(94, 234, 212, 0.45);
    outline-offset: 2px;
}
#dietTab .today-action-spinner {
    width: 0.85rem;
    height: 0.85rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: today-action-spin 700ms linear infinite;
}
@keyframes today-action-spin { to { transform: rotate(360deg); } }
#dietTab .today-food-primary:disabled { cursor: wait; opacity: 0.82; transform: none; }
#dietTab .today-food-secondary {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.15rem 0.75rem;
    margin-top: 0.25rem;
}
#dietTab .today-meal-options {
    margin-top: 0.35rem;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}
#dietTab .today-meal-option {
    width: 100%;
    display: grid;
    grid-template-columns: 4.2rem minmax(0, 1fr);
    gap: 0.6rem;
    padding: 0.65rem 0.15rem;
    border: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    color: #bfccd7;
    background: transparent;
    text-align: left;
    cursor: pointer;
}
#dietTab .today-meal-option:last-child { border-bottom: 0; }
#dietTab .today-meal-option strong { color: #76dbc3; font-size: 0.73rem; }
#dietTab .today-meal-option span {
    overflow: hidden;
    color: #9cabb9;
    font-size: 0.72rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#dietTab .today-meal-option:hover,
#dietTab .today-meal-option.is-selected { color: #eefbf7; background: rgba(45, 212, 191, 0.055); }
#dietTab .today-meal-option:focus-visible {
    outline: 2px solid rgba(94, 234, 212, 0.45);
    outline-offset: -2px;
}
#dietTab .text-button {
    min-height: 2.5rem;
    padding-inline: 0.15rem;
    color: #76dbc3;
    white-space: normal;
    font-size: 0.73rem;
    font-weight: 750;
}
#dietTab .text-button:hover { color: #b0f4e3; }
#dietTab .today-nutrition {
    margin-bottom: 1rem;
    padding: 0.75rem 0.8rem 0.8rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 17px;
    background: linear-gradient(145deg, rgba(20, 32, 51, 0.76), rgba(10, 20, 35, 0.68));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 14px 32px rgba(0, 0, 0, 0.16);
    -webkit-backdrop-filter: blur(18px) saturate(125%);
    backdrop-filter: blur(18px) saturate(125%);
}
#dietTab .today-nutrition__heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
    color: #dbe7f2;
    font-size: 0.75rem;
    font-weight: 750;
}
#dietTab .today-nutrition__heading small {
    color: #7f8ea5;
    font-size: 0.67rem;
    font-weight: 650;
}
#dietTab .today-macro-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
}
#dietTab .today-macro {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.38rem;
    padding: 0.35rem 0.3rem 0.45rem;
    border: 0;
    border-radius: 12px;
    color: inherit;
    background: transparent;
    font: inherit;
    cursor: pointer;
    transition: background 200ms ease, transform 200ms ease;
}
#dietTab .today-macro + .today-macro::before {
    position: absolute;
    top: 14%;
    bottom: 14%;
    left: 0;
    width: 1px;
    background: rgba(148, 163, 184, 0.1);
    content: '';
}
#dietTab .today-macro:hover { background: rgba(255, 255, 255, 0.025); }
#dietTab .today-macro.is-expanded { background: rgba(255, 255, 255, 0.04); }
#dietTab .today-macro:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}
#dietTab .today-macro__ring {
    --macro-progress: 0%;
    width: 2.55rem;
    height: 2.55rem;
    display: grid;
    place-items: center;
    padding: 2px;
    border-radius: 50%;
    background: conic-gradient(currentColor var(--macro-progress), rgba(148, 163, 184, 0.11) 0);
    transition: background 300ms ease, transform 220ms ease;
}
#dietTab .today-macro__ring.is-unavailable { background: rgba(148, 163, 184, 0.11); }
#dietTab .today-macro.is-expanded .today-macro__ring { transform: scale(1.06); }
#dietTab .today-macro__icon {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #111c2c;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
    font-size: 0.82rem;
}
#dietTab .today-macro__summary {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#dietTab .today-macro small {
    display: block;
    color: #8495aa;
    font-size: 0.61rem;
    font-weight: 650;
    line-height: 1.25;
}
#dietTab .today-macro strong {
    display: block;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    color: #f8fafc;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#dietTab .today-macro-details {
    max-height: 0;
    overflow: hidden;
    margin-top: 0;
    border-top: 1px solid transparent;
    opacity: 0;
    transform: translateY(-0.35rem);
    transition: max-height 280ms ease, margin-top 280ms ease, padding-top 280ms ease, border-color 280ms ease, opacity 180ms ease, transform 280ms ease;
}
#dietTab .today-nutrition.has-expanded-macro .today-macro-details {
    max-height: 7rem;
    margin-top: 0.55rem;
    padding-top: 0.65rem;
    border-top-color: rgba(148, 163, 184, 0.11);
    opacity: 1;
    transform: translateY(0);
}
#dietTab .today-macro-details__inner {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
}
#dietTab .today-macro-details__inner span { min-width: 0; }
#dietTab .today-macro-details__inner small {
    display: block;
    margin-bottom: 0.16rem;
    color: #78899f;
    font-size: 0.58rem;
    font-weight: 650;
}
#dietTab .today-macro-details__inner strong {
    display: block;
    overflow-wrap: anywhere;
    color: #e8eef5;
    font-size: 0.71rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
}
#dietTab .today-macro--calories,
#dietTab .today-macro-details--calories { color: #e9a84f; }
#dietTab .today-macro--protein,
#dietTab .today-macro-details--protein { color: #6aa3f5; }
#dietTab .today-macro--carbs,
#dietTab .today-macro-details--carbs { color: #54cdb5; }
#dietTab .today-macro--fat,
#dietTab .today-macro-details--fat { color: #a78bda; }
body:has(#dietTab:not(.hidden)) #activeWorkoutDock { display: none; }
body:has(#dietTab.today-authenticated:not(.hidden)) .app-header { display: none; }

/* iOS: one owner for the upper safe area. */
@media (max-width: 1024px) {
    .app-header {
        display: none;
    }

    .app-shell {
        min-height: 100dvh;
    }

    .app-content {
        padding-top: max(1rem, env(safe-area-inset-top));
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    #dietTab .today-heading {
        padding-top: 0;
    }
}

@media (max-width: 560px) {
    #dietTab { padding-bottom: 0.75rem; }
    #dietTab .today-heading { margin-bottom: 1rem; }
    #dietTab .today-workout { padding: 1rem; border-radius: 16px; }
    #dietTab .today-workout h2 { font-size: 1.16rem; }
    #dietTab .today-food { margin-top: 1rem; padding-top: 0.9rem; }
    #dietTab .today-meal { padding: 0.85rem; border-radius: 14px; }
    #dietTab .today-nutrition { padding-inline: 0.55rem; }
    #dietTab .today-macro-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    #dietTab .today-macro { padding-inline: 0.15rem; }
    #dietTab .today-macro__ring { width: 2.35rem; height: 2.35rem; }
    #dietTab .today-macro strong { font-size: 0.69rem; }
    #dietTab .today-macro small { font-size: 0.55rem; }
    #dietTab .today-macro-details__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem 0.7rem; }
    #dietTab .today-nutrition.has-expanded-macro .today-macro-details { max-height: 10rem; }
}

/* Alimentação: diário por data usando o mesmo sistema visual da Hoje. */
#diet_plansTab {
    width: min(100%, 920px);
    margin-inline: auto;
    padding-bottom: 2rem;
}
#diet_plansTab:not(.hidden) { display: block; }
#diet_plansTab .lucide { width: 1em; height: 1em; stroke-width: 2; }
.diet-daily-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.65rem;
}
.diet-daily-header h1 {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(1.75rem, 4vw, 2.2rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}
.diet-daily-header p {
    margin: 0.45rem 0 0;
    color: #91a2b7;
    font-size: 0.82rem;
    font-weight: 650;
    text-transform: capitalize;
}
.diet-daily-date-nav {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 2.75rem);
    gap: 0.35rem;
}
.diet-daily-date-nav button {
    min-width: 2.75rem;
    min-height: 2.75rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 10px;
    color: #b9c7d5;
    background: rgba(16, 25, 44, 0.74);
    cursor: pointer;
    transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}
.diet-daily-date-nav button:hover { color: #fff; border-color: rgba(96, 165, 250, 0.4); background: rgba(36, 54, 82, 0.8); }
.diet-daily-date-nav button:focus-visible,
.diet-daily-add:focus-visible,
.diet-daily-primary:focus-visible,
.diet-daily-option:focus-visible { outline: 3px solid rgba(94, 234, 212, 0.42); outline-offset: 2px; }
#dietDailyDate {
    position: absolute;
    width: 1px;
    height: 1px;
    right: 3rem;
    bottom: 0;
    opacity: 0;
    pointer-events: none;
}
.diet-daily-today {
    min-height: 2.25rem;
    margin: 0 0 0.85rem auto;
    padding: 0.35rem 0;
    border: 0;
    color: #76dbc3;
    background: transparent;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
}
.diet-daily-macros {
    margin: 1rem 0 1.35rem;
}
.diet-daily-macros > header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
    color: #dbe7f2;
    font-size: 0.76rem;
    font-weight: 800;
}
.diet-daily-macros > header small { color: #7f8ea5; font-size: 0.68rem; font-weight: 650; }
.diet-daily-macro-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; }
.diet-daily-macro {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.55rem;
    padding: 0.78rem;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 13px;
    background: rgba(16, 25, 44, 0.76);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.diet-daily-macro__icon {
    width: 1.8rem;
    height: 1.8rem;
    display: grid;
    place-items: center;
    border-radius: 8px;
    font-size: 0.72rem;
}
.diet-daily-macro small,
.diet-daily-macro div > span { display: block; color: #8495aa; font-size: 0.61rem; font-weight: 650; line-height: 1.25; }
.diet-daily-macro strong { display: block; margin: 0.12rem 0; color: #f8fafc; font-size: 0.86rem; line-height: 1.2; white-space: nowrap; }
.diet-daily-macro__progress { grid-column: 1 / -1; height: 3px; overflow: hidden; border-radius: 999px; background: rgba(148, 163, 184, 0.12); }
.diet-daily-macro__progress span { display: block; height: 100%; border-radius: inherit; }
.diet-daily-macro--calories .diet-daily-macro__icon { color: #f4b66c; background: rgba(245, 158, 11, 0.1); }
.diet-daily-macro--calories .diet-daily-macro__progress span { background: #e9a84f; }
.diet-daily-macro--protein .diet-daily-macro__icon { color: #7fb3ff; background: rgba(59, 130, 246, 0.12); }
.diet-daily-macro--protein .diet-daily-macro__progress span { background: #6aa3f5; }
.diet-daily-macro--carbs .diet-daily-macro__icon { color: #76dbc3; background: rgba(45, 212, 191, 0.1); }
.diet-daily-macro--carbs .diet-daily-macro__progress span { background: #54cdb5; }
.diet-daily-macro--fat .diet-daily-macro__icon { color: #baa5ee; background: rgba(167, 139, 250, 0.1); }
.diet-daily-macro--fat .diet-daily-macro__progress span { background: #a78bda; }
.diet-daily-meals { margin-top: 0.4rem; }
.diet-daily-meals > header,
.diet-plans-library > header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}
.diet-daily-meals h2,
.diet-daily-plan h2,
.diet-plans-library h2 { margin: 0.18rem 0 0; color: #f3f8f5; font-size: 1.18rem; letter-spacing: -0.025em; }
.diet-daily-add {
    min-height: 2.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid rgba(45, 212, 191, 0.25);
    border-radius: 10px;
    color: #adf3e1;
    background: rgba(45, 212, 191, 0.08);
    font: inherit;
    font-size: 0.73rem;
    font-weight: 800;
    cursor: pointer;
}
.diet-daily-meals__list { display: grid; gap: 0.7rem; }
.today-diet-slots { display: grid; gap: 0.7rem; }
.diet-daily-slot {
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(17, 30, 48, 0.86), rgba(12, 23, 37, 0.86));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.diet-daily-slot > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.7rem; }
.diet-daily-slot__icon {
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #83e5cf;
    background: rgba(45, 212, 191, 0.1);
    font-size: 0.88rem;
}
.diet-daily-slot h3,
.diet-daily-manual h3 { margin: 0; color: #f2f8f6; font-size: 0.98rem; letter-spacing: -0.015em; }
.diet-daily-slot header p { margin: 0.18rem 0 0; color: #8293a8; font-size: 0.67rem; font-weight: 650; }
.diet-daily-status {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0.3rem 0.48rem;
    border-radius: 999px;
    color: #9fb0c2;
    background: rgba(148, 163, 184, 0.08);
    font-size: 0.62rem;
    font-weight: 800;
}
.diet-daily-status--done { color: #8ae5bc; background: rgba(34, 197, 94, 0.09); }
.diet-daily-status--skipped { color: #a8b4c2; background: rgba(148, 163, 184, 0.08); }
.diet-daily-slot__food { margin: 0.8rem 0; color: #c8d5df; font-size: 0.82rem; line-height: 1.5; }
.diet-daily-primary {
    width: 100%;
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1px solid rgba(45, 212, 191, 0.4);
    border-radius: 10px;
    color: #062019;
    background: linear-gradient(135deg, #5ee0bd, #2bbba7);
    box-shadow: 0 7px 18px rgba(20, 184, 166, 0.18);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 850;
    cursor: pointer;
}
.diet-daily-primary:disabled,
.diet-daily-secondary button:disabled { opacity: 0.52; cursor: wait; }
.diet-daily-secondary { display: flex; align-items: center; justify-content: space-between; gap: 0.65rem; margin-top: 0.2rem; }
.diet-daily-secondary .text-button { min-height: 2.5rem; color: #76dbc3; font-size: 0.71rem; font-weight: 760; }
.diet-daily-secondary .diet-daily-skip,
.diet-daily-skip { color: #8999aa; }
.diet-daily-options { margin-top: 0.35rem; border-top: 1px solid rgba(148, 163, 184, 0.14); }
.diet-daily-option {
    width: 100%;
    display: grid;
    grid-template-columns: 4.1rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    padding: 0.72rem 0.2rem;
    border: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    color: #93a4b5;
    background: transparent;
    text-align: left;
    cursor: pointer;
}
.diet-daily-option:last-child { border-bottom: 0; }
.diet-daily-option > span strong,
.diet-daily-option > span small { display: block; }
.diet-daily-option strong { color: #76dbc3; font-size: 0.72rem; }
.diet-daily-option small { margin-top: 0.12rem; color: #738398; font-size: 0.59rem; }
.diet-daily-option p { margin: 0; overflow: hidden; font-size: 0.72rem; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.diet-daily-option > .lucide { opacity: 0; color: #76dbc3; }
.diet-daily-option.is-selected { background: rgba(45, 212, 191, 0.05); }
.diet-daily-option.is-selected > .lucide { opacity: 1; }
.diet-daily-actual { margin-top: 0.8rem; }
.diet-daily-actual > span,
.diet-daily-planned > span,
.diet-daily-manual > div > span { color: #789084; font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.diet-daily-actual strong { display: block; margin-top: 0.22rem; color: #eff9f5; font-size: 0.85rem; line-height: 1.45; }
.diet-daily-slot__macros { margin: 0.35rem 0 0; color: #8fa0b2; font-size: 0.67rem; font-weight: 650; }
.diet-daily-planned { margin-top: 0.7rem; padding-top: 0.65rem; border-top: 1px solid rgba(148, 163, 184, 0.1); }
.diet-daily-planned p { margin: 0.24rem 0 0; color: #8c9bab; font-size: 0.72rem; line-height: 1.45; }
.diet-daily-slot__footer { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-top: 0.3rem; }
.diet-daily-slot__footer small { color: #799080; font-size: 0.65rem; }
.diet-daily-slot__record-actions { display: flex; align-items: center; gap: 0.65rem; }
.diet-daily-slot--compact { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 0.7rem; padding-block: 0.75rem; }
.diet-daily-slot--compact > div p { margin: 0.15rem 0 0; color: #8190a1; font-size: 0.7rem; }
.diet-daily-additional { display: grid; gap: 0.55rem; margin-top: 0.5rem; padding-top: 0.85rem; border-top: 1px solid rgba(148, 163, 184, 0.14); }
.diet-daily-additional > h3 { margin: 0; color: #aebcca; font-size: 0.75rem; }
.diet-daily-manual {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.7rem;
    padding: 0.78rem 0.15rem;
}
.diet-daily-manual p { margin: 0.28rem 0 0; color: #aebbc8; font-size: 0.76rem; line-height: 1.45; }
.diet-daily-manual__actions { display: flex; gap: 0.45rem; }
.diet-daily-empty {
    min-height: 5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 0;
    color: #a7b5c3;
}
.diet-daily-empty strong { color: #dfe9f2; font-size: 0.85rem; }
.diet-daily-empty p { margin: 0.25rem 0 0; color: #7f8fa1; font-size: 0.72rem; line-height: 1.45; }
.diet-daily-plan {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.35rem;
    padding: 0.95rem 0;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}
.diet-daily-plan p { margin: 0.25rem 0 0; color: #8090a2; font-size: 0.7rem; }
.diet-daily-plan__actions { display: flex; align-items: center; gap: 0.8rem; }
.diet-daily-plan__actions .text-button { color: #8fc7bb; font-size: 0.7rem; }
.diet-plans-library { margin-top: 1.2rem; }
.diet-plans-library__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.6rem; }
.diet-plans-library__actions button { min-height: 44px; }

@media (max-width: 560px) {
    #diet_plansTab { padding-bottom: 1rem; }
    .diet-daily-header { align-items: center; }
    .diet-daily-date-nav { grid-template-columns: repeat(3, 2.6rem); }
    .diet-daily-date-nav button { min-width: 2.6rem; min-height: 2.6rem; }
    .diet-daily-macro-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; }
    .diet-daily-macro { padding: 0.68rem; }
    .diet-daily-meals > header { align-items: center; }
    .diet-daily-meals > header .eyebrow { display: none; }
    .diet-daily-meals h2 { font-size: 1.08rem; }
    .diet-daily-add { max-width: 10.5rem; padding-inline: 0.65rem; line-height: 1.25; }
    .diet-daily-slot { padding: 0.85rem; border-radius: 14px; }
    .diet-daily-secondary { gap: 0.2rem; }
    .diet-daily-secondary .text-button { padding-inline: 0.15rem; font-size: 0.67rem; }
    .diet-daily-slot--compact { grid-template-columns: auto minmax(0, 1fr) auto; }
    .diet-daily-slot--compact > .text-button { grid-column: 2 / -1; justify-self: end; min-height: 2rem; }
    .diet-daily-slot__footer { align-items: flex-end; flex-direction: column; }
    .diet-daily-slot__record-actions { width: 100%; justify-content: flex-end; }
    .diet-daily-manual { grid-template-columns: auto minmax(0, 1fr); }
    .diet-daily-manual__actions { grid-column: 2; justify-content: flex-end; }
    .diet-daily-plan { align-items: flex-start; flex-direction: column; }
    .diet-daily-plan__actions { width: 100%; justify-content: space-between; }
    #dietDailyPlan > .btn-primary { width: 100%; }
    .diet-plans-library__actions { gap: 0.45rem; }
    .diet-plans-library__actions [data-plan-wizard] { padding-inline: 0.7rem; font-size: 0.72rem; }
}

.professional-student-card {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.15rem;
    color: var(--white);
    text-align: left;
    background: linear-gradient(135deg, rgba(35, 35, 35, .98), rgba(20, 20, 20, .98));
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    transition: transform .2s ease, border-color .2s ease;
}

.professional-student-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 255, 0, .35);
}

.professional-student-card span {
    display: grid;
    gap: .2rem;
}

.professional-student-card small,
.professional-plan-card small,
.professional-profile-grid small,
.professional-measure-grid small {
    color: var(--medium-gray);
}

.professional-student-avatar {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: var(--black);
    font-weight: 900;
    background: var(--primary-green);
    border-radius: 15px;
}

.professional-student-avatar--large {
    width: 64px;
    height: 64px;
    font-size: 1.4rem;
}

.professional-student-header {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.professional-student-header h2,
.professional-plan-section h3,
.professional-plan-card h4 {
    margin: .2rem 0;
}

.professional-profile-grid,
.professional-measure-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.professional-profile-grid article,
.professional-measure-grid article {
    display: grid;
    gap: .25rem;
    padding: 1rem;
    background: rgba(255, 255, 255, .035);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 14px;
}

.professional-plan-section {
    margin: 1.25rem 0;
    padding: 1.25rem;
    background: rgba(255, 255, 255, .025);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 20px;
}

.professional-plan-section > header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.professional-create-actions,
.professional-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.professional-plan-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.professional-plan-card {
    display: grid;
    gap: .65rem;
    padding: 1rem;
    background: var(--dark-gray);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
}

.professional-plan-card > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.plan-status {
    width: fit-content;
    padding: .3rem .55rem;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    border-radius: 999px;
}

.plan-status--draft { color: #ffd166; background: rgba(255, 209, 102, .12); }
.plan-status--published { color: var(--primary-green); background: rgba(0, 255, 0, .1); }
.plan-status--archived { color: #aaa; background: rgba(255, 255, 255, .07); }

.professional-sheet { max-width: 620px; }
.professional-editor-sheet { max-width: 1180px; }

.invite-result {
    display: grid;
    gap: .75rem;
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(0, 255, 0, .06);
    border: 1px solid rgba(0, 255, 0, .18);
    border-radius: 14px;
}

.invite-result input {
    width: 100%;
}

.professional-editor-basics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}

.professional-editor-basics label,
.professional-editor-day label,
.professional-exercise-row label,
.professional-meal-row label {
    display: grid;
    gap: .35rem;
    color: var(--light-gray);
    font-size: .82rem;
}

#professionalStudentModal .professional-editor-basics label {
    gap: .5rem;
    color: var(--white);
    font-size: .95rem;
    font-weight: 700;
}

.professional-editor-basics input,
.professional-editor-basics select,
.professional-editor-day input,
.professional-editor-day select,
.professional-editor-day textarea {
    width: 100%;
}

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

.professional-editor-day {
    display: grid;
    gap: .8rem;
    padding: 1rem;
    background: rgba(255, 255, 255, .025);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
}

.professional-editor-day > header {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.professional-exercise-rows,
.professional-meal-rows {
    display: grid;
    gap: .65rem;
}

.professional-exercise-row,
.professional-meal-row {
    display: grid;
    grid-template-columns: minmax(180px, 2fr) repeat(3, minmax(80px, .65fr)) minmax(110px, 1fr) minmax(160px, 1.5fr) auto;
    align-items: end;
    gap: .55rem;
    padding: .75rem;
    background: rgba(0, 0, 0, .22);
    border-radius: 12px;
}

.professional-meal-row {
    grid-template-columns: minmax(120px, 1fr) minmax(220px, 2fr) repeat(4, minmax(75px, .65fr)) minmax(140px, 1fr);
}

.professional-remove {
    color: #ff7474;
}

.professional-preview {
    display: grid;
    gap: 1rem;
}

.professional-preview section {
    display: grid;
    gap: .6rem;
    padding: 1rem;
    background: rgba(255, 255, 255, .03);
    border-radius: 14px;
}

.professional-preview article {
    display: grid;
    gap: .25rem;
    padding: .7rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.professional-preview article:last-child { border-bottom: 0; }

@media (max-width: 860px) {
    .professional-profile-grid,
    .professional-measure-grid,
    .professional-editor-basics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .professional-exercise-row,
    .professional-meal-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .professional-student-meta { display: none !important; }
}

@media (max-width: 560px) {
    .professional-student-header { grid-template-columns: auto auto minmax(0, 1fr); }
    .professional-revoke { grid-column: 1 / -1; }
    .professional-profile-grid,
    .professional-measure-grid,
    .professional-editor-basics,
    .professional-editor-day > header,
    .professional-exercise-row,
    .professional-meal-row { grid-template-columns: 1fr; }
    .professional-plan-section > header { align-items: stretch; flex-direction: column; }
    .professional-create-actions > button { flex: 1; }
}

.login-card {
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid rgba(0, 255, 0, 0.2);
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 255, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.login-card:hover {
    border-color: rgba(0, 255, 0, 0.4);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(0, 255, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    font-size: 2.5rem;
    color: var(--primary-green);
    text-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.logo-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.login-subtitle {
    color: var(--gray-text);
    font-size: 1rem;
    font-weight: 400;
}

.login-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 0.25rem;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: var(--gray-text);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.tab-btn.active {
    background: var(--primary-green);
    color: var(--black);
    box-shadow: 0 2px 8px rgba(0, 255, 0, 0.3);
}

.tab-btn:not(.active):hover {
    background: rgba(0, 255, 0, 0.1);
    color: var(--primary-green);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--gray-text);
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: var(--primary-green);
    width: 16px;
}

.form-group input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    color: var(--white);
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus {
    border-color: var(--primary-green);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 3px rgba(0, 255, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%);
    color: var(--black);
    border: none;
    border-radius: 8px;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 0, 0.4);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 255, 0, 0.3);
}

.message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
}

.message.success {
    background: rgba(0, 255, 0, 0.1);
    color: var(--primary-green);
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.message.error {
    background: rgba(255, 0, 0, 0.1);
    color: #ff4444;
    border: 1px solid rgba(255, 0, 0, 0.3);
}

/* Plano de treino: consulta operacional separada da manutenção. */
.workout-plan-overview {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(8, 14, 26, 0.96);
}

.workout-plan-overview__icon {
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    place-items: center;
    border-radius: 12px;
    color: #8eb4ff;
    background: rgba(59, 130, 246, 0.14);
}

.workout-plan-overview__copy {
    min-width: 0;
}

.workout-plan-overview__copy > span,
.workout-plan-edit-context > div:first-child > span,
.workout-plan-next > span {
    color: #8eb4ff;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.workout-plan-overview__copy h3,
.workout-plan-edit-context h3 {
    margin: 0.18rem 0 0;
    color: var(--white);
}

.workout-plan-overview__copy p,
.workout-plan-edit-context p {
    margin: 0.28rem 0 0;
    color: var(--gray-text);
    line-height: 1.5;
}

.workout-plan-overview .workout-summary__meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.workout-plan-overview .workout-summary__meta > span {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 0.42rem;
    min-width: 0;
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(59, 130, 246, 0.16);
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.07);
}

.workout-plan-overview .workout-summary__meta i {
    grid-row: 1 / 3;
    align-self: center;
    color: #8eb4ff;
}

.workout-plan-overview .workout-summary__meta small,
.workout-plan-overview .workout-summary__meta strong {
    overflow-wrap: anywhere;
}

.workout-plan-overview .workout-summary__meta small {
    color: var(--gray-text);
    font-size: 0.62rem;
}

.workout-plan-overview .workout-summary__meta strong {
    color: var(--white);
    font-size: 0.73rem;
}

.workout-plan-overview .professional-review-badge {
    display: inline-flex;
    margin-top: 0.75rem;
}

.workout-plan-overview__actions {
    display: flex;
    align-items: flex-end;
    gap: 0.55rem;
    flex-direction: column;
}

.workout-plan-edit-entry,
.workout-plan-edit-back,
.workout-edit-day-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-radius: 9px;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 700;
}

.workout-plan-edit-entry,
.workout-plan-edit-back {
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    color: #b8c7f5;
    background: rgba(255, 255, 255, 0.035);
    cursor: pointer;
}

.workout-plan-edit-entry:hover,
.workout-plan-edit-back:hover {
    border-color: rgba(59, 130, 246, 0.38);
    color: #d9e4ff;
    background: rgba(59, 130, 246, 0.1);
}

.workout-plan-edit-entry:disabled {
    opacity: 0.5;
    cursor: wait;
}

.workout-plan-next {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.2rem 1rem;
    margin-top: 0.65rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    background: linear-gradient(110deg, rgba(59, 130, 246, 0.12), rgba(8, 14, 26, 0.82));
}

.workout-plan-next > span {
    grid-column: 1 / -1;
}

.workout-plan-next > span i {
    margin-right: 0.4rem;
}

.workout-plan-next strong {
    color: var(--white);
}

.workout-plan-next small {
    align-self: center;
    color: var(--gray-text);
}

#viewWorkoutPlanDetails .plan-day-tabs--workout {
    max-width: 100%;
    margin-inline: 0;
    padding-inline: 0;
}

.workout-plan-edit-context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.65rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(59, 130, 246, 0.34);
    border-radius: 14px;
    background: rgba(59, 130, 246, 0.1);
}

.workout-plan-edit-context__actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex: 0 0 auto;
}

.workout-plan-edit-context .btn-secondary {
    margin: 0;
}

.workout-day-panel.is-editing {
    border: 1px solid rgba(59, 130, 246, 0.26) !important;
    border-radius: 14px;
    padding: 0 0.75rem 0.75rem;
}

.workout-edit-day-status {
    padding: 0.5rem 0.7rem;
    color: #b8c7f5;
    background: rgba(59, 130, 246, 0.1);
}

#viewWorkoutPlanDetails .workout-day-panel:not(.is-editing) .start-workout-button {
    color: #fff !important;
    border-color: rgba(79, 141, 255, 0.52) !important;
    background: linear-gradient(135deg, #568fff, #3072ea) !important;
    box-shadow: 0 10px 24px rgba(48, 114, 234, 0.22) !important;
}

@media (max-width: 768px) {
    .workout-plan-overview {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .workout-plan-overview__actions {
        grid-column: 1 / -1;
        width: 100%;
        align-items: stretch;
        flex-direction: row;
        justify-content: space-between;
    }

    .workout-plan-overview__actions .plan-use-current {
        flex: 1;
    }

    .workout-plan-edit-entry {
        margin-left: auto;
    }

    .workout-plan-edit-context {
        align-items: stretch;
        flex-direction: column;
    }

    .workout-plan-edit-context__actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 520px) {
    .workout-plan-overview {
        gap: 0.75rem;
        padding: 0.85rem;
    }

    .workout-plan-overview__icon {
        width: 2.35rem;
        height: 2.35rem;
    }

    .workout-plan-overview .workout-summary__meta {
        grid-template-columns: 1fr;
    }

    .workout-plan-overview__actions,
    .workout-plan-edit-context__actions {
        flex-direction: column;
    }

    .workout-plan-overview__actions > *,
    .workout-plan-edit-context__actions > * {
        width: 100%;
    }

    .workout-plan-edit-entry {
        width: auto;
        margin-left: auto;
    }

    .workout-plan-next {
        grid-template-columns: 1fr;
    }

    .workout-day-panel.is-editing {
        padding-inline: 0.55rem;
    }
}

/* Execução da sessão: exercício e série atual como foco operacional. */
.active-workout-toolbar {
    grid-template-columns: minmax(0, 1.2fr) auto minmax(160px, 0.7fr) auto;
    gap: 0.75rem;
    padding: 0.65rem 0.8rem;
}

.active-workout-progress small {
    display: block;
    margin: -0.18rem 0 0.38rem;
    color: var(--gray-text);
    font-size: 0.62rem;
    text-align: right;
}

.active-workout-exit,
.current-exercise-navigation button,
.workout-set-remove,
.skip-current-exercise-button,
.current-exercise-resolved button {
    border: 1px solid var(--border);
    color: #b9c8e8;
    background: rgba(255, 255, 255, 0.04);
    font: inherit;
    cursor: pointer;
}

.active-workout-exit {
    min-height: 2.6rem;
    padding: 0.5rem 0.7rem;
    border-radius: 9px;
    font-size: 0.72rem;
    font-weight: 750;
}

.current-exercise-navigation {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
}

.current-exercise-navigation button {
    min-height: 2.35rem;
    padding: 0.4rem 0.7rem;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 750;
}

.current-exercise-navigation button:disabled {
    opacity: 0.35;
    cursor: default;
}

.current-exercise-navigation > span {
    color: var(--gray-text);
    font-size: 0.68rem;
    font-weight: 750;
    text-align: center;
}

.current-exercise-stage {
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
}

.current-exercise-stage.is-completed-view,
.current-exercise-stage.is-skipped-view {
    border-color: rgba(148, 163, 184, 0.24);
}

.current-exercise-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.current-exercise-title-row h3 {
    min-width: 0;
}

.replace-current-exercise-button--visible {
    min-height: 2.45rem;
    flex: 0 0 auto;
    padding: 0.45rem 0.7rem;
    color: #d4e0ff !important;
    border-color: rgba(114, 159, 255, 0.42) !important;
    background: rgba(79, 141, 255, 0.12) !important;
    white-space: nowrap;
}

.replace-current-exercise-button--visible > span {
    font-size: 1rem;
    line-height: 1;
}

.workout-set-entry {
    border-color: rgba(59, 130, 246, 0.24);
    background: rgba(59, 130, 246, 0.055);
}

.workout-set-entry__heading button {
    min-height: 2.5rem;
    color: #b9ceff;
    border-color: rgba(114, 159, 255, 0.3);
    background: rgba(79, 141, 255, 0.08);
}

.workout-set-entry__rows {
    display: grid;
    gap: 0.55rem;
}

.workout-set-row {
    position: relative;
    grid-template-columns: 3.1rem minmax(90px, 1fr) minmax(90px, 1fr) auto auto;
    align-items: end;
    gap: 0.5rem;
    padding: 0.65rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(5, 10, 20, 0.56);
}

.workout-set-row.is-current {
    border-color: rgba(79, 141, 255, 0.5);
    box-shadow: inset 3px 0 0 #4f8dff;
}

.workout-set-row > strong {
    width: auto;
    height: auto;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #b9ceff;
    background: rgba(79, 141, 255, 0.12);
    font-size: 0.9rem;
}

.workout-set-row > strong small {
    color: var(--gray-text);
    font-size: 0.52rem;
    font-weight: 700;
    text-transform: uppercase;
}

.workout-set-row label:not(.workout-set-warmup) span {
    position: static;
    display: block;
    width: auto;
    height: auto;
    margin-bottom: 0.28rem;
    overflow: visible;
    color: var(--gray-text);
    clip: auto;
    font-size: 0.62rem;
    font-weight: 700;
}

.workout-set-row input {
    min-height: 3rem;
    font-size: 1rem;
}

.workout-set-warmup {
    grid-column: 2 / 4;
}

.workout-set-complete,
.workout-set-remove {
    min-width: 3rem;
    min-height: 3rem;
    border-radius: 9px;
}

.workout-set-complete {
    grid-column: auto;
    color: #b9ceff;
    border-color: rgba(79, 141, 255, 0.3);
    background: rgba(79, 141, 255, 0.09);
}

.workout-set-remove {
    padding: 0.5rem;
    color: #8f9bac;
}

.workout-set-row.is-complete {
    border-color: rgba(101, 231, 164, 0.3);
    background: rgba(101, 231, 164, 0.055);
}

.workout-set-row.is-complete input {
    color: #b8c9c0;
}

.complete-current-set-button,
.workout-exercise-primary {
    position: sticky;
    z-index: 8;
    bottom: 0.45rem;
    width: 100%;
    min-height: 3.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid rgba(79, 141, 255, 0.54);
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, #568fff, #3072ea);
    box-shadow: 0 12px 28px rgba(48, 114, 234, 0.28);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 850;
    cursor: pointer;
}

.complete-current-set-button:disabled,
.workout-exercise-primary:disabled {
    opacity: 0.58;
    cursor: wait;
}

.mobile-workout-primary {
    display: none;
}

#viewWorkoutPlanDetails .active-workout-finish {
    color: #07150e !important;
    border-color: rgba(101, 231, 164, 0.5) !important;
    background: linear-gradient(135deg, #74edb0, #35c77b) !important;
    box-shadow: 0 12px 28px rgba(53, 199, 123, 0.22) !important;
}

#viewWorkoutPlanDetails .completed-workout-metrics article {
    border: 1px solid var(--border) !important;
    color: var(--white) !important;
    background: rgba(12, 20, 34, 0.92) !important;
}

#viewWorkoutPlanDetails .completed-workout-metrics article strong {
    color: var(--white) !important;
}

.workout-rest {
    top: 5.4rem;
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(27, 18, 5, 0.97);
}

.workout-rest__clock {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 0.12rem 0.75rem;
}

.workout-rest__clock small,
.workout-rest__clock span {
    grid-column: 1;
}

.workout-rest__clock small {
    color: #fbbf24;
}

.workout-rest__clock strong {
    grid-column: 2;
    grid-row: 1 / 3;
    color: #fff7d6;
    font-size: 1.65rem;
}

.workout-rest__clock span {
    color: #cabd9b;
    font-size: 0.65rem;
}

.workout-rest__actions .workout-rest-skip {
    min-width: 8rem;
    color: #fff7d6;
    border-color: rgba(245, 158, 11, 0.34);
}

.current-exercise-secondary {
    margin-top: 0.7rem;
    border-top: 1px solid var(--border);
}

.current-exercise-secondary summary {
    padding: 0.7rem 0;
    color: var(--gray-text);
    font-size: 0.7rem;
    font-weight: 750;
    cursor: pointer;
}

.current-exercise-secondary > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-bottom: 0.2rem;
}

.current-exercise-secondary button {
    min-height: 2.65rem;
    padding: 0.5rem 0.7rem;
    border-radius: 9px;
    font-size: 0.7rem;
    font-weight: 750;
}

.skip-current-exercise-button {
    color: #d3b87a;
    border-color: rgba(245, 158, 11, 0.24);
}

.current-exercise-resolved {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: #aebccb;
    background: rgba(255, 255, 255, 0.035);
}

.current-exercise-resolved > i {
    color: #65e7a4;
    font-size: 1.35rem;
}

.current-exercise-resolved.is-skipped > i {
    color: #fbbf24;
}

.current-exercise-resolved p {
    margin-top: 0.15rem;
    color: var(--gray-text);
    font-size: 0.72rem;
}

.current-exercise-resolved button {
    min-height: 2.6rem;
    margin-left: auto;
    padding: 0.5rem 0.7rem;
    border-radius: 9px;
}

.active-workout-queue li {
    display: block;
    padding: 0;
}

.active-workout-queue li > button {
    width: 100%;
    display: grid;
    grid-template-columns: 1.75rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem;
    border: 0;
    border-radius: inherit;
    color: inherit;
    text-align: left;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.active-workout-queue li > button > span {
    width: 1.55rem;
    height: 1.55rem;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.055);
}

.active-workout-queue li.is-current > button > span {
    color: #fff;
    background: #397ce9;
}

.active-workout-queue li.is-complete > button > span {
    color: #072014;
    background: #65d99c;
}

.active-workout-queue li.is-skipped {
    color: #bca874;
    background: rgba(245, 158, 11, 0.07);
}

.active-workout-queue li.is-skipped > button > span {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.13);
}

.completed-workout-skipped {
    padding: 0.85rem;
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.055);
}

.completed-workout-skipped h4 {
    color: #f4d796;
    font-size: 0.78rem;
}

.completed-workout-skipped ul {
    display: grid;
    gap: 0.4rem;
    margin-top: 0.55rem;
    padding: 0;
    list-style: none;
}

.completed-workout-skipped li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #bca874;
    font-size: 0.72rem;
}

@media (max-width: 820px) {
    .active-workout-toolbar {
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 0.65rem;
    }

    .active-workout-progress {
        grid-column: 1 / -1;
    }

    .active-workout-progress > span,
    .active-workout-progress small {
        text-align: left;
    }

    .current-exercise-stage {
        grid-template-columns: 1fr;
    }

    .current-exercise-media,
    .current-exercise-media > img,
    .current-exercise-media > .exercise-image-placeholder {
        min-height: 250px;
        max-height: 310px;
    }
}

@media (max-width: 560px) {
    .active-workout-shell {
        gap: 0.65rem;
        padding-bottom: 5rem;
    }

    .active-workout-toolbar {
        top: 0;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.35rem 0.5rem;
        padding: 0.5rem 0.6rem;
        border-radius: 11px;
    }

    .active-workout-status span {
        font-size: 0.56rem;
    }

    .active-workout-status strong {
        margin-top: 0.05rem;
        font-size: 0.8rem;
    }

    .active-workout-timer {
        min-width: 5.65rem;
        padding: 0.3rem 0.45rem;
        border-radius: 9px;
    }

    .active-workout-timer small {
        font-size: 0.52rem;
    }

    .active-workout-timer time {
        font-size: 0.95rem;
    }

    .active-workout-exit {
        grid-column: 2;
        grid-row: 2;
        min-height: 1.95rem;
        padding: 0.3rem 0.5rem;
        font-size: 0.64rem;
    }

    .active-workout-progress {
        grid-column: 1;
        grid-row: 2;
        display: grid;
        grid-template-columns: auto auto;
        gap: 0.1rem 0.55rem;
        align-items: center;
    }

    .active-workout-progress > span,
    .active-workout-progress small {
        margin: 0;
        font-size: 0.56rem;
    }

    .active-workout-progress > div {
        grid-column: 1 / -1;
        height: 4px;
    }

    .workout-rest {
        top: 7.7rem;
        align-items: stretch;
        flex-direction: column;
    }

    .workout-rest__actions {
        display: grid;
        grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    }

    .workout-rest__actions .workout-rest-skip {
        min-width: 0;
    }

    .current-exercise-navigation button {
        min-width: 0;
        min-height: 2.15rem;
        padding: 0.3rem 0.5rem;
        font-size: 0.65rem;
    }

    .current-exercise-stage {
        gap: 0.5rem;
        padding: 0.6rem;
        border-radius: 14px;
    }

    .current-exercise-media,
    .current-exercise-media > img,
    .current-exercise-media > .exercise-image-placeholder {
        height: 155px;
        min-height: 155px;
        max-height: 155px;
        border-radius: 11px;
    }

    .current-exercise-media > img {
        padding: 0.25rem;
    }

    .current-exercise-kicker {
        margin-bottom: 0.25rem;
        font-size: 0.62rem;
    }

    .current-exercise-content h3 {
        font-size: 1.35rem;
        line-height: 1.08;
    }

    .current-exercise-title-row {
        align-items: stretch;
        flex-direction: column;
        gap: 0.45rem;
    }

    .replace-current-exercise-button--visible {
        width: 100%;
        min-height: 2.3rem;
        padding-block: 0.35rem;
    }

    .current-exercise-prescription {
        gap: 0.45rem;
        margin: 0.5rem 0;
    }

    .current-exercise-prescription strong {
        min-width: 0;
        flex: 1;
        padding: 0.45rem 0.55rem;
        font-size: 1.08rem;
    }

    .current-exercise-meta {
        gap: 0.3rem;
        margin-bottom: 0.4rem;
    }

    .current-exercise-meta span {
        padding: 0.25rem 0.4rem;
        font-size: 0.6rem;
    }

    .current-exercise-note,
    .current-exercise-instruction {
        margin-top: 0.4rem;
        font-size: 0.68rem;
    }

    .workout-set-entry {
        margin-inline: -0.15rem;
        padding: 0.6rem;
    }

    .workout-set-entry__heading {
        align-items: end;
    }

    .workout-set-entry__heading button {
        padding-inline: 0.5rem;
    }

    .workout-set-row {
        grid-template-columns: 2.6rem minmax(0, 1fr) minmax(0, 1fr) 2.8rem;
        gap: 0.4rem;
        padding: 0.55rem;
    }

    .workout-set-row > strong {
        min-height: 2.8rem;
    }

    .workout-set-row input {
        min-height: 2.8rem;
    }

    .workout-set-warmup {
        grid-column: 2 / 4;
    }

    .workout-set-complete,
    .workout-set-remove {
        grid-column: 4;
        min-width: 2.8rem;
        min-height: 2.8rem;
        padding: 0.4rem;
    }

    .workout-set-complete span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .workout-set-remove {
        grid-row: 2;
    }

    .complete-current-set-button,
    .workout-exercise-primary {
        min-height: 3.6rem;
        font-size: 0.92rem;
    }

    .workout-exercise-primary {
        display: none;
    }

    .mobile-workout-primary {
        position: fixed;
        z-index: 80;
        right: 0.8rem;
        bottom: 0.6rem;
        left: 0.8rem;
        min-height: 3.25rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        border: 1px solid rgba(79, 141, 255, 0.58);
        border-radius: 13px;
        color: #fff;
        background: linear-gradient(135deg, #568fff, #3072ea);
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.48), 0 10px 24px rgba(48, 114, 234, 0.3);
        font: inherit;
        font-size: 0.88rem;
        font-weight: 850;
        cursor: pointer;
    }

    .mobile-workout-primary:disabled {
        opacity: 0.65;
        cursor: wait;
    }

    .current-exercise-secondary > div,
    .current-exercise-resolved {
        align-items: stretch;
        flex-direction: column;
    }

    .current-exercise-secondary button,
    .current-exercise-resolved button {
        width: 100%;
        margin-left: 0;
    }

    .active-workout-queue summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.25rem;
    }

    .active-workout-queue li > button {
        min-height: 3rem;
    }

    .workout-complete-state {
        min-height: 340px;
        padding: 1.25rem;
    }
}

/* Immersive workout session player */
.plan-modal.workout-execution-mode {
    padding: 1.5dvh;
}

.plan-modal.workout-execution-mode .modal-content {
    width: min(1180px, 97vw);
    height: 97dvh;
    max-height: 97dvh;
    overflow: hidden;
    border-radius: 22px;
    background: #050807;
}

.plan-modal.workout-execution-mode .modal-header {
    display: none;
}

.plan-modal.workout-execution-mode .plan-details-container {
    height: 100%;
    padding: 0;
    overflow: hidden;
}

.active-workout-shell--immersive {
    width: 100%;
    height: 100%;
    min-height: 620px;
    display: block;
    padding: 0;
    overflow: hidden;
}

.current-exercise-stage--player {
    --sheet-peek: 76px;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: block;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: inherit;
    background: #fff;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}

.current-exercise-stage--player::after {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(2, 5, 4, 0.82) 0%, rgba(2, 5, 4, 0.22) 26%, rgba(2, 5, 4, 0.08) 48%, rgba(2, 5, 4, 0.82) 100%),
        linear-gradient(90deg, rgba(2, 5, 4, 0.42), transparent 46%);
}

.current-exercise-stage--player .current-exercise-media {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    border: 0;
    border-radius: 0;
    background: #fff;
    transition: transform 180ms ease;
}

.current-exercise-stage--player .current-exercise-preview {
    position: absolute;
    z-index: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: #fff;
    transform: translateX(calc(var(--player-preview-offset, 100%) + var(--player-swipe-x, 0px)));
    transition: transform 180ms ease;
}

.current-exercise-stage--player .current-exercise-preview > img,
.current-exercise-stage--player .current-exercise-preview > .exercise-image-placeholder {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.workout-finish-preview {
    display: grid;
    place-items: center;
    color: #f8fafc;
    background:
        radial-gradient(circle at 50% 28%, rgba(79, 141, 255, 0.3), transparent 34%),
        linear-gradient(145deg, #102019, #07100c 68%);
}

.workout-finish-preview__content {
    width: min(28rem, calc(100% - 3rem));
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    text-align: center;
}

.workout-finish-preview__content > span,
.workout-finish-card__icon {
    width: 4rem;
    height: 4rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(101, 231, 164, 0.42);
    border-radius: 50%;
    color: #8df0ba;
    background: rgba(35, 107, 72, 0.28);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
    font-size: 1.35rem;
}

.workout-finish-preview__content small,
.workout-finish-card__heading small {
    color: #9bbdff;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.workout-finish-preview__content strong {
    font-size: clamp(1.5rem, 5vw, 2.3rem);
}

.workout-finish-preview__content p {
    margin: 0;
    color: #c5d1cb;
}

.workout-finish-card {
    color: #f8fafc;
    background:
        radial-gradient(circle at 50% 20%, rgba(79, 141, 255, 0.24), transparent 34%),
        linear-gradient(145deg, #102019, #07100c 68%);
}

.workout-finish-card__surface.current-exercise-content--overlay {
    inset: 0;
    width: 100%;
    height: 100%;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 1rem;
    padding: 6.5rem max(1.25rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
    overflow-x: hidden;
    overflow-y: auto;
    color: #f8fafc;
    text-align: center;
    touch-action: pan-y pinch-zoom;
}

.workout-finish-card__heading {
    max-width: 42rem;
}

.workout-finish-card__heading h3 {
    margin: 0.3rem 0 0;
    color: #fff;
    font-size: clamp(1.75rem, 5vw, 3rem);
}

.workout-finish-card__heading p {
    margin: 0.65rem 0 0;
    color: #c5d1cb;
}

.workout-finish-card__metrics {
    width: min(38rem, 100%);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
}

.workout-finish-card__metrics > span {
    min-width: 0;
    padding: 0.7rem 0.45rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    background: rgba(3, 10, 7, 0.58);
}

.workout-finish-card__metrics strong,
.workout-finish-card__metrics small {
    display: block;
}

.workout-finish-card__metrics strong {
    font-size: 1.35rem;
}

.workout-finish-card__metrics small {
    margin-top: 0.1rem;
    overflow: hidden;
    color: #a9b7b0;
    font-size: 0.62rem;
    text-overflow: ellipsis;
}

.workout-finish-card__actions {
    width: min(30rem, 100%);
    display: grid;
    gap: 0.55rem;
}

.workout-finish-card__actions button {
    width: 100%;
    min-height: 44px;
}

.workout-finish-back {
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 10px;
    color: #dce7e2;
    background: rgba(255, 255, 255, 0.055);
}

.workout-finish-card .active-workout-queue {
    width: min(38rem, 100%);
    text-align: left;
}

.current-exercise-stage--player .current-exercise-media > img,
.current-exercise-stage--player .current-exercise-media > .exercise-image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    padding: 0;
    border-radius: 0;
    object-fit: contain;
}

.current-exercise-stage--player .active-workout-toolbar {
    position: absolute;
    z-index: 7;
    top: 0;
    right: 0;
    left: 0;
    grid-template-columns: minmax(0, 1fr) auto minmax(170px, 0.6fr) auto;
    margin: 0;
    padding: 0.8rem 1rem;
    border: 0;
    border-radius: 0;
    background: linear-gradient(180deg, rgba(2, 6, 4, 0.92), rgba(2, 6, 4, 0));
    box-shadow: none;
    backdrop-filter: none;
}

.current-exercise-stage--player .active-workout-timer {
    background: rgba(4, 10, 8, 0.68);
}

.current-exercise-stage--player .current-exercise-navigation {
    position: absolute;
    z-index: 8;
    top: 48%;
    right: 0.8rem;
    left: 0.8rem;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    transform: translateY(-50%);
}

.current-exercise-stage--player .current-exercise-navigation button {
    width: 3rem;
    min-width: 3rem;
    height: 3rem;
    padding: 0;
    overflow: hidden;
    border-color: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #fff;
    background: rgba(3, 9, 6, 0.7);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
    font-size: 0;
    pointer-events: auto;
}

.current-exercise-stage--player .current-exercise-navigation button i {
    font-size: 0.85rem;
}

.current-exercise-stage--player .current-exercise-navigation > span {
    display: none;
}

.current-exercise-content--overlay {
    position: absolute;
    z-index: 6;
    top: 6.4rem;
    left: clamp(1rem, 4vw, 3rem);
    width: min(650px, calc(100% - 7rem));
    color: #fff;
    transition: transform 180ms ease;
}

.current-exercise-content--overlay .current-exercise-title-row {
    align-items: center;
}

.current-exercise-content--overlay h3 {
    max-width: 100%;
    color: #fff;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.82);
}

.workout-player-prescription {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) repeat(2, minmax(90px, 0.7fr));
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.workout-player-prescription > span {
    min-width: 0;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 11px;
    background: rgba(3, 10, 7, 0.7);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

.workout-player-prescription small,
.workout-player-prescription strong {
    display: block;
}

.workout-player-prescription small {
    color: #a9b7b0;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.workout-player-prescription strong {
    margin-top: 0.15rem;
    overflow: hidden;
    color: #fff;
    font-size: 0.82rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workout-player-progress {
    width: min(320px, 100%);
    margin-top: 0.6rem;
}

.workout-player-progress > span {
    display: block;
    margin-bottom: 0.25rem;
    color: #d6e2dc;
    font-size: 0.62rem;
    font-weight: 750;
    text-shadow: 0 2px 8px #000;
}

.workout-player-progress > i {
    height: 4px;
    display: block;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.workout-player-progress > i b {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: linear-gradient(90deg, #4f8dff, #65e7a4);
}

.workout-player-rest {
    position: absolute;
    z-index: 7;
    top: 15.5rem;
    right: clamp(1rem, 4vw, 3rem);
    min-width: 7.5rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(245, 158, 11, 0.42);
    border-radius: 11px;
    color: #fff7d6;
    text-align: center;
    background: rgba(27, 18, 5, 0.86);
}

.workout-player-rest span,
.workout-player-rest strong {
    display: block;
}

.workout-player-rest span {
    color: #f9cf68;
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
}

.workout-player-rest strong {
    margin-top: 0.08rem;
    font-size: 1.25rem;
    font-variant-numeric: tabular-nums;
}

.workout-session-sheet {
    position: absolute;
    z-index: 12;
    right: clamp(0.65rem, 3vw, 2rem);
    bottom: 0;
    left: clamp(0.65rem, 3vw, 2rem);
    height: min(68%, 640px);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    background: #0c1511;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.52);
    transform: translateY(0);
    transition: transform 260ms cubic-bezier(0.22, 0.8, 0.24, 1);
}

.workout-session-sheet.is-collapsed {
    transform: translateY(calc(100% - var(--sheet-peek)));
}

.workout-session-sheet.is-dragging {
    transition: none;
}

.workout-sheet-handle {
    width: 100%;
    height: var(--sheet-peek);
    min-height: var(--sheet-peek);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: center;
    align-items: center;
    gap: 0.25rem 0.5rem;
    padding: 0.55rem 1rem 0.65rem;
    border: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    color: #e9f1ed;
    text-align: left;
    background: #0c1511;
    font: inherit;
    cursor: pointer;
    touch-action: none;
}

.workout-sheet-handle > span {
    grid-column: 1 / -1;
    width: 2.5rem;
    height: 4px;
    justify-self: center;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.42);
}

.workout-sheet-handle b {
    font-size: 0.76rem;
}

.workout-sheet-handle i {
    color: #8fb3ff;
    font-size: 0.72rem;
}

.workout-session-sheet__scroll {
    height: calc(100% - var(--sheet-peek));
    display: grid;
    align-content: start;
    gap: 0.75rem;
    padding: 0.8rem 1rem 1.5rem;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.workout-session-sheet .workout-rest {
    position: relative;
    top: auto;
}

.workout-session-sheet .workout-set-entry {
    margin-top: 0;
}

.workout-session-sheet .complete-current-set-button {
    position: sticky;
    z-index: 5;
    bottom: 0.25rem;
}

.workout-session-sheet .workout-exercise-primary {
    position: static;
    min-height: 2.75rem;
    border-color: rgba(148, 163, 184, 0.2);
    color: #b9c8c0;
    background: rgba(255, 255, 255, 0.045);
    box-shadow: none;
    font-size: 0.74rem;
}

.workout-sheet-session-actions {
    margin-top: 0.35rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.workout-sheet-session-actions .finish-workout-link {
    width: 100%;
    color: #c8d7ef;
    border-color: rgba(79, 141, 255, 0.25);
    background: rgba(79, 141, 255, 0.07);
}

.workout-sheet-danger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.85rem;
    padding: 1rem 0 0.25rem;
    border-top: 1px solid rgba(248, 113, 113, 0.16);
}

.workout-sheet-danger > span {
    color: #8e9993;
    font-size: 0.62rem;
}

.workout-sheet-danger .cancel-workout-button {
    width: auto;
    margin: 0;
    flex: 0 0 auto;
}

.current-exercise-stage--player.is-player-dragging .current-exercise-media,
.current-exercise-stage--player.is-player-dragging .current-exercise-content--overlay {
    transform: translateX(var(--player-swipe-x));
    transition: none;
}

.current-exercise-stage--player.is-player-dragging .current-exercise-preview {
    transition: none;
}

.current-exercise-stage--player.is-player-committing-left .current-exercise-media,
.current-exercise-stage--player.is-player-committing-left .current-exercise-content--overlay {
    transform: translateX(-110%);
}

.current-exercise-stage--player.is-player-committing-left .current-exercise-preview--next {
    transform: translateX(0);
}

.current-exercise-stage--player.is-player-committing-right .current-exercise-media,
.current-exercise-stage--player.is-player-committing-right .current-exercise-content--overlay {
    transform: translateX(110%);
}

.current-exercise-stage--player.is-player-committing-right .current-exercise-preview--previous {
    transform: translateX(0);
}

@media (max-width: 560px) {
    .plan-modal.workout-execution-mode {
        padding: 0;
    }

    .plan-modal.workout-execution-mode .modal-content {
        width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }

    .active-workout-shell--immersive {
        min-height: 100dvh;
        padding-bottom: 0;
    }

    .current-exercise-stage--player {
        height: 100dvh;
        min-height: 100dvh;
        border-radius: 0;
    }

    .current-exercise-stage--player .active-workout-toolbar {
        top: 0;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 0.35rem 0.45rem;
        padding: max(0.65rem, env(safe-area-inset-top)) 0.7rem 1rem;
    }

    .current-exercise-stage--player .active-workout-status strong {
        max-width: 9rem;
    }

    .current-exercise-stage--player .active-workout-timer {
        min-width: 5.3rem;
    }

    .current-exercise-stage--player .active-workout-progress {
        position: absolute;
        right: 0.7rem;
        bottom: 0.15rem;
        left: 0.7rem;
        display: block;
    }

    .current-exercise-stage--player .active-workout-progress > span,
    .current-exercise-stage--player .active-workout-progress small {
        display: none;
    }

    .current-exercise-stage--player .active-workout-exit {
        grid-column: 3;
        grid-row: 1;
        width: 2.3rem;
        min-width: 2.3rem;
        min-height: 2.3rem;
        padding: 0;
        overflow: hidden;
        font-size: 0;
    }

    .current-exercise-stage--player .active-workout-exit i {
        font-size: 0.72rem;
    }

    .current-exercise-content--overlay {
        top: calc(max(0.65rem, env(safe-area-inset-top)) + 5.25rem);
        left: 1rem;
        width: calc(100% - 2rem);
    }

    .current-exercise-content--overlay .current-exercise-kicker {
        margin-bottom: 0.22rem;
        color: #a9c3ff;
        font-size: 0.58rem;
        text-shadow: 0 2px 8px #000;
    }

    .current-exercise-content--overlay .current-exercise-title-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.55rem;
    }

    .current-exercise-content--overlay h3 {
        font-size: clamp(1.45rem, 7vw, 2rem);
        line-height: 1.02;
    }

    .current-exercise-content--overlay .replace-current-exercise-button--visible {
        width: auto;
        min-height: 2.25rem;
        padding: 0.35rem 0.5rem;
        font-size: 0.6rem;
    }

    .workout-player-prescription {
        grid-template-columns: minmax(0, 1.45fr) repeat(2, minmax(0, 0.72fr));
        gap: 0.35rem;
        margin-top: 0.65rem;
    }

    .workout-player-prescription > span {
        padding: 0.42rem 0.5rem;
        border-radius: 9px;
    }

    .workout-player-prescription small {
        font-size: 0.48rem;
    }

    .workout-player-prescription strong {
        font-size: 0.68rem;
    }

    .workout-player-progress {
        margin-top: 0.45rem;
    }

    .workout-player-progress > span {
        font-size: 0.56rem;
    }

    .workout-player-rest {
        top: 16rem;
        right: 1rem;
        min-width: 6.4rem;
        padding: 0.4rem 0.55rem;
    }

    .workout-player-rest strong {
        font-size: 1rem;
    }

    .current-exercise-stage--player .current-exercise-navigation {
        top: 52%;
        right: 0.6rem;
        left: 0.6rem;
    }

    .current-exercise-stage--player .current-exercise-navigation button {
        width: 2.65rem;
        min-width: 2.65rem;
        height: 2.65rem;
        min-height: 2.65rem;
    }

    .workout-session-sheet {
        right: 0;
        left: 0;
        height: min(68dvh, 590px);
        border-right: 0;
        border-left: 0;
        border-radius: 20px 20px 0 0;
    }

    .workout-sheet-handle {
        padding-inline: 0.85rem;
    }

    .workout-session-sheet__scroll {
        gap: 0.6rem;
        padding: 0.65rem 0.7rem calc(1.1rem + env(safe-area-inset-bottom));
    }

    .workout-session-sheet .workout-rest {
        padding: 0.6rem;
    }

    .workout-session-sheet .workout-set-entry {
        margin-inline: 0;
    }

    .workout-session-sheet .workout-exercise-primary {
        display: inline-flex;
    }

    .workout-sheet-danger {
        align-items: stretch;
        flex-direction: column;
        gap: 0.55rem;
    }

    .workout-sheet-danger .cancel-workout-button {
        width: 100%;
    }

    .workout-finish-card__surface.current-exercise-content--overlay {
        top: 0;
        left: 0;
        width: 100%;
        padding: calc(max(0.75rem, env(safe-area-inset-top)) + 4.5rem) max(0.85rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(0.85rem, env(safe-area-inset-left));
    }

    .workout-finish-card__metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #viewWorkoutPlanDetails .replacement-panel {
        z-index: 2000;
    }
}

@media (prefers-reduced-motion: reduce) {
    .workout-session-sheet,
    .current-exercise-stage--player .current-exercise-media,
    .current-exercise-stage--player .current-exercise-preview,
    .current-exercise-content--overlay {
        transition: none;
    }
}

/* Compact player header and exercise metrics */
.workout-player-tools {
    display: flex;
    align-items: flex-end;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.workout-player-tools .workout-player-prescription {
    min-width: 0;
    flex: 1;
    margin-top: 0;
}

.workout-player-tools .replace-current-exercise-button--visible {
    flex: 0 0 auto;
}

@media (max-width: 560px) {
    .current-exercise-stage--player .active-workout-toolbar {
        min-height: 4rem;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 0.3rem 0.4rem;
        padding: max(0.45rem, env(safe-area-inset-top)) 0.65rem 0.55rem;
    }

    .current-exercise-stage--player .active-workout-status span {
        font-size: 0.49rem;
        letter-spacing: 0.055em;
    }

    .current-exercise-stage--player .active-workout-status strong {
        max-width: 11rem;
        font-size: 0.74rem;
    }

    .current-exercise-stage--player .active-workout-timer {
        min-width: 4.8rem;
        padding: 0.25rem 0.38rem;
    }

    .current-exercise-stage--player .active-workout-timer small {
        font-size: 0.46rem;
    }

    .current-exercise-stage--player .active-workout-timer time {
        font-size: 0.82rem;
    }

    .current-exercise-stage--player .active-workout-progress {
        display: none;
    }

    .current-exercise-stage--player .active-workout-exit {
        width: 2rem;
        min-width: 2rem;
        min-height: 2rem;
        height: 2rem;
    }

    .current-exercise-content--overlay {
        top: calc(max(0.45rem, env(safe-area-inset-top)) + 4.35rem);
    }

    .current-exercise-content--overlay .current-exercise-title-row {
        display: block;
    }

    .current-exercise-content--overlay h3 {
        width: 100%;
        font-size: clamp(1.55rem, 7.5vw, 2.05rem);
    }

    .workout-player-tools {
        align-items: stretch;
        gap: 0.35rem;
        margin-top: 0.5rem;
    }

    .workout-player-tools .workout-player-prescription {
        display: flex;
        flex: 1 1 auto;
        gap: 0.28rem;
    }

    .workout-player-tools .workout-player-prescription > span {
        min-width: 0;
        padding: 0.3rem 0.38rem;
        border-radius: 8px;
    }

    .workout-player-tools .workout-player-prescription > span:first-child {
        max-width: 8.6rem;
        flex: 1 1 7rem;
    }

    .workout-player-tools .workout-player-prescription > span:not(:first-child) {
        flex: 0 1 3.5rem;
    }

    .workout-player-tools .workout-player-prescription small {
        font-size: 0.43rem;
    }

    .workout-player-tools .workout-player-prescription strong {
        margin-top: 0.08rem;
        font-size: 0.61rem;
    }

    .workout-player-tools .replace-current-exercise-button--visible {
        width: 7rem;
        min-width: 7rem;
        min-height: 2.75rem;
        padding: 0.42rem 0.5rem;
        align-self: stretch;
        font-size: 0.75rem;
        font-weight: 750;
        line-height: 1.15;
        white-space: normal;
    }

    .current-exercise-stage--player .current-exercise-media > img {
        transform: translateY(1.5rem) scale(1.22);
        transform-origin: center 56%;
    }

    .current-exercise-stage--player .current-exercise-navigation {
        right: 0.45rem;
        left: 0.45rem;
    }

    .current-exercise-stage--player .current-exercise-navigation button {
        width: 2.2rem;
        min-width: 2.2rem;
        height: 2.2rem;
        min-height: 2.2rem;
        opacity: 0.62;
        border-color: rgba(255, 255, 255, 0.14);
        background: rgba(3, 9, 6, 0.5);
        box-shadow: 0 5px 16px rgba(0, 0, 0, 0.22);
    }

    .current-exercise-stage--player .current-exercise-navigation button:focus-visible,
    .current-exercise-stage--player .current-exercise-navigation button:active {
        opacity: 1;
    }

    .workout-player-progress {
        display: none;
    }
}

/* Functional controls for progress: keep the existing cards and layout. */
#progressTab button, #progressTab summary,
.profile-subpage button, .profile-subpage summary,
#exerciseGoalEditor button, #exerciseGoalEditor input,
.completed-workout-exercise-links button {
    min-height: 44px;
}
.profile-subpage .entry-action, .profile-subpage-back {
    min-width: 44px;
    min-height: 44px;
}
#progressTab button:focus-visible, #progressTab summary:focus-visible,
.profile-subpage button:focus-visible, .profile-subpage summary:focus-visible,
[data-activity-id]:focus-visible, .progress-goal-form input:focus-visible {
    outline: 2px solid var(--action, #54cdb5);
    outline-offset: 3px;
}
button.profile-recent-card { width: 100%; text-align: left; color: inherit; font: inherit; }
.progress-goal-form { display: grid; gap: 0.65rem; margin-top: 0.8rem; min-width: 0; }
.progress-goal-form label { display: grid; gap: 0.4rem; font-size: 0.9rem; }
.progress-goal-form input { width: 100%; min-width: 0; box-sizing: border-box; padding: 0.7rem; font-size: 16px; color: var(--white); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.progress-goal-form > div { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.progress-goal-form button, .progress-feedback button, .goal-cancel button,
.progress-mini-grid article > button, .profile-subpage .plans-empty button,
.profile-subpage .empty-state button { padding: 0.65rem 0.9rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-raised); color: var(--white); }
.progress-goal-form [role="alert"]:empty, [data-cancel-error]:empty { display: none; }
.progress-goal-form small { font-size: 0.8rem; color: var(--text-secondary); }
.progress-goal-form button:disabled { opacity: 0.6; cursor: wait; }
#exerciseGoalEditor { min-width: 0; width: 100%; grid-column: 1 / -1; }
.completed-workout-exercises li:has(#exerciseGoalEditor) { display: grid; grid-template-columns: minmax(0, 1fr); }
.weekly-scheduled { padding: 0.7rem; border-left: 3px solid var(--action, #54cdb5); }
.goal-cancel summary { display: flex; align-items: center; cursor: pointer; text-decoration: underline; }
.record-kind { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.55rem; border-radius: 6px; font-size: 0.8rem; font-weight: 600; }
.record-kind--max_load { background: rgba(229,184,63,.12); color: #e5b83f; }
.record-kind--reps_at_load { background: rgba(84,205,181,.12); color: #54cdb5; }
.record-kind--estimated_1rm { background: rgba(167,139,218,.12); color: #c4a5f0; }
.record-comparison { display: block; margin-top: 0.4rem; font-weight: 600; font-size: 1rem; }
.record-context { display: block; margin-top: 0.3rem; font-size: 0.8rem; color: var(--text-secondary); }
.profile-subpage .progress-feedback { margin: 0.8rem 0; }
@media (max-width: 520px) {
    #progressTab .consistency-chart figcaption, #progressTab .consistency-chart ol { min-width: 0; }
    #progressTab .consistency-chart ol { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0.25rem; }
    #progressTab .consistency-chart small { font-size: 0.6rem; }
}

/* Evolução corporal: métricas independentes e datas reais. */
.body-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.body-controls label { display: grid; gap: 6px; min-width: 0; font-size: .85rem; }
.body-controls select { width: 100%; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-raised); color: var(--white); }
.body-title { margin: 0 0 16px; font-size: 1rem; }
.body-values { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 5px; align-items: start; }
.body-values > div { display: grid; gap: 5px; min-width: 0; }
.body-values strong { font-size: clamp(.9rem, 3.7vw, 1.3rem); overflow-wrap: anywhere; }
.body-values small, .body-values time { font-size: .72rem; }
.body-values > span { padding-top: 21px; color: #64748b; }
.body-chart { display: block; width: 100%; max-height: 320px; margin-top: 12px; overflow: visible; }
.body-chart text { font-size: 11px; fill: currentColor; }
.body-chart-grid { stroke: #cbd5e1; stroke-dasharray: 3 3; }
.body-chart-line { stroke: var(--action, #3b82f6); stroke-width: 2; }
.body-chart-point { fill: var(--action, #3b82f6); stroke: #fff; stroke-width: 1.5; }
.body-explanation, .body-stale, .body-empty p { font-size: .85rem; line-height: 1.5; margin: 12px 0; }
.body-stale { background: #fff7ed; color: #9a3412; padding: 12px; border-radius: 10px; }
#measurementSummary button, .body-values-detail summary, #bodyDateFilters summary, #bodyDateFilters button, #bodyDateFilters input { min-height: 44px; }
#measurementSummary button { padding: 10px 12px; margin: 4px 4px 0 0; border-radius: 8px; }
.body-values-detail summary { display: flex; align-items: center; cursor: pointer; text-decoration: underline; }
.body-values-detail table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.body-values-detail td, .body-values-detail th { padding: 8px; text-align: left; border-bottom: 1px solid #e2e8f0; }
.body-values-detail caption { padding: 8px; text-align: left; }
#measurementsTab :is(button, select, input, summary):focus-visible { outline: 2px solid #0f766e; outline-offset: 3px; }

.constancy-calendar, .constancy-weeks { padding: 12px; margin: 14px 0; background: var(--surface-raised); border: 1px solid var(--border); border-radius: 14px; }
.constancy-calendar h3 { font-size: 1rem; margin: 0 0 8px; }
.constancy-calendar p, .constancy-weeks p { font-size: .8rem; line-height: 1.5; margin: 8px 0; }
.constancy-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; margin-top: 12px; }
.constancy-days > span { font-size: .7rem; padding-bottom: 5px; }
.constancy-days button { min-height: 52px; min-width: 0; padding: 5px 0; display: grid; gap: 4px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--gray-text); }
.constancy-days button > span { font-size: .64rem; }
.constancy-days strong { font-size: .8rem; }
.constancy-days .has-workout { color: #60a5fa; }
.constancy-days .has-diet { color: #c4b5fd; }
.constancy-days button[aria-pressed="true"] { border-color: var(--action); background: var(--action-soft); }
.constancy-calendar button:focus-visible, .constancy-weeks summary:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
#constancyDayDetail { padding: 8px; margin-top: 12px; background: var(--surface-soft); border-radius: 8px; font-size: .85rem; }
#constancyDayDetail ul { padding-left: 20px; }
.constancy-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.constancy-actions button, .constancy-weeks summary { min-height: 44px; padding: 10px; cursor: pointer; }
.constancy-weeks ul { list-style: none; padding: 0; margin: 0; }
.constancy-weeks li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); font-size: .8rem; }
.constancy-weeks small { display: block; margin-top: 4px; color: var(--gray-text); }
.constancy-weeks strong { text-align: right; }
.constancy-weeks .week-fulfilled { color: var(--success); }
.constancy-weeks .week-in_progress { color: #93c5fd; }

.evolution-section { margin-bottom: 24px; }
.evolution-section > h3 { font-size: 1.1rem; margin: 0 0 12px; }
.evolution-summary-card, .performance-comparison article { padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-raised); margin: 10px 0; }
.evolution-summary-card h4, .performance-comparison h3 { margin: 0 0 10px; font-size: .95rem; }
.evolution-summary-card p, .performance-comparison p { font-size: .85rem; line-height: 1.5; margin: 8px 0; }
.evolution-summary-card button, .evolution-explore button, #exerciseProgressPanel button { min-height: 44px; padding: 10px 12px; margin: 5px 5px 0 0; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-soft); color: var(--white); }
.evolution-explore { border-top: 1px solid var(--border); padding: 16px 0; }
.evolution-explore h3 { font-size: .95rem; }
.evolution-consistency > summary, .performance-records > summary, .performance-sessions summary, .evolution-summary-card summary { min-height: 44px; padding: 12px 0; cursor: pointer; }
.performance-selector { display: grid; gap: 8px; margin: 16px 0; }
.performance-selector select { width: 100%; min-width: 0; min-height: 44px; padding: 10px; background: var(--surface-raised); color: var(--white); border: 1px solid var(--border); border-radius: 8px; }
.performance-sessions { list-style: none; padding: 0; }
.performance-sessions > li { display: block !important; padding: 8px 0; border-bottom: 1px solid var(--border); }
.performance-sets { padding-left: 18px; font-size: .8rem; line-height: 1.6; }
.performance-sets li { display: list-item !important; padding: 2px 0 !important; }
.performance-records article { padding: 12px 0; border-top: 1px solid var(--border); }
#progressTab :is(button, summary):focus-visible, #exerciseProgressPanel :is(button, select, summary):focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
#activitiesTab.showing-performance > .profile-subpage-header { display: none; }
#exerciseProgressPanel .back-button { width: auto; height: auto; display: inline-flex; align-items: center; max-width: 100%; }

/* Progresso mobile: quatro indicadores, um nível de cartões. */
#progressTab #workoutProgressOverview { background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; }
#progressTab .content-header { margin-bottom: 14px; }
#progressTab .content-heading > p { display: none; }
#progressTab .evolution-section { margin-bottom: 16px; }
#progressTab .evolution-section > h3 { font-size: 1rem; margin: 0 0 8px; }
#progressTab svg { width: 22px; height: 22px; flex-shrink: 0; }
#progressTab .rhythm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#progressTab .rhythm-card, #progressTab .change-card { padding: 12px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: 16px; min-width: 0; }
#progressTab .rhythm-card header { display: flex; gap: 8px; align-items: center; color: #93c5fd; }
#progressTab .rhythm-card h4 { font-size: 14px; margin: 0; color: var(--white); }
#progressTab .rhythm-card p { font-size: 14px; color: var(--gray-text); margin: 4px 0; line-height: 1.3; }
#progressTab .rhythm-value { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 10px; }
#progressTab .rhythm-value > strong, #progressTab .food-count { font-size: 28px; line-height: 1.1; font-weight: 750; }
#progressTab .rhythm-value small, #progressTab .food-count small { font-size: 16px; color: var(--gray-text); }
#progressTab .food-count { display: block; margin-top: 10px; }
#progressTab .rhythm-ring { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--action) var(--fill), var(--border) 0); flex-shrink: 0; position: relative; }
#progressTab .rhythm-ring::before { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--surface-raised); }
#progressTab .rhythm-ring svg { position: relative; width: 20px; height: 20px; color: #93c5fd; }
#progressTab .rhythm-ring.is-complete { background: conic-gradient(var(--success) var(--fill), var(--border) 0); }
#progressTab .rhythm-ring.is-complete svg { color: var(--success); }
#progressTab .food-week { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); margin-top: 7px; gap: 2px; }
#progressTab .food-day { display: grid; justify-items: center; color: var(--gray-text); font-size: 12px; }
#progressTab .food-day small { font-size: 11px; }
#progressTab .food-day b { line-height: 17px; }
#progressTab .food-day--tracked b { color: #93c5fd; }
#progressTab .food-day--future b { border-bottom: 1px dotted var(--gray-text); }
#progressTab .progress-text-action { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 0; margin: 0; background: none; border: 0; color: #93c5fd; font-size: 14px; text-align: left; cursor: pointer; }
#progressTab .progress-text-action svg { width: 20px; height: 20px; }
#progressTab .weekly-scheduled { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin: 8px 0 0; font-size: 14px; line-height: 1.4; background: var(--action-soft); border-radius: 10px; border: 0; color: var(--gray-text); }
#progressTab .change-card { display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 8px; margin: 8px 0; }
#progressTab .change-icon { width: 32px; height: 32px; background: var(--action-soft); color: #93c5fd; border-radius: 10px; display: grid; place-items: center; }
#progressTab .change-card h4 { margin: 0 0 4px; font-size: 14px; overflow-wrap: anywhere; }
#progressTab .change-card h4 small { font-size: 14px; color: var(--gray-text); font-weight: 400; }
#progressTab .change-card p { margin: 3px 0; font-size: 14px; line-height: 1.35; color: var(--gray-text); }
#progressTab .body-preview-value { font-size: 28px; line-height: 1.15; overflow-wrap: anywhere; }
#progressTab .body-preview-value small { font-size: 16px; }
#progressTab .compact-sets strong { color: var(--white); }
#progressTab .compact-record { border-top: 1px solid var(--border); padding-top: 5px; }
#progressTab .progress-stale { color: #fcd34d; }
#progressTab .progress-next > p { font-size: 14px; color: var(--gray-text); margin: 6px 0 10px; }
#progressTab .progress-primary-action { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; min-height: 48px; width: 100%; background: var(--action-strong); color: white; border: 0; border-radius: 12px; font-size: 16px; font-weight: 650; }
#progressTab .progress-primary-action:hover { background: var(--action-hover); }
#progressTab .progress-goal-detail > summary, #progressTab .evolution-consistency > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 12px 0; cursor: pointer; font-size: 14px; }
#progressTab .progress-goal-detail > summary::after, #progressTab .evolution-consistency > summary::after { content: '+'; margin-left: auto; font-size: 20px; }
#progressTab .progress-goal-detail[open] > summary::after, #progressTab .evolution-consistency[open] > summary::after { content: '−'; }
#progressTab .food-legend, #progressTab .progress-goal-detail p { color: var(--gray-text); font-size: 14px; line-height: 1.5; }
#progressTab .evolution-explore { margin-top: 8px; }
#progressTab .evolution-consistency { scroll-margin-top: 70px; }
#progressTab .constancy-calendar { padding: 8px; }
#progressTab .constancy-days { gap: 2px; }
@media (min-width: 800px) {
    #progressTab #progressAuthenticatedContent { max-width: 760px; margin-inline: auto; }
    #progressTab .rhythm-card { padding: 16px; }
    #progressTab .food-week { max-width: 220px; }
}
#progressTab .rhythm-card { display: flex; flex-direction: column; }
#progressTab .rhythm-card > .progress-text-action { margin-top: auto; }
#progressTab .constancy-days { grid-template-columns: repeat(7, minmax(44px, 1fr)); overflow-x: auto; }
#progressTab .evolution-explore button { display: inline-flex; align-items: center; gap: 8px; }

/* Perfil: identidade, acessos frequentes e opções de conta no celular. */
#statsTab .profile-dashboard { gap: 16px; max-width: 760px; margin-inline: auto; }
#statsTab .profile-page-heading h1 { margin: 2px 0 0; font-size: 24px; line-height: 1.2; }
#statsTab svg { width: 22px; height: 22px; flex-shrink: 0; }
#statsTab .profile-identity-card { padding: 16px; margin: 0; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-raised); box-shadow: none; }
#statsTab .profile-identity-card__top { gap: 14px; align-items: center; }
#statsTab .profile-identity-avatar { position: relative; width: 64px; height: 64px; overflow: hidden; border: 1px solid var(--action-border); background: var(--action-soft); color: #93c5fd; font-size: 26px; }
#statsTab .profile-identity-copy h2 { font-size: 22px; line-height: 1.25; overflow-wrap: anywhere; }
#statsTab .profile-identity-copy p { display: inline-block; margin: 6px 0 0; padding: 4px 8px; background: var(--action-soft); color: #93c5fd; border-radius: 7px; font-size: 14px; }
#statsTab .profile-badges:empty { display: none; }
#statsTab .profile-badges:not(:empty) { margin-top: 12px; }
#statsTab .profile-badge { font-size: 13px; color: var(--gray-text); overflow-wrap: anywhere; min-width: 0; }
#statsTab .profile-edit-action { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 12px; border: 0; border-radius: 10px; background: var(--action-strong); color: #fff; font-size: 14px; text-align: left; }
#statsTab .profile-edit-action > span { flex: 1; }
#statsTab .profile-edit-action:hover { background: var(--action-hover); }
#statsTab #profileAuthenticatedContent { display: grid; gap: 16px; }
#statsTab .profile-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#statsTab .profile-shortcuts > button { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; min-height: 112px; padding: 12px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: 16px; color: var(--white); text-align: left; }
#statsTab .profile-shortcut-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--action-soft); color: #93c5fd; }
#statsTab .profile-shortcuts strong { font-size: 15px; line-height: 1.3; }
#statsTab .profile-shortcut-caption { display: flex; align-items: center; justify-content: space-between; gap: 4px; width: 100%; margin-top: auto; font-size: 14px; line-height: 1.3; color: var(--gray-text); }
#statsTab .profile-shortcut-caption svg { width: 18px; height: 18px; }
#statsTab .profile-settings-section { padding: 0; background: none; border: 0; box-shadow: none; }
#statsTab .profile-section-heading { margin-bottom: 8px; }
#statsTab .profile-section-heading h3 { font-size: 16px; }
#statsTab .profile-settings-list { border: 1px solid var(--border); border-radius: 14px; padding: 0 12px; background: var(--surface-raised); }
#statsTab .profile-settings-list button { min-height: 72px; padding: 12px 0; gap: 10px; color: var(--white); border: 0; border-bottom: 1px solid var(--border); }
#statsTab .profile-settings-list button > span:first-child { background: var(--action-soft); color: #93c5fd; border: 0; width: 36px; height: 36px; }
#statsTab .profile-settings-list button strong { font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
#statsTab .profile-settings-list button small { font-size: 14px; line-height: 1.3; margin-top: 4px; color: var(--gray-text); }
#statsTab .profile-settings-list button > svg { width: 18px; height: 18px; color: var(--gray-text); }
#statsTab .profile-settings-list button:not(.hidden):not(:has(~ button:not(.hidden))) { border-bottom: 0; }
#statsTab .profile-account-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 8px; }
#statsTab .profile-account-actions button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 8px 0; background: transparent; border: 0; color: var(--gray-text); font-size: 14px; }
#statsTab .profile-account-actions .profile-delete-action { color: #fca5a5; }
#statsTab button { cursor: pointer; }
#statsTab button:focus-visible { outline: 2px solid #93c5fd; outline-offset: 3px; }
#statsTab .profile-guest-panel { margin: 0; padding: 16px; border-radius: 16px; }
#statsTab .profile-guest-panel h3 { font-size: 18px; }
#statsTab .profile-guest-panel p { font-size: 14px; line-height: 1.5; }
#statsTab .profile-guest-panel button { min-height: 48px; font-size: 14px; }
#statsTab:has(#profileGuestPanel:not(.hidden)) .profile-identity-card { display: none; }
#statsTab .profile-guest-panel { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; }
#statsTab .profile-guest-panel > span { color: #93c5fd; background: var(--action-soft); }
#statsTab .profile-guest-panel button { grid-column: 1 / -1; width: 100%; background: var(--action-strong); color: white; border: 0; border-radius: 10px; }
#dietModal .modal-content { width: min(100%, 520px); padding: 20px; background: var(--surface-raised, #152031); }
#dietModal .diet-entry-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
#dietModal .diet-entry-heading h2 { flex: 1; min-width: 0; margin: 0; font-size: 22px; }
#dietModal .lucide { width: 22px; height: 22px; flex-shrink: 0; vertical-align: middle; }
#dietModal .diet-entry-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #93c5fd; background: rgba(59,130,246,.12); }
#dietModal .diet-entry-close { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; padding: 0; border: 0; border-radius: 12px; color: var(--text-primary, #f1f5f9); background: transparent; }
#dietModal .diet-entry-context { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 12px; }
#dietModal .form-group { min-width: 0; margin: 0; }
#dietModal label { display: block; font-size: 14px; margin-bottom: 8px; }
#dietModal .diet-entry-context input, #dietModal select { width: 100%; min-width: 0; height: 48px; box-sizing: border-box; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface, #0f172a); color: var(--text-primary, #f1f5f9); font: inherit; font-size: 16px; color-scheme: dark; }
#dietModal .profile-section { display: block; padding: 0; margin: 22px 0 16px; border: 0; background: transparent; }
#dietModal .diet-entry-label { font-size: 18px; font-weight: 650; margin: 0; }
#dietModal .diet-entry-help { font-size: 14px; line-height: 1.5; color: var(--text-secondary, #b4bfd0); margin: 8px 0 12px; }
#dietModal .field-input { min-width: 0; min-height: 52px; background: var(--surface, #0f172a); }
#dietModal .field-input__core { font-size: 16px; min-width: 0; width: 100%; }
#dietModal .awesomplete { min-width: 0; width: 100%; }
#dietModal .diet-photo-btn { min-height: 44px; font-size: 14px; padding: 8px 12px; }
#dietModal .diet-photo-remove { width: 44px; height: 44px; }
#dietModal details { margin: 0; padding: 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: transparent; }
#dietModal summary { min-height: 52px; cursor: pointer; padding: 12px 0; box-sizing: border-box; font-size: 14px; color: var(--text-primary, #f1f5f9); }
#dietModal summary span { font-size: 12px; color: var(--text-secondary, #b4bfd0); margin-left: 6px; }
#dietModal .macro-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
#dietModal .macro-stepper { display: block; padding: 0; border: 0; background: transparent; min-width: 0; }
#dietModal .macro-stepper label { white-space: normal; overflow: visible; color: var(--text-secondary, #b4bfd0); }
#dietModal .macro-stepper__icon { display: none; }
#dietModal .stepper { display: block; width: 100%; }
#dietModal .stepper__input { width: 100%; min-height: 48px; font-size: 16px; box-sizing: border-box; }
#dietModal .macros-ai { min-height: 44px; }
#dietModal .sheet-actions { margin: 12px -20px -20px; padding: 16px 20px max(16px, env(safe-area-inset-bottom)); background: var(--surface-raised, #152031); }
#dietModal #dietSaveBtn { min-height: 48px; background: var(--action-strong, #2563eb); color: #fff; font-size: 16px; box-shadow: none; }
#dietModal #precisionBadge:empty, #dietModal #dietMessage:empty { display: none; }
#dietModal :is(button, input, select, summary, textarea):focus-visible { outline: 2px solid #93c5fd; outline-offset: 3px; }
@media (max-width: 560px) {
    #dietModal .modal-content { max-height: 94dvh; border-radius: 20px 20px 0 0; }
}
#dietModal [hidden] { display: none !important; }
#dietModal .diet-entry-heading { justify-content: space-between; }
#dietModal #dietFlowProgress { flex: 1; font-size: 14px; color: var(--text-secondary, #b4bfd0); }
#dietModal #dietModalTitle { font-size: 24px; line-height: 1.3; margin: 8px 0 24px; outline: none; }
#dietModal [data-diet-step] { min-width: 0; }
#dietModal .diet-method { display: flex; align-items: center; gap: 14px; width: 100%; padding: 20px 16px; margin: 14px 0; border: 1px solid var(--border); border-radius: 16px; background: rgba(59,130,246,.08); color: var(--text-primary, #f1f5f9); text-align: left; }
#dietModal .diet-method > .lucide:first-child { width: 28px; height: 28px; color: #93c5fd; }
#dietModal .diet-method span { flex: 1; min-width: 0; }
#dietModal .diet-method strong { display: block; font-size: 18px; }
#dietModal .diet-method small { display: block; font-size: 14px; line-height: 1.5; color: var(--text-secondary, #b4bfd0); margin-top: 6px; }
#dietModal textarea { box-sizing: border-box; width: 100%; min-height: 100px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface, #0f172a); color: var(--text-primary, #f1f5f9); font: inherit; font-size: 16px; line-height: 1.6; resize: vertical; }
#dietModal #dietPhotoPreview { margin-top: 16px; }
#dietModal .diet-photo-actions { display: flex; flex-wrap: wrap; gap: 10px; }
#dietModal .diet-photo-actions > button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 1 1 190px; }
#dietModal .diet-photo-status { margin: 12px 0 0; padding: 11px 12px; border-radius: 10px; color: var(--text-secondary, #b4bfd0); background: rgba(59,130,246,.1); font-size: 14px; line-height: 1.5; }
#dietModal .diet-photo-status--error { color: #fee2e2; background: rgba(220,38,38,.14); }
#dietModal #dietPhotoPreviewImg { display: block; width: 100%; max-height: 260px; object-fit: contain; border-radius: 14px; margin-bottom: 10px; }
#dietModal #dietReviewPhoto { width: 80px; height: 80px; object-fit: cover; border-radius: 12px; margin-bottom: 16px; }
#dietModal :is(#dietPhotoBtn, #dietPhotoLibraryBtn, #dietPhotoRemove) { min-height: 44px; font-size: 14px; }
#dietModal #dietNutrientSummary { padding: 16px; margin: 16px 0; border-radius: 12px; background: rgba(59,130,246,.08); font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }
#dietModal #dietFinalDescription { font-size: 18px; line-height: 1.6; overflow-wrap: anywhere; }
#dietModal .diet-entry-context { margin: 20px 0; }
#dietModal .sheet-actions { position: static; flex-direction: column; gap: 8px; }
#dietModal #dietFlowNext { min-height: 48px; background: var(--action-strong, #2563eb); color: #fff; box-shadow: none; font-size: 16px; }
#dietModal .diet-flow-link { min-height: 44px; border: 0; background: transparent; color: #93c5fd; font-size: 14px; padding: 10px; }
#dietModal #dietMessage:not(:empty) { margin: 16px 0; padding: 12px; font-size: 14px; line-height: 1.5; border-radius: 10px; color: #f1f5f9; background: rgba(59,130,246,.12); }
@media (max-width: 560px) {
    #dietModal { padding: 0; align-items: flex-end; }
    #dietModal .modal-content { height: auto; max-height: 96dvh; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
}
#dietModal #dietSummaryCalories { display: block; font-size: 28px; line-height: 1.3; }
#dietModal .diet-summary-macros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; font-size: 14px; line-height: 1.4; color: var(--text-secondary, #b4bfd0); }
#dietModal #dietDiscardPanel button { display: block; width: 100%; min-height: 48px; margin-top: 12px; }
#dietModal #dietKeepDraft { background: var(--action-strong, #2563eb); color: #fff; box-shadow: none; }
#dietModal #dietShareOpen { width: 100%; min-height: 48px; margin: 4px 0 16px; }
#dietModal .diet-share-panel { margin: 12px 0 20px; padding: 18px; border: 1px solid rgba(96, 165, 250, .3); border-radius: 18px; background: #0b1524; color: #f8fafc; }
#dietModal .diet-share-panel h3 { margin: 0 0 14px; font-size: 19px; outline: none; }
#dietModal #dietShareCanvas { display: block; width: min(100%, 280px); height: auto; aspect-ratio: 9 / 16; margin: 0 auto 18px; border-radius: 12px; background: #06101f; box-shadow: 0 12px 32px rgba(0, 0, 0, .35); }
#dietModal .diet-share-controls { display: grid; gap: 6px; }
#dietModal .diet-share-controls label { margin: 8px 0 0; color: #dbeafe; }
#dietModal .diet-share-controls input { width: 100%; accent-color: #60a5fa; }
#dietModal #dietShareStatus { min-height: 22px; margin: 14px 0; color: #cbd5e1; font-size: 14px; }
#dietModal .diet-share-actions { display: flex; flex-wrap: wrap; gap: 10px; }
#dietModal .diet-share-actions button { flex: 1 1 150px; min-height: 48px; }

/* Home e editores de compartilhamento. */
#todayCardapioBody .diet-daily-swipe { transition: opacity 120ms ease, transform 120ms ease; }
#todayCardapioBody .diet-daily-swipe.is-removing { opacity: 0; transform: translateY(-8px) scale(.98); pointer-events: none; }
#todayCardapioBody .today-meals-complete { padding: 1rem; margin-bottom: .75rem; border: 1px solid rgba(110, 231, 183, .25); border-radius: 14px; color: #a7f3d0; background: rgba(110, 231, 183, .06); line-height: 1.5; }
#todayCardapioBody button { min-height: 44px; }
#todayCardapioBody .diet-daily-more { min-width: 44px; }
#dietModal .share-editor-heading,
.workout-share-shell .share-editor-heading { display: grid; gap: 0; }
.workout-share-shell .share-editor-heading > button { margin-bottom: .75rem; }
#dietModal .share-editor-heading h3,
.workout-share-shell .share-editor-heading h3 { margin: .35rem 0 .5rem; color: #f8fafc; font-size: 1.35rem; line-height: 1.25; }
#dietModal .share-editor-heading > span,
.workout-share-shell .share-editor-heading > span { color: #60a5fa; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
#dietModal .share-editor-heading p,
.workout-share-shell .share-editor-heading p { margin: 0 0 1rem; color: #cbd5e1; font-size: .875rem; line-height: 1.5; }
#dietModal .share-preview-label { margin: 0 0 .75rem; color: #94a3b8; font-size: .75rem; font-weight: 700; }
#dietModal .diet-share-panel,
.workout-share-shell .workout-share-option,
.workout-share-shell .workout-share-preview { background: #0b1220; border: 1px solid rgba(96, 165, 250, .25); border-radius: 18px; }
#dietModal #dietShareCanvas,
.workout-share-shell .workout-share-preview [data-workout-share-canvas] { display: block; width: min(100%, 280px); height: auto; max-height: none; aspect-ratio: 9 / 16; margin-inline: auto; border-radius: 12px; background: #0b1220; box-shadow: 0 12px 32px rgba(0, 0, 0, .25); }
#dietModal .diet-share-controls { padding: 1rem; border-radius: 12px; background: rgba(96, 165, 250, .06); }
#dietModal .diet-share-controls h4,
.workout-share-shell .workout-share-option h4,
.workout-share-shell .workout-share-preview h4 { color: #f8fafc; font-size: .9rem; }
#dietModal .diet-share-controls label,
.workout-share-shell .workout-share-slider label { color: #cbd5e1; font-size: .8rem; }
#dietModal .diet-share-controls input { min-height: 32px; }
#dietModal .diet-share-controls .diet-share-background { display: flex; gap: .5rem; }
#dietModal .diet-share-controls .diet-share-background button { flex: 1; min-height: 44px; border: 1px solid rgba(148, 163, 184, .25); border-radius: 10px; color: #cbd5e1; background: #111c2c; font: inherit; font-weight: 700; }
#dietModal .diet-share-controls .diet-share-background button.is-active { color: #dbeafe; border-color: #60a5fa; background: rgba(59, 130, 246, .2); }
#dietModal .diet-share-controls .diet-share-background-hint { color: #94a3b8; font-size: .75rem; line-height: 1.4; }
.workout-share-shell .workout-share-slider { min-height: 44px; }
.workout-share-shell .workout-share-mode-toggle button,
.workout-share-shell .workout-share-exercise-controls button,
.workout-share-shell .workout-share-photo-actions button { min-height: 44px; min-width: 44px; font-size: .8rem; }
.workout-share-shell .workout-share-mode-toggle button { color: #cbd5e1; }
.workout-share-shell .workout-share-mode-toggle button.is-active { color: #dbeafe; background: rgba(59, 130, 246, .2); border-color: #60a5fa; }
#dietModal #dietShareSubmit,
.workout-share-shell [data-workout-action="share-workout-card"] { min-height: 48px; padding: .75rem 1rem; border: 1px solid #3b82f6; border-radius: 12px; background: #2563eb; color: #fff; font: inherit; font-weight: 700; }
#dietModal #dietShareSubmit:disabled,
.workout-share-shell [data-workout-action="share-workout-card"]:disabled { opacity: .55; cursor: default; }
#dietModal .diet-share-panel button,
.workout-share-shell button,
#todayCardapioBody button { transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease; }
#dietModal .diet-share-panel button:active:not(:disabled),
.workout-share-shell button:active:not(:disabled),
#todayCardapioBody button:active:not(:disabled) { transform: scale(.98); }
#dietModal .diet-share-panel :is(button, input, [tabindex]):focus-visible,
.workout-share-shell :is(button, input, summary, [tabindex]):focus-visible,
#todayCardapioBody button:focus-visible { outline: 2px solid #93c5fd; outline-offset: 3px; }
#dietModal #dietShareStatus,
.workout-share-shell .workout-share-status { min-height: 2.5em; color: #cbd5e1; line-height: 1.4; font-size: .875rem; }
@media (max-width: 768px) {
    .workout-share-shell .workout-share-editor { grid-template-columns: minmax(0, 1fr); }
    .workout-share-shell .workout-share-preview { position: static; }
    #dietModal #dietShareCanvas,
    .workout-share-shell .workout-share-preview [data-workout-share-canvas] { width: min(100%, 240px, 25dvh); }
}
@media (prefers-reduced-motion: reduce) {
    #todayCardapioBody .diet-daily-swipe,
    #todayCardapioBody button,
    #dietModal .diet-share-panel *,
    .workout-share-shell * { animation: none !important; transition: none !important; }
    #todayCardapioBody button:active,
    #dietModal .diet-share-panel button:active,
    .workout-share-shell button:active { transform: none; }
}

/* Gerador de treino: mantém o modal da dieta intacto e concentra a experiência no celular. */
.plan-wizard-modal--workout {
    --plan-accent: #60a5fa;
    --plan-blue: #93c5fd;
    --plan-surface: #0f172a;
    --plan-surface-raised: #172033;
    background: rgba(2, 6, 23, 0.82);
}

.plan-wizard-modal--workout .plan-wizard {
    border-color: rgba(96, 165, 250, 0.24) !important;
    background: linear-gradient(155deg, #111c31 0%, #0b1220 68%, #080f1d 100%) !important;
}

.plan-wizard-modal--workout .plan-wizard__header {
    align-items: center;
    min-height: 4.75rem;
    padding-block: 1rem;
    background: rgba(8, 15, 29, 0.8);
}

.plan-wizard-modal--workout .plan-wizard__heading { align-items: center; }
.plan-wizard-modal--workout .plan-wizard__icon { width: 2.6rem; height: 2.6rem; flex-basis: 2.6rem; color: #bfdbfe; border-color: rgba(96, 165, 250, 0.3); background: rgba(59, 130, 246, 0.14); }
.plan-wizard-modal--workout .plan-wizard__heading h3 { margin: 0; font-size: 1.2rem; }
.plan-wizard-modal--workout .plan-wizard__heading p { display: none; }
.plan-wizard-modal--workout #planWizardKicker { color: #93c5fd; font-size: 0.78rem; letter-spacing: 0.04em; }

.plan-wizard-modal--workout .plan-wizard__progress { padding: 0.5rem 1.5rem 0.65rem; background: rgba(8, 15, 29, 0.8); }
.plan-wizard-modal--workout .plan-wizard__steps { display: none; }
.plan-wizard-modal--workout .plan-wizard__track { margin-top: 0; background: rgba(148, 163, 184, 0.2); }
.plan-wizard-modal--workout .plan-wizard__track span { background: linear-gradient(90deg, #2563eb, #93c5fd); }

.plan-wizard-modal--workout .plan-wizard__body { padding-bottom: 1.5rem; }
.plan-wizard-modal--workout .wizard-step-heading { margin-bottom: 1.4rem; }
.plan-wizard-modal--workout .wizard-step-heading > span { display: none; }
.plan-wizard-modal--workout .wizard-step-heading h4 { color: #f8fafc; font-size: clamp(1.35rem, 4vw, 1.65rem); }
.plan-wizard-modal--workout .wizard-step-heading p,
.plan-wizard-modal--workout .wizard-field-hint { color: #aebcd0; font-size: 0.875rem; line-height: 1.45; }
.plan-wizard-modal--workout .wizard-field > label,
.plan-wizard-modal--workout .wizard-fieldset > legend { color: #e2e8f0; font-size: 0.9375rem; }
.plan-wizard-modal--workout .wizard-field > label span { font-size: 0.875rem; color: #aebcd0; }

.plan-wizard-modal--workout .wizard-field input,
.plan-wizard-modal--workout .wizard-field select,
.plan-wizard-modal--workout .wizard-field textarea {
    min-height: 3rem;
    border-color: rgba(148, 163, 184, 0.28) !important;
    border-radius: 12px;
    color: #f8fafc !important;
    background: rgba(15, 23, 42, 0.9) !important;
    font-size: 1rem !important;
}

.plan-wizard-modal--workout .wizard-field textarea { min-height: 6.5rem; }
.plan-wizard-modal--workout .wizard-field input:focus,
.plan-wizard-modal--workout .wizard-field select:focus,
.plan-wizard-modal--workout .wizard-field textarea:focus { border-color: #60a5fa !important; box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2); }

.plan-wizard-modal--workout .wizard-choice--selected { grid-column: auto; }
.plan-wizard-modal--workout .wizard-choice--selected .wizard-choice__surface,
.plan-wizard-modal--workout .wizard-choice__surface,
.plan-wizard-modal--workout .wizard-check__surface { min-height: 3rem; padding: 0.7rem 0.8rem; font-size: 0.9375rem; }
.plan-wizard-modal--workout .wizard-choice input:checked + .wizard-choice__surface,
.plan-wizard-modal--workout .wizard-check input:checked + .wizard-check__surface { border-color: rgba(96, 165, 250, 0.8); color: #eff6ff; background: rgba(59, 130, 246, 0.16); }
.plan-wizard-modal--workout .wizard-choice input:checked + .wizard-choice__surface > i,
.plan-wizard-modal--workout .wizard-check input:checked + .wizard-check__surface > i { border-color: #60a5fa; color: #0f172a; background: #93c5fd; }

.plan-wizard-modal--workout .workout-equipment-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plan-wizard-modal--workout .workout-equipment-modes .wizard-choice__surface { min-height: 4rem; align-items: flex-start; }
.plan-wizard-modal--workout .wizard-equipment-details { border-color: rgba(96, 165, 250, 0.22); background: rgba(30, 41, 59, 0.5); }
.plan-wizard-modal--workout .wizard-equipment-details > span { color: #dbeafe; font-size: 0.875rem; }
.plan-wizard-modal--workout .workout-recommendation-status { min-height: 1.25rem; margin: 0.25rem 0 0; color: #bfdbfe; font-size: 0.875rem; }
.plan-wizard-modal--workout .workout-recommendation-status.is-warning { color: #fcd34d; }

.plan-wizard-modal--workout .wizard-review { margin: 0 0 1.1rem; border-color: rgba(96, 165, 250, 0.27); background: rgba(30, 58, 138, 0.17); }
.plan-wizard-modal--workout .wizard-review__title strong { font-size: 1rem; color: #eff6ff; }
.plan-wizard-modal--workout .wizard-review__title span { display: none; }
.plan-wizard-modal--workout .wizard-review dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.plan-wizard-modal--workout .wizard-review dl > div { padding: 0.7rem; background: rgba(15, 23, 42, 0.62); }
.plan-wizard-modal--workout .wizard-review dt { font-size: 0.75rem; color: #aebcd0; }
.plan-wizard-modal--workout .wizard-review dd { font-size: 0.875rem; color: #e2e8f0; }

.plan-wizard-modal--workout .workout-advanced { margin-top: 1rem; border-top: 1px solid rgba(148, 163, 184, 0.23); }
.plan-wizard-modal--workout .workout-advanced > summary { display: flex; align-items: center; min-height: 3.25rem; cursor: pointer; color: #dbeafe; font-size: 0.9375rem; font-weight: 700; list-style: none; }
.plan-wizard-modal--workout .workout-advanced > summary::-webkit-details-marker { display: none; }
.plan-wizard-modal--workout .workout-advanced > summary i { margin-left: auto; color: #93c5fd; transition: transform 160ms ease; }
.plan-wizard-modal--workout .workout-advanced[open] > summary i { transform: rotate(180deg); }
.plan-wizard-modal--workout .workout-advanced__content { padding: 0.5rem 0 0.25rem; }

.plan-wizard-modal--workout .plan-wizard__actions { justify-content: flex-end; padding-block: 0.8rem; background: rgba(8, 15, 29, 0.92); }
.plan-wizard-modal--workout .plan-wizard__actions > .btn-secondary { display: none; }
.plan-wizard-modal--workout .plan-wizard__navigation { width: 100%; }
.plan-wizard-modal--workout .plan-wizard__navigation .btn-secondary { min-width: 6.5rem; }
.plan-wizard-modal--workout #planWizardNext { flex: 1; min-height: 3rem; color: #fff; background: #2563eb; box-shadow: none; }
.plan-wizard-modal--workout #planWizardNext:hover { background: #1d4ed8; transform: none; }

.plan-wizard-modal--workout .workout-generation-state { display: grid; justify-items: center; align-content: center; min-height: 100%; padding: 2rem 1rem; text-align: center; }
.plan-wizard-modal--workout .workout-generation-state__icon { width: 4rem; height: 4rem; display: grid; place-items: center; border-radius: 50%; color: #bfdbfe; background: rgba(59, 130, 246, 0.16); font-size: 1.45rem; }
.plan-wizard-modal--workout .workout-generation-state h4 { margin-top: 1.25rem; color: #f8fafc; font-size: 1.35rem; }
.plan-wizard-modal--workout .workout-generation-state p { max-width: 25rem; margin-top: 0.5rem; color: #aebcd0; font-size: 0.9375rem; line-height: 1.5; }
.plan-wizard-modal--workout .workout-generation-state .btn-primary { width: min(100%, 20rem); min-height: 3rem; margin-top: 1.25rem; color: #fff; background: #2563eb; box-shadow: none; }
.plan-wizard-modal--workout .workout-generation-state dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; width: min(100%, 25rem); margin-top: 1.25rem; text-align: left; }
.plan-wizard-modal--workout .workout-generation-state dl > div { padding: 0.75rem; border: 1px solid rgba(96, 165, 250, 0.22); border-radius: 10px; background: rgba(15, 23, 42, 0.6); }
.plan-wizard-modal--workout .workout-generation-state dt { color: #aebcd0; font-size: 0.75rem; }
.plan-wizard-modal--workout .workout-generation-state dd { margin-top: 0.2rem; color: #eff6ff; font-size: 0.875rem; }
.plan-wizard-modal--workout.is-generating .sheet-drag-handle { display: none; }

@media (max-width: 768px) {
    .plan-wizard-modal--workout .plan-wizard__header { min-height: 4.25rem; padding: max(0.75rem, env(safe-area-inset-top)) 1rem 0.7rem; }
    .plan-wizard-modal--workout .plan-wizard__icon { display: none; }
    .plan-wizard-modal--workout .plan-wizard__progress { padding: 0.45rem 1rem 0.55rem; }
    .plan-wizard-modal--workout .plan-wizard__body { padding: 1.15rem 1rem 1.4rem; }
    .plan-wizard-modal--workout .plan-wizard__actions { padding: 0.75rem 1rem max(0.75rem, env(safe-area-inset-bottom)); }
    .plan-wizard-modal--workout .workout-equipment-modes { grid-template-columns: 1fr; }
    .plan-wizard-modal--workout .workout-equipment-modes .wizard-choice__surface { min-height: 3rem; align-items: center; }
}

@media (max-width: 390px) {
    .plan-wizard-modal--workout .wizard-review dl,
    .plan-wizard-modal--workout .workout-generation-state dl { grid-template-columns: 1fr; }
    .plan-wizard-modal--workout .plan-wizard__navigation .btn-secondary { min-width: 5.7rem; }
}

/* Gerador de plano alimentar: fluxo compacto e mobile-first, isolado dos demais modais. */
.plan-wizard-modal--diet {
    --plan-accent: #60a5fa;
    --plan-blue: #93c5fd;
    background: rgba(2, 6, 23, 0.82);
}

.plan-wizard-modal--diet .plan-wizard {
    border-color: rgba(96, 165, 250, 0.24) !important;
    background: linear-gradient(155deg, #111c31 0%, #0b1220 68%, #080f1d 100%) !important;
}

.plan-wizard-modal--diet .plan-wizard__header {
    align-items: center;
    min-height: 4.75rem;
    padding-block: 1rem;
    background: rgba(8, 15, 29, 0.8);
}

.plan-wizard-modal--diet .plan-wizard__heading { align-items: center; }
.plan-wizard-modal--diet .plan-wizard__heading h3 { margin: 0; font-size: 1.2rem; }
.plan-wizard-modal--diet .plan-wizard__heading p { display: none; }
.plan-wizard-modal--diet #planWizardKicker { color: #93c5fd; font-size: 0.78rem; letter-spacing: 0.04em; }
.plan-wizard-modal--diet .plan-wizard__progress { padding: 0.5rem 1.5rem 0.65rem; background: rgba(8, 15, 29, 0.8); }
.plan-wizard-modal--diet .plan-wizard__steps { display: none; }
.plan-wizard-modal--diet .plan-wizard__track { margin-top: 0; background: rgba(148, 163, 184, 0.2); }
.plan-wizard-modal--diet .plan-wizard__track span { background: linear-gradient(90deg, #2563eb, #93c5fd); }
.plan-wizard-modal--diet .plan-wizard__body { padding-bottom: 1.5rem; }
.plan-wizard-modal--diet .wizard-step-heading { margin-bottom: 1.25rem; }
.plan-wizard-modal--diet .wizard-step-heading > span { display: none; }
.plan-wizard-modal--diet .wizard-step-heading h4 { color: #f8fafc; font-size: clamp(1.35rem, 4vw, 1.65rem); }
.plan-wizard-modal--diet .wizard-step-heading p,
.plan-wizard-modal--diet .wizard-field-hint { color: #aebcd0; font-size: 0.875rem; line-height: 1.45; }
.plan-wizard-modal--diet .wizard-field > label,
.plan-wizard-modal--diet .wizard-fieldset > legend { color: #e2e8f0; font-size: 0.9375rem; }
.plan-wizard-modal--diet .wizard-field > label span,
.plan-wizard-modal--diet .wizard-fieldset > legend span { color: #aebcd0; font-size: 0.875rem; }

.plan-wizard-modal--diet .wizard-field input,
.plan-wizard-modal--diet .wizard-field select,
.plan-wizard-modal--diet .wizard-field textarea {
    min-height: 3rem;
    border-color: rgba(148, 163, 184, 0.28) !important;
    border-radius: 12px;
    color: #f8fafc !important;
    background: rgba(15, 23, 42, 0.9) !important;
    font-size: 1rem !important;
}

.plan-wizard-modal--diet .wizard-field textarea { min-height: 6.5rem; }
.plan-wizard-modal--diet .wizard-field input:focus,
.plan-wizard-modal--diet .wizard-field select:focus,
.plan-wizard-modal--diet .wizard-field textarea:focus { border-color: #60a5fa !important; box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2); }
.plan-wizard-modal--diet .wizard-choice--selected { grid-column: auto; }
.plan-wizard-modal--diet .wizard-choice--selected .wizard-choice__surface,
.plan-wizard-modal--diet .wizard-choice__surface { min-height: 3rem; padding: 0.7rem 0.8rem; font-size: 0.9375rem; }
.plan-wizard-modal--diet .wizard-choice input:checked + .wizard-choice__surface { border-color: rgba(96, 165, 250, 0.8); color: #eff6ff; background: rgba(59, 130, 246, 0.16); }
.plan-wizard-modal--diet .wizard-choice input:checked + .wizard-choice__surface > i { border-color: #60a5fa; color: #0f172a; background: #93c5fd; }
.plan-wizard-modal--diet .wizard-review { margin: 0 0 1rem; border-color: rgba(96, 165, 250, 0.27); background: rgba(30, 58, 138, 0.17); }
.plan-wizard-modal--diet .wizard-review__title strong { color: #eff6ff; font-size: 1rem; }
.plan-wizard-modal--diet .wizard-review__title span { display: none; }
.plan-wizard-modal--diet .wizard-review__actions { display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; margin: 0.75rem 0 0; }
.plan-wizard-modal--diet .wizard-review__actions .text-button { min-height: 2.75rem; padding: 0.35rem 0.15rem; color: #93c5fd; }
.plan-wizard-modal--diet .diet-profile-note { padding: 0.85rem 1rem; border: 1px solid rgba(96, 165, 250, 0.24); border-radius: 12px; background: rgba(30, 58, 138, 0.14); }
.plan-wizard-modal--diet .diet-profile-note strong { color: #eff6ff; font-size: 0.9375rem; }
.plan-wizard-modal--diet .diet-profile-note p { margin: 0.35rem 0 0.5rem; color: #aebcd0; font-size: 0.875rem; line-height: 1.45; }
.plan-wizard-modal--diet .diet-profile-note .text-button { min-height: 2.75rem; padding-inline: 0; color: #93c5fd; }
.plan-wizard-modal--diet .wizard-review dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.plan-wizard-modal--diet .wizard-review dl > div { padding: 0.7rem; background: rgba(15, 23, 42, 0.62); }
.plan-wizard-modal--diet .wizard-review dt { color: #aebcd0; font-size: 0.75rem; }
.plan-wizard-modal--diet .wizard-review dd { color: #e2e8f0; font-size: 0.875rem; }

.plan-wizard-modal--diet .diet-wizard-disclosure { margin-top: 0.85rem; border-top: 1px solid rgba(148, 163, 184, 0.23); }
.plan-wizard-modal--diet .diet-wizard-disclosure > summary { display: flex; align-items: center; gap: 0.4rem; min-height: 3.25rem; cursor: pointer; color: #dbeafe; font-size: 0.9375rem; font-weight: 700; list-style: none; }
.plan-wizard-modal--diet .diet-wizard-disclosure > summary::-webkit-details-marker { display: none; }
.plan-wizard-modal--diet .diet-wizard-disclosure > summary span { color: #aebcd0; font-size: 0.8125rem; font-weight: 400; }
.plan-wizard-modal--diet .diet-wizard-disclosure > summary i { margin-left: auto; color: #93c5fd; transition: transform 160ms ease; }
.plan-wizard-modal--diet .diet-wizard-disclosure[open] > summary i { transform: rotate(180deg); }
.plan-wizard-modal--diet .diet-wizard-disclosure__content { display: grid; gap: 0.85rem; padding: 0.5rem 0 0.25rem; }
.plan-wizard-modal--diet .ingredient-chip__remove { min-width: 2.25rem; min-height: 2.25rem; }
.plan-wizard-modal--diet .plan-wizard__actions { justify-content: flex-end; padding-block: 0.8rem; background: rgba(8, 15, 29, 0.92); }
.plan-wizard-modal--diet .plan-wizard__actions > .btn-secondary { display: none; }
.plan-wizard-modal--diet .plan-wizard__navigation { width: 100%; }
.plan-wizard-modal--diet #planWizardNext { flex: 1; min-height: 3rem; color: #fff; background: #2563eb; box-shadow: none; }
.plan-wizard-modal--diet #planWizardNext:hover { background: #1d4ed8; transform: none; }

.plan-wizard-modal--diet .diet-generation-state { display: grid; justify-items: center; align-content: center; min-height: 100%; padding: 2rem 1rem; text-align: center; }
.plan-wizard-modal--diet .diet-generation-state__icon { width: 4rem; height: 4rem; display: grid; place-items: center; border-radius: 50%; color: #bfdbfe; background: rgba(59, 130, 246, 0.16); font-size: 1.45rem; }
.plan-wizard-modal--diet .diet-generation-state h4 { margin-top: 1.25rem; color: #f8fafc; font-size: 1.35rem; }
.plan-wizard-modal--diet .diet-generation-state p { max-width: 25rem; margin-top: 0.5rem; color: #aebcd0; font-size: 0.9375rem; line-height: 1.5; }
.plan-wizard-modal--diet .diet-generation-state .btn-primary { width: min(100%, 20rem); min-height: 3rem; margin-top: 1.25rem; color: #fff; background: #2563eb; box-shadow: none; }
.plan-wizard-modal--diet .diet-generation-state dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; width: min(100%, 25rem); margin-top: 1.25rem; text-align: left; }
.plan-wizard-modal--diet .diet-generation-state dl > div { padding: 0.75rem; border: 1px solid rgba(96, 165, 250, 0.22); border-radius: 10px; background: rgba(15, 23, 42, 0.6); }
.plan-wizard-modal--diet .diet-generation-state dt { color: #aebcd0; font-size: 0.75rem; }
.plan-wizard-modal--diet .diet-generation-state dd { margin-top: 0.2rem; color: #eff6ff; font-size: 0.875rem; }
.plan-wizard-modal--diet.is-generating .sheet-drag-handle { display: none; }

@media (max-width: 768px) {
    .plan-wizard-modal--diet .plan-wizard__header { min-height: 4.25rem; padding: max(0.75rem, env(safe-area-inset-top)) 1rem 0.7rem; }
    .plan-wizard-modal--diet .plan-wizard__icon { display: none; }
    .plan-wizard-modal--diet .plan-wizard__progress { padding: 0.45rem 1rem 0.55rem; }
    .plan-wizard-modal--diet .plan-wizard__body { padding: 1.15rem 1rem 1.4rem; }
    .plan-wizard-modal--diet .plan-wizard__actions { padding: 0.75rem 1rem max(0.75rem, env(safe-area-inset-bottom)); }
    .plan-wizard-modal--diet .wizard-choice-grid { grid-template-columns: 1fr; }
    .plan-wizard-modal--diet .wizard-review dl,
    .plan-wizard-modal--diet .diet-generation-state dl { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .plan-wizard-modal--diet .diet-wizard-disclosure > summary i { transition: none; }
}

#shoppingListModal .modal-content { max-width: 40rem; }
.shopping-list-details { padding: 0 1rem 1.25rem; color: #dbeafe; }
.shopping-list-controls { display: flex; flex-wrap: wrap; gap: .65rem; align-items: end; margin-bottom: .65rem; }
.shopping-list-controls label { display: grid; gap: .25rem; color: #aebcd0; font-size: .875rem; }
.shopping-list-controls select { min-height: 2.75rem; min-width: 5rem; padding: .45rem .6rem; border: 1px solid rgba(148,163,184,.35); border-radius: .55rem; color: #f8fafc; background: #17233a; font-size: 1rem; }
.shopping-toggle { display: flex !important; align-items: center; min-height: 2.75rem; padding: 0 .65rem; border: 1px solid rgba(148,163,184,.25); border-radius: .55rem; }
.shopping-toggle input, .shopping-item input { width: 1.15rem; height: 1.15rem; }
.shopping-list-meta { margin: .5rem 0 1rem; color: #aebcd0; font-size: .875rem; }
.shopping-category { margin-top: 1rem; }
.shopping-category h4 { margin: 0 0 .45rem; color: #bfdbfe; font-size: 1rem; }
.shopping-category ul { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.shopping-item { display: flex; align-items: center; justify-content: space-between; gap: .65rem; min-height: 3rem; padding: .55rem .65rem; border: 1px solid rgba(148,163,184,.2); border-radius: .6rem; background: rgba(15,23,42,.45); }
.shopping-item label { display: grid; grid-template-columns: auto 1fr; column-gap: .55rem; align-items: center; min-width: 0; flex: 1; }
.shopping-item label span { color: #f8fafc; font-size: 1rem; }
.shopping-item label small { grid-column: 2; color: #aebcd0; font-size: .8125rem; }
.shopping-item.is-checked label span { color: #94a3b8; text-decoration: line-through; }
.shopping-substitute { min-height: 2.5rem; padding: .35rem .55rem; border: 0; border-radius: .45rem; color: #bfdbfe; background: rgba(37,99,235,.16); font-size: .8125rem; }
.shopping-share-text { width: 100%; min-height: 5rem; margin-top: 1rem; padding: .7rem; border: 1px solid rgba(148,163,184,.22); border-radius: .55rem; color: #cbd5e1; background: #0f172a; font: .8125rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
@media (max-width: 768px) { #shoppingListModal .modal-content { width: 100%; max-width: none; } .shopping-list-controls { align-items: stretch; } .shopping-list-controls > * { flex: 1 1 100%; } .shopping-list-controls .shopping-toggle { justify-content: flex-start; } }

/* Loading and interaction boundaries shared by the site and native player. */
body[data-auth-state="unknown"] #guestAuthActions,
body[data-auth-state="unknown"] #premiumHeaderPill { visibility: hidden; }
body[data-auth-state="guest"] #mainScreen { display: none; }
#authSessionStatus, .home-data-note { margin: .5rem 0; color: #b7c9df; font-size: .875rem; }
#authSessionStatus:empty, .home-data-note:empty { display: none; }
.home-skeleton { min-height: 5rem; display: grid; align-content: center; gap: .6rem; padding: .8rem 0; }
.home-skeleton::before, .home-skeleton::after { content: ""; display: block; height: .85rem; width: 70%; border-radius: .4rem; background: rgba(148, 163, 184, .18); }
.home-skeleton::after { width: 45%; }
html[data-native-platform="ios"], html[data-native-platform="ios"] body,
html[data-native-platform="ios"] .app-shell,
html[data-native-platform="ios"] .modal-content { touch-action: manipulation; }
html[data-native-platform="ios"] :is(button, a, input, select, textarea, summary, [role="button"]) { touch-action: manipulation; }

.active-workout-shell--immersive { min-height: 0; }
.current-exercise-stage--player { min-height: 0; height: 100%; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.current-exercise-stage--player .current-exercise-media,
.current-exercise-stage--player .current-exercise-content--overlay { touch-action: pan-y; }
.workout-sheet-handle { touch-action: none; }
.workout-complete-state[data-workout-gesture-surface] { touch-action: pan-y; }
.current-exercise-stage--player .current-exercise-media { -webkit-user-select: none; user-select: none; }
.workout-session-sheet { display: flex; flex-direction: column; max-height: calc(100% - 3.5rem); }
.workout-sheet-handle { flex: 0 0 var(--sheet-peek, 76px); }
.workout-session-sheet__scroll { flex: 1 1 auto; min-height: 0; height: auto; touch-action: pan-y pinch-zoom; scroll-padding-block: .75rem; }
.workout-session-sheet input { font-size: max(1rem, 16px); scroll-margin-block: .75rem; }
.workout-sheet-save-action { flex: 0 0 auto; padding: .6rem max(.75rem, env(safe-area-inset-right)) max(.65rem, env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-left)); border-top: 1px solid rgba(148, 163, 184, .2); background: #0c1511; }
.workout-sheet-save-action button { width: 100%; min-height: 44px; position: static !important; margin: 0; }
.workout-player-feedback { position: absolute; z-index: 14; right: max(.75rem, env(safe-area-inset-right)); left: max(.75rem, env(safe-area-inset-left)); bottom: calc(var(--sheet-peek, 76px) + .65rem); margin: 0; padding: .7rem .9rem; border: 1px solid #536b65; border-radius: .75rem; color: #f1f8f4; background: #11271e; font-size: .875rem; overflow-wrap: anywhere; }
.workout-player-feedback:empty { display: none; }
.workout-player-feedback[role="alert"] { color: #ffe4e6; border-color: #be5966; background: #421c25; }
.workout-session-sheet.is-expanded ~ .workout-player-feedback { bottom: auto; top: max(.6rem, env(safe-area-inset-top)); }
.workout-player-loading { display: grid; align-content: center; min-height: 16rem; padding: 1.25rem; color: #dce7e2; }
.workout-player-loading .home-skeleton { width: 100%; }
.active-workout-shell--complete { position: relative; min-height: 0; height: 100%; overflow-y: auto; touch-action: manipulation; }
.active-workout-shell--complete .workout-complete-state { min-height: 0; padding-block: 2rem; touch-action: pinch-zoom; }
.active-workout-shell--complete .workout-player-feedback { position: static; margin: .75rem; }
.completed-workout-sync { display: flex; align-items: center; gap: .55rem; margin: .75rem 0; padding: .75rem .85rem; border: 1px solid rgba(79, 141, 255, .3); border-radius: .7rem; color: #dbeafe; background: rgba(37, 99, 235, .12); }

#viewWorkoutPlanDetails .replacement-panel { position: absolute; inset: 0; z-index: 2000; margin: 0; padding: max(1rem, env(safe-area-inset-top)) max(.85rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(.85rem, env(safe-area-inset-left)); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y pinch-zoom; border: 0; border-radius: inherit; background: #0b1410; box-shadow: none; }
.plan-modal.workout-execution-mode .plan-details-container { position: relative; }
#viewWorkoutPlanDetails .replacement-panel__header { position: sticky; top: -1rem; z-index: 2; padding-block: .75rem; background: #0b1410; }
#viewWorkoutPlanDetails .replacement-panel button { min-height: 44px; }
#viewWorkoutPlanDetails .replacement-panel :is(h6, p, strong) { overflow-wrap: anywhere; }

html[data-native-platform="ios"] .plan-modal.workout-execution-mode,
.plan-modal.workout-execution-mode.has-workout-keyboard { top: var(--workout-viewport-top, 0px); bottom: auto; height: var(--workout-viewport-height, 100dvh); padding: 0; }
html[data-native-platform="ios"] .plan-modal.workout-execution-mode .modal-content,
.plan-modal.workout-execution-mode.has-workout-keyboard .modal-content { width: 100%; max-width: none; height: 100%; max-height: 100%; min-height: 0; border-radius: 0; }
html[data-native-platform="ios"] .current-exercise-stage--player,
.has-workout-keyboard .current-exercise-stage--player { height: 100%; min-height: 0; }
html[data-native-platform="ios"] .current-exercise-stage--player .active-workout-toolbar { padding-top: max(.55rem, env(safe-area-inset-top)); padding-right: max(.75rem, env(safe-area-inset-right)); padding-left: max(.75rem, env(safe-area-inset-left)); }
html[data-native-platform="ios"] .current-exercise-content--overlay { left: max(1rem, env(safe-area-inset-left)); width: calc(100% - max(1rem, env(safe-area-inset-left)) - max(1rem, env(safe-area-inset-right))); }
html[data-native-platform="ios"] .workout-session-sheet { left: 0; right: 0; height: min(68%, 640px); }
html[data-native-platform="ios"] .workout-session-sheet__scroll { padding-inline: max(.75rem, env(safe-area-inset-left)) max(.75rem, env(safe-area-inset-right)); }
.has-workout-keyboard .workout-session-sheet { height: calc(100% - 3rem); max-height: calc(100% - 3rem); }
.has-workout-keyboard .workout-sheet-handle { --sheet-peek: 48px; }
.has-workout-keyboard .workout-sheet-save-action { padding-bottom: .5rem; }
.current-exercise-stage--player :is(button, input):focus-visible,
.workout-share-shell :is(button, input):focus-visible { outline: 2px solid #9bbdff; outline-offset: 3px; }
.current-exercise-stage--player .current-exercise-navigation button,
.current-exercise-stage--player .active-workout-exit,
.current-exercise-stage--player .replace-current-exercise-button--visible { min-width: 44px; min-height: 44px; }

[data-workout-share-canvas] { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 1rem; background: #0b1220; }
.workout-share-preview { min-width: 0; }
.workout-share-shell__actions { position: sticky; z-index: 10; bottom: 0; padding: .75rem 0 max(.75rem, env(safe-area-inset-bottom)); background: var(--surface); }
.workout-share-shell__actions button { min-height: 44px; }
.workout-share-status { color: #dce7e2; font-size: .875rem; }
.workout-share-disclosure > summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; cursor: pointer; list-style: none; }
.workout-share-disclosure > summary::-webkit-details-marker { display: none; }
.workout-share-disclosure > summary > i { transition: transform 180ms ease; }
.workout-share-disclosure[open] > summary > i { transform: rotate(180deg); }
.workout-share-disclosure__title { display: flex; align-items: center; gap: .6rem; font-weight: 700; }
.workout-share-disclosure__title > i { color: #65e7a4; }
.workout-share-disclosure__content { display: grid; gap: .75rem; padding-top: .5rem; animation: workout-share-disclosure-in 180ms ease-out; }
.workout-share-adjust-title { margin: 0; font-size: .8rem; }
.workout-share-exercise-hint { margin: 0; font-size: .75rem; }
@keyframes workout-share-disclosure-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 768px) {
    .workout-share-preview { grid-row: 1; }
    .workout-share-options { grid-row: 2; }
    .workout-share-preview { position: sticky; top: 0; z-index: 5; padding: .55rem; background: var(--surface); box-shadow: 0 .5rem 1rem rgba(7, 18, 13, .16); }
    .workout-share-preview [data-workout-share-canvas] { width: auto; max-width: 100%; max-height: min(42dvh, 420px); margin-inline: auto; }
    .workout-share-shell__actions { flex-wrap: wrap; padding-top: .65rem; border-top-color: var(--border); box-shadow: 0 -.35rem .8rem rgba(7, 18, 13, .08); }
    .workout-share-shell__actions button { flex: 1 1 100%; }
    .workout-share-disclosure { gap: .15rem; }
    .workout-share-disclosure[open] { gap: .75rem; }
}
@media (max-width: 560px) {
    .active-workout-shell--immersive, .current-exercise-stage--player { min-height: 0; height: 100%; }
    .workout-session-sheet { height: min(68%, 590px); }
}
@media (max-height: 500px) and (orientation: landscape) {
    .current-exercise-stage--player .active-workout-toolbar { grid-template-columns: minmax(0, 1fr) auto auto; }
    .current-exercise-stage--player .active-workout-progress { display: none; }
    .current-exercise-content--overlay { top: calc(max(.5rem, env(safe-area-inset-top)) + 3.5rem); }
    .current-exercise-content--overlay h3 { font-size: 1.35rem; }
    .workout-player-prescription { margin-top: .3rem; }
    .workout-session-sheet, html[data-native-platform="ios"] .workout-session-sheet { height: calc(100% - 3rem); max-height: calc(100% - 3rem); }
    .current-exercise-stage--player { --sheet-peek: 56px; }
    .workout-player-rest { top: auto; bottom: calc(var(--sheet-peek) + 1rem); }
}

.today-workout-preview { position: relative; margin: 0 0 .85rem; height: 160px; overflow: hidden; border-radius: 14px; background: #fff; }
.today-workout-preview > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.today-workout-preview > .exercise-image-placeholder { height: 100%; }
.today-workout-preview figcaption { position: absolute; right: .6rem; left: .6rem; bottom: .5rem; width: fit-content; max-width: calc(100% - 1.2rem); margin: 0; padding: .3rem .55rem; border-radius: .5rem; background: #0b1220; color: #f8fafc; font-size: .8rem; overflow-wrap: anywhere; }
.workout-player-feedback[hidden] { display: none; }
#authSessionStatus { padding-inline: 1rem; }
.offline-status {
    position: fixed;
    z-index: 20;
    right: max(.75rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    width: 1.9rem;
    height: 1.9rem;
    padding: 0;
    border: 1px solid rgba(250, 204, 21, .32);
    border-radius: 50%;
    color: #ffe78b;
    background: rgba(92, 70, 8, .82);
    box-shadow: 0 .2rem .65rem rgba(0, 0, 0, .16);
    display: grid;
    place-items: center;
    opacity: .8;
    pointer-events: none;
    transition: opacity .25s ease;
}
.offline-status svg { width: .95rem; height: .95rem; flex: 0 0 auto; }
.offline-status span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.offline-status[hidden] { display: none; }
.today-workout-preview[role="button"] { cursor: pointer; }
.today-workout-preview[role="button"]:focus-visible { outline: 3px solid #60a5fa; outline-offset: 3px; }

/* Home pull-to-refresh. iOS renders the gesture with UIRefreshControl. */
#dietTab { position: relative; }
.home-refresh-content {
    transform: translate3d(0, var(--home-pull-distance, 0), 0);
    transition: transform 240ms cubic-bezier(.2, .8, .2, 1);
}
.home-refresh-web-tracking .home-refresh-content {
    will-change: transform;
    transition: none;
}
.home-refresh-indicator {
    position: absolute;
    z-index: 3;
    top: max(.15rem, env(safe-area-inset-top));
    left: 50%;
    min-height: 2.35rem;
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .42rem .68rem;
    border: 1px solid rgba(96, 165, 250, .25);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(10, 20, 35, .9);
    box-shadow: 0 .45rem 1.2rem rgba(0, 0, 0, .24);
    opacity: calc(.2 + var(--home-pull-progress, 0) * .8);
    pointer-events: none;
    transform: translate3d(-50%, calc(-115% + var(--home-pull-distance, 0)), 0) scale(calc(.82 + var(--home-pull-progress, 0) * .18));
    transition: transform 240ms cubic-bezier(.2, .8, .2, 1), opacity 180ms ease;
}
.home-refresh-web-tracking .home-refresh-indicator { transition: none; }
.home-refresh-indicator[data-state="idle"] { visibility: hidden; }
.home-refresh-indicator[data-state="refreshing"],
.home-refresh-indicator[data-state="success"],
.home-refresh-indicator[data-state="partial"],
.home-refresh-indicator[data-state="error"],
.home-refresh-indicator[data-state="offline"] {
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(-50%, 0, 0) scale(1);
}
.home-refresh-indicator__icon { width: 1rem; height: 1rem; display: grid; place-items: center; color: #60a5fa; }
.home-refresh-indicator__icon svg { width: 1rem; height: 1rem; }
.home-refresh-indicator[data-state="tracking"] .home-refresh-indicator__icon,
.home-refresh-indicator[data-state="armed"] .home-refresh-indicator__icon { transform: rotate(calc(var(--home-pull-progress, 0) * 210deg)); }
.home-refresh-indicator[data-state="refreshing"] .home-refresh-indicator__icon { animation: home-refresh-spin .8s linear infinite; }
.home-refresh-indicator[data-state="success"] .home-refresh-indicator__icon { color: #5ee0bd; }
.home-refresh-indicator:is([data-state="error"], [data-state="partial"], [data-state="offline"]) .home-refresh-indicator__icon { color: #fbbf24; }
.home-refresh-indicator__label { font-size: .72rem; font-weight: 750; white-space: nowrap; }
.home-refresh-indicator__retry { min-height: 1.75rem; padding: .2rem .48rem; border: 0; border-radius: 999px; color: #07111f; background: #bfdbfe; font: inherit; font-size: .68rem; font-weight: 800; }
html[data-native-platform="ios"] .home-refresh-indicator:is([data-state="idle"], [data-state="tracking"], [data-state="armed"], [data-state="refreshing"], [data-state="success"], [data-state="settling"]) { display: none; }
html[data-native-platform="ios"] .home-refresh-indicator:is([data-state="partial"], [data-state="error"], [data-state="offline"]) {
    position: fixed;
    top: max(.75rem, env(safe-area-inset-top));
}
@keyframes home-refresh-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .home-refresh-content, .home-refresh-indicator { transition-duration: 1ms; }
    .home-refresh-indicator[data-state="refreshing"] .home-refresh-indicator__icon { animation: none; }
}

/* Registro rápido de uma série por vez, integrado ao player. */
.workout-quick-set-layer {
    position: absolute;
    z-index: 24;
    right: clamp(.65rem, 3vw, 2rem);
    bottom: 0;
    left: clamp(.65rem, 3vw, 2rem);
    max-height: min(72%, 660px);
    display: grid;
    align-content: start;
    gap: .8rem;
    padding: 0 1rem max(.8rem, env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(148, 163, 184, .24);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    color: #edf6f1;
    background: rgba(10, 20, 16, .985);
    box-shadow: 0 -24px 70px rgba(0, 0, 0, .58);
    opacity: 0;
    transform: translateY(1.25rem);
    animation: workout-quick-set-enter 240ms cubic-bezier(.22, .8, .24, 1) forwards;
    touch-action: pan-y pinch-zoom;
    -webkit-user-select: text;
    user-select: text;
}

.workout-quick-set-layer > header {
    position: sticky;
    z-index: 3;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 -1rem;
    padding: .9rem 1rem .7rem;
    border-bottom: 1px solid rgba(148, 163, 184, .15);
    background: rgba(10, 20, 16, .985);
}

.workout-quick-set-layer > header small,
.workout-quick-set-layer > header h3 { display: block; }
.workout-quick-set-layer > header small { color: #76e2aa; font-size: .68rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.workout-quick-set-layer > header h3 { margin: .12rem 0 0; color: #fff; font-size: 1.35rem; }
.workout-quick-set-layer > header button {
    min-width: 44px;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    color: #dce8e2;
    background: rgba(255, 255, 255, .06);
}

.workout-quick-goals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.workout-quick-goals > span { min-width: 0; padding: .65rem .7rem; border: 1px solid rgba(79, 141, 255, .2); border-radius: 11px; background: rgba(79, 141, 255, .07); }
.workout-quick-goals small, .workout-quick-goals strong { display: block; }
.workout-quick-goals small { color: #8fa49a; font-size: .58rem; font-weight: 750; text-transform: uppercase; }
.workout-quick-goals strong { margin-top: .18rem; overflow-wrap: anywhere; color: #e8f0ff; font-size: .78rem; }

.workout-quick-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.workout-quick-fields label > span { display: block; margin-bottom: .35rem; color: #c9d7d0; font-size: .78rem; font-weight: 800; }
.workout-quick-fields label > span small { color: #84958d; font-size: .65rem; }
.workout-quick-fields input {
    width: 100%;
    min-height: 64px;
    padding: .75rem .9rem;
    border: 1px solid rgba(148, 163, 184, .3);
    border-radius: 14px;
    color: #fff;
    background: #06100c;
    font: inherit;
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}
.workout-quick-fields input:focus { border-color: #6da0ff; outline: 3px solid rgba(79, 141, 255, .2); }

.workout-quick-rest { display: flex; align-items: center; gap: .65rem; padding: .65rem .75rem; border: 1px solid rgba(245, 158, 11, .35); border-radius: 12px; background: rgba(54, 35, 5, .48); }
.workout-quick-rest > span { color: #f5ce72; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.workout-quick-rest > strong { margin-right: auto; color: #fff7d6; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.workout-quick-rest > div { display: flex; gap: .4rem; }
.workout-quick-rest button,
.workout-quick-secondary button,
.workout-quick-error button { min-height: 44px; padding: .5rem .7rem; border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px; color: #e1ebe6; background: rgba(255, 255, 255, .06); font: inherit; font-size: .72rem; font-weight: 800; }

.workout-quick-optional { margin: 0; color: #8fa097; font-size: .7rem; }
.workout-quick-secondary { display: flex; flex-wrap: wrap; gap: .5rem; }
.workout-quick-error { padding: .7rem .8rem; border: 1px solid rgba(248, 113, 113, .42); border-radius: 11px; color: #ffe4e6; background: rgba(95, 24, 34, .45); font-size: .78rem; }
.workout-quick-error button { width: 100%; margin-top: .6rem; }
.workout-quick-checkpoint { display: grid; justify-items: center; gap: .65rem; padding: 1.25rem; color: #b8c9c0; text-align: center; }
.workout-quick-checkpoint i { color: #65e7a4; font-size: 2rem; }
.workout-quick-checkpoint p { margin: 0; }

.workout-quick-primary {
    position: sticky;
    z-index: 4;
    bottom: 0;
    width: 100%;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    border: 1px solid rgba(79, 141, 255, .58);
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, #568fff, #3072ea);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .38), 0 8px 20px rgba(48, 114, 234, .26);
    font: inherit;
    font-size: .92rem;
    font-weight: 850;
}

.current-exercise-stage--player.has-quick-set .current-exercise-media,
.current-exercise-stage--player.has-quick-set .current-exercise-content--overlay { filter: brightness(.58); }

.has-workout-keyboard .workout-quick-set-layer {
    top: max(.5rem, env(safe-area-inset-top));
    bottom: auto;
    height: min(var(--workout-entry-height), calc(100% - max(.5rem, env(safe-area-inset-top)) - .5rem));
    max-height: calc(100% - max(.5rem, env(safe-area-inset-top)) - .5rem);
    scroll-padding-block: 4rem 1rem;
    animation: none;
    opacity: 1;
    transform: none;
}

@keyframes workout-quick-set-enter { to { opacity: 1; transform: translateY(0); } }

@media (max-width: 560px) {
    .workout-quick-set-layer { right: 0; left: 0; max-height: min(74dvh, 620px); padding-inline: .8rem; border-right: 0; border-left: 0; border-radius: 20px 20px 0 0; }
    .workout-quick-set-layer > header { margin-inline: -.8rem; padding-inline: .8rem; }
    .workout-quick-goals { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; }
    .workout-quick-goals > span { padding: .5rem; }
    .workout-quick-goals strong { font-size: .68rem; }
    .workout-quick-fields { gap: .5rem; }
    .workout-quick-fields input { min-height: 60px; font-size: 1.55rem; }
    .workout-quick-rest { align-items: flex-start; flex-wrap: wrap; }
    .workout-quick-rest > div { width: 100%; }
    .workout-quick-rest button { flex: 1; }
    .workout-quick-secondary button { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .workout-quick-set-layer { animation: none; opacity: 1; transform: none; }
}

/* Daily meal cards: swipe actions and compact overflow menu. */
.diet-daily-swipe {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    background: #0c1725;
}

.diet-daily-swipe__action {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 0;
    width: 50%;
    display: flex;
    align-items: center;
    gap: .48rem;
    padding: 0 1rem;
    font-size: .7rem;
    font-weight: 850;
    letter-spacing: .01em;
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease;
}

.diet-daily-swipe__action .lucide { width: 1.05rem; height: 1.05rem; stroke-width: 2.5; }
.diet-daily-swipe__action--consumed {
    right: 0;
    justify-content: flex-end;
    color: #b9f8df;
    background: linear-gradient(270deg, rgba(19, 126, 91, .95), rgba(21, 94, 77, .82));
}
.diet-daily-swipe__action--skip {
    left: 0;
    justify-content: flex-start;
    color: #d8e0e8;
    background: linear-gradient(90deg, rgba(69, 82, 99, .96), rgba(42, 54, 70, .84));
}
.diet-daily-swipe.is-swiping-left .diet-daily-swipe__action--consumed,
.diet-daily-swipe.is-committing-left .diet-daily-swipe__action--consumed,
.diet-daily-swipe.is-swiping-right .diet-daily-swipe__action--skip,
.diet-daily-swipe.is-committing-right .diet-daily-swipe__action--skip { opacity: 1; }

.diet-daily-slot__surface {
    position: relative;
    z-index: 1;
    margin: 0;
    touch-action: pan-y;
    will-change: transform;
    transform: translate3d(var(--diet-swipe-x, 0), 0, 0);
    transition: transform 220ms cubic-bezier(.22, .75, .26, 1), opacity 180ms ease, box-shadow 180ms ease;
}
.diet-daily-slot__surface.is-swiping-left,
.diet-daily-slot__surface.is-swiping-right {
    transition: none;
    user-select: none;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .3);
}
.diet-daily-slot__surface.is-swipe-ready { border-color: rgba(126, 231, 198, .42); }
.diet-daily-slot__surface.is-committing-right { opacity: 0; transform: translate3d(110%, 0, 0) rotate(2deg); }
.diet-daily-slot__surface.is-committing-left { opacity: 0; transform: translate3d(-110%, 0, 0) rotate(-2deg); }

.diet-daily-slot__header-actions { display: flex; align-items: center; gap: .42rem; }
.diet-daily-more {
    width: 2.35rem;
    min-width: 2.35rem;
    min-height: 2.35rem;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 10px;
    color: #aebdcb;
    background: rgba(148, 163, 184, .06);
    cursor: pointer;
}
.diet-daily-more:hover { color: #dffaf2; border-color: rgba(45, 212, 191, .32); background: rgba(45, 212, 191, .08); }
.diet-daily-more:focus-visible { outline: 3px solid rgba(45, 212, 191, .24); outline-offset: 2px; }
.diet-daily-more:disabled { opacity: .5; cursor: wait; }
.diet-daily-more .lucide { width: 1.05rem; height: 1.05rem; }

.diet-daily-swipe__hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: .72rem;
    border-top: 1px solid rgba(148, 163, 184, .1);
    color: #718397;
    font-size: .63rem;
    font-weight: 720;
}
.diet-daily-swipe__hint span { display: inline-flex; align-items: center; gap: .28rem; }
.diet-daily-swipe__hint .lucide { width: .78rem; height: .78rem; }

.diet-daily-actions-overlay {
    position: fixed;
    inset: 0;
    z-index: 2600;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem;
    background: rgba(3, 8, 15, .58);
    backdrop-filter: blur(10px);
    opacity: 0;
}
.diet-daily-actions-overlay.is-open { opacity: 1; }
.diet-daily-actions-sheet {
    width: min(100%, 430px);
    padding: .65rem .75rem max(.8rem, env(safe-area-inset-bottom));
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 22px;
    color: #eef7f4;
    background: linear-gradient(180deg, rgba(19, 31, 48, .99), rgba(10, 19, 31, .99));
    box-shadow: 0 24px 70px rgba(0, 0, 0, .5), inset 0 1px rgba(255, 255, 255, .04);
}
.diet-daily-actions-overlay.is-open .diet-daily-actions-sheet { transform: translateY(0) scale(1); }
.diet-daily-actions-sheet__handle { width: 2.5rem; height: 4px; display: block; margin: .05rem auto .65rem; border-radius: 999px; background: rgba(148, 163, 184, .34); }
.diet-daily-actions-sheet > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 .25rem .65rem; }
.diet-daily-actions-sheet > header small { color: #7f91a6; font-size: .62rem; font-weight: 760; text-transform: uppercase; letter-spacing: .06em; }
.diet-daily-actions-sheet > header h3 { margin: .15rem 0 0; color: #f5faf8; font-size: 1rem; }
.diet-daily-actions-sheet__close {
    width: 2.4rem;
    min-width: 2.4rem;
    min-height: 2.4rem;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #9aabbc;
    background: rgba(148, 163, 184, .08);
    cursor: pointer;
}
.diet-daily-actions-sheet__item {
    width: 100%;
    min-height: 4rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem;
    padding: .65rem .55rem;
    border: 0;
    border-top: 1px solid rgba(148, 163, 184, .1);
    color: #dfe9f1;
    background: transparent;
    text-align: left;
    cursor: pointer;
}
.diet-daily-actions-sheet__item > span { width: 2.35rem; height: 2.35rem; display: grid; place-items: center; border-radius: 11px; color: #82e5cd; background: rgba(45, 212, 191, .09); }
.diet-daily-actions-sheet__item strong,
.diet-daily-actions-sheet__item small { display: block; }
.diet-daily-actions-sheet__item strong { font-size: .82rem; }
.diet-daily-actions-sheet__item small { margin-top: .18rem; color: #7f91a5; font-size: .65rem; }
.diet-daily-actions-sheet__item > .lucide { width: .95rem; color: #718297; }
.diet-daily-actions-sheet__item:hover:not(:disabled) { background: rgba(45, 212, 191, .045); }
.diet-daily-actions-sheet__item:disabled { opacity: .45; cursor: default; }

.toast:has(.toast__action) { display: flex; align-items: center; gap: .75rem; }
.toast:has(.toast__action) > span { flex: 1; }
.toast__action {
    min-height: 2.25rem;
    padding: .35rem .6rem;
    border: 1px solid currentColor;
    border-radius: 8px;
    color: inherit;
    background: transparent;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}

@media (max-width: 560px) {
    .diet-daily-swipe { border-radius: 14px; }
    .diet-daily-status { display: none; }
    .diet-daily-actions-overlay { padding: 0; }
    .diet-daily-actions-sheet { border-right: 0; border-bottom: 0; border-left: 0; border-radius: 22px 22px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
    .diet-daily-slot__surface,
    .diet-daily-actions-overlay,
    .diet-daily-actions-sheet { transition: none; }
}

/* Daily meals: readable hierarchy and immediate, server-confirmed feedback. */
#todayCardapioBody .diet-daily-slot { padding: 1rem; background: #111d2b; border-color: rgba(148, 163, 184, .18); }
#todayCardapioBody .diet-daily-slot > header { grid-template-columns: 2.35rem minmax(0, 1fr) auto; gap: .65rem; }
#todayCardapioBody .diet-daily-slot h3 { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.3; font-size: .95rem; }
#todayCardapioBody .diet-daily-slot header p { font-size: .75rem; color: #a2b1c1; }
#todayCardapioBody .diet-daily-slot__food { font-size: .875rem; line-height: 1.55; margin: .85rem 0 .5rem; color: #dde5ed; }
#todayCardapioBody .diet-daily-slot__macros { margin-bottom: .8rem; font-size: .75rem; color: #a2b1c1; }
.diet-daily-more { min-width: 44px; min-height: 44px; }
.diet-daily-more:active { background: rgba(45, 212, 191, .16); }
.diet-daily-swipe__hint { color: #a2b1c1; font-size: .75rem; font-weight: 600; }
.diet-daily-slot__saving:empty { display: none; }
.diet-daily-slot__saving { color: #9de8cd; font-size: .8125rem; padding-top: .7rem; border-top: 1px solid rgba(148, 163, 184, .14); }
.diet-daily-slot.is-saving { border-color: rgba(94, 224, 189, .55); animation: meal-saving-settle 160ms ease-out; }
.diet-daily-slot.is-saving .diet-daily-swipe__hint { display: none; }
@keyframes meal-saving-settle { from { opacity: .72; transform: translate3d(-8px, 0, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
@media (prefers-reduced-motion: reduce) { .diet-daily-slot.is-saving { animation: none; } }

.apple-signin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid #fff;
    border-radius: 8px;
    background: #000;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}
.google-auth > .apple-signin { width: 100%; margin-top: 12px; }
.apple-signin:disabled { opacity: .6; cursor: wait; }
.apple-signin:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Área profissional: alunos e treinos no site. */
.professional-heading, .professional-plan-section > header, .professional-student-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.professional-student-grid, .professional-editor-days { display: grid; gap: 1rem; }
.professional-plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1rem; }
.professional-student-card, .professional-plan-card, .professional-plan-section, .professional-editor-day, .professional-preview section { padding: 1.15rem; border: 1px solid var(--border); border-radius: 18px; color: var(--white); background: var(--surface-raised); }
.professional-student-card { display: flex; align-items: center; gap: 1rem; width: 100%; text-align: left; }
.professional-student-card > span { display: grid; gap: .25rem; }
.professional-student-card:hover { border-color: var(--primary-green); }
.professional-student-meta { margin-left: auto; }
.professional-student-avatar { display: grid; place-items: center; width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px; color: #fff; background: var(--primary-green); font-weight: 800; overflow: hidden; }
.professional-student-avatar img { width: 100%; height: 100%; object-fit: cover; }
.professional-student-card small, .professional-plan-card p, .professional-plan-card small, .professional-profile-grid small, .professional-plan-section > p { color: var(--muted-text); }
.professional-profile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0; }
.professional-profile-grid article { display: grid; gap: .3rem; padding: .9rem; border-radius: 12px; background: var(--surface-soft); }
.professional-plan-section > p { margin-bottom: 1rem; }
.professional-create-actions, .professional-card-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.professional-plan-card { display: grid; gap: .75rem; }
.professional-plan-card > div:first-child { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.plan-status { padding: .3rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.plan-status--draft { color: #805d08; background: #fff1c2; }
.plan-status--published { color: #17634b; background: #dcf7eb; }
.plan-status--archived { color: var(--muted-text); background: var(--surface-soft); }
.professional-sheet { max-width: 620px; }
.professional-editor-sheet { max-width: 1180px; }
.professional-editor-basics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.professional-editor-basics label, .professional-editor-day label { display: grid; gap: .4rem; color: var(--white); font-size: .85rem; }
.professional-editor-basics input, .professional-editor-basics select, .professional-editor-day input, .professional-editor-day select { width: 100%; min-width: 0; }
.professional-editor-day { display: grid; gap: .8rem; background: var(--surface-soft); }
.professional-editor-day > header { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.professional-exercise-rows { display: grid; gap: .9rem; }
.professional-exercise-row { display: grid; grid-template-columns: minmax(140px, 2fr) repeat(3, minmax(65px, .7fr)) minmax(80px, 1fr) minmax(100px, 1.5fr) auto; align-items: end; gap: .6rem; padding-bottom: .9rem; border-bottom: 1px solid var(--border); }
.professional-remove { min-height: 42px; }
.professional-preview { display: grid; gap: 1rem; }
.professional-preview article { display: grid; gap: .3rem; padding: .8rem 0; border-bottom: 1px solid var(--border); }
.invite-result { display: grid; gap: .75rem; padding: 1rem; margin: 1rem 0; border-radius: 14px; background: var(--surface-soft); }
.invite-result input { width: 100%; }
@media (max-width: 860px) {
    .professional-editor-basics, .professional-exercise-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .professional-student-meta { display: none !important; }
}
@media (max-width: 560px) {
    .professional-editor-basics, .professional-editor-day > header, .professional-profile-grid { grid-template-columns: 1fr; }
    .professional-student-header > div { flex: 1; }
    .professional-create-actions > button { flex: 1; }
}
#professionalPlanEditorModal .modal-header,
#professionalStudentModal .modal-header,
#professionalInviteModal .modal-header { display: flex; justify-content: space-between; align-items: center; }
#professionalPlanEditorModal .modal-header h3,
#professionalStudentModal .modal-header h3,
#professionalInviteModal .modal-header h3 { width: auto; max-width: none; white-space: normal; }
#professionalPlanEditorForm { padding: 1rem; }
.professional-editor-basics { padding: 1rem; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 14px; }
.professional-editor-basics input, .professional-editor-basics select,
.professional-editor-day input, .professional-editor-day select, .invite-result input { min-height: 44px; padding: .65rem .75rem; border: 1px solid var(--border-strong); border-radius: 10px; color: var(--white); background: var(--surface-raised); font: inherit; }
#professionalPlanEditorModal .modal-header::after,
#professionalStudentModal .modal-header::after,
#professionalInviteModal .modal-header::after { display: none; }
