:root {
    --blue-dark: #123765;
    --blue: #2563a9;
    --blue-light: #eaf4ff;
    --background: #f4f7fb;
    --surface: #ffffff;
    --text: #172033;
    --text-soft: #5c687a;
    --border: #d9e2ec;
    --success: #23845b;
    --danger: #b64242;
    --shadow: 0 16px 40px rgba(18, 55, 101, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--background);
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 20px;
}

.login-card {
    width: min(920px, 100%);
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.login-guide {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
    background: var(--blue-light);
}

.login-guide img {
    width: min(240px, 80%);
    height: auto;
}

.login-guide h1 {
    margin: 18px 0 8px;
    color: var(--blue-dark);
    font-size: 30px;
}

.login-guide p {
    max-width: 320px;
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
}

.login-form {
    padding: 54px;
}

.step-label {
    display: inline-block;
    margin-bottom: 12px;
    padding: 7px 12px;
    color: var(--blue-dark);
    background: var(--blue-light);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.login-form h2 {
    margin: 0 0 10px;
    color: var(--blue-dark);
    font-size: 28px;
}

.introduction {
    margin: 0 0 28px;
    color: var(--text-soft);
    line-height: 1.5;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

input,
select {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    color: var(--text);
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 10px;
    font: inherit;
}

input:focus,
select:focus {
    border-color: var(--blue);
    outline: 3px solid rgba(37, 99, 169, 0.15);
}

.button-primary {
    width: 100%;
    min-height: 50px;
    padding: 12px 18px;
    color: #fff;
    background: var(--blue);
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.button-primary:hover {
    background: var(--blue-dark);
}

.alert-error {
    margin-bottom: 20px;
    padding: 13px 15px;
    color: #7d2525;
    background: #fff0f0;
    border: 1px solid #efb9b9;
    border-radius: 10px;
    line-height: 1.45;
}

.security-note {
    margin-top: 20px;
    color: var(--text-soft);
    font-size: 14px;
    text-align: center;
}

@media (max-width: 720px) {
    .login-card {
        grid-template-columns: 1fr;
    }

    .login-guide {
        padding: 28px;
    }

    .login-guide img {
        width: 150px;
    }

    .login-form {
        padding: 32px 24px;
    }
}
.app-header {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 5%;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.brand {
    display: block;
    color: var(--blue-dark);
    font-size: 22px;
}

.brand-subtitle,
.user-area span {
    display: block;
    margin-top: 3px;
    color: var(--text-soft);
    font-size: 13px;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: right;
}

.dashboard {
    width: min(1180px, 92%);
    margin: 0 auto;
    padding: 42px 0 70px;
}

.welcome-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 30px;
}

.welcome-panel h1 {
    margin: 0 0 8px;
    color: var(--blue-dark);
    font-size: 34px;
}

.welcome-panel p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.5;
}

.button-link {
    display: inline-flex;
    width: auto;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.button-secondary {
    min-height: 42px;
    padding: 10px 16px;
    color: var(--blue-dark);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 9px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.button-secondary:hover {
    background: var(--blue-light);
    border-color: var(--blue);
}

.empty-state {
    display: grid;
    grid-template-columns: 220px 1fr;
    align-items: center;
    gap: 44px;
    padding: 46px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.empty-state img {
    width: 100%;
    max-height: 230px;
    object-fit: contain;
}

.empty-state h2 {
    margin: 0 0 12px;
    color: var(--blue-dark);
    font-size: 26px;
}

.empty-state p {
    max-width: 600px;
    margin: 0 0 24px;
    color: var(--text-soft);
    line-height: 1.6;
}

.macrocycle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

.macrocycle-card {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.macrocycle-card h2 {
    margin: 16px 0;
    color: var(--blue-dark);
}

.status-badge {
    display: inline-block;
    padding: 6px 10px;
    color: var(--blue-dark);
    background: var(--blue-light);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.macrocycle-card dl {
    margin: 0 0 22px;
}

.macrocycle-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.macrocycle-card dt {
    color: var(--text-soft);
}

.macrocycle-card dd {
    margin: 0;
    font-weight: 700;
    text-align: right;
}

@media (max-width: 720px) {
    .app-header,
    .welcome-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .user-area {
        width: 100%;
        justify-content: space-between;
        text-align: left;
    }

    .empty-state {
        grid-template-columns: 1fr;
        padding: 30px 24px;
        text-align: center;
    }

    .empty-state img {
        max-height: 170px;
    }
}
.form-page {
    width: min(1180px, 92%);
    margin: 0 auto;
    padding: 34px 0 70px;
}

.progress-panel {
    margin-bottom: 22px;
    padding: 18px 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.progress-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 12px;
    color: var(--blue-dark);
}

.progress-heading span {
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 700;
}

.progress-track {
    height: 9px;
    overflow: hidden;
    background: #e4eaf1;
    border-radius: 999px;
}

.progress-value {
    width: 14.28%;
    height: 100%;
    background: var(--blue);
    border-radius: inherit;
}

.guided-form {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.form-guide {
    padding: 36px 28px;
    text-align: center;
    background: var(--blue-light);
}

.form-guide img {
    width: 190px;
    max-width: 100%;
    height: 220px;
    object-fit: contain;
}

.form-guide h2 {
    margin: 16px 0 8px;
    color: var(--blue-dark);
}

.form-guide p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
}

.form-content {
    padding: 42px;
}

.form-content h1 {
    margin: 0 0 10px;
    color: var(--blue-dark);
    font-size: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-row:has(.form-group:nth-child(3)) {
    grid-template-columns: 0.7fr 1fr 1fr;
}

textarea {
    width: 100%;
    padding: 13px 14px;
    resize: vertical;
    color: var(--text);
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 10px;
    font: inherit;
    line-height: 1.5;
}

textarea:focus {
    border-color: var(--blue);
    outline: 3px solid rgba(37, 99, 169, 0.15);
}

.form-group small {
    display: block;
    margin-top: 7px;
    color: var(--text-soft);
    line-height: 1.4;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.alert-error ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

@media (max-width: 860px) {
    .guided-form {
        grid-template-columns: 1fr;
    }

    .form-guide {
        display: grid;
        grid-template-columns: 120px 1fr;
        align-items: center;
        column-gap: 20px;
        text-align: left;
    }

    .form-guide img {
        grid-row: span 2;
        width: 120px;
        height: 140px;
    }

    .form-guide h2 {
        margin: 0;
    }
}

@media (max-width: 650px) {
    .form-content {
        padding: 28px 22px;
    }

    .form-row,
    .form-row:has(.form-group:nth-child(3)) {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-guide {
        display: block;
        text-align: center;
    }

    .form-guide img {
        height: 130px;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .form-actions .button-link {
        width: 100%;
    }
}
.progress-step-2 {
    width: 28.57%;
}

.constructor-page {
    width: min(1320px, 94%);
    margin: 0 auto;
    padding: 34px 0 70px;
}

.macrocycle-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 20px;
    padding: 28px 30px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
}

.macrocycle-summary h1 {
    margin: 12px 0 8px;
    color: var(--blue-dark);
    font-size: 30px;
}

.macrocycle-summary p {
    margin: 0;
    color: var(--text-soft);
}

.summary-data {
    display: flex;
    gap: 34px;
}

.summary-data div {
    min-width: 110px;
}

.summary-data span {
    display: block;
    margin-bottom: 6px;
    color: var(--text-soft);
    font-size: 13px;
}

.summary-data strong {
    color: var(--blue-dark);
}

.objective-panel {
    margin-bottom: 20px;
    padding: 20px 24px;
    background: var(--blue-light);
    border-left: 4px solid var(--blue);
    border-radius: 10px;
}

.objective-panel strong {
    color: var(--blue-dark);
}

.objective-panel p {
    margin: 8px 0 0;
    line-height: 1.55;
}

.weeks-panel {
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

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

.section-heading h2 {
    margin: 0 0 7px;
    color: var(--blue-dark);
    font-size: 26px;
}

.section-heading p {
    margin: 0;
    color: var(--text-soft);
}

.save-status {
    padding: 9px 13px;
    color: var(--success);
    background: #edf9f3;
    border: 1px solid #bde5d1;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.weeks-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.weeks-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    background: #fff;
}

.weeks-table th {
    padding: 13px 14px;
    color: var(--blue-dark);
    background: var(--blue-light);
    border-bottom: 2px solid var(--border);
    font-size: 13px;
    text-align: left;
    white-space: nowrap;
}

.weeks-table td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.weeks-table tbody tr:last-child td {
    border-bottom: 0;
}

.weeks-table tbody tr:hover {
    background: #f8fbff;
}

.weeks-table th:first-child,
.weeks-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
}

.weeks-table th:first-child {
    z-index: 2;
    background: var(--blue-light);
}

.date-cell {
    white-space: nowrap;
}

.date-cell span {
    margin: 0 4px;
    color: var(--text-soft);
    font-size: 12px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

@media (max-width: 900px) {
    .macrocycle-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .summary-data {
        width: 100%;
        flex-wrap: wrap;
    }
}

@media (max-width: 650px) {
    .macrocycle-summary,
    .weeks-panel {
        padding: 22px;
    }

    .summary-data {
        flex-direction: column;
        gap: 16px;
    }

    .section-heading {
        flex-direction: column;
    }
}
.week-editor-page {
    width: min(1080px, 92%);
    margin: 0 auto;
    padding: 34px 0 70px;
}

.week-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.week-heading h1 {
    margin: 10px 0 7px;
    color: var(--blue-dark);
    font-size: 30px;
}

.week-heading p {
    margin: 0;
    color: var(--text-soft);
}

.alert-success {
    margin-bottom: 20px;
    padding: 14px 16px;
    color: #176441;
    background: #edf9f3;
    border: 1px solid #bde5d1;
    border-radius: 10px;
    line-height: 1.5;
}

.week-base-panel {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 20px;
    padding: 26px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
}

.plan-tabs {
    display: flex;
    gap: 4px;
    padding: 10px 10px 0;
    overflow-x: auto;
    background: #edf2f8;
    border-right: 1px solid var(--border);
    border-left: 1px solid var(--border);
}

.plan-tab {
    min-height: 46px;
    padding: 11px 20px;
    color: var(--text-soft);
    background: transparent;
    border: 0;
    border-radius: 9px 9px 0 0;
    font: inherit;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.plan-tab:hover {
    color: var(--blue-dark);
    background: rgba(255, 255, 255, 0.55);
}

.plan-tab.active {
    color: var(--blue-dark);
    background: var(--surface);
    box-shadow: inset 0 3px 0 var(--blue);
}

.plan-tab:focus-visible {
    outline: 3px solid rgba(37, 99, 169, 0.25);
    outline-offset: -3px;
}

.plan-panel {
    display: none;
    padding: 30px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 16px 16px;
}

.plan-panel.active {
    display: block;
}

.plan-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.plan-panel-heading h2 {
    margin: 0 0 7px;
    color: var(--blue-dark);
    font-size: 25px;
}

.plan-panel-heading p {
    margin: 0;
    color: var(--text-soft);
}

.plan-panel-heading img {
    width: 82px;
    height: 82px;
    object-fit: contain;
}

.week-editor-page .form-row.plan-values {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.week-actions {
    margin-top: 24px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
}

@media (max-width: 720px) {
    .week-heading,
    .plan-panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .week-base-panel,
    .week-editor-page .form-row.plan-values {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .plan-panel {
        padding: 24px 20px;
    }

    .plan-panel-heading img {
        display: none;
    }
}
.summary-edit {
    margin-top: 16px;
}

.periodization-description {
    margin-top: 8px !important;
    font-size: 14px;
    line-height: 1.5;
}

.locked-dates {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f7f9fc;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.locked-dates div {
    padding: 8px;
}

.locked-dates span {
    display: block;
    margin-bottom: 5px;
    color: var(--text-soft);
    font-size: 13px;
}

.locked-dates strong {
    color: var(--blue-dark);
}

@media (max-width: 650px) {
    .locked-dates {
        grid-template-columns: 1fr;
    }
}
.form-section {
    margin: 26px 0;
    padding: 22px;
    background: #f7f9fc;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.form-section h2 {
    margin: 0 0 7px;
    color: var(--blue-dark);
    font-size: 21px;
}

.form-section > p {
    margin: 0 0 20px;
    color: var(--text-soft);
    line-height: 1.5;
}
.measurement-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 18px;
    color: var(--text-soft);
    background: var(--blue-light);
    border-right: 1px solid var(--border);
    border-left: 1px solid var(--border);
    font-size: 14px;
}

.measurement-strip strong {
    color: var(--blue-dark);
}

.measurement-strip span {
    padding: 6px 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
}
/* =========================================================
   JENMPO Macro - Indicadores de control
   ========================================================= */

.metrics-page {
    min-height: 100vh;
    margin: 0;
    background: #f3f7fc;
    color: #092f60;
}

.metrics-page .site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px max(5vw, 28px);
    background: #ffffff;
    border-bottom: 1px solid #d6e2f0;
}

.metrics-page .site-header > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.metrics-page .site-header strong {
    color: #07366d;
    font-size: 1.25rem;
}

.metrics-page .site-header small {
    color: #526983;
    font-size: 0.85rem;
}

.metrics-page .page-container {
    width: min(1100px, calc(100% - 40px));
    margin: 32px auto 60px;
}

.metrics-page .step-card,
.metrics-page .form-card {
    margin-bottom: 24px;
    padding: 28px;
    background: #ffffff;
    border: 1px solid #d3e0ee;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(20, 58, 100, 0.07);
}

.metrics-page .step-card {
    border-left: 5px solid #286bb2;
}

.metrics-page .step-card h1 {
    margin: 14px 0 8px;
    color: #07366d;
    font-size: clamp(1.6rem, 3vw, 2.15rem);
}

.metrics-page .step-card p,
.metrics-page .form-card > p {
    margin: 0;
    color: #526983;
    line-height: 1.6;
}

.metrics-page .form-card h2 {
    margin: 12px 0 8px;
    color: #07366d;
    font-size: 1.45rem;
}

.metrics-page .status-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 11px;
    border-radius: 999px;
    background: #eaf4ff;
    color: #075196;
    font-size: 0.82rem;
    font-weight: 700;
}

.metrics-page .success-message,
.metrics-page .error-message {
    margin-bottom: 24px;
    padding: 16px 18px;
    border-radius: 12px;
    line-height: 1.5;
}

.metrics-page .success-message {
    color: #12653a;
    background: #eaf8f0;
    border: 1px solid #b9e3ca;
}

.metrics-page .error-message {
    color: #8a2e2e;
    background: #fff1f1;
    border: 1px solid #efc1c1;
}

.metrics-page .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.metrics-page .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
}

.metrics-page .form-grid .form-group {
    margin-top: 0;
}

.metrics-page .form-group label {
    color: #092f60;
    font-weight: 700;
}

.metrics-page input,
.metrics-page select,
.metrics-page textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 13px 14px;
    color: #173b63;
    background: #ffffff;
    border: 1px solid #bfd0e2;
    border-radius: 10px;
    font: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.metrics-page textarea {
    resize: vertical;
}

.metrics-page input:focus,
.metrics-page select:focus,
.metrics-page textarea:focus {
    outline: none;
    border-color: #286bb2;
    box-shadow: 0 0 0 4px rgba(40, 107, 178, 0.14);
}

.metrics-page .form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
}

.metrics-page .button-primary,
.metrics-page .button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 17px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.metrics-page .button-primary {
    color: #ffffff;
    background: #286bb2;
    border: 1px solid #286bb2;
}

.metrics-page .button-primary:hover {
    background: #18578f;
}

.metrics-page .button-secondary {
    color: #0b477f;
    background: #ffffff;
    border: 1px solid #bfd0e2;
}

.metrics-page .button-secondary:hover {
    background: #edf5fc;
}

.metrics-page .metrics-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.metrics-page .metric-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    padding: 20px;
    background: #f9fbfe;
    border: 1px solid #d5e1ed;
    border-radius: 14px;
}

.metrics-page .metric-card h3 {
    margin: 12px 0;
    color: #07366d;
    font-size: 1.15rem;
}

.metrics-page .metric-card p {
    margin: 7px 0;
    color: #455f7c;
    line-height: 1.45;
}

.metrics-page .metric-card .form-actions {
    padding-top: 16px;
    border-top: 1px solid #dbe5ef;
}

.metrics-page .metric-card .form-actions form:last-child {
    margin-left: auto;
}

.metrics-page .metric-card .form-actions form:last-child button {
    color: #a03333;
    border-color: #e5bdbd;
}

.metrics-page .empty-state {
    margin-top: 22px;
    padding: 28px;
    text-align: center;
    background: #f5f9fd;
    border: 1px dashed #aebfd1;
    border-radius: 14px;
}

@media (max-width: 760px) {
    .metrics-page .site-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .metrics-page .page-container {
        width: min(100% - 24px, 1100px);
        margin-top: 20px;
    }

    .metrics-page .step-card,
    .metrics-page .form-card {
        padding: 20px;
        border-radius: 14px;
    }

    .metrics-page .form-grid,
    .metrics-page .metrics-list {
        grid-template-columns: 1fr;
    }
}
.summary-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

@media (max-width: 650px) {
    .summary-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .summary-actions .button-link {
        width: 100%;
    }
}
/* =========================================================
   Indicadores dentro del editor semanal
   ========================================================= */

.weekly-metrics-panel {
    margin-top: 24px;
    padding: 26px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.weekly-metrics-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.weekly-metrics-heading h2 {
    margin: 10px 0 7px;
    color: var(--blue-dark);
    font-size: 24px;
}

.weekly-metrics-heading p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.5;
}

.weekly-metrics-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.weekly-metrics-table {
    width: 100%;
    min-width: 950px;
    border-collapse: collapse;
    background: #ffffff;
}

.weekly-metrics-table th,
.weekly-metrics-table td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.weekly-metrics-table thead th {
    color: var(--blue-dark);
    background: var(--blue-light);
    font-size: 13px;
    text-align: left;
    white-space: nowrap;
}

.weekly-metrics-table tbody tr:last-child th,
.weekly-metrics-table tbody tr:last-child td {
    border-bottom: 0;
}

.weekly-metrics-table tbody tr:hover {
    background: #f8fbff;
}

.weekly-metrics-table tbody th {
    width: 210px;
    color: var(--blue-dark);
    text-align: left;
}

.weekly-metrics-table tbody th strong {
    display: block;
    margin-bottom: 6px;
}

.weekly-metrics-table tbody th span {
    display: block;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 400;
}

.weekly-metrics-table input {
    box-sizing: border-box;
    width: 100%;
    min-width: 110px;
    padding: 11px 12px;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 9px;
    font: inherit;
}

.weekly-metrics-table input:focus {
    border-color: var(--blue);
    outline: 3px solid rgba(37, 99, 169, 0.15);
}

.weekly-metrics-empty {
    padding: 28px;
    color: var(--text-soft);
    text-align: center;
    background: #f7f9fc;
    border: 1px dashed var(--border);
    border-radius: 12px;
}

.weekly-metrics-empty strong {
    color: var(--blue-dark);
}

.weekly-metrics-empty p {
    margin: 8px 0 0;
}

@media (max-width: 720px) {
    .weekly-metrics-panel {
        padding: 20px;
    }

    .weekly-metrics-heading {
        flex-direction: column;
    }

    .weekly-metrics-heading .button-link {
        width: 100%;
    }
}
/* =========================================================
   Vista anual de indicadores
   ========================================================= */

.annual-metrics-panel {
    margin-top: 24px;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.annual-metrics-list {
    display: grid;
    gap: 22px;
}

.annual-metric-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.annual-metric-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 22px;
    background: #f8fbff;
    border-bottom: 1px solid var(--border);
}

.annual-metric-heading h3 {
    margin: 10px 0 6px;
    color: var(--blue-dark);
    font-size: 21px;
}

.annual-metric-heading p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.5;
}

.annual-metric-description {
    width: min(420px, 45%);
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.annual-metric-table-wrapper {
    overflow-x: auto;
}

.annual-metric-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

.annual-metric-table th,
.annual-metric-table td {
    padding: 13px 15px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}

.annual-metric-table thead th {
    color: var(--blue-dark);
    background: var(--blue-light);
    font-size: 13px;
    white-space: nowrap;
}

.annual-metric-table tbody tr:last-child td {
    border-bottom: 0;
}

.annual-metric-table tbody tr:hover {
    background: #f8fbff;
}

.annual-metric-table td a {
    color: var(--blue-dark);
    font-weight: 700;
    text-decoration: none;
}

.annual-metric-table td a:hover {
    color: var(--blue);
    text-decoration: underline;
}

.annual-metric-table td small {
    margin-left: 4px;
    color: var(--text-soft);
}

.annual-metrics-empty {
    padding: 30px;
    color: var(--text-soft);
    text-align: center;
    background: #f7f9fc;
    border: 1px dashed var(--border);
    border-radius: 12px;
}

.annual-metrics-empty strong {
    color: var(--blue-dark);
}

.annual-metrics-empty p {
    margin: 8px 0 0;
}

@media (max-width: 720px) {
    .annual-metrics-panel {
        padding: 20px;
    }

    .annual-metric-heading {
        flex-direction: column;
    }

    .annual-metric-description {
        box-sizing: border-box;
        width: 100%;
    }
}
/* =========================================================
   Gráficas anuales de indicadores
   ========================================================= */

.annual-chart-box {
    position: relative;
    padding: 18px 20px 10px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
}

.metric-chart {
    display: block;
    width: 100%;
    height: 320px;
}

.chart-empty-message {
    margin: 0;
    padding: 36px 20px;
    color: var(--text-soft);
    text-align: center;
    background: #f7f9fc;
    border: 1px dashed var(--border);
    border-radius: 10px;
}

@media (max-width: 720px) {
    .annual-chart-box {
        padding: 14px 10px 8px;
        overflow-x: auto;
    }

    .metric-chart {
        min-width: 680px;
    }
}
/* =========================================================
   Historial de cambios semanales
   ========================================================= */

.history-list {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.history-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.history-card[open] {
    box-shadow: 0 8px 22px rgba(20, 58, 100, 0.08);
}

.history-summary {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 28px;
    padding: 18px 20px;
    color: var(--blue-dark);
    background: #f5f9fd;
    cursor: pointer;
}

.history-summary:hover {
    background: var(--blue-light);
}

.history-summary span {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-summary small {
    color: var(--text-soft);
    font-weight: 400;
}

.history-content {
    padding: 22px;
    border-top: 1px solid var(--border);
}

.history-base-data {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.history-base-data div {
    padding: 14px;
    background: #f7f9fc;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.history-base-data span {
    display: block;
    margin-bottom: 7px;
    color: var(--text-soft);
    font-size: 13px;
}

.history-base-data strong {
    color: var(--blue-dark);
}

.history-plans {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.history-plan {
    padding: 18px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.history-plan h3,
.history-metrics h3 {
    margin: 0 0 14px;
    color: var(--blue-dark);
}

.history-plan dl {
    margin: 0;
}

.history-plan dl div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.history-plan dt {
    color: var(--text-soft);
}

.history-plan dd {
    margin: 0;
    color: var(--blue-dark);
    font-weight: 700;
}

.history-plan p {
    color: var(--text-soft);
    line-height: 1.5;
}

.history-metrics {
    margin-top: 20px;
}

.history-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.history-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.history-table th,
.history-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.history-table thead th {
    color: var(--blue-dark);
    background: var(--blue-light);
}

.history-table tbody tr:last-child th,
.history-table tbody tr:last-child td {
    border-bottom: 0;
}

.history-table tbody th small {
    display: block;
    margin-top: 4px;
    color: var(--text-soft);
    font-weight: 400;
}

@media (max-width: 760px) {
    .history-summary,
    .history-base-data,
    .history-plans {
        grid-template-columns: 1fr;
    }

    .history-summary {
        gap: 12px;
    }
}
.week-heading-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

@media (max-width: 720px) {
    .week-heading-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .week-heading-actions .button-link {
        width: 100%;
    }

    .week-heading-actions .save-status {
        text-align: center;
    }
}
/* Colores suaves por mesociclo */
.weeks-table tbody tr.mesocycle-row > td {
    background-color: var(--mesocycle-bg);
    transition: background-color 0.2s ease;
}

.weeks-table tbody tr.mesocycle-row > td:first-child {
    box-shadow: inset 5px 0 0 var(--mesocycle-accent);
}

.weeks-table tbody tr.mesocycle-row:hover > td {
    filter: brightness(0.98);
}

.weeks-table tbody tr.mesocycle-row td:nth-child(3) {
    color: var(--blue-dark);
    font-weight: 700;
}
.welcome-panel .dashboard-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 720px) {
    .welcome-panel .dashboard-actions {
        width: 100%;
        justify-content: flex-start;
    }
}
.annual-preview-section {
    margin-top: 30px;
}

.annual-preview-block {
    margin-top: 28px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #ffffff;
}

.annual-preview-header {
    display: flex;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background: #f7faff;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.annual-preview-header h3 {
    margin: 0 0 6px;
    color: var(--blue-dark);
}

.annual-preview-header p {
    margin: 0;
    color: var(--text-soft);
}

.annual-preview-wrapper {
    width: 100%;
    overflow-x: auto;
}

.annual-preview-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.annual-preview-table th,
.annual-preview-table td {
    min-width: 190px;
    padding: 12px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.annual-preview-table th {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 190px;
    color: #ffffff;
    background: var(--blue-dark);
    text-align: left;
}

.annual-preview-table td {
    color: var(--blue-dark);
    background: #ffffff;
    text-align: center;
}

.annual-preview-table tr:nth-child(-n+4) td {
    background: #f2f7fc;
    font-weight: 700;
}

.annual-preview-table tr:nth-child(n+6) td {
    height: 74px;
    text-align: left;
}

.annual-preview-table a {
    color: #165fa8;
    font-weight: 800;
}

.annual-preview-table tr:last-child th,
.annual-preview-table tr:last-child td {
    border-bottom: 0;
}

@media (max-width: 720px) {
    .annual-preview-header {
        align-items: stretch;
        flex-direction: column;
    }

    .annual-preview-header .button-link {
        width: 100%;
    }

    .annual-preview-table th,
    .annual-preview-table td {
        min-width: 165px;
    }
}
.week-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

@media (max-width: 720px) {
    .week-header-actions {
        width: 100%;
        align-items: stretch;
        justify-content: flex-start;
        flex-direction: column;
    }

    .week-header-actions .button-link {
        width: 100%;
    }
}
.annual-preview-input,
.annual-preview-textarea {
    width: 100%;
    min-width: 165px;
    border: 1px solid #b8cce0;
    border-radius: 8px;
    background: #ffffff;
    color: var(--blue-dark);
    font: inherit;
    line-height: 1.4;
}

.annual-preview-input {
    min-height: 42px;
    padding: 9px 10px;
}

.annual-preview-textarea {
    min-height: 94px;
    padding: 10px;
    resize: vertical;
}

.annual-preview-focus {
    min-height: 70px;
}

.annual-preview-input:focus,
.annual-preview-textarea:focus {
    border-color: #2d70b7;
    outline: 3px solid rgba(45, 112, 183, 0.16);
}

.annual-preview-actions-row th,
.annual-preview-actions-row td {
    vertical-align: middle;
}

.annual-preview-actions-row td {
    height: auto;
    background: #f7faff;
    text-align: center;
}

.annual-preview-save {
    width: 100%;
    min-width: 165px;
    min-height: 44px;
}
.annual-preview-metrics {
    display: grid;
    gap: 10px;
}

.annual-preview-metrics label {
    display: grid;
    gap: 5px;
}

.annual-preview-metrics label > span {
    display: flex;
    color: var(--blue-dark);
    font-size: 0.82rem;
    font-weight: 700;
    justify-content: space-between;
    gap: 8px;
}

.annual-preview-metrics small {
    color: var(--text-soft);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: right;
}

.annual-preview-number {
    width: 100%;
    min-height: 40px;
    padding: 8px 9px;
    border: 1px solid #b8cce0;
    border-radius: 8px;
    background: #ffffff;
    color: var(--blue-dark);
    font: inherit;
}

.annual-preview-number:focus {
    border-color: #2d70b7;
    outline: 3px solid rgba(45, 112, 183, 0.16);
}

.annual-preview-values-row td {
    background: #f8fbfe;
    text-align: left;
}

/* =========================================================
   Navegación ordenada del macrociclo
   ========================================================= */

.macrocycle-navigation {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.workflow-group {
    display: grid;
    gap: 10px;
}

.workflow-label {
    color: #52677d;
    font-size: 14px;
}

.workflow-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.workflow-button {
    display: inline-flex;
    min-height: 44px;
    padding: 8px 14px 8px 9px;
    align-items: center;
    gap: 9px;
    color: var(--blue-dark);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 11px;
    font-weight: 700;
    text-decoration: none;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.workflow-button:hover {
    background: var(--blue-light);
    border-color: var(--blue);
    transform: translateY(-1px);
}

.workflow-button > span {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    color: var(--blue-dark);
    background: #eaf4ff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 800;
}

.workflow-button-primary {
    color: #ffffff;
    background: var(--blue);
    border-color: var(--blue);
}

.workflow-button-primary:hover {
    color: #ffffff;
    background: var(--blue-dark);
}

.workflow-button-primary > span {
    color: var(--blue-dark);
    background: #ffffff;
}

.workflow-main-actions {
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.workflow-administration {
    display: flex;
    padding-top: 13px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--border);
    color: #738396;
    font-size: 13px;
}

.workflow-trash {
    display: inline-flex;
    min-height: 38px;
    padding: 8px 13px;
    align-items: center;
    color: #a52a2a;
    background: #fffafa;
    border: 1px solid #efb9b9;
    border-radius: 9px;
    font-weight: 700;
    text-decoration: none;
}

.workflow-trash:hover {
    color: #7f1d1d;
    background: #fff0f0;
    border-color: #d77b7b;
}

#weekly-calendar {
    scroll-margin-top: 24px;
}

@media (max-width: 750px) {
    .workflow-buttons {
        flex-direction: column;
    }

    .workflow-button {
        width: 100%;
    }

    .workflow-administration {
        align-items: flex-start;
        flex-direction: column;
    }
}
/* Objetivo principal dentro del resumen del macrociclo */
.macrocycle-summary .macrocycle-main-objective {
    margin-top: 12px;
    padding-left: 12px;
    color: var(--blue-dark);
    border-left: 3px solid var(--blue);
    line-height: 1.5;
}

.macrocycle-main-objective strong {
    margin-right: 4px;
}
/* Cabecera y botones ordenados del macrociclo */
.macrocycle-summary {
    display: block;
}

.macrocycle-title-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 22px;
}

.macrocycle-title-row h1 {
    margin-bottom: 0;
}

.macrocycle-dates {
    margin: 0;
    color: #51657c;
    font-size: 0.95rem;
    font-weight: 600;
}

.macrocycle-dates span {
    margin: 0 4px;
}

.workflow-buttons-primary {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.workflow-secondary-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #d7e2ee;
}

.workflow-report-button {
    min-width: 150px;
}

@media (max-width: 1150px) {
    .workflow-buttons-primary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .macrocycle-title-row {
        display: block;
    }

    .macrocycle-dates {
        margin-top: 8px;
    }

    .workflow-buttons-primary {
        grid-template-columns: 1fr;
    }

    .workflow-secondary-row {
        align-items: stretch;
        flex-direction: column;
    }

    .workflow-secondary-row a {
        width: 100%;
        text-align: center;
    }
}

/* Centrar acciones finales de la ruta */
.workflow-secondary-row {
    justify-content: center;
}

/* Página independiente: paso 6, planificación semanal */
.progress-step-6 {
    width: 85.714%;
}

.planning-next-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

@media (max-width: 650px) {
    .planning-next-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .planning-next-actions a {
        width: 100%;
        text-align: center;
    }
}

/* Progreso proporcional de la ruta: cada paso equivale a 1/7 */
.progress-track[aria-valuenow="1"] .progress-value {
    width: 14.2857%;
}

.progress-track[aria-valuenow="2"] .progress-value {
    width: 28.5714%;
}

.progress-track[aria-valuenow="3"] .progress-value {
    width: 42.8571%;
}

.progress-track[aria-valuenow="4"] .progress-value {
    width: 57.1429%;
}

.progress-track[aria-valuenow="5"] .progress-value {
    width: 71.4286%;
}

.progress-track[aria-valuenow="6"] .progress-value {
    width: 85.7143%;
}

.progress-track[aria-valuenow="7"] .progress-value {
    width: 100%;
}

/* Acciones del encabezado del editor semanal */
.week-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 650px) {
    .week-header-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .week-header-actions a {
        width: 100%;
        text-align: center;
    }
}

/* Acciones del encabezado del editor semanal */
.week-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 650px) {
    .week-header-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .week-header-actions a {
        width: 100%;
        text-align: center;
    }
}

/* =========================================================
   Planificación diaria de la semana
   ========================================================= */

.training-days-panel {
    margin-bottom: 28px;
}

.training-days-panel .section-heading {
    margin-bottom: 22px;
}

.training-days-panel .section-heading h2 {
    margin: 10px 0 6px;
}

.training-days-panel .section-heading p {
    margin: 0;
    color: #52647a;
}

.training-days-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.training-day-card {
    display: flex;
    flex-direction: column;
    min-height: 190px;
    padding: 18px;
    border: 1px solid #cfdbea;
    border-left: 5px solid #8da2b8;
    border-radius: 14px;
    background: #ffffff;
}

.training-day-training {
    border-left-color: #2474bd;
    background: #f2f7fd;
}

.training-day-rest {
    border-left-color: #2f855a;
    background: #f0f9f4;
}

.training-day-unplanned {
    border-left-color: #8da2b8;
    background: #f8fafc;
}

.training-day-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.training-day-heading > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.training-day-heading strong {
    color: #07366d;
    font-size: 1.08rem;
}

.training-day-heading > div > span {
    color: #52647a;
    font-size: 0.94rem;
}

.training-day-notes {
    margin: 16px 0 0;
    color: #42566d;
    line-height: 1.5;
}

.training-day-actions {
    display: flex;
    margin-top: auto;
    padding-top: 20px;
}

.training-day-actions .button-link {
    width: 100%;
    justify-content: center;
    text-align: center;
}

@media (max-width: 1050px) {
    .training-days-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .training-days-grid {
        grid-template-columns: 1fr;
    }

    .training-day-card {
        min-height: 165px;
    }
}

/* =========================================================
   Resumen comparativo semanal
   ========================================================= */

.weekly-comparison-panel {
    margin: 26px 0;
    padding: 26px;
    background: #ffffff;
    border: 1px solid #cddbea;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(7, 54, 109, 0.08);
}

.weekly-comparison-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.weekly-comparison-heading h2 {
    margin: 8px 0 6px;
    color: #07366d;
}

.weekly-comparison-heading p {
    margin: 0;
    color: #52647a;
}

.weekly-comparison-counts {
    display: grid;
    grid-template-columns: repeat(3, minmax(105px, 1fr));
    gap: 10px;
}

.weekly-comparison-counts span {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 14px;
    color: #52647a;
    background: #f3f7fc;
    border: 1px solid #d7e2ee;
    border-radius: 12px;
    font-size: 0.86rem;
}

.weekly-comparison-counts strong {
    margin-top: 3px;
    color: #07366d;
    font-size: 1.2rem;
}

.weekly-comparison-table-wrapper {
    overflow-x: auto;
    border: 1px solid #d7e2ee;
    border-radius: 14px;
}

.weekly-comparison-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.weekly-comparison-table th,
.weekly-comparison-table td {
    padding: 14px 16px;
    text-align: center;
    border-bottom: 1px solid #d7e2ee;
}

.weekly-comparison-table thead th {
    color: #07366d;
    background: #eaf3ff;
    font-size: 0.9rem;
}

.weekly-comparison-table tbody th {
    text-align: left;
    color: #07366d;
    background: #f8fafd;
}

.weekly-comparison-table tbody th strong,
.weekly-comparison-table tbody th span {
    display: block;
}

.weekly-comparison-table tbody th span {
    margin-top: 3px;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 400;
}

.weekly-comparison-table tbody tr:last-child th,
.weekly-comparison-table tbody tr:last-child td {
    border-bottom: 0;
}

.comparison-pending {
    display: inline-block;
    padding: 5px 10px;
    color: #7a5b14;
    background: #fff6d8;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
}

.weekly-execution-pending,
.weekly-comparison-empty {
    margin-top: 16px;
    padding: 14px 16px;
    color: #684f15;
    background: #fff9e8;
    border: 1px solid #f0d998;
    border-radius: 12px;
}

.weekly-comparison-empty p {
    margin: 5px 0 0;
}

@media (max-width: 850px) {
    .weekly-comparison-heading {
        flex-direction: column;
    }

    .weekly-comparison-counts {
        width: 100%;
    }
}

@media (max-width: 540px) {
    .weekly-comparison-panel {
        padding: 18px 14px;
    }

    .weekly-comparison-counts {
        grid-template-columns: 1fr;
    }

    .weekly-comparison-counts span {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* Resumen visible de duración dentro de la sesión */
.session-duration-summary {
    margin: 18px 0 24px;
    padding: 18px;
    color: #07366d;
    background: #f3f7fc;
    border: 1px solid #cddbea;
    border-radius: 14px;
}

.session-duration-summary > strong {
    display: block;
    margin-bottom: 12px;
}

.session-duration-summary > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.session-duration-summary span {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #d7e2ee;
    border-radius: 10px;
    color: #52647a;
}

.session-duration-summary b {
    margin-top: 4px;
    color: #07366d;
    font-size: 1.08rem;
}

@media (max-width: 650px) {
    .session-duration-summary > div {
        grid-template-columns: 1fr;
    }

    .session-duration-summary span {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* =========================================================
   Detalle diario e impresión
   ========================================================= */

.training-day-summary {
    position: relative;
    margin-top: 28px;
    padding: 30px;
}

.training-day-print-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.training-day-print-title {
    display: none;
}

.training-day-summary > .section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid #d6e1ed;
}

.training-day-summary > .section-heading h2 {
    margin: 8px 0 7px;
    color: #07366d;
}

.training-day-summary > .section-heading p {
    max-width: 760px;
    margin: 0;
    color: #52647a;
    line-height: 1.6;
}

.training-day-session-detail {
    margin-top: 28px;
    padding: 24px;
    background: #f8fbff;
    border: 1px solid #cddbea;
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(7, 54, 109, 0.07);
}

.training-day-session-detail + .training-day-session-detail {
    margin-top: 30px;
}

.training-day-session-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid #d6e1ed;
}

.training-day-session-heading h3 {
    margin: 6px 0 0;
    color: #07366d;
    font-size: 1.3rem;
}

.training-day-session-heading p,
.training-day-session-heading span {
    margin: 0;
}

.training-session-activity-table {
    margin-top: 18px;
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid #d6e1ed;
    border-radius: 12px;
}

.training-session-activity-table table {
    width: 100%;
    min-width: 760px;
    margin: 0;
    border-collapse: collapse;
}

.training-session-activity-table th {
    padding: 14px 16px;
    color: #ffffff;
    background: #07366d;
    text-align: left;
    font-size: 0.92rem;
}

.training-session-activity-table td {
    padding: 15px 16px;
    border-bottom: 1px solid #e1e8f0;
    vertical-align: top;
    line-height: 1.45;
}

.training-session-activity-table tbody tr:nth-child(even) {
    background: #f4f8fc;
}

.training-session-activity-table tbody tr:last-child td {
    border-bottom: 0;
}

.training-session-activity-table td:first-child {
    color: #07366d;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .training-day-summary {
        padding: 22px 18px;
    }

    .training-day-print-toolbar {
        justify-content: stretch;
    }

    .training-day-print-toolbar button {
        width: 100%;
    }

    .training-day-session-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 12mm;
    }

    body {
        background: #ffffff !important;
    }

    body * {
        visibility: hidden;
    }

    .training-day-summary,
    .training-day-summary * {
        visibility: visible;
    }

    .training-day-summary {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    .training-day-print-toolbar,
    .training-day-session-heading .button-link,
    .training-day-session-heading a {
        display: none !important;
    }

    .training-day-print-title {
        display: block;
        margin-bottom: 22px;
        padding-bottom: 12px;
        border-bottom: 2px solid #07366d;
    }

    .training-day-print-title strong {
        display: block;
        color: #07366d;
        font-size: 20pt;
    }

    .training-day-print-title span {
        display: block;
        margin-top: 4px;
        font-size: 12pt;
    }

    .training-day-summary > .section-heading {
        margin-bottom: 18px;
        padding-bottom: 14px;
    }

    .training-day-session-detail {
        break-inside: avoid;
        margin-top: 18px;
        padding: 14px;
        background: #ffffff;
        border: 1px solid #9aaabd;
        box-shadow: none;
    }

    .training-session-activity-table {
        overflow: visible;
        border-color: #9aaabd;
    }

    .training-session-activity-table table {
        min-width: 0;
        font-size: 9pt;
    }

    .training-session-activity-table th {
        padding: 8px 10px;
        color: #000000;
        background: #e6edf5 !important;
        border: 1px solid #9aaabd;
    }

    .training-session-activity-table td {
        padding: 8px 10px;
        border: 1px solid #b7c3d0;
    }
}

/* Columna de ejercicios del plan diario */

.training-session-activity-table table {
    min-width: 1080px;
}

.training-session-activity-table th:nth-child(2) {
    width: 20%;
}

.training-session-activity-table th:nth-child(3) {
    width: 31%;
}

.activity-exercise-details {
    min-width: 290px;
    color: #243b53;
    line-height: 1.7 !important;
    white-space: normal;
}

@media print {
    .training-session-activity-table table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
    }

    .training-session-activity-table th:nth-child(1) {
        width: 12%;
    }

    .training-session-activity-table th:nth-child(2) {
        width: 18%;
    }

    .training-session-activity-table th:nth-child(3) {
        width: 30%;
    }

    .training-session-activity-table th:nth-child(4) {
        width: 13%;
    }

    .training-session-activity-table th:nth-child(5) {
        width: 14%;
    }

    .training-session-activity-table th:nth-child(6) {
        width: 13%;
    }

    .activity-exercise-details {
        min-width: 0;
        line-height: 1.45 !important;
        overflow-wrap: anywhere;
    }
}

/* Acciones superiores de planificación */

.planning-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .planning-header-actions {
        width: 100%;
    }

    .planning-header-actions .button-link {
        flex: 1 1 auto;
        text-align: center;
    }
}

/* =========================================================
   Edición de etapa y enfoque desde planificación semanal
   ========================================================= */

.weekly-edit-note {
    margin: 0 0 20px;
    padding: 16px 18px;
    background: #eef6ff;
    border: 1px solid #c7daee;
    border-left: 5px solid #246bb2;
    border-radius: 12px;
}

.weekly-edit-note strong {
    color: #07366d;
}

.weekly-edit-note p {
    margin: 6px 0 0;
    color: #4b6078;
    line-height: 1.5;
}

.planning-weeks-table {
    min-width: 1050px;
}

.planning-weeks-table th:nth-child(1) {
    width: 90px;
}

.planning-weeks-table th:nth-child(2) {
    width: 190px;
}

.planning-weeks-table th:nth-child(3) {
    width: 190px;
}

.planning-weeks-table th:nth-child(4) {
    width: 310px;
}

.planning-weeks-table th:nth-child(5) {
    width: 110px;
}

.planning-weeks-table th:nth-child(6) {
    width: 180px;
}

.weekly-inline-input,
.weekly-inline-focus {
    width: 100%;
    border: 1px solid #b9cde1;
    border-radius: 9px;
    background: #ffffff;
    color: #102f53;
    font: inherit;
}

.weekly-inline-input {
    min-height: 44px;
    padding: 10px 12px;
}

.weekly-inline-focus {
    min-height: 64px;
    padding: 10px 12px;
    resize: vertical;
}

.weekly-inline-input:focus,
.weekly-inline-focus:focus {
    border-color: #246bb2;
    outline: 3px solid rgba(36, 107, 178, 0.14);
}

.weekly-inline-form {
    margin: 0;
}

.weekly-row-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.weekly-row-actions .button-primary,
.weekly-row-actions .button-secondary {
    width: 100%;
    min-width: 140px;
    justify-content: center;
    text-align: center;
}

@media (max-width: 760px) {
    .planning-weeks-table {
        min-width: 980px;
    }
}

/* =========================================================
   Matriz semanal de entrenamiento
   ========================================================= */

.training-matrix-page {
    max-width: 1680px;
}

.training-matrix-controls {
    display: grid;
    gap: 20px;
    margin-bottom: 24px;
}

.training-matrix-controls h2 {
    margin: 10px 0 0;
    color: #07366d;
}

.training-matrix-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.training-matrix-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    padding: 14px 16px;
    background: #f5f8fc;
    border: 1px solid #d8e3ef;
    border-radius: 12px;
}

.training-matrix-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #34465c;
    font-size: 0.92rem;
}

.training-matrix-panel {
    margin-bottom: 32px;
    background: #ffffff;
    border: 1px solid #cddbea;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(7, 54, 109, 0.08);
    overflow: hidden;
}

.training-matrix-scroll {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.training-matrix-table {
    width: 100%;
    min-width: 1480px;
    border-collapse: separate;
    border-spacing: 0;
}

.training-matrix-table th,
.training-matrix-table td {
    min-width: 155px;
    padding: 16px 12px;
    vertical-align: top;
    border-right: 1px solid #dce5ef;
    border-bottom: 1px solid #dce5ef;
}

.training-matrix-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 16px 12px;
    background: #07366d;
    color: #ffffff;
    text-align: center;
    font-size: 0.9rem;
}

.training-matrix-table tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 165px;
    background: #f5f8fc;
    color: #07366d;
    text-align: left;
}

.training-matrix-table tbody th strong,
.training-matrix-table tbody th small,
.training-matrix-table tbody th a {
    display: block;
}

.training-matrix-table tbody th small {
    margin: 7px 0 10px;
    color: #60748b;
    font-weight: 500;
    line-height: 1.45;
}

.training-matrix-table tbody th a {
    color: #1d65ad;
    font-size: 0.84rem;
    font-weight: 700;
}

.training-matrix-table tbody tr:last-child th,
.training-matrix-table tbody tr:last-child td {
    border-bottom: 0;
}

.training-matrix-table th:last-child,
.training-matrix-table td:last-child {
    border-right: 0;
}

.training-matrix-table tbody td {
    background: #ffffff;
    text-align: center;
}

.training-matrix-table tbody tr:nth-child(even) td {
    background: #fbfcfe;
}

.training-matrix-table tbody tr:hover td {
    background: #f2f7fd;
}

.training-matrix-highlight th,
.training-matrix-highlight td {
    box-shadow: inset 0 3px 0 #2b6cb0,
                inset 0 -3px 0 #2b6cb0;
}

.training-matrix-date {
    display: block;
    margin-bottom: 10px;
    color: #64768b;
    font-size: 0.8rem;
    font-weight: 700;
}

.matrix-values {
    display: grid;
    gap: 7px;
    text-align: left;
}

.matrix-values > span {
    display: grid;
    grid-template-columns: 27px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    color: #24364b;
    font-weight: 700;
}

.matrix-values small {
    display: block;
    margin-top: 2px;
    color: #6b7c90;
    text-align: right;
    font-weight: 600;
}

.matrix-state {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    font-size: 0.76rem;
    line-height: 1;
}

.matrix-state-planned {
    background: #e7f0fb;
    color: #15558f;
}

.matrix-state-adjusted {
    background: #fff1cf;
    color: #8a5a00;
}

.matrix-state-executed {
    background: #dff5e8;
    color: #16653a;
}

.matrix-rest-badge {
    display: block;
    margin: 8px 0;
    padding: 7px 9px;
    background: #eef1f5;
    border-radius: 9px;
    color: #526172;
    font-size: 0.8rem;
    font-weight: 700;
}

.matrix-empty-value {
    display: block;
    margin: 18px 0;
    color: #8492a3;
    font-size: 0.84rem;
}

.matrix-edit-link {
    display: inline-flex;
    justify-content: center;
    margin-top: 13px;
    padding: 8px 11px;
    border: 1px solid #b9cce0;
    border-radius: 9px;
    color: #07366d;
    background: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
}

.matrix-edit-link:hover,
.matrix-edit-link:focus-visible {
    background: #eaf3fd;
    border-color: #2b6cb0;
}

.training-matrix-total-column,
.training-matrix-week-total {
    min-width: 175px !important;
}

.training-matrix-week-total {
    background: #edf5ff !important;
}

.training-matrix-week-total .matrix-values > span {
    font-size: 1rem;
}

@media (max-width: 900px) {
    .training-matrix-panel {
        border-radius: 12px;
    }

    .training-matrix-table th,
    .training-matrix-table td {
        min-width: 145px;
        padding: 14px 10px;
    }

    .training-matrix-legend {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}

@media print {
    .training-matrix-filters,
    .matrix-edit-link,
    .app-header .button-link {
        display: none !important;
    }

    .training-matrix-panel {
        border: 0;
        box-shadow: none;
    }

    .training-matrix-scroll {
        overflow: visible;
    }

    .training-matrix-table {
        min-width: 0;
        font-size: 8pt;
    }

    .training-matrix-table th,
    .training-matrix-table td {
        min-width: 0;
        padding: 6px;
    }
}

/* =========================================================
   Matriz compacta para pantallas de escritorio
   ========================================================= */

.training-matrix-page {
    width: calc(100% - 32px);
    max-width: none;
    margin-left: auto;
    margin-right: auto;
}

.training-matrix-table {
    width: 100%;
    min-width: 1080px;
    table-layout: fixed;
    font-size: 0.82rem;
}

.training-matrix-table th,
.training-matrix-table td {
    min-width: 0;
    padding: 12px 7px;
}

.training-matrix-table thead th {
    font-size: 0.78rem;
    padding: 13px 6px;
}

.training-matrix-table thead th:first-child,
.training-matrix-table tbody th {
    width: 145px;
}

.training-matrix-table thead th:not(:first-child):not(:last-child),
.training-matrix-table tbody td:not(:last-child) {
    width: calc((100% - 285px) / 7);
}

.training-matrix-table .training-matrix-total-column,
.training-matrix-table .training-matrix-week-total {
    width: 140px;
    min-width: 140px !important;
}

.training-matrix-table tbody th {
    min-width: 145px;
    padding: 14px 10px;
}

.training-matrix-table tbody th strong {
    font-size: 0.9rem;
}

.training-matrix-table tbody th small {
    font-size: 0.72rem;
    margin: 5px 0 8px;
}

.training-matrix-table tbody th a {
    font-size: 0.74rem;
}

.training-matrix-date {
    margin-bottom: 7px;
    font-size: 0.72rem;
}

.matrix-values {
    gap: 5px;
}

.matrix-values > span {
    grid-template-columns: 23px minmax(0, 1fr);
    gap: 5px;
    font-size: 0.78rem;
}

.matrix-values small {
    font-size: 0.68rem;
}

.matrix-state {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    font-size: 0.67rem;
}

.matrix-empty-value {
    margin: 13px 0;
    font-size: 0.73rem;
}

.matrix-edit-link {
    width: 100%;
    margin-top: 10px;
    padding: 7px 4px;
    font-size: 0.72rem;
    white-space: nowrap;
}

.matrix-rest-badge {
    padding: 6px;
    font-size: 0.7rem;
}

@media (max-width: 1150px) {
    .training-matrix-table {
        min-width: 1080px;
    }

    .training-matrix-scroll {
        overflow-x: auto;
    }
}

@media (max-width: 700px) {
    .training-matrix-page {
        width: calc(100% - 20px);
    }

    .training-matrix-table {
        min-width: 1000px;
    }
}

.training-matrix-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 700px) {
    .training-matrix-header-actions {
        width: 100%;
        justify-content: stretch;
    }

    .training-matrix-header-actions .button-link {
        flex: 1 1 auto;
        text-align: center;
    }
}

/* Encabezado de medición en la matriz */
.training-matrix-measurement-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.training-matrix-measurement-heading h2 {
    margin: 10px 0 0;
}

@media (max-width: 640px) {
    .training-matrix-measurement-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .training-matrix-measurement-heading .button-link {
        width: 100%;
        text-align: center;
    }
}

/* Botón para acciones destructivas */
.button-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid #dc3545;
    border-radius: 10px;
    background: #ffffff;
    color: #b42332;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.button-danger:hover {
    border-color: #b42332;
    background: #b42332;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(180, 35, 50, 0.2);
    transform: translateY(-1px);
}

.button-danger:focus-visible {
    outline: 3px solid rgba(220, 53, 69, 0.25);
    outline-offset: 2px;
}

.button-danger:active {
    transform: translateY(0);
}

/* Reporte diario: tabla compacta para evitar desplazamiento horizontal */
.training-day-summary .training-session-activity-table {
    overflow-x: visible;
}

.training-day-summary .training-session-activity-table table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 0.78rem;
}

.training-day-summary .training-session-activity-table th,
.training-day-summary .training-session-activity-table td {
    padding: 8px 7px;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: normal;
}

.training-day-summary .training-session-activity-table th {
    font-size: 0.72rem;
    letter-spacing: 0.015em;
}

.training-day-summary .training-session-activity-table td:nth-child(1),
.training-day-summary .training-session-activity-table th:nth-child(1) {
    width: 11%;
}

.training-day-summary .training-session-activity-table td:nth-child(2),
.training-day-summary .training-session-activity-table th:nth-child(2) {
    width: 18%;
}

.training-day-summary .training-session-activity-table td:nth-child(3),
.training-day-summary .training-session-activity-table th:nth-child(3) {
    width: 29%;
}

.training-day-summary .training-session-activity-table td:nth-child(4),
.training-day-summary .training-session-activity-table th:nth-child(4) {
    width: 14%;
}

.training-day-summary .training-session-activity-table td:nth-child(5),
.training-day-summary .training-session-activity-table th:nth-child(5) {
    width: 13%;
}

.training-day-summary .training-session-activity-table td:nth-child(6),
.training-day-summary .training-session-activity-table th:nth-child(6) {
    width: 15%;
}

.training-day-summary .training-activity-details {
    min-width: 0;
    font-size: 0.76rem;
}

.training-day-summary .training-activity-details li {
    margin-bottom: 2px;
}

@media (max-width: 760px) {
    .training-day-summary .training-session-activity-table {
        overflow-x: auto;
    }

    .training-day-summary .training-session-activity-table table {
        min-width: 760px;
        table-layout: auto;
    }
}

/* Intensidad descriptiva del reporte diario */
.activity-intensity-label,
.activity-intensity-detail,
.activity-intensity-value,
.activity-intensity-scale {
    display: block;
}

.activity-intensity-label {
    color: #102a56;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
}

.activity-intensity-detail {
    margin-top: 3px;
    color: #475569;
    font-size: 0.68rem;
    line-height: 1.25;
}

.activity-intensity-value {
    margin-top: 2px;
    color: #0f766e;
    font-size: 0.7rem;
    font-weight: 700;
}

.activity-intensity-scale {
    color: #475569;
    font-size: 0.72rem;
    line-height: 1.25;
}

/* Editor desplegable de zonas de intensidad */
.zone-editor-row td {
    padding: 0 !important;
    background: #f4f8fd;
}

.zone-editor-panel {
    padding: 22px;
    border-top: 2px solid #2b6cb0;
    border-bottom: 1px solid #cbd5e1;
}

.zone-editor-panel h4 {
    margin: 0 0 18px;
    color: #07366d;
}

.zone-editor-panel .form-grid {
    grid-template-columns: repeat(
        auto-fit,
        minmax(170px, 1fr)
    );
}

.zone-editor-panel input[type="color"] {
    min-height: 46px;
    padding: 5px;
}

@media (max-width: 760px) {
    .zone-editor-panel {
        padding: 16px;
    }
}

/* Administración rápida de selectores */
.selector-management-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.selector-management-button {
    min-height: 38px;
    padding: 8px 13px;
    font-size: 0.82rem;
}

.selector-sync-status {
    color: #0f766e;
    font-weight: 700;
    font-size: 0.78rem;
}

/* Navegación reutilizable del macrociclo */
.planning-navigation {
    margin: 22px 0 0;
    padding: 18px;
    border: 1px solid #d8e2ef;
    border-radius: 16px;
    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            #f7faff 100%
        );
    box-shadow: 0 10px 28px rgba(16, 54, 96, 0.07);
}

.planning-navigation-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.planning-navigation-heading strong {
    display: block;
    color: #0a376d;
    font-size: 1rem;
    line-height: 1.2;
}

.planning-navigation-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: #60758d;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.planning-navigation-progress {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eaf3ff;
    color: #165da7;
    font-size: 0.76rem;
    font-weight: 800;
}

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

.planning-navigation-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 50px;
    padding: 9px 12px;
    border: 1px solid #cedbea;
    border-radius: 12px;
    background: #ffffff;
    color: #173d69;
    font-size: 0.84rem;
    font-weight: 750;
    line-height: 1.15;
    text-decoration: none;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
}

.planning-navigation-link:hover {
    border-color: #2873bd;
    background: #f2f7fd;
    color: #0a376d;
    box-shadow: 0 7px 16px rgba(18, 77, 137, 0.11);
    transform: translateY(-1px);
}

.planning-navigation-number {
    display: inline-flex;
    flex: 0 0 28px;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #edf4fc;
    color: #145ea8;
    font-size: 0.78rem;
    font-weight: 900;
}

.planning-navigation-label {
    min-width: 0;
}

.planning-navigation-link.is-active {
    border-color: #1768b5;
    background:
        linear-gradient(
            135deg,
            #1768b5 0%,
            #0c4f91 100%
        );
    color: #ffffff;
    box-shadow: 0 9px 20px rgba(12, 79, 145, 0.22);
}

.planning-navigation-link.is-active
.planning-navigation-number {
    background: #ffffff;
    color: #0c579d;
}

.planning-navigation-administration {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid #dce5ef;
}

.planning-navigation-trash {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid #edb0b6;
    border-radius: 10px;
    background: #fffafa;
    color: #ae2835;
    font-size: 0.8rem;
    font-weight: 750;
    text-decoration: none;
}

.planning-navigation-trash:hover {
    border-color: #cf3d4b;
    background: #fff0f1;
    color: #8f1723;
}

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

@media (max-width: 560px) {
    .planning-navigation {
        padding: 14px;
        border-radius: 14px;
    }

    .planning-navigation-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .planning-navigation-link {
        min-height: 46px;
    }
}

/* Estado y administración del macrociclo */
.macrocycle-status-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.macrocycle-status-actions .status-badge {
    margin: 0;
}

.macrocycle-status-actions
.planning-navigation-trash {
    min-height: 34px;
    padding: 6px 12px;
}

@media (max-width: 560px) {
    .macrocycle-status-actions {
        align-items: flex-start;
    }

    .macrocycle-status-actions
    .planning-navigation-trash {
        font-size: 0.75rem;
    }
}


/* JENMPO MACRO - DETALLE ANUAL POR SESIONES */

.annual-preview-session-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 8px;
    padding: 9px 11px;
    border-left: 3px solid #2563eb;
    border-radius: 6px;
    background: #eaf2ff;
    color: #17345c;
    font-size: 13px;
    font-weight: 700;
}

.annual-preview-session-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 5px;
    background: #2563eb;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.annual-preview-session-edit:hover,
.annual-preview-session-edit:focus-visible {
    background: #1d4ed8;
    color: #ffffff;
    text-decoration: none;
}

/* Tablero anual JENMPO Macro */
.jenmpo-week-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 12px;
    margin: 20px 0;
}
.jenmpo-week-tab {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    padding: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    color: #183153;
    cursor: pointer;
}
.jenmpo-week-tab.is-active {
    border: 2px solid #2563eb;
    background: #eff6ff;
}
.jenmpo-week-tab small, .jenmpo-muted {
    color: #64748b;
}
.jenmpo-week-detail[hidden] { display: none !important; }
.jenmpo-week-detail-header,
.jenmpo-session-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
}
.jenmpo-week-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.jenmpo-state-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 20px 0;
}
.jenmpo-state-card,
.jenmpo-session-card,
.jenmpo-week-note {
    border: 1px solid #dbe3ed;
    border-radius: 12px;
    padding: 16px;
    background: #fff;
}
.jenmpo-state-card h5 { margin: 0 0 12px; }
.jenmpo-state-card p { margin: 6px 0; }
.jenmpo-sessions-title { margin: 22px 0 12px; }
.jenmpo-session-list { display: grid; gap: 12px; }
.jenmpo-session-card ul { padding-left: 20px; }
.jenmpo-session-card li { margin: 8px 0; }
.jenmpo-week-note { margin-top: 12px; }
@media (max-width: 650px) {
    .jenmpo-state-grid { grid-template-columns: 1fr; }
}
