/* =========================================================
   DYgitalFit
   Estilos principales
========================================================= */

:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;

    --text: #111827;
    --text-soft: #6b7280;
    --text-light: #9ca3af;

    --primary: #16a34a;
    --primary-dark: #15803d;
    --primary-soft: #dcfce7;

    --border: #e5e7eb;

    --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);

    --radius: 20px;
    --radius-small: 14px;
}


/* =========================================================
   RESET
========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
}


/* =========================================================
   APP
========================================================= */

.app {
    min-height: 100vh;
}


/* =========================================================
   HEADER
========================================================= */

.header-app {
    height: 76px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 40px;

    position: sticky;
    top: 0;
    z-index: 100;

    backdrop-filter: blur(12px);

    overflow: hidden;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo-mark {
    width: 42px;
    height: 42px;

    background: var(--primary);
    color: white;

    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
    font-weight: 800;
}

.logo-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-name span {
    color: var(--primary);
}

.logo-subtitle {
    color: var(--text-light);
    font-size: 10px;
    margin-top: -2px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-shrink: 1;
    max-width: 55%;
}

.user-avatar {
    width: 40px;
    height: 40px;

    border-radius: 50%;

    background: var(--primary-soft);
    color: var(--primary-dark);

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 800;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info strong {
    font-size: 13px;
}

.user-info span {
    font-size: 11px;
    color: var(--text-light);
}

.logout-button {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-left: 8px;

    border-radius: 10px;

    color: var(--text-soft);
    background: var(--surface-soft);

    transition: 0.2s;
}

.logout-button:hover {
    background: #fee2e2;
    color: #dc2626;
}


/* =========================================================
   DASHBOARD
========================================================= */

.dashboard {
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;

    padding: 42px 0 100px;
}


/* =========================================================
   WELCOME
========================================================= */

.welcome-section {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 30px;
}

.eyebrow {
    display: inline-block;

    font-size: 12px;
    font-weight: 700;

    color: var(--primary);

    text-transform: uppercase;
    letter-spacing: 0.8px;

    margin-bottom: 5px;
}

.welcome-section h1 {
    font-size: 34px;
    line-height: 1.1;

    letter-spacing: -1px;

    margin-bottom: 7px;
}

.welcome-section p {
    color: var(--text-soft);
    font-size: 14px;
}

.welcome-icon {
    width: 70px;
    height: 70px;

    border-radius: 22px;

    background: var(--primary-soft);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 32px;
}


/* =========================================================
   PROGRAM CARD
========================================================= */

.program-card {
    background: linear-gradient(
        135deg,
        #14532d,
        #166534
    );

    color: white;

    border-radius: var(--radius);

    padding: 28px;

    box-shadow: var(--shadow);

    margin-bottom: 38px;
}

.program-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;
}

.card-label {
    font-size: 10px;
    font-weight: 700;

    letter-spacing: 1.2px;

    opacity: 0.7;
}

.program-card h2 {
    font-size: 22px;
    margin-top: 5px;

    letter-spacing: -0.4px;
}

.week-badge {
    padding: 8px 13px;

    border-radius: 30px;

    background: rgba(255, 255, 255, 0.12);

    font-size: 12px;
    font-weight: 700;

    white-space: nowrap;
}

.program-progress {
    margin-top: 26px;
}

.progress-info {
    display: flex;
    justify-content: space-between;

    font-size: 12px;

    margin-bottom: 9px;
}

.progress-info strong {
    font-size: 13px;
}

.progress-bar {
    height: 9px;

    background: rgba(255, 255, 255, 0.15);

    border-radius: 20px;

    overflow: hidden;
}

.progress-fill {
    height: 100%;

    background: white;

    border-radius: inherit;

    transition: width 0.5s ease;
}

.progress-footer {
    display: flex;
    justify-content: space-between;

    margin-top: 10px;

    font-size: 11px;

    opacity: 0.7;
}


/* =========================================================
   EMPTY
========================================================= */

.empty-card {
    background: var(--surface);
    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 40px;

    text-align: center;

    margin-bottom: 38px;
}

.empty-icon {
    font-size: 35px;
    margin-bottom: 10px;
}

.empty-card h2 {
    font-size: 20px;
    margin-bottom: 5px;
}

.empty-card p {
    color: var(--text-soft);
    font-size: 13px;
}


/* =========================================================
   SECTIONS
========================================================= */

.section-block {
    margin-bottom: 38px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    margin-bottom: 16px;
}

.section-kicker {
    display: block;

    font-size: 10px;
    font-weight: 800;

    color: var(--primary);

    letter-spacing: 1px;

    margin-bottom: 2px;
}

.section-heading h2 {
    font-size: 21px;
    letter-spacing: -0.4px;
}

.section-day {
    font-size: 12px;
    color: var(--text-light);
}

.text-link {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.text-link:hover {
    color: var(--primary-dark);
}


/* =========================================================
   WORKOUT CARD
========================================================= */

.workout-card {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 25px;

    display: flex;
    gap: 22px;

    box-shadow: var(--shadow);

    transition: 0.2s;
}

.workout-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.09);
}

.workout-icon {
    width: 58px;
    height: 58px;

    flex-shrink: 0;

    border-radius: 17px;

    background: var(--primary-soft);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 26px;
}

.workout-content {
    flex: 1;
}

.workout-type {
    color: var(--primary);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 0.8px;
}

.workout-content h3 {
    font-size: 21px;
    margin: 3px 0 5px;

    letter-spacing: -0.4px;
}

.workout-content p {
    color: var(--text-soft);

    font-size: 13px;

    max-width: 700px;
}

.workout-meta {
    display: flex;
    align-items: center;
    gap: 8px;

    margin-top: 12px;

    color: var(--text-soft);

    font-size: 12px;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    margin-top: 20px;

    padding: 12px 18px;

    border-radius: 12px;

    background: var(--primary);
    color: white;

    font-size: 12px;
    font-weight: 700;

    transition: 0.2s;
}

