:root {
    --bg-color: #121214;
    --card-bg: #202024;
    --card-hover: #29292e;
    --input-bg: #29292e;
    --primary-color: #A3E635;
    /* bright lime green */
    --primary-glow: rgba(163, 230, 53, 0.3);
    --text-main: #ffffff;
    --text-muted: #8d8d99;
    --border-color: #323238;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: radial-gradient(circle at 50% 50%, #1a1a1e 0%, var(--bg-color) 70%);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100dvh;
    overflow-x: hidden;
    margin: 0;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

/* Premium Glows */
.bg-glow-1,
.bg-glow-2 {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.15;
}

.bg-glow-1 {
    width: 600px;
    height: 600px;
    background: var(--primary-color);
    top: -200px;
    right: -200px;
    animation: floatGlow 15s ease-in-out infinite alternate;
}

.bg-glow-2 {
    width: 500px;
    height: 500px;
    background: #4ade80;
    bottom: -150px;
    left: -150px;
    animation: floatGlow 20s ease-in-out infinite alternate-reverse;
}

@keyframes floatGlow {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-50px, 50px) scale(1.1);
    }
}

#app {
    width: 100%;
    max-width: 480px;
    padding: 2rem;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: max-width 0.3s ease;
}

#app.wide {
    max-width: 1400px;
    padding: 3rem 5%;
    justify-content: flex-start;
    margin: 0 auto;
}

@media (min-width: 1025px) {
    body {
        justify-content: center;
        padding-right: 24px;
        padding-left: 24px;
    }

    #app {
        margin-left: auto;
        margin-right: auto;
    }

    #app.wide {
        width: min(1400px, 96vw);
        margin-left: auto;
        margin-right: auto;
        padding: 2rem clamp(24px, 2.8vw, 56px);
    }

    .ex-modal {
        width: clamp(620px, 42vw, 900px);
    }
}

#app,
#app.wide,
.dashboard-layout,
.main-content,
.screen,
.screen.active {
    max-width: 100%;
}

.screen {
    display: none;
    width: 100%;
    min-height: 100dvh;
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#home-screen,
#student-screen,
#student-confirm-screen,
#student-questionnaire-screen,
#student-dashboard-screen {
    min-height: 100dvh;
}

.student-login-container,
.dashboard-layout,
.main-content {
    min-height: calc(100dvh - 24px);
    padding-bottom: 90px;
    /* Space for bottom nav */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* Logo and Header */
.logo-container {
    text-align: center;
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-home {
    width: 100%;
    min-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.85rem;
    padding: 1rem 0.25rem;
}

.hero-kicker {
    color: var(--primary-color);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
}

.hero-title {
    max-width: 22ch;
    margin: 0 auto;
    line-height: 1.14;
}

.hero-subtitle {
    max-width: 34ch;
    margin: 0 auto;
    font-size: 0.94rem;
    color: #c7c7cd;
}

.hero-cta {
    width: min(320px, 100%);
    margin-top: 0.55rem;
    font-size: 0.98rem;
    font-weight: 800;
}

.hero-cta-dominant {
    position: relative;
    border: 1px solid rgba(163, 230, 53, 0.5);
    background: linear-gradient(135deg, #a3e635 0%, #84cc16 100%);
    color: #101010;
    box-shadow: 0 0 0 1px rgba(163, 230, 53, 0.35), 0 14px 34px rgba(163, 230, 53, 0.34);
    transform: translateZ(0);
}

.hero-cta-dominant:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px rgba(163, 230, 53, 0.45), 0 20px 42px rgba(163, 230, 53, 0.44);
}

.home-secondary-access {
    width: 100%;
    max-width: 560px;
    margin: 0 auto 0.75rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.home-secondary-title {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
}

.role-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.role-quick-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 56px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    backdrop-filter: blur(14px);
    color: var(--text-main);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.01rem;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.role-quick-btn .role-quick-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(163, 230, 53, 0.12);
    color: var(--primary-color);
    font-size: 1.05rem;
}

.role-quick-btn.student {
    border-color: rgba(163, 230, 53, 0.42);
    box-shadow: 0 0 0 1px rgba(163, 230, 53, 0.2), 0 8px 24px rgba(163, 230, 53, 0.18);
}

.role-quick-btn.trainer {
    border-color: rgba(255, 255, 255, 0.18);
}

.role-quick-btn:active {
    transform: scale(0.98);
}

.role-quick-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(163, 230, 53, 0.45);
}

@media (max-width: 420px) {
    .role-quick-grid {
        gap: 0.5rem;
    }

    .role-quick-btn {
        min-height: 52px;
        font-size: 0.78rem;
        gap: 0.4rem;
        padding: 0 0.35rem;
    }

    .role-quick-btn .role-quick-icon {
        width: 24px;
        height: 24px;
        font-size: 0.95rem;
    }
}

.logo-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    margin-bottom: 1.5rem;
}

.logo-icon.glow {
    background-color: var(--primary-color);
    color: #121214;
    box-shadow: 0 0 30px var(--primary-glow);
    animation: breathingGlow 3s ease-in-out infinite alternate;
}

@keyframes breathingGlow {
    0% {
        box-shadow: 0 0 20px rgba(163, 230, 53, 0.2);
        transform: scale(1);
    }

    100% {
        box-shadow: 0 0 40px rgba(163, 230, 53, 0.6);
        transform: scale(1.05);
    }
}

.main-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Role Selection */
.role-selection {
    width: 100%;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    margin-bottom: 1rem;
}

.role-card {
    background: linear-gradient(145deg, rgba(32, 32, 36, 0.5) 0%, rgba(21, 21, 24, 0.7) 100%);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.5rem 1.25rem;
    display: flex;
    align-items: center;
    width: 100%;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 1.25rem;
    text-align: left;
    color: var(--text-main);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.role-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: skewX(-20deg);
    transition: left 0.7s ease;
}

.role-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 40px rgba(163, 230, 53, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(163, 230, 53, 0.4);
    background: linear-gradient(145deg, rgba(38, 38, 42, 0.8) 0%, rgba(26, 26, 30, 0.8) 100%);
}

.role-card:hover::after {
    left: 200%;
}

.role-card:hover .card-icon.inactive-icon {
    background-color: rgba(163, 230, 53, 0.15);
    color: var(--primary-color);
    transform: scale(1.1);
}

