:root {
    --rcp-ink: #17113f;
    --rcp-muted: #747b91;
    --rcp-line: #dfe5f1;
    --rcp-bg: #f4f6fb;
    --rcp-panel: #ffffff;
    --rcp-accent: #34c6cf;
    --rcp-blue: #2e9ee8;
    --rcp-green: #18a77c;
    --rcp-coral: #ff4f86;
    --rcp-gold: #df9d2f;
    --rcp-violet: #6f4df5;
    --rcp-lavender: #efe8ff;
    --rcp-danger: #e43d67;
    --rcp-warning: #b54708;
    --surface: #ffffff;
    --soft: #f4f6fb;
    --border: #dfe5f1;
    --muted: #747b91;
}

/* Intelligence hub */
.daily-pulse{border-left:4px solid #8b5cf6;background:linear-gradient(135deg,rgba(139,92,246,.06),rgba(34,197,94,.045) 55%,transparent)}
.daily-pulse.pulse-verde{border-left-color:#16a875}.daily-pulse.pulse-amarillo{border-left-color:#d99a19}.daily-pulse.pulse-rojo{border-left-color:#dc4c5b}
.pulse-form{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:12px;align-items:end}
.pulse-form label{min-width:0}.pulse-form label>span{display:block;font-size:.78rem;font-weight:700;color:var(--muted);margin-bottom:6px}.pulse-form .pulse-note{grid-column:span 2}.pulse-submit{min-height:42px}
.pulse-score,.pulse-pill{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--border);border-radius:999px;padding:8px 12px;font-size:.82rem;font-weight:800;background:var(--surface)}
.pulse-score-verde,.pulse-pill-verde{color:#087b59;background:rgba(22,168,117,.1);border-color:rgba(22,168,117,.3)}.pulse-score-amarillo,.pulse-pill-amarillo{color:#936008;background:rgba(217,154,25,.12);border-color:rgba(217,154,25,.35)}.pulse-score-rojo,.pulse-pill-rojo{color:#b42e40;background:rgba(220,76,91,.1);border-color:rgba(220,76,91,.3)}
.command-center{overflow:hidden}.command-legend{display:flex;gap:14px;flex-wrap:wrap;font-size:.78rem;color:var(--muted)}.command-legend span{display:flex;align-items:center;gap:5px}.pulse-dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:#94a3b8}.pulse-dot.verde{background:#16a875}.pulse-dot.amarillo{background:#d99a19}.pulse-dot.rojo{background:#dc4c5b}.pulse-dot.sin-dato{background:#94a3b8}
.command-table thead th{font-size:.72rem;text-transform:uppercase;color:var(--muted);white-space:nowrap}.command-table td{vertical-align:middle}.command-athlete{display:flex;align-items:center;gap:10px;min-width:180px}.command-athlete>span:last-child{display:flex;flex-direction:column}.command-athlete small{color:var(--muted)}.athlete-avatar.mini{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#7657f6,#32c2cf);color:#fff;font-weight:800;overflow:hidden;flex:0 0 auto}.athlete-avatar.mini img{width:100%;height:100%;object-fit:cover}
.attention-alert{display:flex;align-items:center;gap:.55rem;min-width:178px;padding:.48rem .62rem;border:1px solid transparent;border-radius:.7rem;text-decoration:none;transition:transform .18s ease,box-shadow .18s ease,filter .18s ease}.attention-alert:hover{transform:translateY(-1px);box-shadow:0 7px 16px rgba(31,27,67,.12);filter:saturate(1.08)}.attention-alert>span:nth-child(2){display:flex;flex-direction:column;min-width:0}.attention-alert strong{font-size:.75rem;line-height:1.1;white-space:nowrap}.attention-alert small{margin-top:.16rem;font-size:.7rem;font-weight:700;opacity:.82}.attention-alert-icon{display:grid;place-items:center;width:1.75rem;height:1.75rem;flex:0 0 1.75rem;border-radius:.55rem;background:rgba(255,255,255,.58)}.attention-alert-arrow{margin-left:auto;font-size:.8rem}.attention-alert-alta{color:#a62c3e;background:rgba(228,61,103,.1);border-color:rgba(228,61,103,.28)}.attention-alert-media{color:#95640d;background:rgba(223,157,47,.13);border-color:rgba(223,157,47,.34)}.attention-alert-baja{color:#24658a;background:rgba(46,158,232,.1);border-color:rgba(46,158,232,.28)}.alert-focus{outline:3px solid rgba(111,77,245,.24);outline-offset:2px;box-shadow:0 0 0 5px rgba(111,77,245,.07)}
.suggestion-row td{padding:0!important}.suggestion-review{display:grid;grid-template-columns:1.4fr 1fr;gap:18px;padding:16px;background:rgba(217,154,25,.07);border-left:3px solid #d99a19}.suggestion-review p{margin:.35rem 0;color:var(--muted)}
.empty-state-compact{display:flex;gap:12px;align-items:center;padding:18px;background:var(--soft);border-radius:8px}.empty-state-compact i{font-size:1.6rem;color:#7657f6}.empty-state-compact div{display:flex;flex-direction:column}.empty-state-compact span{color:var(--muted)}
.template-toolbar{display:flex;justify-content:space-between;gap:18px;align-items:center}.template-apply-form,.template-save-form{display:flex;gap:10px;align-items:center}.template-apply-form .form-select{min-width:310px}.template-save-form>div{margin-right:auto}.template-save-form .form-control{max-width:290px}.template-save-form .form-select{max-width:190px}
.library-filters{display:flex;align-items:center;gap:16px}.library-filters .form-control{max-width:520px}.template-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.template-card{padding:18px;display:flex;flex-direction:column;gap:12px}.template-card header,.template-card footer{display:flex;justify-content:space-between;align-items:center;gap:10px}.template-card h2{font-size:1.04rem;margin:0}.template-card>p{color:var(--muted);margin:0}.template-category{font-size:.72rem;text-transform:uppercase;font-weight:800;color:#7657f6}.template-metrics{display:flex;gap:12px;flex-wrap:wrap;font-size:.78rem}.template-metrics span{padding:6px 8px;border-radius:6px;background:var(--soft)}.template-card details{border-top:1px solid var(--border);padding-top:10px}.template-card summary{cursor:pointer;font-weight:700}.template-card dl{margin:12px 0 0}.template-card dt{font-size:.75rem;color:var(--muted)}.template-card dd{margin-bottom:9px;font-size:.86rem}.template-card footer{margin-top:auto;border-top:1px solid var(--border);padding-top:10px;color:var(--muted)}
@media(max-width:1100px){.pulse-form{grid-template-columns:repeat(3,minmax(130px,1fr))}.template-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.template-toolbar,.template-save-form{align-items:stretch;flex-direction:column}.template-apply-form{flex-wrap:wrap}.template-apply-form .form-select{min-width:230px;flex:1}.template-save-form .form-control,.template-save-form .form-select{max-width:none;width:100%}}
@media(max-width:720px){.pulse-form{grid-template-columns:repeat(2,minmax(0,1fr))}.pulse-form .pulse-note{grid-column:1/-1}.pulse-submit{grid-column:1/-1}.suggestion-review{grid-template-columns:1fr}.template-grid{grid-template-columns:1fr}.library-filters{align-items:stretch;flex-direction:column}.library-filters .form-control{max-width:none}}
[data-theme="dark"] .pulse-score-verde,[data-theme="dark"] .pulse-pill-verde{color:#72e4bc}[data-theme="dark"] .pulse-score-amarillo,[data-theme="dark"] .pulse-pill-amarillo{color:#ffd477}[data-theme="dark"] .pulse-score-rojo,[data-theme="dark"] .pulse-pill-rojo{color:#ff9cab}
.insight-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.insight-card{padding:15px 16px;border:1px solid var(--border);border-left:3px solid #36bdc7;border-radius:8px;background:var(--surface);display:flex;flex-direction:column}.insight-card>span{font-size:.75rem;color:var(--muted);font-weight:700}.insight-card>strong{font-size:1.45rem;line-height:1.25;margin:4px 0}.insight-card>small{color:var(--muted)}.insight-status-alta{border-left-color:#dc4c5b}.insight-status-baja{border-left-color:#d99a19}.insight-status-estable{border-left-color:#16a875}
.race-prediction summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between}.race-prediction summary::-webkit-details-marker{display:none}.race-prediction summary>span{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.race-prediction summary i:first-child{color:#7657f6}.race-prediction summary small{color:var(--muted)}.prediction-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.prediction-grid>div{padding:12px;border-radius:7px;background:var(--soft);display:flex;flex-direction:column}.prediction-grid span,.prediction-grid small{font-size:.76rem;color:var(--muted)}.prediction-grid strong{font-size:1.1rem;margin:3px 0}
@media(max-width:850px){.insight-strip,.prediction-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.plan-simulator{border:1px solid rgba(118,87,246,.25);background:linear-gradient(135deg,rgba(118,87,246,.07),rgba(54,189,199,.05));border-radius:8px;padding:16px}.plan-simulator-heading{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:13px}.plan-simulator-heading>span{display:flex;align-items:center;gap:8px}.plan-simulator-heading i{color:#7657f6}.plan-simulator-heading small{color:var(--muted);max-width:620px;text-align:right}.plan-simulator-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}.plan-simulator-grid>div{padding:10px;border-radius:7px;background:var(--surface);border:1px solid var(--border);display:flex;flex-direction:column}.plan-simulator-grid span,.plan-simulator-grid small{font-size:.7rem;color:var(--muted)}.plan-simulator-grid strong{font-size:1.15rem;margin:2px 0}.simulator-warning{display:flex;gap:8px;align-items:center;margin-top:10px;padding:9px 11px;border-radius:6px;background:rgba(217,154,25,.13);color:#95640d;font-size:.8rem}
@media(max-width:1050px){.plan-simulator-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:650px){.plan-simulator-heading{align-items:flex-start;flex-direction:column}.plan-simulator-heading small{text-align:left}.plan-simulator-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.membership-form{display:grid;grid-template-columns:2fr repeat(3,1fr);gap:12px;align-items:end}.membership-form label>span{display:block;font-size:.75rem;font-weight:700;color:var(--muted);margin-bottom:5px}.membership-note{grid-column:span 2}@media(max-width:900px){.membership-form{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:550px){.membership-form{grid-template-columns:1fr}.membership-note{grid-column:auto}}

body {
    background:
        linear-gradient(180deg, #faf9ff 0, #f4f7fc 430px, #eef3f9 100%),
        var(--rcp-bg);
    color: var(--rcp-ink);
    font-size: 0.95rem;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 270px 1fr;
}

.sidebar {
    background: rgba(255, 255, 255, .98);
    color: var(--rcp-ink);
    padding: 1.35rem 1.25rem;
    border-right: 1px solid var(--rcp-line);
    box-shadow: 14px 0 36px rgba(31, 27, 67, .08);
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 2rem;
    color: var(--rcp-ink);
}

.brand-mark > div > div {
    color: var(--rcp-accent);
    font-size: 1.25rem;
    line-height: 1.05;
}

.brand-mark small {
    color: #8090ad;
    font-size: .75rem;
    font-weight: 700;
}

.brand-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--rcp-violet), var(--rcp-accent));
    box-shadow: 0 16px 32px rgba(111, 77, 245, .24);
    color: #fff;
}

.brand-icon.brand-icon-image {
    background: #fff;
    padding: .16rem;
}

.brand-icon-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
    display: block;
}

.rcp-tailwind .brand-icon.brand-icon-image {
    background: #fff;
    padding: .16rem;
    flex: 0 0 2.9rem;
    min-width: 2.9rem;
}

.rcp-tailwind .brand-icon.brand-icon-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}

.sidebar a {
    color: var(--rcp-muted);
    text-decoration: none;
}

.nav-link-app {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .82rem .9rem;
    border-radius: .95rem;
    margin-bottom: .38rem;
    font-weight: 800;
    transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.nav-link-app .bi {
    width: 1.25rem;
    text-align: center;
}

.nav-link-app:hover {
    background: #f3edff;
    color: var(--rcp-ink);
    transform: translateX(2px);
}

.nav-link-app.active {
    background: linear-gradient(135deg, var(--rcp-violet), var(--rcp-accent));
    color: #fff;
    box-shadow: 0 14px 28px rgba(111, 77, 245, .22);
    transform: translateX(2px);
}

.sidebar-note {
    margin-top: 1.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--rcp-line);
    color: #7a86a0;
    font-size: .82rem;
    line-height: 1.45;
}

.topbar {
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rcp-line);
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.9rem;
    position: sticky;
    top: 0;
    z-index: 4;
}

.topbar h1 {
    color: var(--rcp-ink);
    font-size: 1.5rem;
    font-weight: 900;
    margin: 0;
}

.topbar span {
    color: var(--rcp-muted);
    font-size: .88rem;
}

.topbar-athlete-profile {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    max-width: 240px;
    padding: .28rem .62rem .28rem .32rem;
    border: 1px solid var(--rcp-line);
    border-radius: 999px;
    background: #fff;
    color: var(--rcp-ink);
    font-weight: 900;
    text-decoration: none;
}

.topbar-athlete-profile strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-athlete-photo {
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--rcp-violet), var(--rcp-accent));
    color: #fff !important;
    font-size: .84rem !important;
    font-weight: 900;
}

.topbar-athlete-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.membership-banner {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-height: 48px;
    margin: 1rem 1.9rem 0;
    padding: .72rem .95rem;
    border: 1px solid rgba(111, 77, 245, .22);
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(111, 77, 245, .10), rgba(52, 198, 207, .10));
    color: var(--rcp-ink);
    font-weight: 800;
}

.membership-banner .bi {
    color: var(--rcp-violet);
    font-size: 1.2rem;
}

.membership-banner-warning {
    border-color: rgba(223, 157, 47, .38);
    background: linear-gradient(135deg, rgba(223, 157, 47, .14), rgba(255, 247, 237, .9));
}

.content {
    padding: 1.65rem 1.9rem;
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .35rem 0;
}

.eyebrow {
    color: var(--rcp-violet);
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.stat-card,
.panel {
    background: var(--rcp-panel);
    border: 1px solid var(--rcp-line);
    border-radius: 1.05rem;
    box-shadow: 0 16px 36px rgba(31, 27, 67, .08);
}

.panel {
    overflow: hidden;
}

.section-title {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1rem;
}

.section-title h2 {
    font-size: 1rem;
    margin: 0;
}

.section-title .bi {
    width: 2rem;
    height: 2rem;
    border-radius: .85rem;
    display: grid;
    place-items: center;
    background: #edf8ff;
    color: var(--rcp-blue);
}

.microcycle-summary {
    border-top: 4px solid var(--rcp-violet);
}

.microcycle-summary strong {
    color: var(--rcp-muted);
    font-size: .78rem;
    text-transform: uppercase;
}

.stat-card {
    padding: 1.05rem 1rem;
    min-height: 112px;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    right: -26px;
    top: -30px;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--card-accent, var(--rcp-accent)) 16%, transparent);
}

.stat-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--card-accent, var(--rcp-accent));
}

.stat-card .bi {
    color: var(--card-accent, var(--rcp-accent));
    font-size: 1.35rem;
}

.stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--rcp-ink);
}

.muted {
    color: var(--rcp-muted);
}

.hero-panel {
    background:
        linear-gradient(135deg, rgba(111, 77, 245, .97), rgba(52, 198, 207, .96)),
        var(--rcp-violet);
    color: #fff;
    border: 0;
    border-radius: 1.05rem;
    padding: 1.35rem;
    box-shadow: 0 18px 38px rgba(111, 77, 245, .20);
}

.hero-panel .text-muted,
.hero-panel .muted {
    color: rgba(255,255,255,.78) !important;
}

.action-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .75rem;
}

.action-card {
    background: #fff;
    border: 1px solid var(--rcp-line);
    border-radius: 1rem;
    padding: .9rem;
    display: flex;
    gap: .75rem;
    align-items: center;
    color: var(--rcp-ink);
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(45, 67, 97, .10);
}

.action-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: .9rem;
    display: grid;
    place-items: center;
    background: var(--rcp-lavender);
    color: var(--rcp-violet);
}

.timeline {
    display: grid;
    gap: .7rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: .75rem;
    align-items: center;
    padding: .7rem;
    border: 1px solid var(--rcp-line);
    border-radius: 1rem;
    background: #fff;
}

.timeline-date {
    width: 42px;
    height: 42px;
    border-radius: .9rem;
    background: #fff6df;
    color: #8a5b00;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: .82rem;
}

.athlete-race-hub .race-goal-groups {
    display: grid;
    gap: 1rem;
}

.race-goal-group {
    border: 1px solid var(--rcp-line);
    border-radius: .8rem;
    padding: .85rem;
    background: rgba(255, 255, 255, .55);
}

.race-goal-group-primary { border-left: 3px solid var(--rcp-violet); }
.race-goal-group-preparatory { border-left: 3px solid #18a673; }
.race-goal-group-secondary { border-left: 3px solid #8a95a8; }

.race-goal-list { display: grid; gap: .55rem; }

.race-goal-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: .8rem;
    align-items: center;
    padding: .7rem;
    border: 1px solid var(--rcp-line);
    border-radius: .7rem;
    background: var(--rcp-surface, #fff);
}

.race-goal-date {
    display: grid;
    justify-items: center;
    align-content: center;
    min-height: 48px;
    border-radius: .65rem;
    background: #fff6df;
    color: #8a5b00;
}

.race-goal-date span { font-size: .7rem; color: currentColor; opacity: .8; }
.race-goal-content { min-width: 0; }
.race-goal-content strong { overflow-wrap: anywhere; }
.race-goal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }

/* The race hub must keep readable contrast in the dark application theme. */
html[data-theme="dark"] .athlete-race-hub .race-goal-group {
    background: rgba(255, 255, 255, .035);
    border-color: #3a4661;
}

html[data-theme="dark"] .athlete-race-hub .race-goal-item {
    background: #202a43;
    border-color: #405071;
}

html[data-theme="dark"] .athlete-race-hub .race-goal-content strong,
html[data-theme="dark"] .athlete-race-hub .race-goal-group h3 {
    color: #f2f5ff;
}

html[data-theme="dark"] .athlete-race-hub .race-goal-content .text-muted {
    color: #b6c5dd !important;
}

html[data-theme="dark"] .athlete-race-hub .race-goal-date {
    background: #2a2446;
    color: #d6caff;
}

html[data-theme="dark"] .athlete-race-hub .race-goal-item .text-bg-light {
    color: #d7e0f2 !important;
    background: #303b59 !important;
    border: 1px solid #4b5b7d;
}

html[data-theme="dark"] .athlete-race-hub .race-goal-actions .btn-outline-primary,
html[data-theme="dark"] .athlete-race-hub .race-goal-actions .btn-outline-secondary,
html[data-theme="dark"] .athlete-race-hub .race-goal-actions .btn-outline-success,
html[data-theme="dark"] .athlete-race-hub .race-goal-actions .btn-outline-danger {
    background: transparent;
}

html[data-theme="dark"] .athlete-race-hub .race-goal-actions .btn-outline-primary {
    color: #c0adff;
    border-color: #8e78ed;
}

html[data-theme="dark"] .athlete-race-hub .race-goal-actions .btn-outline-secondary {
    color: #c7d2e6;
    border-color: #687896;
}

html[data-theme="dark"] .athlete-race-hub .race-goal-actions .btn-outline-success {
    color: #72e4bc;
    border-color: #2d9f7b;
}

html[data-theme="dark"] .athlete-race-hub .race-goal-actions .btn-outline-danger {
    color: #ff9cab;
    border-color: #bb536d;
}

html[data-theme="dark"] .athlete-race-hub .race-goal-actions .btn:hover,
html[data-theme="dark"] .athlete-race-hub .race-goal-actions .btn:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, .1);
}

@media (max-width: 767.98px) {
    .race-goal-item { grid-template-columns: 48px minmax(0, 1fr); align-items: start; }
    .race-goal-actions { grid-column: 1 / -1; justify-content: stretch; }
    .race-goal-actions .btn { flex: 1 1 auto; }
    .race-goal-actions .btn span { display: inline; }
}

.segment-control {
    display: inline-flex;
    border: 1px solid var(--rcp-line);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}

.segment-control button {
    border: 0;
    background: transparent;
    padding: .45rem .7rem;
    font-weight: 700;
    color: var(--rcp-muted);
}

.segment-control button.active {
    background: var(--rcp-lavender);
    color: var(--rcp-violet);
}

.input-group-text {
    border-color: #dfe5f1;
    border-radius: .9rem;
    background: #f7f9fd;
    color: var(--rcp-muted);
}

.input-group > .input-group-text:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group > .form-control:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.form-label,
form label:not(.choice-check) {
    color: #6f7588;
    font-weight: 800;
    margin-bottom: .42rem;
}

.badge.text-bg-light {
    background: #f1f4fa !important;
    border: 1px solid #e2e8f2;
    color: var(--rcp-ink) !important;
}

.pagination {
    gap: .3rem;
}

.page-link {
    min-width: 2.25rem;
    min-height: 2.25rem;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--rcp-line);
    border-radius: .7rem !important;
    background: #fff;
    color: var(--rcp-ink);
    font-weight: 800;
}

.page-link:hover,
.page-item.active .page-link {
    border-color: var(--rcp-violet);
    background: var(--rcp-violet);
    color: #fff;
}

.page-item.disabled .page-link {
    background: #f2f4f9;
    color: #98a0b2;
}

.table {
    color: var(--rcp-ink);
}

.table thead th {
    color: var(--rcp-muted);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: 0;
    background: #f6f7fb;
    border-bottom: 1px solid var(--rcp-line);
}

.table > :not(caption) > * > * {
    padding: .78rem .75rem;
}

.table tbody tr {
    border-color: #edf1f6;
}

.form-control,
.form-select {
    background-color: #f7f9fd;
    border-color: #dfe5f1;
    border-radius: .9rem;
    color: var(--rcp-ink);
    min-height: 48px;
    box-shadow: none;
    padding: .62rem .85rem;
}

.form-control::placeholder {
    color: #8a90a3;
}

.form-control:focus,
.form-select:focus {
    background-color: #fff;
    border-color: var(--rcp-violet);
    box-shadow: 0 0 0 .22rem rgba(111, 77, 245, .13);
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
    gap: .5rem;
}

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

.choice-check {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: .45rem;
    border: 1px solid var(--rcp-line);
    border-radius: .9rem;
    background: #f7f9fd;
    padding: .5rem .65rem;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.choice-check:hover {
    border-color: #cfc1ff;
    background: #f4efff;
    transform: translateY(-1px);
}

.choice-check:has(input:checked) {
    border-color: rgba(111, 77, 245, .45);
    background: var(--rcp-lavender);
    color: var(--rcp-violet);
    box-shadow: 0 10px 22px rgba(111, 77, 245, .10);
}

.choice-check input {
    accent-color: var(--rcp-accent);
}

.btn {
    border-radius: .85rem;
    font-weight: 800;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--rcp-violet), var(--rcp-accent));
    border-color: transparent;
    box-shadow: 0 14px 26px rgba(111, 77, 245, .22);
}

.btn-primary {
    background: linear-gradient(135deg, var(--rcp-violet), var(--rcp-blue));
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(111, 77, 245, .18);
}

.btn-outline-primary {
    color: var(--rcp-violet);
    border-color: #cfc1ff;
    background: #fff;
}

.btn-outline-primary:hover {
    background: var(--rcp-lavender);
    border-color: #c4b3ff;
    color: var(--rcp-violet);
}

.btn-outline-secondary {
    color: var(--rcp-ink);
    border-color: #dfe5f1;
    background: #f9fbfe;
}

.btn-outline-secondary:hover {
    background: #f3f6fb;
    border-color: #cfd8e6;
    color: var(--rcp-ink);
}

.btn-outline-success {
    color: #16a34a;
    border-color: #86efac;
    background: #fff;
}

.btn-outline-success:hover {
    background: #f0fdf4;
    border-color: #4ade80;
    color: #15803d;
}

.btn-danger,
.btn-outline-danger:hover {
    background: var(--rcp-coral);
    border-color: var(--rcp-coral);
    color: #fff;
}

.btn-outline-danger {
    color: var(--rcp-coral);
    border-color: #ffc1d4;
    background: #fff;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .25rem .55rem;
    font-size: .78rem;
    font-weight: 700;
}