.primary-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.primary-button span {
    font-size: 16px;
}


/* =========================================================
   REST CARD
========================================================= */

.rest-card {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 25px;

    display: flex;
    gap: 18px;

    align-items: center;
}

.rest-icon {
    width: 55px;
    height: 55px;

    background: #f3f4f6;

    border-radius: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 25px;

    flex-shrink: 0;
}

.rest-card h3 {
    font-size: 17px;
    margin: 3px 0;
}

.rest-card p {
    color: var(--text-soft);
    font-size: 13px;
}


/* =========================================================
   STATS
========================================================= */

.stats-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 15px;
}

.stat-card {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius-small);

    padding: 20px;

    min-height: 150px;

    display: flex;
    flex-direction: column;
}

.stat-icon {
    width: 38px;
    height: 38px;

    background: var(--surface-soft);

    border-radius: 11px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;

    margin-bottom: 14px;
}

.stat-card > span {
    color: var(--text-soft);

    font-size: 11px;

    margin-bottom: 4px;
}

.stat-card strong {
    font-size: 25px;

    letter-spacing: -0.5px;
}

.stat-card strong small {
    font-size: 12px;
    color: var(--text-soft);
    font-weight: 500;
}


/* =========================================================
   HABITS
========================================================= */

.habits-grid {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 12px;
}

.habit-card {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius-small);

    padding: 15px;

    display: flex;
    align-items: center;

    gap: 12px;
}

.habit-icon {
    width: 42px;
    height: 42px;

    border-radius: 12px;

    background: var(--primary-soft);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;

    flex-shrink: 0;
}

.habit-info {
    flex: 1;

    display: flex;
    flex-direction: column;
}

.habit-info strong {
    font-size: 13px;
}

.habit-info span {
    font-size: 11px;
    color: var(--text-light);
}

.habit-status {
    font-size: 12px;
    font-weight: 800;

    color: var(--text-light);
}


/* =========================================================
   BOTTOM NAVIGATION
========================================================= */

.bottom-navigation {
    display: none;
}


/* =========================================================
   RESPONSIVE TABLET
========================================================= */

@media (max-width: 800px) {

    .header-app {
        padding: 0 22px;
    }

    .dashboard {
        width: min(100% - 32px, 650px);

        padding-top: 30px;
    }

    .welcome-section h1 {
        font-size: 29px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-card:last-child {
        grid-column: span 2;
    }
}


/* =========================================================
   RESPONSIVE MOBILE
========================================================= */

@media (max-width: 600px) {

    body {
        padding-bottom: 75px;
    }

    .header-app {
        height: 64px;

        padding: 0 16px;
    }

    .logo-mark {
        width: 36px;
        height: 36px;

        border-radius: 10px;

        font-size: 17px;
    }

    .logo-name {
        font-size: 18px;
    }

    .logo-subtitle {
        display: none;
    }

    .user-info {
        display: none;
    }

    .user-avatar {
        width: 34px;
        height: 34px;
    }

    .logout-button {
        width: 32px;
        height: 32px;
    }

    .dashboard {
        width: calc(100% - 28px);

        padding: 26px 0 30px;
    }

    .welcome-section {
        margin-bottom: 22px;
    }

    .welcome-section h1 {
        font-size: 26px;
    }

    .welcome-section p {
        font-size: 12px;
    }

    .welcome-icon {
        width: 50px;
        height: 50px;

        border-radius: 15px;

        font-size: 23px;
    }

    .program-card {
        padding: 20px;

        border-radius: 18px;

        margin-bottom: 30px;
    }

    .program-top {
        flex-direction: column;
        gap: 12px;
    }

    .program-card h2 {
        font-size: 18px;
    }

    .week-badge {
        font-size: 10px;
    }

    .progress-footer {
        font-size: 9px;
    }

    .section-block {
        margin-bottom: 30px;
    }

    .section-heading h2 {
        font-size: 19px;
    }

    .workout-card {
        padding: 19px;

        flex-direction: column;

        gap: 15px;

        border-radius: 18px;
    }

    .workout-icon {
        width: 48px;
        height: 48px;

        border-radius: 14px;

        font-size: 21px;
    }

    .workout-content h3 {
        font-size: 18px;
    }

    .workout-content p {
        font-size: 12px;
    }

    .workout-meta {
        font-size: 10px;
    }

    .primary-button {
        width: 100%;

        justify-content: center;

        padding: 13px;

        font-size: 11px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;

        gap: 10px;
    }

    .stat-card {
        min-height: 125px;

        padding: 15px;
    }

    .stat-card:last-child {
        grid-column: span 2;
    }

    .stat-icon {
        width: 34px;
        height: 34px;

        margin-bottom: 9px;
    }

    .stat-card strong {
        font-size: 22px;
    }

    .habits-grid {
        grid-template-columns: 1fr;
    }

    .habit-card {
        padding: 13px;
    }


    /* -----------------------------------------------------
       MOBILE NAV
    ----------------------------------------------------- */

    .bottom-navigation {
        position: fixed;

        bottom: 0;
        left: 0;
        right: 0;

        height: 68px;

        background: rgba(255, 255, 255, 0.96);

        border-top: 1px solid var(--border);

        display: flex;

        align-items: center;
        justify-content: space-around;

        z-index: 200;

        backdrop-filter: blur(15px);

        padding-bottom: env(safe-area-inset-bottom);
    }

    .nav-item {
        flex: 1;

        display: flex;

        flex-direction: column;

        align-items: center;
        justify-content: center;

        gap: 3px;

        color: var(--text-light);

        font-size: 19px;

        transition: 0.2s;
    }

    .nav-item small {
        font-size: 9px;
        font-weight: 600;
    }

    .nav-item.active {
        color: var(--primary);
    }

    .nav-item:hover {
        color: var(--primary);
    }
}


/* =========================================================
   VERY SMALL SCREENS
========================================================= */

@media (max-width: 380px) {

    .dashboard {
        width: calc(100% - 22px);
    }

    .welcome-section h1 {
        font-size: 23px;
    }

    .welcome-icon {
        display: none;
    }

    .program-card {
        padding: 17px;
    }

    .section-heading h2 {
        font-size: 17px;
    }

}

/* =========================================================
   RUTINA DE ENTRENAMIENTO
========================================================= */

.routine-page {
    max-width: 950px;
}


/* =========================================================
   VOLVER
========================================================= */

.back-link {
    display: inline-flex;
    align-items: center;

    gap: 7px;

    color: var(--text-soft);

    font-size: 12px;
    font-weight: 600;

    margin-bottom: 22px;

    transition: 0.2s;
}

.back-link:hover {
    color: var(--primary);
}


/* =========================================================
   HERO DE RUTINA
========================================================= */

.routine-hero {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 28px;

    display: flex;

    gap: 20px;

    align-items: flex-start;

    box-shadow: var(--shadow);

    margin-bottom: 35px;
}

.routine-hero-icon {
    width: 64px;
    height: 64px;

    border-radius: 18px;

    background: var(--primary-soft);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 29px;

    flex-shrink: 0;
}

.routine-hero-content {
    flex: 1;
}

.routine-hero-content h1 {
    font-size: 29px;

    letter-spacing: -0.8px;

    margin: 3px 0 7px;
}

.routine-hero-content p {
    color: var(--text-soft);

    font-size: 13px;

    max-width: 700px;
}

.routine-meta {
    display: flex;

    align-items: center;

    gap: 9px;

    margin-top: 14px;

    color: var(--text-soft);

    font-size: 11px;
}


/* =========================================================
   LISTA EJERCICIOS
========================================================= */

.exercise-list {
    display: flex;

    flex-direction: column;

    gap: 14px;
}


/* =========================================================
   TARJETA EJERCICIO
========================================================= */

.exercise-card {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius-small);

    padding: 20px;

    display: flex;

    gap: 18px;

    box-shadow: 0 5px 20px rgba(15, 23, 42, 0.035);

    transition: 0.2s;
}