.role-card:hover .arrow-icon {
    transform: translateX(5px);
    color: var(--primary-color);
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    margin-right: 1.25rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.card-icon.active-icon {
    background: linear-gradient(135deg, var(--primary-color), #84cc16);
    color: #121214;
    box-shadow: 0 4px 15px rgba(163, 230, 53, 0.3);
}

.card-icon.inactive-icon {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.card-content {
    flex-grow: 1;
}

.card-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}

.card-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.arrow-icon {
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

/* Student Area */
.btn-back {
    position: absolute;
    top: 2rem;
    left: 2rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-back:hover {
    color: var(--text-main);
}

.student-login-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100dvh;
    padding: 2rem;
    box-sizing: border-box;
}

.logo-icon.lg {
    width: 72px;
    height: 72px;
    font-size: 36px;
}

.student-login-container h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.student-login-container .subtitle {
    margin-bottom: 2.5rem;
}

.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

.input-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-group input {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem 1rem;
    color: var(--text-main);
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.2em;
    transition: border-color 0.2s;
    width: 100%;
}

.input-group input:focus,
.styled-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input-group input::placeholder {
    color: #4d4d53;
}

.styled-select {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem 1rem;
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 500;
    width: 100%;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238d8d99' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

.styled-select option {
    background-color: var(--card-bg);
    color: var(--text-main);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #121214;
    border: none;
    border-radius: 8px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s, transform 0.12s ease-out;
    width: 100%;
}

.btn-primary:hover {
    filter: brightness(1.1);
}

.btn-link {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.2s;
    font-weight: 500;
}

/* Active / pressed state for app-like feel */
.btn-primary:active,
.btn-secondary:active,
.btn-secondary-outline:active,
.btn-icon:active,
.btn-icon-minimal:active,
.btn-check-set:active,
.btn-remove-set:active,
.btn-send-chat:active,
.btn-attach-chat:active,
.nav-item:active,
.workout-tab:active,
.treino-option-card:active,
.action-card:active,
.student-list-item:active,
.recent-student-card:active,
.set-intensity-dot:active {
    transform: scale(0.98);
}

.student-list-item,
.recent-student-card {
    cursor: pointer;
    user-select: none;
}

.student-list-item:hover,
.recent-student-card:hover {
    background: rgba(255, 255, 255, 0.03);
}

.student-list-item:active,
.recent-student-card:active {
    background: rgba(255, 255, 255, 0.06);
}

.btn-link:hover {
    color: var(--text-main);
}

/* Questionnaire Specifics */
.q-tabs-container {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.q-tabs-container::-webkit-scrollbar {
    height: 4px;
}

.q-tabs-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.q-tab {
    flex: 1;
    min-width: 100px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.q-tab i {
    font-size: 1.25rem;
}

.q-tab.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #121214;
}

.q-content-container {
    width: 100%;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

.q-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.q-tab-content.active {
    display: block;
}

.q-header-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.q-field {
    margin-bottom: 2rem;
}

.q-field>label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

/* Segmented Control */
.segmented-control {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.segment-opt {
    flex: 1;
    display: block;
    cursor: pointer;
}

.segment-opt input {
    display: none;
}

.segment-opt span {
    display: block;
    text-align: center;
    padding: 1rem;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.segment-opt input:checked+span {
    background-color: rgba(163, 230, 53, 0.05);
    /* very light primary variant might be too bright with border? Let's use darker solid */
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.conditional-input {
    margin-top: 0.75rem;
    display: none;
    animation: fadeIn 0.3s ease;
}

.conditional-input.active {
    display: block;
}

/* Pill Group */
.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pill {
    cursor: pointer;
}

.pill input {
    display: none;
}

.pill span {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.pill.circle span {
    padding: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.pill input:checked+span {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #121214;
}

/* Slider */
.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.q-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    outline: none;
}

.q-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.slider-val {
    font-weight: 700;
    color: var(--text-main);
    min-width: 40px;
    text-align: right;
}

/* Q Input/Textarea */
.q-input {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem 1rem;
    color: var(--text-main);
    font-size: 1rem;
    width: 100%;
    transition: border-color 0.2s;
    outline: none;
    resize: vertical;
}

.q-input:focus {
    border-color: var(--primary-color);
}

/* Q Actions */
.q-actions {
    margin-top: 3rem;
    display: flex;
    width: 100%;
}

.q-actions.right {
    justify-content: flex-end;
}

.q-actions.between {
    justify-content: space-between;
}

.q-btn-next,
.q-btn-prev {
    width: auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Trainer Area Specifics */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1rem 0;
    color: var(--border-color);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: #4d4d53;
}

.btn-secondary i {
    color: var(--primary-color);
}

/* Service Options */
.services-options {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.service-option {
    flex: 1;
    cursor: pointer;
}

.service-option input {
    display: none;
}

.service-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s;
    color: var(--text-muted);
}

.service-box i {
    font-size: 1.5rem;
}

.service-box span {
    font-size: 0.75rem;
    font-weight: 600;
}

.service-option input:checked+.service-box {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(163, 230, 53, 0.05);
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 2rem;
}

.highlight-code {
    color: var(--primary-color);
    font-weight: 600;
}

.btn-icon {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.3);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: rgba(163, 230, 53, 0.1);
    color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
}

.ui-svg-icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: middle;
    color: currentColor;
    flex: 0 0 auto;
}

.stat-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.stat-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

#status-gasto-base {
    font-size: 1.02rem;
    white-space: nowrap;
}

.dashboard-actions {
    width: 100%;
}

.action-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    margin-bottom: 0.75rem;
    cursor: pointer;
    color: var(--text-main);
    transition: all 0.2s;
    font-size: 1rem;
    font-weight: 500;
}

.action-card:hover {
    background-color: var(--card-hover);
    border-color: #4d4d53;
}

.action-card i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

/* Empty State */
.empty-state-card {
    background-color: var(--card-bg);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    margin-top: 1rem;
    animation: fadeIn 0.3s ease;
}

.empty-state-card.active {
    display: flex;
}

.empty-state-card i {
    font-size: 3rem;
    color: #eab308;
}

.empty-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Utils */
.text-warning {
    color: #eab308 !important;
}

.text-success {
    color: var(--primary-color) !important;
}

/* Trainer Specific & Notifications */
.dashboard-grid {
    margin-top: 1rem;
}

.notifications-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.notifications-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.badge-count {
    background-color: var(--primary-color);
    color: #121214;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background-color: var(--input-bg);
    transition: all 0.2s;
    border: 1px solid transparent;
}

.notification-item.unread {
    border-color: var(--primary-color);
    background-color: rgba(163, 230, 53, 0.05);
}

.notif-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.notif-icon.trainer-alert {
    background-color: rgba(163, 230, 53, 0.2);
    color: var(--primary-color);
}

.notif-icon.success-alert {
    background-color: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.notif-icon.warning-alert {
    background-color: rgba(234, 179, 8, 0.2);
    color: #eab308;
}

.notif-content {
    flex: 1;
}

.notif-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}

.notif-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.notif-desc strong {
    color: #e1e1e6;
}

.notif-time {
    font-size: 0.75rem;
    color: #7c7c8a;
}

.btn-small {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small:hover {
    background-color: var(--primary-color);
    color: #121214;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }
}

/* NOVO DESIGN: Radio Cards Verticais (Nova Consultoria) */
.radio-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.radio-card {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.radio-content {
    background: linear-gradient(145deg, rgba(32, 32, 36, 0.5) 0%, rgba(21, 21, 24, 0.7) 100%);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.radio-content i {
    font-size: 1.75rem;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.radio-content span {
    font-size: 1rem;
    font-weight: 600;
}

.radio-card:hover .radio-content {
    transform: translateY(-2px);
    border-color: rgba(163, 230, 53, 0.3);
    background: rgba(38, 38, 42, 0.8);
    color: var(--text-main);
}

.radio-card:hover .radio-content i {
    color: var(--text-main);
}

.radio-card input[type="radio"]:checked+.radio-content {
    background: linear-gradient(135deg, rgba(163, 230, 53, 0.1) 0%, rgba(163, 230, 53, 0.02) 100%);
    border-color: var(--primary-color);
    color: var(--text-main);
    box-shadow: 0 8px 24px rgba(163, 230, 53, 0.15), inset 0 0 0 1px var(--primary-color);
    transform: scale(1.02);
}

.radio-card input[type="radio"]:checked+.radio-content i {
    color: var(--primary-color);
    text-shadow: 0 0 15px rgba(163, 230, 53, 0.5);
    transform: scale(1.1);
}

/* --- NOVO LAYOUT DO TREINADOR E PERFIL DO ALUNO --- */

.trainer-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
    animation: slideDown 0.6s ease-out;
}

.t-stat-card {
    background: linear-gradient(145deg, rgba(32, 32, 36, 0.4) 0%, rgba(21, 21, 24, 0.6) 100%);
    backdrop-filter: blur(20px);
    border: 1.5px solid rgba(163, 230, 53, 0.15);
    border-radius: 24px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.t-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, rgba(163, 230, 53, 0.08) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.t-stat-card:hover {
    transform: translateY(-12px) scale(1.05);
    box-shadow: 0 20px 50px rgba(163, 230, 53, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(163, 230, 53, 0.4);
}

.t-stat-card:hover::before {
    opacity: 1;
}

.t-stat-card h3 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    letter-spacing: -1.5px;
    background: linear-gradient(to bottom, #ffffff, #8d8d99);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.t-stat-card h3.text-success {
    background: linear-gradient(to bottom, var(--primary-color), #4ade80);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 20px rgba(163, 230, 53, 0.2);
}

.t-stat-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.trainer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 0.9rem 1.25rem;
    flex: 1;
    gap: 0.75rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    background: rgba(163, 230, 53, 0.02);
    box-shadow: 0 0 0 3px rgba(163, 230, 53, 0.15);
}

.student-list-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Base Student ListItem (now Grid) */
.student-list-item.grid-layout {
    display: grid;
    grid-template-columns: 120px 2fr 1fr 100px 150px 60px;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(32, 32, 36, 0.4);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: default;
    color: var(--text-muted);
    font-size: 0.85rem;
    box-shadow: none;
    margin-bottom: 0;
}

.student-list-item.grid-layout:hover {
    background: rgba(163, 230, 53, 0.05);
    border-color: rgba(163, 230, 53, 0.2);
    transform: none;
    box-shadow: none;
}

.sli-col {
    display: flex;
    align-items: center;
}

.sli-col.ident {
    gap: 1rem;
    color: var(--text-main);
}

.student-list-item.grid-layout .sli-info h4 {
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.15;
}

.student-list-item.grid-layout .sli-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.btn-icon-minimal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}

.btn-icon-minimal:hover {
    color: var(--text-main);
}

.btn-whatsapp-quick {
    color: #25d366 !important;
}

.sli-col.actions {
    justify-content: flex-end;
    gap: 0.45rem;
}

.sli-col.actions .btn-icon-minimal {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.font-bold {
    font-weight: 700;
    color: var(--text-main);
}

.font-medium {
    font-weight: 500;
    color: var(--text-main);
}

.text-primary {
    color: var(--primary-color) !important;
    font-weight: 600;
}

.student-list-item.grid-layout .font-bold,
.student-list-item.grid-layout .font-medium,
.student-list-item.grid-layout .text-primary {
    font-size: 0.78rem;
    font-weight: 600;
}

.student-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(32, 32, 36, 0.5);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.5rem 1.75rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: slideUpFade 0.5s ease forwards;
    opacity: 0;
    position: relative;
    overflow: hidden;
}

.student-list-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: skewX(-20deg);
    transition: left 0.7s ease;
}

.student-list-item:nth-child(1) {
    animation-delay: 0.05s;
}

.student-list-item:nth-child(2) {
    animation-delay: 0.1s;
}

.student-list-item:nth-child(3) {
    animation-delay: 0.15s;
}

.student-list-item:nth-child(4) {
    animation-delay: 0.2s;
}

.student-list-item:nth-child(5) {
    animation-delay: 0.25s;
}

.student-list-item:hover {
    border-color: rgba(163, 230, 53, 0.5);
    background: rgba(163, 230, 53, 0.05);
    transform: translateY(-4px) scale(1.015);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(163, 230, 53, 0.1);
}

.student-list-item:hover::after {
    left: 200%;
}

.sli-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sli-avatar {
    width: 48px;
    height: 48px;
    background-color: var(--input-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
}

.sli-info h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    background-color: rgba(163, 230, 53, 0.2);
    color: var(--primary-color);
    border-radius: 12px;
    font-weight: 600;
}

.badge.inactive {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.sli-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.sli-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sli-right {
    color: var(--text-muted);
}

/* PERFIL DO ALUNO */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(18, 18, 20, 0.85);
    backdrop-filter: blur(12px);
    padding-top: 2rem;
    margin-top: -2rem;
}

.profile-tabs-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.p-nav-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 0.8rem 1.75rem;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.p-nav-tab:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.p-nav-tab.active {
    background: linear-gradient(135deg, var(--primary-color), #84cc16);
    color: #121214;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(163, 230, 53, 0.3);
    transform: translateY(-2px);
}

.p-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.p-tab-content.active {
    display: block;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    width: 100%;
}

.info-card {
    background: linear-gradient(145deg, rgba(32, 32, 36, 0.6) 0%, rgba(21, 21, 24, 0.6) 100%);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    animation: slideUpFade 0.4s ease forwards;
    opacity: 0;
}

.info-card.ic-horizontal {
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
}

.ic-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.ic-icon.text-success {
    color: var(--primary-color);
    background: rgba(163, 230, 53, 0.1);
}

.ic-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-card:nth-child(1) {
    animation-delay: 0.05s;
}

.info-card:nth-child(2) {
    animation-delay: 0.1s;
}

.info-card:nth-child(3) {
    animation-delay: 0.15s;
}

.info-card:nth-child(4) {
    animation-delay: 0.2s;
}

.info-card:nth-child(5) {
    animation-delay: 0.25s;
}

.info-card:nth-child(6) {
    animation-delay: 0.3s;
}

.info-card:nth-child(7) {
    animation-delay: 0.35s;
}

.info-card:nth-child(8) {
    animation-delay: 0.4s;
}

.info-card:hover {
    transform: translateY(-4px);
    background: linear-gradient(145deg, rgba(38, 38, 42, 0.8) 0%, rgba(26, 26, 30, 0.8) 100%);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.info-card:hover .ic-icon:not(.text-success) {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.info-card .lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.info-card strong {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

/* === NOVO LAYOUT DASHBOARD SIDEBAR === */
.dashboard-layout {
    display: flex;
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    background: transparent;
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, rgba(22, 22, 26, 0.8) 0%, rgba(18, 18, 22, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(163, 230, 53, 0.1);
    display: flex;
    flex-direction: column;
    padding: 2.5rem 1.8rem;
    z-index: 10;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    border: 1.5px solid transparent;
    cursor: pointer;
    width: 100%;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(163, 230, 53, 0.08);
    transition: left 0.3s ease;
    z-index: -1;
    border-radius: 14px;
}

.nav-item i,
.nav-item .ui-svg-icon {
    font-size: 1.4rem;
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.nav-item:hover {
    background: rgba(163, 230, 53, 0.1);
    border-color: rgba(163, 230, 53, 0.2);
    color: var(--primary-color);
}

.nav-item:hover::before {
    left: 0;
}

.nav-item:hover i,
.nav-item:hover .ui-svg-icon {
    color: var(--primary-color);
    transform: translateX(2px);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(163, 230, 53, 0.15) 0%, rgba(163, 230, 53, 0.06) 100%);
    border-color: rgba(163, 230, 53, 0.35);
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(163, 230, 53, 0.1);
    position: relative;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    height: 60%;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary-color), transparent);
    border-radius: 0 2px 2px 0;
    transform: translateY(-50%);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-logout:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.main-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2.5rem 3.5rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    animation: fadeIn 0.5s ease-out;
}

.main-content::-webkit-scrollbar {
    width: 8px;
}

.main-content::-webkit-scrollbar-thumb {
    background: rgba(163, 230, 53, 0.15);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: rgba(163, 230, 53, 0.25);
}

.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.5rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(163, 230, 53, 0.1);
    position: sticky;
    top: 0;
    background: rgba(18, 18, 20, 0.85);
    backdrop-filter: blur(10px);
    z-index: 50;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-search {
    flex: 1;
    max-width: 500px;
    display: none !important;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.header-search:focus-within {
    border-color: var(--primary-color);
    background: rgba(163, 230, 53, 0.02);
}

.header-search input {
    background: transparent;
    border: none;
    color: var(--text-main);
    width: 100%;
    outline: none;
    font-size: 0.9rem;
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.profile-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
}

.profile-code {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.profile-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(163, 230, 53, 0.15) 0%, rgba(163, 230, 53, 0.05) 100%);
    border: 2px solid rgba(163, 230, 53, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.4rem;
    cursor: pointer;
    appearance: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(163, 230, 53, 0.1);
    position: relative;
    overflow: hidden;
}

.profile-avatar::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(163, 230, 53, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-avatar:hover {
    transform: scale(1.1) translateY(-2px);
    border-color: rgba(163, 230, 53, 0.6);
    box-shadow: 0 8px 25px rgba(163, 230, 53, 0.25);
}

.profile-avatar:hover::before {
    opacity: 1;
}

.profile-menu-trigger {
    cursor: pointer;
}

.trainer-profile-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    z-index: 1300;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.trainer-profile-sheet-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.trainer-profile-menu.trainer-profile-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: min(100%, 540px);
    margin: 0 auto;
    background: linear-gradient(to bottom, rgba(22, 22, 26, 0.98) 0%, rgba(18, 18, 22, 0.99) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(163, 230, 53, 0.2);
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
    box-shadow: 0 -25px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    z-index: 1310;
    transform: translateY(110%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    max-height: 85vh;
}

.trainer-profile-menu.trainer-profile-sheet.active {
    transform: translateY(0);
}

.trainer-profile-sheet-handle {
    width: 48px;
    height: 5px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(163, 230, 53, 0.3), transparent);
    margin: 0 auto 1rem;
    transition: all 0.3s ease;
}

.trainer-profile-menu-head {
    margin-bottom: 0.65rem;
}

.profile-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.trainer-profile-menu-head .profile-name {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.3px;
}

.trainer-profile-menu-head {
    background: linear-gradient(135deg, rgba(163, 230, 53, 0.08) 0%, rgba(163, 230, 53, 0.02) 100%);
    padding: 1rem;
    border-radius: 16px;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(163, 230, 53, 0.15);
}

.trainer-profile-menu-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(163, 230, 53, 0.06) 0%, rgba(163, 230, 53, 0.02) 100%);
    border: 1.5px solid rgba(163, 230, 53, 0.2);
    margin-bottom: 1.2rem;
    transition: all 0.3s ease;
}

.trainer-profile-menu-code:hover {
    border-color: rgba(163, 230, 53, 0.4);
    box-shadow: 0 4px 15px rgba(163, 230, 53, 0.1);
}

.profile-code-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.trainer-profile-menu-items {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid rgba(163, 230, 53, 0.12);
    border-top: 1px solid rgba(163, 230, 53, 0.12);
}

.trainer-menu-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, rgba(163, 230, 53, 0.08) 0%, rgba(163, 230, 53, 0.02) 100%);
    border: 1.5px solid rgba(163, 230, 53, 0.2);
    border-radius: 14px;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.trainer-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary-color), transparent);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s ease;
}

.trainer-menu-item:hover {
    background: linear-gradient(135deg, rgba(163, 230, 53, 0.15) 0%, rgba(163, 230, 53, 0.06) 100%);
    border-color: rgba(163, 230, 53, 0.4);
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(163, 230, 53, 0.1);
}

.trainer-menu-item:hover::before {
    transform: scaleY(1);
}

.trainer-menu-item:active {
    transform: scale(0.98);
}

.trainer-menu-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.trainer-menu-item:hover i {
    transform: scale(1.15) rotate(5deg);
    filter: brightness(1.2);
}

.btn-profile-logout {
    width: 100%;
    min-height: 44px;
    border-radius: 12px;
    border: 1.5px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.04) 100%);
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-profile-logout::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}

.btn-profile-logout:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.18) 0%, rgba(239, 68, 68, 0.08) 100%);
    border-color: rgba(239, 68, 68, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.15);
}

.btn-profile-logout:hover::before {
    transform: translateX(100%);
}

/* Stats Row Adjustment for 4 items */
.trainer-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 0;
}

.t-stat-card {
    padding: 1.5rem;
    align-items: flex-start;
    text-align: left;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-header p {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0;
    text-transform: none;
}

.stat-header i {
    font-size: 1.5rem;
}

.t-stat-card h3 {
    font-size: 2rem;
    margin-bottom: 0;
}

/* Students Table Section */
.students-section {
    background: rgba(20, 20, 24, 0.5);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.section-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.alunos-filter-sticky {
    position: sticky;
    top: calc(0.55rem + env(safe-area-inset-top));
    z-index: 18;
    backdrop-filter: blur(8px);
}

.small-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
}

.small-search input {
    background: transparent;
    border: none;
    color: var(--text-main);
    outline: none;
    width: 150px;
}

.btn-sm {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-header-row {
    display: grid;
    grid-template-columns: 120px 2fr 1fr 100px 150px 60px;
    gap: 1rem;
    padding: 0 1.5rem 0.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table-header-row span {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.badge.active {
    background: rgba(163, 230, 53, 0.15);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    width: max-content;
}

.badge.active .dot {
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--primary-color);
}

.sli-avatar {
    width: 32px;
    height: 32px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.sli-info h4 {
    margin: 0;
    font-size: 0.95rem;
}

.sli-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.pagination-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
}

.page-controls {
    display: flex;
    gap: 0.5rem;
}

.btn-page {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-page:not(.disabled):hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-page.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 1024px) {
    .trainer-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-layout {
        flex-direction: column;
        overflow-y: auto;
    }

    .sidebar {
        width: 100%;
        height: auto;
        padding: 1rem;
    }

    .main-content {
        padding: 1rem;
    }

    .table-header-row {
        display: none;
    }

    .student-list-item.grid-layout {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   STUDENT MANAGEMENT - Pending requests & Accept/Reject
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* Sidebar nav badge */
.nav-badge {
    margin-left: auto;
    background: #f59e0b;
    color: #1a1a1e;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    animation: pulseBadge 2s ease-in-out infinite;
}

@keyframes pulseBadge {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.75;
        transform: scale(1.15);
    }
}

/* Pending section header badge */
.pending-count-badge {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Pending banner (dashboard view) */
.pending-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.35);
    border-radius: 16px;
    padding: 1.25rem 1.75rem;
    margin-bottom: 2rem;
    animation: slideDown 0.5s ease-out;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.pending-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 0% 0%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.pending-banner-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

.pending-banner-left i {
    font-size: 1.6rem;
    color: #f59e0b;
    animation: pulse 2s ease-in-out infinite;
}

.pending-banner-left strong {
    display: block;
    color: var(--text-main);
    font-weight: 700;
}

.pending-banner-left span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Pending cards grid */
.pending-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}

.pending-card {
    background: var(--card-bg);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    transition: all 0.3s ease;
    animation: slideUpFade 0.3s ease both;
}

.pending-card:hover {
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.1);
    transform: translateY(-2px);
}

.pending-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.12);
    border: 2px solid rgba(245, 158, 11, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #f59e0b;
}

.pending-card-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}

.pending-card-info .sli-sub {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.2rem;
}

.pending-date {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

/* Accept / Reject buttons */
.pending-card-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.25rem;
}

.btn-accept,
.btn-reject {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-accept {
    background: rgba(163, 230, 53, 0.15);
    color: var(--primary-color);
    border: 1px solid rgba(163, 230, 53, 0.35);
}

.btn-accept:hover {
    background: rgba(163, 230, 53, 0.28);
    border-color: var(--primary-color);
    transform: scale(1.03);
}

.btn-reject {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-reject:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    transform: scale(1.03);
}

/* Card dismiss animation */
.card-exit {
    opacity: 0;
    transform: scale(0.92) translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

/* Empty pending message */
.empty-pending-msg {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 1.5rem 0;
}

/* Stats - warning color for pending */
.text-warning {
    color: #f59e0b;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   STUDENT PROFILE EDITOR
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* Full-width scrollable layout */
.prof-editor-layout {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    animation: fadeIn 0.3s ease;
    padding: 0 1.5rem;
    max-width: 100%;
    overflow-x: hidden;
    margin: 0 auto;
}

/* Header */
.prof-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 0 1.25rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
    flex-wrap: wrap;
    width: 100%;
}

.prof-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.prof-avatar-lg {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(163, 230, 53, 0.1);
    border: 2px solid rgba(163, 230, 53, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.prof-header-left h2 {
    font-size: 1.35rem;
    font-weight: 700;
}

.prof-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: auto;
}

/* Save button */
.btn-save-plan {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: #121214;
    border: none;
    border-radius: 8px;
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    min-height: 40px;
}

.btn-save-plan:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* Tab bar */
.prof-tabs-bar {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(163, 230, 53, 0.3) transparent;
}

.prof-tabs-bar::-webkit-scrollbar {
    height: 4px;
}

.prof-tabs-bar::-webkit-scrollbar-track {
    background: transparent;
}

.prof-tabs-bar::-webkit-scrollbar-thumb {
    background: rgba(163, 230, 53, 0.3);
    border-radius: 2px;
}

.prof-tab {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.9rem 1.25rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.prof-tab:hover {
    color: var(--text-main);
}

.prof-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Plan section header */
.plan-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.plan-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.plan-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.btn-add-block {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(163, 230, 53, 0.1);
    border: 1px solid rgba(163, 230, 53, 0.35);
    color: var(--primary-color);
    border-radius: 8px;
    padding: 0.55rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-add-block:hover {
    background: rgba(163, 230, 53, 0.2);
    transform: translateY(-1px);
}

/* Workout block */
.workout-block {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 1.25rem;
    animation: slideUpFade 0.25s ease both;
    width: 100%;
}

.wb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}

.wb-header-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
}

.wb-name-input {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 700;
    outline: none;
    width: 100%;
    cursor: text;
}

.wb-name-input:hover {
    opacity: 0.8;
}

.wb-header-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.btn-add-ex {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 6px;
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-ex:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Exercise row */
.ex-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s;
}

.ex-row:last-child {
    border-bottom: none;
}

.ex-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.ex-info {
    flex: 1;
    min-width: 140px;
}

.ex-info strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.15rem;
}

.ex-obs {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.ex-stats {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.ex-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.ex-stat-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.ex-stat-input {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 600;
    text-align: center;
    width: 64px;
    padding: 0.4rem 0.25rem;
    outline: none;
    transition: border-color 0.2s;
}

.ex-stat-input:focus {
    border-color: var(--primary-color);
}

.ex-actions {
    display: flex;
    align-items: center;
}

.ex-empty-block,
.workout-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

/* Summary bar */
.plan-summary-bar {
    display: flex;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(163, 230, 53, 0.06), rgba(163, 230, 53, 0.02));
    border: 1px solid rgba(163, 230, 53, 0.2);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1rem;
    flex: 1;
    min-width: 140px;
}

.summary-item i {
    font-size: 1.4rem;
}

.summary-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.summary-item strong {
    font-size: 1rem;
    font-weight: 700;
}

/* Diet meta bar */
.diet-meta-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.diet-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    flex: 1;
    min-width: 120px;
}

.diet-meta-item.static {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.6rem 0.7rem;
    justify-content: space-between;
}

.diet-meta-item.static strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.diet-meta-input {
    background: var(--input-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    width: 100%;
    min-width: 80px;
    padding: 0.55rem 0.5rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.2s;
    pointer-events: auto !important;
    cursor: text;
    -webkit-user-select: text;
    user-select: text;
}

.diet-meta-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(163, 230, 53, 0.1);
    background: var(--input-bg);
}

.diet-meta-input:active {
    border-color: var(--primary-color);
}

/* Food table */
.food-table {
    padding: 0 1.25rem 0.75rem;
}

.food-table-head,
.food-row {
    display: grid;
    grid-template-columns: 2fr 0.9fr 0.9fr 0.8fr 0.8fr 0.8fr 40px;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 0;
}

.food-table-head {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.4rem;
    margin-bottom: 0.25rem;
}

.food-row {
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.food-input {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    width: 100%;
    padding: 0.35rem 0.4rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.food-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(163, 230, 53, 0.1);
}

.food-qty-input {
    text-align: left;
}

.food-row:last-child {
    border-bottom: none;
}

/* Modals */
.ex-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.18);
    z-index: 90;
    backdrop-filter: none !important;
    filter: none !important;
    pointer-events: none;
}

.ex-modal-overlay.active {
    display: block;
    pointer-events: auto;
    z-index: 901;
}

.ex-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: min(560px, 92vw);
    max-height: 86dvh;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    z-index: 101;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0;
    overflow: hidden;
    backdrop-filter: none !important;
    filter: none !important;
}

.ex-modal.active {
    display: flex;
    flex-direction: column;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    animation: fadeIn 0.2s ease forwards;
}

.ex-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.ex-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.ex-modal-body {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    max-height: calc(86dvh - 140px);
}

.ex-modal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.ex-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    backdrop-filter: none;
}

/* q-input override inside modal: left-aligned, normal size */
.ex-modal .q-input {
    padding: 0.75rem 0.9rem;
    font-size: 0.9rem;
    letter-spacing: 0;
    text-align: left;
    font-weight: 400;
}

/* font helpers */
.font-medium {
    font-weight: 500;
}

.font-bold {
    font-weight: 700;
}

.text-success {
    color: var(--primary-color);
}

.text-primary {
    color: var(--primary-color);
}

.text-muted {
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .ex-stats {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .ex-stat-input {
        width: 52px;
    }

    .diet-meta-bar {
        gap: 0.5rem;
        padding: 0.75rem;
        justify-content: space-between;
    }

    .diet-meta-item {
        flex: 0 1 calc(50% - 0.25rem);
        gap: 0.3rem;
        padding: 0.5rem;
        font-size: 0.75rem;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .diet-meta-input {
        width: 100%;
        min-width: 70px;
        font-size: 0.9rem;
        padding: 0.65rem 0.5rem;
        min-height: 40px;
    }

    .summary-label {
        font-size: 0.6rem;
    }

    .diet-meta-item .summary-label {
        display: none;
    }

    .plan-summary-bar {
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .summary-item {
        gap: 0.4rem;
        font-size: 0.85rem;
        flex: 1;
        min-width: 120px;
    }

    .summary-item i {
        font-size: 1.1rem;
    }

    .prof-editor-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ex-modal-grid {
        grid-template-columns: 1fr 1fr;
    }

    .food-table-head,
    .food-row {
        grid-template-columns: 2fr 1fr 1fr 40px;
    }

    .food-row > :nth-child(4),
    .food-row > :nth-child(5),
    .food-row > :nth-child(6),
    .food-table-head > :nth-child(4),
    .food-table-head > :nth-child(5),
    .food-table-head > :nth-child(6) {
        display: none;
    }

    .workout-block,
    .meal-block {
        margin-bottom: 1rem;
        border-radius: 12px;
    }

    .wb-header,
    .block-header {
        padding: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .wb-header-left {
        width: 100%;
    }

    .wb-name-input {
        font-size: 0.95rem;
    }

    .wb-header-right {
        width: 100%;
        gap: 0.4rem;
        flex-wrap: wrap;
    }

    .btn-add-ex {
        flex: 1;
        justify-content: center;
        min-height: 40px;
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .ex-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
        padding: 1rem;
    }

    .exercise-item {
        padding: 0.75rem;
    }
}

/* Profile Info & Code Copy */
.profile-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.code-copy-wrapper {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.1rem;
    width: fit-content;
    border: 1px solid transparent;
}

.code-copy-wrapper:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(163, 230, 53, 0.2);
}

.profile-code {
    font-family: 'Inter', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.05rem;
}

.btn-copy-tiny {
    background: rgba(163, 230, 53, 0.08);
    border: 1px solid rgba(163, 230, 53, 0.2);
    color: var(--primary-color);
    font-size: 0.85rem;
    padding: 0.5rem 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.code-copy-wrapper:hover .btn-copy-tiny {
    background: rgba(163, 230, 53, 0.15);
    border-color: rgba(163, 230, 53, 0.4);
    transform: scale(1.1);
}

.btn-copy-tiny.copied {
    animation: popScale 0.3s ease;
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
    color: #22c55e;
}

@keyframes popScale {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

/* Exercise Library Results */
.library-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 110;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: none !important;
    filter: none !important;
}

.library-results.active {
    display: block;
}

.lib-category {
    padding: 0.6rem 1rem 0.3rem;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary-color);
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.02);
}

.lib-item {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.lib-item:last-child {
    border-bottom: none;
}

.lib-item:hover {
    background: rgba(163, 230, 53, 0.1);
    color: var(--primary-color);
    padding-left: 1.25rem;
}

.lib-item i {
    font-size: 1.1rem;
    opacity: 0.7;
}

/* Code Copy UI */
.code-copy-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.code-copy-wrapper:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(163, 230, 53, 0.3);
}

.btn-copy-tiny {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
}

.code-copy-wrapper:hover .btn-copy-tiny {
    color: var(--primary-color);
}

/* Social & Account Login */
.social-login-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.btn-social {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-social:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.btn-social.google i {
    color: #ea4335;
    /* Google Red (simplified) */
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 2rem 0;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider:not(:empty)::before {
    margin-right: 1.5rem;
}

.divider:not(:empty)::after {
    margin-left: 1.5rem;
}

.btn-secondary-outline {
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    border: 1px dashed var(--border-color);
    color: var(--text-muted);
    border-radius: 10px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}


/* Student Protocol Views */
.protocol-content-list {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.workout-day-block,
.meal-block {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

.block-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.block-header h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin: 0;
}

.ex-list,
.meal-items-list {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ex-row {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.ex-main-info {
    margin-bottom: 0.75rem;
}

.ex-name {
    display: block;
    font-weight: 700;
    font-size: 1rem;
}

.ex-obs {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.ex-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.st-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.7rem;
}

.st-item strong {
    font-size: 0.9rem;
    color: var(--primary-color);
}

.meal-item-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.text-sub {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.meal-macros-mini {
    display: flex;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.meal-macros-mini span {
    padding: 0.2rem 0.4rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.diet-macro-summary-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    padding: 0.9rem;
    backdrop-filter: blur(14px);
}

.diet-macro-summary-title {
    font-size: 0.82rem;
    color: var(--primary-color);
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.diet-progress-row {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
}

.diet-progress-row:last-child {
    margin-bottom: 0;
}

.diet-progress-label {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    font-size: 0.68rem;
    font-weight: 700;
}

.diet-progress-label .ui-svg-icon {
    width: 0.86rem;
    height: 0.86rem;
}

.diet-progress-label.protein {
    color: #a3e635;
}

.diet-progress-label.carb {
    color: #22d3ee;
}

.diet-progress-label.fat {
    color: #fbbf24;
}

.diet-progress-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.diet-progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    animation: dietPulse 1.8s ease-in-out infinite alternate;
}

.diet-progress-fill.protein {
    background: linear-gradient(90deg, #84cc16, #a3e635);
}

.diet-progress-fill.carb {
    background: linear-gradient(90deg, #06b6d4, #22d3ee);
}

.diet-progress-fill.fat {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.diet-progress-value {
    font-size: 0.62rem;
    color: var(--text-muted);
    font-weight: 700;
}

.diet-consistency-line {
    margin: 0.2rem 0 0.35rem;
    font-size: 0.72rem;
    color: #cdd6d9;
}

.meal-header-rich {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.7rem;
}

.meal-meta-line {
    display: block;
    margin-top: 0.22rem;
    color: #d7dee3;
}

.meal-consumed-chip {
    background: rgba(163, 230, 53, 0.14);
    color: #b9f26f;
    border: 1px solid rgba(163, 230, 53, 0.35);
    padding: 0.28rem 0.5rem;
    border-radius: 999px;
    white-space: nowrap;
    font-weight: 700;
}

.meal-macros-right {
    justify-content: flex-end;
}

.meal-item-consumed {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.7rem;
}

.diet-form-card {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.5rem;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 0.6rem;
    background: rgba(0, 0, 0, 0.16);
}

.diet-form-card-highlight {
    border-color: rgba(163, 230, 53, 0.35);
}

.diet-form-title {
    font-size: 0.85rem;
    color: #a3e635;
}

.diet-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}

.diet-form-grid-main {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr 0.6fr 0.8fr;
    gap: 0.45rem;
}

.diet-form-grid-main-plan {
    display: grid;
    grid-template-columns: 1.4fr 0.7fr;
    gap: 0.45rem;
}

.diet-form-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
}

.diet-input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    color: #fff;
    padding: 0.5rem;
    min-width: 0;
}

.diet-input-sm {
    width: 92px;
    padding: 0.4rem 0.45rem;
}

.diet-select {
    appearance: none;
}

.diet-action-btn {
    min-height: 36px;
    font-weight: 700;
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.diet-action-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

.diet-action-btn:active {
    transform: translateY(0);
    filter: brightness(0.96);
}

.diet-v2-card {
    background: linear-gradient(145deg, #23252a, #1c1d22);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.meal-v2-progress {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 0.35rem;
    background: rgba(0, 0, 0, 0.15);
}

.meal-v2-progress-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    gap: 0.4rem;
    align-items: center;
    font-size: 0.72rem;
}

.meal-v2-progress-row span {
    color: #d7dde2;
    font-weight: 700;
}

.meal-v2-progress-row strong {
    color: #e8ecef;
    font-size: 0.68rem;
}

.meal-v2-progress-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.meal-v2-progress-track i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #7fc31a, #a3e635);
}

.meal-v2-progress-track.carb i {
    background: linear-gradient(90deg, #06b6d4, #22d3ee);
}

.meal-v2-progress-track.fat i {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.diet-collapsible {
    margin-top: 0.55rem;
}

.diet-collapsible summary {
    list-style: none;
    cursor: pointer;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #dfe7eb;
    font-size: 0.84rem;
    font-weight: 700;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.diet-collapsible summary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(163, 230, 53, 0.45);
}

.meal-delta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.45rem 1rem 0.2rem;
}

.meal-delta-pill {
    font-size: 0.68rem;
    border-radius: 999px;
    padding: 0.22rem 0.45rem;
    font-weight: 700;
}

.meal-delta-pill.ok {
    background: rgba(34, 197, 94, 0.15);
    color: #7ef0a5;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.meal-delta-pill.exceeded {
    background: rgba(239, 68, 68, 0.15);
    color: #ff9c9c;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.diet-search-results {
    display: grid;
    gap: 0.35rem;
}

.diet-search-item {
    text-align: left;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #f2f5f8;
    padding: 0.5rem 0.55rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.diet-search-item:hover {
    background: rgba(163, 230, 53, 0.12);
}

.diet-search-item small {
    display: block;
    color: #b8c3ca;
}

.water-quick-actions {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 0.8rem;
}

@keyframes dietPulse {
    from {
        filter: brightness(0.9);
        box-shadow: 0 0 0 rgba(163, 230, 53, 0);
    }

    to {
        filter: brightness(1.08);
        box-shadow: 0 0 10px rgba(163, 230, 53, 0.3);
    }
}

.meal-glass-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
}

.meal-header-glass {
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.meal-header-glass.tone-0 {
    background: linear-gradient(120deg, rgba(163, 230, 53, 0.26), rgba(163, 230, 53, 0.08));
}

.meal-header-glass.tone-1 {
    background: linear-gradient(120deg, rgba(34, 211, 238, 0.22), rgba(34, 211, 238, 0.07));
}

.meal-header-glass.tone-2 {
    background: linear-gradient(120deg, rgba(251, 191, 36, 0.2), rgba(251, 191, 36, 0.07));
}

.macro-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 0.2rem 0.42rem;
}

.macro-badge .ui-svg-icon {
    width: 0.78rem;
    height: 0.78rem;
}

.macro-badge.kcal {
    color: #f5f5f5;
}

.macro-badge.protein {
    color: #a3e635;
}

.macro-badge.carb {
    color: #22d3ee;
}

.macro-badge.fat {
    color: #fbbf24;
}

@media (max-width: 560px) {
    .diet-progress-row {
        grid-template-columns: 86px minmax(0, 1fr) auto;
        gap: 0.32rem;
    }

    .diet-progress-label {
        font-size: 0.62rem;
    }

    .diet-progress-value {
        font-size: 0.56rem;
    }

    .meal-macros-mini {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.28rem;
    }

    .macro-badge {
        justify-content: center;
        font-size: 0.62rem;
    }

    .meal-header-rich {
        flex-direction: column;
        align-items: flex-start;
    }

    .meal-consumed-chip {
        white-space: normal;
    }

    .meal-item-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .meal-v2-progress-row {
        grid-template-columns: 18px minmax(0, 1fr);
    }

    .meal-v2-progress-row strong {
        grid-column: 1 / -1;
        justify-self: end;
    }

    .meal-item-consumed {
        margin-left: 0;
    }

    .diet-input-sm {
        width: 100%;
    }

    .diet-form-grid-2,
    .diet-form-grid-main,
    .diet-form-grid-main-plan,
    .diet-form-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Dashboard Layout & Professional Student Sidebar */
.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--bg-color);
}

.sidebar.student {
    background: rgba(32, 32, 36, 0.4);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.nav-item.active {
    background: rgba(163, 230, 53, 0.1);
    color: var(--primary-color);
}

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.btn-logout {
    color: #ef4444 !important;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.05) !important;
}

.main-content {
    overflow-y: auto;
    padding: 3rem 5%;
    background: radial-gradient(circle at 100% 0%, rgba(163, 230, 53, 0.03) 0%, transparent 40%);
}

.empty-state-card {
    background: var(--card-bg);
    border: 1px dashed var(--border-color);
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.empty-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.empty-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Responsive Student Sidebar */
@media (max-width: 992px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .sidebar.student {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        height: auto;
        flex-direction: row;
        padding: 0.75rem 1rem;
        z-index: 100;
        justify-content: space-around;
        border-right: none;
        border-top: 1px solid var(--border-color);
        gap: 0;
    }

    .sidebar-logo,
    .sidebar-footer,
    .nav-item span {
        display: none;
    }

    .sidebar-nav {
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
    }

    .nav-item {
        padding: 0.75rem;
        flex-direction: column;
        gap: 0.2rem;
        font-size: 0.7rem;
    }

    .main-content {
        padding: 2rem 1.5rem 6rem 1.5rem;
    }
}

/* LOGIN REFINEMENTS & CHECKBOX */
.remember-me-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.25rem 0 1.75rem 0;
    font-size: 0.85rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: var(--text-muted);
    user-select: none;
    transition: all 0.2s ease;
}

.checkbox-wrapper:hover {
    color: var(--text-main);
}

.checkbox-wrapper input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 20px;
    width: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-wrapper:hover .checkmark {
    border-color: rgba(163, 230, 53, 0.4);
    background: rgba(163, 230, 53, 0.05);
}

.checkbox-wrapper input:checked~.checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(163, 230, 53, 0.2);
}

.checkmark:after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #121214;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.checkbox-wrapper input:checked~.checkmark:after {
    display: block;
}

.forgot-pass {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.forgot-pass:hover {
    opacity: 1;
    text-shadow: 0 0 8px rgba(163, 230, 53, 0.3);
}

/* HOME USER HEADER */
.user-home-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 2rem;
    animation: slideDownFade 0.5s ease both;
}

@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-greeting {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar-mini {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: #121214;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.greeting-text {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1rem;
}

.greeting-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-logout-mini {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout-mini:hover {
    background: #ef4444;
    color: #fff;
    transform: scale(1.05);
}

/* -- HEVY STYLE WORKOUT LOG -- */
.log-content-list {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-bottom: 5rem;
}

.log-exercise-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeIn 0.3s ease;
}

.log-ex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pr-summary-card {
    margin-top: 0.55rem;
    padding: 1.05rem 1.15rem;
    border-radius: 18px;
    border: 1px solid rgba(250, 204, 21, 0.32);
    background:
        radial-gradient(circle at 15% 18%, rgba(250, 204, 21, 0.22), transparent 55%),
        radial-gradient(circle at 85% 10%, rgba(251, 191, 36, 0.18), transparent 60%),
        linear-gradient(135deg, rgba(26, 26, 30, 0.98), rgba(16, 16, 20, 0.99));
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.45),
        inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    animation: prSummaryReveal 0.45s ease;
}

.pr-summary-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 10%, rgba(255, 255, 255, 0.14) 45%, transparent 80%);
    transform: translateX(-120%);
    animation: prSummarySheen 3.2s ease-in-out infinite;
    pointer-events: none;
}

.pr-summary-card::before {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 14px;
    border: 1px dashed rgba(250, 204, 21, 0.12);
    opacity: 0.4;
    pointer-events: none;
}

.pr-summary-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.6rem;
}

.pr-summary-head strong {
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #fde68a;
    margin-right: auto;
}

.pr-summary-head i {
    font-size: 1.05rem;
    color: #facc15;
    filter: drop-shadow(0 0 12px rgba(250, 204, 21, 0.75));
    margin-right: 0.45rem;
}

.pr-summary-count {
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(250, 204, 21, 0.35);
    background: rgba(250, 204, 21, 0.2);
    color: #fef3c7;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.pr-summary-list {
    display: grid;
    gap: 0.6rem;
}

.pr-summary-item {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.8rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    position: relative;
    overflow: hidden;
}

.pr-summary-item:hover {
    transform: translateY(-1px);
    border-color: rgba(250, 204, 21, 0.35);
    background: rgba(250, 204, 21, 0.08);
}

.pr-summary-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12%;
    bottom: 12%;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(250, 204, 21, 0.85), rgba(163, 230, 53, 0.5));
    opacity: 0.7;
}

.pr-summary-item i {
    font-size: 1rem;
    color: #111827;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #fde68a, #facc15);
    box-shadow: 0 8px 16px rgba(250, 204, 21, 0.35);
}

.pr-summary-label {
    display: block;
    font-size: 0.64rem;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.pr-summary-value {
    display: block;
    font-size: 1.02rem;
    font-weight: 900;
    color: #fef3c7;
}

.pr-summary-set {
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(163, 230, 53, 0.35);
    background: rgba(163, 230, 53, 0.2);
    color: #ecfccb;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

@keyframes prSummaryReveal {
    0% {
        opacity: 0;
        transform: translateY(6px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes prSummarySheen {
    0% {
        transform: translateX(-120%);
        opacity: 0;
    }
    35% {
        opacity: 0.7;
    }
    70% {
        transform: translateX(40%);
        opacity: 0;
    }
    100% {
        transform: translateX(120%);
        opacity: 0;
    }
}

.log-ex-header h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 700;
}

.log-set-table {
    width: 100%;
}

.log-set-header {
    display: grid;
    grid-template-columns: 44px minmax(80px, 1fr) minmax(80px, 1fr) minmax(60px, 0.7fr) minmax(60px, 0.7fr) 48px;
    gap: 0.4rem;
    padding: 0.5rem 0;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    text-align: center;
}

.log-set-row {
    display: grid;
    grid-template-columns: 44px minmax(80px, 1fr) minmax(80px, 1fr) minmax(60px, 0.7fr) minmax(60px, 0.7fr) 48px;
    gap: 0.4rem;
    align-items: center;
    padding: 0.4rem 0;
    transition: background 0.2s;
    position: relative;
}

.log-set-row.pr-hit {
    background: linear-gradient(90deg, rgba(250, 204, 21, 0.18), rgba(163, 230, 53, 0.1));
    border-radius: 12px;
    box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.25), 0 10px 24px rgba(250, 204, 21, 0.18);
    overflow: hidden;
}

.log-set-row.completed {
    background: rgba(163, 230, 53, 0.1);
    opacity: 0.85;
}

.log-set-row.completed .set-input {
    pointer-events: none;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
}

.set-number {
    font-weight: 700;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    margin: 0 auto;
}

.set-number.has-pr {
    background: rgba(250, 204, 21, 0.12);
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.25);
}

.set-pr-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.set-pr-icon .ui-svg-icon {
    width: 16px;
    height: 16px;
}

.set-number.has-pr .set-pr-icon {
    animation: trophyFloat 2.2s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.6));
}

.log-set-row.pr-hit::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 10%, rgba(255, 255, 255, 0.18) 45%, transparent 80%);
    transform: translateX(-120%);
    animation: prSheen 2.8s ease-in-out infinite;
    pointer-events: none;
    mix-blend-mode: screen;
}

.log-set-row.pr-just-hit::before {
    content: '';
    position: absolute;
    inset: -30%;
    background:
        radial-gradient(circle, rgba(250, 204, 21, 0.35), transparent 55%),
        radial-gradient(circle, rgba(163, 230, 53, 0.25), transparent 60%);
    animation: prBurst 0.9s ease-out;
    pointer-events: none;
    mix-blend-mode: screen;
}

.log-set-row.pr-just-hit .set-pr-icon {
    animation: trophyPop 0.6s ease-out;
}

.set-type-popover {
    position: fixed;
    background: #1e1e21;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0.4rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    min-width: 150px;
}

.set-type-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    border-radius: 10px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.set-type-option:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

.set-type-option.active {
    border-color: rgba(163, 230, 53, 0.35);
    background: rgba(163, 230, 53, 0.12);
    color: var(--primary-color);
}

.set-type-option.danger {
    border-color: rgba(248, 113, 113, 0.25);
    background: rgba(248, 113, 113, 0.08);
    color: #f87171;
}

.set-type-option.danger:hover {
    border-color: rgba(248, 113, 113, 0.5);
    background: rgba(248, 113, 113, 0.18);
}

.set-type-option.disabled,
.set-type-option:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.set-type-option .ui-svg-icon {
    width: 16px;
    height: 16px;
}

.set-type-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0.2rem 0.2rem;
}

.set-type-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.75rem;
}

