*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
html {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #101012;
    color: #fff;
    height: 100%;
    overscroll-behavior-y: none;
    touch-action: pan-x pan-y;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 20px;
    overflow-x: hidden;
}

.page {
    display: none;
    opacity: 0;
    animation: fadeIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    width: 100%;
    padding-bottom: 20px;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px 0 24px 0;
    transition: opacity 0.3s;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3px solid #1f2029;
    margin-bottom: 14px;
    background: #23242a;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    color: #fff;
    letter-spacing: 0.3px;
}

.profile-top.loading .profile-avatar,
.profile-top.loading .profile-name {
    display: none;
}

.skel {
    background: #1c1e26;
    background: linear-gradient(90deg, #1c1e26 25%, #2a2c36 50%, #1c1e26 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.avatar-skel {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    margin-bottom: 14px;
}

.name-skel {
    width: 160px;
    height: 26px;
}

.profile-btns-list {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 500px;
    margin: 0 auto;
}

.card-btn {
    width: 100%;
    padding: 18px 16px;
    border: none;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: #fff;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.1s, filter 0.2s;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    text-align: left;
}

.card-btn:active {
    transform: scale(0.97);
}

.card-blue {
    background: linear-gradient(135deg, #30a7f7, #0072ff);
}

.card-green {
    background: linear-gradient(135deg, #42e695, #3bb2b8);
}

.card-orange {
    background: linear-gradient(135deg, #ff8a30, #ff5e62);
}

.card-purple {
    background: linear-gradient(135deg, #b92b27, #1565C0);
    background: linear-gradient(135deg, #8E2DE2, #4A00E0);
}

.card-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(255, 255, 255, 0.1), transparent);
    pointer-events: none;
}

.btn-ic {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-ic svg {
    width: 26px;
    height: 26px;
}

.btn-txts {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.btn-title {
    font-size: 18px;
    font-weight: 700;
}

.btn-sub {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 3px;
    font-weight: 500;
}

.btn-arrow {
    opacity: 0.7;
}

.btn-arrow svg {
    width: 22px;
    height: 22px;
}

.stub-report-btn {
    width: calc(100% - 32px);
    margin: 24px auto;
    display: flex;
    align-items: center;
    padding: 14px;
    background: #18191f;
    border: 1px dashed #333;
    border-radius: 14px;
    color: #888;
    max-width: 500px;
    cursor: default;
}

.stub-ic {
    font-size: 20px;
    margin-right: 12px;
}

.stub-text {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.stub-badge {
    background: #222;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    margin-left: auto;
    border: 1px solid #333;
    color: #30a7f7;
}

.edit-profile-form {
    padding: 16px;
    max-width: 500px;
    margin: 0 auto;
    border-radius: 20px;
}

.form-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
    color: #fff;
}

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

label {
    display: block;
    margin-bottom: 8px;
    color: #aaa;
    font-size: 14px;
    font-weight: 500;
    margin-left: 4px;
}

input,
select {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid #2a2a2a;
    background: #1c1c1e;
    color: #fff;
    font-size: 16px;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    transition: border-color 0.2s;
}

input:focus,
select:focus {
    border-color: #30a7f7;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666' 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 14px center;
    background-size: 18px;
}

.profile-btn {
    width: 100%;
    padding: 18px;
    border-radius: 14px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    background: #30a7f7;
    color: #fff;
    margin-top: 12px;
    transition: opacity 0.2s;
}

.profile-btn:active {
    opacity: 0.7;
}

.gray-btn {
    background: #2c2c2e;
    color: #ccc;
    margin-top: 10px;
}

.btn-inline {
    width: auto;
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    margin: 0;
}



.modal-ex-desc {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: 20px 10px;
    opacity: 1;
    transition: opacity 0.2s;
}

.modal-ex-desc.hidden {
    display: none !important;
    opacity: 0;
}

.modal-content {
    background: #1c1c1e;
    border-radius: 24px;
    padding: 24px 20px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    margin-top: 20px;
    margin-bottom: 40px;
    position: relative;
    color: #fff;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    flex: 1;
    line-height: 1.3;
}

.modal-back-btn {
    width: auto;
    min-width: 70px;
    padding: 0 12px;
    height: 36px;
    border-radius: 17px;
    background: #2c2c2e;
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.modal-back-btn.fake {
    visibility: hidden;
}

.modal-video-wrap {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    margin-bottom: 16px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-video-pause {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.modal-video-wrap:hover .modal-video-pause,
.modal-video-pause:focus {
    opacity: 1;
}

.modal-desc {
    font-size: 15px;
    line-height: 1.6;
    color: #d1d1d6;
}

.workout-card-header {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    align-items: center;
}

.progress-wrap {
    max-width: 500px;
    margin: 0 auto;
    padding: 10px;
}

.calendar-card {
    background: #1c1c1e;
    border-radius: 20px;
    padding: 20px;
    margin-top: 10px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 16px;
}

.cal-nav-btn {
    background: #2c2c2e;
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.cal-cell {
    text-align: center;
    font-size: 14px;
    padding: 10px 0;
    color: #888;
}

.cal-day {
    color: #fff;
    background: #252528;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.cal-day.is-today {
    border: 1px solid #30a7f7;
    color: #30a7f7;
}

.dot-workout {
    position: absolute;
    bottom: 6px;
    width: 5px;
    height: 5px;
    background: #ff8a30;
    border-radius: 50%;
}

.workout-card {
    background: #1c1c1e;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #2a2a2a;
}

.workout-title {
    font-size: 16px;
    font-weight: 600;
    color: #30a7f7;
    margin-bottom: 4px;
}

.workout-info {
    font-size: 13px;
    color: #888;
}

.measurement-card {
    background: #1c1c1e;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    position: relative;
}

.measurement-header {
    color: #30a7f7;
    font-weight: 600;
    margin-bottom: 10px;
}

.measurement-table {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.measurement-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: 4px 0;
    border-bottom: 1px solid #2a2a2a;
}

.measurement-row:last-child {
    border-bottom: none;
}

.remove-measure-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: #ff453a;
    font-size: 20px;
    cursor: pointer;
}

.measure-tabs {
    display: flex;
    background: #2c2c2e;
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.measure-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px;
    color: #888;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.measure-tab-btn.active {
    background: #636366;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* .measure-chart-wrap {
    height: 220px;
    width: 100%;
    margin-top: 10px;
} */

.measure-chart-wrap {
    height: 220px;
    width: 100%;
    margin-top: 10px;
    background: #FFF8E1;
    border-radius: 12px;
    padding: 8px;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.photo-thumb-wrap {
    aspect-ratio: 1;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.photo-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-meta {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
    text-align: center;
}

.img-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-modal-content img {
    max-width: 100%;
    max-height: 80vh;
}

.img-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stub-block {
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.loader {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 14px;
}

::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

.help-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #30a7f7;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 800;
    font-size: 16px;

    animation: helpPulse 2s infinite;
}

@keyframes helpPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(48, 167, 247, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(48, 167, 247, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(48, 167, 247, 0);
    }
}

.file-input {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.file-input input[type=file] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-chip {
    background: #30a7f7;
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
}

.file-name {
    font-size: 12px;
    color: #888;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 150px;
}

.measure-guide {
    width: 100%;
}

.guide-h {
    margin: 20px 0 10px;
    font-weight: 800;
    color: #fff;
    font-size: 17px;
    border-bottom: 1px solid #2a2a2a;
    padding-bottom: 6px;
}

.guide-p {
    color: #ccc;
    line-height: 1.5;
    margin: 8px 0;
    font-size: 15px;
}

.guide-list {
    margin: 8px 0 16px 20px;
    color: #ccc;
    line-height: 1.5;
    font-size: 15px;
}

.guide-sublist {
    margin: 6px 0 0 10px;
}

.measure-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 12px 0;
}

.measure-item {
    background: #16161c;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 8px;
    text-align: center;
}

.measure-item img {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: contain;
    border-radius: 8px;
    background: #000;
    margin-bottom: 6px;
}

.measure-cap {
    font-size: 13px;
    color: #30a7f7;
    font-weight: 600;
}

.set-label {
    color: #aaa;
}

.photo-date-header {
    grid-column: 1 / -1;
    width: 100%;
    padding: 15px 5px 5px 5px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid #2a2a2a;
    margin-bottom: 10px;
}

.photo-date-header:first-child {
    padding-top: 5px;
}

.measure-chart-wrap {
    height: 300px;
    width: 100%;
    margin-top: 15px;
    margin-bottom: 20px;
    background: #FFF8E1;
    border-radius: 12px;
    padding: 15px;
    position: relative;
}

#chartSel {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #2a2a2a;
    background: #1c1c1e;
    color: #fff;
    font-size: 15px;
    margin-bottom: 15px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666' 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 12px center;
    background-size: 16px;
}

.measurement-header {
    color: #30a7f7;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 15px;
    text-align: center;
}

.measurement-table {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.measurement-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    padding: 8px 12px;
    border-bottom: 1px solid #2a2a2a;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.measurement-row span:first-child {
    color: #aaa;
    font-weight: 500;
}

.measurement-row span:last-child {
    color: #fff;
    font-weight: 600;
}

.measure-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px;
    color: #888;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.measure-tab-btn.active {
    background: #30a7f7;
    color: #fff;
    box-shadow: 0 4px 12px rgba(48, 167, 247, 0.3);
}

.chart-title {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #fff;
}

@media (max-width: 480px) {
    .measure-chart-wrap {
        height: 250px;
        padding: 10px;
    }
    
    .measurement-table {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .measurement-row {
        padding: 6px 10px;
        font-size: 13px;
    }
}

.clients-sub {
  margin-top: 8px;
  font-size: 13px;
  color: #888;
  font-weight: 500;
  text-align: center;
}

.avatar-ring-wrap {
    position: relative;
    width: 110px;
    height: 110px;
    margin-bottom: 18px;
}

.avatar-ring-wrap::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: conic-gradient(
        from 200deg,
        #00e0ff 0%,
        #0099ff 20%,
        #7c3aed 50%,
        #c026d3 70%,
        #00e0ff 100%
    );
    animation: ringRotate 5s linear infinite;
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 3px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 3px));
    z-index: 2;
}

.avatar-ring-wrap::after {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: conic-gradient(
        from 200deg,
        #00e0ff 0%,
        #0099ff 20%,
        #7c3aed 50%,
        #c026d3 70%,
        #00e0ff 100%
    );
    animation: ringRotate 5s linear infinite;
    filter: blur(8px);
    opacity: 0.45;
    z-index: 1;
}

@keyframes ringRotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.avatar-ring-wrap .profile-avatar {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    border: 3px solid #101012;
    background: #1a1a24;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    display: block;
    margin: 0;
    box-shadow: none;
}

.profile-main-btn {
    border: none;
}

.card-teal {
    background: rgba(20, 20, 30, 0.85);
    border: 1px solid rgba(255,255,255,0.06) !important;
    box-shadow: 0 4px 24px rgba(17,153,142,0.08), inset 0 0 0 1px rgba(56,239,125,0.1);
    position: relative;
}

.card-teal::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12%;
    bottom: 12%;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #38ef7d, #11998e);
    box-shadow: 0 0 10px 2px rgba(17,153,142,0.6);
}

.card-teal .btn-ic {
    background: rgba(17,153,142,0.12);
    color: #11998e;
    box-shadow: 0 0 14px rgba(17,153,142,0.2);
}

.card-teal:active {
    transform: scale(0.97);
    box-shadow: 0 4px 24px rgba(17,153,142,0.18), inset 0 0 0 1px rgba(17,153,142,0.2);
}

.profile-main-btn .btn-arrow {
    color: rgba(255,255,255,0.25);
    flex-shrink: 0;
}

.profile-main-btn .btn-arrow svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.profile-main-btn .btn-title {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
}

.profile-main-btn .btn-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    margin-top: 3px;
    font-weight: 400;
}

.profile-main-btn .btn-ic {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    flex-shrink: 0;
}

.profile-main-btn .btn-ic svg {
    width: 26px;
    height: 26px;
}