.exercise-card:hover {
    border-color: #d1d5db;

    transform: translateY(-1px);
}


/* =========================================================
   NÚMERO EJERCICIO
========================================================= */

.exercise-number {
    width: 42px;
    height: 42px;

    border-radius: 12px;

    background: var(--surface-soft);

    color: var(--text-light);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 12px;
    font-weight: 800;

    flex-shrink: 0;
}


/* =========================================================
   CONTENIDO
========================================================= */

.exercise-main {
    flex: 1;

    min-width: 0;
}

.exercise-heading {
    display: flex;

    justify-content: space-between;

    gap: 10px;
}

.exercise-muscle {
    display: block;

    color: var(--primary);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 0.8px;

    text-transform: uppercase;

    margin-bottom: 2px;
}

.exercise-heading h3 {
    font-size: 17px;

    letter-spacing: -0.2px;
}


/* =========================================================
   DATOS DEL EJERCICIO
========================================================= */

.exercise-data {
    display: flex;

    gap: 10px;

    margin-top: 14px;
}

.exercise-data-item {
    min-width: 105px;

    background: var(--surface-soft);

    border-radius: 10px;

    padding: 9px 11px;

    display: flex;

    flex-direction: column;
}

.exercise-data-item span {
    color: var(--text-light);

    font-size: 8px;

    font-weight: 700;

    letter-spacing: 0.6px;

    margin-bottom: 2px;
}

.exercise-data-item strong {
    font-size: 13px;
}


/* =========================================================
   EQUIPO
========================================================= */

.exercise-equipment {
    display: inline-flex;

    align-items: center;

    margin-top: 12px;

    padding: 6px 9px;

    border-radius: 8px;

    background: #f9fafb;

    color: var(--text-soft);

    font-size: 10px;
}


/* =========================================================
   INSTRUCCIONES
========================================================= */

.exercise-details {
    margin-top: 13px;

    border-top: 1px solid var(--border);

    padding-top: 11px;
}

.exercise-details summary {
    cursor: pointer;

    color: var(--primary);

    font-size: 11px;

    font-weight: 700;

    user-select: none;
}

.exercise-details p {
    color: var(--text-soft);

    font-size: 12px;

    line-height: 1.6;

    margin-top: 9px;

    max-width: 700px;
}


/* =========================================================
   NOTAS
========================================================= */

.exercise-notes {
    margin-top: 10px;

    padding: 9px 11px;

    border-radius: 9px;

    background: #fffbeb;

    color: #92400e;

    font-size: 11px;
}


/* =========================================================
   INICIAR ENTRENAMIENTO
========================================================= */

.start-workout-section {
    background: var(--primary-soft);

    border: 1px solid #bbf7d0;

    border-radius: var(--radius);

    padding: 24px 26px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-top: 5px;
}

.start-workout-section h2 {
    font-size: 20px;

    letter-spacing: -0.4px;

    margin-top: 2px;
}

.start-workout-section p {
    color: var(--text-soft);

    font-size: 12px;

    margin-top: 3px;
}

.start-workout-button {
    margin-top: 0;

    white-space: nowrap;
}


/* =========================================================
   MOBILE RUTINA
========================================================= */