.set-number.type-normal {
    background: rgba(163, 230, 53, 0.08);
    color: var(--primary-color);
}

.set-number.locked {
    cursor: default;
    opacity: 0.9;
}

.set-number.type-warmup {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.set-number.type-drop {
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.set-number.type-failure {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.set-number.type-restpause {
    background: rgba(14, 165, 233, 0.12);
    color: #7dd3fc;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.set-number.type-preparatoria,
.set-number.type-tempo {
    background: rgba(234, 88, 12, 0.12);
    color: #fdba74;
    border: 1px solid rgba(234, 88, 12, 0.3);
}

.set-number.type-cluster {
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.set-prev {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.set-pr-banner {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.34rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(250, 204, 21, 0.35);
    background:
        radial-gradient(circle at 20% 50%, rgba(250, 204, 21, 0.35), transparent 55%),
        linear-gradient(90deg, rgba(250, 204, 21, 0.22), rgba(34, 197, 94, 0.12));
    color: #fef3c7;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.35);
    box-shadow:
        0 0 0 1px rgba(250, 204, 21, 0.18),
        0 8px 18px rgba(250, 204, 21, 0.18);
    position: relative;
    overflow: hidden;
}

.log-set-row.pr-hit .set-pr-banner {
    animation: prPulse 1.6s ease-in-out infinite;
}

.set-pr-banner .ui-svg-icon {
    width: 14px;
    height: 14px;
}

.set-pr-banner::after {
    content: '';
    position: absolute;
    inset: -30% -10%;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.35) 20%, transparent 40%);
    transform: translateX(-120%);
    animation: prShine 2.8s ease-in-out infinite;
    pointer-events: none;
}

.log-set-history {
    display: grid;
    grid-template-columns: 44px minmax(80px, 1fr) minmax(80px, 1fr) minmax(60px, 0.7fr) minmax(60px, 0.7fr) 48px;
    gap: 0.4rem;
    padding: 0 0 0.5rem 0;
    margin-top: -0.15rem;
}

.log-set-history .set-history-line {
    grid-column: 1 / -1;
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.01rem;
    text-align: left;
    padding: 0 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.log-set-history.pr-hit .set-history-line {
    color: #fde68a;
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.35);
}

@keyframes prPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(250, 204, 21, 0.2);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 18px rgba(250, 204, 21, 0.35);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(250, 204, 21, 0.2);
    }
}

@keyframes prShine {
    0% {
        transform: translateX(-120%) rotate(4deg);
        opacity: 0;
    }
    30% {
        opacity: 0.9;
    }
    50% {
        transform: translateX(20%) rotate(4deg);
        opacity: 0;
    }
    100% {
        transform: translateX(120%) rotate(4deg);
        opacity: 0;
    }
}

@keyframes trophyFloat {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px) scale(1.06);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes trophyPop {
    0% {
        transform: scale(0.8) rotate(-6deg);
        filter: drop-shadow(0 0 0 rgba(250, 204, 21, 0.2));
    }
    60% {
        transform: scale(1.2) rotate(4deg);
        filter: drop-shadow(0 0 10px rgba(250, 204, 21, 0.8));
    }
    100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 4px rgba(250, 204, 21, 0.5));
    }
}

@keyframes prSheen {
    0% {
        transform: translateX(-120%);
        opacity: 0;
    }
    30% {
        opacity: 0.8;
    }
    60% {
        transform: translateX(40%);
        opacity: 0;
    }
    100% {
        transform: translateX(120%);
        opacity: 0;
    }
}

@keyframes prBurst {
    0% {
        transform: scale(0.6);
        opacity: 0.9;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.col-prev {
    opacity: 0.4;
    font-weight: 500;
}

.set-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0.4rem;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    width: 100%;
    transition: all 0.2s;
}

/* Tactile Input Style */
.log-input-tactile {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.05);
    cursor: text;
}

.log-input-tactile:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.log-input-tactile:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(163, 230, 53, 0.2);
    outline: none;
}

/* Hide arrows in number inputs */
.set-input::-webkit-inner-spin-button,
.set-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-check-set {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 0 auto;
}

.btn-check-set:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.btn-check-set.active {
    background: #A3E635;
    border-color: #A3E635;
    color: #000;
    transform: scale(1.05);
}

.btn-check-set .ui-svg-icon {
    width: 0.95rem;
    height: 0.95rem;
}

.btn-remove-set {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1.5px solid rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.08);
    color: #f87171;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-remove-set:hover {
    border-color: rgba(248, 113, 113, 0.6);
    background: rgba(248, 113, 113, 0.16);
}

.btn-remove-set:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: rgba(248, 113, 113, 0.2);
    background: rgba(248, 113, 113, 0.06);
}

.btn-remove-set .ui-svg-icon {
    width: 0.9rem;
    height: 0.9rem;
}

/* Rest Timer Pill */
.rest-timer-pill {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(32, 32, 36, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--primary-color);
    border-radius: 24px;
    padding: 0;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(163, 230, 53, 0.1);
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    min-width: 250px;
    transition: all 0.3s ease;
}

.rest-timer-pill.timer-ended {
    border-color: #ef4444;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.4);
    animation: pulseRed 1s infinite alternate;
}

@keyframes pulseRed {
    from {
        transform: translateX(-50%) scale(1);
    }

    to {
        transform: translateX(-50%) scale(1.05);
    }
}

.rest-timer-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    width: 100%;
}

.rest-progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 100%;
    transition: width 1s linear;
}

.rest-timer-pill.timer-ended .rest-progress-fill {
    background: #ef4444;
}

.rest-timer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    gap: 1.5rem;
}

@keyframes slideUp {
    from {
        bottom: -5rem;
        opacity: 0;
    }

    to {
        bottom: 2rem;
        opacity: 1;
    }
}

.rest-time {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

.rest-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-rest-skip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-rest-skip:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-rest-add {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-rest-add:hover {
    background: var(--primary-color);
    color: #121214;
}

.log-ex-footer {
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.btn-add-set {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 0.6rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-set:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border-color: var(--text-muted);
}

.btn-add-set .ui-svg-icon,
.btn-icon-tiny .ui-svg-icon {
    width: 0.88rem;
    height: 0.88rem;
}

@media (max-width: 480px) {

    .log-set-header,
    .log-set-row {
        grid-template-columns: 34px minmax(64px, 1fr) minmax(64px, 1fr) minmax(52px, 0.7fr) minmax(52px, 0.7fr) 44px;
        gap: 0.28rem;
    }

    .set-prev {
        font-size: 0.65rem;
    }

    .set-input {
        padding: 0.4rem 0.2rem;
        font-size: 0.85rem;
    }
}

/* Personal Records (PR) Styles */
.pr-trophy-container {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
    vertical-align: middle;
}

.pr-trophy {
    color: #fbbf24;
    /* Golden */
    font-size: 1.1rem;
    filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.4));
    animation: prPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: help;
}

.pr-trophy .ui-svg-icon {
    width: 1em;
    height: 1em;
}

.pr-badge {
    font-size: 0.65rem;
    font-weight: 700;
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 0.02rem;
    animation: fadeIn 0.5s ease;
}

@keyframes prPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    70% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 1;
        transform: translateX(-5px);
    }

    to {
        opacity: 1;

        /* -- Set Types & RPE -- */
        .set-number {
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            font-size: 0.8rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 2px solid transparent;
            background: rgba(255, 255, 255, 0.05);
            color: var(--text-muted);
        }

        .set-number.type-normal {
            background: rgba(163, 230, 53, 0.1);
            color: var(--primary-color);
        }

        .set-number.type-warmup {
            background: rgba(59, 130, 246, 0.1);
            color: #3b82f6;
            border-color: rgba(59, 130, 246, 0.3);
        }

        .set-number.type-drop {
            background: rgba(168, 85, 247, 0.1);
            color: #a855f7;
            border-color: rgba(168, 85, 247, 0.3);
        }

        .set-number.type-failure {
            background: rgba(239, 68, 68, 0.1);
            color: #ef4444;
            border-color: rgba(239, 68, 68, 0.3);
        }

        .set-type-popover {
            position: absolute;
            background: #1e1e21;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            padding: 0.5rem;
            z-index: 100;
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
            animation: fadeIn 0.2s ease;
        }

        .type-option {
            padding: 0.5rem 1rem;
            border-radius: 8px;
            font-size: 0.85rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            color: var(--text-main);
            transition: background 0.2s ease;
        }

        .type-option:hover {
            background: rgba(255, 255, 255, 0.05);
        }

        .rpe-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
        }

        .rpe-input {
            width: 34px;
            height: 34px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 8px;
            text-align: center;
            color: var(--text-main);
            font-size: 0.85rem;
            font-weight: 600;
            transition: all 0.2s ease;
        }

        .rpe-input:focus {
            border-color: var(--primary-color);
            background: rgba(163, 230, 53, 0.05);
            outline: none;
        }

        .rpe-label {
            font-size: 0.6rem;
            color: var(--text-muted);
            font-weight: 700;
        }

        transform: translateX(0);
    }
}