.status-pendiente { background: #fff7ed; color: #9a3412; }
.status-completado { background: #dcfce7; color: #166534; }
.status-parcial { background: #e0f2fe; color: #075985; }
.status-no-realizado { background: #fee2e2; color: #991b1b; }
.status-reprogramado { background: #eef2ff; color: #3730a3; }
.status-suspendido { background: #f1f5f9; color: #334155; }
.status-borrador { background: #eef2ff; color: #3730a3; }
.status-publicado { background: #dcfce7; color: #166534; }
.status-archivado { background: #f1f5f9; color: #475569; }

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

@media (min-width: 1480px) {
    .week-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }
}

.day-cell {
    background: #fff;
    border: 1px solid var(--rcp-line);
    border-radius: 1rem;
    padding: .8rem;
    min-height: 230px;
}

.session-card {
    border-left: 4px solid var(--rcp-accent);
    background: #f8f9fe;
    border-radius: .85rem;
    padding: .65rem;
    margin-top: .6rem;
}

/* Tarjetas y filas de dia de descanso / asimilacion */
.status-descanso {
    background: #ecfdf5 !important;
    color: #065f46 !important;
    border: 1px solid #a7f3d0 !important;
}

.rest-day-card {
    background: linear-gradient(145deg, #ffffff 0%, #f0fdf9 100%);
    border: 1.5px dashed #99f6e4;
    border-radius: .95rem;
    padding: .85rem;
    margin-top: .6rem;
    display: flex;
    flex-direction: column;
    gap: .45rem;
    transition: transform .16s ease, box-shadow .16s ease;
}

.rest-day-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(16, 185, 129, .08);
}

.rest-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .4rem;
}

.rest-day-title {
    font-size: .86rem;
    font-weight: 800;
    color: #0f766e;
    display: flex;
    align-items: center;
    gap: .35rem;
}

.rest-day-tip {
    font-size: .78rem;
    line-height: 1.35;
    color: #475569;
    margin: .2rem 0 .35rem;
}

.rest-day-checklist {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    font-size: .72rem;
    font-weight: 700;
}

.rest-day-checklist span {
    background: #ffffff;
    border: 1px solid #ccfbf1;
    border-radius: 999px;
    padding: .15rem .45rem;
    color: #0d9488;
}

.rest-day-footer {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .72rem;
    font-weight: 700;
    color: #64748b;
    margin-top: .2rem;
    border-top: 1px solid #e6fffa;
    padding-top: .35rem;
}

.training-rest-row {
    background: linear-gradient(135deg, #f8fafc 0%, #f0fdf9 100%) !important;
    border: 1.5px dashed #a7f3d0 !important;
}

.training-rest-date {
    background: #ecfdf5 !important;
    color: #047857 !important;
    border: 1px solid #a7f3d0 !important;
}

.training-rest-tip {
    font-size: .84rem;
    line-height: 1.4;
    color: #334155;
    background: #ffffff;
    border: 1px solid #d1fae5;
    border-radius: .75rem;
    padding: .5rem .75rem;
    margin-top: .4rem;
}

.session-log-summary {
    border: 1px solid #dfe5f1;
    border-radius: .8rem;
    background: #fff;
    color: var(--rcp-muted);
    padding: .5rem .6rem;
    font-size: .82rem;
}

.session-plan-preview {
    border-left: 5px solid var(--rcp-violet);
}

.session-plan-overview {
    display: grid;
    grid-template-columns: minmax(190px, .78fr) minmax(0, 1.5fr);
    align-items: center;
    gap: 1rem;
}

@media (max-width: 991px) {
    .session-plan-overview {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: .85rem;
    }
}

.session-plan-title {
    min-width: 0;
}

.session-plan-title h2,
.session-plan-title p {
    overflow-wrap: anywhere;
}

.session-plan-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .55rem;
    width: 100%;
}

@media (max-width: 991px) {
    .session-plan-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .55rem;
    }
}

@media (max-width: 380px) {
    .session-plan-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .4rem;
    }
}

.session-plan-metric {
    position: relative;
    min-width: 0;
    min-height: 76px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-content: center;
    gap: .2rem .45rem;
    border: 1px solid var(--rcp-line);
    border-radius: .75rem;
    background: #f8f9fe;
    color: var(--rcp-muted);
    padding: .65rem .75rem;
    font-size: .74rem;
    font-weight: 800;
    line-height: 1.25;
    overflow: hidden;
}

.session-plan-metric > i {
    grid-row: 1 / span 2;
    align-self: center;
    color: var(--rcp-violet);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.session-plan-metric > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.session-plan-metric strong {
    min-width: 0;
    color: var(--rcp-ink);
    font-size: .95rem;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

.session-plan-metric-primary {
    border-color: rgba(111, 77, 245, .34);
    background: rgba(111, 77, 245, .08);
}

.session-plan-breakdown {
    display: grid;
    gap: .35rem;
    padding: .75rem;
    border: 1px solid var(--rcp-line);
    border-radius: .75rem;
    background: var(--rcp-soft, #f8fafc);
    color: var(--rcp-ink);
}

.session-plan-breakdown > .d-flex {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.platform-analysis-box {
    border: 1px solid rgba(41, 199, 208, .28);
    border-left: 5px solid var(--rcp-accent);
    border-radius: .95rem;
    background: linear-gradient(135deg, rgba(41, 199, 208, .10), rgba(123, 92, 255, .08));
    color: var(--rcp-ink);
    padding: .7rem .75rem;
    font-size: .84rem;
}

.platform-analysis-box p {
    margin: .35rem 0;
}

.platform-analysis-box a {
    color: var(--rcp-violet);
    font-weight: 900;
}

.platform-analysis-box small {
    display: block;
    margin-top: .45rem;
    color: var(--rcp-muted);
    font-weight: 800;
}

.pulse-alert-banner {
    background: linear-gradient(135deg, #e7f1ff 0%, #f0f7ff 100%);
    border-left: 5px solid #0d6efd !important;
    border-radius: 12px;
    padding: 1.1rem 1.3rem;
}

.pulse-feedback-card {
    background: linear-gradient(135deg, #ffffff 0%, #fbfbfb 100%);
    border-radius: 12px;
    overflow: hidden;
}

.next-week-banner {
    background: linear-gradient(135deg, #e0f2fe 0%, #ede9fe 100%);
    border-radius: 12px;
}

.checkups-panel {
    border-left: 4px solid var(--accent, #6f4df5) !important;
    background: linear-gradient(135deg, rgba(111, 77, 245, 0.04), rgba(255, 255, 255, 1));
}

.checkup-card {
    background: #ffffff;
}

.coach-pulse {
    border: 1px solid var(--rcp-line);
    border-left: 5px solid var(--pulse-color, var(--rcp-accent));
    border-radius: .95rem;
    background: #fff;
    padding: .7rem .75rem;
    color: var(--rcp-ink);
    box-shadow: 0 10px 22px rgba(31, 27, 67, .06);
    font-size: .84rem;
}

.coach-pulse p {
    margin: .35rem 0;
}

.coach-pulse small,
.coach-pulse span {
    color: var(--rcp-muted);
    font-weight: 800;
}

.coach-pulse-verde {
    --pulse-color: #20a77a;
    background: #f5fffb;
}

.coach-pulse-amarillo {
    --pulse-color: #df9d2f;
    background: #fffaf0;
}

.coach-pulse-rojo {
    --pulse-color: var(--rcp-coral);
    background: #fff5f8;
}

.coach-pulse-waiting {
    --pulse-color: var(--rcp-violet);
    background: #f7f3ff;
}

.coach-pulse-note {
    border: 1px solid var(--rcp-line);
    border-radius: .95rem;
    background: #f8f9fe;
    padding: .75rem;
    color: var(--rcp-muted);
}

.goal-chip {
    display: inline-flex;
    gap: .35rem;
    align-items: center;
    background: #f0ebff;
    color: var(--rcp-violet);
    border: 1px solid #d8ccff;
    border-radius: 999px;
    padding: .2rem .55rem;
    font-size: .78rem;
    font-weight: 700;
}

.danger-note {
    border-left: 4px solid var(--rcp-danger);
    background: #fff1f2;
    color: #7f1d1d;
    padding: .75rem;
    border-radius: .9rem;
}

.report-hero {
    margin-top: .15rem;
}

.report-metric-list {
    display: grid;
    gap: .7rem;
}

.report-metric-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .75rem .8rem;
    border: 1px solid var(--rcp-line);
    border-radius: .95rem;
    background: #f8f9fe;
}

.report-metric-list span {
    color: var(--rcp-muted);
    font-weight: 700;
}

.report-metric-list strong {
    color: var(--rcp-ink);
    font-size: 1.1rem;
}

.report-list {
    display: grid;
    gap: .7rem;
}

.report-list-item {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: .65rem;
    padding: .75rem;
    border: 1px solid var(--rcp-line);
    border-radius: .95rem;
    background: #fbfcff;
}

.report-table-panel {
    overflow: visible;
}

.report-athlete-table {
    min-width: 1180px;
}

.report-athlete-table td {
    vertical-align: top;
}

.report-progress {
    height: .45rem;
    background: #edf3f9;
}

.report-progress .progress-bar {
    background: linear-gradient(135deg, var(--rcp-accent), var(--rcp-blue));
}

.report-column {
    min-height: 100%;
}

.report-dl {
    display: grid;
    grid-template-columns: minmax(110px, .8fr) 1.2fr;
    gap: .55rem .8rem;
    margin: 0;
}

.report-dl dt {
    color: var(--rcp-muted);
    font-size: .78rem;
    text-transform: uppercase;
}

.report-dl dd {
    margin: 0;
    font-weight: 700;
}

.empty-state {
    min-height: 220px;
    border: 1px dashed #cfd8e6;
    border-radius: 1rem;
    background: #f8f9fe;
    display: grid;
    place-items: center;
    align-content: center;
    gap: .5rem;
    padding: 1.25rem;
    text-align: center;
    color: var(--rcp-muted);
}

.empty-state .bi {
    width: 2.8rem;
    height: 2.8rem;
    border-radius: .95rem;
    display: grid;
    place-items: center;
    background: var(--rcp-lavender);
    color: var(--rcp-violet);
    font-size: 1.25rem;
}

.empty-state strong {
    color: var(--rcp-ink);
}

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

.athlete-card {
    min-height: 360px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--rcp-line);
    border-radius: 1.15rem;
    padding: 1.25rem;
    box-shadow: 0 14px 30px rgba(31, 27, 67, .08);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.athlete-card:hover {
    transform: translateY(-2px);
    border-color: #d4c8ff;
    box-shadow: 0 18px 36px rgba(31, 27, 67, .11);
}

.athlete-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .8rem;
}

.athlete-avatar {
    width: 3.05rem;
    height: 3.05rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #b89dff, var(--rcp-violet));
    color: #fff;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(111, 77, 245, .22);
    overflow: hidden;
}

.athlete-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.athlete-badge {
    max-width: 58%;
    border-radius: 999px;
    background: #ffe4ee;
    color: var(--rcp-coral);
    padding: .34rem .7rem;
    font-size: .73rem;
    font-weight: 900;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.athlete-card h2 {
    margin: 1.05rem 0 .25rem;
    color: var(--rcp-ink);
    font-size: 1.14rem;
    font-weight: 900;
}

.athlete-meta {
    margin: 0;
    color: #8a92a8;
    overflow-wrap: anywhere;
}

.athlete-divider {
    border-top: 1px solid var(--rcp-line);
    margin: 1rem 0 .85rem;
}

.athlete-data-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(0, auto);
    align-items: start;
    gap: .75rem;
    margin: .48rem 0;
}

.athlete-data-row span {
    color: #6f7588;
    font-weight: 800;
}

.athlete-data-row strong {
    max-width: 150px;
    color: var(--rcp-ink);
    text-align: right;
    overflow-wrap: anywhere;
}

.athlete-card-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: .55rem;
    margin-top: auto;
    padding-top: 1.05rem;
}

.athlete-card-actions form {
    margin: 0;
}

.btn-soft-primary,
.btn-icon-soft,
.btn-icon-danger {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-soft-primary {
    gap: .45rem;
    background: #f8f9fe;
    border: 1px solid #dfe5f1;
    color: var(--rcp-ink);
}

.btn-soft-primary:hover {
    background: var(--rcp-lavender);
    border-color: #d5c8ff;
    color: var(--rcp-violet);
}

.btn-icon-soft,
.btn-icon-danger {
    width: 42px;
    padding: 0;
}

.btn-icon-soft {
    background: #f8f9fe;
    border: 1px solid #dfe5f1;
    color: var(--rcp-violet);
}

.btn-icon-soft:hover {
    background: var(--rcp-lavender);
    border-color: #d5c8ff;
    color: var(--rcp-violet);
}

.btn-icon-danger {
    background: var(--rcp-coral);
    border: 1px solid var(--rcp-coral);
    color: #fff;
    box-shadow: 0 12px 22px rgba(255, 79, 134, .18);
}

.btn-icon-danger:hover {
    background: #e94073;
    border-color: #e94073;
    color: #fff;
}

.team-list {
    display: grid;
    gap: .85rem;
}

.team-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    border: 1px solid var(--rcp-line);
    border-radius: 1rem;
    background: #fff;
    padding: 1rem;
}

.team-row h2 {
    color: var(--rcp-ink);
    font-size: 1.08rem;
    font-weight: 900;
    margin: 0;
}

.team-logo,
.team-profile-logo {
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #b89dff, var(--rcp-violet));
    color: #fff;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(111, 77, 245, .18);
}

.team-logo {
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 1rem;
}

.team-logo.mini {
    width: 2.1rem;
    height: 2.1rem;
    min-width: 2.1rem;
    max-width: 2.1rem;
    max-height: 2.1rem;
    border-radius: .75rem;
    font-size: .76rem;
    box-shadow: none;
    overflow: hidden;
}

.athlete-team-chip .team-logo.mini {
    width: 1.45rem;
    height: 1.45rem;
    min-width: 1.45rem;
    max-width: 1.45rem;
    max-height: 1.45rem;
    border-radius: .45rem;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.athlete-team-chip .team-logo.mini img,
.team-logo.mini img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    display: block !important;
}

.athlete-team-chip {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    width: fit-content;
    padding: .3rem .72rem .3rem .38rem;
    border: 1px solid var(--rcp-line);
    border-radius: 999px;
    background: #fff;
    color: var(--rcp-ink);
    font-weight: 900;
}

.hero-panel .athlete-team-chip {
    border-color: rgba(255, 255, 255, .34);
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

.team-profile-logo {
    width: 7rem;
    height: 7rem;
    border-radius: 1.4rem;
    font-size: 1.8rem;
}

.team-logo img,
.team-profile-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-stats {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .55rem;
}

.team-stats span {
    border-radius: 999px;
    background: #f1f4fa;
    color: var(--rcp-muted);
    padding: .2rem .55rem;
    font-size: .78rem;
    font-weight: 800;
}

.team-actions {
    display: grid;
    justify-items: end;
    gap: .6rem;
}

.team-action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .45rem;
}

.team-action-buttons form {
    margin: 0;
}

.manual-plan-box {
    border: 1px solid var(--rcp-line);
    border-radius: 1rem;
    background: #f8f9fe;
    padding: .9rem;
}

.continuity-plan-box,
.continuity-summary-box {
    border: 1px solid rgba(223, 157, 47, .30);
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(223, 157, 47, .10), rgba(52, 198, 207, .08));
    padding: .9rem;
    display: grid;
    gap: .85rem;
}

.continuity-plan-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .8rem;
}

.continuity-plan-header strong,
.continuity-summary-box strong {
    display: block;
    color: var(--rcp-ink);
    font-weight: 900;
}

.continuity-plan-header span,
.continuity-summary-box span {
    color: var(--rcp-muted);
}

.continuity-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: .25rem .65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(223, 157, 47, .26);
    color: var(--rcp-warning) !important;
    font-size: .72rem;
    font-weight: 900;
}

.evaluation-summary-box {
    border: 1px solid rgba(123, 92, 255, .22);
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(123, 92, 255, .08), rgba(41, 199, 208, .10));
    padding: .9rem;
    display: grid;
    gap: .65rem;
}

.evaluation-summary-box strong {
    display: block;
    color: var(--rcp-ink);
}

.evaluation-summary-box span {
    color: var(--rcp-muted);
}

.evaluation-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: .5rem;
}

.evaluation-summary-grid span {
    border: 1px solid var(--rcp-line);
    border-radius: .85rem;
    background: rgba(255, 255, 255, .72);
    color: var(--rcp-ink);
    font-weight: 800;
    padding: .55rem .7rem;
}

.microcycle-action-form {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem;
    border: 1px solid var(--rcp-line);
    border-radius: .95rem;
    background: #fbfcff;
}

.microcycle-action-form .form-select,
.microcycle-action-form .form-control {
    min-height: 32px;
    width: min(220px, 42vw);
}

.chart-card {
    min-height: 330px;
}

.chart-card > canvas {
    display: block;
    width: 100% !important;
    height: 240px !important;
}

.chart-frame {
    position: relative;
    width: 100%;
    height: 245px;
    min-height: 245px;
}

.chart-frame-wide {
    height: 270px;
    min-height: 270px;
}

.chart-frame-compact {
    height: 270px;
    min-height: 270px;
}

.chart-frame canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.chart-empty {
    min-height: 245px;
    border: 1px dashed #cbd9e8;
    border-radius: 1rem;
    background: #f8f9fe;
    display: grid;
    place-items: center;
    align-content: center;
    gap: .45rem;
    padding: 1rem;
    text-align: center;
    color: var(--rcp-muted);
}

.chart-empty-compact {
    min-height: 270px;
}

.chart-empty .bi {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: .85rem;
    display: grid;
    place-items: center;
    background: var(--rcp-lavender);
    color: var(--rcp-violet);
    font-size: 1.15rem;
}

.chart-empty strong {
    color: var(--rcp-ink);
}

.chart-empty span {
    max-width: 360px;
    font-size: .9rem;
}

.print-actions {
    position: sticky;
    top: 76px;
    z-index: 2;
}

@media (max-width: 992px) {
    .app-shell {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: static;
    }
    .page-heading {
        align-items: stretch;
        flex-direction: column;
    }
    .week-grid {
        grid-template-columns: 1fr;
    }
    .team-row {
        grid-template-columns: 1fr;
    }
}

@media print {
    .sidebar,
    .topbar,
    .print-actions,
    .btn {
        display: none !important;
    }
    .app-shell {
        display: block;
    }
    body {
        background: #fff;
    }
}

/* Tailwind SaaS redesign layer */
.rcp-tailwind {
    --rcp-ink: #17113f;
    --rcp-muted: #69738c;
    --rcp-line: #dce5f2;
    --rcp-bg: #eef3f8;
    --rcp-panel: #ffffff;
    --rcp-accent: #34c6cf;
    --rcp-blue: #2e9ee8;
    --rcp-green: #1fbf8f;
    --rcp-coral: #ff4f86;
    --rcp-gold: #e0a12f;
    --rcp-violet: #6f4df5;
    --rcp-lavender: #f1ecff;
    --rcp-danger: #ec3f68;
    --rcp-warning: #bd7a16;
    background: linear-gradient(180deg, #f8fbff 0, #eef4f8 360px, #eaf0f6 100%);
    color: var(--rcp-ink);
    font-family: "Manrope", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: .94rem;
}

.rcp-tailwind ::selection {
    background: rgba(111, 77, 245, .18);
}

.rcp-tailwind .app-shell {
    grid-template-columns: 292px minmax(0, 1fr);
    background: transparent;
}

.rcp-tailwind .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    padding: 1.35rem;
    background: rgba(255, 255, 255, .94);
    border-right: 1px solid rgba(209, 220, 235, .88);
    box-shadow: 18px 0 42px rgba(31, 27, 67, .08);
}

.rcp-tailwind .brand-mark {
    margin-bottom: .9rem;
}

.rcp-tailwind .brand-mark > div > div {
    color: var(--rcp-ink);
    font-size: 1.08rem;
    font-weight: 900;
}

.rcp-tailwind .brand-mark small {
    color: #7d88a3;
    font-size: .73rem;
    font-weight: 800;
}

.rcp-tailwind .brand-icon {
    width: 2.9rem;
    height: 2.9rem;
    border-radius: .95rem;
    background: linear-gradient(135deg, var(--rcp-violet), var(--rcp-accent));
    box-shadow: 0 16px 34px rgba(111, 77, 245, .22);
    color: #fff;
    font-size: .9rem;
    font-weight: 900;
}

.rcp-tailwind .sidebar nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: .1rem;
}

.nav-section-label {
    margin: 1rem .75rem .45rem;
    color: #9aa6bb;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.rcp-tailwind .nav-link-app {
    min-height: 46px;
    margin-bottom: .32rem;
    padding: .72rem .82rem;
    border-radius: .85rem;
    color: #65708a;
    font-size: .91rem;
    font-weight: 900;
    line-height: 1.15;
    border: 1px solid transparent;
}

.rcp-tailwind .nav-link-app .bi {
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: .72rem;
    background: #f2f6fb;
    color: var(--rcp-violet);
    font-size: .95rem;
}

.rcp-tailwind .nav-link-app:hover {
    background: #f8f6ff;
    color: var(--rcp-ink);
    border-color: #e2d9ff;
    transform: translateX(2px);
}

.rcp-tailwind .nav-link-app.active {
    background: linear-gradient(135deg, var(--rcp-violet), var(--rcp-accent));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 16px 28px rgba(111, 77, 245, .22);
}

.rcp-tailwind .nav-link-app.active .bi {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

.rcp-tailwind .sidebar-note {
    margin-top: auto;
    padding: .9rem;
    border: 1px solid #e4ddff;
    border-radius: .9rem;
    background: #fbfaff;
    color: #69738c;
    font-size: .78rem;
}

.rcp-tailwind .topbar {
    min-height: 76px;
    padding: 0 2rem;
    background: rgba(255, 255, 255, .86);
    border-bottom: 1px solid rgba(209, 220, 235, .92);
    box-shadow: 0 10px 30px rgba(31, 27, 67, .04);
}

.rcp-tailwind .topbar h1 {
    font-size: 1.45rem;
    letter-spacing: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .55rem;
}

.topbar-role-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: .35rem .75rem;
    border-radius: 999px;
    background: #f3f6fb;
    border: 1px solid #dfe6f2;
    color: var(--rcp-ink) !important;
    font-size: .78rem !important;
    font-weight: 900;
    text-transform: capitalize;
}

.rcp-tailwind .content {
    padding: 2rem;
}

.rcp-tailwind .page-heading {
    align-items: center;
    padding: .15rem 0 .35rem;
}

.rcp-tailwind .page-heading h1,
.rcp-tailwind h1,
.rcp-tailwind h2,
.rcp-tailwind h3,
.rcp-tailwind h4,
.rcp-tailwind h5 {
    letter-spacing: 0;
}

.rcp-tailwind .panel,
.rcp-tailwind .stat-card,
.rcp-tailwind .team-row,
.rcp-tailwind .athlete-card,
.rcp-tailwind .report-list-item,
.rcp-tailwind .coach-pulse,
.rcp-tailwind .session-card {
    border: 1px solid rgba(211, 222, 237, .92);
    border-radius: .95rem;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 42px rgba(31, 27, 67, .07);
}

.rcp-tailwind .panel {
    overflow: hidden;
}

.rcp-tailwind .panel.p-3,
.rcp-tailwind .panel.p-4,
.rcp-tailwind form.panel {
    padding: 1.15rem !important;
}

.rcp-tailwind .section-title {
    padding-bottom: .85rem;
    border-bottom: 1px solid #edf1f7;
}

.rcp-tailwind .section-title h2 {
    color: var(--rcp-ink);
    font-size: 1.02rem;
    font-weight: 900;
}

.rcp-tailwind .section-title .bi {
    width: 2.15rem;
    height: 2.15rem;
    border-radius: .75rem;
    background: #ecf8ff;
    color: var(--rcp-blue);
}

.rcp-tailwind .hero-panel {
    position: relative;
    border-radius: 1rem;
    background:
        linear-gradient(135deg, rgba(23, 17, 63, .98), rgba(111, 77, 245, .94) 54%, rgba(52, 198, 207, .9));
    box-shadow: 0 22px 42px rgba(31, 27, 67, .16);
    overflow: hidden;
}

.rcp-tailwind .hero-panel::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rcp-coral), var(--rcp-gold), var(--rcp-accent));
}

.rcp-tailwind .stat-card {
    min-height: 108px;
    padding: 1.05rem 1rem 1rem 1.1rem;
}

.rcp-tailwind .stat-card::after {
    display: none;
}

.rcp-tailwind .stat-card::before {
    left: .7rem;
    top: .85rem;
    bottom: .85rem;
    width: 4px;
    border-radius: 999px;
}

.rcp-tailwind .stat-card .muted {
    padding-left: .72rem;
    color: #65708a;
    font-size: .78rem;
    font-weight: 800;
}

.rcp-tailwind .stat-card .bi {
    margin-left: .72rem;
}

.rcp-tailwind .stat-value {
    padding-left: .72rem;
    color: var(--rcp-ink);
    font-size: 1.75rem;
    font-weight: 900;
}

.rcp-tailwind .btn {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .42rem;
    border-radius: .78rem;
    font-weight: 900;
    letter-spacing: 0;
    box-shadow: none;
}

.rcp-tailwind .btn-sm {
    min-height: 34px;
    border-radius: .7rem;
    font-size: .82rem;
}

.rcp-tailwind .btn-primary,
.rcp-tailwind .btn-success,
.rcp-tailwind .btn-gradient {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--rcp-violet), var(--rcp-accent));
    box-shadow: 0 16px 26px rgba(111, 77, 245, .22);
}

.rcp-tailwind .btn-primary:hover,
.rcp-tailwind .btn-success:hover,
.rcp-tailwind .btn-gradient:hover {
    color: #fff;
    filter: brightness(.98);
    transform: translateY(-1px);
}

.rcp-tailwind .btn-light {
    color: var(--rcp-ink);
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .6);
}

.rcp-tailwind .btn-outline-primary,
.rcp-tailwind .btn-outline-secondary {
    color: var(--rcp-ink);
    background: #fff;
    border-color: #d7e1ee;
}

.rcp-tailwind .btn-outline-primary:hover,
.rcp-tailwind .btn-outline-secondary:hover {
    color: var(--rcp-violet);
    background: #f8f6ff;
    border-color: #d8cdff;
}

.rcp-tailwind .btn-danger,
.rcp-tailwind .btn-icon-danger {
    background: var(--rcp-coral);
    border-color: var(--rcp-coral);
    color: #fff;
    box-shadow: 0 14px 24px rgba(255, 79, 134, .20);
}

.rcp-tailwind .form-label {
    color: #66708a;
    font-size: .82rem;
    font-weight: 900;
    margin-bottom: .45rem;
}

.rcp-tailwind .form-control,
.rcp-tailwind .form-select {
    min-height: 47px;
    border-radius: .78rem;
    border: 1px solid #d8e2ee;
    background-color: #f8faff;
    color: var(--rcp-ink);
    font-weight: 700;
    box-shadow: none;
}

.rcp-tailwind textarea.form-control {
    min-height: 96px;
}

.rcp-tailwind .form-control:focus,
.rcp-tailwind .form-select:focus {
    background-color: #fff;
    border-color: var(--rcp-violet);
    box-shadow: 0 0 0 .2rem rgba(111, 77, 245, .13);
}

.rcp-tailwind .form-check-input {
    border-color: #c7d4e5;
}

.rcp-tailwind .form-check-input:checked {
    background-color: var(--rcp-violet);
    border-color: var(--rcp-violet);
}

.planning-form-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.1rem;
    border: 1px solid rgba(123, 92, 255, .14);
    border-radius: 1.15rem;
    background:
        linear-gradient(135deg, rgba(123, 92, 255, .055), rgba(41, 199, 208, .055)),
        rgba(255, 255, 255, .72);
}

.planning-builder-shell {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(111, 77, 245, .18);
    border-radius: 1.25rem;
    background: rgba(248, 250, 255, .82);
}

.planning-builder-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1rem;
    border: 1px solid rgba(143, 157, 190, .28);
    border-radius: .95rem;
    background: var(--surface, #fff);
}

.planning-builder-toolbar > div:first-child {
    display: grid;
    gap: .12rem;
}

