
.sg-gym-wrap,
.sg-food-wrap {
    width: 100%;
    position: relative;
}

.sg-gym-filtros,
.sg-food-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
    justify-content: flex-start;
}

.sg-gym-btn,
.sg-food-btn {
    border: 0;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: .2s ease;
    background: #0d6efd;
    color: #fff;
}

.sg-gym-btn:hover,
.sg-food-btn:hover {
    background: #0b5ed7;
}

.sg-gym-btn.is-active,
.sg-food-btn.is-active {
    background: #198754;
    color: #fff;
}

.sg-gym-panel,
.sg-food-panel {
    display: none;
}

.sg-gym-panel.is-active,
.sg-food-panel.is-active {
    display: block;
}

.sg-gym-empty,
.sg-food-empty {
    padding: 20px;
    border: 1px dashed #ccc;
    border-radius: 12px;
    color: #666;
    background: #fafafa;
}

.sg-gym-slider,
.sg-food-slider {
    margin: 0 auto;
}

.sg-gym-slide,
.sg-food-slide {
    padding: 0 10px;
    box-sizing: border-box;
}

.sg-gym-card,
.sg-food-card {
    border: 1px solid #dcdcdc;
    padding: 20px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
    min-height: 100%;
}

.sg-gym-card h2,
.sg-food-card h2 {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.2;
    color: #24324a;
}

.sg-gym-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.2;
    color: #24324a;
}

.sg-gym-card p,
.sg-food-card p {
    margin: 0 0 12px;
    color: #24324a;
}

.sg-gym-meta,
.sg-food-meta {
    margin-top: 10px;
    font-size: 16px;
    color: #24324a;
}

.sg-gym-video-wrap {
    margin-top: 16px;
    width: 100%;
}

.sg-gym-video-box {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.sg-gym-video-box iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.sg-food-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 16px;
    background: #f4f4f4;
    display: block;
}

.sg-food-img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7a8599;
    font-weight: 700;
}

.sg-food-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.sg-food-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: #eef2f7;
    color: #24324a;
}

.sg-food-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.sg-food-kpi {
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fafafa;
}

.sg-food-kpi strong {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.sg-food-kpi span {
    font-size: 18px;
    font-weight: 700;
    color: #111;
}

.sg-gym-wrap .slick-prev:before,
.sg-gym-wrap .slick-next:before,
.sg-food-wrap .slick-prev:before,
.sg-food-wrap .slick-next:before {
    color: #111;
    font-size: 28px;
}

.sg-gym-wrap .slick-dots li button:before,
.sg-food-wrap .slick-dots li button:before {
    font-size: 10px;
    color: #111;
}

.sg-gym-wrap .slick-slide,
.sg-food-wrap .slick-slide {
    opacity: .75;
    transition: opacity .25s ease;
}

.sg-gym-wrap .slick-center,
.sg-food-wrap .slick-center {
    opacity: 1;
}

.sg-food-wrap .slick-list,
.sg-gym-wrap .slick-list {
    overflow: hidden;
}

.sg-food-wrap .slick-track,
.sg-gym-wrap .slick-track {
    display: flex;
    align-items: stretch;
}

.sg-food-wrap .slick-slide,
.sg-gym-wrap .slick-slide {
    height: auto;
}

.sg-food-wrap .slick-slide > div,
.sg-gym-wrap .slick-slide > div {
    height: 100%;
}

@media (max-width: 1024px) {
    .sg-gym-card h2,
    .sg-food-card h2 {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    .sg-gym-slide,
    .sg-food-slide {
        padding: 0 4px;
    }

    .sg-gym-card,
    .sg-food-card {
        padding: 16px;
        border-radius: 14px;
    }

    .sg-gym-card h2,
    .sg-food-card h2 {
        font-size: 20px;
    }

    .sg-food-grid {
        grid-template-columns: 1fr 1fr;
    }

    .sg-gym-video-box {
        aspect-ratio: 9 / 16;
    }
}

.sg-gamification-wrap {
    width: 100%;
    position: relative;
}

.sg-gamification-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.sg-gamification-card {
    border: 1px solid #dcdcdc;
    padding: 20px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}

.sg-gamification-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
    line-height: 1.2;
    color: #24324a;
}

.sg-gamification-form {
    display: grid;
    gap: 12px;
}

.sg-gamification-label {
    font-weight: 700;
    color: #24324a;
    margin-top: 4px;
}

.sg-gamification-form select,
.sg-gamification-form textarea {
    width: 100%;
    border: 1px solid #d4d9e2;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 15px;
    color: #24324a;
    background: #fff;
    box-sizing: border-box;
}

.sg-gamification-feedback {
    min-height: 24px;
    font-weight: 700;
    color: #24324a;
}

.sg-gamification-feedback.is-success {
    color: #198754;
}

.sg-gamification-feedback.is-error {
    color: #dc3545;
}

.sg-gamification-ranking-card {
    margin-top: 12px;
}

.sg-gamification-ranking-table-wrap {
    overflow-x: auto;
}

.sg-gamification-ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.sg-gamification-ranking-table th,
.sg-gamification-ranking-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #ececec;
    text-align: left;
    color: #24324a;
}

.sg-gamification-ranking-table th {
    font-size: 14px;
    color: #667085;
}

.sg-gamification-profile-grid {
    margin-top: 16px;
}

@media (max-width: 767px) {
    .sg-gamification-grid {
        grid-template-columns: 1fr;
    }
}