/* Exercise Notes */
.exercise-notes-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.exercise-notes-input:focus::placeholder {
    color: transparent;
}

.exercise-notes-input.has-prev::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.exercise-prev-note {
    margin-top: 0.35rem;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.55);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    opacity: 0.7;
}

.exercise-prev-note .ui-svg-icon {
    width: 12px;
    height: 12px;
    opacity: 0.7;
}

/* Workout Summary Styles */
.workout-summary-view {
    padding: 1.6rem;
    position: relative;
}

.workout-summary-view::before {
    content: '';
    position: absolute;
    inset: -10% -10% auto;
    height: 240px;
    background:
        radial-gradient(circle at 18% 30%, rgba(163, 230, 53, 0.18), transparent 60%),
        radial-gradient(circle at 85% 15%, rgba(56, 189, 248, 0.12), transparent 55%);
    pointer-events: none;
    z-index: 0;
}

.workout-summary-view > * {
    position: relative;
    z-index: 1;
}

.summary-header {
    text-align: center;
    margin-bottom: 1.8rem;
    animation: summaryHeroIn 0.6s ease;
}

.summary-icon-celebration {
    font-size: 2.8rem;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.4));
    animation: confettiPop 1s ease;
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.25), rgba(163, 230, 53, 0.12));
    border: 1px solid rgba(250, 204, 21, 0.35);
    box-shadow: 0 16px 30px rgba(250, 204, 21, 0.18);
    margin-inline: auto;
    position: relative;
}

.summary-icon-celebration::before,
.summary-icon-celebration::after {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 24px;
    border: 1px dashed rgba(250, 204, 21, 0.28);
    opacity: 0.5;
    animation: confettiSpin 4s linear infinite;
    pointer-events: none;
}

.summary-icon-celebration::after {
    inset: -20px;
    opacity: 0.25;
    animation-duration: 6s;
}

.summary-main-title {
    font-size: 1.9rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.01em;
}

.summary-subtitle {
    color: var(--text-muted);
    margin-top: 0.45rem;
    font-size: 0.95rem;
}

.summary-divider {
    margin: 1.8rem 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
}

.summary-section-title {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12rem;
}

.summary-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.4rem 0 1.2rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.summary-stats-grid::-webkit-scrollbar {
    display: none;
}

.summary-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.summary-stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 1.15rem 1.2rem;
    text-align: left;
    display: grid;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
    animation: scaleUp 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.summary-stat-card:nth-child(2) {
    animation-delay: 0.1s;
}

.summary-stat-card:nth-child(3) {
    animation-delay: 0.2s;
}

.summary-stat-card i {
    font-size: 1.05rem;
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(163, 230, 53, 0.16);
    color: var(--primary-color);
    box-shadow: 0 8px 18px rgba(163, 230, 53, 0.22);
}

.summary-stat-badge {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(250, 204, 21, 0.35);
    background: rgba(250, 204, 21, 0.2);
    color: #fde68a;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.summary-stat-card.is-pr {
    border-color: rgba(250, 204, 21, 0.4);
    box-shadow: 0 14px 28px rgba(250, 204, 21, 0.18);
}

.summary-stat-card.is-pr i {
    background: linear-gradient(135deg, #fde68a, #facc15);
    color: #111827;
    animation: trophyFloat 2.4s ease-in-out infinite;
}

.summary-stat-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--text-main);
    margin: 0.15rem 0 0.05rem;
}

.summary-stat-label {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.12rem;
}

.summary-exercise-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid rgba(163, 230, 53, 0.9);
    border-radius: 14px;
    padding: 1.1rem 1.15rem;
    margin-bottom: 1rem;
    animation: fadeIn 0.5s ease both;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.summary-exercise-list {
    display: grid;
    gap: 0.9rem;
}

.summary-ex-title {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-set-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.summary-set-pill {
    background: rgba(255, 255, 255, 0.06);
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.summary-set-pill.has-pr {
    border-color: rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.1);
    color: #fde68a;
    box-shadow: 0 6px 16px rgba(251, 191, 36, 0.2);
}

.summary-set-trophy {
    font-size: 0.8rem;
    color: #facc15;
    filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.55));
    animation: trophyPop 0.8s ease;
}

.summary-actions {
    margin-top: 2.6rem;
    display: grid;
    gap: 0.75rem;
    justify-items: center;
}

.summary-actions .btn-secondary {
    padding: 0.9rem 2.4rem;
    font-size: 0.95rem;
}

.summary-actions .btn-primary {
    padding: 1rem 3rem;
    font-size: 1rem;
}

@keyframes summaryHeroIn {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes confettiPop {
    0% {
        transform: scale(0.6) rotate(-6deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.1) rotate(2deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

@keyframes confettiSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 600px) {
    .summary-stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .workout-summary-view {
        padding: 1.3rem;
    }

    .summary-icon-celebration {
        width: 62px;
        height: 62px;
        font-size: 2.4rem;
    }

    .summary-main-title {
        font-size: 1.6rem;
    }

    .summary-stat-card {
        padding: 1rem 1.05rem;
    }

    .summary-actions .btn-secondary,
    .summary-actions .btn-primary {
        width: 100%;
    }
}

/* -- Workout Routines (Meu Treino Refactor) -- */
.workout-tabs-container {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.workout-tabs-container::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: rgba(163, 230, 53, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 15px rgba(163, 230, 53, 0.1);
}

.routine-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.routine-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    opacity: 0.4;
}

.routine-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.routine-title-box h2 {
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}

.routine-meta {
    display: flex;
    gap: 1.2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.routine-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.muscle-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tag-muscle {
    background: rgba(163, 230, 53, 0.08);
    border: 1px solid rgba(163, 230, 53, 0.15);
    padding: 0.35rem 0.9rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.02rem;
}

.routine-exercise-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.routine-ex-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    transition: transform 0.2s ease;
}

.routine-ex-item:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.04);
}

.ex-name-box span {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
}

.ex-sets-mini {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.student-edit-card {
    background: rgba(163, 230, 53, 0.08);
    border: 1px solid rgba(163, 230, 53, 0.22);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.student-edit-card.active {
    background: rgba(163, 230, 53, 0.12);
}

.student-edit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.student-edit-hint {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.student-edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-danger-outline {
    border-color: rgba(248, 113, 113, 0.5);
    color: #f87171;
}

.btn-danger-outline:hover {
    background: rgba(248, 113, 113, 0.12);
}

.exercise-edit-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.btn-icon-tiny.action-edit {
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.45);
    background: rgba(96, 165, 250, 0.12);
}

.student-ex-empty {
    padding: 1rem;
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.routine-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 2rem;
}

/* ---------------------------------------------------------------------------
   MEU PERFIL (Student Profile View)
   --------------------------------------------------------------------------- */

/* Profile Header Card */
.perfil-header-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: linear-gradient(135deg, rgba(32, 32, 36, 0.8) 0%, rgba(21, 21, 24, 0.9) 100%);
    border: 1px solid rgba(163, 230, 53, 0.15);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.5s ease;
}

.perfil-header-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #84cc16, var(--primary-color));
    background-size: 200% 100%;
    animation: shimmer 3s ease infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.perfil-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #84cc16);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: #121214;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(163, 230, 53, 0.3);
}

.perfil-header-info {
    flex: 1;
}

.perfil-header-info h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.perfil-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.perfil-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.perfil-badge.active {
    background: rgba(163, 230, 53, 0.12);
    color: var(--primary-color);
    border: 1px solid rgba(163, 230, 53, 0.25);
}

.perfil-badge.muted {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-perfil-edit {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-radius: 10px;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-perfil-edit:hover {
    background: rgba(163, 230, 53, 0.1);
    border-color: rgba(163, 230, 53, 0.3);
    color: var(--primary-color);
}

.perfil-quick-actions {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.perfil-quick-actions .btn-secondary {
    width: auto;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 0.95rem;
    border-radius: 10px;
}

.perfil-quick-actions .btn-perfil-logout {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
}

.perfil-quick-actions .btn-perfil-logout:hover {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.45);
}

/* Section Titles */
.perfil-section-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.perfil-section-title i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.perfil-section-title h3 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    flex: 1;
}

.perfil-range-select {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 0.4rem 0.7rem;
    cursor: pointer;
    outline: none;
}

.perfil-range-select:focus {
    border-color: var(--primary-color);
}

/* Metrics Grid */
.perfil-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.perfil-metric-card {
    background: linear-gradient(145deg, rgba(32, 32, 36, 0.6) 0%, rgba(21, 21, 24, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: slideUpFade 0.4s ease both;
}

.perfil-metric-card:nth-child(2) {
    animation-delay: 0.05s;
}

.perfil-metric-card:nth-child(3) {
    animation-delay: 0.1s;
}

.perfil-metric-card:nth-child(4) {
    animation-delay: 0.15s;
}

.perfil-metric-card:hover {
    border-color: rgba(163, 230, 53, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.metric-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.metric-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-edit-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.2rem;
    transition: color 0.2s;
}

.perfil-metric-card:hover .metric-edit-btn {
    color: var(--primary-color);
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.metric-unit {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 0.2rem;
}

.metric-delta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0;
}

.metric-delta i {
    font-size: 0.85rem;
}

.metric-delta.up {
    color: #f97316;
}

.metric-delta.down {
    color: #22c55e;
}

.metric-delta.healthy {
    color: #22c55e;
}

.metric-delta.warn {
    color: #f97316;
}

.metric-delta.neutral {
    color: var(--text-muted);
}

/* Chart Card */
.perfil-chart-card {
    background: linear-gradient(145deg, rgba(32, 32, 36, 0.6) 0%, rgba(21, 21, 24, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.perfil-chart-card canvas {
    width: 100%;
    height: 220px;
}

.perfil-chart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 2rem;
    color: var(--text-muted);
    text-align: center;
}

.perfil-chart-empty i {
    font-size: 2rem;
    opacity: 0.3;
}

.perfil-chart-empty p {
    font-size: 0.85rem;
}

/* Personal Info Grid */
.perfil-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.perfil-info-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    transition: border-color 0.2s;
}

.perfil-info-item:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.perfil-info-item>i {
    font-size: 1.2rem;
    color: var(--primary-color);
    opacity: 0.7;
}

.perfil-info-item div {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.info-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.info-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

/* History List */
.perfil-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.perfil-history-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    animation: slideUpFade 0.3s ease both;
}

.history-date {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    font-weight: 500;
}

.history-date i {
    color: var(--primary-color);
    opacity: 0.6;
}

.history-changes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.history-change-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    font-size: 0.78rem;
    color: var(--text-main);
}

.history-change-chip i {
    color: var(--primary-color);
    font-size: 0.85rem;
}

.history-delta {
    font-weight: 700;
    margin-left: 0.2rem;
}

.history-delta.up {
    color: #f97316;
}

.history-delta.down {
    color: #22c55e;
}

.perfil-history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    padding: 2rem;
    color: var(--text-muted);
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.perfil-history-empty i {
    font-size: 1.5rem;
    opacity: 0.3;
}

.perfil-history-empty p {
    font-size: 0.85rem;
    max-width: 320px;
    line-height: 1.5;
}

/* Modal */
.perfil-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.perfil-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.perfil-modal {
    background: linear-gradient(145deg, #202024, #1a1a1e);
    border: 1px solid rgba(163, 230, 53, 0.15);
    border-radius: 20px;
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.perfil-modal-overlay.active .perfil-modal {
    transform: translateY(0) scale(1);
}

.perfil-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.perfil-modal-header h3 {
    font-size: 1rem;
    font-weight: 700;
}

.perfil-modal-body {
    padding: 1.5rem;
}

.perfil-modal-field {
    margin-bottom: 1.25rem;
}

.perfil-modal-field label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.perfil-modal-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
}

.perfil-modal-current span {
    color: var(--text-muted);
}

.perfil-modal-current strong {
    color: var(--primary-color);
}

.perfil-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Responsive adjustments for profile */
@media (max-width: 600px) {
    .perfil-header-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .perfil-badges {
        justify-content: center;
    }

    .perfil-metrics-grid {
        grid-template-columns: 1fr 1fr;
    }

    .perfil-info-grid {
        grid-template-columns: 1fr;
    }

    .btn-perfil-edit {
        width: 100%;
        justify-content: center;
    }

    .perfil-quick-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* ---------------------------------------------------------------------------
   TREINO SUBVIEW SYSTEM (Landing, Análise, Histórico)
   --------------------------------------------------------------------------- */

/* Treino Options Landing */
.treino-options-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.treino-option-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: linear-gradient(145deg, rgba(32, 32, 36, 0.5) 0%, rgba(21, 21, 24, 0.7) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 1.5rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: left;
    color: var(--text-main);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.treino-option-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
    transform: skewX(-20deg);
    transition: left 0.7s ease;
}

.treino-option-card:hover {
    border-color: rgba(163, 230, 53, 0.3);
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25), 0 0 20px rgba(163, 230, 53, 0.1);
}

.treino-option-card:hover::after {
    left: 200%;
}

.treino-option-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
    transition: all 0.3s;
}

.treino-option-icon.active-icon {
    background: linear-gradient(135deg, var(--primary-color), #84cc16);
    color: #121214;
    box-shadow: 0 4px 15px rgba(163, 230, 53, 0.3);
}

.treino-option-icon.history-icon {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

.treino-option-card:hover .treino-option-icon.history-icon {
    background: rgba(163, 230, 53, 0.12);
    color: var(--primary-color);
}

.treino-option-info {
    flex: 1;
}

.treino-option-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.treino-option-info p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.treino-option-arrow {
    color: var(--text-muted);
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.treino-option-card:hover .treino-option-arrow {
    color: var(--primary-color);
    transform: translateX(4px);
}

/* Back Button for subviews */
.btn-treino-back {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0.5rem 0;
    font-weight: 500;
}

.btn-treino-back:hover {
    color: var(--primary-color);
}

/* Dúvida Button */
.btn-duvida-treino {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-radius: 10px;
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-duvida-treino:hover {
    background: rgba(163, 230, 53, 0.1);
    border-color: rgba(163, 230, 53, 0.3);
    color: var(--primary-color);
}

/* History Evolution Grid */
.history-evolution-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.evo-card {
    background: linear-gradient(145deg, rgba(32, 32, 36, 0.6) 0%, rgba(21, 21, 24, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 1rem;
    text-align: center;
    animation: slideUpFade 0.4s ease both;
}

.evo-card:nth-child(2) {
    animation-delay: 0.05s;
}

.evo-card:nth-child(3) {
    animation-delay: 0.1s;
}

.evo-card:nth-child(4) {
    animation-delay: 0.15s;
}

.evo-icon {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.4rem;
}

.evo-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.evo-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-top: 0.25rem;
}

/* Workout History List */
.history-workout-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-workout-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.25s ease;
    animation: slideUpFade 0.3s ease both;
}

.history-workout-card:hover {
    border-color: rgba(163, 230, 53, 0.2);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.history-workout-left {
    flex: 1;
}

.history-workout-date {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
}

.history-workout-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.history-workout-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.history-workout-meta i {
    font-size: 0.85rem;
    color: var(--primary-color);
    opacity: 0.6;
}

.history-workout-exercises {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.tag-muscle.muted {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.06);
}

.history-workout-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    flex-shrink: 0;
    margin-left: 1rem;
}

.history-feedback {
    margin-top: 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.history-feedback-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.history-feedback-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.history-feedback-chip i {
    font-size: 0.85rem;
    color: var(--primary-color);
    opacity: 0.8;
}

.history-feedback-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.history-pr-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(250, 204, 21, 0.12);
    border: 1px solid rgba(250, 204, 21, 0.25);
    color: #facc15;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
}

.history-volume {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* History Detail Modal */
.history-detail-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.hd-stat {
    flex: 1 1 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 0.75rem;
}

.hd-stat i {
    font-size: 1.1rem;
    color: var(--primary-color);
}

.hd-stat span {
    font-size: 1rem;
    font-weight: 700;
}

.hd-stat small {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.history-detail-exercises {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hd-exercise {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
}

.hd-exercise h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--text-main);
}

.hd-ex-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.6rem;
}

.hd-ex-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(163, 230, 53, 0.12);
    border: 1px solid rgba(163, 230, 53, 0.3);
    color: var(--primary-color);
    font-weight: 700;
}

.hd-ex-chip.pr {
    background: rgba(250, 204, 21, 0.12);
    border-color: rgba(250, 204, 21, 0.35);
    color: #facc15;
}

.hd-ex-note {
    flex: 1 1 100%;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.hd-sets {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.hd-set-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.02);
}

.hd-set-row.has-pr {
    background: rgba(250, 204, 21, 0.06);
    border: 1px solid rgba(250, 204, 21, 0.12);
}

.hd-set-rpe {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.hd-set-exec {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
    margin-left: 0.6rem;
}

.hd-set-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(163, 230, 53, 0.12);
    color: var(--primary-color);
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.achievement-toast-container {
    position: fixed;
    left: 50%;
    bottom: 96px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 9999;
    pointer-events: none;
}

.achievement-toast {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(250, 204, 21, 0.35);
    color: #f8fafc;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    transition: opacity 0.2s ease, transform 0.2s ease;
    min-width: 220px;
    max-width: min(90vw, 320px);
}

.achievement-toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.achievement-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(250, 204, 21, 0.18);
    color: #facc15;
}

.achievement-text strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
}

.achievement-text span {
    display: block;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.72);
}

/* Responsive */
@media (max-width: 600px) {
    .history-evolution-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .treino-option-card {
        padding: 1.25rem;
    }

    .treino-option-icon {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }

    .history-detail-stats {
        flex-wrap: wrap;
    }

    .hd-stat {
        flex: 1 1 calc(33% - 0.67rem);
    }

    .achievement-toast-container {
        bottom: 110px;
    }
}

/* -- WHATSAPP-STYLE CHAT INTERFACE (Refined) -- */

.chat-container {
    display: flex;
    height: calc(100vh - 280px);
    /* Adjusted for section-header */
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    margin-top: 0.5rem;
}

/* Sidebar */
.chat-sidebar {
    width: 320px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.15);
}

.chat-sidebar-header {
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.chat-sidebar-header h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin: 0;
    font-weight: 700;
}

.chat-search {
    padding: 1rem;
    position: relative;
    display: flex;
    align-items: center;
}

.chat-search i {
    position: absolute;
    left: 1.75rem;
    color: var(--text-muted);
    opacity: 0.5;
    font-size: 1rem;
}

.chat-search input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.65rem 1rem 0.65rem 2.6rem;
    color: var(--text-main);
    font-size: 0.85rem;
    transition: all 0.2s;
}

.chat-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
}

.chat-list {
    flex: 1;
    overflow-y: auto;
}

.chat-item {
    padding: 1rem 1.25rem;
    display: flex;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.chat-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.chat-item.active {
    background: rgba(163, 230, 53, 0.08);
    position: relative;
}

.chat-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
}

.chat-item .chat-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--text-muted);
}

.active .chat-avatar {
    background: rgba(163, 230, 53, 0.15);
    color: var(--primary-color);
}

.chat-item-info {
    flex: 1;
    min-width: 0;
}

.chat-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.chat-item-top strong {
    font-size: 0.92rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-time {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.chat-item-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.4rem;
    align-items: center;
}

.chat-item-bottom p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.chat-status-pill {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 0.18rem 0.5rem;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    background: transparent;
    color: var(--text-muted);
}

.chat-status-pill.pending {
    color: #101010;
    background: var(--primary-color);
    border-color: rgba(163, 230, 53, 0.9);
    cursor: pointer;
}

.chat-status-pill.pending:hover {
    box-shadow: 0 0 0 2px rgba(163, 230, 53, 0.2);
}

.chat-status-pill.resolved {
    color: rgba(163, 230, 53, 0.9);
    background: rgba(163, 230, 53, 0.08);
    border-color: rgba(163, 230, 53, 0.25);
}

.chat-unread-badge {
    background: var(--primary-color);
    color: #121214;
    font-size: 0.65rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(163, 230, 53, 0.3);
}

/* Chat window */
.chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.1);
    position: relative;
}

.chat-welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.chat-welcome i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.1;
    color: var(--primary-color);
}

.chat-welcome h3 {
    color: var(--text-main);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.chat-active-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-student-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-header .chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(163, 230, 53, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.chat-student-info h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-main);
}

.chat-student-info span {
    font-size: 0.75rem;
    color: var(--primary-color);
    opacity: 0.8;
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    background-image: radial-gradient(circle at 50% 50%, rgba(163, 230, 53, 0.03) 0%, transparent 100%);
}

.msg-bubble {
    max-width: 85%;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease-out;
}

.msg-bubble.student {
    align-self: flex-start;
}

.msg-bubble.trainer {
    align-self: flex-end;
}

.msg-content {
    padding: 0.85rem 1.1rem;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.student .msg-content {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom-left-radius: 4px;
}

.trainer .msg-content {
    background: linear-gradient(135deg, var(--primary-color), #84cc16);
    color: #121214;
    font-weight: 500;
    border-bottom-right-radius: 4px;
}

.msg-time {
    display: block;
    font-size: 0.65rem;
    margin-top: 0.4rem;
    opacity: 0.6;
}

.student .msg-time {
    color: var(--text-muted);
    text-align: left;
}

.trainer .msg-time {
    color: rgba(0, 0, 0, 0.6);
    text-align: right;
    font-weight: 600;
}

.chat-input-area {
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-input-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.chat-input-wrapper textarea {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    height: 44px;
    min-height: 44px;
    max-height: 120px;
    resize: none;
    transition: all 0.2s;
}

.chat-input-wrapper textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.06);
}

.btn-send-chat {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-color), #84cc16);
    color: #121214;
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(163, 230, 53, 0.2);
}