@media (max-width: 600px) {

    .routine-page {
        width: calc(100% - 28px);
    }

    .routine-hero {
        padding: 19px;

        gap: 14px;

        border-radius: 18px;

        margin-bottom: 28px;
    }

    .routine-hero-icon {
        width: 48px;
        height: 48px;

        border-radius: 14px;

        font-size: 21px;
    }

    .routine-hero-content h1 {
        font-size: 21px;

        letter-spacing: -0.5px;
    }

    .routine-hero-content p {
        font-size: 11px;
    }

    .routine-meta {
        font-size: 9px;
    }

    .exercise-card {
        padding: 16px;

        gap: 12px;

        border-radius: 15px;
    }

    .exercise-number {
        width: 34px;
        height: 34px;

        border-radius: 10px;

        font-size: 10px;
    }

    .exercise-heading h3 {
        font-size: 15px;
    }

    .exercise-data {
        display: grid;

        grid-template-columns: repeat(3, 1fr);

        gap: 6px;
    }

    .exercise-data-item {
        min-width: 0;

        padding: 8px;
    }

    .exercise-data-item span {
        font-size: 7px;
    }

    .exercise-data-item strong {
        font-size: 11px;
    }

    .exercise-equipment {
        font-size: 9px;
    }

    .exercise-details p {
        font-size: 11px;
    }

    .start-workout-section {
        flex-direction: column;

        align-items: stretch;

        padding: 20px;

        gap: 15px;
    }

    .start-workout-button {
        width: 100%;

        justify-content: center;
    }

}
/* =========================================================
   CONFIRMAR INICIO DE ENTRENAMIENTO
========================================================= */

.start-confirm-card {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 40px;

    text-align: center;

    box-shadow: var(--shadow);

    max-width: 700px;

    margin: 20px auto 0;
}

.start-confirm-icon {
    width: 76px;
    height: 76px;

    border-radius: 24px;

    background: var(--primary-soft);

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 34px;

    margin: 0 auto 20px;
}

.start-confirm-card h1 {
    font-size: 29px;

    letter-spacing: -0.7px;

    margin: 5px 0 10px;
}

.start-confirm-card > p {
    color: var(--text-soft);

    font-size: 13px;

    max-width: 540px;

    margin: 0 auto;
}

.start-summary {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 10px;

    margin: 28px 0;
}

.start-summary > div {
    background: var(--surface-soft);

    border-radius: 12px;

    padding: 13px 8px;
}

.start-summary span {
    display: block;

    color: var(--text-light);

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 0.7px;

    margin-bottom: 3px;
}

.start-summary strong {
    font-size: 13px;
}

.start-confirm-button {
    border: none;

    cursor: pointer;

    margin-top: 5px;

    font-size: 12px;
}

.session-warning {
    display: flex;

    align-items: flex-start;

    gap: 10px;

    text-align: left;

    background: #fffbeb;

    border: 1px solid #fde68a;

    color: #92400e;

    border-radius: 12px;

    padding: 13px;

    margin-bottom: 18px;

    font-size: 16px;
}

.session-warning strong {
    display: block;

    font-size: 12px;

    margin-bottom: 2px;
}

.session-warning p {
    font-size: 11px;

    color: #a16207;
}

.session-error {
    background: #fee2e2;

    color: #991b1b;

    border-radius: 10px;

    padding: 12px;

    margin-bottom: 18px;

    font-size: 12px;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .start-confirm-card {
        padding: 25px 18px;

        border-radius: 18px;

        margin-top: 10px;
    }

    .start-confirm-icon {
        width: 60px;
        height: 60px;

        border-radius: 18px;

        font-size: 27px;

        margin-bottom: 16px;
    }

    .start-confirm-card h1 {
        font-size: 22px;
    }

    .start-confirm-card > p {
        font-size: 11px;
    }

    .start-summary {
        gap: 7px;

        margin: 22px 0;
    }

    .start-summary > div {
        padding: 11px 5px;
    }

    .start-summary span {
        font-size: 7px;
    }

    .start-summary strong {
        font-size: 11px;
    }

    .start-confirm-button {
        width: 100%;

        justify-content: center;

        padding: 14px;
    }

}

/* ================================
   DÍAS ESPECIALES
================================ */

.special-day-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.special-day-icon {
    font-size: 34px;
    margin-bottom: 12px;
}

.special-day-card h3 {
    margin: 0 0 8px;
    font-size: 22px;
    color: #111827;
}

.special-day-card p {
    margin: 0 0 12px;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.5;
}

.special-day-duration {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    background: #f3f4f6;
    padding: 7px 11px;
    border-radius: 999px;
}

.special-day-note {
    margin-top: 14px !important;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
    font-size: 14px !important;
}
/* =========================================
   ACTIVIDADES ESPECIALES
========================================= */

.special-day-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 26px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.special-day-icon {
    font-size: 34px;
    margin-bottom: 14px;
}

.special-day-status {
    display: inline-block;
    margin-bottom: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.special-day-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.special-day-card p {
    margin: 0 0 14px;
    color: #4b5563;
    line-height: 1.5;
}

.special-day-duration {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
}

.special-day-action {
    margin-top: 20px;
}

.special-day-note {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    color: #4b5563;
    font-size: 14px;
}
/* =========================================
   FORMULARIO DE ACTIVIDAD
========================================= */

.activity-form-card {
    max-width: 760px;
}

.activity-form {
    margin-top: 24px;
}

.activity-form .form-group {
    margin-top: 20px;
}

.activity-form .primary-button {
    margin-top: 8px;
}
/* =========================================
   ESTADO COMPLETADO EN DASHBOARD
========================================= */

.workout-completed {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 16px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #dcfce7;
    color: #15803d;
    font-size: 14px;
    font-weight: 700;
}
/* =========================================================
   HISTORIAL DE ENTRENAMIENTOS
========================================================= */

.history-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.history-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.history-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #f0fdf4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    flex-shrink: 0;
}

.history-card-title {
    flex: 1;
    min-width: 0;
}