.sg-is-hidden{display:none!important;}
.sg-gym-btn-secondary{background:#6c757d;color:#fff;}
.sg-gym-btn-secondary:hover{background:#5c636a;}
.sg-supabase-auth{max-width:520px;margin:0 auto 24px;}
.sg-supabase-auth-card{display:flex;flex-direction:column;gap:12px;}
.sg-supabase-auth-toggle{display:flex;gap:10px;flex-wrap:wrap;}
.sg-supabase-auth-form input,
.sg-gamification-form input,
.sg-gamification-form select,
.sg-gamification-form textarea{width:100%;padding:10px 12px;border:1px solid #d7dce3;border-radius:10px;box-sizing:border-box;background:#fff;}
.sg-gamification-label{display:block;font-weight:700;color:#24324a;margin:2px 0 6px;}
.sg-gamification-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:18px;}
.sg-gamification-card{border:1px solid #dcdcdc;padding:20px;border-radius:16px;background:#fff;box-shadow:0 2px 10px rgba(0,0,0,.06);}
.sg-gamification-card h2{margin:0 0 12px;font-size:24px;line-height:1.2;color:#24324a;}
.sg-gamification-feedback{margin-top:12px;padding:10px 12px;border-radius:10px;background:#f8f9fa;color:#24324a;min-height:22px;}
.sg-gamification-feedback.is-success{background:#e8f7ee;color:#0f5132;}
.sg-gamification-feedback.is-error{background:#fdeaea;color:#842029;}
.sg-gamification-ranking-card{margin-top:18px;}
.sg-gamification-ranking-table-wrap{overflow:auto;}
.sg-gamification-ranking-table{width:100%;border-collapse:collapse;}
.sg-gamification-ranking-table th,.sg-gamification-ranking-table td{padding:10px 12px;border-bottom:1px solid #ececec;text-align:left;}
.sg-supabase-auth-user{font-size:14px;color:#495057;word-break:break-all;}
@media (max-width:768px){.sg-gamification-grid{grid-template-columns:1fr;}}


.sg-user-dashboard-wrap .sg-user-dashboard-header{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px;flex-wrap:wrap}.sg-user-dashboard-name{font-size:1.25rem;font-weight:700}.sg-user-dashboard-badge{text-transform:capitalize;padding:6px 12px;border-radius:999px;background:#f3f4f6;font-weight:600}.sg-gamification-card code{background:#f3f4f6;padding:2px 6px;border-radius:6px}.sg-is-hidden{display:none!important}


.sg-gym-voice-toolbar {
    display: grid;
    gap: 12px;
    margin-bottom: 22px;
    padding: 16px;
    border: 1px solid #dcdcdc;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
}

.sg-gym-voice-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #24324a;
}

.sg-gym-voice-btn[disabled] {
    opacity: .5;
    cursor: not-allowed;
}

.sg-gym-voice-feedback,
.sg-gym-voice-transcript {
    color: #24324a;
    font-size: 15px;
}

.sg-gym-voice-feedback.is-error {
    color: #b42318;
}

.sg-user-routines-section{margin-top:24px}.sg-user-routines-list{display:grid;gap:12px;margin-top:12px}.sg-user-routine-card{border:1px solid #e5e7eb;border-radius:12px;padding:16px;background:#fff}.sg-user-routine-card__header{margin-bottom:8px}.sg-user-routine-card__meta{color:#4b5563;margin-bottom:6px}.sg-user-routine-detail{margin-top:16px}.sg-user-routine-detail__header{margin-bottom:12px}.sg-user-routine-detail__header h4{margin:0 0 8px}.sg-user-routine-detail__table-wrap{overflow:auto}.sg-routine-detail-table td strong{display:block}.sg-user-dashboard-wrap .button[data-routine-detail-button]{margin-top:8px}


.sg-user-routine-detail {
    background-color: #ffffff;
    padding: 5%;
    border-radius: 10px;
}

.sg-user-routine-video-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    padding: 8px 12px;
    background: #dc2626;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .2s ease;
}

.sg-user-routine-video-btn:hover {
    background: #b91c1c;
}

.sg-user-routine-video-btn.is-disabled {
    background: #cbd5e1;
    color: #475569;
    cursor: default;
}

.sg-user-routine-video-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.sg-user-routine-video-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
}

.sg-user-routine-video-modal__dialog {
    position: relative;
    max-width: 720px;
    margin: 6vh auto 0;
    background: #111827;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.sg-user-routine-video-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 0;
    background: #fff;
    color: #111827;
    border-radius: 999px;
    width: 36px;
    height: 36px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.sg-user-routine-video-modal__frame-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
}

.sg-user-routine-video-modal__frame-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 767px) {
    .sg-user-routine-detail {
        padding: 16px;
    }

    .sg-user-routine-video-modal__dialog {
        width: calc(100% - 24px);
        margin-top: 10vh;
        padding: 14px;
    }
}


.sg-user-routine-detail__more {
    margin-top: 20px;
}

.sg-routine-execution {
    margin-top: 24px;
}

.sg-routine-execution-wrap {
    max-width: 100%;
}

.sg-execution-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sg-execution-plan {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    font-size: 15px;
    color: #24324a;
}

.sg-execution-series-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.sg-execution-series-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    color: #24324a;
}

.sg-execution-series-field input {
    width: 100%;
    border: 1px solid #d9dee8;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 15px;
}

.sg-execution-timer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f7f9fc;
}

.sg-execution-timer__value {
    font-size: 24px;
    font-weight: 700;
    color: #24324a;
}

.sg-execution-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sg-execution-card--completed {
    opacity: .65;
}

@media (max-width: 768px) {
    .sg-execution-plan,
    .sg-execution-series-grid {
        grid-template-columns: 1fr;
    }

    .sg-execution-timer {
        align-items: flex-start;
        flex-direction: column;
    }
}