.btn-send-chat:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 6px 15px rgba(163, 230, 53, 0.3);
}

.btn-send-chat:active {
    transform: scale(0.95);
}

.mobile-back-btn {
    display: none;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-main);
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    cursor: pointer;
}

@media (max-width: 900px) {
    .chat-sidebar {
        width: 100%;
    }

    .chat-window {
        display: none;
    }

    .chat-container.active-chat .chat-sidebar {
        display: none;
    }

    .chat-container.active-chat .chat-window {
        display: flex;
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2000;
        border-radius: 0;
        height: 100vh;
        background: #121214;
    }

    .mobile-back-btn {
        display: flex;
    }

    .chat-header {
        padding: 1rem;
        background: rgba(255, 255, 255, 0.03);
    }
}

/* -- REPLY UI & STUDENT DOUBT HISTORY -- */

/* Trainer Reply Box (Inside Card) */
.trainer-reply-box {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(163, 230, 53, 0.05);
    border-left: 3px solid var(--primary-color);
    border-radius: 0 12px 12px 0;
    font-size: 0.85rem;
}

.trainer-reply-box strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.25rem;
}

.trainer-reply-box i {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Reply Input Area */
.reply-input-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.reply-input-wrapper textarea {
    width: 100%;
    min-height: 80px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.75rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.85rem;
    resize: vertical;
}

.reply-input-wrapper textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
}

.reply-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Student Doubt History List */
.student-duvidas-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.student-duvida-card {
    background: linear-gradient(145deg, rgba(32, 32, 36, 0.4) 0%, rgba(21, 21, 24, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    padding: 1.25rem;
    animation: slideUpFade 0.4s ease both;
}

.sdc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.sdc-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.sdc-status-replied {
    font-size: 0.7rem;
    color: var(--primary-color);
    background: rgba(163, 230, 53, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
}

.sdc-status-pending {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
}

.sdc-text {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
}

.sdc-text i {
    color: var(--primary-color);
    margin-top: 0.1rem;
}

.sdc-reply {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(163, 230, 53, 0.15);
    border-radius: 14px;
    padding: 1rem;
    position: relative;
}

.sdc-reply-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.sdc-reply-header i {
    font-size: 1.2rem;
}

.sdc-reply-header strong {
    font-size: 0.8rem;
}

.sdc-reply p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-main);
}

/* ? ? ? ?  WORKOUT ROUTINES REFACTOR ? ? ? ?  */



.workout-tabs-nav {

    display: flex;

    gap: 0.5rem;

    padding: 0.5rem 0;

    margin-bottom: 1rem;

    overflow-x: auto;

    scrollbar-width: none;

    /* Hide scrollbar Firefox */

}



.workout-tabs-nav::-webkit-scrollbar {

    display: none;

}



/* Hide scrollbar Chrome/Safari */



.workout-tab {

    padding: 0.75rem 1.25rem;

    background: rgba(255, 255, 255, 0.03);

    border: 1px solid rgba(255, 255, 255, 0.05);

    border-radius: 12px;

    color: var(--text-muted);

    font-size: 0.85rem;

    font-weight: 600;

    cursor: pointer;

    white-space: nowrap;

    transition: all 0.25s ease;

    display: flex;

    align-items: center;

    gap: 0.5rem;

}



.workout-tab.active {

    background: rgba(163, 230, 53, 0.1);

    border-color: rgba(163, 230, 53, 0.3);

    color: var(--primary-color);

    box-shadow: 0 4px 12px rgba(163, 230, 53, 0.1);

}



.routine-card {

    background: linear-gradient(145deg, rgba(32, 32, 36, 0.6) 0%, rgba(21, 21, 24, 0.8) 100%);

    border: 1px solid rgba(255, 255, 255, 0.06);

    border-radius: 20px;

    padding: 1.5rem;

    animation: fadeInScale 0.3s ease-out;

}



.routine-header {

    margin-bottom: 1.5rem;

}



.routine-title-row {

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    margin-bottom: 0.5rem;

}



.routine-title-row h3 {

    font-size: 1.4rem;

    font-weight: 800;

    color: var(--text-main);

    margin: 0;

}



.routine-last-performed {

    font-size: 0.75rem;

    color: var(--primary-color);

    background: rgba(163, 230, 53, 0.1);

    padding: 0.2rem 0.6rem;

    border-radius: 6px;

    font-weight: 600;

}



.routine-summary {

    display: flex;

    gap: 1.5rem;

    font-size: 0.85rem;

    color: var(--text-muted);

}



.routine-summary span {

    display: flex;

    align-items: center;

    gap: 0.4rem;

}



.routine-summary i {

    color: var(--primary-color);

}



.routine-ex-list {

    display: flex;

    flex-direction: column;

    gap: 0.75rem;

    margin-bottom: 2rem;

}



.routine-ex-item {

    background: rgba(255, 255, 255, 0.02);

    border: 1px solid rgba(255, 255, 255, 0.04);

    border-radius: 14px;

    overflow: hidden;

    transition: all 0.3s ease;

}



.routine-ex-item.expanded {

    border-color: rgba(255, 255, 255, 0.1);

    background: rgba(255, 255, 255, 0.04);

}



.ex-top-trigger {

    padding: 1rem 1.25rem;

    display: flex;

    justify-content: space-between;

    align-items: center;

    cursor: pointer;

    width: 100%;

    background: none;

    border: none;

    text-align: left;

    font-family: inherit;

}



.ex-name-box strong {

    display: block;

    font-size: 0.95rem;

    color: var(--text-main);

    margin-bottom: 0.1rem;

}



.ex-name-box span {

    font-size: 0.75rem;

    color: var(--text-muted);

}



.ex-chevron {

    color: var(--text-muted);

    transition: transform 0.3s;

}



.expanded .ex-chevron {

    transform: rotate(180deg);

    color: var(--primary-color);

}



.ex-details-collapsible {

    max-height: 0;

    overflow: hidden;

    transition: max-height 0.3s ease-out;

}



.expanded .ex-details-collapsible {

    max-height: 200px;

    border-top: 1px solid rgba(255, 255, 255, 0.05);

}



.ex-details-inner {

    padding: 1rem 1.25rem;

    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 1rem;

}



.ex-detail-point {

    display: flex;

    flex-direction: column;

    gap: 0.25rem;

}



.ex-detail-point label {

    font-size: 0.65rem;

    color: var(--text-muted);

    text-transform: uppercase;

    letter-spacing: 0.05em;

    font-weight: 700;

}



.ex-detail-point strong {

    font-size: 1rem;

    color: var(--text-main);

}



.btn-start-routine {

    width: 100%;

    padding: 1.1rem;

    background: linear-gradient(135deg, var(--primary-color), #84cc16);

    color: #121214;

    border: none;

    border-radius: 14px;

    font-size: 1rem;

    font-weight: 800;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 0.75rem;

    cursor: pointer;

    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    box-shadow: 0 8px 20px rgba(163, 230, 53, 0.2);

}



.btn-start-routine:hover {

    transform: translateY(-3px) scale(1.02);

    box-shadow: 0 12px 25px rgba(163, 230, 53, 0.3);

}



.btn-start-routine:active {

    transform: translateY(-1px) scale(0.98);

}



@keyframes fadeInScale {

    from {

        opacity: 0;

        transform: scale(0.98);

    }



    to {

        opacity: 1;

        transform: scale(1);

    }

}



@media (max-width: 600px) {

    .ex-details-inner {

        grid-template-columns: 1fr 1fr;

        gap: 1.25rem;

    }

}


/* PROFESSIONAL CHAT UPGRADE */
.chat-reply-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--primary-color);
}

.reply-preview-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.reply-preview-text strong {
    display: block;
    font-size: 0.75rem;
    color: var(--primary-color);
}

.reply-preview-text p {
    font-size: 0.85rem;
    color: #ccc;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.reply-citation {
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    border-left: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.citation-sender {
    font-weight: 700;
    font-size: 0.7rem;
    color: var(--primary-color);
    margin-bottom: 2px;
}

.citation-text {
    color: #999;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.msg-image img {
    max-width: 100%;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
}

.msg-video {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 8px;
    cursor: pointer;
    background: #000;
}

.msg-video video {
    width: 100%;
    display: block;
    opacity: 0.7;
}

.msg-video i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.msg-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 4px;
}

.msg-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
}

.btn-reply-msg {
    position: absolute;
    right: -35px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: 0.2s;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
}

.msg-row:hover .btn-reply-msg {
    opacity: 1;
}

.btn-attach {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 8px;
    transition: 0.2s;
}

.btn-attach:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.unread-badge {
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}


/* STUDENT CHAT STYLES */
.student-chat-msg {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.student-chat-msg.from-student {
    align-items: flex-end;
}

.student-chat-msg.from-trainer {
    align-items: flex-start;
}

.sc-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 18px;
    position: relative;
    font-size: 0.9rem;
    line-height: 1.4;
}