.history-card-type {
    display: block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #16a34a;
    margin-bottom: 3px;
}

.history-card-title h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.3;
    color: #111827;
}

.history-card-check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}

.history-card-date {
    margin-top: 14px;
    font-size: 12px;
    color: #64748b;
}

.history-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.history-stat {
    background: #f8fafc;
    border-radius: 12px;
    padding: 11px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.history-stat-icon {
    font-size: 17px;
}

.history-stat strong {
    display: block;
    font-size: 15px;
    color: #111827;
}

.history-stat small {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    color: #64748b;
}

.history-card-footer {
    margin-top: 15px;
    padding-top: 13px;
    border-top: 1px solid #f1f5f9;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.history-completed {
    font-size: 11px;
    font-weight: 700;
    color: #16a34a;
}

.history-detail-link {
    font-size: 12px;
    font-weight: 700;
    color: #16a34a;
    text-decoration: none;
    white-space: nowrap;
}

.history-detail-link:hover {
    text-decoration: underline;
}


@media (max-width: 600px) {

    .history-card {
        padding: 15px;
        border-radius: 16px;
    }

    .history-card-title h3 {
        font-size: 14px;
    }

    .history-card-footer {
        align-items: flex-start;
        flex-direction: column;
    }

}

/* =========================================================
   DASHBOARD - ALIMENTACIÓN
========================================================= */

.stats-grid.dashboard-nutrition-grid {
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
}


/*
 * Evita que la última tarjeta herede
 * el "span 2" de .stat-card:last-child
 */

.stats-grid.dashboard-nutrition-grid
.stat-card:last-child {
    grid-column: auto;
}


/* TABLET */

@media (max-width: 800px) {

    .stats-grid.dashboard-nutrition-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .stats-grid.dashboard-nutrition-grid
    .stat-card:last-child {
        grid-column: auto;
    }

}


/* MOBILE */

@media (max-width: 600px) {

    .stats-grid.dashboard-nutrition-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .stats-grid.dashboard-nutrition-grid
    .stat-card:last-child {
        grid-column: auto;
    }

}


/* PANTALLAS MUY PEQUEÑAS */

@media (max-width: 420px) {

    .stats-grid.dashboard-nutrition-grid {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   DASHBOARD - REPORTES
========================================================= */

.dashboard-report-card {
    display: flex;
    align-items: center;

    gap: 16px;

    padding: 18px 20px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius-small);

    color: inherit;
    text-decoration: none;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}


.dashboard-report-card:hover {
    transform: translateY(-2px);

    border-color: #bbf7d0;

    box-shadow:
        0 10px 25px
        rgba(15, 23, 42, 0.07);
}


.dashboard-report-icon {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    background: var(--primary-soft);

    border-radius: 13px;

    font-size: 21px;
}


.dashboard-report-content {
    min-width: 0;

    flex: 1;

    display: flex;
    flex-direction: column;

    gap: 3px;
}


.dashboard-report-content strong {
    color: var(--text);

    font-size: 14px;
    font-weight: 800;
}


.dashboard-report-content span {
    color: var(--text-soft);

    font-size: 11px;
    line-height: 1.45;
}


.dashboard-report-arrow {
    flex-shrink: 0;

    color: var(--primary);

    font-size: 20px;
    font-weight: 800;
}


@media (max-width: 600px) {

    .dashboard-report-card {
        padding: 16px;
    }

    .dashboard-report-icon {
        width: 42px;
        height: 42px;

        font-size: 19px;
    }

    .dashboard-report-content strong {
        font-size: 13px;
    }

    .dashboard-report-content span {
        font-size: 10px;
    }

}

/* =========================================================
   DASHBOARD - PERÍODO DE ESTADÍSTICAS
========================================================= */

.stat-period {
    display: block;

    margin-top: 4px;

    color: var(--text-light);

    font-size: 9px;
    font-weight: 600;
}

/* =========================================================
   HEADER - ENLACE A PERFIL
========================================================= */

.header-profile-link {
    color: var(--text-light);

    font-size: 11px;
    font-weight: 500;

    text-decoration: none;

    transition: color .2s ease;
}

.header-profile-link:hover {
    color: var(--primary);
}

/* =========================================================
   LOGIN / AUTENTICACIÓN
========================================================= */

.contenedor-auth {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background:
        linear-gradient(
            135deg,
            #f8fafc 0%,
            #f0fdf4 100%
        );
}


.tarjeta-auth {
    width: 100%;
    max-width: 390px;

    padding: 34px 30px;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 20px;

    box-shadow:
        0 20px 50px
        rgba(15, 23, 42, 0.08);
}


/* =========================================================
   LOGO / TÍTULO
========================================================= */

.tarjeta-auth h1 {
    margin: 0 0 8px;

    color: #111827;

    font-size: 28px;
    font-weight: 900;

    letter-spacing: -1px;

    text-align: center;
}


.tarjeta-auth > p {
    margin: 0 0 26px;

    color: #64748b;

    font-size: 11px;
    line-height: 1.6;

    text-align: center;
}


/* =========================================================
   FORMULARIO
========================================================= */

.tarjeta-auth form {
    display: flex;
    flex-direction: column;

    gap: 8px;
}


.tarjeta-auth label {
    margin-top: 8px;

    color: #475569;

    font-size: 10px;
    font-weight: 700;
}


.tarjeta-auth input {
    width: 100%;

    box-sizing: border-box;

    padding: 12px 13px;

    background: #f8fafc;

    border: 1px solid #dbe1e8;
    border-radius: 11px;

    color: #111827;

    font-family: inherit;
    font-size: 11px;

    outline: none;

    transition:
        border-color .2s ease,
        background .2s ease,
        box-shadow .2s ease;
}


.tarjeta-auth input:focus {
    background: #ffffff;

    border-color: #16a34a;

    box-shadow:
        0 0 0 3px
        rgba(22, 163, 74, 0.08);
}


/* =========================================================
   BOTÓN
========================================================= */

.tarjeta-auth button {
    width: 100%;

    margin-top: 14px;

    padding: 12px 16px;

    background: #16a34a;
    color: #ffffff;

    border: none;
    border-radius: 11px;

    font-family: inherit;
    font-size: 11px;
    font-weight: 800;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}


.tarjeta-auth button:hover {
    background: #15803d;

    transform: translateY(-1px);

    box-shadow:
        0 8px 18px
        rgba(22, 163, 74, 0.18);
}


.tarjeta-auth button:active {
    transform: translateY(0);
}


/* =========================================================
   MENSAJES
========================================================= */

.tarjeta-auth .mensaje {
    margin-bottom: 12px;

    padding: 11px 13px;

    border-radius: 10px;

    font-size: 10px;
    font-weight: 700;

    text-align: center;
}


.tarjeta-auth .mensaje.error {
    background: #fef2f2;
    color: #dc2626;

    border: 1px solid #fecaca;
}


/* =========================================================
   REGISTRO
========================================================= */

.tarjeta-auth form + p {
    margin: 22px 0 0;

    color: #64748b;

    font-size: 10px;

    text-align: center;
}


.tarjeta-auth a {
    color: #16a34a;

    font-weight: 800;

    text-decoration: none;
}


.tarjeta-auth a:hover {
    text-decoration: underline;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 500px) {

    .contenedor-auth {
        padding: 18px;
    }

    .tarjeta-auth {
        padding: 28px 22px;

        border-radius: 16px;
    }

    .tarjeta-auth h1 {
        font-size: 25px;
    }

}
.tarjeta-auth .mensaje.exito {
    background: #f0fdf4;
    color: #15803d;

    border: 1px solid #bbf7d0;
}
/* =========================================================
   HEADER COMPARTIDO
========================================================= */

.header-logo-link {
    color: inherit;

    text-decoration: none;

    cursor: pointer;
}


.header-profile-access {
    display: flex;
    align-items: center;

    gap: 10px;

    color: inherit;

    text-decoration: none;

    cursor: pointer;
}


.header-profile-access .user-info span {
    transition: color .2s ease;
}


.header-profile-access:hover .user-info span {
    color: var(--primary);
}


.header-profile-access:hover .user-avatar {
    transform: translateY(-1px);
}


.user-avatar {
    transition: transform .2s ease;
}
/* =========================================================
   HEADER - PERFIL SIEMPRE EN HORIZONTAL
========================================================= */

.header-user .header-profile-access {
    display: flex;
    flex-direction: row;
    align-items: center;

    gap: 10px;

    flex-wrap: nowrap;

    min-width: 0;
}


.header-profile-access .user-avatar {
    flex-shrink: 0;
}


.header-profile-access .user-info {
    display: flex;
    flex-direction: column;

    min-width: 0;

    overflow: hidden;
}


.header-profile-access .user-info strong,
.header-profile-access .user-info span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================================
   HEADER — ACCESO ADMIN
========================================================= */

.admin-access-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--text-soft);
    font-size: 16px;
    text-decoration: none;
    transition: 0.2s;
    flex-shrink: 0;
}