.planning-builder-toolbar .eyebrow {
    margin: 0;
    color: var(--rcp-violet, #6f4df5);
    font-size: .68rem;
    font-weight: 950;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.planning-builder-toolbar strong {
    color: var(--rcp-ink, #171a3b);
    font-size: 1rem;
}

.planning-builder-toolbar small {
    color: var(--rcp-muted, #68738d);
    font-size: .76rem;
}

.planning-step-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .4rem;
}

.planning-step-nav a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .42rem .58rem;
    border: 1px solid rgba(111, 77, 245, .16);
    border-radius: .65rem;
    color: var(--rcp-muted, #68738d);
    font-size: .72rem;
    font-weight: 850;
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.planning-step-nav a span {
    color: var(--rcp-violet, #6f4df5);
    font-size: .68rem;
    font-weight: 950;
}

.planning-step-nav a:hover,
.planning-step-nav a:focus-visible {
    border-color: var(--rcp-violet, #6f4df5);
    background: rgba(111, 77, 245, .08);
    color: var(--rcp-ink, #171a3b);
}

.planning-section {
    padding: 1rem;
    border: 1px solid rgba(143, 157, 190, .28);
    border-radius: .95rem;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 8px 24px rgba(31, 27, 67, .04);
}

.planning-section-heading {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
    padding-bottom: .8rem;
    border-bottom: 1px solid rgba(143, 157, 190, .2);
}

.planning-section-step {
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 2.35rem;
    border-radius: .7rem;
    background: linear-gradient(135deg, var(--rcp-violet), var(--rcp-blue));
    color: #fff;
    font-size: .76rem;
    font-weight: 950;
    letter-spacing: .04em;
}

.planning-section-heading strong,
.planning-section-heading small {
    display: block;
}

.planning-section-heading strong {
    color: var(--rcp-ink);
    font-size: .98rem;
    font-weight: 950;
}

.planning-section-heading small {
    margin-top: .15rem;
    color: var(--rcp-muted);
    font-size: .78rem;
    font-weight: 650;
    line-height: 1.4;
}

.planning-fields-grid {
    display: grid;
    gap: .95rem 1rem;
    align-items: start;
}

.planning-fields-grid-goal {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.planning-fields-grid-schedule {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.planning-fields-grid-athlete {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.planning-fields-grid-athlete .planning-field-reference {
    grid-column: 1 / -1;
}

.planning-required-hint {
    display: inline-flex;
    align-items: center;
    margin-left: .35rem;
    padding: .2rem .42rem;
    border: 1px solid rgba(111, 77, 245, .18);
    border-radius: 999px;
    background: rgba(111, 77, 245, .08);
    color: var(--rcp-violet, #6f4df5);
    font-size: .62rem;
    font-weight: 900;
    letter-spacing: .02em;
    vertical-align: middle;
}

.planning-reference-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .8rem;
    margin-bottom: .65rem;
}

.planning-reference-heading strong,
.planning-reference-heading small {
    display: block;
}

.planning-reference-heading strong {
    color: var(--rcp-ink, #171a3b);
    font-size: .86rem;
    font-weight: 950;
}

.planning-reference-heading small {
    margin-top: .16rem;
    color: var(--rcp-muted, #68738d);
    font-size: .74rem;
    font-weight: 650;
    line-height: 1.35;
}

.planning-reference-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .8rem;
    padding: .8rem;
    border: 1px solid rgba(111, 77, 245, .14);
    border-radius: .8rem;
    background: rgba(111, 77, 245, .035);
}

.planning-reference-strip > div {
    min-width: 0;
}

.planning-reference-strip .form-label {
    font-size: .72rem;
}

.planning-data-origin {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    padding: .72rem .8rem;
    border: 1px dashed rgba(41, 199, 208, .32);
    border-radius: .8rem;
    background: rgba(41, 199, 208, .05);
    color: var(--rcp-muted, #68738d);
    font-size: .72rem;
    font-weight: 750;
    line-height: 1.35;
}

.planning-data-origin span {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

.planning-data-origin i {
    color: var(--rcp-blue, #29a9d8);
}

.planning-fields-grid-load {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.planning-fields-grid-calendar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.planning-fields-grid .planning-field {
    grid-column: auto;
}

/* The recent performance references are a complete row in the athlete context. */
.planning-fields-grid-athlete .planning-field-reference,
.planning-fields-grid-athlete .planning-field-full {
    grid-column: 1 / -1;
}

.planning-fields-grid-goal .planning-field-objective,
.planning-fields-grid-load .planning-field-intensity,
.planning-fields-grid-calendar .planning-field-available {
    grid-column: 1 / -1;
}

.planning-fields-grid .planning-field .form-control,
.planning-fields-grid .planning-field .form-select {
    min-height: 46px;
}

.planning-fields-grid .planning-field-objective .form-select {
    min-height: 56px;
}

.planning-field {
    min-width: 0;
    align-self: start;
}

.planning-field-objective,
.planning-field-full {
    grid-column: 1 / -1;
}

.planning-field-mode,
.planning-field-scope {
    grid-column: span 3;
}

.planning-field-days {
    grid-column: span 2;
}

.planning-field-long-run-day {
    grid-column: span 3;
}

.planning-field-intensity {
    grid-column: span 4;
}

.planning-field-long-run-limit,
.planning-field-weekly-limit {
    grid-column: span 3;
}

.planning-field-start,
.planning-field-end {
    grid-column: span 3;
}

.planning-field-weeks {
    grid-column: span 2;
}

.planning-field-available {
    grid-column: span 4;
    align-self: start;
}

.planning-field-long-run-limit .form-label i {
    color: var(--rcp-violet);
    margin-right: .3rem;
}

.planning-field-long-run-limit .input-group-text,
.planning-field-weekly-limit .input-group-text {
    min-width: 3rem;
    justify-content: center;
    color: #52617d;
    background: rgba(255, 255, 255, .72);
    border-color: #d8e2ef;
}

.planning-field .form-control,
.planning-field .form-select {
    width: 100%;
}

.planning-field-objective .form-select {
    min-height: 54px;
    padding-left: 1rem;
    font-size: .96rem;
    font-weight: 900;
    background-color: #fff;
    border-color: rgba(123, 92, 255, .24);
}

.planning-field .form-text {
    display: flex;
    align-items: flex-start;
    gap: .4rem;
    margin-top: .45rem;
    padding: .45rem .6rem;
    border-left: 2px solid rgba(111, 77, 245, .36);
    border-radius: 0 .5rem .5rem 0;
    background: rgba(111, 77, 245, .055);
    color: #71809b;
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.35;
}

.planning-field .form-text::before {
    content: 'i';
    display: grid;
    place-items: center;
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    margin-top: .05rem;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: .64rem;
    font-weight: 950;
}

.day-distribution-advice {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    margin-top: .65rem;
    padding: .65rem .75rem;
    border: 1px solid rgba(41, 199, 208, .28);
    border-radius: .8rem;
    background: rgba(41, 199, 208, .08);
    color: #2f5067;
    font-size: .82rem;
    font-weight: 750;
    line-height: 1.35;
}

.day-distribution-advice.is-warning {
    border-color: rgba(223, 157, 47, .35);
    background: rgba(255, 193, 7, .11);
    color: #75530f;
}

.planning-field.is-muted {
    opacity: .62;
}

.planning-field.is-muted .form-control,
.planning-field.is-muted .form-select {
    background-color: #f1f5fb;
}

.preparatory-goal-form {
    overflow: visible;
}

.preparatory-race-banner {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    padding: 1rem;
    border: 1px solid rgba(31, 191, 143, .22);
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(31, 191, 143, .10), rgba(52, 198, 207, .10));
}

.preparatory-race-banner > span {
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    flex: 0 0 2.75rem;
    border-radius: .9rem;
    background: linear-gradient(135deg, var(--rcp-violet), var(--rcp-accent));
    color: #fff;
    box-shadow: 0 14px 24px rgba(111, 77, 245, .20);
}

.preparatory-race-banner strong {
    display: block;
    color: var(--rcp-ink);
    font-size: 1rem;
    font-weight: 950;
}

.preparatory-race-banner p {
    margin: .25rem 0 0;
    color: #69738c;
    font-weight: 750;
    line-height: 1.45;
}

.race-form-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: .9rem;
}

.race-field {
    grid-column: span 3;
    min-width: 0;
}

.race-field-wide {
    grid-column: span 6;
}

.race-field-full {
    grid-column: 1 / -1;
}

.race-field .form-control,
.race-field .form-select {
    width: 100%;
}

.field-icon-wrap {
    position: relative;
}

.field-icon-wrap .bi {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8b96ad;
    z-index: 2;
}

.field-icon-wrap .form-control {
    padding-left: 2.8rem;
}

.rcp-tailwind .table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
}

.rcp-tailwind .table thead th {
    padding: .85rem .9rem;
    background: #f4f7fb;
    color: #68738d;
    border-bottom: 1px solid #dfe7f1;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.rcp-tailwind .table > :not(caption) > * > * {
    padding: .9rem;
    color: var(--rcp-ink);
    border-bottom-color: #eef2f7;
}

.rcp-tailwind .table tbody tr:hover {
    background: #fbfcff;
}

.rcp-tailwind .badge,
.rcp-tailwind .status-pill {
    border-radius: 999px;
    font-weight: 900;
}

.rcp-tailwind .progress {
    height: .58rem;
    border-radius: 999px;
    background: #edf2f8;
}

.rcp-tailwind .progress-bar {
    border-radius: 999px;
    background: linear-gradient(90deg, var(--rcp-violet), var(--rcp-accent));
}

.rcp-tailwind .chart-card {
    min-height: 342px;
}

.rcp-tailwind .chart-frame {
    height: 252px;
    min-height: 252px;
}

.rcp-tailwind .chart-empty {
    background: #f8faff;
    border-color: #cfdbea;
}

.rcp-tailwind .athlete-card-grid {
    gap: 1rem;
}

.rcp-tailwind .athlete-card {
    padding: 1.05rem;
}

.rcp-tailwind .athlete-card:hover,
.rcp-tailwind .team-row:hover {
    border-color: #d8cdff;
    box-shadow: 0 20px 44px rgba(31, 27, 67, .10);
}

.rcp-tailwind .athlete-avatar,
.rcp-tailwind .team-logo,
.rcp-tailwind .team-profile-logo {
    background: linear-gradient(135deg, var(--rcp-violet), var(--rcp-coral));
}

.rcp-tailwind .athlete-card-actions {
    gap: .5rem;
}

.rcp-tailwind .btn-soft-primary,
.rcp-tailwind .btn-icon-soft {
    background: #f8faff;
    border-color: #d8e2ee;
    color: var(--rcp-ink);
}

.rcp-tailwind .btn-soft-primary:hover,
.rcp-tailwind .btn-icon-soft:hover {
    color: var(--rcp-violet);
    background: #f8f6ff;
    border-color: #d8cdff;
}

.rcp-tailwind .report-metric-list div,
.rcp-tailwind .report-list-item,
.rcp-tailwind .manual-plan-box,
.rcp-tailwind .continuity-plan-box,
.rcp-tailwind .continuity-summary-box,
.rcp-tailwind .evaluation-summary-box,
.rcp-tailwind .microcycle-action-form,
.rcp-tailwind .session-log-summary,
.rcp-tailwind .platform-analysis-box,
.rcp-tailwind .coach-pulse-note {
    border-color: #dce5f2;
    background: #f9fbff;
    border-radius: .9rem;
}

.rcp-tailwind .report-dl dt,
.rcp-tailwind .report-metric-list span {
    color: #69738c;
    font-weight: 900;
}

.rcp-tailwind .report-dl dd,
.rcp-tailwind .report-metric-list strong {
    color: var(--rcp-ink);
    font-weight: 900;
}

.rcp-tailwind .accordion-item {
    border-color: #dce5f2;
    border-radius: .95rem !important;
    overflow: hidden;
    box-shadow: 0 14px 28px rgba(31, 27, 67, .05);
}

.rcp-tailwind .accordion-button {
    color: var(--rcp-ink);
    font-weight: 900;
    background: #fff;
}

.rcp-tailwind .accordion-button:not(.collapsed) {
    color: var(--rcp-ink);
    background: #f8f6ff;
    box-shadow: none;
}

.rcp-tailwind .collapse.show,
.rcp-tailwind .collapsing {
    visibility: visible !important;
}

.guest-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f8fbff 0, #eef4f8 56%, #f4f0ff 100%);
    position: relative;
}

.guest-main {
    flex: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: max(1.2rem, env(safe-area-inset-top, 1.2rem)) 1rem max(1.2rem, env(safe-area-inset-bottom, 1.2rem)) !important;
    position: relative;
    width: 100%;
}

.guest-top-actions {
    position: absolute;
    top: max(1.1rem, env(safe-area-inset-top, 1.1rem));
    right: max(1.2rem, env(safe-area-inset-right, 1.2rem));
    z-index: 10;
}

.guest-card {
    width: min(980px, 100%);
    min-height: 560px;
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(380px, 1fr);
    overflow: hidden;
    border: 1px solid rgba(211, 222, 237, .92);
    border-radius: 1.25rem;
    background: #fff;
    margin: auto;
    box-shadow: 0 20px 48px rgba(31, 27, 67, .10);
}

.guest-visual {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(23, 17, 63, .98), rgba(111, 77, 245, .94) 54%, rgba(52, 198, 207, .9));
}

.guest-visual .brand-mark,
.guest-visual .brand-mark > div > div,
.guest-visual .brand-mark small {
    color: #fff;
}

.guest-visual .brand-icon {
    background: rgba(255, 255, 255, .18);
    box-shadow: none;
}

.guest-scoreboard {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.guest-scoreboard div {
    min-height: 92px;
    padding: .85rem;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: .9rem;
    background: rgba(255, 255, 255, .12);
}

.guest-scoreboard span {
    display: block;
    color: rgba(255, 255, 255, .74);
    font-size: .72rem;
    font-weight: 900;
}

.guest-scoreboard strong {
    display: block;
    margin-top: .5rem;
    color: #fff;
    font-size: 1.18rem;
    font-weight: 900;
}

.guest-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.2rem;
}

.guest-form-brand {
    display: none;
}

.login-copy h1 {
    margin: .35rem 0 .3rem;
    color: var(--rcp-ink);
    font-size: 2rem;
    font-weight: 900;
}

.login-copy p {
    max-width: 34rem;
    margin: 0;
    color: #69738c;
    font-weight: 700;
}

.login-link a {
    color: var(--rcp-violet);
    font-weight: 900;
}

.local-access-note {
    padding: .85rem;
    border-radius: .85rem;
    background: #f8faff;
    border: 1px dashed #cfdbea;
    color: #69738c;
    font-weight: 800;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

@media (max-width: 1180px) {
    .rcp-tailwind .app-shell {
        grid-template-columns: 260px minmax(0, 1fr);
    }

    .rcp-tailwind .content {
        padding: 1.35rem;
    }

    .planning-field-mode,
    .planning-field-scope,
    .planning-field-days,
    .planning-field-long-run-day,
    .planning-field-long-run-limit,
    .planning-field-weekly-limit,
    .planning-field-start,
    .planning-field-end,
    .planning-field-weeks,
    .planning-field-available {
        grid-column: span 6;
    }
}

@media (max-width: 992px) {
    .rcp-tailwind .app-shell {
        display: block;
    }

    .rcp-tailwind .sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(209, 220, 235, .92);
    }

    .rcp-tailwind .sidebar nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .35rem;
        overflow: visible;
    }

    .race-field,
    .race-field-wide {
        grid-column: span 6;
    }

    .nav-section-label,
    .rcp-tailwind .sidebar-note {
        grid-column: 1 / -1;
    }

    .rcp-tailwind .topbar {
        position: static;
        align-items: flex-start;
        flex-direction: column;
        gap: .75rem;
        padding: 1.1rem 1.25rem;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .guest-card {
        grid-template-columns: 1fr;
        min-height: 0;
        max-width: 440px;
        margin: auto;
    }

    .guest-visual {
        display: none;
    }

    .guest-form {
        padding: 1.75rem 1.4rem;
    }

    .guest-form-brand {
        display: flex;
    }

    .guest-top-actions {
        position: static;
        width: 100%;
        max-width: 440px;
        display: flex;
        justify-content: flex-end;
        margin-bottom: .65rem;
    }
}

@media (max-width: 768px) {
    .hero-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .5rem;
    }

    .hero-actions .btn,
    .hero-actions form,
    .hero-actions form .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .rcp-tailwind .content {
        padding: 1rem;
    }

    .planning-form-grid {
        padding: .85rem;
        gap: .8rem;
    }

    .planning-builder-shell {
        padding: .65rem;
        gap: .7rem;
    }

    .planning-builder-toolbar {
        align-items: stretch;
        flex-direction: column;
        padding: .8rem;
    }

    .planning-step-nav {
        justify-content: flex-start;
    }

    .planning-step-nav a {
        flex: 1 1 calc(50% - .4rem);
        justify-content: center;
    }

    .planning-field-mode,
    .planning-field-scope,
    .planning-field-days,
    .planning-field-long-run-day,
    .planning-field-long-run-limit,
    .planning-field-weekly-limit,
    .planning-field-weeks,
    .planning-field-start,
    .planning-field-end,
    .planning-field-available {
        grid-column: 1 / -1;
    }

    .race-form-grid {
        gap: .8rem;
    }

    .race-field,
    .race-field-wide {
        grid-column: 1 / -1;
    }

    .rcp-tailwind .sidebar nav {
        grid-template-columns: 1fr;
    }

    .rcp-tailwind .page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .guest-main {
        padding: 1rem .85rem !important;
        justify-content: center;
    }

    .guest-card {
        max-width: 100%;
        border-radius: 1.1rem;
    }

    .guest-form {
        padding: 1.4rem 1.15rem;
    }
}

@media (max-width: 900px) {
    .planning-fields-grid-goal,
    .planning-fields-grid-schedule,
    .planning-fields-grid-load,
    .planning-fields-grid-calendar,
    .planning-fields-grid-athlete {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .planning-reference-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .planning-form-grid {
        padding: .7rem;
        gap: .75rem;
    }

    .planning-section {
        padding: .8rem;
    }

    .planning-section-heading {
        align-items: flex-start;
    }

    .planning-section-heading small {
        font-size: .74rem;
    }

    .planning-fields-grid-goal,
    .planning-fields-grid-schedule,
    .planning-fields-grid-load,
    .planning-fields-grid-calendar,
    .planning-fields-grid-athlete {
        grid-template-columns: 1fr;
    }

    .planning-reference-strip {
        grid-template-columns: 1fr;
    }
}

.theme-toggle {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .42rem;
    padding: .35rem .72rem;
    border: 1px solid #d9e3ef;
    border-radius: 999px;
    background: #fff;
    color: var(--rcp-ink);
    font-size: .82rem;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(31, 27, 67, .07);
    transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    border-color: #d7cbff;
    background: #f8f6ff;
    color: var(--rcp-violet);
}

.guest-theme-toggle {
    margin: 0;
}

html[data-theme="dark"] .rcp-tailwind {
    --rcp-ink: #f6f8ff;
    --rcp-muted: #aab5cc;
    --rcp-line: #2f3851;
    --rcp-bg: #101427;
    --rcp-panel: #171c31;
    --rcp-accent: #43d4dd;
    --rcp-blue: #5fb9ff;
    --rcp-green: #36d39e;
    --rcp-coral: #ff6695;
    --rcp-gold: #f2b84b;
    --rcp-violet: #9b7bff;
    --rcp-lavender: #2a2446;
    --rcp-danger: #ff668c;
    --rcp-warning: #f2b84b;
    --surface: #171c31;
    --soft: rgba(255, 255, 255, .05);
    --border: rgba(72, 83, 116, .86);
    --muted: #aab5cc;
    color-scheme: dark;
    background: linear-gradient(180deg, #0c1021 0, #101427 370px, #0d1222 100%);
    color: var(--rcp-ink);
}

html[data-theme="dark"] .rcp-tailwind .sidebar,
html[data-theme="dark"] .rcp-tailwind .topbar,
html[data-theme="dark"] .rcp-tailwind .panel,
html[data-theme="dark"] .rcp-tailwind .stat-card,
html[data-theme="dark"] .rcp-tailwind .team-row,
html[data-theme="dark"] .rcp-tailwind .athlete-card,
html[data-theme="dark"] .rcp-tailwind .report-list-item,
html[data-theme="dark"] .rcp-tailwind .coach-pulse,
html[data-theme="dark"] .rcp-tailwind .session-card,
html[data-theme="dark"] .guest-card {
    background: rgba(23, 28, 49, .96);
    border-color: rgba(72, 83, 116, .86);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .28);
}

html[data-theme="dark"].guest-shell,
html[data-theme="dark"] .guest-shell {
    background: linear-gradient(135deg, #0a0d1b 0, #101427 56%, #17132e 100%);
}

html[data-theme="dark"] .rcp-tailwind .sidebar {
    background: rgba(15, 20, 38, .96);
    border-right-color: rgba(72, 83, 116, .75);
}

html[data-theme="dark"] .rcp-tailwind .topbar {
    background: rgba(16, 20, 39, .88);
    border-bottom-color: rgba(72, 83, 116, .75);
}

html[data-theme="dark"] .rcp-tailwind .brand-mark > div > div,
html[data-theme="dark"] .rcp-tailwind .topbar h1,
html[data-theme="dark"] .rcp-tailwind h1,
html[data-theme="dark"] .rcp-tailwind h2,
html[data-theme="dark"] .rcp-tailwind h3,
html[data-theme="dark"] .rcp-tailwind h4,
html[data-theme="dark"] .rcp-tailwind h5,
html[data-theme="dark"] .rcp-tailwind .stat-value,
html[data-theme="dark"] .rcp-tailwind .section-title h2,
html[data-theme="dark"] .rcp-tailwind .athlete-card h2,
html[data-theme="dark"] .rcp-tailwind .team-row h2,
html[data-theme="dark"] .rcp-tailwind .report-dl dd,
html[data-theme="dark"] .rcp-tailwind .report-metric-list strong {
    color: var(--rcp-ink);
}

html[data-theme="dark"] .rcp-tailwind .text-muted,
html[data-theme="dark"] .rcp-tailwind .muted,
html[data-theme="dark"] .rcp-tailwind .topbar span,
html[data-theme="dark"] .rcp-tailwind .brand-mark small,
html[data-theme="dark"] .rcp-tailwind .report-dl dt,
html[data-theme="dark"] .rcp-tailwind .report-metric-list span,
html[data-theme="dark"] .login-copy p {
    color: var(--rcp-muted) !important;
}

html[data-theme="dark"] .nav-section-label {
    color: #818da8;
}

html[data-theme="dark"] .rcp-tailwind .nav-link-app {
    color: #aeb8ce;
}

html[data-theme="dark"] .rcp-tailwind .nav-link-app .bi {
    background: rgba(255, 255, 255, .07);
    color: #bbaaff;
}

html[data-theme="dark"] .rcp-tailwind .nav-link-app:hover {
    background: rgba(155, 123, 255, .13);
    border-color: rgba(155, 123, 255, .32);
    color: #fff;
}

html[data-theme="dark"] .rcp-tailwind .nav-link-app.active {
    background: linear-gradient(135deg, #7b5cff, #29c7d0);
    color: #fff;
}

html[data-theme="dark"] .rcp-tailwind .sidebar-note,
html[data-theme="dark"] .planning-form-grid,
html[data-theme="dark"] .planning-section,
html[data-theme="dark"] .rcp-tailwind .manual-plan-box,
html[data-theme="dark"] .rcp-tailwind .continuity-plan-box,
html[data-theme="dark"] .rcp-tailwind .continuity-summary-box,
html[data-theme="dark"] .rcp-tailwind .evaluation-summary-box,
html[data-theme="dark"] .rcp-tailwind .microcycle-action-form,
html[data-theme="dark"] .rcp-tailwind .session-log-summary,
html[data-theme="dark"] .rcp-tailwind .platform-analysis-box,
html[data-theme="dark"] .rcp-tailwind .coach-pulse-note,
html[data-theme="dark"] .rcp-tailwind .report-metric-list div,
html[data-theme="dark"] .local-access-note,
html[data-theme="dark"] .chart-empty {
    background: rgba(255, 255, 255, .045);
    border-color: rgba(72, 83, 116, .82);
    color: var(--rcp-muted);
}

html[data-theme="dark"] .planning-section-heading {
    border-bottom-color: rgba(144, 157, 194, .22);
}

html[data-theme="dark"] .planning-section-heading strong {
    color: #f6f8ff;
}

html[data-theme="dark"] .planning-section-heading small {
    color: #aab5cf;
}

html[data-theme="dark"] .planning-builder-shell,
html[data-theme="dark"] .planning-builder-toolbar {
    background: rgba(255, 255, 255, .035);
    border-color: rgba(72, 83, 116, .82);
}

html[data-theme="dark"] .planning-builder-toolbar strong,
html[data-theme="dark"] .planning-step-nav a:hover,
html[data-theme="dark"] .planning-step-nav a:focus-visible {
    color: #f6f8ff;
}

html[data-theme="dark"] .planning-builder-toolbar small,
html[data-theme="dark"] .planning-step-nav a {
    color: #aab5cf;
}

html[data-theme="dark"] .planning-reference-heading strong {
    color: #f6f8ff;
}

html[data-theme="dark"] .planning-reference-heading small,
html[data-theme="dark"] .planning-data-origin {
    color: #aab5cf;
}

html[data-theme="dark"] .planning-reference-strip {
    background: rgba(123, 92, 255, .08);
    border-color: rgba(155, 123, 255, .28);
}

html[data-theme="dark"] .planning-data-origin {
    background: rgba(41, 199, 208, .08);
    border-color: rgba(41, 199, 208, .38);
}

html[data-theme="dark"] .planning-field .form-text {
    background: rgba(123, 92, 255, .10);
    border-left-color: rgba(155, 123, 255, .55);
}

html[data-theme="dark"] .attention-alert-alta {
    color: #ffadbd;
    background: rgba(228, 61, 103, .16);
    border-color: rgba(255, 125, 157, .38);
}

html[data-theme="dark"] .attention-alert-media {
    color: #ffdb8a;
    background: rgba(223, 157, 47, .17);
    border-color: rgba(255, 206, 104, .38);
}

html[data-theme="dark"] .attention-alert-baja {
    color: #a8ddff;
    background: rgba(46, 158, 232, .16);
    border-color: rgba(122, 201, 255, .38);
}

.athlete-report-intake {
    border-left: 4px solid #6f4df5;
    background: linear-gradient(135deg, rgba(111, 77, 245, .07), rgba(41, 199, 208, .06));
}

.athlete-report-intake-heading {
    align-items: flex-start;
    justify-content: space-between;
}

.athlete-report-intake-heading > div:first-child {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
}

.athlete-report-intake-heading p {
    margin: .2rem 0 0;
    color: var(--rcp-muted);
    font-size: .8rem;
    font-weight: 650;
}

.athlete-report-date {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .65rem;
    border-radius: 999px;
    background: rgba(111, 77, 245, .1);
    color: var(--rcp-violet);
    font-size: .75rem;
    font-weight: 850;
    white-space: nowrap;
}

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

.athlete-report-block {
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--rcp-line);
    border-radius: .85rem;
    background: rgba(255, 255, 255, .7);
}

.athlete-report-block-heading {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
    margin-bottom: .85rem;
}

.athlete-report-block-heading > div {
    min-width: 0;
    flex: 1;
}

.athlete-report-block-heading strong,
.athlete-report-block-heading small {
    display: block;
}

.athlete-report-block-heading strong {
    color: var(--rcp-ink);
    font-size: .9rem;
    font-weight: 950;
}

.athlete-report-block-heading small {
    overflow: hidden;
    margin-top: .12rem;
    color: var(--rcp-muted);
    font-size: .73rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.athlete-report-block-icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    border-radius: .6rem;
    background: rgba(111, 77, 245, .12);
    color: var(--rcp-violet);
}

.athlete-report-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
}

.athlete-report-metrics > div {
    min-width: 0;
    padding: .6rem .65rem;
    border: 1px solid rgba(143, 157, 190, .22);
    border-radius: .6rem;
    background: rgba(244, 246, 251, .72);
}

.athlete-report-metrics span,
.athlete-report-metrics small {
    display: block;
    color: var(--rcp-muted);
    font-size: .68rem;
    font-weight: 750;
}

.athlete-report-metrics strong {
    display: block;
    margin-top: .18rem;
    color: var(--rcp-ink);
    font-size: .86rem;
    font-weight: 950;
    overflow-wrap: anywhere;
}

.athlete-report-note {
    display: flex;
    gap: .45rem;
    margin-top: .75rem;
    padding: .65rem .75rem;
    border-left: 3px solid var(--rcp-accent);
    border-radius: 0 .6rem .6rem 0;
    background: rgba(52, 198, 207, .08);
    color: var(--rcp-ink);
    font-size: .78rem;
    line-height: 1.4;
}

.athlete-report-note > i {
    color: var(--rcp-accent);
}

html[data-theme="dark"] .athlete-report-intake {
    border-color: rgba(155, 123, 255, .6);
    background: linear-gradient(135deg, rgba(123, 92, 255, .12), rgba(41, 199, 208, .08));
}

html[data-theme="dark"] .athlete-report-block {
    border-color: rgba(72, 83, 116, .82);
    background: rgba(255, 255, 255, .04);
}

html[data-theme="dark"] .athlete-report-metrics > div {
    border-color: rgba(72, 83, 116, .72);
    background: rgba(255, 255, 255, .045);
}

html[data-theme="dark"] .athlete-report-block-heading strong,
html[data-theme="dark"] .athlete-report-metrics strong,
html[data-theme="dark"] .athlete-report-note {
    color: var(--rcp-ink);
}

html[data-theme="dark"] .athlete-report-date {
    background: rgba(123, 92, 255, .18);
    color: #cfc5ff;
}

@media (max-width: 760px) {
    .athlete-report-grid {
        grid-template-columns: 1fr;
    }

    .athlete-report-intake-heading {
        flex-direction: column;
    }

    .athlete-report-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .athlete-report-metrics {
        grid-template-columns: 1fr;
    }
}

html[data-theme="dark"] .planning-field-objective .form-select {
    background-color: rgba(255, 255, 255, .08);
    border-color: rgba(155, 123, 255, .42);
}

html[data-theme="dark"] .planning-field .form-text {
    color: #aab5cf;
}

html[data-theme="dark"] .planning-field-long-run-limit .input-group-text,
html[data-theme="dark"] .planning-field-weekly-limit .input-group-text {
    color: #c4cce0;
    background: rgba(255, 255, 255, .07);
    border-color: rgba(72, 83, 116, .9);
}

html[data-theme="dark"] .day-distribution-advice {
    background: rgba(41, 199, 208, .10);
    border-color: rgba(41, 199, 208, .28);
    color: #c6e8ee;
}

html[data-theme="dark"] .day-distribution-advice.is-warning {
    background: rgba(255, 193, 7, .11);
    border-color: rgba(255, 193, 7, .32);
    color: #f8dda2;
}

html[data-theme="dark"] .planning-field.is-muted .form-control,
html[data-theme="dark"] .planning-field.is-muted .form-select {
    background-color: rgba(255, 255, 255, .035);
}

html[data-theme="dark"] .preparatory-race-banner {
    background: linear-gradient(135deg, rgba(31, 191, 143, .12), rgba(41, 199, 208, .08));
    border-color: rgba(72, 83, 116, .82);
}

html[data-theme="dark"] .preparatory-race-banner strong {
    color: var(--rcp-ink);
}

html[data-theme="dark"] .preparatory-race-banner p {
    color: var(--rcp-muted);
}

html[data-theme="dark"] .evaluation-summary-grid span {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(72, 83, 116, .82);
    color: var(--rcp-ink);
}

html[data-theme="dark"] .athlete-team-chip {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(72, 83, 116, .82);
    color: var(--rcp-ink);
}

html[data-theme="dark"] .session-plan-metric {
    background: rgba(255, 255, 255, .055);
    border-color: rgba(72, 83, 116, .82);
    color: var(--rcp-muted);
}

html[data-theme="dark"] .session-plan-metric strong,
html[data-theme="dark"] .platform-analysis-box a {
    color: var(--rcp-ink);
}

html[data-theme="dark"] .pulse-alert-banner {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.16) 0%, rgba(13, 110, 253, 0.08) 100%) !important;
    border-left-color: #3d8bfd !important;
    border-color: rgba(61, 139, 253, 0.3) !important;
}

html[data-theme="dark"] .pulse-alert-banner .text-primary {
    color: #5fb9ff !important;
}

html[data-theme="dark"] .pulse-alert-banner .text-muted {
    color: var(--rcp-muted) !important;
}

html[data-theme="dark"] .pulse-feedback-card {
    background: linear-gradient(135deg, rgba(23, 28, 49, .98) 0%, rgba(20, 24, 42, .98) 100%) !important;
    border: 1px solid rgba(72, 83, 116, .8) !important;
    color: var(--rcp-ink) !important;
}

html[data-theme="dark"] .pulse-feedback-card .border-bottom {
    border-color: rgba(72, 83, 116, .5) !important;
}

html[data-theme="dark"] .pulse-feedback-card .badge.bg-light {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--rcp-ink) !important;
    border-color: rgba(72, 83, 116, .8) !important;
}

html[data-theme="dark"] .pulse-feedback-card .bg-light {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--rcp-ink) !important;
}

html[data-theme="dark"] .pulse-directive {
    color: var(--rcp-ink) !important;
}

html[data-theme="dark"] .next-week-banner {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.16) 0%, rgba(139, 92, 246, 0.14) 100%) !important;
    border: 1px solid rgba(14, 165, 233, 0.3) !important;
    color: var(--rcp-ink) !important;
}

html[data-theme="dark"] .next-week-banner .text-muted {
    color: var(--rcp-muted) !important;
}

html[data-theme="dark"] .checkups-panel {
    background: linear-gradient(135deg, rgba(111, 77, 245, 0.14), rgba(23, 28, 49, 0.98)) !important;
    border-left-color: var(--rcp-violet, #9b7bff) !important;
}

html[data-theme="dark"] .checkup-card {
    background: rgba(16, 20, 39, 0.75) !important;
    border-color: rgba(72, 83, 116, 0.7) !important;
    color: var(--rcp-ink) !important;
}

html[data-theme="dark"] .topbar-role-pill,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .rcp-tailwind .btn-soft-primary,
html[data-theme="dark"] .rcp-tailwind .btn-icon-soft {
    background: rgba(255, 255, 255, .07);
    border-color: rgba(93, 106, 143, .9);
    color: var(--rcp-ink) !important;
}

html[data-theme="dark"] .rcp-tailwind .btn-outline-primary {
    background: rgba(155, 123, 255, .14);
    border-color: rgba(155, 123, 255, .65);
    color: #c4b3ff !important;
}

html[data-theme="dark"] .rcp-tailwind .btn-outline-primary:hover {
    background: rgba(155, 123, 255, .28);
    border-color: #9b7bff;
    color: #ffffff !important;
}

html[data-theme="dark"] .rcp-tailwind .btn-outline-success {
    background: rgba(54, 211, 158, .14);
    border-color: rgba(54, 211, 158, .65);
    color: #6ee7b7 !important;
}

html[data-theme="dark"] .rcp-tailwind .btn-outline-success:hover {
    background: rgba(54, 211, 158, .28);
    border-color: #36d39e;
    color: #ffffff !important;
}

html[data-theme="dark"] .rcp-tailwind .btn-outline-secondary {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(148, 163, 184, .5);
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .rcp-tailwind .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(155, 123, 255, .5);
    color: #ffffff !important;
}

html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .rcp-tailwind .btn-soft-primary:hover,
html[data-theme="dark"] .rcp-tailwind .btn-icon-soft:hover {
    background: rgba(155, 123, 255, .15);
    border-color: rgba(155, 123, 255, .45);
    color: #fff !important;
}

html[data-theme="dark"] .rcp-tailwind .btn-light {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .18);
    color: #fff;
}

html[data-theme="dark"] .rcp-tailwind .form-label {
    color: #bdc7dc;
}

html[data-theme="dark"] .rcp-tailwind .form-control,
html[data-theme="dark"] .rcp-tailwind .form-select {
    background-color: rgba(255, 255, 255, .055);
    border-color: rgba(93, 106, 143, .82);
    color: var(--rcp-ink);
    color-scheme: dark;
}

html[data-theme="dark"] .rcp-tailwind .input-group-text,
html[data-theme="dark"] .rcp-tailwind .page-link,
html[data-theme="dark"] .rcp-tailwind .page-item.disabled .page-link,
html[data-theme="dark"] .rcp-tailwind .badge.text-bg-light {
    background: rgba(255, 255, 255, .07) !important;
    border-color: rgba(93, 106, 143, .82);
    color: var(--rcp-ink) !important;
}

html[data-theme="dark"] .rcp-tailwind .page-link:hover,
html[data-theme="dark"] .rcp-tailwind .page-item.active .page-link {
    background: var(--rcp-violet) !important;
    border-color: var(--rcp-violet);
    color: #fff !important;
}

html[data-theme="dark"] .rcp-tailwind .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23bdc7dc' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

html[data-theme="dark"] .rcp-tailwind .form-select option,
html[data-theme="dark"] .rcp-tailwind .form-select optgroup {
    background-color: #171c31;
    color: #f5f7fb;
}

html[data-theme="dark"] .rcp-tailwind .form-select option:checked {
    background-color: #6f4df5;
    color: #ffffff;
}

html[data-theme="dark"] .rcp-tailwind .form-select option:disabled {
    color: #818da8;
}

html[data-theme="dark"] .rcp-tailwind .form-control::placeholder {
    color: #828da8;
}

html[data-theme="dark"] .rcp-tailwind .form-control:focus,
html[data-theme="dark"] .rcp-tailwind .form-select:focus {
    background-color: rgba(255, 255, 255, .08);
    border-color: var(--rcp-violet);
    box-shadow: 0 0 0 .2rem rgba(155, 123, 255, .18);
}

html[data-theme="dark"] .field-icon-wrap .bi {
    color: #9aa7c1;
}

html[data-theme="dark"] .rcp-tailwind .table thead th {
    background: rgba(255, 255, 255, .065);
    color: #aeb8ce;
    border-bottom-color: rgba(72, 83, 116, .86);
}

html[data-theme="dark"] .rcp-tailwind .table > :not(caption) > * > * {
    color: var(--rcp-ink);
    border-bottom-color: rgba(72, 83, 116, .65);
}

html[data-theme="dark"] .rcp-tailwind .table tbody tr:hover {
    background: rgba(255, 255, 255, .045);
}

html[data-theme="dark"] .rcp-tailwind .status-pill {
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

html[data-theme="dark"] .rcp-tailwind .status-borrador {
    background: rgba(155, 123, 255, .20) !important;
    border-color: rgba(155, 123, 255, .42) !important;
    color: #dcd3ff !important;
}

html[data-theme="dark"] .rcp-tailwind .status-publicado,
html[data-theme="dark"] .rcp-tailwind .status-completado {
    background: rgba(54, 211, 158, .18) !important;
    border-color: rgba(54, 211, 158, .42) !important;
    color: #a7f3d0 !important;
}

html[data-theme="dark"] .rcp-tailwind .status-pendiente {
    background: rgba(242, 184, 75, .18) !important;
    border-color: rgba(242, 184, 75, .42) !important;
    color: #fde68a !important;
}

html[data-theme="dark"] .rcp-tailwind .status-parcial,
html[data-theme="dark"] .rcp-tailwind .status-reprogramado {
    background: rgba(95, 185, 255, .18) !important;
    border-color: rgba(95, 185, 255, .42) !important;
    color: #bfdbfe !important;
}

html[data-theme="dark"] .rcp-tailwind .status-no-realizado,
html[data-theme="dark"] .rcp-tailwind .status-suspendido {
    background: rgba(255, 102, 149, .18) !important;
    border-color: rgba(255, 102, 149, .42) !important;
    color: #fecdd3 !important;
}

html[data-theme="dark"] .rcp-tailwind .status-archivado {
    background: rgba(148, 163, 184, .16) !important;
    border-color: rgba(148, 163, 184, .38) !important;
    color: #dbe3ef !important;
}

html[data-theme="dark"] .rcp-tailwind .accordion-item,
html[data-theme="dark"] .rcp-tailwind .accordion-button,
html[data-theme="dark"] .rcp-tailwind .accordion-body {
    background: rgba(23, 28, 49, .96);
    border-color: rgba(72, 83, 116, .86);
    color: var(--rcp-ink);
}

html[data-theme="dark"] .rcp-tailwind .accordion-button:not(.collapsed) {
    background: rgba(155, 123, 255, .12);
    color: #fff;
}

html[data-theme="dark"] .rcp-tailwind .alert-success {
    background: rgba(31, 191, 143, .14);
    border-color: rgba(31, 191, 143, .32);
    color: #a5f2d5;
}

html[data-theme="dark"] .rcp-tailwind .alert-danger {
    background: rgba(255, 102, 149, .14);
    border-color: rgba(255, 102, 149, .34);
    color: #ffc0d1;
}

html[data-theme="dark"] .rcp-tailwind .alert-warning {
    background: rgba(242, 184, 75, .14);
    border-color: rgba(242, 184, 75, .34);
    color: #ffe1a8;
}

html[data-theme="dark"] .guest-shell {
    background: linear-gradient(135deg, #0c1021 0, #11172c 56%, #17122b 100%);
}

html[data-theme="dark"] .guest-form {
    background: rgba(23, 28, 49, .96);
}

html[data-theme="dark"] .guest-visual {
    background:
        linear-gradient(135deg, rgba(12, 16, 33, .98), rgba(89, 64, 205, .94) 54%, rgba(36, 172, 181, .88));
}

html[data-theme="dark"] .rcp-tailwind .hero-panel {
    background:
        linear-gradient(135deg, rgba(12, 16, 33, .98), rgba(89, 64, 205, .94) 54%, rgba(36, 172, 181, .88));
}

html[data-theme="dark"] .rcp-tailwind .progress {
    background: rgba(255, 255, 255, .08);
}

html[data-theme="dark"] .team-stats span {
    background: rgba(255, 255, 255, .07);
    color: var(--rcp-muted);
}

/* =========================================================
   COMPREHENSIVE DARK THEME RULES FOR ALL VIEWS & ROLES
   ========================================================= */

/* Surface & Variable synchronization */
html[data-theme="dark"],
html[data-bs-theme="dark"],
[data-theme="dark"],
.theme-dark {
    --surface: #171c31;
    --soft: rgba(255, 255, 255, .05);
    --border: rgba(72, 83, 116, .86);
    --muted: #aab5cc;
    --bs-body-bg: #101427;
    --bs-body-color: #f6f8ff;
    --bs-border-color: rgba(72, 83, 116, .65);
    --bs-secondary-bg: #171c31;
    --bs-tertiary-bg: rgba(255, 255, 255, .04);
}

/* 1. Timeline items and dates (Athletes dossier, Coach dashboard) */
html[data-theme="dark"] .timeline-item,
[data-theme="dark"] .timeline-item,
.theme-dark .timeline-item {
    background: rgba(23, 28, 49, .96) !important;
    border-color: rgba(72, 83, 116, .86) !important;
    color: var(--rcp-ink, #f6f8ff) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
html[data-theme="dark"] .timeline-item strong,
[data-theme="dark"] .timeline-item strong,
.theme-dark .timeline-item strong {
    color: var(--rcp-ink, #f6f8ff) !important;
}
html[data-theme="dark"] .timeline-date,
[data-theme="dark"] .timeline-date,
.theme-dark .timeline-date {
    background: rgba(242, 184, 75, .18) !important;
    color: #fde68a !important;
    border: 1px solid rgba(242, 184, 75, .32);
}

/* 2. Action cards (Admin & Coach dashboards, maintenance, recalculate) */
html[data-theme="dark"] .action-card,
[data-theme="dark"] .action-card,
.theme-dark .action-card {
    background: rgba(23, 28, 49, .96) !important;
    border-color: rgba(72, 83, 116, .86) !important;
    color: var(--rcp-ink, #f6f8ff) !important;
}
html[data-theme="dark"] .action-card:hover,
[data-theme="dark"] .action-card:hover,
.theme-dark .action-card:hover {
    box-shadow: 0 14px 30px rgba(0, 0, 0, .45) !important;
    border-color: var(--rcp-violet, #9b7bff) !important;
}
html[data-theme="dark"] .action-icon,
[data-theme="dark"] .action-icon,
.theme-dark .action-icon {
    background: rgba(155, 123, 255, .18) !important;
    color: #c4b3ff !important;
}

/* 3. Segment Control */
html[data-theme="dark"] .segment-control,
[data-theme="dark"] .segment-control,
.theme-dark .segment-control {
    background: rgba(23, 28, 49, .96) !important;
    border-color: rgba(72, 83, 116, .86) !important;
}
html[data-theme="dark"] .segment-control button,
[data-theme="dark"] .segment-control button,
.theme-dark .segment-control button {
    color: var(--rcp-muted, #aab5cc);
}
html[data-theme="dark"] .segment-control button.active,
[data-theme="dark"] .segment-control button.active,
.theme-dark .segment-control button.active {
    background: var(--rcp-violet, #6f4df5) !important;
    color: #ffffff !important;
}

/* 4. Plan flow selection cards (Athletes show: Continuidad vs Ciclo de cero) */
.plan-flow-card {
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
html[data-theme="dark"] .plan-flow-card,
[data-theme="dark"] .plan-flow-card,
.theme-dark .plan-flow-card {
    background: rgba(255, 255, 255, .04) !important;
    border-color: rgba(72, 83, 116, .86) !important;
    color: var(--rcp-ink, #f6f8ff) !important;
}
html[data-theme="dark"] .plan-flow-card:hover,
[data-theme="dark"] .plan-flow-card:hover,
.theme-dark .plan-flow-card:hover {
    background: rgba(255, 255, 255, .08) !important;
}
html[data-theme="dark"] .plan-flow-card.flow-selected,
[data-theme="dark"] .plan-flow-card.flow-selected,
.theme-dark .plan-flow-card.flow-selected {
    border-color: var(--rcp-violet, #9b7bff) !important;
    background: rgba(111, 77, 245, 0.16) !important;
    box-shadow: 0 4px 18px rgba(111, 77, 245, 0.22) !important;
}
html[data-theme="dark"] .plan-flow-mode-wrapper,
[data-theme="dark"] .plan-flow-mode-wrapper,
.theme-dark .plan-flow-mode-wrapper {
    background: rgba(255, 255, 255, 0.035) !important;
    border-color: rgba(72, 83, 116, 0.75) !important;
}

/* 5. Button styles in Dark Mode (Outline & Light buttons) */
html[data-theme="dark"] .btn-outline-primary,
[data-theme="dark"] .btn-outline-primary,
.theme-dark .btn-outline-primary {
    background: rgba(155, 123, 255, 0.08) !important;
    border-color: #9b7bff !important;
    color: #c4b3ff !important;
}
html[data-theme="dark"] .btn-outline-primary:hover,
html[data-theme="dark"] .btn-outline-primary:focus,
[data-theme="dark"] .btn-outline-primary:hover,
[data-theme="dark"] .btn-outline-primary:focus,
.theme-dark .btn-outline-primary:hover,
.theme-dark .btn-outline-primary:focus {
    background: rgba(155, 123, 255, 0.24) !important;
    border-color: #b59dff !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .btn-outline-secondary,
[data-theme="dark"] .btn-outline-secondary,
.theme-dark .btn-outline-secondary {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(144, 157, 194, 0.45) !important;
    color: #c0cbdf !important;
}
html[data-theme="dark"] .btn-outline-secondary:hover,
html[data-theme="dark"] .btn-outline-secondary:focus,
[data-theme="dark"] .btn-outline-secondary:hover,
[data-theme="dark"] .btn-outline-secondary:focus,
.theme-dark .btn-outline-secondary:hover,
.theme-dark .btn-outline-secondary:focus {
    background: rgba(144, 157, 194, 0.16) !important;
    border-color: rgba(144, 157, 194, 0.75) !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .btn-outline-success,
[data-theme="dark"] .btn-outline-success,
.theme-dark .btn-outline-success {
    background: rgba(54, 211, 158, 0.08) !important;
    border-color: #36d39e !important;
    color: #6ee7b7 !important;
}
html[data-theme="dark"] .btn-outline-success:hover,
html[data-theme="dark"] .btn-outline-success:focus,
[data-theme="dark"] .btn-outline-success:hover,
[data-theme="dark"] .btn-outline-success:focus,
.theme-dark .btn-outline-success:hover,
.theme-dark .btn-outline-success:focus {
    background: rgba(54, 211, 158, 0.22) !important;
    border-color: #6ee7b7 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .btn-outline-danger,
[data-theme="dark"] .btn-outline-danger,
.theme-dark .btn-outline-danger {
    background: rgba(255, 102, 140, 0.08) !important;
    border-color: #ff668c !important;
    color: #fca5a5 !important;
}
html[data-theme="dark"] .btn-outline-danger:hover,
html[data-theme="dark"] .btn-outline-danger:focus,
[data-theme="dark"] .btn-outline-danger:hover,
[data-theme="dark"] .btn-outline-danger:focus,
.theme-dark .btn-outline-danger:hover,
.theme-dark .btn-outline-danger:focus {
    background: rgba(255, 102, 140, 0.22) !important;
    border-color: #ff8fa9 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .btn-light,
[data-theme="dark"] .btn-light,
.theme-dark .btn-light {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #f6f8ff !important;
}
html[data-theme="dark"] .btn-light:hover,
html[data-theme="dark"] .btn-light:focus,
[data-theme="dark"] .btn-light:hover,
[data-theme="dark"] .btn-light:focus,
.theme-dark .btn-light:hover,
.theme-dark .btn-light:focus {
    background: rgba(255, 255, 255, 0.22) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
}

/* 6. Text utilities - prevent dark gray/black text on dark panels */
html[data-theme="dark"] .text-dark:not(.btn-warning):not(.badge-warning):not(.text-bg-warning):not(.bg-warning):not(.alert-warning *):not(.badge.text-bg-warning *),
[data-theme="dark"] .text-dark:not(.btn-warning):not(.badge-warning):not(.text-bg-warning):not(.bg-warning):not(.alert-warning *):not(.badge.text-bg-warning *),
.theme-dark .text-dark:not(.btn-warning):not(.badge-warning):not(.text-bg-warning):not(.bg-warning):not(.alert-warning *):not(.badge.text-bg-warning *) {
    color: var(--rcp-ink, #f6f8ff) !important;
}
html[data-theme="dark"] .text-dark-emphasis,
[data-theme="dark"] .text-dark-emphasis,
.theme-dark .text-dark-emphasis {
    color: var(--rcp-muted, #aab5cc) !important;
}

/* 7. Background utilities - convert light/white containers into translucent dark surfaces */
html[data-theme="dark"] .bg-light,
html[data-theme="dark"] .bg-light-subtle,
html[data-theme="dark"] .bg-white:not(.bg-opacity-25),
[data-theme="dark"] .bg-light,
[data-theme="dark"] .bg-light-subtle,
[data-theme="dark"] .bg-white:not(.bg-opacity-25),
.theme-dark .bg-light,
.theme-dark .bg-light-subtle,
.theme-dark .bg-white:not(.bg-opacity-25) {
    background-color: rgba(255, 255, 255, 0.045) !important;
    color: var(--rcp-ink, #f6f8ff);
}

/* 8. Badges (Light, white, text-bg-light) */
html[data-theme="dark"] .badge.bg-light,
html[data-theme="dark"] .badge.bg-white,
html[data-theme="dark"] .badge.text-bg-light,
[data-theme="dark"] .badge.bg-light,
[data-theme="dark"] .badge.bg-white,
[data-theme="dark"] .badge.text-bg-light,
.theme-dark .badge.bg-light,
.theme-dark .badge.bg-white,
.theme-dark .badge.text-bg-light {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(93, 106, 143, 0.82) !important;
    color: var(--rcp-ink, #f6f8ff) !important;
}

/* 9. Modals & Dialogs (Skip session modal, tracking modal, reset password modal) */
html[data-theme="dark"] .modal-content,
[data-theme="dark"] .modal-content,
.theme-dark .modal-content {
    background-color: #171c31 !important;
    border: 1px solid rgba(72, 83, 116, 0.86) !important;
    color: var(--rcp-ink, #f6f8ff) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55) !important;
}
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer,
[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer,
.theme-dark .modal-header,
.theme-dark .modal-footer {
    border-color: rgba(72, 83, 116, 0.65) !important;
}
html[data-theme="dark"] .modal-header.bg-light,
html[data-theme="dark"] .modal-footer.bg-light,
[data-theme="dark"] .modal-header.bg-light,
[data-theme="dark"] .modal-footer.bg-light,
.theme-dark .modal-header.bg-light,
.theme-dark .modal-footer.bg-light {
    background-color: rgba(255, 255, 255, 0.035) !important;
}
html[data-theme="dark"] .btn-close,
[data-theme="dark"] .btn-close,
.theme-dark .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* 10. Cards, Card Headers/Footers & List groups */
html[data-theme="dark"] .card,
[data-theme="dark"] .card,
.theme-dark .card {
    background-color: rgba(23, 28, 49, 0.96) !important;
    border-color: rgba(72, 83, 116, 0.86) !important;
    color: var(--rcp-ink, #f6f8ff);
}
html[data-theme="dark"] .card-header,
[data-theme="dark"] .card-header,
.theme-dark .card-header {
    background-color: rgba(255, 255, 255, 0.035) !important;
    border-bottom-color: rgba(72, 83, 116, 0.75) !important;
    color: var(--rcp-ink, #f6f8ff);
}
html[data-theme="dark"] .card-footer,
[data-theme="dark"] .card-footer,
.theme-dark .card-footer {
    background-color: rgba(255, 255, 255, 0.025) !important;
    border-top-color: rgba(72, 83, 116, 0.75) !important;
    color: var(--rcp-ink, #f6f8ff);
}
html[data-theme="dark"] .list-group-item,
[data-theme="dark"] .list-group-item,
.theme-dark .list-group-item {
    background-color: rgba(23, 28, 49, 0.96) !important;
    border-color: rgba(72, 83, 116, 0.75) !important;
    color: var(--rcp-ink, #f6f8ff) !important;
}

/* 11. Dropdown menus */
html[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .dropdown-menu,
.theme-dark .dropdown-menu {
    background-color: #171c31 !important;
    border-color: rgba(72, 83, 116, 0.86) !important;
    color: var(--rcp-ink, #f6f8ff) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45) !important;
}
html[data-theme="dark"] .dropdown-item,
[data-theme="dark"] .dropdown-item,
.theme-dark .dropdown-item {
    color: #c9d2e5 !important;
}
html[data-theme="dark"] .dropdown-item:hover,
html[data-theme="dark"] .dropdown-item:focus,
[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus,
.theme-dark .dropdown-item:hover,
.theme-dark .dropdown-item:focus {
    background-color: rgba(111, 77, 245, 0.2) !important;
    color: #ffffff !important;
}

/* 12. Week grid days & rest days */
html[data-theme="dark"] .day-cell,
[data-theme="dark"] .day-cell,
.theme-dark .day-cell {
    background: rgba(23, 28, 49, 0.96) !important;
    border-color: rgba(72, 83, 116, 0.86) !important;
    color: var(--rcp-ink, #f6f8ff);
}
html[data-theme="dark"] .training-rest-row,
[data-theme="dark"] .training-rest-row,
.theme-dark .training-rest-row {
    background: linear-gradient(135deg, rgba(23, 28, 49, 0.95) 0%, rgba(13, 40, 36, 0.85) 100%) !important;
    border: 1.5px dashed rgba(54, 211, 158, 0.45) !important;
}
html[data-theme="dark"] .training-rest-date,
[data-theme="dark"] .training-rest-date,
.theme-dark .training-rest-date {
    background: rgba(54, 211, 158, 0.16) !important;
    color: #6ee7b7 !important;
    border: 1px solid rgba(54, 211, 158, 0.35) !important;
}
html[data-theme="dark"] .training-rest-tip,
[data-theme="dark"] .training-rest-tip,
.theme-dark .training-rest-tip {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(54, 211, 158, 0.25) !important;
    color: #d1d5db !important;
}
html[data-theme="dark"] .rest-day-checklist span,
[data-theme="dark"] .rest-day-checklist span,
.theme-dark .rest-day-checklist span {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(54, 211, 158, 0.25) !important;
    color: #5eead4 !important;
}

/* 13. Topbar athlete profile pill */
html[data-theme="dark"] .topbar-athlete-profile,
[data-theme="dark"] .topbar-athlete-profile,
.theme-dark .topbar-athlete-profile {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(72, 83, 116, 0.82) !important;
    color: #f6f8ff !important;
}

/* 14. Alerts (Info & Light) */
html[data-theme="dark"] .alert-info,
[data-theme="dark"] .alert-info,
.theme-dark .alert-info {
    background-color: rgba(46, 158, 232, 0.14) !important;
    border-color: rgba(46, 158, 232, 0.32) !important;
    color: #bce6ff !important;
}
html[data-theme="dark"] .alert-light,
[data-theme="dark"] .alert-light,
.theme-dark .alert-light {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(72, 83, 116, 0.75) !important;
    color: var(--rcp-muted, #aab5cc) !important;
}

/* 15. Form controls check & radios */
html[data-theme="dark"] .form-check-input,
[data-theme="dark"] .form-check-input,
.theme-dark .form-check-input {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(93, 106, 143, 0.82);
}
html[data-theme="dark"] .form-check-input:checked,
[data-theme="dark"] .form-check-input:checked,
.theme-dark .form-check-input:checked {
    background-color: #6f4df5;
    border-color: #6f4df5;
}
html[data-theme="dark"] .form-check-label,
[data-theme="dark"] .form-check-label,
.theme-dark .form-check-label {
    color: var(--rcp-ink, #f6f8ff);
}

/* 16. Borders harmonization */
html[data-theme="dark"] .border,
html[data-theme="dark"] .border-top,
html[data-theme="dark"] .border-bottom,
html[data-theme="dark"] .border-start,
html[data-theme="dark"] .border-end,
[data-theme="dark"] .border,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom,
[data-theme="dark"] .border-start,
[data-theme="dark"] .border-end,
.theme-dark .border,
.theme-dark .border-top,
.theme-dark .border-bottom,
.theme-dark .border-start,
.theme-dark .border-end {
    border-color: rgba(72, 83, 116, 0.65) !important;
}

/* 17. Table dark defaults */
html[data-theme="dark"] .table,
[data-theme="dark"] .table,
.theme-dark .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--rcp-ink, #f6f8ff);
    --bs-table-border-color: rgba(72, 83, 116, 0.65);
    color: var(--rcp-ink, #f6f8ff);
}

html[data-theme="dark"] .athlete-team-chip,
[data-theme="dark"] .athlete-team-chip,
.theme-dark .athlete-team-chip {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(72, 83, 116, 0.75) !important;
    color: var(--rcp-ink, #f6f8ff) !important;
}

@media (max-width: 640px) {
    .guest-theme-toggle {
        position: static;
        align-self: flex-end;
        margin-bottom: .75rem;
    }
}

@media (max-width: 992px) {
    .team-actions {
        justify-items: start;
        text-align: left !important;
    }

    .team-action-buttons {
        justify-content: flex-start;
    }
}

.athlete-hero-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: min(100%, 360px);
}

.athlete-profile-photo {
    width: 4.75rem;
    height: 4.75rem;
    flex: 0 0 4.75rem;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, .72);
    border-radius: 1.25rem;
    background: linear-gradient(135deg, var(--rcp-violet), var(--rcp-coral));
    color: #fff;
    font-size: 1.25rem;
    font-weight: 900;
    box-shadow: 0 18px 34px rgba(0, 0, 0, .16);
}

.athlete-profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.athlete-profile-photo-large {
    width: 7.4rem;
    height: 7.4rem;
    border-color: #fff;
    border-radius: 1.4rem;
    font-size: 2rem;
}

.athlete-self-card {
    position: sticky;
    top: 96px;
}

.profile-readonly-list {
    display: grid;
    gap: .65rem;
}

.profile-readonly-list div {
    display: grid;
    gap: .2rem;
    padding: .75rem;
    border: 1px solid #dce5f2;
    border-radius: .85rem;
    background: #f9fbff;
}

.profile-readonly-list span {
    color: #69738c;
    font-size: .78rem;
    font-weight: 900;
}

.profile-readonly-list strong {
    color: var(--rcp-ink);
    overflow-wrap: anywhere;
}

.athlete-social-box {
    padding: .85rem;
    border: 1px solid #dce5f2;
    border-radius: .9rem;
    background: #f9fbff;
}

.athlete-social-box p {
    margin: 0 0 .7rem;
    color: #69738c;
    font-weight: 700;
}

.social-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.social-link-list span {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    max-width: 100%;
    padding: .4rem .65rem;
    border: 1px solid #dbe4f0;
    border-radius: 999px;
    background: #fff;
    color: var(--rcp-ink);
    font-size: .82rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.social-link-list .bi {
    color: var(--rcp-violet);
}

.distance-summary-row .stat-card {
    min-height: 124px;
}

.distance-stat-card small {
    display: block;
    padding-left: .72rem;
    color: #8792aa;
    font-size: .78rem;
    font-weight: 800;
}

.dashboard-quick-actions {
    justify-content: flex-end;
}

/* Athlete Identity Banner Component */
.athlete-identity-banner {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-left: 5px solid #6f4df5 !important;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(111, 77, 245, 0.08);
}

.athlete-identity-banner .athlete-banner-title,
.athlete-identity-banner h1,
.athlete-identity-banner h2 {
    color: #1e293b;
}

.athlete-identity-banner .athlete-banner-week-highlight {
    color: #1e293b;
}

.athlete-identity-banner .athlete-team-chip {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
}

.athlete-identity-banner .athlete-team-chip .athlete-team-name {
    color: #334155;
}

/* Banner Quick Action Buttons (Light Mode) */
.athlete-identity-banner .dashboard-quick-actions .btn-outline-primary {
    background: #ffffff;
    border-color: #cfc1ff;
    color: #6f4df5;
}
.athlete-identity-banner .dashboard-quick-actions .btn-outline-primary:hover {
    background: #f8f6ff;
    border-color: #6f4df5;
    color: #5935d6;
}
.athlete-identity-banner .dashboard-quick-actions .btn-outline-success {
    background: #ffffff;
    border-color: #86efac;
    color: #16a34a;
}
.athlete-identity-banner .dashboard-quick-actions .btn-outline-success:hover {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #15803d;
}
.athlete-identity-banner .dashboard-quick-actions .btn-outline-secondary {
    background: #ffffff;
    border-color: #dfe5f1;
    color: #475569;
}
.athlete-identity-banner .dashboard-quick-actions .btn-outline-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #1e293b;
}

/* Banner and Actions (Dark Mode) */
html[data-theme="dark"] .athlete-identity-banner,
[data-theme="dark"] .athlete-identity-banner,
.theme-dark .athlete-identity-banner {
    background: linear-gradient(135deg, rgba(23, 28, 49, 0.98) 0%, rgba(30, 36, 61, 0.98) 100%) !important;
    border-color: rgba(72, 83, 116, 0.86) !important;
    border-left: 5px solid #9b7bff !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .athlete-identity-banner .athlete-banner-title,
[data-theme="dark"] .athlete-identity-banner .athlete-banner-title,
.theme-dark .athlete-identity-banner .athlete-banner-title,
html[data-theme="dark"] .athlete-identity-banner h1,
[data-theme="dark"] .athlete-identity-banner h1,
.theme-dark .athlete-identity-banner h1,
html[data-theme="dark"] .athlete-identity-banner h2,
[data-theme="dark"] .athlete-identity-banner h2,
.theme-dark .athlete-identity-banner h2 {
    color: #f6f8ff !important;
}

html[data-theme="dark"] .athlete-identity-banner .athlete-banner-week-highlight,
[data-theme="dark"] .athlete-identity-banner .athlete-banner-week-highlight,
.theme-dark .athlete-identity-banner .athlete-banner-week-highlight {
    color: #f6f8ff !important;
}

html[data-theme="dark"] .athlete-identity-banner .text-dark,
[data-theme="dark"] .athlete-identity-banner .text-dark,
.theme-dark .athlete-identity-banner .text-dark {
    color: #f6f8ff !important;
}

html[data-theme="dark"] .athlete-identity-banner .text-muted,
[data-theme="dark"] .athlete-identity-banner .text-muted,
.theme-dark .athlete-identity-banner .text-muted,
html[data-theme="dark"] .athlete-identity-banner .text-muted span,
[data-theme="dark"] .athlete-identity-banner .text-muted span,
.theme-dark .athlete-identity-banner .text-muted span {
    color: #aab5cc !important;
}

html[data-theme="dark"] .athlete-identity-banner .athlete-team-chip,
[data-theme="dark"] .athlete-identity-banner .athlete-team-chip,
.theme-dark .athlete-identity-banner .athlete-team-chip {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(93, 106, 143, 0.6) !important;
    color: #f6f8ff !important;
}

html[data-theme="dark"] .athlete-identity-banner .athlete-team-chip .athlete-team-name,
[data-theme="dark"] .athlete-identity-banner .athlete-team-chip .athlete-team-name,
.theme-dark .athlete-identity-banner .athlete-team-chip .athlete-team-name {
    color: #f6f8ff !important;
}

html[data-theme="dark"] .athlete-identity-banner .badge.bg-light.text-secondary,
[data-theme="dark"] .athlete-identity-banner .badge.bg-light.text-secondary,
.theme-dark .athlete-identity-banner .badge.bg-light.text-secondary {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #c4cce0 !important;
    border-color: rgba(93, 106, 143, 0.6) !important;
}

html[data-theme="dark"] .athlete-identity-banner .dashboard-quick-actions .btn-outline-primary,
[data-theme="dark"] .athlete-identity-banner .dashboard-quick-actions .btn-outline-primary,
.theme-dark .athlete-identity-banner .dashboard-quick-actions .btn-outline-primary {
    background: rgba(155, 123, 255, 0.16) !important;
    border-color: rgba(155, 123, 255, 0.65) !important;
    color: #d8cdff !important;
}

html[data-theme="dark"] .athlete-identity-banner .dashboard-quick-actions .btn-outline-primary:hover,
[data-theme="dark"] .athlete-identity-banner .dashboard-quick-actions .btn-outline-primary:hover,
.theme-dark .athlete-identity-banner .dashboard-quick-actions .btn-outline-primary:hover {
    background: rgba(155, 123, 255, 0.32) !important;
    border-color: #9b7bff !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .athlete-identity-banner .dashboard-quick-actions .btn-outline-success,
[data-theme="dark"] .athlete-identity-banner .dashboard-quick-actions .btn-outline-success,
.theme-dark .athlete-identity-banner .dashboard-quick-actions .btn-outline-success {
    background: rgba(54, 211, 158, 0.16) !important;
    border-color: rgba(54, 211, 158, 0.65) !important;
    color: #6ee7b7 !important;
}

html[data-theme="dark"] .athlete-identity-banner .dashboard-quick-actions .btn-outline-success:hover,
[data-theme="dark"] .athlete-identity-banner .dashboard-quick-actions .btn-outline-success:hover,
.theme-dark .athlete-identity-banner .dashboard-quick-actions .btn-outline-success:hover {
    background: rgba(54, 211, 158, 0.32) !important;
    border-color: #36d39e !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .athlete-identity-banner .dashboard-quick-actions .btn-outline-secondary,
[data-theme="dark"] .athlete-identity-banner .dashboard-quick-actions .btn-outline-secondary,
.theme-dark .athlete-identity-banner .dashboard-quick-actions .btn-outline-secondary {
    background: rgba(255, 255, 255, 0.09) !important;
    border-color: rgba(148, 163, 184, 0.5) !important;
    color: #f1f5f9 !important;
}

html[data-theme="dark"] .athlete-identity-banner .dashboard-quick-actions .btn-outline-secondary:hover,
[data-theme="dark"] .athlete-identity-banner .dashboard-quick-actions .btn-outline-secondary:hover,
.theme-dark .athlete-identity-banner .dashboard-quick-actions .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(155, 123, 255, 0.6) !important;
    color: #ffffff !important;
}
/* Replicate Plan Banner (Light Mode) */
.replicate-plan-banner {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-left: 4px solid var(--rcp-violet, #6f4df5) !important;
    background: linear-gradient(135deg, rgba(111, 77, 245, 0.04) 0%, #ffffff 100%);
    border-radius: 12px;
}

.replicate-plan-banner .replicate-icon-wrap {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(111, 77, 245, 0.1);
    color: var(--rcp-violet, #6f4df5);
    font-size: 1.25rem;
}

.replicate-plan-banner .replicate-title {
    color: #1e293b;
}

.replicate-plan-banner .choice-check {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.replicate-plan-banner .choice-check:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Replicate Plan Banner (Dark Mode) */
html[data-theme="dark"] .replicate-plan-banner,
[data-theme="dark"] .replicate-plan-banner,
.theme-dark .replicate-plan-banner {
    background: linear-gradient(135deg, rgba(23, 28, 49, 0.98) 0%, rgba(30, 36, 61, 0.98) 100%) !important;
    border: 1px solid rgba(72, 83, 116, 0.86) !important;
    border-left: 4px solid #9b7bff !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .replicate-plan-banner .replicate-icon-wrap,
[data-theme="dark"] .replicate-plan-banner .replicate-icon-wrap,
.theme-dark .replicate-plan-banner .replicate-icon-wrap {
    background: rgba(155, 123, 255, 0.18) !important;
    color: #c4b3ff !important;
}

html[data-theme="dark"] .replicate-plan-banner .replicate-title,
[data-theme="dark"] .replicate-plan-banner .replicate-title,
.theme-dark .replicate-plan-banner .replicate-title {
    color: #f6f8ff !important;
}

html[data-theme="dark"] .replicate-plan-banner .text-muted,
[data-theme="dark"] .replicate-plan-banner .text-muted,
.theme-dark .replicate-plan-banner .text-muted {
    color: #aab5cc !important;
}

html[data-theme="dark"] .replicate-plan-banner .choice-check,
[data-theme="dark"] .replicate-plan-banner .choice-check,
.theme-dark .replicate-plan-banner .choice-check {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(72, 83, 116, 0.82) !important;
    color: #f6f8ff !important;
}

html[data-theme="dark"] .replicate-plan-banner .choice-check strong,
[data-theme="dark"] .replicate-plan-banner .choice-check strong,
.theme-dark .replicate-plan-banner .choice-check strong {
    color: #f6f8ff !important;
}

html[data-theme="dark"] .replicate-plan-banner .choice-check:hover,
[data-theme="dark"] .replicate-plan-banner .choice-check:hover,
.theme-dark .replicate-plan-banner .choice-check:hover {
    background: rgba(155, 123, 255, 0.14) !important;
    border-color: rgba(155, 123, 255, 0.5) !important;
}

html[data-theme="dark"] .replicate-plan-banner .btn-outline-primary,
[data-theme="dark"] .replicate-plan-banner .btn-outline-primary,
.theme-dark .replicate-plan-banner .btn-outline-primary {
    background: rgba(155, 123, 255, 0.16) !important;
    border-color: rgba(155, 123, 255, 0.65) !important;
    color: #d8cdff !important;
}

html[data-theme="dark"] .replicate-plan-banner .btn-outline-primary:hover,
[data-theme="dark"] .replicate-plan-banner .btn-outline-primary:hover,
.theme-dark .replicate-plan-banner .btn-outline-primary:hover {
    background: rgba(155, 123, 255, 0.32) !important;
    border-color: #9b7bff !important;
    color: #ffffff !important;
}
/* =========================================================
   MEMBERSHIP PORTAL (ATHLETE) - LIGHT & DARK MODE SUPPORT
   ========================================================= */
.membership-portal {
    border-radius: 1rem;
    position: relative;
}

/* Status summary card */
.membership-info-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}
.membership-info-card .membership-date-value {
    color: #0f172a;
}
.membership-info-card .membership-rate-value {
    color: #6f4df5;
}

/* Extension / Renew card */
.membership-renew-card {
    background: #ffffff;
    border: 1.5px solid rgba(111, 77, 245, 0.22);
    box-shadow: 0 4px 18px rgba(111, 77, 245, 0.05);
}
.membership-renew-card .membership-card-title {
    color: #0f172a;
}

/* Month preset buttons */
.btn-month-preset {
    background: #f8faff;
    border: 2px solid #cbd5e1;
    color: #1e293b;
    border-radius: 0.75rem;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
    text-align: center;
    padding: 0.6rem 0.5rem;
}
.btn-month-preset .month-qty {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.25;
}
.btn-month-preset .month-price {
    font-size: 0.84rem;
    font-weight: 600;
    color: #64748b;
}
.btn-month-preset:hover {
    border-color: #6f4df5;
    background: rgba(111, 77, 245, 0.06);
    color: #1e293b;
}
.btn-month-preset:hover .month-qty {
    color: #6f4df5;
}
.btn-month-preset.active {
    background: linear-gradient(135deg, #6f4df5 0%, #5839d3 100%) !important;
    border-color: #5839d3 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(111, 77, 245, 0.35);
}
.btn-month-preset.active .month-qty {
    color: #ffffff !important;
}
/* Promotional gift badges */
.promo-badge-gift {
    position: absolute;
    top: -11px;
    right: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff !important;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.4);
    text-transform: uppercase;
    white-space: nowrap;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

/* Select Dropdown */
.membership-months-select {
    min-height: 48px;
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 0.75rem;
    font-size: 0.98rem;
    font-weight: 700;
}
.membership-months-select:focus {
    border-color: #6f4df5 !important;
    box-shadow: 0 0 0 0.2rem rgba(111, 77, 245, 0.2) !important;
}

/* Live preview box */
.membership-preview-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.membership-preview-box .preview-target-date {
    color: #059669;
}
.membership-preview-box .preview-total-price {
    color: #6f4df5;
}
.membership-preview-box .preview-explanation {
    color: #475569;
}
.membership-preview-box .preview-explanation strong {
    color: #0f172a;
}

/* Pending card */
.membership-pending-item {
    background: #fffbeb;
    border: 1.5px solid #fde68a;
}
.membership-pending-item h3 {
    color: #78350f;
}
.membership-pending-item .membership-pending-amount {
    color: #92400e;
}

/* =========================================================
   DARK MODE OVERRIDES FOR MEMBERSHIP PORTAL
   ========================================================= */
html[data-theme="dark"] .membership-portal,
[data-theme="dark"] .membership-portal,
.theme-dark .membership-portal {
    background: rgba(23, 28, 49, 0.96) !important;
    border-color: rgba(72, 83, 116, 0.86) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .membership-portal h1,
[data-theme="dark"] .membership-portal h1,
.theme-dark .membership-portal h1,
html[data-theme="dark"] .membership-portal .membership-card-title,
[data-theme="dark"] .membership-portal .membership-card-title,
.theme-dark .membership-portal .membership-card-title {
    color: #f6f8ff !important;
}

html[data-theme="dark"] .membership-info-card,
[data-theme="dark"] .membership-info-card,
.theme-dark .membership-info-card {
    background: rgba(255, 255, 255, 0.045) !important;
    border: 1px solid rgba(72, 83, 116, 0.7) !important;
}
html[data-theme="dark"] .membership-info-card .membership-date-value,
[data-theme="dark"] .membership-info-card .membership-date-value,
.theme-dark .membership-info-card .membership-date-value {
    color: #ffffff !important;
}
html[data-theme="dark"] .membership-info-card .membership-rate-value,
[data-theme="dark"] .membership-info-card .membership-rate-value,
.theme-dark .membership-info-card .membership-rate-value {
    color: #9b7bff !important;
}

html[data-theme="dark"] .membership-renew-card,
[data-theme="dark"] .membership-renew-card,
.theme-dark .membership-renew-card {
    background: rgba(255, 255, 255, 0.035) !important;
    border: 1.5px solid rgba(155, 123, 255, 0.32) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28) !important;
}

/* Month preset buttons in Dark Mode */
html[data-theme="dark"] .btn-month-preset,
[data-theme="dark"] .btn-month-preset,
.theme-dark .btn-month-preset {
    background: rgba(255, 255, 255, 0.065) !important;
    border: 2px solid rgba(93, 106, 143, 0.75) !important;
    color: #f6f8ff !important;
}
html[data-theme="dark"] .btn-month-preset .month-qty,
[data-theme="dark"] .btn-month-preset .month-qty,
.theme-dark .btn-month-preset .month-qty {
    color: #ffffff !important;
    font-size: 1.05rem;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
html[data-theme="dark"] .btn-month-preset .month-price,
[data-theme="dark"] .btn-month-preset .month-price,
.theme-dark .btn-month-preset .month-price {
    color: #cbd5e1 !important;
    font-weight: 600;
    font-size: 0.85rem;
}
html[data-theme="dark"] .btn-month-preset:hover,
[data-theme="dark"] .btn-month-preset:hover,
.theme-dark .btn-month-preset:hover {
    background: rgba(155, 123, 255, 0.2) !important;
    border-color: #9b7bff !important;
}
html[data-theme="dark"] .btn-month-preset:hover .month-qty,
[data-theme="dark"] .btn-month-preset:hover .month-qty,
.theme-dark .btn-month-preset:hover .month-qty {
    color: #d8cdff !important;
}
html[data-theme="dark"] .btn-month-preset.active,
[data-theme="dark"] .btn-month-preset.active,
.theme-dark .btn-month-preset.active {
    background: linear-gradient(135deg, #7b5cff 0%, #5839d3 100%) !important;
    border-color: #9b7bff !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(123, 92, 255, 0.5) !important;
}
html[data-theme="dark"] .btn-month-preset.active .month-qty,
[data-theme="dark"] .btn-month-preset.active .month-qty,
.theme-dark .btn-month-preset.active .month-qty {
    color: #ffffff !important;
    font-weight: 900;
}
html[data-theme="dark"] .btn-month-preset.active .month-price,
[data-theme="dark"] .btn-month-preset.active .month-price,
.theme-dark .btn-month-preset.active .month-price {
    color: #ffffff !important;
    font-weight: 700;
}

/* Select Dropdown in Dark Mode */
html[data-theme="dark"] .membership-months-select,
[data-theme="dark"] .membership-months-select,
.theme-dark .membership-months-select {
    background-color: #171c31 !important;
    color: #ffffff !important;
    border: 2px solid rgba(93, 106, 143, 0.85) !important;
}
html[data-theme="dark"] .membership-months-select:focus,
[data-theme="dark"] .membership-months-select:focus,
.theme-dark .membership-months-select:focus {
    border-color: #9b7bff !important;
    box-shadow: 0 0 0 0.2rem rgba(155, 123, 255, 0.25) !important;
}
html[data-theme="dark"] .membership-months-select option,
[data-theme="dark"] .membership-months-select option,
.theme-dark .membership-months-select option {
    background-color: #171c31 !important;
    color: #ffffff !important;
}

/* Live Preview in Dark Mode */
html[data-theme="dark"] .membership-preview-box,
[data-theme="dark"] .membership-preview-box,
.theme-dark .membership-preview-box {
    background: rgba(255, 255, 255, 0.045) !important;
    border: 1px solid rgba(72, 83, 116, 0.8) !important;
}
html[data-theme="dark"] .membership-preview-box .preview-target-date,
[data-theme="dark"] .membership-preview-box .preview-target-date,
.theme-dark .membership-preview-box .preview-target-date {
    color: #34d399 !important;
}
html[data-theme="dark"] .membership-preview-box .preview-total-price,
[data-theme="dark"] .membership-preview-box .preview-total-price,
.theme-dark .membership-preview-box .preview-total-price {
    color: #72e4bc !important;
}
html[data-theme="dark"] .membership-preview-box .preview-explanation,
[data-theme="dark"] .membership-preview-box .preview-explanation,
.theme-dark .membership-preview-box .preview-explanation {
    color: #cbd5e1 !important;
}
html[data-theme="dark"] .membership-preview-box .preview-explanation strong,
[data-theme="dark"] .membership-preview-box .preview-explanation strong,
.theme-dark .membership-preview-box .preview-explanation strong {
    color: #ffffff !important;
}

/* Pending Card in Dark Mode */
html[data-theme="dark"] .membership-pending-item,
[data-theme="dark"] .membership-pending-item,
.theme-dark .membership-pending-item {
    background: rgba(242, 184, 75, 0.12) !important;
    border: 1.5px solid rgba(242, 184, 75, 0.35) !important;
}
html[data-theme="dark"] .membership-pending-item h3,
[data-theme="dark"] .membership-pending-item h3,
.theme-dark .membership-pending-item h3 {
    color: #ffffff !important;
}
html[data-theme="dark"] .membership-pending-item .membership-pending-amount,
[data-theme="dark"] .membership-pending-item .membership-pending-amount,
.theme-dark .membership-pending-item .membership-pending-amount {
    color: #ffd477 !important;
}

html[data-theme="dark"] .promo-badge-gift,
[data-theme="dark"] .promo-badge-gift,
.theme-dark .promo-badge-gift {
    background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
    color: #0f172a !important;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.training-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.training-hero-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.training-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .65rem;
}

/* Hero Panel Buttons & Typography */
.hero-panel .eyebrow {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hero-panel h1,
.hero-panel h2,
.hero-panel h3 {
    color: #ffffff !important;
}

.hero-panel .btn-light {
    background: #ffffff;
    border: 1px solid #ffffff;
    color: #5b3bd9 !important;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.hero-panel .btn-light:hover {
    background: #f1f5f9;
    border-color: #f1f5f9;
    color: #4324bd !important;
}

.hero-panel .btn-outline-light {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #ffffff !important;
    font-weight: 600;
}

.hero-panel .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.85);
    color: #ffffff !important;
}

html[data-theme="dark"] .rcp-tailwind .hero-panel .btn-light,
[data-theme="dark"] .hero-panel .btn-light {
    background: rgba(255, 255, 255, 0.14) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    backdrop-filter: blur(8px);
}

html[data-theme="dark"] .rcp-tailwind .hero-panel .btn-light:hover,
[data-theme="dark"] .hero-panel .btn-light:hover {
    background: rgba(255, 255, 255, 0.28) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .rcp-tailwind .hero-panel .btn-outline-light,
[data-theme="dark"] .hero-panel .btn-outline-light {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    backdrop-filter: blur(8px);
}

html[data-theme="dark"] .rcp-tailwind .hero-panel .btn-outline-light:hover,
[data-theme="dark"] .hero-panel .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.22) !important;
    border-color: rgba(255, 255, 255, 0.55) !important;
    color: #ffffff !important;
}

.training-main-cta {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    white-space: normal;
    text-align: left;
}

.training-week-panel {
    overflow: visible;
}

.training-session-list,
.training-microcycle-list,
.training-test-list {
    display: grid;
    gap: .75rem;
}

.training-session-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: .85rem;
    align-items: stretch;
    padding: .85rem;
    border: 1px solid var(--rcp-line);
    border-radius: 1rem;
    background: linear-gradient(180deg, #fff, #f9fbff);
}

.training-session-date {
    border-radius: .9rem;
    background: var(--rcp-lavender);
    color: var(--rcp-violet);
    display: grid;
    place-items: center;
    align-content: center;
    min-height: 72px;
    text-align: center;
}

.training-session-date strong {
    font-size: 1.05rem;
    line-height: 1;
}

.training-session-date span {
    color: var(--rcp-violet);
    font-size: .76rem;
    font-weight: 900;
}

.training-session-body h3 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 900;
}

.training-session-body p {
    margin: .45rem 0 0;
    color: var(--rcp-muted);
    font-weight: 700;
}

.training-session-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    color: var(--rcp-muted);
    font-size: .82rem;
    font-weight: 900;
}

.training-session-meta span {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    padding: .22rem .48rem;
    border-radius: 999px;
    background: #f1f5fb;
}

.training-session-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .45rem;
    min-width: 126px;
}

.training-empty-state {
    min-height: 180px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: .45rem;
    padding: 1rem;
    border: 1px dashed #cbd9e8;
    border-radius: 1rem;
    background: #f8f9fe;
    text-align: center;
    color: var(--rcp-muted);
}

.training-empty-state .bi {
    color: var(--rcp-violet);
    font-size: 2rem;
}

.training-empty-state strong {
    color: var(--rcp-ink);
}

.plan-agenda-panel {
    overflow: visible;
}

.plan-agenda-summary {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    justify-content: flex-end;
}

.plan-agenda-summary div {
    min-width: 112px;
    padding: .55rem .75rem;
    border: 1px solid #dce5f2;
    border-radius: .9rem;
    background: #f9fbff;
}

.plan-agenda-summary span,
.plan-week-overview span {
    display: block;
    color: #69738c;
    font-size: .74rem;
    font-weight: 900;
}

.plan-agenda-summary strong,
.plan-week-overview strong {
    display: block;
    color: var(--rcp-ink);
    font-size: .9rem;
    font-weight: 900;
}

.plan-week-accordion {
    display: grid;
    gap: .85rem;
}

.plan-week-item {
    border: 1px solid #dce5f2 !important;
    border-radius: 1rem !important;
    overflow: hidden;
    background: #fff;
}

.plan-week-item .accordion-button {
    gap: 1rem;
    align-items: center;
    background: linear-gradient(180deg, #fff, #f9fbff);
    box-shadow: none;
}

.plan-week-item .accordion-button:not(.collapsed) {
    color: var(--rcp-ink);
    background: linear-gradient(135deg, rgba(111, 77, 245, .08), rgba(52, 198, 207, .08));
}

.plan-week-heading {
    min-width: 190px;
    display: grid;
    gap: .2rem;
}

.plan-week-heading strong {
    color: var(--rcp-ink);
    font-weight: 950;
}

.plan-week-heading span {
    color: #69738c;
    font-size: .83rem;
    font-weight: 800;
}

.plan-week-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .42rem;
    align-items: center;
}

.plan-week-tags > span:not(.status-pill) {
    display: inline-flex;
    align-items: center;
    padding: .24rem .55rem;
    border-radius: 999px;
    background: #eef4fb;
    color: #65708a;
    font-size: .78rem;
    font-weight: 900;
}

.plan-week-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .65rem;
}

.plan-week-overview div {
    padding: .75rem;
    border: 1px solid #dce5f2;
    border-radius: .9rem;
    background: #f9fbff;
}

.plan-session-list {
    display: grid;
    gap: .7rem;
}

.plan-session-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: .85rem;
    align-items: stretch;
    padding: .85rem;
    border: 1px solid #dce5f2;
    border-radius: 1rem;
    background: linear-gradient(180deg, #fff, #fbfcff);
}

.plan-session-main {
    margin-top: .5rem !important;
    padding: .65rem .75rem;
    border-left: 4px solid var(--rcp-accent);
    border-radius: .75rem;
    background: #f5f8ff;
    color: var(--rcp-ink) !important;
    font-size: .88rem;
}

.training-microcycle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .85rem;
    border: 1px solid var(--rcp-line);
    border-radius: .95rem;
    background: #fff;
}

.profile-detail-list {
    display: grid;
    grid-template-columns: minmax(110px, .8fr) minmax(0, 1.2fr);
    gap: .45rem .7rem;
}

.profile-detail-list dt {
    color: var(--rcp-muted);
    font-size: .8rem;
    font-weight: 900;
}

.profile-detail-list dd {
    margin: 0;
    color: var(--rcp-ink);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.compact-timeline-item {
    grid-template-columns: 42px minmax(0, 1fr);
}

.training-test-list div {
    display: grid;
    gap: .15rem;
    padding: .7rem;
    border: 1px solid var(--rcp-line);
    border-radius: .9rem;
    background: #f9fbff;
}

.training-test-list span {
    color: var(--rcp-muted);
    font-size: .82rem;
    font-weight: 800;
}

.microcycle-focus-link {
    display: grid;
    gap: .25rem;
    padding: 1rem;
    border-radius: 1rem;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, var(--rcp-violet), var(--rcp-accent));
    box-shadow: 0 18px 36px rgba(111, 77, 245, .22);
}

.microcycle-focus-link span {
    width: 2.35rem;
    height: 2.35rem;
    display: grid;
    place-items: center;
    border-radius: .85rem;
    background: rgba(255, 255, 255, .18);
}

.microcycle-focus-link strong {
    color: #fff;
    font-size: 1.1rem;
}

.microcycle-focus-link small {
    color: rgba(255, 255, 255, .82);
    font-weight: 800;
}

.training-feedback-card {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .65rem;
    padding: .7rem;
    border: 1px solid rgba(111, 77, 245, .22);
    border-radius: .95rem;
    background: linear-gradient(135deg, rgba(111, 77, 245, .10), rgba(52, 198, 207, .12));
    color: var(--rcp-ink);
    text-align: left;
    box-shadow: 0 12px 24px rgba(31, 27, 67, .07);
}

.training-feedback-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(31, 27, 67, .11);
}

.feedback-card-icon {
    width: 2.4rem;
    height: 2.4rem;
    display: grid;
    place-items: center;
    border-radius: .85rem;
    background: #fff;
    color: var(--rcp-violet);
}

.feedback-card-copy {
    display: grid;
    gap: .05rem;
    min-width: 0;
}

.feedback-card-copy strong {
    font-size: .94rem;
}

.feedback-card-copy small,
.feedback-card-kicker,
.feedback-card-stats small {
    color: var(--rcp-muted);
    font-size: .76rem;
    font-weight: 800;
}

.feedback-card-kicker {
    text-transform: uppercase;
    letter-spacing: 0;
}

.feedback-card-stats {
    display: grid;
    justify-items: end;
    min-width: 68px;
}

.feedback-card-stats strong {
    color: var(--rcp-violet);
    font-size: .98rem;
}

.training-feedback-card-verde {
    border-color: rgba(31, 191, 143, .32);
    background: linear-gradient(135deg, rgba(31, 191, 143, .12), rgba(52, 198, 207, .10));
}

.training-feedback-card-amarillo {
    border-color: rgba(223, 157, 47, .38);
    background: linear-gradient(135deg, rgba(223, 157, 47, .14), rgba(255, 247, 237, .90));
}

.training-feedback-card-rojo {
    border-color: rgba(255, 79, 134, .38);
    background: linear-gradient(135deg, rgba(255, 79, 134, .13), rgba(255, 241, 245, .92));
}

.training-feedback-card-waiting {
    border-color: rgba(111, 77, 245, .24);
    background: linear-gradient(135deg, rgba(248, 249, 252, 0.98), rgba(241, 244, 249, 0.95));
}

.training-feedback-card-waiting .feedback-card-icon {
    background: rgba(111, 77, 245, 0.10);
    color: var(--rcp-violet);
}

.training-feedback-modal .modal-content {
    border: 0;
    border-radius: 1.15rem;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(31, 27, 67, .25);
}

.training-feedback-modal .modal-header {
    background: linear-gradient(135deg, var(--rcp-violet), var(--rcp-accent));
    color: #fff;
    border: 0;
    padding: 1.2rem 1.25rem;
}

.tracking-modal-body {
    background:
        radial-gradient(circle at top left, rgba(111, 77, 245, .08), transparent 32%),
        linear-gradient(180deg, #fff, #f8fbff);
}

.training-feedback-modal .modal-header .eyebrow,
.training-feedback-modal .modal-header p {
    color: rgba(255, 255, 255, .78);
}

.training-feedback-modal .btn-close {
    filter: invert(1) grayscale(1);
    opacity: .9;
}

.tracking-comparison-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.tracking-metric {
    min-height: 112px;
    display: grid;
    align-content: center;
    gap: .18rem;
    padding: .9rem;
    border-radius: 1rem;
    border: 1px solid var(--rcp-line);
    background: #f8f9fe;
}

.tracking-metric span {
    color: var(--rcp-muted);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.tracking-metric strong {
    color: var(--rcp-ink);
    font-size: 1.45rem;
    font-weight: 900;
}

.tracking-metric small {
    color: var(--rcp-muted);
    font-weight: 800;
}

.tracking-metric.planned {
    background: rgba(111, 77, 245, .08);
    border-color: rgba(111, 77, 245, .20);
}

.tracking-metric.actual {
    background: rgba(31, 191, 143, .10);
    border-color: rgba(31, 191, 143, .24);
}

.tracking-metric.delta {
    background: rgba(252, 76, 2, .08);
    border-color: rgba(252, 76, 2, .20);
}

.tracking-panel {
    border: 1px solid var(--rcp-line);
    border-radius: 1rem;
    padding: .95rem;
    background: #fff;
}

.tracking-panel-heading {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: .75rem;
}

.tracking-panel-heading > span {
    width: 2.55rem;
    height: 2.55rem;
    display: grid;
    place-items: center;
    border-radius: .9rem;
    background: var(--rcp-lavender);
    color: var(--rcp-violet);
}

.tracking-panel-heading strong {
    display: block;
    color: var(--rcp-ink);
    font-weight: 900;
}

.tracking-panel-heading small,
.tracking-timestamp {
    color: var(--rcp-muted);
    font-weight: 800;
}

.tracking-platform {
    background: linear-gradient(135deg, rgba(52, 198, 207, .10), rgba(111, 77, 245, .06));
    border-color: rgba(52, 198, 207, .24);
}

.tracking-coach {
    background: linear-gradient(135deg, rgba(111, 77, 245, .10), rgba(255, 255, 255, .95));
    border-color: rgba(111, 77, 245, .22);
}

.tracking-coach-verde {
    background: linear-gradient(135deg, rgba(31, 191, 143, .12), rgba(255, 255, 255, .95));
    border-color: rgba(31, 191, 143, .28);
}

.tracking-coach-amarillo {
    background: linear-gradient(135deg, rgba(223, 157, 47, .14), rgba(255, 255, 255, .95));
    border-color: rgba(223, 157, 47, .28);
}

.tracking-coach-rojo {
    background: linear-gradient(135deg, rgba(255, 79, 134, .14), rgba(255, 255, 255, .95));
    border-color: rgba(255, 79, 134, .28);
}

.tracking-coach-badge {
    display: inline-flex;
    margin-bottom: .65rem;
    padding: .35rem .65rem;
    border-radius: 999px;
    background: #fff;
    color: var(--rcp-violet);
    font-size: .82rem;
    font-weight: 900;
}

.tracking-note {
    margin-top: .5rem;
    padding: .62rem .72rem;
    border-radius: .85rem;
    background: rgba(255, 255, 255, .68);
    color: var(--rcp-ink);
}

.tracking-coach-highlight {
    margin: .9rem 0;
    padding: .85rem;
    border-radius: .95rem;
    border: 1px solid rgba(111, 77, 245, .16);
    background: rgba(255, 255, 255, .74);
}

.tracking-feedback-story {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
    margin-top: .9rem;
}

.tracking-feedback-story section {
    padding: .9rem;
    border-radius: 1rem;
    border: 1px solid rgba(111, 77, 245, .14);
    background: rgba(255, 255, 255, .78);
}

.tracking-feedback-story h3 {
    margin: 0 0 .7rem;
    color: var(--rcp-ink);
    font-size: .98rem;
    font-weight: 900;
}

.tracking-text-list {
    display: grid;
    gap: .58rem;
}

.tracking-text-item {
    display: grid;
    gap: .18rem;
    padding-left: .72rem;
    border-left: 3px solid rgba(111, 77, 245, .28);
    color: var(--rcp-ink);
    line-height: 1.45;
}

.tracking-text-item strong {
    color: var(--rcp-violet);
    font-weight: 900;
}

.tracking-text-item span {
    color: var(--rcp-ink);
}

.workout-guide-preview {
    margin-top: .75rem;
    padding: .72rem;
    border: 1px solid rgba(111, 77, 245, .18);
    border-radius: .9rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(248, 251, 255, .92));
}

.workout-guide-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .65rem;
    margin-bottom: .62rem;
}

.workout-guide-preview-header span {
    color: var(--rcp-ink);
    font-weight: 900;
}

.workout-guide-mini-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .45rem;
}

.workout-guide-mini-steps div {
    display: grid;
    gap: .12rem;
    min-width: 0;
    padding: .55rem;
    border-radius: .75rem;
    background: #f1f5fb;
}

.workout-guide-mini-steps i {
    color: var(--rcp-violet);
}

.workout-guide-mini-steps strong {
    color: var(--rcp-ink);
    font-size: .78rem;
    font-weight: 900;
}

.workout-guide-mini-steps span {
    color: var(--rcp-muted);
    font-size: .72rem;
    font-weight: 800;
}

.workout-guide-preview p {
    margin: .65rem 0 0;
    color: var(--rcp-muted);
    font-size: .86rem;
    font-weight: 800;
}

.workout-guide-compact-meta {
    display: grid;
    gap: .38rem;
    margin-top: .58rem;
}

.workout-guide-compact-meta span {
    display: flex;
    align-items: flex-start;
    gap: .38rem;
    color: var(--rcp-muted);
    font-size: .78rem;
    font-weight: 800;
    line-height: 1.25;
}

.workout-guide-compact-meta i {
    color: var(--rcp-violet);
    margin-top: .08rem;
}

.session-card .workout-guide-preview {
    padding: .6rem;
}

.session-card .workout-guide-preview-card {
    padding: .58rem;
}

.session-card .workout-guide-preview-card .workout-guide-preview-header {
    align-items: center;
    margin-bottom: 0;
}

.session-card .workout-guide-preview-card .workout-guide-preview-header span {
    font-size: .86rem;
    line-height: 1.15;
}

.session-card .workout-guide-preview-card .workout-guide-preview-header .btn {
    padding: .28rem .46rem;
    white-space: nowrap;
}

.session-card .workout-guide-mini-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.session-card .workout-guide-mini-steps div {
    padding: .45rem;
}

.session-card .workout-guide-mini-steps span {
    display: none;
}

.session-card .workout-guide-preview p {
    font-size: .78rem;
    line-height: 1.25;
}

.workout-guide-modal .modal-content {
    border: 0;
    border-radius: 1.15rem;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(31, 27, 67, .25);
}

.workout-guide-modal .modal-header {
    background: linear-gradient(135deg, #1fbf8f, var(--rcp-accent));
    color: #fff;
    border: 0;
    padding: 1.2rem 1.25rem;
}

.workout-guide-modal .modal-header .eyebrow,
.workout-guide-modal .modal-header p {
    color: rgba(255, 255, 255, .82);
}

.workout-guide-modal .btn-close {
    filter: invert(1) grayscale(1);
    opacity: .9;
}

.workout-guide-full {
    display: grid;
    gap: 1rem;
}

.workout-guide-objective {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
    gap: .8rem;
    padding: .9rem;
    border: 1px solid rgba(31, 191, 143, .22);
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(31, 191, 143, .10), rgba(52, 198, 207, .08));
}

.workout-guide-objective span,
.workout-recommendation-grid span,
.workout-phase-card span {
    color: var(--rcp-muted);
    font-size: .76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.workout-guide-objective strong {
    display: block;
    color: var(--rcp-ink);
    font-size: 1rem;
    font-weight: 900;
}

.workout-guide-objective p {
    margin: 0;
    color: var(--rcp-ink);
    font-weight: 800;
}

.workout-phase-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
}

.workout-phase-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .75rem;
    padding: .9rem;
    border: 1px solid rgba(111, 77, 245, .14);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 12px 28px rgba(31, 27, 67, .06);
}

.workout-phase-icon {
    width: 2.35rem;
    height: 2.35rem;
    display: grid;
    place-items: center;
    border-radius: .8rem;
    background: var(--rcp-lavender);
    color: var(--rcp-violet);
}

.workout-phase-card h3 {
    margin: .12rem 0 .35rem;
    color: var(--rcp-ink);
    font-size: .98rem;
    font-weight: 900;
}

.workout-phase-card p {
    margin: 0;
    color: var(--rcp-ink);
    line-height: 1.45;
    font-weight: 750;
}

.workout-recommendation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}

.workout-recommendation-grid div,
.workout-athlete-note {
    padding: .78rem;
    border: 1px solid var(--rcp-line);
    border-radius: .9rem;
    background: #f8f9fe;
}

.workout-recommendation-grid strong {
    display: block;
    color: var(--rcp-ink);
    font-weight: 850;
    line-height: 1.4;
}

.workout-athlete-note {
    display: flex;
    gap: .65rem;
    align-items: flex-start;
    color: var(--rcp-ink);
    background: rgba(111, 77, 245, .08);
}

.workout-athlete-note i {
    color: var(--rcp-violet);
}

.workout-athlete-note p {
    margin: 0;
    font-weight: 800;
}

.session-card .training-feedback-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: .5rem;
    padding: .58rem;
    border-radius: .8rem;
}

.session-card .feedback-card-icon {
    width: 2rem;
    height: 2rem;
    border-radius: .7rem;
}

.session-card .feedback-card-kicker,
.session-card .feedback-card-copy small {
    display: none;
}

.session-card .feedback-card-copy strong {
    font-size: .85rem;
    line-height: 1.1;
}

.session-card .feedback-card-stats {
    grid-column: 2;
    justify-items: start;
    grid-template-columns: auto auto;
    gap: .45rem;
    min-width: 0;
}

.session-card .feedback-card-stats strong,
.session-card .feedback-card-stats small {
    font-size: .76rem;
}

.strava-chart-card {
    background: #151515 !important;
    border-color: #323232 !important;
    box-shadow: 0 20px 42px rgba(0, 0, 0, .18) !important;
}

.strava-chart-card .section-title {
    border-bottom-color: rgba(255, 255, 255, .1);
}

.strava-chart-card .section-title h2 {
    color: #fff !important;
}

.strava-chart-card .section-title .bi {
    background: rgba(252, 76, 2, .14);
    color: #fc4c02;
}

.strava-chart-heading {
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: .85rem;
}

.strava-week-total {
    align-items: center;
    background: rgba(252, 76, 2, .12);
    border: 1px solid rgba(252, 76, 2, .28);
    border-radius: 999px;
    color: #f3f4f6;
    display: inline-flex;
    gap: .45rem;
    padding: .45rem .8rem;
}

.strava-week-total span {
    color: rgba(243, 244, 246, .78);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.strava-week-total strong {
    color: #fff;
    font-size: 1rem;
}

.strava-chart-card .chart-frame,
.strava-chart-card .chart-frame-wide,
.strava-chart-card .chart-frame-compact {
    min-height: 292px;
    height: 292px;
}

.strava-chart-card .chart-empty {
    background: #1d1d1d;
    border-color: #3a3a3a;
    color: #bdbdbd;
}

.strava-chart-card .chart-empty strong {
    color: #fff;
}

html[data-theme="dark"] .distance-stat-card small {
    color: var(--rcp-muted);
}

html[data-theme="dark"] .plan-agenda-summary div,
html[data-theme="dark"] .plan-week-overview div,
html[data-theme="dark"] .plan-week-tags > span:not(.status-pill),
html[data-theme="dark"] .plan-session-main {
    background: rgba(255, 255, 255, .055);
    border-color: rgba(72, 83, 116, .82);
}

html[data-theme="dark"] .plan-week-item,
html[data-theme="dark"] .plan-session-row {
    background: rgba(255, 255, 255, .04);
    border-color: rgba(72, 83, 116, .86) !important;
}

html[data-theme="dark"] .plan-week-item .accordion-button,
html[data-theme="dark"] .plan-week-item .accordion-button.collapsed {
    background: rgba(255, 255, 255, .035);
    color: var(--rcp-ink);
}

html[data-theme="dark"] .plan-week-item .accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, rgba(123, 92, 255, .16), rgba(41, 199, 208, .10));
}

html[data-theme="dark"] .plan-agenda-summary span,
html[data-theme="dark"] .plan-week-overview span,
html[data-theme="dark"] .plan-week-heading span,
html[data-theme="dark"] .plan-week-tags > span:not(.status-pill) {
    color: var(--rcp-muted);
}

html[data-theme="dark"] .plan-agenda-summary strong,
html[data-theme="dark"] .plan-week-overview strong,
html[data-theme="dark"] .plan-week-heading strong,
html[data-theme="dark"] .plan-session-main {
    color: var(--rcp-ink) !important;
}

html[data-theme="dark"] .profile-readonly-list div,
html[data-theme="dark"] .athlete-social-box {
    background: rgba(255, 255, 255, .045);
    border-color: rgba(72, 83, 116, .82);
}

html[data-theme="dark"] .profile-readonly-list span,
html[data-theme="dark"] .athlete-social-box p {
    color: var(--rcp-muted);
}

html[data-theme="dark"] .profile-readonly-list strong {
    color: var(--rcp-ink);
}

html[data-theme="dark"] .social-link-list span {
    background: rgba(255, 255, 255, .07);
    border-color: rgba(93, 106, 143, .9);
    color: var(--rcp-ink);
}

html[data-theme="dark"] .training-session-row,
html[data-theme="dark"] .training-microcycle-item,
html[data-theme="dark"] .training-test-list div {
    background: rgba(255, 255, 255, .045);
    border-color: rgba(72, 83, 116, .82);
}

html[data-theme="dark"] .training-session-meta span {
    background: rgba(255, 255, 255, .07);
    color: var(--rcp-muted);
}

html[data-theme="dark"] .training-session-date {
    background: rgba(111, 77, 245, .22);
}

html[data-theme="dark"] .training-empty-state {
    background: rgba(255, 255, 255, .035);
    border-color: rgba(93, 106, 143, .8);
}

html[data-theme="dark"] .profile-detail-list dd,
html[data-theme="dark"] .training-empty-state strong {
    color: var(--rcp-ink);
}

html[data-theme="dark"] .training-feedback-card {
    background: linear-gradient(135deg, rgba(111, 77, 245, .20), rgba(52, 198, 207, .13));
    border-color: rgba(93, 106, 143, .86);
    color: var(--rcp-ink);
}

html[data-theme="dark"] .training-feedback-card-waiting {
    border-color: rgba(111, 77, 245, .32);
    background: linear-gradient(135deg, rgba(25, 30, 52, 0.96), rgba(30, 36, 61, 0.96));
}

html[data-theme="dark"] .training-feedback-card-waiting .feedback-card-icon {
    background: rgba(255, 255, 255, 0.08);
    color: #9b7bff;
}

html[data-theme="dark"] .topbar-athlete-profile,
html[data-theme="dark"] .membership-banner {
    background: rgba(255, 255, 255, .045);
    border-color: rgba(72, 83, 116, .82);
    color: var(--rcp-ink);
}

html[data-theme="dark"] .membership-banner-warning {
    background: rgba(223, 157, 47, .10);
    border-color: rgba(223, 157, 47, .34);
}

html[data-theme="dark"] .feedback-card-icon,
html[data-theme="dark"] .tracking-coach-badge {
    background: rgba(255, 255, 255, .08);
}

html[data-theme="dark"] .training-feedback-modal .modal-content {
    background: var(--rcp-panel);
    color: var(--rcp-ink);
}

html[data-theme="dark"] .tracking-modal-body {
    background:
        radial-gradient(circle at top left, rgba(111, 77, 245, .12), transparent 34%),
        linear-gradient(180deg, var(--rcp-panel), var(--rcp-bg));
}

html[data-theme="dark"] .tracking-metric,
html[data-theme="dark"] .tracking-panel,
html[data-theme="dark"] .tracking-note,
html[data-theme="dark"] .tracking-coach-highlight,
html[data-theme="dark"] .tracking-feedback-story section {
    background: rgba(255, 255, 255, .045);
    border-color: rgba(72, 83, 116, .82);
}

html[data-theme="dark"] .tracking-platform {
    background: linear-gradient(135deg, rgba(52, 198, 207, .12), rgba(111, 77, 245, .08));
}

html[data-theme="dark"] .tracking-coach,
html[data-theme="dark"] .tracking-coach-verde,
html[data-theme="dark"] .tracking-coach-amarillo,
html[data-theme="dark"] .tracking-coach-rojo {
    background: rgba(255, 255, 255, .045);
}

html[data-theme="dark"] .tracking-text-item span {
    color: var(--rcp-ink);
}

html[data-theme="dark"] .workout-guide-preview,
html[data-theme="dark"] .workout-guide-mini-steps div,
html[data-theme="dark"] .workout-guide-objective,
html[data-theme="dark"] .workout-phase-card,
html[data-theme="dark"] .workout-recommendation-grid div,
html[data-theme="dark"] .workout-athlete-note {
    background: rgba(255, 255, 255, .045);
    border-color: rgba(72, 83, 116, .82);
}

html[data-theme="dark"] .workout-guide-modal .modal-content {
    background: var(--rcp-panel);
    color: var(--rcp-ink);
}

html[data-theme="dark"] .workout-phase-card p,
html[data-theme="dark"] .workout-guide-objective p,
html[data-theme="dark"] .workout-recommendation-grid strong {
    color: var(--rcp-ink);
}

@media (max-width: 640px) {
    .athlete-hero-identity {
        align-items: flex-start;
        width: 100%;
    }

    .athlete-profile-photo {
        width: 4rem;
        height: 4rem;
        flex-basis: 4rem;
        border-radius: 1rem;
    }

    .training-hero,
    .training-hero-main {
        align-items: flex-start;
    }

    .training-hero {
        flex-direction: column;
    }

    .training-hero-actions,
    .dashboard-quick-actions {
        width: 100%;
        justify-content: stretch;
    }

    .training-hero-actions .btn,
    .dashboard-quick-actions .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .training-session-row {
        grid-template-columns: 1fr;
    }

    .plan-agenda-summary,
    .plan-week-tags {
        justify-content: flex-start;
    }

    .plan-agenda-summary div {
        flex: 1 1 140px;
    }

    .plan-week-item .accordion-button {
        align-items: flex-start;
        flex-direction: column;
    }

    .plan-week-overview,
    .plan-session-row {
        grid-template-columns: 1fr;
    }

    .training-session-date {
        min-height: 58px;
        grid-template-columns: auto 1fr;
        justify-content: start;
        justify-items: start;
        padding: .7rem;
        gap: .35rem;
    }

    .training-session-actions {
        min-width: 0;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .training-session-actions .btn {
        flex: 1 1 132px;
    }

    .training-microcycle-item {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .training-feedback-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .feedback-card-stats {
        grid-column: 1 / -1;
        justify-items: start;
        grid-template-columns: auto auto;
        gap: .5rem;
    }

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

    .tracking-feedback-story {
        grid-template-columns: 1fr;
    }

    .workout-guide-mini-steps,
    .workout-phase-grid,
    .workout-recommendation-grid,
    .workout-guide-objective {
        grid-template-columns: 1fr;
    }

    .workout-guide-preview-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .training-feedback-modal .modal-dialog {
        margin: .65rem;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: .85rem 1rem;
        gap: .75rem;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .topbar-athlete-profile {
        max-width: 100%;
    }

    .membership-banner {
        margin: .75rem 1rem 0;
        align-items: flex-start;
    }
}

.mobile-app-tabbar,
.pwa-install-card {
    display: none;
}

.pwa-install-card[hidden] {
    display: none !important;
}

.pwa-install-card:not([hidden]) {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    width: min(520px, calc(100% - 2rem));
    margin: 0 auto;
    padding: .8rem;
    border: 1px solid rgba(209, 220, 235, .95);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 22px 58px rgba(31, 27, 67, .18);
    backdrop-filter: blur(18px);
}

.pwa-install-card div {
    display: grid;
    gap: .15rem;
    min-width: 0;
}

.pwa-install-card strong {
    color: var(--rcp-ink);
    font-size: .9rem;
    font-weight: 900;
}

.pwa-install-card span {
    color: var(--rcp-muted);
    font-size: .78rem;
    font-weight: 800;
    line-height: 1.35;
}

@media (max-width: 768px) {
    body.mobile-app-mode {
        min-height: 100vh;
        background: var(--rcp-bg);
        -webkit-tap-highlight-color: transparent;
    }

    body.mobile-app-mode .app-shell {
        display: block;
        min-height: 100vh;
    }

    body.mobile-app-mode .sidebar {
        display: none;
    }

    body.mobile-app-mode .topbar {
        position: sticky;
        top: 0;
        z-index: 20;
        min-height: 66px;
        padding: .78rem 1rem;
        border-bottom: 1px solid var(--rcp-line);
        border-radius: 0 0 1rem 1rem;
        box-shadow: 0 10px 26px rgba(31, 27, 67, .07);
    }

    body.mobile-app-mode .topbar h1 {
        font-size: 1.12rem;
        line-height: 1.2;
    }

    body.mobile-app-mode .topbar > div:first-child span {
        display: none;
    }

    body.mobile-app-mode .topbar-actions {
        width: auto;
        gap: .35rem;
        justify-content: flex-end;
        align-items: center;
        flex-wrap: nowrap;
    }

    body.mobile-app-mode .topbar-role-pill,
    body.mobile-app-mode .topbar-actions > .btn {
        display: none;
    }

    body.mobile-app-mode .topbar-athlete-profile {
        max-width: 130px;
        min-height: 34px;
        padding: .2rem .5rem .2rem .2rem;
    }

    body.mobile-app-mode .topbar-athlete-profile strong {
        font-size: .78rem;
        max-width: 75px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body.mobile-app-mode .theme-toggle {
        min-height: 34px;
        padding: .35rem .5rem;
        font-size: .78rem;
    }

    body.mobile-app-mode .theme-toggle [data-theme-label] {
        display: none;
    }

    body.mobile-app-mode .topbar-logout-btn {
        min-height: 34px;
        padding: .35rem .55rem;
        font-size: .8rem;
    }

    body.mobile-app-mode .topbar-logout-btn .topbar-logout-text {
        display: none;
    }

    body.mobile-app-mode .membership-banner {
        margin: .75rem .85rem 0;
        border-radius: .95rem;
        font-size: .82rem;
        line-height: 1.35;
    }

    body.mobile-app-mode .content {
        padding: 1rem .85rem calc(6.9rem + env(safe-area-inset-bottom));
    }

    body.mobile-app-mode .page-heading {
        align-items: stretch;
        flex-direction: column;
        gap: .75rem;
    }

    body.mobile-app-mode .week-grid,
    body.mobile-app-mode .dashboard-grid,
    body.mobile-app-mode .athlete-report-grid,
    body.mobile-app-mode .stats-grid {
        grid-template-columns: 1fr;
    }

    body.mobile-app-mode .table-responsive {
        border-radius: 1rem;
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
    }

    body.mobile-app-mode .table-responsive > .table {
        min-width: 680px;
    }

    body.mobile-app-mode .table th,
    body.mobile-app-mode .table td {
        overflow-wrap: normal;
    }

    body.mobile-app-mode .table .btn {
        white-space: nowrap;
    }

    body.mobile-app-mode .guest-main {
        align-items: stretch !important;
        padding: .75rem !important;
    }

    body.mobile-app-mode .guest-card {
        width: 100%;
        min-height: calc(100vh - 1.5rem);
        border-radius: 1.1rem;
    }

    body.mobile-app-mode .pwa-install-card:not([hidden]) {
        bottom: calc(5.95rem + env(safe-area-inset-bottom));
        align-items: stretch;
        flex-wrap: wrap;
        padding: .75rem;
    }

    body.mobile-app-mode .pwa-install-card div {
        flex: 1 1 100%;
    }

    body.mobile-app-mode .pwa-install-card .btn {
        flex: 1 1 0;
        min-height: 38px;
        font-weight: 900;
    }

    body.mobile-app-mode .pwa-install-card-guest:not([hidden]) {
        bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    body.mobile-app-mode .mobile-app-tabbar {
        position: fixed;
        left: .75rem;
        right: .75rem;
        bottom: calc(.65rem + env(safe-area-inset-bottom));
        z-index: 1060;
        display: flex;
        align-items: center;
        gap: .35rem;
        min-height: 68px;
        padding: .45rem;
        border: 1px solid rgba(209, 220, 235, .95);
        border-radius: 1.35rem;
        background: rgba(255, 255, 255, .94);
        box-shadow: 0 18px 50px rgba(31, 27, 67, .18);
        backdrop-filter: blur(18px);
    }

    body.mobile-app-mode .mobile-app-tabbar a {
        min-width: 0;
        flex: 1 1 0;
        display: grid;
        justify-items: center;
        align-content: center;
        gap: .18rem;
        min-height: 54px;
        border-radius: 1rem;
        color: var(--rcp-muted);
        text-decoration: none;
        font-size: .68rem;
        font-weight: 900;
        line-height: 1.1;
    }

    body.mobile-app-mode .mobile-app-tabbar i {
        width: 1.55rem;
        height: 1.55rem;
        display: grid;
        place-items: center;
        border-radius: .72rem;
        background: #f1f5fb;
        color: var(--rcp-violet);
        font-size: .92rem;
    }

    body.mobile-app-mode .mobile-app-tabbar a.active {
        color: #fff;
        background: linear-gradient(135deg, var(--rcp-violet), var(--rcp-accent));
        box-shadow: 0 12px 24px rgba(111, 77, 245, .24);
    }

    body.mobile-app-mode .mobile-app-tabbar a.active i {
        color: #fff;
        background: rgba(255, 255, 255, .18);
    }

    body.mobile-app-mode .mobile-app-tabbar a[href*="route=strava"] i {
        color: #fc4c02;
    }

    body.mobile-app-mode .mobile-app-tabbar a[href*="route=strava"].active {
        background: linear-gradient(135deg, #fc4c02, #e34000);
        box-shadow: 0 12px 24px rgba(252, 76, 2, .3);
    }
}

html[data-theme="dark"] .pwa-install-card:not([hidden]),
html[data-theme="dark"] body.mobile-app-mode .mobile-app-tabbar {
    background: rgba(23, 28, 49, .96);
    border-color: rgba(72, 83, 116, .88);
    box-shadow: 0 22px 58px rgba(0, 0, 0, .34);
}

html[data-theme="dark"] .pwa-install-card strong {
    color: var(--rcp-ink);
}

html[data-theme="dark"] .pwa-install-card span {
    color: var(--rcp-muted);
}

html[data-theme="dark"] body.mobile-app-mode .topbar {
    background: rgba(16, 20, 39, .94);
    border-bottom-color: rgba(72, 83, 116, .78);
}

html[data-theme="dark"] body.mobile-app-mode .mobile-app-tabbar a {
    color: #aeb8ce;
}

html[data-theme="dark"] body.mobile-app-mode .mobile-app-tabbar i {
    background: rgba(255, 255, 255, .075);
    color: #bbaaff;
}

html[data-theme="dark"] body.mobile-app-mode .mobile-app-tabbar a.active {
    color: #fff;
    background: linear-gradient(135deg, #7b5cff, #29c7d0);
}
:root { font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.text-runviolet { color: #6f4df5 !important; }
.nav-logout-form {
    margin-top: .4rem;
}

.nav-logout-form button.nav-link-app {
    width: 100%;
    border: 1px solid transparent;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: #dc3545;
}

.nav-logout-form button.nav-link-app .bi {
    color: #dc3545;
    background: rgba(220, 53, 69, .08);
}

.nav-logout-form button.nav-link-app:hover {
    background: rgba(220, 53, 69, .08);
    color: #b02a37;
    border-color: rgba(220, 53, 69, .2);
}

.topbar-logout-form {
    display: inline-flex !important;
    align-items: center;
    margin: 0;
}

.topbar-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-weight: 800;
    white-space: nowrap;
    border-radius: .7rem;
    padding: .35rem .75rem;
    min-height: 34px;
    font-size: .84rem;
    transition: all .15s ease;
}

@media (max-width: 768px) {
    .rcp-tailwind .topbar {
        padding: .65rem .85rem;
        min-height: 58px;
    }

    .rcp-tailwind .topbar h1 {
        font-size: 1.05rem;
        max-width: 170px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .topbar-actions {
        width: auto !important;
        flex-wrap: nowrap !important;
        gap: .35rem !important;
    }

    .theme-toggle [data-theme-label] {
        display: none;
    }

    .topbar-logout-btn .topbar-logout-text {
        display: none;
    }

    .topbar-logout-btn {
        padding: .35rem .55rem !important;
        min-height: 34px !important;
    }
}

html[data-theme="dark"] .nav-logout-form button.nav-link-app {
    color: #ff85a6;
}

html[data-theme="dark"] .nav-logout-form button.nav-link-app .bi {
    color: #ff85a6;
    background: rgba(255, 102, 140, .14);
}

html[data-theme="dark"] .nav-logout-form button.nav-link-app:hover {
    background: rgba(255, 102, 140, .14);
    color: #ffffff;
    border-color: rgba(255, 102, 140, .3);
}

html[data-theme="dark"] .topbar-logout-btn {
    border-color: rgba(255, 102, 140, .45);
    color: #ff85a6;
    background: rgba(255, 102, 140, .08);
}

html[data-theme="dark"] .topbar-logout-btn:hover {
    background: rgba(255, 102, 140, .22);
    border-color: #ff668c;
    color: #ffffff;
}

/* Touch layouts: keep long training details readable on iPad and phones. */
body.mobile-app-mode.modal-open .mobile-app-tabbar,
body.mobile-app-mode.modal-open .pwa-install-card:not([hidden]) {
    display: none !important;
}

@media (max-width: 1100px) {
    html.is-mobile-device {
        max-width: 100%;
        overflow-x: clip;
    }

    body.mobile-app-mode {
        overflow-x: hidden;
    }

    body.mobile-app-mode .content,
    body.mobile-app-mode .panel,
    body.mobile-app-mode .hero-panel,
    body.mobile-app-mode .training-session-body,
    body.mobile-app-mode .plan-session-main {
        min-width: 0;
        max-width: 100%;
    }

    body.mobile-app-mode img {
        max-width: 100%;
        height: auto;
    }

    body.mobile-app-mode .training-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    body.mobile-app-mode .training-hero-actions {
        width: 100%;
        justify-content: stretch;
    }

    body.mobile-app-mode .training-hero-actions .btn {
        flex: 1 1 220px;
        justify-content: center;
        text-align: center;
    }

    body.mobile-app-mode .training-session-row,
    body.mobile-app-mode .plan-session-row {
        grid-template-columns: 1fr;
    }

    body.mobile-app-mode .training-session-date {
        min-height: 58px;
        grid-template-columns: auto 1fr;
        justify-content: start;
        justify-items: start;
        padding: .7rem;
        gap: .35rem;
    }

    body.mobile-app-mode .training-session-actions {
        min-width: 0;
        flex-direction: row;
        flex-wrap: wrap;
    }

    body.mobile-app-mode .training-session-actions .btn {
        flex: 1 1 132px;
        min-height: 44px;
    }

    body.mobile-app-mode .workout-guide-preview-header {
        align-items: flex-start;
        flex-direction: column;
    }

    body.mobile-app-mode .workout-guide-mini-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.mobile-app-mode .training-feedback-modal .modal-dialog,
    body.mobile-app-mode .workout-guide-modal .modal-dialog {
        width: calc(100% - 1.25rem);
        max-width: none;
        height: calc(100dvh - 1rem);
        margin: .5rem auto;
    }

    body.mobile-app-mode .training-feedback-modal .modal-content,
    body.mobile-app-mode .workout-guide-modal .modal-content {
        min-height: 0;
        max-height: calc(100dvh - 1rem);
        border-radius: 1rem;
    }

    body.mobile-app-mode .training-feedback-modal .modal-header,
    body.mobile-app-mode .workout-guide-modal .modal-header {
        flex: 0 0 auto;
        padding: 1rem;
    }

    body.mobile-app-mode .training-feedback-modal .modal-body,
    body.mobile-app-mode .workout-guide-modal .modal-body {
        min-height: 0;
        padding: .85rem;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    body.mobile-app-mode .tracking-comparison-grid,
    body.mobile-app-mode .tracking-feedback-story,
    body.mobile-app-mode .workout-phase-grid,
    body.mobile-app-mode .workout-recommendation-grid,
    body.mobile-app-mode .workout-guide-objective {
        grid-template-columns: 1fr;
    }

    body.mobile-app-mode .tracking-metric {
        min-height: 88px;
    }

    body.mobile-app-mode .tracking-panel,
    body.mobile-app-mode .tracking-feedback-story section,
    body.mobile-app-mode .workout-phase-card,
    body.mobile-app-mode .workout-recommendation-grid > div {
        padding: .8rem;
    }

    body.mobile-app-mode .tracking-text-item,
    body.mobile-app-mode .workout-guide-preview,
    body.mobile-app-mode .workout-phase-card p,
    body.mobile-app-mode .workout-athlete-note,
    body.mobile-app-mode .workout-recommendation-grid p {
        overflow-wrap: anywhere;
    }

    body.mobile-app-mode .training-feedback-modal .modal-footer,
    body.mobile-app-mode .workout-guide-modal .modal-footer {
        z-index: 1;
        flex: 0 0 auto;
        gap: .5rem;
        padding: .7rem .85rem calc(.7rem + env(safe-area-inset-bottom));
    }

    body.mobile-app-mode .training-feedback-modal .modal-footer .btn,
    body.mobile-app-mode .workout-guide-modal .modal-footer .btn {
        flex: 1 1 140px;
        min-height: 44px;
        white-space: normal;
    }

    body.mobile-app-mode .training-feedback-modal .btn-close,
    body.mobile-app-mode .workout-guide-modal .btn-close {
        width: 2.75rem;
        height: 2.75rem;
        padding: .75rem;
    }
}

@media (max-width: 380px) {
    body.mobile-app-mode .training-feedback-modal .modal-dialog,
    body.mobile-app-mode .workout-guide-modal .modal-dialog {
        width: calc(100% - .65rem);
        height: calc(100dvh - .5rem);
        margin: .25rem auto;
    }

    body.mobile-app-mode .training-feedback-modal .modal-header,
    body.mobile-app-mode .workout-guide-modal .modal-header,
    body.mobile-app-mode .training-feedback-modal .modal-body,
    body.mobile-app-mode .workout-guide-modal .modal-body {
        padding-left: .7rem;
        padding-right: .7rem;
    }
}

@supports not (height: 100dvh) {
    @media (max-width: 1100px) {
        body.mobile-app-mode .training-feedback-modal .modal-dialog,
        body.mobile-app-mode .workout-guide-modal .modal-dialog {
            height: calc(100vh - 1rem);
        }

        body.mobile-app-mode .training-feedback-modal .modal-content,
        body.mobile-app-mode .workout-guide-modal .modal-content {
            max-height: calc(100vh - 1rem);
        }
    }
}

/* iPad/tablet shell: pointer-based detection also covers desktop-mode Safari. */
@media (min-width: 769px) and (max-width: 1100px) {
    body.mobile-app-mode .app-shell {
        display: block;
        min-height: 100vh;
    }

    body.mobile-app-mode .sidebar {
        display: none;
    }

    body.mobile-app-mode .topbar {
        position: sticky;
        top: 0;
        z-index: 20;
        min-height: 70px;
        padding: .8rem 1.25rem;
        border-bottom: 1px solid var(--rcp-line);
        box-shadow: 0 10px 26px rgba(31, 27, 67, .07);
    }

    body.mobile-app-mode .topbar h1 {
        font-size: 1.22rem;
        line-height: 1.2;
    }

    body.mobile-app-mode .topbar > div:first-child span {
        display: none;
    }

    body.mobile-app-mode .topbar-actions {
        width: auto;
        gap: .5rem;
    }

    body.mobile-app-mode .topbar-role-pill,
    body.mobile-app-mode .topbar-actions > .btn {
        display: none;
    }

    body.mobile-app-mode .content {
        padding: 1.25rem 1.25rem calc(6.9rem + env(safe-area-inset-bottom));
    }

    body.mobile-app-mode .week-grid,
    body.mobile-app-mode .dashboard-grid,
    body.mobile-app-mode .athlete-report-grid,
    body.mobile-app-mode .stats-grid,
    body.mobile-app-mode .training-session-list,
    body.mobile-app-mode .plan-session-list {
        grid-template-columns: 1fr;
    }

    body.mobile-app-mode .mobile-app-tabbar {
        position: fixed;
        left: 1.25rem;
        right: 1.25rem;
        bottom: calc(.75rem + env(safe-area-inset-bottom));
        z-index: 1030;
        display: flex;
        align-items: center;
        gap: .45rem;
        min-height: 70px;
        padding: .5rem;
        border: 1px solid rgba(209, 220, 235, .95);
        border-radius: 1.35rem;
        background: rgba(255, 255, 255, .94);
        box-shadow: 0 18px 50px rgba(31, 27, 67, .18);
        backdrop-filter: blur(18px);
    }

    body.mobile-app-mode .mobile-app-tabbar a {
        min-width: 0;
        flex: 1 1 0;
        display: grid;
        justify-items: center;
        align-content: center;
        gap: .18rem;
        min-height: 56px;
        border-radius: 1rem;
        color: var(--rcp-muted);
        text-decoration: none;
        font-size: .74rem;
        font-weight: 900;
        line-height: 1.1;
    }

    body.mobile-app-mode .mobile-app-tabbar i {
        width: 1.6rem;
        height: 1.6rem;
        display: grid;
        place-items: center;
        border-radius: .72rem;
        background: #f1f5fb;
        color: var(--rcp-violet);
        font-size: .96rem;
    }

    body.mobile-app-mode .mobile-app-tabbar a.active {
        color: #fff;
        background: linear-gradient(135deg, var(--rcp-violet), var(--rcp-accent));
        box-shadow: 0 12px 24px rgba(111, 77, 245, .24);
    }

    body.mobile-app-mode .mobile-app-tabbar a.active i {
        color: #fff;
        background: rgba(255, 255, 255, .18);
    }
}

@media (max-width: 380px) {
    body.mobile-app-mode .workout-guide-mini-steps {
        grid-template-columns: 1fr;
    }
}

/* Large touch devices, such as iPad Pro in landscape mode. */
@media (min-width: 1101px) {
    body.mobile-app-mode .app-shell {
        display: block;
        min-height: 100vh;
    }

    body.mobile-app-mode .sidebar {
        display: none;
    }

    body.mobile-app-mode .topbar {
        position: sticky;
        top: 0;
        z-index: 20;
        min-height: 70px;
        padding: .8rem 1.5rem;
    }

    body.mobile-app-mode .topbar-role-pill,
    body.mobile-app-mode .topbar-actions > .btn {
        display: none;
    }

    body.mobile-app-mode .content {
        max-width: 1280px;
        margin: 0 auto;
        padding: 1.5rem 1.5rem calc(7rem + env(safe-area-inset-bottom));
    }

    body.mobile-app-mode .training-session-list,
    body.mobile-app-mode .plan-session-list {
        grid-template-columns: 1fr;
    }

    body.mobile-app-mode .training-session-row,
    body.mobile-app-mode .plan-session-row {
        grid-template-columns: 1fr;
    }

    body.mobile-app-mode .training-session-actions {
        min-width: 0;
        flex-direction: row;
        flex-wrap: wrap;
    }

    body.mobile-app-mode .workout-guide-preview-header {
        align-items: flex-start;
        flex-direction: column;
    }

    body.mobile-app-mode .workout-guide-mini-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.mobile-app-mode .training-feedback-modal .modal-dialog,
    body.mobile-app-mode .workout-guide-modal .modal-dialog {
        width: min(calc(100% - 2rem), 980px);
        max-width: none;
        height: calc(100dvh - 1.5rem);
        margin: .75rem auto;
    }

    body.mobile-app-mode .training-feedback-modal .modal-content,
    body.mobile-app-mode .workout-guide-modal .modal-content {
        max-height: calc(100dvh - 1.5rem);
    }

    body.mobile-app-mode .tracking-comparison-grid,
    body.mobile-app-mode .tracking-feedback-story,
    body.mobile-app-mode .workout-phase-grid,
    body.mobile-app-mode .workout-recommendation-grid,
    body.mobile-app-mode .workout-guide-objective {
        grid-template-columns: 1fr;
    }

    body.mobile-app-mode .mobile-app-tabbar {
        position: fixed;
        left: 1.5rem;
        right: 1.5rem;
        bottom: calc(.85rem + env(safe-area-inset-bottom));
        z-index: 1030;
        display: flex;
        align-items: center;
        gap: .45rem;
        min-height: 70px;
        padding: .5rem;
        border: 1px solid rgba(209, 220, 235, .95);
        border-radius: 1.35rem;
        background: rgba(255, 255, 255, .94);
        box-shadow: 0 18px 50px rgba(31, 27, 67, .18);
        backdrop-filter: blur(18px);
    }

    body.mobile-app-mode .mobile-app-tabbar a {
        min-width: 0;
        flex: 1 1 0;
        display: grid;
        justify-items: center;
        align-content: center;
        gap: .18rem;
        min-height: 56px;
        border-radius: 1rem;
        color: var(--rcp-muted);
        text-decoration: none;
        font-size: .74rem;
        font-weight: 900;
        line-height: 1.1;
    }

    body.mobile-app-mode .mobile-app-tabbar i {
        width: 1.6rem;
        height: 1.6rem;
        display: grid;
        place-items: center;
        border-radius: .72rem;
        background: #f1f5fb;
        color: var(--rcp-violet);
        font-size: .96rem;
    }

    body.mobile-app-mode .mobile-app-tabbar a.active {
        color: #fff;
        background: linear-gradient(135deg, var(--rcp-violet), var(--rcp-accent));
        box-shadow: 0 12px 24px rgba(111, 77, 245, .24);
    }

    body.mobile-app-mode .mobile-app-tabbar a.active i {
        color: #fff;
        background: rgba(255, 255, 255, .18);
    }
}

/* ==========================================================================
   Modern Luxury Notifications & Toast System (App Notifications)
   ========================================================================== */
.app-toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: min(440px, calc(100vw - 2rem));
    pointer-events: none;
}

.app-toast {
    position: relative;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    border-radius: 1.15rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(220, 230, 245, 0.9);
    box-shadow: 0 20px 40px -10px rgba(31, 27, 67, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.7) inset;
    overflow: hidden;
    animation: appToastSlideIn 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.25s ease;
}

.app-toast:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 48px -10px rgba(31, 27, 67, 0.24);
}

.app-toast.app-toast-hiding {
    animation: appToastSlideOut 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.app-toast-content {
    display: flex;
    align-items: flex-start;
    gap: 0.95rem;
    padding: 1.15rem 1.25rem 1rem;
}

.app-toast-icon-wrap {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.85rem;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.app-toast:hover .app-toast-icon-wrap {
    transform: scale(1.06);
}

.app-toast-body {
    flex: 1;
    min-width: 0;
}

.app-toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.3rem;
}

.app-toast-title {
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.app-toast-close {
    background: transparent;
    border: none;
    color: var(--rcp-muted);
    font-size: 0.82rem;
    padding: 0.25rem 0.4rem;
    border-radius: 0.5rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.65;
    transition: opacity 0.15s ease, background 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.app-toast-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.07);
    color: var(--rcp-ink);
    transform: scale(1.1);
}

.app-toast-message {
    font-size: 0.86rem;
    line-height: 1.48;
    font-weight: 600;
    color: var(--rcp-ink);
    opacity: 0.92;
    word-break: break-word;
}

.app-toast-progress {
    position: relative;
    width: 100%;
    height: 3.5px;
    background: rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.app-toast-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left center;
    animation: appToastProgress linear forwards;
}

.app-toast:hover .app-toast-progress-bar {
    animation-play-state: paused !important;
}

/* Success Theme */
.app-toast-success {
    border-left: 4px solid #10b981;
}
.app-toast-success .app-toast-icon-wrap {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(5, 150, 105, 0.28));
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.35);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
}
.app-toast-success .app-toast-title {
    color: #047857;
}
.app-toast-success .app-toast-progress-bar {
    background: linear-gradient(90deg, #10b981, #059669);
}

/* Danger / Error Theme */
.app-toast-danger {
    border-left: 4px solid #ef4444;
}
.app-toast-danger .app-toast-icon-wrap {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(220, 38, 38, 0.28));
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.35);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
}
.app-toast-danger .app-toast-title {
    color: #b91c1c;
}
.app-toast-danger .app-toast-progress-bar {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* Warning Theme */
.app-toast-warning {
    border-left: 4px solid #f59e0b;
}
.app-toast-warning .app-toast-icon-wrap {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(217, 119, 6, 0.28));
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
}
.app-toast-warning .app-toast-title {
    color: #b45309;
}
.app-toast-warning .app-toast-progress-bar {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

/* Info Theme */
.app-toast-info {
    border-left: 4px solid #6f4df5;
}
.app-toast-info .app-toast-icon-wrap {
    background: linear-gradient(135deg, rgba(111, 77, 245, 0.18), rgba(52, 198, 207, 0.28));
    color: #6f4df5;
    border: 1px solid rgba(111, 77, 245, 0.35);
    box-shadow: 0 4px 14px rgba(111, 77, 245, 0.2);
}
.app-toast-info .app-toast-title {
    color: #5b32e6;
}
.app-toast-info .app-toast-progress-bar {
    background: linear-gradient(90deg, #6f4df5, #34c6cf);
}

/* Dark Theme Overrides */
html[data-theme="dark"] .app-toast {
    background: rgba(22, 27, 44, 0.96);
    border-color: rgba(75, 88, 120, 0.7);
    box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
html[data-theme="dark"] .app-toast-message {
    color: #e2e8f0;
}
html[data-theme="dark"] .app-toast-close {
    color: #94a3b8;
}
html[data-theme="dark"] .app-toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
html[data-theme="dark"] .app-toast-progress {
    background: rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .app-toast-success .app-toast-title {
    color: #34d399;
}
html[data-theme="dark"] .app-toast-success .app-toast-icon-wrap {
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.4);
    box-shadow: 0 0 16px rgba(52, 211, 153, 0.25);
}
html[data-theme="dark"] .app-toast-danger .app-toast-title {
    color: #f87171;
}
html[data-theme="dark"] .app-toast-danger .app-toast-icon-wrap {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.4);
    box-shadow: 0 0 16px rgba(248, 113, 113, 0.25);
}
html[data-theme="dark"] .app-toast-warning .app-toast-title {
    color: #fbbf24;
}
html[data-theme="dark"] .app-toast-warning .app-toast-icon-wrap {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.25);
}
html[data-theme="dark"] .app-toast-info .app-toast-title {
    color: #a78bfa;
}
html[data-theme="dark"] .app-toast-info .app-toast-icon-wrap {
    color: #a78bfa;
    border-color: rgba(167, 139, 250, 0.4);
    box-shadow: 0 0 16px rgba(167, 139, 250, 0.25);
}

/* Animations */
@keyframes appToastSlideIn {
    0% {
        opacity: 0;
        transform: translate3d(0, -25px, 0) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes appToastSlideOut {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
        max-height: 200px;
        margin-bottom: 0.85rem;
    }
    100% {
        opacity: 0;
        transform: translate3d(0, -15px, 0) scale(0.92);
        max-height: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
}

@keyframes appToastProgress {
    0% {
        transform: scaleX(1);
    }
    100% {
        transform: scaleX(0);
    }
}

/* Mobile responsive */
@media (max-width: 600px) {
    .app-toast-container {
        top: max(0.85rem, env(safe-area-inset-top, 0.85rem));
        right: 0.85rem;
        left: 0.85rem;
        width: auto;
    }
    .app-toast-content {
        padding: 0.95rem 1rem 0.85rem;
    }
    .app-toast-icon-wrap {
        width: 2.35rem;
        height: 2.35rem;
        font-size: 1.15rem;
    }
}

/* Responsive quality gate: shared rules for phones, tablets and touch laptops. */
html[data-theme="dark"] .session-plan-metric,
html[data-theme="dark"] .session-plan-breakdown {
    background: rgba(255, 255, 255, .055);
    border-color: rgba(72, 83, 116, .82);
    color: var(--rcp-muted);
}

html[data-theme="dark"] .session-plan-metric-primary {
    background: rgba(111, 77, 245, .14);
    border-color: rgba(155, 123, 255, .45);
}

html[data-theme="dark"] .session-plan-metric strong,
html[data-theme="dark"] .session-plan-breakdown,
html[data-theme="dark"] .session-plan-breakdown .text-dark {
    color: var(--rcp-ink) !important;
}

@media (max-width: 1100px) {
    body.mobile-app-mode .session-plan-overview {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    body.mobile-app-mode .session-plan-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.mobile-app-mode .session-log-page-heading {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
    }

    body.mobile-app-mode .session-plan-breakdown > .d-flex {
        grid-template-columns: 1fr;
    }

    body.mobile-app-mode .action-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.mobile-app-mode .action-strip > * {
        min-width: 0 !important;
    }

    body.mobile-app-mode .row > *,
    body.mobile-app-mode .input-group,
    body.mobile-app-mode .form-control,
    body.mobile-app-mode .form-select,
    body.mobile-app-mode textarea,
    body.mobile-app-mode canvas,
    body.mobile-app-mode svg {
        min-width: 0;
        max-width: 100%;
    }

    body.mobile-app-mode pre,
    body.mobile-app-mode code {
        overflow-wrap: anywhere;
        word-break: break-all;
    }

    body.mobile-app-mode .alert {
        overflow-wrap: break-word;
    }
}

@media (max-width: 700px) {
    body.mobile-app-mode .action-strip {
        grid-template-columns: 1fr;
    }

    body.mobile-app-mode .session-plan-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.mobile-app-mode .session-plan-metric {
        min-height: 78px;
    }

    body.mobile-app-mode .session-log-page-heading {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    body.mobile-app-mode .session-log-page-heading .btn {
        width: 100%;
        min-height: 44px;
        justify-content: center;
        text-align: center;
    }

    body.mobile-app-mode.route-logs-create .mobile-app-tabbar {
        display: none !important;
    }

    body.mobile-app-mode.route-logs-create .content {
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    }

    body.mobile-app-mode #athleteLogForm > .mt-4 {
        align-items: stretch !important;
        flex-direction: column;
        gap: .65rem;
    }

    body.mobile-app-mode #athleteLogForm > .mt-4 .btn {
        width: 100%;
        min-height: 46px;
        white-space: normal;
    }
}

@media (max-width: 340px) {
    body.mobile-app-mode .session-plan-metrics {
        grid-template-columns: 1fr;
    }
}



.shadow-xs {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Recent Session Logs Table & Responsive Data Tables */
.recent-session-logs-table {
    min-width: 820px;
}

.recent-session-logs-table thead th {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--rcp-muted);
    white-space: nowrap;
    padding-top: .75rem;
    padding-bottom: .75rem;
}

.recent-session-logs-table td {
    vertical-align: middle;
}

.recent-session-logs-table .session-log-athlete {
    min-width: 140px;
}

.recent-session-logs-table .session-log-team {
    min-width: 100px;
}

.recent-session-logs-table .session-log-workout {
    min-width: 170px;
}

.recent-session-logs-table .session-log-data {
    min-width: 220px;
}

.recent-session-logs-table .session-log-analysis {
    min-width: 160px;
}

.recent-session-logs-table .session-log-actions {
    min-width: 260px;
    white-space: nowrap;
}

.recent-session-logs-table .btn,
.command-table .btn {
    white-space: nowrap;
}

.command-table {
    min-width: 800px;
}

.command-table thead th,
.command-table td:last-child {
    white-space: nowrap;
}

/* Strength and video library: every part fits in a phone-width workout guide without horizontal scroll. */
.workout-guide-full,
.workout-guide-full .tab-content,
.workout-guide-full .tab-pane,
.workout-guide-modal .modal-body {
    min-width: 0;
    max-width: 100%;
}

.workout-strength-hub {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 1rem;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: .75rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.workout-strength-heading,
.workout-video-library-heading,
.strength-video-card-heading,
.workout-strength-exercise-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .65rem;
}

.workout-strength-heading {
    align-items: center;
    margin-bottom: .9rem;
}

.workout-strength-heading-copy,
.strength-video-card-copy,
.workout-strength-exercise-head > strong {
    min-width: 0;
}

.workout-strength-heading h3,
.workout-video-library-heading h4,
.strength-video-card-heading h5,
.workout-strength-exercise strong {
    overflow-wrap: anywhere;
}

.workout-strength-evidence {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    max-width: 100%;
    padding: .35rem .5rem;
    border: 1px solid #cbd5e1;
    border-radius: .45rem;
    color: #475569;
    background: #fff;
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.25;
}

.workout-strength-evidence i,
.workout-strength-target i {
    color: #2563eb;
}

.workout-strength-exercises {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: .75rem;
    margin: 0 0 1rem;
}

.workout-strength-exercise {
    min-width: 0;
    box-sizing: border-box;
    padding: .9rem;
    border: 1px solid #dbe3ef;
    border-radius: .65rem;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.workout-strength-exercise:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}

.workout-strength-exercise-head {
    margin-bottom: .38rem;
}

.workout-strength-dose {
    flex: 0 1 auto;
    padding: .18rem .4rem;
    border-radius: .35rem;
    color: #fff;
    background: #64748b;
    font-size: .7rem;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
    word-break: break-word;
}

.workout-strength-target {
    margin-bottom: .35rem;
    color: #2563eb;
    font-size: .74rem;
    line-height: 1.3;
}

.workout-strength-cue {
    margin: 0;
    color: #475569;
    font-size: .8rem;
    line-height: 1.45;
}

.exercise-show-btn {
    font-size: .76rem;
    padding: .28rem .65rem;
    border-radius: .4rem;
}

.workout-exercise-detail-panel {
    transition: all .25s ease;
}

.workout-exercise-detail-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.workout-exercise-img-wrapper {
    background: #ffffff;
    border-radius: .5rem;
    overflow: hidden;
}

.workout-exercise-img {
    max-height: 290px;
    width: 100%;
    object-fit: contain;
    background-color: #ffffff;
    display: block;
    margin: 0 auto;
}

.exercise-img-link {
    cursor: zoom-in;
    display: block;
}

.workout-video-library {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding-top: 1rem;
    border-top: 1px solid #cbd5e1;
}

.workout-video-library-heading {
    align-items: center;
    margin-bottom: .7rem;
}

.workout-video-library-heading > * {
    min-width: 0;
}

.strength-video-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .45rem;
    margin-bottom: .8rem;
    min-width: 0;
    max-width: 100%;
}

.strength-video-tab {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 4.2rem;
    padding: .5rem .65rem;
    border: 1px solid #dbe3ef;
    border-radius: .55rem;
    color: #334155;
    background: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: all .15s ease-in-out;
}

.strength-video-tab span,
.strength-video-tab small {
    overflow-wrap: anywhere;
}

.strength-video-tab span {
    color: inherit;
    font-size: .76rem;
    font-weight: 800;
    line-height: 1.22;
}

.strength-video-tab small {
    margin-top: .25rem;
    color: #64748b;
    font-size: .67rem;
    line-height: 1.2;
}

.strength-video-tab:hover,
.strength-video-tab:focus-visible {
    border-color: #2563eb;
    background: #f8fafc;
    outline: 0;
    box-shadow: 0 0 0 .15rem rgba(37, 99, 235, .15);
}

.strength-video-tab.active {
    border-color: #2563eb;
    color: #fff;
    background: #2563eb;
    box-shadow: 0 3px 8px rgba(37, 99, 235, .28);
}

.strength-video-tab.active span {
    color: #fff;
}

.strength-video-tab.active small {
    color: rgba(255, 255, 255, .88);
}

.strength-video-card {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: .8rem;
    border: 1px solid #dbe3ef;
    border-radius: .6rem;
    background: #fff;
}

.strength-video-card-heading {
    margin-bottom: .45rem;
}

.strength-video-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-bottom: .32rem;
}

.strength-video-badges span {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .16rem .35rem;
    border: 1px solid #dbe3ef;
    border-radius: .35rem;
    color: #475569;
    background: #f8fafc;
    font-size: .68rem;
    font-weight: 700;
    line-height: 1.2;
}

.strength-video-badges span:first-child {
    border-color: #334155;
    color: #fff;
    background: #334155;
}

.strength-video-youtube-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.2rem;
    padding: .38rem .55rem;
    border: 1px solid #dc3545;
    border-radius: .45rem;
    color: #c22535;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
}

.strength-video-youtube-link:hover {
    color: #fff;
    background: #c22535;
}

.strength-video-card > p {
    overflow-wrap: anywhere;
}

.strength-video-frame {
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: .5rem;
    background: #000;
}

.strength-video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

html[data-theme="dark"] .workout-strength-hub {
    border-color: rgba(72, 83, 116, .9);
    background: linear-gradient(180deg, #171c31 0%, #12182b 100%);
}

html[data-theme="dark"] .workout-strength-hub h3,
html[data-theme="dark"] .workout-strength-hub h4,
html[data-theme="dark"] .workout-strength-hub h5,
html[data-theme="dark"] .workout-strength-hub .text-dark {
    color: #f1f5f9 !important;
}

html[data-theme="dark"] .workout-strength-hub .text-muted,
html[data-theme="dark"] .workout-strength-hub small {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .workout-strength-evidence,
html[data-theme="dark"] .workout-strength-exercise,
html[data-theme="dark"] .strength-video-tab,
html[data-theme="dark"] .strength-video-card {
    border-color: rgba(72, 83, 116, .9);
    color: var(--rcp-ink);
    background: #1b2239;
}

html[data-theme="dark"] .workout-exercise-detail-box {
    background: #151c2e !important;
    border-color: #2a3556 !important;
}

html[data-theme="dark"] .workout-exercise-img-wrapper {
    background: #0f172a;
}

html[data-theme="dark"] .workout-exercise-img {
    background-color: #0f172a;
}

html[data-theme="dark"] .workout-strength-cue {
    color: #94a3b8;
}

html[data-theme="dark"] .workout-strength-evidence,
html[data-theme="dark"] .workout-strength-exercise p,
html[data-theme="dark"] .strength-video-tab small,
html[data-theme="dark"] .strength-video-badges span {
    color: var(--rcp-muted);
}

html[data-theme="dark"] .workout-video-library {
    border-top-color: rgba(72, 83, 116, .9);
}

html[data-theme="dark"] .strength-video-badges span {
    border-color: rgba(72, 83, 116, .9);
    background: #252d49;
}

html[data-theme="dark"] .strength-video-tab:hover {
    border-color: #3b82f6;
    background: #232c4b;
}

html[data-theme="dark"] .strength-video-tab.active {
    border-color: #3b82f6;
    color: #fff;
    background: #2563eb;
    box-shadow: 0 3px 10px rgba(37, 99, 235, .4);
}

@media (max-width: 720px) {
    .workout-strength-heading,
    .workout-video-library-heading,
    .strength-video-card-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .workout-strength-evidence,
    .strength-video-youtube-link {
        align-self: flex-start;
    }

    .workout-strength-exercises {
        grid-template-columns: 1fr;
    }

    .strength-video-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .4rem;
    }

    .strength-video-tab {
        min-height: 3.2rem;
        padding: .4rem .5rem;
    }

    .strength-video-tab span {
        font-size: .72rem;
    }

    .strength-video-tab small {
        font-size: .64rem;
    }
}

@media (max-width: 460px) {
    .workout-strength-hub {
        padding: .75rem;
        border-radius: .6rem;
    }

    .workout-strength-exercises {
        grid-template-columns: 1fr;
    }

    .strength-video-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .35rem;
    }

    .workout-strength-exercise,
    .strength-video-card {
        padding: .65rem;
    }

    .workout-strength-exercise-head {
        flex-wrap: wrap;
    }

    .strength-video-tab {
        min-height: 3rem;
        padding: .35rem .45rem;
    }

    .strength-video-tab span {
        font-size: .7rem;
    }

    .strength-video-tab small {
        font-size: .62rem;
        margin-top: .15rem;
    }

    .strength-video-youtube-link {
        width: 100%;
    }
}

@media (max-width: 310px) {
    .strength-video-tabs {
        grid-template-columns: 1fr;
    }
}

/* Nutricion deportiva */
.nutrition-dashboard { display: grid; min-width: 0; gap: 1rem; }
.nutrition-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr); align-items: center; gap: 1.5rem; padding: clamp(1.1rem, 3vw, 2rem); color: #fff; background: linear-gradient(125deg, #0f766e, #0891b2); border-radius: .9rem; overflow: hidden; }
.nutrition-hero h2 { margin: .35rem 0 .55rem; color: inherit; font-size: clamp(1.55rem, 2.6vw, 2.25rem); }
.nutrition-hero p { max-width: 54rem; margin: 0; color: rgba(255,255,255,.9); }
.eyebrow { display: inline-flex; align-items: center; gap: .35rem; color: #6d5dfc; font-size: .76rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.nutrition-hero .eyebrow { color: #c6ffed; }
.nutrition-context-pills { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.nutrition-context-pills span { padding: .38rem .62rem; border: 1px solid rgba(255,255,255,.25); border-radius: 99px; background: rgba(0,0,0,.13); font-size: .82rem; font-weight: 700; }
.nutrition-plate { position: relative; width: min(100%, 280px); aspect-ratio: 1; justify-self: center; border: 11px solid #f9fafb; border-radius: 50%; background: conic-gradient(#f8c76a 0 38%, #e88d64 38% 64%, #77c98c 64% 100%); box-shadow: 0 14px 30px rgba(0,0,0,.22); }
.nutrition-plate > div { position: absolute; display: grid; place-content: center; width: 45%; aspect-ratio: 1; padding: .4rem; text-align: center; border-radius: 50%; color: #1e293b; background: rgba(255,255,255,.86); font-size: .7rem; }
.nutrition-plate span { display: block; font-weight: 800; }.nutrition-plate small { font-size: .61rem; line-height: 1.15; }.plate-carbs { top: 8%; left: 27%; }.plate-protein { right: 5%; bottom: 17%; }.plate-produce { left: 5%; bottom: 17%; }
.nutrition-athlete-switcher { display: flex; align-items: center; justify-content: flex-end; gap: .6rem; }.nutrition-athlete-switcher select { max-width: 23rem; }
.nutrition-clinical-alert { display: flex; gap: .8rem; padding: 1rem; border: 1px solid #f5bd68; border-left: 4px solid #ea8b22; border-radius: .7rem; background: #fff9e8; color: #6a4313; }.nutrition-clinical-alert > i { font-size: 1.35rem; color: #d97706; }.nutrition-clinical-alert p { margin: .25rem 0 .4rem; }.nutrition-clinical-alert a { color: inherit; font-weight: 800; }
.nutrition-panel { min-width: 0; max-width: 100%; padding: clamp(.9rem, 2vw, 1.35rem); border: 1px solid #dce5f4; border-radius: .85rem; background: #fff; box-shadow: 0 5px 15px rgba(31,53,95,.05); }.nutrition-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; min-width: 0; gap: 1rem; padding-bottom: .85rem; margin-bottom: 1rem; border-bottom: 1px solid #e5eaf3; }.nutrition-panel-heading > div { min-width: 0; }.nutrition-panel-heading h2 { margin: .18rem 0 .25rem; font-size: 1.22rem; }.nutrition-panel-heading p { margin: 0; color: #5f708d; }.nutrition-panel-heading > i { display: grid; place-items: center; flex: 0 0 2.45rem; width: 2.45rem; height: 2.45rem; border-radius: .65rem; color: #177e89; background: #e9fbf8; font-size: 1.2rem; }
.nutrition-week-grid { display: grid; width: 100%; max-width: 100%; grid-template-columns: repeat(7, minmax(172px, 1fr)); gap: .65rem; overflow-x: auto; overscroll-behavior-inline: contain; padding-bottom: .25rem; }.nutrition-day { min-width: 0; min-height: 20rem; padding: .8rem; border: 1px solid #d9e2ee; border-top: 4px solid #94a3b8; border-radius: .7rem; background: #fbfdff; }.nutrition-day-intensidad { border-top-color: #ef7a45; }.nutrition-day-fondo { border-top-color: #7259d8; }.nutrition-day-competencia { border-top-color: #c13e66; }.nutrition-day-rodaje { border-top-color: #169b83; }.nutrition-day header { display: flex; justify-content: space-between; color: #62738f; font-size: .76rem; font-weight: 800; text-transform: uppercase; }.nutrition-day h3 { margin: .6rem 0 .2rem; font-size: 1rem; }.nutrition-day p { margin: .55rem 0; font-size: .84rem; }.nutrition-session-label { min-height: 2.3rem; color: #52627c; }.nutrition-day-focus { display: flex; gap: .35rem; align-items: flex-start; color: #334155; font-size: .79rem; }.nutrition-day details { margin: .65rem 0; font-size: .78rem; }.nutrition-day summary { cursor: pointer; color: #31548a; font-weight: 800; }.nutrition-day details p { line-height: 1.38; }.nutrition-evidence-link, .nutrition-education-grid a { color: #5b43c9; font-size: .78rem; font-weight: 800; text-decoration: none; }
.nutrition-fields { display: grid; gap: .75rem; margin-bottom: .75rem; }.nutrition-fields.four { grid-template-columns: repeat(4, minmax(0,1fr)); }.nutrition-fields.two { grid-template-columns: repeat(2, minmax(0,1fr)); }.nutrition-profile-form label, .nutrition-checkin-form > label, .nutrition-hydration-form > label { display: grid; gap: .35rem; color: #41546f; font-size: .78rem; font-weight: 800; }.nutrition-profile-form input, .nutrition-profile-form select, .nutrition-profile-form textarea, .nutrition-checkin-form select, .nutrition-checkin-form textarea, .nutrition-hydration-form input { width: 100%; min-height: 2.55rem; padding: .55rem .65rem; border: 1px solid #ccd8ea; border-radius: .55rem; color: #182b50; background: #f9fbfe; font: inherit; font-weight: 600; }.nutrition-profile-form textarea, .nutrition-checkin-form textarea { min-height: 5rem; resize: vertical; }.nutrition-consents { display: grid; gap: .45rem; margin: .85rem 0; padding: .75rem; border-radius: .6rem; background: #f5f8fd; }.nutrition-consents label { display: flex; align-items: flex-start; gap: .5rem; font-size: .82rem; }.nutrition-consents input { width: auto; min-height: auto; margin-top: .2rem; }
.nutrition-timing-grid, .nutrition-recipe-grid, .nutrition-education-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }.nutrition-timing-grid article, .nutrition-education-grid article { padding: .85rem; border-left: 3px solid #2aa899; background: #f7fbfd; }.nutrition-timing-grid span { color: #0f766e; font-size: .74rem; font-weight: 800; text-transform: uppercase; }.nutrition-timing-grid h3, .nutrition-education-grid h3 { margin: .35rem 0; font-size: .98rem; }.nutrition-timing-grid p, .nutrition-education-grid p { margin: 0; color: #516178; font-size: .84rem; line-height: 1.45; }
.nutrition-recipe-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }.nutrition-recipe { overflow: hidden; border: 1px solid #e1e8f2; border-radius: .7rem; background: #fff; }.nutrition-recipe h3, .nutrition-recipe p, .nutrition-recipe footer { margin-right: .8rem; margin-left: .8rem; }.nutrition-recipe h3 { margin-top: .7rem; margin-bottom: .25rem; font-size: 1rem; }.nutrition-recipe p { color: #53637a; font-size: .83rem; }.nutrition-recipe footer { display: flex; justify-content: space-between; gap: .5rem; padding: .6rem 0; color: #516178; font-size: .72rem; }.nutrition-recipe-illustration { display: flex; align-items: center; justify-content: space-between; min-height: 5.6rem; padding: 1rem; color: #1c5a5c; background: linear-gradient(120deg,#f4e7a0,#9ae2ce); }.nutrition-recipe-illustration i { font-size: 2rem; }.nutrition-recipe-illustration span { padding: .25rem .4rem; border-radius: 99px; background: rgba(255,255,255,.7); font-size: .72rem; font-weight: 800; }
.nutrition-tracking-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1rem; }.nutrition-score-fields { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .65rem; margin-bottom: .75rem; }.nutrition-score-fields label { display: grid; gap: .3rem; color: #41546f; font-size: .75rem; font-weight: 800; }.nutrition-hydration-form { padding: .9rem; border-radius: .65rem; background: #f1fbfb; }.nutrition-hydration-form h3 { margin-top: 0; }.nutrition-hydration-form p { color: #557084; font-size: .84rem; }.nutrition-mini-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; margin: .75rem 0; }.nutrition-checkin-form button, .nutrition-hydration-form button { margin-top: .75rem; }.nutrition-checkin-history { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e1e8f2; }.nutrition-checkin-history h3 { width: 100%; margin: 0 0 .2rem; font-size: .92rem; }.nutrition-checkin-history span { padding: .35rem .55rem; border-radius: .4rem; color: #43546d; background: #f3f6fb; font-size: .78rem; }
.nutrition-education-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }.nutrition-education-grid article { border-top: 3px solid #7c5ce5; border-left: 0; }.nutrition-references { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid #e5eaf3; }.nutrition-references summary { cursor: pointer; color: #243a60; font-weight: 800; }.nutrition-references ul { padding-left: 1.2rem; margin: .7rem 0 0; }.nutrition-references li { margin: .5rem 0; color: #43546d; font-size: .84rem; }.nutrition-references span { padding: .14rem .35rem; border-radius: .35rem; color: #426179; background: #edf6f5; font-size: .7rem; font-weight: 800; }.nutrition-empty-state { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; max-width: 50rem; padding: 2rem; margin: 7vh auto; border: 1px dashed #a6b5cd; border-radius: .85rem; background: #fff; }.nutrition-empty-state > i { font-size: 2.6rem; color: #0f9b8e; }.nutrition-empty-state h2 { margin: 0; }.nutrition-empty-state p { margin: .3rem 0 1rem; color: #60718a; }.nutrition-athlete-select { grid-column: 2; display: grid; gap: .35rem; max-width: 24rem; }.nutrition-athlete-select select { padding: .55rem; border: 1px solid #ccd8ea; border-radius: .5rem; }
html[data-theme="dark"] .nutrition-panel, html[data-theme="dark"] .nutrition-empty-state, html[data-theme="dark"] .nutrition-recipe { border-color: #33415f; background: #17213b; } html[data-theme="dark"] .nutrition-day { border-color: #3a4661; background: #202942; } html[data-theme="dark"] .nutrition-panel-heading { border-color: #33415f; } html[data-theme="dark"] .nutrition-panel-heading h2, html[data-theme="dark"] .nutrition-day h3, html[data-theme="dark"] .nutrition-empty-state h2 { color: #f4f7ff; } html[data-theme="dark"] .nutrition-panel-heading p, html[data-theme="dark"] .nutrition-day p, html[data-theme="dark"] .nutrition-recipe p, html[data-theme="dark"] .nutrition-timing-grid p, html[data-theme="dark"] .nutrition-education-grid p { color: #b7c4da; } html[data-theme="dark"] .nutrition-profile-form input, html[data-theme="dark"] .nutrition-profile-form select, html[data-theme="dark"] .nutrition-profile-form textarea, html[data-theme="dark"] .nutrition-checkin-form select, html[data-theme="dark"] .nutrition-checkin-form textarea, html[data-theme="dark"] .nutrition-hydration-form input { color: #edf3ff; border-color: #3b4a69; background: #202a44; } html[data-theme="dark"] .nutrition-consents, html[data-theme="dark"] .nutrition-timing-grid article { background: #202a43; } html[data-theme="dark"] .nutrition-hydration-form { background: #17333d; } html[data-theme="dark"] .nutrition-checkin-history span { color: #c7d2e6; background: #252f4b; } html[data-theme="dark"] .nutrition-clinical-alert { color: #ffe3aa; background: #412f1c; border-color: #a9691d; }
@media (max-width: 1100px) { .nutrition-hero { grid-template-columns: 1fr 220px; }.nutrition-fields.four { grid-template-columns: repeat(2,minmax(0,1fr)); }.nutrition-timing-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 720px) { .nutrition-hero { grid-template-columns: 1fr; padding: 1rem; }.nutrition-plate { width: 190px; }.nutrition-athlete-switcher { justify-content: stretch; }.nutrition-athlete-switcher select { flex: 1; }.nutrition-fields.four, .nutrition-fields.two, .nutrition-tracking-grid, .nutrition-recipe-grid, .nutrition-education-grid { grid-template-columns: 1fr; }.nutrition-score-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }.nutrition-panel { padding: .85rem; }.nutrition-week-grid { margin-right: -.85rem; }.nutrition-day { min-height: auto; }.nutrition-recipe footer { align-items: flex-start; flex-direction: column; }.nutrition-empty-state { grid-template-columns: 1fr; margin: 1rem 0; }.nutrition-athlete-select { grid-column: auto; }.nutrition-clinical-alert { align-items: flex-start; } }
@media (max-width: 390px) { .nutrition-score-fields, .nutrition-mini-fields, .nutrition-timing-grid { grid-template-columns: 1fr; }.nutrition-context-pills { display: grid; grid-template-columns: 1fr 1fr; }.nutrition-context-pills span { font-size: .72rem; } }

/* Seguridad y passkeys: la biometria se gestiona en el dispositivo, nunca en el servidor. */
.security-dashboard { display: grid; gap: 1rem; min-width: 0; }.security-hero { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: clamp(1rem, 3vw, 2rem); border-radius: .85rem; color: #fff; background: linear-gradient(120deg, #33228a, #2765bf); }.security-hero h2 { margin: .3rem 0 .5rem; color: #fff; font-size: clamp(1.45rem, 2.4vw, 2rem); }.security-hero p { max-width: 52rem; margin: 0; color: rgba(255,255,255,.9); }.security-hero .eyebrow { color: #d7e6ff; }.security-hero-icon { flex: 0 0 auto; font-size: clamp(3.5rem, 8vw, 6rem); opacity: .85; }.security-panel { min-width: 0; padding: clamp(.9rem, 2vw, 1.35rem); border: 1px solid #dce5f4; border-radius: .85rem; background: #fff; box-shadow: 0 5px 15px rgba(31,53,95,.05); }.security-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-bottom: .85rem; margin-bottom: 1rem; border-bottom: 1px solid #e5eaf3; }.security-panel-heading h2 { margin: .2rem 0 .25rem; font-size: 1.2rem; }.security-panel-heading p { max-width: 48rem; margin: 0; color: #5f708d; }.security-panel-heading > i { display: grid; place-items: center; flex: 0 0 2.5rem; width: 2.5rem; height: 2.5rem; border-radius: .65rem; color: #305ba8; background: #ecf3ff; font-size: 1.2rem; }.security-enroll-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }.security-support { color: #536882; font-size: .85rem; font-weight: 700; }.passkey-status { min-height: 1.25rem; margin: .75rem 0 0; color: #34527b; font-size: .86rem; font-weight: 700; }.security-note { display: flex; align-items: flex-start; gap: .6rem; margin-top: 1rem; padding: .8rem; border-radius: .6rem; color: #4f6078; background: #f4f7fc; font-size: .84rem; }.security-note i { color: #684bd9; }.security-device-list { display: grid; gap: .65rem; }.security-device { display: flex; align-items: center; gap: .8rem; padding: .8rem; border: 1px solid #dfe7f2; border-radius: .65rem; background: #fbfdff; }.security-device > i { display: grid; place-items: center; flex: 0 0 2.4rem; width: 2.4rem; height: 2.4rem; border-radius: .55rem; color: #287156; background: #e7f8ee; }.security-device > div { display: grid; min-width: 0; gap: .15rem; }.security-device strong { color: #233a61; }.security-device span { color: #62748e; font-size: .78rem; }.security-device form { margin-left: auto; }.security-empty { display: flex; align-items: center; gap: .75rem; padding: 1rem; border: 1px dashed #a9b8ce; border-radius: .65rem; color: #51637d; }.security-empty > i { font-size: 1.8rem; color: #5e54c7; }.security-empty div { display: grid; gap: .15rem; }.passkey-login { display: grid; gap: .7rem; padding: .9rem; margin-top: 1rem; border: 1px solid #d8e3f5; border-radius: .7rem; background: #f8fbff; }.passkey-login > div { display: grid; grid-template-columns: auto 1fr; column-gap: .6rem; align-items: center; }.passkey-login > div > i { grid-row: span 2; color: #5446c7; font-size: 1.55rem; }.passkey-login strong { color: #263d66; font-size: .88rem; }.passkey-login p { margin: .15rem 0 0; color: #61738d; font-size: .78rem; }.passkey-login .passkey-status { margin: 0; }
html[data-theme="dark"] .security-panel, html[data-theme="dark"] .passkey-login { border-color: #33415f; background: #17213b; } html[data-theme="dark"] .security-panel-heading { border-color: #33415f; } html[data-theme="dark"] .security-panel-heading h2, html[data-theme="dark"] .security-device strong, html[data-theme="dark"] .passkey-login strong { color: #f2f5ff; } html[data-theme="dark"] .security-panel-heading p, html[data-theme="dark"] .security-device span, html[data-theme="dark"] .security-support, html[data-theme="dark"] .passkey-login p { color: #b6c5dd; } html[data-theme="dark"] .security-device { border-color: #36435f; background: #202a43; } html[data-theme="dark"] .security-note { color: #bdc9dc; background: #202a43; } html[data-theme="dark"] .security-empty { color: #bdc9dc; }
@media (max-width: 720px) { .security-hero { align-items: flex-start; }.security-hero-icon { font-size: 3.2rem; }.security-panel { padding: .85rem; }.security-device { align-items: flex-start; flex-wrap: wrap; }.security-device form { width: 100%; margin-left: 3.2rem; }.security-device form button { width: 100%; }.topbar-security-btn span { display: none; } }

/* Seguridad debe seguir disponible cuando la barra lateral se reemplaza por la app movil. */
body.mobile-app-mode .topbar-actions > .topbar-security-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 34px;
    min-height: 34px;
    padding: .35rem .5rem;
}

body.mobile-app-mode .topbar-security-btn span {
    display: none;
}

/* Integración Strava */
.integration-dashboard { display: grid; gap: 1rem; min-width: 0; }
.integration-hero { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: clamp(1rem, 3vw, 2rem); border-radius: .85rem; color: #fff; overflow: hidden; }
.integration-hero-strava { background: linear-gradient(120deg, #fc4c02, #df3115); }.integration-hero h2 { margin: .3rem 0 .5rem; color: #fff; font-size: clamp(1.45rem, 2.4vw, 2rem); }.integration-hero p { max-width: 52rem; margin: 0; color: rgba(255,255,255,.92); }.integration-hero .eyebrow { color: #ffe2d5; }.integration-hero-icon { flex: 0 0 auto; font-size: clamp(3.5rem, 8vw, 6rem); opacity: .9; }
.integration-panel { min-width: 0; padding: clamp(.9rem, 2vw, 1.35rem); border: 1px solid #dce5f4; border-radius: .85rem; background: #fff; box-shadow: 0 5px 15px rgba(31,53,95,.05); }.integration-panel-heading { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .85rem; margin-bottom: 1rem; border-bottom: 1px solid #e5eaf3; }.integration-panel-heading h2 { margin: .18rem 0 .25rem; font-size: 1.2rem; }.integration-panel-heading p { margin: 0; color: #5f708d; }.integration-panel-heading > i { display: grid; place-items: center; flex: 0 0 2.45rem; width: 2.45rem; height: 2.45rem; border-radius: .65rem; color: #e44310; background: #fff0eb; font-size: 1.2rem; }
.integration-empty,.integration-setup-note,.integration-connected { display: flex; align-items: center; gap: .8rem; padding: 1rem; border-radius: .65rem; }.integration-empty { border: 1px dashed #a9b8ce; color: #51637d; }.integration-setup-note { color: #795100; background: #fff8df; border: 1px solid #f0cc71; }.integration-connected { color: #176547; background: #eaf8f0; border: 1px solid #a9ddc3; }.integration-empty > i,.integration-setup-note > i,.integration-connected > i { font-size: 1.6rem; }.integration-empty div,.integration-setup-note div,.integration-connected div { display: grid; gap: .14rem; }.integration-empty span,.integration-setup-note span,.integration-connected span { font-size: .84rem; }
.btn-strava { color: #fff; background: #fc4c02; border-color: #fc4c02; }.btn-strava:hover,.btn-strava:focus { color: #fff; background: #d94000; border-color: #d94000; }.integration-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }.integration-activity-list { display: grid; gap: .6rem; }.integration-activity { display: grid; grid-template-columns: minmax(170px,1.6fr) repeat(3,minmax(90px,.7fr)); align-items: center; gap: .75rem; padding: .8rem; border: 1px solid #dfe7f2; border-radius: .65rem; background: #fbfdff; }.integration-activity > div,.integration-activity > span { display: grid; gap: .08rem; min-width: 0; }.integration-activity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #233a61; }.integration-activity small,.integration-activity > div span { color: #62748e; font-size: .77rem; }.integration-activity > span b { color: #253b60; font-size: .9rem; }
html[data-theme="dark"] .integration-panel,html[data-theme="dark"] .integration-activity { border-color: #33415f; background: #17213b; } html[data-theme="dark"] .integration-panel-heading { border-color: #33415f; } html[data-theme="dark"] .integration-panel-heading h2,html[data-theme="dark"] .integration-activity strong,html[data-theme="dark"] .integration-activity > span b { color: #f2f5ff; } html[data-theme="dark"] .integration-panel-heading p,html[data-theme="dark"] .integration-activity small,html[data-theme="dark"] .integration-activity > div span { color: #b6c5dd; }
@media (max-width: 720px) { .integration-hero { align-items: flex-start; }.integration-hero-icon { font-size: 3.2rem; }.integration-panel { padding: .85rem; }.integration-activity { grid-template-columns: 1fr 1fr; }.integration-activity > div { grid-column: 1 / -1; } }
/* Notification center */
.notification-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--rc-border, rgba(119, 132, 170, .42));
    border-radius: .65rem;
    color: var(--rc-text, inherit);
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}
.notification-bell:hover,
.notification-bell:focus-visible {
    background: rgba(111, 77, 245, .14);
    color: #6f4df5;
}
.notification-bell.dropdown-toggle::after {
    display: none !important;
}
.notification-badge {
    position: absolute;
    top: -.45rem;
    right: -.45rem;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 .25rem;
    border-radius: 99px;
    background: #ef476f;
    color: #fff;
    font-size: .65rem;
    font-weight: 800;
    line-height: 1.1rem;
    text-align: center;
}
.notification-toolbar { border-left: 3px solid #6f4df5; }
.notification-unread-summary strong { color: #6f4df5; font-size: 1.2rem; }
.notification-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
    padding: 1rem 1.15rem;
    margin-bottom: .75rem;
    border: 1px solid var(--rc-border, rgba(119, 132, 170, .32));
    border-left: 4px solid #94a3b8;
    border-radius: .65rem;
    background: var(--rc-panel, rgba(255, 255, 255, .04));
}
.notification-card.is-unread { box-shadow: 0 0 0 1px rgba(111, 77, 245, .14); }
.notification-card-icon {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .65rem;
    background: rgba(111, 77, 245, .12);
    color: #6f4df5;
    font-size: 1.15rem;
}
.notification-card-body { min-width: 0; }
.notification-card-body p { color: var(--rc-text-muted, #64748b); white-space: normal; }
.notification-card-actions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.notification-priority { color: var(--rc-text-muted, #64748b); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }
.notification-info { border-left-color: #3b82f6; }
.notification-primary { border-left-color: #6f4df5; }
.notification-success { border-left-color: #10b981; }
.notification-warning { border-left-color: #f59e0b; }
.notification-danger { border-left-color: #ef476f; }
.priority-urgent .notification-card-icon { background: rgba(239, 71, 111, .14); color: #ef476f; }
.priority-high .notification-card-icon { background: rgba(245, 158, 11, .14); color: #d97706; }
@media (max-width: 700px) {
    .notification-card { grid-template-columns: auto minmax(0, 1fr); }
    .notification-card-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