.from-student .sc-bubble {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-bottom-right-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.from-trainer .sc-bubble {
    background: linear-gradient(135deg, var(--primary-color), #8BBE28);
    color: #000;
    border-bottom-left-radius: 4px;
}

.sc-reply-citation {
    background: rgba(0, 0, 0, 0.1);
    padding: 6px 10px;
    border-left: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin-bottom: 6px;
    font-size: 0.8rem;
}

.sc-reply-citation strong {
    display: block;
    font-size: 0.65rem;
    opacity: 0.8;
}

.sc-reply-citation p {
    margin: 0;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sc-meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.35rem;
    margin-top: 4px;
}

.sc-time {
    font-size: 0.65rem;
    opacity: 0.5;
}

.from-trainer .sc-time {
    color: rgba(0, 0, 0, 0.5);
}

.sc-delivered i {
    color: #A3E635;
    text-shadow: 0 0 8px rgba(163, 230, 53, 0.55);
}

.student-duvidas-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.student-chat-demo-wrap {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    overflow: hidden;
}

.student-chat-thread {
    max-height: 360px;
    overflow-y: auto;
    padding: 0.8rem 0.8rem 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.student-chat-compose {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.65rem;
    background: rgba(12, 12, 12, 0.75);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.student-chat-compose textarea {
    min-height: 58px;
    resize: none;
}

.student-chat-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.student-chat-actions .btn-secondary-outline,
.student-chat-actions .btn-primary {
    width: auto;
    min-height: 40px;
    padding: 0.55rem 0.8rem;
    font-size: 0.78rem;
}

.student-chat-recording-wave {
    align-items: center;
    gap: 0.2rem;
    padding: 0.42rem 0.56rem;
    border-radius: 11px;
    background: rgba(163, 230, 53, 0.08);
    border: 1px solid rgba(163, 230, 53, 0.25);
}

.student-chat-recording-wave span {
    width: 3px;
    height: 14px;
    border-radius: 999px;
    background: var(--primary-color);
    transform-origin: center bottom;
    transition: transform 0.12s linear;
    animation: wavePulse 0.9s ease-in-out infinite;
}

.student-chat-recording-wave span:nth-child(2) {
    animation-delay: 0.08s;
}

.student-chat-recording-wave span:nth-child(3) {
    animation-delay: 0.16s;
}

.student-chat-recording-wave span:nth-child(4) {
    animation-delay: 0.24s;
}

.student-chat-recording-wave span:nth-child(5) {
    animation-delay: 0.32s;
}

.student-chat-recording-wave small {
    margin-left: 0.42rem;
    font-size: 0.72rem;
    color: var(--primary-color);
    font-weight: 600;
}

.student-chat-upload {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.55rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(163, 230, 53, 0.06);
}

.student-chat-upload span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.student-chat-upload-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.student-chat-upload-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #84cc16, var(--primary-color));
    transition: width 0.2s ease;
}

.sc-media-fake {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.35rem;
}

.sc-media-fake i {
    font-size: 1rem;
}

.sc-media-track {
    flex: 1;
    min-width: 80px;
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.26);
    overflow: hidden;
}

.sc-media-track span {
    display: block;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
}

.from-student .sc-media-track span {
    background: rgba(255, 255, 255, 0.6);
}

.sc-video-thumb {
    width: 86px;
    height: 52px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
}

.sc-media-real {
    margin-bottom: 0.32rem;
}

.sc-media-real audio,
.sc-media-real video {
    width: min(100%, 280px);
    display: block;
    border-radius: 10px;
}

.sc-video-real {
    max-height: 200px;
    object-fit: cover;
}

.sc-bubble p {
    margin: 0;
    white-space: pre-wrap;
}

@media (max-width: 560px) {
    .student-chat-thread {
        max-height: 300px;
    }

    .student-chat-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .student-chat-actions .btn-primary {
        grid-column: span 2;
    }

    .sc-bubble {
        max-width: 92%;
    }
}

.skeleton-box {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(90deg, rgba(34, 34, 34, 0.85) 0%, rgba(48, 48, 48, 0.88) 50%, rgba(34, 34, 34, 0.85) 100%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.1s ease-in-out infinite;
}

@keyframes skeletonPulse {
    0% {
        background-position: 180% 0;
        opacity: 0.82;
    }

    50% {
        opacity: 1;
    }

    100% {
        background-position: -40% 0;
        opacity: 0.86;
    }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   EXERCISE CATALOG SCREEN
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.ex-catalog {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 0.5rem 0;
}

/* â”€â”€ Search Bar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ex-catalog-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #1a1a1e;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.85rem 1.25rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.ex-catalog-search:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(163, 230, 53, 0.08);
}

.ex-catalog-search i {
    color: var(--text-muted);
    font-size: 1.15rem;
    flex-shrink: 0;
}

.ex-catalog-search input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 0.95rem;
    width: 100%;
    font-family: 'Inter', sans-serif;
}

.ex-catalog-search input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* â”€â”€ Filter Chips â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ex-chips-row {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ex-chips-row::-webkit-scrollbar {
    display: none;
}

.ex-chip {
    flex-shrink: 0;
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.02em;
}

.ex-chip:hover {
    border-color: rgba(163, 230, 53, 0.4);
    color: var(--text-main);
    background: rgba(163, 230, 53, 0.05);
}

.ex-chip.active {
    background: var(--primary-color);
    color: #0d0d0d;
    border-color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 0 16px rgba(163, 230, 53, 0.25);
}

/* â”€â”€ Exercise List â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ex-catalog-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ex-catalog-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    background: rgba(32, 32, 36, 0.5);
    border-radius: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    animation: exItemFadeIn 0.4s ease both;
}

.ex-catalog-item:hover {
    background: rgba(32, 32, 36, 0.85);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(163, 230, 53, 0.08), inset 0 0 0 0.5px rgba(163, 230, 53, 0.15);
    transform: translateX(4px);
}

.ex-catalog-item:active {
    transform: translateX(2px) scale(0.995);
}

/* Stagger children */
.ex-catalog-item:nth-child(1) {
    animation-delay: 0.02s;
}

.ex-catalog-item:nth-child(2) {
    animation-delay: 0.05s;
}

.ex-catalog-item:nth-child(3) {
    animation-delay: 0.08s;
}

.ex-catalog-item:nth-child(4) {
    animation-delay: 0.11s;
}

.ex-catalog-item:nth-child(5) {
    animation-delay: 0.14s;
}

.ex-catalog-item:nth-child(6) {
    animation-delay: 0.17s;
}

.ex-catalog-item:nth-child(7) {
    animation-delay: 0.20s;
}

.ex-catalog-item:nth-child(8) {
    animation-delay: 0.23s;
}

.ex-catalog-item:nth-child(9) {
    animation-delay: 0.26s;
}

.ex-catalog-item:nth-child(10) {
    animation-delay: 0.29s;
}

@keyframes exItemFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Thumbnail */
.ex-catalog-thumb {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.ex-catalog-item:hover .ex-catalog-thumb {
    background: rgba(163, 230, 53, 0.1);
    box-shadow: 0 0 12px rgba(163, 230, 53, 0.15);
}

/* Text */
.ex-catalog-info {
    flex: 1;
    min-width: 0;
}

.ex-catalog-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ex-catalog-group {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* History icon */
.ex-catalog-history {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 1rem;
    transition: all 0.25s ease;
}

.ex-catalog-item:hover .ex-catalog-history {
    color: var(--primary-color);
    background: rgba(163, 230, 53, 0.08);
}

/* Empty state */
.ex-catalog-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    gap: 0.75rem;
    color: var(--text-muted);
}

.ex-catalog-empty i {
    font-size: 2.5rem;
    opacity: 0.3;
}

.ex-catalog-empty p {
    font-size: 0.9rem;
    opacity: 0.6;
}

.ex-muscle-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ex-muscle-chip {
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    cursor: pointer;
}

.ex-muscle-chip.active {
    color: var(--primary-color);
    border-color: rgba(163, 230, 53, 0.4);
    background: rgba(163, 230, 53, 0.12);
}

.ex-library-grid {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.ex-library-item {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text-main);
    padding: 0.65rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.ex-library-item-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.ex-library-item-left strong {
    display: block;
    font-size: 0.9rem;
}

.ex-library-item-left span {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.ex-library-item.active,
.ex-library-item:hover {
    border-color: rgba(163, 230, 53, 0.4);
    background: rgba(163, 230, 53, 0.12);
}

.ex-library-empty {
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    gap: 0.5rem;
}

.ex-hevy-modal {
    width: min(760px, 96vw);
    background: #0f1115;
}

.ex-hevy-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ex-hevy-topbar h3 {
    font-size: 1.35rem;
}

.hevy-link-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.05rem;
    cursor: pointer;
}

.ex-hevy-body {
    gap: 0.9rem;
    position: relative;
}

.ex-hevy-search-wrap {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    border: 1px solid rgba(163, 230, 53, 0.18);
    padding: 0 0.85rem;
}

.ex-hevy-search-wrap i {
    color: #8a8f99;
    font-size: 1.1rem;
}

.ex-hevy-search-wrap .q-input {
    border: none;
    background: transparent;
}

.ex-hevy-filter-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.ex-filter-btn {
    border: 1px solid rgba(163, 230, 53, 0.24);
    background: rgba(163, 230, 53, 0.10);
    border-radius: 12px;
    color: #f4f4f5;
    font-weight: 600;
    padding: 0.8rem;
    cursor: pointer;
}

.ex-hevy-section-label {
    color: #a0a4ac;
    font-size: 0.95rem;
}

.ex-library-hevy-list {
    max-height: 42vh;
    overflow-y: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ex-hevy-item {
    width: 100%;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.8rem 0.2rem;
    text-align: left;
    cursor: pointer;
}

.ex-hevy-thumb {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff;
    color: #171717;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ex-hevy-info strong {
    display: block;
    font-size: 1rem;
}

.ex-hevy-info span {
    color: #9ca3af;
    font-size: 0.9rem;
}

.ex-hevy-item>i {
    margin-left: auto;
    color: #d4d4d8;
    font-size: 1.25rem;
}

.ex-hevy-item.active>i {
    color: var(--primary-color);
}

.ex-filter-picker {
    position: absolute;
    inset: 0;
    background: #111318;
    border-radius: 14px;
    z-index: 4;
    padding: 0.6rem;
}

.ex-filter-picker-head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ex-filter-picker-list {
    max-height: 66vh;
    overflow-y: auto;
}

.ex-filter-option {
    width: 100%;
    border: none;
    background: transparent;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    text-align: left;
}

.ex-filter-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ex-filter-option>i {
    margin-left: auto;
    color: var(--primary-color);
}

@media (max-width: 700px) {
    .ex-hevy-filter-buttons {
        grid-template-columns: 1fr;
    }
}

/* Compact mobile-first workout log (Hevy-inspired) */
.log-content-list {
    padding: 0.85rem;
    gap: 0.9rem;
}

.log-exercise-card {
    border-radius: 14px;
    padding: 0.85rem;
    gap: 0.7rem;
}

.log-ex-header {
    align-items: flex-start;
    gap: 0.55rem;
}

.log-ex-head-main h3 {
    font-size: 0.98rem;
    line-height: 1.25;
    margin-bottom: 0.25rem;
}

.log-ex-meta {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(163, 230, 53, 0.15);
    border: 1px solid rgba(163, 230, 53, 0.28);
    color: var(--primary-color);
    border-radius: 999px;
    padding: 0.15rem 0.45rem;
    font-size: 0.67rem;
    font-weight: 700;
}

.meta-pill .ui-svg-icon {
    width: 0.86rem;
    height: 0.86rem;
}

.meta-pill.muted {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    color: var(--text-muted);
}

.exercise-notes-input {
    width: 100%;
    font-size: 0.76rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.45rem 0.6rem;
    outline: none;
}

.exercise-notes-input:focus {
    border-color: var(--primary-color);
}

.exercise-execution-row {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.exercise-execution-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.exercise-execution-buttons {
    display: inline-flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.exec-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.exec-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(163, 230, 53, 0.45);
}

.exec-btn.active {
    background: rgba(163, 230, 53, 0.2);
    border-color: rgba(163, 230, 53, 0.6);
    color: var(--primary-color);
    box-shadow: 0 0 0 1px rgba(163, 230, 53, 0.25);
}

.exercise-execution-prev {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 600;
}

@media (max-width: 520px) {
    .exec-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .exercise-execution-row {
        gap: 0.35rem;
    }
}

.log-ex-thumb {
    width: 88px;
    height: 58px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.log-ex-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.log-set-header,
.log-set-row {
    grid-template-columns: 34px minmax(70px, 1fr) minmax(70px, 1fr) minmax(60px, 0.8fr) 50px;
    gap: 0.3rem;
}

.log-set-header {
    font-size: 0.58rem;
    letter-spacing: 0.03rem;
}

.set-prev {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 7px;
    padding: 0.3rem 0.2rem;
}

.set-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.set-adjust-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.22rem;
}

.mini-adjust {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border-radius: 6px;
    min-height: 28px;
    font-size: 0.66rem;
    font-weight: 700;
    padding: 0.18rem 0.22rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
}

.mini-adjust:hover {
    border-color: rgba(163, 230, 53, 0.35);
    color: var(--primary-color);
}

.set-check-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
}

.set-check-wrap .btn-check-set,
.set-check-wrap .btn-remove-set {
    margin: 0;
}

.log-set-row.completed {
    border-radius: 8px;
    padding-inline: 0.2rem;
}

@media (max-width: 520px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .dashboard-header .btn-primary {
        width: 100% !important;
        justify-content: center;
    }
}

/* Student workout analysis clarity upgrade */
.workout-analysis-layout {
    gap: 1.25rem;
}

.analysis-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.analysis-stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 0.85rem 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.analysis-stat-card strong {
    font-size: 1.25rem;
    color: var(--text-main);
    line-height: 1;
}

.analysis-stat-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
}

.exercise-clarity-card {
    gap: 0.9rem;
}

.exercise-order-badge {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(163, 230, 53, 0.14);
    border: 1px solid rgba(163, 230, 53, 0.28);
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.exercise-note {
    margin-top: 0.45rem;
    font-size: 0.76rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    line-height: 1.4;
}

.coach-help-card {
    margin-bottom: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(32, 32, 36, 0.6) 0%, rgba(21, 21, 24, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.coach-help-text strong {
    display: block;
    font-size: 0.92rem;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.coach-help-text p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
}

.btn-duvida-secondary {
    background: rgba(163, 230, 53, 0.12);
    border: 1px solid rgba(163, 230, 53, 0.35);
    color: var(--primary-color);
    border-radius: 10px;
    padding: 0.58rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-duvida-secondary:hover {
    background: rgba(163, 230, 53, 0.2);
    transform: translateY(-1px);
}

@media (max-width: 900px) {
    .analysis-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .coach-help-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-duvida-secondary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 560px) {
    .analysis-overview-grid {
        grid-template-columns: 1fr;
    }
}

/* Workout log: add RPE/RIR column */
.log-set-header,
.log-set-row {
    grid-template-columns: 40px 1fr 1fr 0.8fr 0.8fr 56px;
}

.set-rpe-rir-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
}

.set-mini-input {
    font-size: 0.78rem;
    padding: 0.35rem 0.2rem;
}

/* Workout finish feedback modal */
.workout-feedback-modal {
    max-width: 520px;
}

.wfb-rating-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.55rem;
}

.wfb-emoji-btn {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    border-radius: 12px;
    min-height: 46px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wfb-emoji-btn:hover,
.wfb-emoji-btn.active {
    border-color: rgba(163, 230, 53, 0.45);
    background: rgba(163, 230, 53, 0.14);
    transform: translateY(-1px);
}

.wfb-intensity-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.wfb-intensity-btn {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border-radius: 10px;
    padding: 0.55rem 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wfb-intensity-btn.active,
.wfb-intensity-btn:hover {
    color: var(--primary-color);
    border-color: rgba(163, 230, 53, 0.45);
    background: rgba(163, 230, 53, 0.12);
}

@media (max-width: 820px) {

    .log-set-header,
    .log-set-row {
        grid-template-columns: 34px minmax(62px, 1fr) minmax(62px, 1fr) minmax(54px, 0.7fr) 48px;
        gap: 0.25rem;
    }

    .set-mini-input {
        font-size: 0.7rem;
        padding: 0.3rem 0.15rem;
    }
}

@media (max-width: 560px) {
    .wfb-rating-row {
        gap: 0.35rem;
    }

    .wfb-emoji-btn {
        min-height: 42px;
        font-size: 1.1rem;
    }
}

/* Workout log visual intensity controls */
.set-intensity-visual {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.4rem;
}

.set-intensity-dot {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    height: 16px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.set-intensity-dot:hover {
    border-color: rgba(163, 230, 53, 0.5);
}

.set-intensity-dot.active {
    border-color: rgba(163, 230, 53, 0.8);
    background: rgba(163, 230, 53, 0.85);
}

.set-pse-btn,
.set-exec-btn {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    min-width: 38px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.set-pse-btn.has-value,
.set-exec-btn.has-value {
    color: var(--text-main);
}

.set-pse-btn:hover,
.set-exec-btn:hover {
    border-color: rgba(255, 255, 255, 0.45);
}

.set-pse-visual,
.set-exec-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Quick effort modal */
.set-effort-quick-card {
    max-width: 440px;
}

.seqm-options {
    display: grid;
    gap: 0.55rem;
}

.seqm-btn {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.7rem 0.8rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.seqm-options.pse-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.seqm-btn.pse-btn {
    text-align: center;
    font-size: 0.95rem;
    padding: 0.6rem 0.25rem;
}

.seqm-btn.pse-btn:hover {
    border-color: rgba(255, 255, 255, 0.45);
}

.pse-hint {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

.seqm-btn.leve:hover {
    border-color: rgba(255, 255, 255, 0.45);
}

.seqm-btn.ponto:hover {
    border-color: rgba(250, 204, 21, 0.8);
    background: rgba(250, 204, 21, 0.14);
}

.seqm-btn.falha:hover {
    border-color: rgba(239, 68, 68, 0.85);
    background: rgba(239, 68, 68, 0.14);
}

/* Make star rating look like stars */
.wfb-emoji-btn {
    font-size: 1.35rem;
    line-height: 1;
}

/* Trainer advanced exercise fields */
.ex-advanced-row {
    margin-top: 0.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.45rem;
    align-items: center;
}

.ex-sub-input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0.38rem 0.55rem;
    color: var(--text-main);
    font-size: 0.72rem;
}

.ex-sub-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.ex-superset-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    user-select: none;
}

.ex-superset-toggle.disabled {
    opacity: 0.5;
}

/* Student log substitute + superset visuals */
.log-ex-top-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.log-ex-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
}

.log-ex-title-row .clickable-ex-title {
    margin: 0;
    line-height: 1.2;
}

.btn-icon-tiny {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.btn-icon-tiny:hover {
    transform: translateY(-1px);
}

.btn-icon-tiny.action-swap {
    color: var(--primary-color);
    border-color: rgba(163, 230, 53, 0.38);
    background: rgba(163, 230, 53, 0.12);
}

.btn-icon-tiny.action-trash {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(248, 113, 113, 0.1);
}

.log-substitute-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.55rem;
    margin-bottom: 0.4rem;
}

.log-substitute-box strong {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.35rem;
}

.log-substitute-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.btn-substitute-ex {
    border: 1px solid rgba(163, 230, 53, 0.35);
    background: rgba(163, 230, 53, 0.12);
    color: var(--primary-color);
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    font-size: 0.68rem;
    cursor: pointer;
}

.btn-substitute-ex.muted {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

.btn-substitute-ex.auto {
    border-color: rgba(96, 165, 250, 0.35);
    background: rgba(96, 165, 250, 0.12);
    color: #93c5fd;
}

.log-substitute-empty {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.35rem;
}

.superset-card {
    position: relative;
}

.superset-linked::after {
    content: '';
    position: absolute;
    left: 12px;
    bottom: -14px;
    width: 2px;
    height: 16px;
    background: linear-gradient(180deg, rgba(163, 230, 53, 0.9), rgba(163, 230, 53, 0));
}

.coach-assist-pill {
    margin-top: 0.5rem;
    padding: 0.45rem 0.65rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    flex-wrap: wrap;
}

.coach-assist-pill .ui-svg-icon {
    width: 14px;
    height: 14px;
}

.coach-assist-pill.progress {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.coach-assist-pill.regress {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.28);
    color: #fca5a5;
}

/* Exercise progress modal */
.exercise-progress-head {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.eph-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.65rem;
}

.eph-card span {
    display: block;
    font-size: 0.68rem;
    color: var(--text-muted);
}

.eph-card strong {
    display: block;
    margin-top: 0.18rem;
    font-size: 1rem;
    color: var(--text-main);
}

.exercise-progress-svg {
    width: 100%;
    height: auto;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
}

.ep-line {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ep-dot {
    fill: #0f1115;
    stroke: var(--primary-color);
    stroke-width: 2;
}

.exercise-progress-xlabels {
    margin-top: 0.45rem;
    display: flex;
    justify-content: space-between;
    gap: 0.35rem;
    font-size: 0.65rem;
    color: var(--text-muted);
    overflow-x: auto;
}

@media (max-width: 880px) {
    .ex-advanced-row {
        grid-template-columns: 1fr;
    }

    .exercise-progress-head {
        grid-template-columns: 1fr;
    }
}

.clickable-ex-title {
    cursor: pointer;
}

.clickable-ex-title:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Analyze workout visual overhaul */
.clean-analysis {
    padding: 1.35rem;
}

.analysis-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.8fr);
    gap: 1rem;
}

.analysis-main {
    min-width: 0;
}

.analysis-side {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.analysis-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.2rem 0 0.95rem;
}

.analysis-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 0.22rem 0.55rem;
}

.routine-ex-item.has-superset {
    border-color: rgba(163, 230, 53, 0.38);
    box-shadow: inset 3px 0 0 rgba(163, 230, 53, 0.8);
}

.analysis-substitute-chips {
    margin-top: 0.42rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.32rem;
}

.analysis-substitute-chips span {
    font-size: 0.66rem;
    color: var(--primary-color);
    border: 1px solid rgba(163, 230, 53, 0.38);
    background: rgba(163, 230, 53, 0.12);
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
}

.analysis-chart-btn {
    flex-shrink: 0;
}

.exercise-progress-xlabels span {
    min-width: 36px;
    text-align: center;
}

@media (max-width: 980px) {
    .analysis-shell {
        grid-template-columns: 1fr;
    }

    .analysis-side {
        order: -1;
    }
}

/* Trainer doubts/chat - media + mobile usability */
.chat-container {
    height: calc(100vh - 230px);
    min-height: 520px;
}

.chat-input-area {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.chat-attach-preview {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.chat-attach-preview-content {
    flex: 1;
    min-width: 0;
}

.chat-preview-image,
.chat-preview-video {
    width: min(340px, 100%);
    max-height: 200px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: block;
}

.chat-preview-meta {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    max-width: 100%;
    word-break: break-all;
}

.btn-attach-remove {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.btn-attach-chat {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-attach-chat:hover {
    border-color: rgba(163, 230, 53, 0.4);
    color: var(--primary-color);
}

.chat-media-wrap {
    margin-top: 0.55rem;
}

.chat-media-image,
.chat-media-video {
    width: min(360px, 100%);
    max-height: 260px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    object-fit: cover;
    background: #000;
}

@media (max-width: 900px) {
    #view-duvidas .students-section {
        padding: 0.75rem;
        border-radius: 14px;
    }

    .chat-container {
        height: calc(100vh - 170px);
        min-height: 0;
        border-radius: 14px;
    }

    .chat-container.active-chat .chat-window {
        display: flex;
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2000;
        border-radius: 0;
        height: 100dvh;
        background: #121214;
    }

    .chat-header {
        position: sticky;
        top: 0;
        z-index: 5;
    }

    .chat-messages {
        padding: 0.9rem;
        gap: 0.8rem;
    }

    .msg-bubble {
        max-width: 94%;
    }

    .chat-input-area {
        position: sticky;
        bottom: 0;
        z-index: 6;
        padding: 0.7rem;
        padding-bottom: calc(0.7rem + env(safe-area-inset-bottom));
        background: rgba(18, 18, 20, 0.96);
        backdrop-filter: blur(12px);
    }

    .chat-input-wrapper {
        gap: 0.5rem;
    }

    .chat-input-wrapper textarea {
        min-height: 44px;
        max-height: 132px;
        font-size: 0.88rem;
    }

    .btn-send-chat,
    .btn-attach-chat {
        width: 42px;
        height: 42px;
        border-radius: 11px;
    }

    .chat-preview-image,
    .chat-preview-video,
    .chat-media-image,
    .chat-media-video {
        width: 100%;
        max-height: 190px;
    }
}

/* =============================
   CYBER-SLEEK FITNESS THEME
   ============================= */
:root {
    --bg-color: #080808;
    --card-bg: #121212;
    --card-hover: #171717;
    --input-bg: #141414;
    --primary-color: #A3E635;
    --primary-glow: rgba(163, 230, 53, 0.35);
    --text-main: #f5f5f5;
    --text-muted: #9aa09f;
    --border-color: rgba(255, 255, 255, 0.12);
}

body {
    background: radial-gradient(circle at 15% 0%, rgba(163, 230, 53, 0.08), transparent 35%),
        radial-gradient(circle at 80% 100%, rgba(163, 230, 53, 0.06), transparent 38%),
        #080808;
}

.card,
.role-card,
.t-stat-card,
.stat-card,
.students-section,
.workout-block,
.meal-block,
.routine-card,
.log-exercise-card,
.summary-stat-card {
    background: #121212;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#view-student-workout-summary .summary-stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary,
.btn-send-chat,
.btn-add-block,
.btn-save-plan {
    box-shadow: 0 0 0 1px rgba(163, 230, 53, 0.2), 0 8px 22px rgba(163, 230, 53, 0.18);
}

.btn-primary:hover,
.btn-send-chat:hover,
.btn-add-block:hover,
.btn-save-plan:hover {
    box-shadow: 0 0 0 1px rgba(163, 230, 53, 0.35), 0 12px 28px rgba(163, 230, 53, 0.25);
}

/* Glass touch */
.perfil-modal,
.ex-modal,
.chat-input-area,
.sidebar {
    backdrop-filter: blur(14px);
}

/* =============================
   MOBILE PWA BOTTOM NAV
   ============================= */
@media (max-width: 920px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-layout .sidebar {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: max(10px, env(safe-area-inset-bottom));
        top: auto;
        height: 64px;
        z-index: 1200;
        border-radius: 18px;
        background: rgba(18, 18, 18, 0.84);
        border: 1px solid rgba(255, 255, 255, 0.14);
        backdrop-filter: blur(18px);
        padding: 0.35rem 0.55rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .dashboard-layout .sidebar-logo,
    .dashboard-layout .sidebar-footer {
        display: none;
    }

    .dashboard-layout .sidebar-nav {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.3rem;
        width: 100%;
    }

    .dashboard-layout .sidebar .nav-item {
        min-width: 0;
        padding: 0.42rem 0.2rem;
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        gap: 0.18rem;
        justify-content: center;
        align-items: center;
        font-size: 0.62rem;
        line-height: 1;
    }

    .dashboard-layout .sidebar .nav-item i,
    .dashboard-layout .sidebar .nav-item .ui-svg-icon {
        font-size: 2.24rem;
    }

    .dashboard-layout .sidebar .nav-item:nth-child(n+5) {
        display: none;
    }

    .main-content {
        padding-bottom: calc(90px + env(safe-area-inset-bottom));
    }

    /* mobile metric carousel */
    .dashboard-stats,
    .trainer-stats-row,
    #summary-stats-grid {
        display: flex;
        overflow-x: auto;
        gap: 0.7rem;
        scroll-snap-type: x mandatory;
        padding-bottom: 0.3rem;
    }

    .dashboard-stats>*,
    .trainer-stats-row>*,
    #summary-stats-grid>* {
        min-width: 210px;
        scroll-snap-align: start;
    }
}

/* =============================
   CHAT SOCIAL APP STYLE
   ============================= */
.chat-container {
    background: #0e0e0e;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header,
.chat-input-area {
    background: rgba(18, 18, 18, 0.9);
    border-color: rgba(255, 255, 255, 0.08);
}

.chat-messages {
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.85), rgba(8, 8, 8, 0.98));
}

.student .msg-content {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.12);
}

.trainer .msg-content {
    background: linear-gradient(135deg, rgba(163, 230, 53, 0.95), rgba(163, 230, 53, 0.82));
    color: #0e0e0e;
}

.chat-input-wrapper {
    align-items: flex-end;
}

.btn-attach-chat,
.btn-send-chat {
    flex-shrink: 0;
}

.btn-mic-chat.recording {
    border-color: rgba(163, 230, 53, 0.7);
    color: var(--primary-color);
    box-shadow: 0 0 0 1px rgba(163, 230, 53, 0.35), 0 0 18px rgba(163, 230, 53, 0.25);
}

.chat-recording-wave {
    align-items: center;
    gap: 0.2rem;
    padding: 0.45rem 0.65rem;
    border-radius: 11px;
    background: rgba(163, 230, 53, 0.08);
    border: 1px solid rgba(163, 230, 53, 0.25);
}

.chat-recording-wave span {
    width: 3px;
    height: 14px;
    border-radius: 999px;
    background: var(--primary-color);
    animation: wavePulse 0.9s ease-in-out infinite;
}

.chat-recording-wave span:nth-child(2) {
    animation-delay: 0.08s;
}

.chat-recording-wave span:nth-child(3) {
    animation-delay: 0.16s;
}

.chat-recording-wave span:nth-child(4) {
    animation-delay: 0.24s;
}

.chat-recording-wave span:nth-child(5) {
    animation-delay: 0.32s;
}

.chat-recording-wave small {
    margin-left: 0.45rem;
    font-size: 0.72rem;
    color: var(--primary-color);
    font-weight: 600;
}

@keyframes wavePulse {

    0%,
    100% {
        transform: scaleY(0.45);
        opacity: 0.65;
    }

    50% {
        transform: scaleY(1.2);
        opacity: 1;
    }
}

.chat-preview-image,
.chat-preview-video {
    border-radius: 50%;
    width: 84px;
    height: 84px;
    object-fit: cover;
}

.chat-preview-audio {
    width: 220px;
}

.btn-pip-video {
    margin-top: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border-radius: 8px;
    font-size: 0.7rem;
    padding: 0.18rem 0.5rem;
    cursor: pointer;
}

/* =============================
   TRAINING UX
   ============================= */
.set-intensity-dot {
    height: 24px;
}

.rest-timer-pill {
    --rest-progress: 100%;
}

#rest-countdown.rest-time {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(var(--primary-color) var(--rest-progress), rgba(255, 255, 255, 0.1) 0);
    position: relative;
}

#rest-countdown.rest-time::before {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: #0f0f10;
}

#rest-countdown.rest-time {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    z-index: 1;
}

#rest-countdown.rest-time::after {
    content: attr(data-time);
}

@media (max-width: 920px) {
    .chat-container.active-chat .chat-window {
        height: 100dvh;
    }

    .chat-input-area {
        padding-bottom: calc(0.7rem + env(safe-area-inset-bottom));
    }
}

#rest-countdown.rest-time::after {
    content: none;
}

#rest-countdown.rest-time {
    position: relative;
}

#rest-countdown.rest-time span,
#rest-countdown.rest-time {
    z-index: 1;
}

@media (max-width: 920px) {
    .dashboard-layout .sidebar .nav-item {
        font-size: 0;
    }

    .dashboard-layout .sidebar .nav-item i,
    .dashboard-layout .sidebar .nav-item .ui-svg-icon {
        margin: 0;
    }

    .dashboard-layout .sidebar .nav-item .nav-badge {
        font-size: 0.6rem;
    }
}

/* Mini sparklines on metric cards */
.stat-card,
.t-stat-card,
.summary-stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::after,
.t-stat-card::after,
.summary-stat-card::after {
    content: '';
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 6px;
    height: 18px;
    opacity: 0.22;
    background: linear-gradient(120deg, rgba(163, 230, 53, 0.0) 0%, rgba(163, 230, 53, 0.7) 35%, rgba(163, 230, 53, 0.25) 70%, rgba(163, 230, 53, 0.0) 100%);
    clip-path: polygon(0% 80%, 12% 62%, 23% 68%, 36% 42%, 48% 56%, 62% 28%, 74% 45%, 86% 20%, 100% 35%, 100% 100%, 0% 100%);
    pointer-events: none;
}

/* =============================
   MOBILE-FIRST HARDENING
   ============================= */
.q-grid-2cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        align-items: stretch;
        justify-content: flex-start;
    }

    #app,
    #app.wide {
        width: 100%;
        max-width: 100%;
        min-height: 100dvh;
        padding: 1rem;
        margin: 0;
    }

    .screen.active {
        align-items: stretch;
    }

    .dashboard-layout {
        position: fixed !important;
        inset: 0;
        width: 100%;
        height: 100dvh;
        display: grid !important;
        grid-template-columns: 1fr !important;
        overflow: hidden;
    }

    .dashboard-layout>.sidebar {
        position: fixed !important;
        left: 10px;
        right: 10px;
        bottom: max(10px, env(safe-area-inset-bottom));
        top: auto !important;
        width: auto !important;
        height: 72px !important;
        z-index: 1400;
        border-radius: 18px;
        padding: 0.4rem 0.55rem !important;
        border: 1px solid rgba(255, 255, 255, 0.14);
        background: rgba(12, 12, 12, 0.72);
        backdrop-filter: blur(18px) saturate(120%);
    }

    .dashboard-layout>.sidebar .sidebar-logo,
    .dashboard-layout>.sidebar .sidebar-footer {
        display: none !important;
    }

    .dashboard-layout>.sidebar .sidebar-nav {
        width: 100%;
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.3rem;
    }

    .dashboard-layout>.sidebar .nav-item {
        width: 100%;
        min-width: 0;
        min-height: 56px;
        margin: 0;
        padding: 0.35rem 0.15rem !important;
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0.16rem;
        position: relative;
        font-size: 0.62rem !important;
        line-height: 1.05;
        text-align: center;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
    }

    .dashboard-layout>.sidebar .nav-item:hover {
        transform: translateY(-2px);
        background: rgba(255, 255, 255, 0.05);
    }

    .dashboard-layout>.sidebar .nav-item:active {
        transform: translateY(0);
        transition-duration: 0.1s;
    }

    .dashboard-layout>.sidebar .nav-item i,
    .dashboard-layout>.sidebar .nav-item .ui-svg-icon {
        font-size: 2.27rem;
        margin: 0;
        border-radius: 999px;
        padding: 0.28rem;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
    }

    .dashboard-layout>.sidebar .nav-item.active {
        background: rgba(163, 230, 53, 0.08);
        border: 1px solid rgba(163, 230, 53, 0.2);
        box-shadow: 0 4px 12px rgba(163, 230, 53, 0.15);
    }

    .dashboard-layout>.sidebar .nav-item.active i,
    .dashboard-layout>.sidebar .nav-item.active .ui-svg-icon {
        color: var(--primary-color);
        background: rgba(163, 230, 53, 0.12);
        box-shadow: 0 0 0 1px rgba(163, 230, 53, 0.38), 0 0 14px rgba(163, 230, 53, 0.28);
        transform: scale(1.1);
    }

    .dashboard-layout>.sidebar .nav-item.active span {
        color: var(--primary-color);
        font-weight: 600;
    }

    .dashboard-layout>.sidebar .nav-item span:not(.nav-badge) {
        display: block !important;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .dashboard-layout>.sidebar .nav-item .nav-badge {
        position: absolute;
        left: 50%;
        top: 5px;
        transform: translateX(10px);
        margin-left: 0;
        min-width: 13px;
        width: 13px;
        height: 13px;
        padding: 0;
        border-radius: 999px;
        font-size: 0.5rem;
        line-height: 1;
        color: #fff;
        background: #f59e0b;
        border: 1px solid rgba(0, 0, 0, 0.25);
        animation: none;
    }

    .dashboard-layout>.sidebar .nav-item:nth-child(n+5) {
        display: none !important;
    }

    .dashboard-layout>.main-content,
    .main-content {
        height: 100dvh;
        overflow-y: auto;
        padding: 0.9rem 0.9rem calc(100px + env(safe-area-inset-bottom)) !important;
        gap: 1rem;
    }

    .top-header {
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.7rem;
    }

    .page-title {
        font-size: 1.1rem;
        white-space: normal;
    }

    .header-search {
        display: none !important;
    }

    .header-profile {
        margin-left: auto;
        gap: 0.65rem;
    }

    .profile-info {
        align-items: flex-end;
    }

    .students-section {
        padding: 1rem;
        border-radius: 16px;
        gap: 1rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .section-actions {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.6rem;
    }

    .small-search {
        width: 100%;
        flex: 1;
    }

    .small-search input,
    .header-search input {
        width: 100%;
        min-width: 0;
    }

    .table-header-row {
        display: none !important;
    }

    .student-list-container {
        gap: 0.75rem;
    }

    .student-list-item.grid-layout {
        display: block !important;
        padding: 0.9rem !important;
        border-radius: 14px;
    }

    .student-list-item.grid-layout .sli-col {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.6rem;
        width: 100%;
        padding: 0.36rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .student-list-item.grid-layout .sli-col:last-child {
        border-bottom: 0;
        padding-top: 0.5rem;
    }

    .student-list-item.grid-layout .sli-col[data-label]::before {
        content: attr(data-label);
        color: var(--text-muted);
        font-size: 0.66rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        font-weight: 700;
        flex-shrink: 0;
    }

    .student-list-item.grid-layout .sli-col.ident {
        justify-content: flex-start;
        align-items: flex-start;
        padding-bottom: 0.65rem;
        margin-bottom: 0.3rem;
    }

    .student-list-item.grid-layout .sli-col.ident::before,
    .student-list-item.grid-layout .sli-col.actions::before {
        display: none;
    }

    .student-list-item.grid-layout .sli-col.actions {
        justify-content: flex-end;
    }

    .student-list-item.grid-layout .sli-col.actions .btn-icon-minimal {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        justify-content: center;
    }

    .pending-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .pending-banner .btn-primary {
        width: 100%;
    }

    .pending-cards-grid {
        grid-template-columns: 1fr;
    }

    .pending-card {
        padding: 1rem;
        border-radius: 14px;
    }

    .pending-card-actions {
        width: 100%;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    .pending-card-actions .btn-accept,
    .pending-card-actions .btn-reject {
        flex: 1;
        min-height: 44px;
    }

    #view-duvidas .students-section {
        padding: 0;
        border: none;
        background: transparent;
    }

    .chat-container {
        min-height: calc(100dvh - 220px);
        border-radius: 14px;
    }

    .chat-item {
        padding: 0.85rem 0.9rem;
    }

    .chat-item .chat-avatar {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 1.2rem;
    }

    .chat-item-bottom {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.35rem;
    }

    .chat-unread-badge {
        min-width: 20px;
        height: 20px;
    }

    .q-grid-2cols {
        grid-template-columns: 1fr;
        margin-bottom: 1rem;
    }

    #questionnaire-form .q-field,
    #questionnaire-form .q-input,
    #questionnaire-form textarea,
    .perfil-modal-field .q-input,
    .input-group input,
    .input-group select,
    .input-group textarea {
        font-size: 16px;
    }

    .food-modal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .prof-editor-layout {
        padding: 0.75rem;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        position: relative;
        z-index: 2;
    }

    .prof-editor-layout input,
    .prof-editor-layout textarea {
        pointer-events: auto !important;
        min-height: 42px;
    }

    .prof-editor-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem 0 1rem 0;
    }

    .prof-header-left {
        width: 100%;
    }

    .prof-header-right {
        width: 100%;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .btn-save-plan {
        min-height: 44px;
        flex: 1;
        justify-content: center;
        padding: 0.75rem 0.75rem;
        font-size: 0.8rem;
    }

    .btn-icon {
        padding: 0.65rem;
    }

    .prof-tabs-bar {
        overflow-x: auto;
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
        margin: 0 -0.75rem 1rem -0.75rem;
        padding: 0 0.75rem;
    }

    .prof-tabs-bar::-webkit-scrollbar {
        height: 3px;
    }

    .prof-tab {
        flex-shrink: 0;
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        gap: 0.3rem;
    }

    .prof-tab i {
        font-size: 1rem;
    }

    .plan-section-header {
        align-items: flex-start;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0 0;
    }

    .plan-section-header > div {
        flex: 1;
        min-width: 0;
    }

    .btn-add-block {
        white-space: nowrap;
        align-self: flex-start;
        min-width: auto;
        padding: 0.65rem 0.9rem;
        font-size: 0.8rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .info-card {
        padding: 1rem;
    }

    .ic-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .diet-meta-bar {
        gap: 0.65rem;
        padding: 0.85rem;
    }

    .diet-meta-item {
        flex: 1 1 calc(50% - 0.35rem);
        min-width: 130px;
        justify-content: space-between;
    }

    .diet-meta-input {
        width: 78px;
    }

    .ex-row {
        flex-wrap: wrap;
        align-items: flex-start;
        padding: 0.8rem 0.9rem;
    }

    .ex-stats {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .ex-stat-input {
        min-height: 42px;
    }

    .food-table {
        padding: 0 0.3rem 0.5rem;
    }

    .food-table-head,
    .food-row {
        grid-template-columns: 1.7fr 1fr 1fr 44px;
    }

    .log-content-list {
        padding: 0.8rem;
        padding-bottom: 6rem;
    }

    .log-exercise-card {
        padding: 0.9rem;
    }

    .log-set-header,
    .log-set-row {
        grid-template-columns: 32px minmax(60px, 1fr) minmax(60px, 1fr) minmax(52px, 0.7fr) 46px;
    }

    .set-input,
    .btn-check-set,
    .btn-remove-set {
        min-height: 40px;
    }

    .summary-actions .btn-primary {
        width: 100%;
    }

    .perfil-modal-overlay,
    .ex-modal-overlay {
        padding: 0.6rem;
    }

    .perfil-modal,
    .ex-modal {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 94dvh;
        border-radius: 16px;
        display: flex;
        flex-direction: column;
    }

    .perfil-modal-body,
    .ex-modal-body {
        overflow-y: auto;
    }

    .perfil-modal-footer,
    .ex-modal-footer {
        position: sticky;
        bottom: 0;
        background: rgba(18, 18, 20, 0.95);
        backdrop-filter: none;
    }
}

@media (max-width: 768px) {

    #app,
    #app.wide {
        padding: 0.8rem;
    }

    .main-content {
        padding: 0.75rem 0.75rem calc(100px + env(safe-area-inset-bottom)) !important;
    }

    .dashboard-layout>.sidebar .nav-item span:not(.nav-badge) {
        font-size: 0.58rem;
    }

    .trainer-stats-row>*,
    .dashboard-stats>*,
    #summary-stats-grid>* {
        min-width: 170px;
    }

    .profile-info {
        display: none;
    }

    .chat-container {
        min-height: calc(100dvh - 200px);
    }

    .wfb-rating-row {
        gap: 0.45rem;
    }

    .wfb-intensity-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .main-title {
        font-size: 1.35rem;
    }

    .hero-home {
        min-height: calc(100dvh - 1.4rem);
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }

    .hero-title {
        font-size: 1.42rem;
    }

    .hero-subtitle {
        font-size: 0.88rem;
    }

    .subtitle {
        font-size: 0.82rem;
    }

    .btn-primary,
    .btn-secondary,
    .btn-save-plan,
    .btn-add-block,
    .btn-send-chat,
    .btn-attach-chat {
        min-height: 44px;
    }

    .dashboard-layout>.sidebar {
        left: 8px;
        right: 8px;
        bottom: max(8px, env(safe-area-inset-bottom));
    }

    .student-list-item.grid-layout .sli-col[data-label]::before {
        font-size: 0.62rem;
    }

    .diet-meta-item {
        flex-basis: 100%;
    }

    .log-set-header,
    .log-set-row {
        grid-template-columns: 28px minmax(52px, 1fr) minmax(52px, 1fr) minmax(46px, 0.7fr) 42px;
        gap: 0.25rem;
    }

    .set-prev {
        font-size: 0.63rem;
    }
}

/* =============================
   RECENTES + STATUS BAR (MOBILE FIRST)
   ============================= */
.trainer-stats-row.status-bar {
    display: flex !important;
    gap: 0.5rem !important;
    margin-bottom: 0.85rem !important;
    overflow: visible !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    scroll-snap-type: none !important;
}

.trainer-stats-row.status-bar>.t-stat-card {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    padding: 0.55rem 0.3rem 0.5rem !important;
    border-radius: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(18, 18, 18, 0.84) !important;
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
    transform: none !important;
}

.trainer-stats-row.status-bar>.t-stat-card::before,
.trainer-stats-row.status-bar>.t-stat-card::after {
    display: none !important;
}

.trainer-stats-row.status-bar .stat-header {
    display: none !important;
}

.trainer-stats-row.status-bar .t-stat-card h3 {
    margin: 0 0 0.1rem !important;
    font-size: 1.35rem !important;
    line-height: 1.05;
    letter-spacing: -0.02em;
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    color: var(--text-main) !important;
    text-shadow: none !important;
}

.trainer-stats-row.status-bar .status-active h3 {
    color: var(--primary-color) !important;
}

.trainer-stats-row.status-bar .status-pending h3 {
    color: #f59e0b !important;
}

.trainer-stats-row.status-bar .t-stat-card p {
    margin: 0;
    font-size: 0.66rem !important;
    color: var(--text-muted) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 600;
}

#trainer-student-list .recent-student-card {
    display: flex;
    flex-direction: column;
    gap: 0.34rem;
    padding: 0.64rem 0.72rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(18, 18, 18, 0.78);
    box-shadow: none;
    animation: none;
    opacity: 1;
}

#trainer-student-list .recent-student-card:hover {
    transform: none;
    border-color: rgba(163, 230, 53, 0.24);
    background: rgba(20, 20, 20, 0.88);
    box-shadow: none;
}

#trainer-student-list .recent-student-card::after {
    display: none;
}

#view-dashboard .table-header-row {
    display: none;
}