.admin-access-btn:hover {
    background: #fef9c3;
}

/* =========================================================
   DASHBOARD — PERFIL INCOMPLETO
========================================================= */

.dashboard-incomplete-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 14px 18px;
    margin-bottom: 24px;

    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 14px;

    text-decoration: none;
    color: inherit;

    transition: background 0.2s;
}

.dashboard-incomplete-banner:hover {
    background: #fef3c7;
}

.dashboard-incomplete-banner div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dashboard-incomplete-banner strong {
    font-size: 13px;
    color: #92400e;
}

.dashboard-incomplete-banner span {
    font-size: 11px;
    color: #a16207;
}

.dashboard-incomplete-arrow {
    font-size: 18px;
    color: #d97706;
    flex-shrink: 0;
}

/* =========================================================
   RESUMEN SEMANAL — BANNER DASHBOARD
========================================================= */

.dashboard-resumen-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    margin-bottom: 24px;
    border: 1px solid;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.dashboard-resumen-banner:hover {
    opacity: 0.85;
}

.dashboard-resumen-excelente {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.dashboard-resumen-buena {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.dashboard-resumen-mejorar {
    background: #fffbeb;
    border-color: #fde68a;
}

.dashboard-resumen-alerta {
    background: #fef2f2;
    border-color: #fecaca;
}

.dashboard-resumen-neutral {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.dashboard-resumen-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.dashboard-resumen-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dashboard-resumen-content strong {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
}

.dashboard-resumen-content span {
    font-size: 11px;
    color: var(--text-soft);
}

.dashboard-resumen-arrow {
    font-size: 16px;
    color: var(--text-light);
    flex-shrink: 0;
}


/* =========================================================
   RESUMEN SEMANAL — PÁGINA COMPLETA
========================================================= */

.resumen-recomendacion {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border: 1px solid;
    border-radius: 16px;
    margin-bottom: 30px;
}

.resumen-rec-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.resumen-rec-content {
    flex: 1;
    min-width: 0;
}

.resumen-rec-content strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 4px;
}

.resumen-rec-content p {
    font-size: 13px;
    color: var(--text-soft);
    margin: 0 0 6px;
    line-height: 1.5;
}

.resumen-rec-content span {
    font-size: 12px;
    color: var(--text-soft);
    font-weight: 600;
}

.resumen-peso-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.resumen-peso-item {
    text-align: center;
}

.resumen-peso-item span {
    display: block;
    font-size: 9px;
    font-weight: 800;
    color: var(--text-light);
    letter-spacing: 0.6px;
    margin-bottom: 4px;
}

.resumen-peso-item strong {
    font-size: 22px;
    font-weight: 900;
    color: var(--text);
}

.resumen-peso-flecha {
    font-size: 24px;
    color: var(--text-light);
}

.resumen-peso-diff {
    font-size: 16px;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 20px;
}

.resumen-peso-diff.negativo {
    background: #f0fdf4;
    color: #15803d;
}

.resumen-peso-diff.positivo {
    background: #fef2f2;
    color: #b91c1c;
}

.resumen-habitos-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
}

.resumen-habitos-barra-wrap {
    height: 8px;
    background: #e5e7eb;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 12px;
}

.resumen-habitos-barra {
    height: 100%;
    background: var(--primary);
    border-radius: 20px;
    transition: width 0.5s ease;
}

.resumen-habitos-card p {
    font-size: 12px;
    color: var(--text-soft);
    margin: 0 0 12px;
}

.resumen-habitos-pendientes {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.resumen-habitos-pendientes > span:first-child {
    font-size: 11px;
    color: var(--text-soft);
    font-weight: 600;
}

.resumen-habito-tag {
    font-size: 10px;
    font-weight: 700;
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    padding: 3px 9px;
    border-radius: 20px;
}

.resumen-ejercicio-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.resumen-ejercicio-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.resumen-ejercicio-card strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
}

.resumen-ejercicio-card span {
    font-size: 12px;
    color: var(--text-soft);
}

.resumen-esta-semana {
    background: var(--primary-soft);
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.resumen-esta-semana strong {
    font-size: 36px;
    font-weight: 900;
    color: var(--primary-dark);
    line-height: 1;
}

.resumen-esta-semana span {
    font-size: 13px;
    color: var(--primary-dark);
}

.resumen-acciones {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 10px;
    padding-bottom: 20px;
}

@media (max-width: 600px) {

    .resumen-peso-card {
        gap: 12px;
    }

    .resumen-peso-item strong {
        font-size: 18px;
    }

    .resumen-acciones {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}


/* =========================================================
   TOGGLE MODO OSCURO
========================================================= */

.dark-toggle {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--surface-soft);
    border: none;
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.dark-toggle:hover {
    background: var(--border);
}


/* =========================================================
   MODO OSCURO
   Solo cambia colores. Nunca toca border-radius ni padding.
========================================================= */

[data-theme="dark"] {
    --bg:           #111827;
    --surface:      #1f2937;
    --surface-soft: #374151;
    --text:         #f9fafb;
    --text-soft:    #9ca3af;
    --text-light:   #6b7280;
    --primary:      #22c55e;
    --primary-dark: #16a34a;
    --primary-soft: #14532d;
    --border:       #374151;
    --shadow:       0 10px 30px rgba(0,0,0,0.4);
}

/* Fondo general */
[data-theme="dark"] body {
    background: var(--bg);
    color: var(--text);
}

/* Header y nav */
[data-theme="dark"] .header-app {
    background: rgba(17,24,39,0.97);
    border-bottom-color: var(--border);
}

[data-theme="dark"] .bottom-navigation {
    background: rgba(17,24,39,0.97);
    border-top-color: var(--border);
}

/* Cualquier elemento con fondo blanco o claro */
[data-theme="dark"] .workout-card,
[data-theme="dark"] .rest-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .habit-card,
[data-theme="dark"] .empty-card,
[data-theme="dark"] .dashboard-report-card,
[data-theme="dark"] .routine-hero,
[data-theme="dark"] .exercise-card,
[data-theme="dark"] .training-header,
[data-theme="dark"] .training-exercise-card,
[data-theme="dark"] .finish-workout-section,
[data-theme="dark"] .start-confirm-card,
[data-theme="dark"] .start-workout-section,
[data-theme="dark"] .special-day-card,
[data-theme="dark"] .completed-card,
[data-theme="dark"] .nutrition-summary-card,
[data-theme="dark"] .nutrition-meal-card,
[data-theme="dark"] .nutrition-form-card,
[data-theme="dark"] .nutrition-goals-card,
[data-theme="dark"] .nutrition-date-card,
[data-theme="dark"] .habits-progress-card,
[data-theme="dark"] .habits-date-card,
[data-theme="dark"] .reports-period,
[data-theme="dark"] .report-card,
[data-theme="dark"] .reports-chart-card,
[data-theme="dark"] .reports-macros > div,
[data-theme="dark"] .admin-user-card,
[data-theme="dark"] .admin-catalog-card,
[data-theme="dark"] .admin-form-card,
[data-theme="dark"] .onboarding-card,
[data-theme="dark"] .tarjeta-auth,
[data-theme="dark"] .history-card,
[data-theme="dark"] .resumen-peso-card,
[data-theme="dark"] .resumen-habitos-card,
[data-theme="dark"] .resumen-ejercicio-card,
[data-theme="dark"] .personalizar-item,
[data-theme="dark"] .personalizar-add-form,
[data-theme="dark"] .ma-item,
[data-theme="dark"] .mis-alimentos-form,
[data-theme="dark"] .habito-form-card,
[data-theme="dark"] .admin-gen-dist,
[data-theme="dark"] .progress-link-card {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

/* Superficies secundarias */
[data-theme="dark"] .training-target > div,
[data-theme="dark"] .start-summary > div,
[data-theme="dark"] .completed-stats > div,
[data-theme="dark"] .series-badge,
[data-theme="dark"] .exercise-data-item,
[data-theme="dark"] .nutrition-reference,
[data-theme="dark"] .history-stat,
[data-theme="dark"] .nutrition-preview,
[data-theme="dark"] .ob-hint,
[data-theme="dark"] .rest-icon {
    background: var(--surface-soft);
    border-color: var(--border);
}

/* Inputs */
[data-theme="dark"] input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: var(--surface-soft);
    border-color: var(--border);
    color: var(--text);
}

/* Textos que tienen color hardcodeado */
[data-theme="dark"] .special-day-card h2,
[data-theme="dark"] .special-day-card h3,
[data-theme="dark"] .special-day-card p,
[data-theme="dark"] .history-card-title h3,
[data-theme="dark"] .history-stat strong { color: var(--text); }

[data-theme="dark"] .history-card-date,
[data-theme="dark"] .history-stat small  { color: var(--text-soft); }

/* Bordes internos */
[data-theme="dark"] .history-card-footer  { border-top-color: var(--border); }
[data-theme="dark"] .exercise-details     { border-top-color: var(--border); }
[data-theme="dark"] .series-form          { border-top-color: var(--border); }

/* Elementos con colores específicos */
[data-theme="dark"] .history-card-icon    { background: var(--primary-soft); }
[data-theme="dark"] .exercise-equipment   { background: var(--surface-soft); color: var(--text-soft); }
[data-theme="dark"] .exercise-notes       { background: #1c1a0a; color: #fbbf24; }
[data-theme="dark"] .session-warning      { background: #1c1a0a; border-color: #713f12; color: #fbbf24; }
[data-theme="dark"] .session-error        { background: #1c0a0a; color: #fca5a5; }
[data-theme="dark"] .nutrition-preview-item { background: var(--surface); }
[data-theme="dark"] .resumen-esta-semana  { background: var(--primary-soft); border-color: #166534; }
[data-theme="dark"] .resumen-habitos-barra-wrap { background: var(--border); }
[data-theme="dark"] .descanso-panel       { background: #030712; }
[data-theme="dark"] .stepper-btn          { background: var(--surface-soft); border-color: var(--border); color: var(--text); }
[data-theme="dark"] .progression-hint.progression-same { background: var(--surface-soft); border-color: var(--border); color: var(--text-soft); }

/* Opciones radio onboarding */
[data-theme="dark"] .ob-option            { background: var(--surface-soft); border-color: var(--border); }
[data-theme="dark"] .ob-option.selected,
[data-theme="dark"] .ob-option:hover      { background: #052e16; border-color: var(--primary); }

/* Auth */
[data-theme="dark"] .contenedor-auth      { background: linear-gradient(135deg, #111827, #0d1f12); }
[data-theme="dark"] .tarjeta-auth h1,
[data-theme="dark"] .tarjeta-auth > p     { color: var(--text); }
[data-theme="dark"] .tarjeta-auth label   { color: var(--text-soft); }

/* Banners */
[data-theme="dark"] .dashboard-incomplete-banner  { background: #1c1a0a; border-color: #713f12; }
[data-theme="dark"] .dashboard-resumen-excelente  { background: #052e16; border-color: #166534; }
[data-theme="dark"] .dashboard-resumen-buena      { background: #0c1a2e; border-color: #1e3a5f; }
[data-theme="dark"] .dashboard-resumen-mejorar    { background: #1c1a0a; border-color: #713f12; }
[data-theme="dark"] .dashboard-resumen-alerta     { background: #1c0a0a; border-color: #7f1d1d; }
[data-theme="dark"] .dashboard-resumen-neutral    { background: var(--surface); border-color: var(--border); }


/* =========================================================
   TOGGLE
========================================================= */

.dark-toggle {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--surface-soft);
    border: none;
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.dark-toggle:hover { background: var(--border); }


/* =========================================================
   MODO OSCURO — TEXTOS GLOBALES HARDCODEADOS
   Cubre colores fijos que no usan variables CSS
========================================================= */

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] strong {
    color: var(--text);
}

[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] small,
[data-theme="dark"] label {
    color: inherit;
}

/* Colores hardcodeados específicos */
[data-theme="dark"] .nutrition-meal-title h3,
[data-theme="dark"] .nutrition-food-info strong,
[data-theme="dark"] .habits-section-title h2,
[data-theme="dark"] .habits-progress-header h2,
[data-theme="dark"] .profile-card h2,
[data-theme="dark"] .reports-section-title h2,
[data-theme="dark"] .reports-header h1 {
    color: var(--text);
}

[data-theme="dark"] .nutrition-meal-title span,
[data-theme="dark"] .nutrition-food-quantity span,
[data-theme="dark"] .nutrition-food-calories span,
[data-theme="dark"] .habits-progress-footer span,
[data-theme="dark"] .habits-progress-footer small {
    color: var(--text-soft);
}

/* Fondos de elementos con colores fijos */
[data-theme="dark"] .nutrition-meal-icon {
    background: var(--surface-soft);
}

[data-theme="dark"] .nutrition-food-row {
    border-bottom-color: var(--border);
}

[data-theme="dark"] .nutrition-meal-header {
    border-bottom-color: var(--border);
}

[data-theme="dark"] .habits-progress-bar {
    background: var(--border);
}

[data-theme="dark"] .habit-progress-bar {
    background: var(--border);
}

/* =========================================================
   RACHA — DASHBOARD
========================================================= */

.stat-card-streak {
    background: linear-gradient(135deg, #fff7ed, #fef3c7) !important;
    border: 1px solid #fcd34d !important;
}

.stat-card-streak .stat-icon,
.stat-card-streak span,
.stat-card-streak strong,
.stat-card-streak small {
    color: #92400e !important;
}

[data-theme="dark"] .stat-card-streak {
    background: linear-gradient(135deg, #1c1408, #1f1a08) !important;
    border-color: #854d0e !important;
}

[data-theme="dark"] .stat-card-streak .stat-icon,
[data-theme="dark"] .stat-card-streak span,
[data-theme="dark"] .stat-card-streak strong,
[data-theme="dark"] .stat-card-streak small {
    color: #fcd34d !important;
}