.recent-student-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

#trainer-student-list .recent-student-card h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.recent-status {
    font-size: 0.66rem;
    font-weight: 700;
    padding: 0.22rem 0.52rem;
    border-radius: 999px;
    border: 1px solid rgba(163, 230, 53, 0.3);
    background: rgba(163, 230, 53, 0.12);
    color: var(--primary-color);
}

.recent-meta-lines {
    display: flex;
    flex-direction: column;
    gap: 0.16rem;
    font-size: 0.74rem;
}

.recent-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.recent-meta-lines p {
    margin: 0;
    color: #d4d4d8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-meta-lines strong {
    color: var(--text-muted);
    font-weight: 700;
}

@media (max-width: 768px) {
    .trainer-stats-row.status-bar>* {
        min-width: 0 !important;
    }

    .trainer-stats-row.status-bar .t-stat-card h3 {
        font-size: 1.25rem !important;
    }

    .trainer-stats-row.status-bar .t-stat-card p {
        font-size: 0.62rem !important;
    }
}

@media (max-width: 560px) {
    .trainer-stats-row.status-bar {
        gap: 0.34rem !important;
    }

    .trainer-stats-row.status-bar>.t-stat-card {
        padding: 0.5rem 0.2rem 0.44rem !important;
        border-radius: 9px !important;
    }

    .trainer-stats-row.status-bar .t-stat-card h3 {
        font-size: 1.14rem !important;
    }

    .trainer-stats-row.status-bar .t-stat-card p {
        font-size: 0.58rem !important;
    }

    .recent-meta-lines {
        font-size: 0.7rem;
    }
}

#view-dashboard .students-section,
#view-dashboard .student-list-container,
#trainer-student-list {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
}

#view-alunos .student-list-container,
#alunos-active-list,
#pending-student-list {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
}

/* =============================
   MOBILE-FIRST PWA HARDENING
   ============================= */
@media (max-width: 1024px) {

    #app,
    #app.wide {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 100dvh;
        margin: 0;
        padding: 0.9rem !important;
    }

    .dashboard-layout {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .dashboard-layout>.main-content,
    .main-content {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        padding-bottom: calc(104px + env(safe-area-inset-bottom)) !important;
    }

    .dashboard-layout>.sidebar,
    .dashboard-layout .sidebar.student {
        position: fixed !important;
        left: 10px;
        right: 10px;
        bottom: max(8px, env(safe-area-inset-bottom));
        top: auto !important;
        width: auto !important;
        height: 72px !important;
        z-index: 1000;
        border-radius: 18px;
        border: 1px solid rgba(255, 255, 255, 0.14);
        background: rgba(12, 12, 12, 0.72);
        backdrop-filter: blur(18px) saturate(120%);
        padding: 0.42rem 0.55rem !important;
    }

    .dashboard-layout>.sidebar .sidebar-logo,
    .dashboard-layout>.sidebar .sidebar-footer {
        display: none !important;
    }

    .dashboard-layout>.sidebar .sidebar-nav {
        width: 100%;
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.35rem;
    }

    .dashboard-layout>.sidebar .nav-item {
        position: relative;
        width: 100%;
        min-width: 0;
        min-height: 56px;
        padding: 0.35rem 0.12rem !important;
        margin: 0;
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.16rem;
        text-align: center;
        font-size: 0.62rem !important;
        line-height: 1.05;
    }

    .dashboard-layout>.sidebar .nav-item i,
    .dashboard-layout>.sidebar .nav-item .ui-svg-icon {
        margin: 0;
        font-size: 1.63rem;
        padding: 0.28rem;
        border-radius: 999px;
    }

    .dashboard-layout>.sidebar .nav-item.active i,
    .dashboard-layout>.sidebar .nav-item.active .ui-svg-icon {
        color: var(--primary-color);
        background: rgba(163, 230, 53, 0.12);
        box-shadow: 0 0 0 1px rgba(163, 230, 53, 0.38), 0 0 14px rgba(163, 230, 53, 0.28);
    }

    .dashboard-layout>.sidebar .nav-item span:not(.nav-badge) {
        display: block !important;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .dashboard-layout>.sidebar .nav-item .nav-badge {
        position: absolute;
        left: 50%;
        top: 5px;
        transform: translateX(10px);
        margin-left: 0;
        min-width: 13px;
        width: 13px;
        height: 13px;
        padding: 0;
        border-radius: 999px;
        font-size: 0.5rem;
        line-height: 1;
        color: #fff;
        background: #f59e0b;
        border: 1px solid rgba(0, 0, 0, 0.25);
        animation: none;
    }

    .dashboard-layout>.sidebar .nav-item:nth-child(n+5) {
        display: none !important;
    }

    .students-section,
    .student-list-container,
    .chat-container,
    .protocol-content-list,
    .routine-content-area {
        min-width: 0;
        max-width: 100%;
        overflow-x: hidden;
    }
}

#trainer-student-profile-screen.active,
#student-dashboard-screen.active,
#trainer-dashboard-screen.active,
#student-workout-screen.active,
#student-diet-screen.active {
    align-items: stretch;
    justify-content: flex-start;
}

/* =============================
   MOBILE STABILITY FIXES (PWA)
   ============================= */
:root {
    --touch-target-min: 44px;
}

.student-list-item,
.treino-option-card,
.role-card {
    opacity: 1;
}

.student-list-item::after,
.role-card::after,
.treino-option-card::after,
.routine-card::before,
.t-stat-card::before,
.chat-item.active::before,
.superset-linked::after {
    pointer-events: none;
}

.perfil-modal-overlay,
.trainer-profile-sheet-overlay {
    pointer-events: none;
}

.perfil-modal-overlay.active,
.trainer-profile-sheet-overlay.active {
    pointer-events: auto;
}

@media (max-width: 1024px) {

    html,
    body,
    #app,
    #app.wide,
    .dashboard-layout,
    .main-content,
    .screen,
    .view-section {
        width: 100%;
        max-width: 100%;
    }

    body {
        overflow-x: hidden;
        overscroll-behavior-y: none;
    }

    .dashboard-layout {
        width: 100% !important;
        left: 0;
        right: 0;
    }

    .main-content,
    .students-section,
    .student-list-container,
    .chat-container,
    .chat-window,
    .chat-sidebar,
    .protocol-content-list,
    .routine-content-area,
    .prof-editor-layout,
    .p-tab-content {
        min-width: 0 !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    img,
    video,
    canvas,
    svg,
    iframe {
        max-width: 100%;
        height: auto;
    }

    .btn-primary,
    .btn-secondary,
    .btn-secondary-outline,
    .btn-save-plan,
    .btn-add-block,
    .btn-add-ex,
    .btn-start-routine,
    .btn-duvida-treino,
    .btn-check-set,
    .btn-remove-set,
    .btn-attach-chat,
    .btn-send-chat,
    .btn-icon,
    .btn-icon-minimal,
    .btn-copy-tiny,
    .nav-item,
    .workout-tab,
    .chat-item,
    .student-list-item,
    .treino-option-card,
    .action-card,
    .set-intensity-dot {
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(163, 230, 53, 0.2);
    }

    .btn-icon,
    .btn-icon-minimal,
    .btn-copy-tiny,
    .btn-send-chat,
    .btn-attach-chat,
    .btn-check-set,
    .btn-remove-set {
        min-width: var(--touch-target-min) !important;
        min-height: var(--touch-target-min) !important;
    }

    .btn-primary,
    .btn-secondary,
    .btn-secondary-outline,
    .btn-save-plan,
    .btn-add-block,
    .btn-add-ex,
    .btn-start-routine,
    .btn-duvida-treino,
    .nav-item,
    .workout-tab {
        min-height: var(--touch-target-min) !important;
    }

    .chat-status-pill {
        min-height: 32px;
        display: inline-flex;
        align-items: center;
    }

    .chat-input-wrapper textarea,
    .q-input,
    input,
    select,
    textarea {
        font-size: 16px;
    }

    .chat-input-area {
        padding-bottom: calc(0.8rem + env(safe-area-inset-bottom)) !important;
    }

    .chat-preview-image,
    .chat-preview-video {
        border-radius: 12px !important;
        width: min(280px, 100%) !important;
        height: auto !important;
        max-height: 180px !important;
    }

    .chat-media-image,
    .chat-media-video {
        width: min(320px, 100%) !important;
        max-height: 220px !important;
    }

    .student-list-item.grid-layout .sli-col.actions {
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .student-list-item.grid-layout .sli-col.actions .btn-icon-minimal {
        width: var(--touch-target-min);
        height: var(--touch-target-min);
    }
}

@media (prefers-reduced-motion: reduce) {

    .student-list-item,
    .pending-card,
    .history-workout-card,
    .log-exercise-card,
    .chat-item {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* =============================
   TREINO EXECUCAO COMPACTA
   ============================= */
#view-student-log-workout .log-workout-sticky-header {
    position: sticky;
    top: max(0px, env(safe-area-inset-top));
    z-index: 90;
    margin: -0.35rem -0.2rem 0.8rem;
    padding: 0.75rem 0.95rem;
    border-radius: 18px;
    background:
        linear-gradient(140deg, rgba(26, 26, 30, 0.96), rgba(12, 12, 14, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

#view-student-log-workout {
    position: relative;
    padding-bottom: 2.5rem;
}

#view-student-log-workout::before {
    content: '';
    position: absolute;
    inset: -20% -10% auto;
    height: 260px;
    background:
        radial-gradient(circle at 15% 30%, rgba(163, 230, 53, 0.18), transparent 55%),
        radial-gradient(circle at 85% 20%, rgba(56, 189, 248, 0.12), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

#view-student-log-workout .log-workout-sticky-header,
#view-student-log-workout .log-content-list {
    position: relative;
    z-index: 1;
}

#view-student-log-workout #log-workout-title {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #f8fafc;
}

#view-student-log-workout .log-workout-sticky-header .user-info > div:not(.log-workout-controls) {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(163, 230, 53, 0.35);
    background: rgba(163, 230, 53, 0.12);
    color: #d9f99d;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

#view-student-log-workout #log-workout-timer {
    font-variant-numeric: tabular-nums;
    font-size: 0.78rem;
}

#view-student-log-workout .log-workout-sticky-header .ui-svg-icon {
    width: 0.9rem;
    height: 0.9rem;
}

#view-student-log-workout .log-workout-sticky-header .btn-primary {
    background: linear-gradient(135deg, #bef264, #a3e635 60%, #86efac);
    color: #0f172a;
    border: none;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 10px 22px rgba(163, 230, 53, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#view-student-log-workout .log-workout-sticky-header .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(163, 230, 53, 0.38);
}

#view-student-log-workout .log-workout-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.rest-auto-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rest-auto-toggle.active {
    border-color: rgba(163, 230, 53, 0.4);
    color: var(--primary-color);
    background: rgba(163, 230, 53, 0.12);
}

.workout-save-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, 0.3);
    background: rgba(96, 165, 250, 0.12);
    color: #93c5fd;
    font-size: 0.68rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.workout-save-indicator.active {
    opacity: 1;
}

.workout-save-indicator .ui-svg-icon {
    width: 12px;
    height: 12px;
}

#view-student-log-workout .log-content-list {
    padding-top: 0.6rem;
    gap: 1.2rem;
}

#view-student-log-workout .log-exercise-card {
    min-height: 220px;
    contain: content;
    background:
        linear-gradient(140deg, rgba(32, 32, 36, 0.95), rgba(18, 18, 22, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
}

#view-student-log-workout .log-exercise-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(163, 230, 53, 0.7), rgba(250, 204, 21, 0.35), transparent);
    opacity: 0.5;
}

#view-student-log-workout .log-ex-header {
    position: sticky;
    top: calc(max(0px, env(safe-area-inset-top)) + 72px);
    z-index: 2;
    padding: 0.35rem 0.1rem;
    border-radius: 10px;
    background: rgba(18, 18, 18, 0.94);
    backdrop-filter: blur(8px);
}

#view-student-log-workout .log-ex-title-row h3 {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

#view-student-log-workout .meta-pill {
    background: rgba(163, 230, 53, 0.12);
    border-color: rgba(163, 230, 53, 0.3);
    font-size: 0.63rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#view-student-log-workout .meta-pill.muted {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

#view-student-log-workout .exercise-notes-input {
    min-height: 38px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#view-student-log-workout .log-set-header,
#view-student-log-workout .log-set-row {
    grid-template-columns: 34px minmax(78px, 1fr) minmax(78px, 1fr) minmax(60px, 0.7fr) minmax(60px, 0.7fr) 42px !important;
    gap: 0.22rem;
}

#view-student-log-workout .log-set-header {
    position: sticky;
    top: calc(max(0px, env(safe-area-inset-top)) + 122px);
    z-index: 1;
    padding: 0.38rem 0.12rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(90deg, rgba(14, 14, 16, 0.95), rgba(20, 20, 24, 0.88));
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

#view-student-log-workout .log-set-row {
    min-height: 56px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

#view-student-log-workout .log-set-row:hover {
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

#view-student-log-workout .set-number {
    width: 22px;
    height: 22px;
    font-size: 0.68rem;
}

#view-student-log-workout .set-value-stack {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

#view-student-log-workout .btn-add-set {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

#view-student-log-workout .btn-add-set:hover {
    background: rgba(163, 230, 53, 0.16);
    border-color: rgba(163, 230, 53, 0.35);
    color: var(--primary-color);
}

#view-student-log-workout .set-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 14px;
    align-items: center;
    gap: 0.14rem;
    min-height: 30px;
}

#view-student-log-workout .compact-value {
    min-height: 30px;
    padding: 0.08rem 0.18rem;
    font-size: 0.7rem;
    border-radius: 8px;
}

#view-student-log-workout .set-prev-line {
    font-size: 0.56rem;
    letter-spacing: 0.01rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#view-student-log-workout .log-set-history {
    grid-template-columns: 44px minmax(80px, 1fr) minmax(80px, 1fr) minmax(60px, 0.7fr) minmax(60px, 0.7fr) 48px;
    padding-bottom: 0.4rem;
}

#view-student-log-workout .set-history-line {
    font-size: 0.56rem;
    letter-spacing: 0.01rem;
}

#view-student-log-workout .set-progress-flag {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.24;
    color: rgba(255, 255, 255, 0.35);
}

#view-student-log-workout .set-progress-flag.up {
    opacity: 1;
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(163, 230, 53, 0.55);
}

#view-student-log-workout .set-progress-flag .ui-svg-icon {
    width: 0.72rem;
    height: 0.72rem;
}

#view-student-log-workout .set-intensity-visual {
    display: grid;
    align-items: center;
    min-width: 0;
}

#view-student-log-workout .set-intensity-dot {
    height: 12px;
}

#view-student-log-workout .btn-check-set,
#view-student-log-workout .btn-remove-set {
    width: 30px;
    height: 30px;
}

@media (max-width: 520px) {
    #view-student-log-workout .log-workout-sticky-header {
        margin: -0.25rem -0.15rem 0.6rem;
        padding: 0.55rem 0.6rem;
    }

    #view-student-log-workout .log-ex-header {
        top: calc(max(0px, env(safe-area-inset-top)) + 66px);
    }

    #view-student-log-workout .log-set-header {
        top: calc(max(0px, env(safe-area-inset-top)) + 112px);
    }

    #view-student-log-workout .log-set-header,
    #view-student-log-workout .log-set-row {
        grid-template-columns: 22px minmax(64px, 1fr) minmax(64px, 1fr) minmax(58px, 1fr) minmax(58px, 1fr) 34px !important;
        gap: 0.22rem;
    }

    #view-student-log-workout .set-input-row {
        grid-template-columns: minmax(0, 1fr) 12px;
        gap: 0.1rem;
    }

    #view-student-log-workout .compact-value {
        min-height: 28px;
        font-size: 0.66rem;
    }

    #view-student-log-workout .set-prev-line {
        font-size: 0.52rem;
    }

    #view-student-log-workout .set-intensity-dot {
        height: 10px;
    }

    .pr-summary-card {
        padding: 0.85rem 0.9rem;
        gap: 0.65rem;
    }

    .pr-summary-item {
        grid-template-columns: 28px minmax(0, 1fr);
        gap: 0.5rem;
        padding: 0.55rem 0.6rem;
    }

    .pr-summary-set {
        grid-column: 1 / -1;
        justify-self: flex-start;
        margin-left: 28px;
    }
}

/* Chat media toolbar (audio/video quick actions) */
.chat-media-toolbar {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
    min-width: 0;
}

@media (max-width: 1024px) {
    .chat-input-wrapper {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "tools tools"
            "text send";
        align-items: end;
        gap: 0.5rem;
    }

    .chat-media-toolbar {
        grid-area: tools;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.12rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .chat-media-toolbar::-webkit-scrollbar {
        display: none;
    }

    .chat-input-wrapper textarea {
        grid-area: text;
        width: 100%;
    }

    .chat-input-wrapper .btn-send-chat {
        grid-area: send;
        align-self: end;
    }
}

/* Workout Layout & UX Adjustments */
.log-set-table .log-set-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(90px, 1fr) minmax(90px, 1fr) 60px;
    gap: 0.5rem;
    align-items: center;
}

.set-value-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.set-intensity-visual {
    display: flex;
    justify-content: center;
    gap: 14px;
}

.set-intensity-dot {
    width: 28px;
    height: 28px;
    margin: 0 !important;
}

@media (max-width: 600px) {
    .log-set-table .log-set-row {
        grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1fr) auto auto 40px;
        gap: 0.25rem;
    }

    .log-set-history {
        grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1fr) auto auto 40px;
        gap: 0.25rem;
    }

    .set-intensity-visual {
        gap: 10px;
    }

    .set-intensity-dot {
        width: 24px;
        height: 24px;
    }
}

/* Nutrition Layout Adjustments */
.diet-progress-fill.protein {
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.8);
}

.diet-progress-fill.carb {
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.8);
}

.diet-progress-fill.fat {
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.8);
}

.meal-block .block-header button i.ph-check {
    font-size: 1.1rem;
}

/* === Dashboard insights (engagement + quick filters) === */
.dashboard-insights {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.engagement-card {
    background: rgba(32, 32, 36, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.engagement-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.engagement-header h3 {
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
}

.engagement-total {
    background: rgba(163, 230, 53, 0.12);
    border: 1px solid rgba(163, 230, 53, 0.25);
    border-radius: 14px;
    padding: 0.5rem 0.9rem;
    text-align: center;
}

.engagement-total span {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.engagement-total strong {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.engagement-chart {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.engagement-chart svg {
    width: 100%;
    height: 120px;
}

.engagement-line {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 3;
}

.engagement-area {
    fill: rgba(163, 230, 53, 0.12);
}

.engagement-dot {
    fill: #0f172a;
    stroke: var(--primary-color);
    stroke-width: 2;
}

.engagement-labels {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.4rem;
}

.engagement-label {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.engagement-label strong {
    display: block;
    font-size: 0.85rem;
    color: var(--text-main);
}

.quick-filters {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.filter-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(32, 32, 36, 0.5);
    color: var(--text-main);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    border-color: rgba(163, 230, 53, 0.4);
    background: rgba(163, 230, 53, 0.08);
}

.filter-chip.active {
    border-color: rgba(163, 230, 53, 0.6);
    background: rgba(163, 230, 53, 0.18);
    color: #0f172a;
}

.filter-count {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    color: var(--text-main);
}

.filter-chip.active .filter-count {
    background: rgba(0, 0, 0, 0.15);
    color: #0f172a;
}

@media (max-width: 1024px) {
    .dashboard-insights {
        grid-template-columns: 1fr;
    }
}

/* === Student activity + quick actions === */
.badge.alert {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.badge.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.badge.alert .dot,
.badge.warning .dot {
    background: currentColor;
}

.recent-status.alert {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.recent-status.warning {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.sli-last-workout,
.recent-last-workout {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.student-quick-actions {
    display: flex;
    gap: 0.4rem;
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    transition: all 0.2s ease;
}

.student-quick-actions.compact {
    margin-top: 0.7rem;
}

.student-list-item:hover .student-quick-actions,
.recent-student-card:hover .student-quick-actions,
.student-list-item.show-actions .student-quick-actions {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.quick-action-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-action-btn:hover {
    border-color: rgba(163, 230, 53, 0.5);
    color: var(--primary-color);
    background: rgba(163, 230, 53, 0.12);
}

/* === Exercise drawer === */
.exercise-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    opacity: 0;
    display: none;
    transition: opacity 0.25s ease;
    z-index: 8000;
}

.exercise-drawer-overlay.active {
    opacity: 1;
}

.exercise-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(520px, 92vw);
    height: 100%;
    background: var(--bg-color);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 8100;
    display: none;
    overflow-y: auto;
}

.exercise-drawer.active {
    transform: translateX(0);
}

.exercise-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    background: var(--bg-color);
    z-index: 2;
}

.exercise-drawer-actions {
    display: flex;
    gap: 0.5rem;
}

.exercise-drawer-body {
    padding: 1.5rem;
}

.exercise-create-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1.2rem;
}

.exercise-create-form {
    display: grid;
    gap: 0.7rem;
    margin-top: 0.8rem;
}

.drawer-open {
    overflow: hidden;
}

/* === Settings view === */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.settings-card {
    background: rgba(32, 32, 36, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
}

.settings-card-header h2 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.settings-field {
    display: grid;
    gap: 0.5rem;
    margin-top: 1rem;
}

.settings-inline {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.5rem;
}

.settings-tag-input {
    display: flex;
    gap: 0.6rem;
}

.settings-tag-input input {
    flex: 1;
}

.settings-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.settings-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(163, 230, 53, 0.12);
    border: 1px solid rgba(163, 230, 53, 0.3);
    color: var(--primary-color);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
}

.settings-tag button {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 0.7rem;
}

.settings-empty {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.settings-upload {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.settings-avatar-preview,
.settings-logo-preview {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background-size: cover;
    background-position: center;
}

.settings-avatar-preview.has-image,
.settings-logo-preview.has-image {
    color: transparent;
}

.settings-radio-group {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.radio-card.compact {
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
}

.settings-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-main);
}

@media (max-width: 1024px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* === Branding helpers === */
.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.logo-icon.has-brand-logo i {
    display: none;
}

.profile-avatar.has-photo {
    background-size: cover;
    background-position: center;
    color: transparent;
}

.profile-avatar.has-photo i {
    opacity: 0;
}

@media (max-width: 768px) {
    .student-quick-actions {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }
}

.code-input {
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.2em;
}

@media (max-width: 640px) {
    .settings-inline {
        grid-template-columns: 1fr;
    }
}

.meal-quick-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.meal-quick-btn {
    border: 1px solid rgba(163, 230, 53, 0.35);
    background: rgba(163, 230, 53, 0.08);
    color: #d9f99d;
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.meal-quick-btn:hover {
    background: rgba(163, 230, 53, 0.16);
    border-color: rgba(163, 230, 53, 0.6);
    transform: translateY(-1px);
}

.diet-planner-overview {
    border: 1px solid var(--border-color);
    background: linear-gradient(120deg, rgba(163, 230, 53, 0.08), rgba(0, 0, 0, 0.2));
    border-radius: 14px;
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 0.8rem;
}

.diet-planner-kcal span {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.diet-planner-kcal strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 1.2rem;
    color: var(--text-main);
}

.diet-planner-kcal small {
    display: block;
    margin-top: 0.2rem;
    color: var(--text-muted);
    font-size: 0.73rem;
}

.diet-planner-macros {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-content: center;
    justify-content: flex-end;
}

.diet-macro-pill {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 0.35rem 0.6rem;
    font-size: 0.74rem;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.diet-macro-pill.protein {
    border-color: rgba(34, 197, 94, 0.35);
    color: #86efac;
}

.diet-macro-pill.carb {
    border-color: rgba(59, 130, 246, 0.35);
    color: #93c5fd;
}

.diet-macro-pill.fat {
    border-color: rgba(234, 179, 8, 0.35);
    color: #fde68a;
}

.wb-meal-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
    min-width: 0;
}

.wb-meal-target {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.food-target-hint {
    margin-bottom: 0.7rem;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 0.6rem 0.7rem;
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.35;
}

@media (max-width: 720px) {
    .diet-planner-overview {
        grid-template-columns: 1fr;
    }

    .diet-planner-macros {
        justify-content: flex-start;
    }
}

.meal-inline-help {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.02em;
}

.diet-item-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 0.7rem;
    background: rgba(255, 255, 255, 0.01);
}

.diet-item-row.is-checked {
    border-color: rgba(74, 222, 128, 0.35);
    background: rgba(74, 222, 128, 0.06);
}

.diet-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.diet-check-wrap {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
}

.diet-base-qty {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.diet-item-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.diet-qty-input,
.diet-sub-input {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-main);
    padding: 0.48rem 0.58rem;
    font-size: 0.78rem;
}

.diet-qty-input {
    min-width: 170px;
    flex: 1;
}

.diet-sub-btn {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    border-radius: 9px;
    padding: 0.48rem 0.65rem;
    font-size: 0.74rem;
    font-weight: 600;
}

.diet-sub-btn.active {
    border-color: rgba(251, 191, 36, 0.5);
    background: rgba(251, 191, 36, 0.12);
    color: #fcd34d;
}

.diet-substitute-box {
    border: 1px dashed rgba(251, 191, 36, 0.45);
    border-radius: 10px;
    padding: 0.6rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    background: rgba(251, 191, 36, 0.05);
}

@media (max-width: 640px) {
    .diet-substitute-box {
        grid-template-columns: 1fr;
    }
}

.diet-modern-summary-card {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem 1.1rem;
    background: linear-gradient(115deg, rgba(20, 20, 20, 0.96), rgba(33, 33, 33, 0.88));
    margin-bottom: 1rem;
}

.diet-modern-summary-title {
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.diet-modern-date-controls {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.7rem;
}

.diet-modern-date-input {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    padding: 0.38rem 0.45rem;
    font-size: 0.78rem;
}

.diet-modern-summary-foot {
    margin-top: 0.7rem;
    font-size: 0.76rem;
    color: var(--text-muted);
}

.diet-modern-weekly-card {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.8rem 0.9rem;
    background: rgba(16, 16, 16, 0.92);
    margin-bottom: 1rem;
}

.diet-modern-weekly-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #93c5fd;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.diet-modern-weekly-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.45rem;
}

.diet-modern-weekly-grid div {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.45rem 0.5rem;
    background: rgba(255, 255, 255, 0.02);
}

.diet-modern-weekly-grid span {
    display: block;
    font-size: 0.68rem;
    color: var(--text-muted);
}

.diet-modern-weekly-grid strong {
    font-size: 0.88rem;
}

.diet-modern-weekly-days {
    margin-top: 0.55rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.diet-week-day {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 0.18rem 0.5rem;
    font-size: 0.68rem;
    color: var(--text-muted);
}

.diet-modern-meal-card {
    border: 1px solid var(--border-color);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(13, 13, 13, 0.95);
    margin-bottom: 1rem;
}

.diet-modern-meal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.diet-modern-meal-card.tone-0 .diet-modern-meal-header {
    background: linear-gradient(90deg, rgba(132, 204, 22, 0.33), rgba(132, 204, 22, 0.1));
}

.diet-modern-meal-card.tone-1 .diet-modern-meal-header {
    background: linear-gradient(90deg, rgba(45, 212, 191, 0.3), rgba(45, 212, 191, 0.08));
}

.diet-modern-meal-card.tone-2 .diet-modern-meal-header {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.28), rgba(59, 130, 246, 0.08));
}

.diet-modern-meal-header h3 {
    margin: 0;
    font-size: 1.35rem;
    color: #d9f99d;
    font-weight: 700;
}

.diet-modern-meal-actions {
    display: flex;
    gap: 0.5rem;
}

.diet-modern-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.25);
    color: rgba(255, 255, 255, 0.75);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.diet-modern-icon-btn.done {
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.45);
}

.diet-modern-food-list {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.diet-modern-food-row {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.75rem;
}

.diet-modern-food-row.is-checked {
    border-color: rgba(74, 222, 128, 0.45);
    background: rgba(74, 222, 128, 0.09);
}

.diet-modern-food-main {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.diet-modern-check {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 1rem;
    font-weight: 700;
}

.diet-modern-base-qty {
    display: block;
    margin-top: 0.1rem;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.diet-modern-trash-btn {
    border: 1px solid rgba(248, 113, 113, 0.45);
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
    border-radius: 9px;
    width: 30px;
    height: 30px;
}

.diet-modern-food-controls {
    margin-top: 0.55rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.diet-modern-input {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    padding: 0.5rem 0.62rem;
    font-size: 0.82rem;
    min-width: 130px;
}

.diet-modern-sub-btn,
.diet-modern-save-btn,
.diet-modern-cancel-btn {
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    font-size: 0.77rem;
    font-weight: 600;
}

.diet-modern-sub-btn {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
}

.diet-modern-sub-btn.active {
    border-color: rgba(251, 191, 36, 0.6);
    background: rgba(251, 191, 36, 0.12);
    color: #fde68a;
}

.diet-modern-substitute-box,
.diet-modern-add-food-box {
    margin-top: 0.55rem;
    border: 1px dashed rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    padding: 0.55rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}

.diet-modern-add-food-box {
    margin: 0.8rem;
    margin-bottom: 0;
    border-style: solid;
    border-color: rgba(74, 222, 128, 0.3);
    background: rgba(74, 222, 128, 0.05);
}

.diet-modern-add-food-actions {
    grid-column: span 3;
    display: flex;
    gap: 0.45rem;
}

.diet-modern-draft-results {
    grid-column: span 3;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.diet-modern-draft-item {
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    border-radius: 8px;
    padding: 0.42rem 0.55rem;
}

.diet-modern-draft-item span {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.diet-modern-save-btn {
    border: 1px solid rgba(74, 222, 128, 0.4);
    background: rgba(74, 222, 128, 0.16);
    color: #86efac;
}

.diet-modern-cancel-btn {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
}

.diet-modern-macro-chips {
    margin-top: 0.55rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.diet-modern-chip {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.2rem 0.45rem;
    font-size: 0.72rem;
    background: rgba(255, 255, 255, 0.03);
}

.diet-modern-chip.kcal {
    color: #e5e7eb;
}

.diet-modern-chip.protein {
    color: #a3e635;
}

.diet-modern-chip.carb {
    color: #22d3ee;
}

.diet-modern-chip.fat {
    color: #facc15;
}

@media (max-width: 860px) {
    .diet-modern-substitute-box,
    .diet-modern-add-food-box {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .diet-modern-add-food-actions {
        grid-column: span 2;
    }

    .diet-modern-draft-results {
        grid-column: span 2;
    }

    .diet-modern-weekly-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .diet-modern-substitute-box,
    .diet-modern-add-food-box {
        grid-template-columns: 1fr;
    }

    .diet-modern-add-food-actions {
        grid-column: span 1;
    }

    .diet-modern-draft-results {
        grid-column: span 1;
    }

    .diet-modern-weekly-grid {
        grid-template-columns: 1fr;
    }
}
