:root {
    --app-bg: #FAFAFA;
    --app-surface: #FFFFFF;
    --app-soft: #F4F4F4;
    --app-text: #2B2B2B;
    --app-muted: #8B8B8B;
    --app-border: #EDEDED;
    --app-primary: #6E52D3;
    --app-primary-strong: #5A42B0;
    --app-blue: #2CA5FF;
    --app-shadow: 0 14px 30px rgba(17, 17, 17, 0.08);
    --app-gradient: linear-gradient(90deg, #2CA5FF 0%, #6E52D3 40%, #4123AC 93%);
}

html,
body,
#app {
    width: 100%;
    min-height: 100%;
}

body {
    margin: 0;
    font-family: "DM Sans", "Avenir Next", "Segoe UI", sans-serif;
    background: var(--app-bg);
    color: var(--app-text);
}

body.theme-dark {
    --app-bg: #3D3D3D;
    --app-surface: #2A2A2A;
    --app-soft: #3D3D3D;
    --app-text: #FFFFFF;
    --app-muted: #B8B8B8;
    --app-border: #3D3D3D;
    --app-shadow: none;
}

.app-shell {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--app-bg);
    display: flex;
    justify-content: center;
    padding: 0;
}

.app-container {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--app-surface);
    box-shadow: 0 18px 40px rgba(17, 17, 17, 0.12);
    position: relative;
}

.app-content {
    padding: 24px 24px 96px;
}

.app-main {
    padding: 24px 24px 96px;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, 0.28);
    display: grid;
    place-items: center;
    z-index: 90;
    padding: 24px;
}

.loading-overlay-card {
    min-width: 200px;
    max-width: 320px;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 16px;
    box-shadow: var(--app-shadow);
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 18px;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(110, 82, 211, 0.2);
    border-top-color: var(--app-primary);
    border-radius: 50%;
    animation: app-spin 0.8s linear infinite;
}

.loading-text {
    font-size: 13px;
    color: var(--app-text);
    font-weight: 600;
}

.error-retry {
    margin-top: 12px;
}

.spinner-preview-button {
    width: fit-content;
}

.screen {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.pull-refresh {
    position: sticky;
    top: 0;
    z-index: 5;
    margin: -12px 0 0;
    padding: 8px 12px;
    border-radius: 999px;
    width: fit-content;
    align-self: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--app-muted);
    background: transparent;
    opacity: 0.72;
    transition: opacity 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.pull-refresh.refreshing {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    opacity: 1;
    color: #FFFFFF;
    background: var(--app-gradient);
}

.pull-refresh:not(.refreshing) {
    display: none;
}

.pull-refresh-spinner {
    width: 14px;
    height: 14px;
    border-width: 2px;
    border-color: rgba(255, 255, 255, 0.35);
    border-top-color: #FFFFFF;
    flex-shrink: 0;
}

.section-title {
    font-size: clamp(18px, 2.8vw, 28px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0 0 12px;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.section-title::after {
    content: "";
    width: 56px;
    height: 4px;
    border-radius: 999px;
    background: var(--app-gradient);
    box-shadow: 0 4px 12px rgba(66, 35, 172, 0.25);
}

.section-title-strong {
    font-size: clamp(24px, 3.4vw, 32px);
    font-weight: 800;
    letter-spacing: -0.4px;
    margin-bottom: 6px;
}

.section-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 14px;
}

.section-link {
    color: var(--app-primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.card {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 16px;
    box-shadow: var(--app-shadow);
}

.stack {
    display: grid;
    gap: 12px;
}

.rutina-card {
    padding: 16px;
    display: grid;
    gap: 14px;
    border-radius: 18px;
    border-color: rgba(56, 189, 248, 0.25);
    background:
        radial-gradient(circle at top right, rgba(125, 211, 252, 0.18), transparent 44%),
        linear-gradient(180deg, rgba(248, 252, 255, 0.96), rgba(240, 249, 255, 0.92));
    animation: rutina-enter 0.32s ease both;
}

.rutina-gym-group {
    padding: 2px 0 6px;
    display: grid;
    gap: 8px;
}

.rutina-gym-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
}

.rutina-gym-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: contain;
    background: #FFFFFF;
    border: 1px solid var(--app-border);
    padding: 4px;
}

.rutina-gym-name {
    font-size: 15px;
    font-weight: 800;
}

.rutina-selected-gym-card {
    padding: 12px;
    display: grid;
    gap: 8px;
}

.rutina-selected-gym-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--app-muted);
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.rutina-selected-gym-inline {
    padding: 2px 0;
}

.rutina-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.rutina-card-title {
    font-size: 20px;
    font-weight: 800;
}

.rutina-card-meta {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: var(--app-muted);
}

.rutina-filter-chip {
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 999px;
    padding: 8px 14px;
    background: rgba(224, 242, 254, 0.85);
    color: #0F172A;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.rutina-filter-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(14, 116, 144, 0.14);
    border-color: rgba(14, 165, 233, 0.55);
}

.rutina-filter-chip.is-selected {
    background: linear-gradient(135deg, #0EA5E9, #22D3EE);
    border-color: transparent;
    color: #FFFFFF;
    box-shadow: 0 10px 22px rgba(14, 165, 233, 0.34);
}

.rutina-accordion {
    border: none;
    border-radius: 0;
    background: transparent;
}

.rutina-accordion-summary {
    list-style: none;
    cursor: pointer;
    padding: 8px 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--app-primary-strong);
}

.rutina-accordion-summary::-webkit-details-marker {
    display: none;
}

.rutina-accordion-summary::after {
    content: "▾";
    float: right;
    color: var(--app-muted);
}

.rutina-accordion[open] .rutina-accordion-summary::after {
    transform: rotate(180deg);
}

.rutina-accordion-content {
    padding: 0;
    display: grid;
    gap: 10px;
}

.rutina-block {
    border: none;
    border-left: 2px solid rgba(110, 82, 211, 0.28);
    border-radius: 0;
    padding: 4px 0 6px 10px;
    background: transparent;
    display: grid;
    gap: 6px;
}

.rutina-block-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rutina-block-index {
    font-size: 12px;
    font-weight: 700;
    color: var(--app-primary-strong);
    background: transparent;
    border-radius: 0;
    padding: 0;
}

.rutina-block-title {
    font-size: 14px;
    font-weight: 700;
}

.rutina-block-note {
    font-size: 12px;
    color: var(--app-muted);
}

.rutina-ex-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 4px;
}

.rutina-ex-item {
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
}

.rutina-ex-name {
    font-size: 15px;
    font-weight: 700;
}

.rutina-ex-meta {
    margin-top: 2px;
    font-size: 13px;
    color: var(--app-muted);
}

.rutina-empty {
    font-size: 13px;
    color: var(--app-muted);
}

/* Rutinas visual refresh */
.rutina-accordion {
    background: transparent;
}

.rutina-accordion-summary::after {
    content: "\25BE";
    transition: transform 0.18s ease;
}

.rutina-accordion[open] .rutina-accordion-content {
    animation: rutina-expand 0.22s ease;
}

.rutina-block {
    background: transparent;
}

.rutina-block-index {
    background: transparent;
}

.rutina-ex-item {
    background: transparent;
}

@keyframes rutina-enter {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rutina-expand {
    from {
        opacity: 0;
        transform: translateY(-3px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.icon-fill {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.icon-button {
    border: 1px solid var(--app-border);
    background: var(--app-soft);
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: var(--app-text);
    cursor: pointer;
    position: relative;
}

.icon-button.primary {
    background: var(--app-gradient);
    color: #FFFFFF;
    border: none;
}

.badge-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--app-primary);
    top: 6px;
    right: 6px;
    border: 2px solid var(--app-surface);
}

.btn-primary {
    border: none;
    background: var(--app-gradient);
    color: #FFFFFF;
    font-weight: 700;
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
}

.btn-primary:disabled {
    background: #C7C7C7;
    color: #FFFFFF;
    cursor: not-allowed;
}

.btn-outline {
    border: 1px solid var(--app-border);
    background: transparent;
    color: var(--app-text);
    font-weight: 600;
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
}

.btn-danger {
    border: 1px solid #EF4444;
    background: #EF4444;
    color: #FFFFFF;
    font-weight: 700;
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
}

.btn-ghost {
    border: none;
    background: transparent;
    color: var(--app-primary);
    font-weight: 600;
    cursor: pointer;
}

.home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.header-kicker {
    font-size: 11px;
    font-weight: 600;
    color: var(--app-muted);
    margin: 0;
}

.header-title {
    font-size: 20px;
    font-weight: 700;
    margin: 2px 0 0;
}

.credit-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    color: var(--app-primary);
    background: rgba(110, 82, 211, 0.1);
    border: 1px solid rgba(110, 82, 211, 0.2);
    padding: 3px 8px;
    border-radius: 999px;
    margin-top: 6px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-menu-wrap {
    position: relative;
}

.avatar-button {
    padding: 0;
    cursor: pointer;
}

.profile-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    padding: 8px;
    display: grid;
    gap: 4px;
    z-index: 20;
}

.profile-menu-item {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--app-text);
    text-align: left;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.profile-menu-item:hover {
    background: var(--app-soft);
}

.notifications-panel {
    padding: 14px 16px;
    display: grid;
    gap: 8px;
}

.notifications-title {
    font-size: 14px;
    font-weight: 700;
}

.notifications-empty {
    font-size: 12px;
    color: var(--app-muted);
}

.notifications-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
    font-size: 12px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--app-border);
    background: var(--app-soft);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.calendar-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scrollbar-width: none;
}

.calendar-strip::-webkit-scrollbar {
    display: none;
}

.calendar-item {
    appearance: none;
    -webkit-appearance: none;
    min-width: 60px;
    height: 70px;
    border-radius: 14px;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    display: grid;
    place-items: center;
    position: relative;
    color: var(--app-muted);
    font-size: 11px;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.calendar-item .calendar-label {
    color: var(--app-muted);
}

.calendar-date {
    font-size: 18px;
    line-height: 1;
    color: var(--app-text);
}

body.theme-light .calendar-date {
    color: var(--app-text);
}

body.theme-light .calendar-item.active .calendar-date {
    color: #FFFFFF;
}

.calendar-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #f5c400;
    box-shadow: 0 0 0 0 rgba(245, 196, 0, 0.6);
    position: absolute;
    top: 8px;
    right: 10px;
    transform: none;
    animation: calendarPulse 1.6s ease-out infinite;
}

@keyframes calendarPulse {
    0% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(245, 196, 0, 0.6);
    }
    60% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(245, 196, 0, 0);
    }
    100% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(245, 196, 0, 0);
    }
}

.calendar-item.active {
    background: var(--app-gradient);
    color: #FFFFFF;
    border-color: transparent;
    transform: scale(1.04);
}

.calendar-item.active .calendar-label,
.calendar-item.active .calendar-date {
    color: #FFFFFF;
}

.calendar-item.active span:last-child {
    color: #FFFFFF;
}

.calendar-strip-lg {
    gap: 14px;
    padding-bottom: 8px;
}

.calendar-item-lg {
    min-width: 72px;
    height: 84px;
    font-size: 12px;
    border-radius: 18px;
}

.calendar-item-lg .calendar-date {
    font-size: 22px;
}

.class-item {
    padding: 16px;
}

.class-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.class-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.class-actions button {
    width: 100%;
}

.class-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.home-empty-card {
    padding: 16px;
    display: grid;
    gap: 6px;
}

.home-empty-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    color: var(--app-text);
}

.home-empty-text {
    font-size: 13px;
    line-height: 1.45;
    margin: 0;
    color: var(--app-muted);
}

.section-heading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--app-blue);
    font-size: 16px;
    font-weight: 700;
}

.section-heading .icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--app-muted);
    font-size: 12px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    margin-top: 6px;
}

.status-dot.confirmed {
    background: var(--app-blue);
}

.status-dot.pending {
    background: #F59E0B;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.action-button {
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    border-radius: 16px;
    padding: 14px 10px;
    display: grid;
    gap: 10px;
    text-align: center;
    justify-items: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--app-text);
}

.action-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: var(--app-soft);
    display: grid;
    place-items: center;
    color: var(--app-primary);
}

.gym-carousel {
    position: relative;
}

.gym-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}

.gym-scroll::-webkit-scrollbar {
    display: none;
}

.gym-card {
    min-width: 200px;
    flex: 0 0 200px;
    overflow: hidden;
    scroll-snap-align: start;
    border-radius: 24px;
    border: 1px solid rgba(17, 17, 17, 0.06);
    background:
        radial-gradient(circle at top left, rgba(44, 165, 255, 0.08), transparent 42%),
        linear-gradient(180deg, #FFFFFF 0%, #FCFCFC 100%);
    box-shadow: 0 18px 34px rgba(17, 17, 17, 0.08);
}

.gym-card-button {
    padding: 0;
    text-align: left;
    cursor: pointer;
    border: none;
    background: transparent;
    display: block;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.gym-card-button:focus-visible {
    outline: 2px solid rgba(44, 165, 255, 0.6);
    outline-offset: 3px;
}

.gym-card-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 38px rgba(17, 17, 17, 0.1);
}

.gym-media {
    position: relative;
    height: 172px;
    display: grid;
    place-items: center;
    padding: 20px 20px 10px;
    background:
        radial-gradient(circle at 50% 18%, rgba(110, 82, 211, 0.08), transparent 46%),
        linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0));
}

.gym-media img {
    width: min(118px, 72%);
    max-height: 126px;
    height: auto;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    display: block;
    filter: drop-shadow(0 12px 20px rgba(17, 17, 17, 0.08));
}

.gym-rating {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--app-text);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: var(--app-shadow);
    white-space: nowrap;
}

.gym-body {
    padding: 4px 16px 16px;
    display: grid;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.gym-body .class-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
    overflow-wrap: anywhere;
    color: var(--app-text);
}

.gym-body .badge {
    width: fit-content;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
}

.gym-body .meta-row {
    min-width: 0;
    line-height: 1.35;
    flex-wrap: wrap;
    font-size: 13px;
    gap: 8px;
}

.gym-body .meta-row .icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.gym-carousel-arrow {
    display: none;
}

.gym-explore-carousel {
    position: relative;
    padding: 0 52px;
}

.gym-explore-scroll {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.gym-explore-scroll::-webkit-scrollbar {
    display: none;
}

.gym-explore-scroll .explore-gym-card {
    flex: 0 0 clamp(250px, calc((100% - 54px) / 4), 300px);
    max-width: clamp(250px, calc((100% - 54px) / 4), 300px);
    scroll-snap-align: start;
}

.explore-gym-card {
    border-radius: 24px;
}

.explore-gym-card .result-media {
    height: 132px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 22%, rgba(110, 82, 211, 0.08), transparent 44%),
        linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(255, 255, 255, 0.75));
}

.explore-gym-card .result-media img {
    width: min(98px, 54%);
    max-height: 92px;
    height: auto;
    padding: 0;
    background: transparent;
    display: block;
    filter: drop-shadow(0 14px 22px rgba(17, 17, 17, 0.08));
}

.explore-gym-card .result-title {
    padding: 14px 14px 12px;
    font-size: 15px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(15, 23, 42, 0.88) 100%);
}

.explore-gym-card .result-body {
    padding: 12px 14px 14px;
}

.explore-gym-card .badge-row {
    max-height: none;
    overflow: visible;
    align-items: flex-start;
}

.explore-gym-card .result-actions {
    gap: 8px;
    margin-top: 8px;
}

.explore-gym-card .badge {
    font-size: 10px;
    padding: 4px 7px;
    line-height: 1.2;
    white-space: normal;
    text-align: center;
}

.explore-gym-card .meta-row {
    font-size: 12px;
}

.explore-gym-card .btn-primary {
    padding: 9px 12px;
    font-size: 14px;
}

.gym-explore-carousel .gym-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 1px solid rgba(17, 17, 17, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 22px rgba(17, 17, 17, 0.12);
    color: var(--app-text);
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 2;
}

.gym-explore-carousel .gym-carousel-arrow-left {
    left: 0;
}

.gym-explore-carousel .gym-carousel-arrow-right {
    right: 0;
}

@media (min-width: 768px) {
    .gym-carousel {
        padding: 0 52px;
    }

    .gym-scroll {
        gap: 18px;
        padding-bottom: 10px;
    }

    .gym-card {
        min-width: 0;
        flex: 0 0 calc((100% - 54px) / 4);
        max-width: calc((100% - 54px) / 4);
    }

    .gym-carousel-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 38px;
        height: 38px;
        border: 1px solid rgba(17, 17, 17, 0.08);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 10px 22px rgba(17, 17, 17, 0.12);
        color: var(--app-text);
        display: grid;
        place-items: center;
        cursor: pointer;
        z-index: 2;
    }

    .gym-carousel-arrow-left {
        left: 0;
    }

    .gym-carousel-arrow-right {
        right: 0;
    }

}

.detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-title {
    font-size: 20px;
    font-weight: 700;
}

.detail-sub {
    font-size: 12px;
    color: var(--app-muted);
    margin-top: 4px;
}

.detail-hero {
    overflow: hidden;
    border-radius: 18px;
    background: var(--app-soft);
}

.detail-hero img {
    width: 100%;
    height: 190px;
    object-fit: contain;
    padding: 12px;
    background: #FFFFFF;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    display: block;
}

.detail-hero-placeholder {
    height: 190px;
    display: grid;
    place-items: center;
    color: var(--app-muted);
    font-size: 12px;
}

.detail-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: var(--app-soft);
}

.detail-carousel img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    display: grid;
    place-items: center;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.carousel-button.prev {
    left: 12px;
}

.carousel-button.next {
    right: 12px;
}

.review-card {
    padding: 16px;
    display: grid;
    gap: 10px;
}

.review-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--app-text);
}

.review-stars {
    display: flex;
    gap: 6px;
    font-size: 20px;
    color: #C9C9C9;
}

.review-star {
    line-height: 1;
}

.review-textarea {
    width: 100%;
    min-height: 110px;
    border-radius: 12px;
    border: 1px solid var(--app-border);
    padding: 10px 12px;
    font-size: 13px;
    background: var(--app-soft);
    color: var(--app-text);
    resize: vertical;
}

.detail-info {
    padding: 16px;
    display: grid;
    gap: 12px;
}

.contact-actions {
    display: grid;
    gap: 10px;
}

.membership-card {
    background: var(--app-gradient);
    color: #FFFFFF;
    border: none;
    padding: 18px;
    display: grid;
    gap: 14px;
    box-shadow: var(--app-shadow);
}

.membership-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    opacity: 0.9;
}

.membership-alert {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    display: grid;
    place-items: center;
}

.membership-alert .icon {
    width: 14px;
    height: 14px;
    stroke: #FFFFFF;
}

.membership-plan {
    display: grid;
    gap: 12px;
}

.membership-plan-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.membership-plan-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.18);
    display: grid;
    place-items: center;
}

.membership-plan-icon .icon {
    width: 16px;
    height: 16px;
    stroke: #FFFFFF;
}

.membership-plan-name {
    font-size: 16px;
    font-weight: 700;
}

.membership-plan-gym {
    font-size: 12px;
    opacity: 0.85;
}

.membership-label {
    font-size: 12px;
    opacity: 0.85;
}

.membership-date {
    font-size: 14px;
    font-weight: 700;
}

.membership-payment {
    background: rgba(17, 17, 17, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 12px;
    display: grid;
    gap: 4px;
}

.membership-payment-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
}

.membership-payment-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #FFD166;
}

.membership-payment-amount {
    font-size: 18px;
    font-weight: 800;
}

.membership-disciplines {
    display: grid;
    gap: 8px;
}

.membership-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.membership-chip {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
}

.gymmenu-actions {
    margin-top: 12px;
    display: grid;
    gap: 10px;
}

.gymmenu-action {
    width: 100%;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--app-text);
    cursor: pointer;
    text-align: left;
}

.gymmenu-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(110, 82, 211, 0.14);
    display: grid;
    place-items: center;
    color: var(--app-primary);
    flex-shrink: 0;
}

.gymmenu-action-content {
    display: grid;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.gymmenu-action-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--app-text);
}

.gymmenu-action-sub {
    font-size: 12px;
    color: var(--app-muted);
}

.gymmenu-action-chevron {
    font-size: 20px;
    line-height: 1;
    color: var(--app-muted);
}

.detail-info-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--app-muted);
    font-size: 12px;
}

.detail-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--app-text);
    margin-bottom: 4px;
}

.detail-value {
    color: var(--app-muted);
}

.discount-card {
    background: #111111;
    color: #FFFFFF;
    border-radius: 18px;
    padding: 18px;
    position: relative;
    overflow: hidden;
}

.discount-orb {
    position: absolute;
    border-radius: 999px;
    opacity: 0.2;
}

.discount-orb.blue {
    width: 120px;
    height: 120px;
    background: var(--app-blue);
    top: -40px;
    right: -40px;
}

.discount-orb.purple {
    width: 90px;
    height: 90px;
    background: var(--app-primary);
    bottom: -40px;
    left: -40px;
    opacity: 0.12;
}

.discount-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
    background: var(--app-gradient);
}

.discount-content {
    position: relative;
    display: grid;
    gap: 8px;
}

.match-card {
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.match-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.match-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(44, 165, 255, 0.12);
    color: var(--app-blue);
    display: grid;
    place-items: center;
}

.match-actions {
    display: flex;
    gap: 8px;
}

.pill {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
}

.pill.accepted {
    background: rgba(110, 82, 211, 0.12);
    color: var(--app-primary);
}

.pill.rejected {
    background: rgba(148, 163, 184, 0.2);
    color: #94A3B8;
}

.filter-card {
    padding: 16px;
    display: grid;
    gap: 12px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.checkbox-row {
    color: var(--app-text);
    font-size: 12px;
}

.checkbox-row label {
    color: inherit;
}

.field-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--app-muted);
}

body.theme-light .field-label {
    color: #4B5563;
}

.field-input,
.field-select {
    border: 1px solid var(--app-border);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
    background: var(--app-soft);
    color: var(--app-text);
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.field-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
}

.input-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.input-icon .icon {
    color: var(--app-muted);
}

.input-icon .field-input,
.input-icon .field-select {
    flex: 1;
}

.select-wrap,
.date-wrap {
    position: relative;
}

.select-wrap::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--app-muted);
    border-bottom: 2px solid var(--app-muted);
    transform: translateY(-50%) rotate(45deg);
    pointer-events: none;
}

.date-input {
    padding-right: 36px;
}

/* Force readable date text across browser-native date controls. */
.date-input,
.date-input::-webkit-datetime-edit,
.date-input::-webkit-datetime-edit-text,
.date-input::-webkit-datetime-edit-day-field,
.date-input::-webkit-datetime-edit-month-field,
.date-input::-webkit-datetime-edit-year-field {
    color: var(--app-text);
    -webkit-text-fill-color: var(--app-text);
}

body.theme-light .date-input {
    color-scheme: light;
}

body.theme-dark .date-input {
    color-scheme: dark;
}

.date-wrap::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238B8B8B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2'/><path d='M16 2v4M8 2v4M3 10h18'/></svg>");
    background-repeat: no-repeat;
    background-size: 16px 16px;
    pointer-events: none;
}

body.theme-dark .date-wrap::after {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23B8B8B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2'/><path d='M16 2v4M8 2v4M3 10h18'/></svg>");
}

.result-card {
    overflow: hidden;
}

.result-media {
    position: relative;
    height: 130px;
    background: var(--app-soft);
}

.result-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    background: #FFFFFF;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.result-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.65) 100%);
    color: #FFFFFF;
    font-weight: 700;
}

.result-body {
    border: none;
    box-shadow: none;
    border-radius: 0 0 16px 16px;
    padding: 16px;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.result-actions {
    margin-top: 10px;
    display: grid;
    gap: 10px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(44, 165, 255, 0.12);
    color: var(--app-blue);
}

.tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.tab {
    border: 1px solid var(--app-border);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    background: var(--app-soft);
    color: var(--app-muted);
}

.tab.active {
    background: var(--app-gradient);
    color: #FFFFFF;
    border-color: transparent;
}

.reservation-card {
    padding: 16px;
    display: grid;
    gap: 10px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}

.status-pill.green {
    background: rgba(34, 197, 94, 0.16);
    color: #15803D;
}

.status-pill.yellow {
    background: rgba(245, 158, 11, 0.16);
    color: #B45309;
}

.profile-hero {
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-hero .avatar {
    width: 64px;
    height: 64px;
    border: 3px solid rgba(110, 82, 211, 0.2);
}

.profile-name {
    font-size: 18px;
    font-weight: 700;
}

.profile-sub {
    font-size: 12px;
    color: var(--app-muted);
}

.profile-file-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.profile-image-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-action-button {
    min-width: 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
}

.cropper-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 20px;
}

.cropper-card {
    width: min(360px, 100%);
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 16px;
    box-shadow: var(--app-shadow);
    padding: 16px;
    display: grid;
    gap: 12px;
}

.cropper-canvas {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    border-radius: 12px;
    border: 1px solid var(--app-border);
    background: #101010;
    touch-action: none;
}

.form-card {
    padding: 18px;
    display: grid;
    gap: 14px;
}

.field-grid {
    display: grid;
    gap: 12px;
    align-items: start;
}

.field-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toggle {
    position: relative;
    width: 42px;
    height: 24px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.2);
    transition: 0.2s ease;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #FFFFFF;
    top: 3px;
    left: 3px;
    transition: 0.2s ease;
}

.toggle input:checked + .toggle-slider {
    background: var(--app-gradient);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(18px);
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(430px, 100%);
    background: var(--app-surface);
    border-top: 1px solid var(--app-border);
    display: flex;
    justify-content: space-between;
    padding: 10px 24px 12px;
    z-index: 10;
}

.nav-item {
    text-decoration: none;
    color: var(--app-muted);
    font-size: 10px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.nav-item.active {
    color: var(--app-primary);
}

.nav-icon {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.tabbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 86px;
    width: 100%;
    position: fixed;
    bottom: 0;
    padding: 10px 16px 12px;
    background: #000032;
    z-index: 100;
    overflow: visible;
    gap: 8px;
}

@media (min-width: 901px) {
    .tabbar {
        display: none;
    }
}

.tabbar-item {
    width: 72px;
    height: 76px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    font-size: 13px;
    text-decoration: none;
    margin-top: 20px;
}

.tabbar-item span {
    font-size: 12px;
    margin-top: 6px;
    text-align: center;
}

.tabbar-item.tab-active span {
    display: none;
}

.tabbar-icon {
    width: 24px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform 0.3s ease;
}

.tabbar-item .active-bg {
    display: none;
}

.tabbar-item.tab-active {
    opacity: 1;
    color: #FFFFFF;
    z-index: 2;
    transition: all 0.3s ease;
}

.tabbar-item.tab-active .tabbar-icon {
    display: none;
}

.tabbar-item.tab-active .active-bg {
    display: flex;
    position: absolute;
    top: -26px;
    width: 68px;
    height: 68px;
    background: linear-gradient(142deg, #34C8E8 0%, #4E4AF2 100%);
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.4);
    transform: skewY(-10deg);
    border-radius: 16px;
    justify-content: center;
    align-items: center;
    left: -5px;
    transition: all 0.3s ease;
}

.classes-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.classes-header-main {
    display: grid;
    gap: 4px;
}

.classes-header-title {
    font-size: 20px;
    font-weight: 700;
}

.myclasses-screen {
    gap: 18px;
}

.myclasses-header-sub {
    font-size: 12px;
    color: var(--app-muted);
    text-transform: capitalize;
}

.myclasses-summary-card {
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(44, 165, 255, 0.1), rgba(110, 82, 211, 0.14));
    display: grid;
    gap: 12px;
}

.myclasses-summary-item {
    display: grid;
    gap: 2px;
}

.myclasses-summary-label {
    font-size: 11px;
    color: var(--app-muted);
    letter-spacing: 0.2px;
}

.myclasses-summary-value {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.2px;
}

.myclasses-summary-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.myclasses-metric {
    border: 1px solid rgba(110, 82, 211, 0.18);
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 9px 8px;
    display: grid;
    justify-items: center;
    gap: 1px;
}

.myclasses-metric-value {
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.myclasses-metric-label {
    font-size: 10px;
    color: var(--app-muted);
}

.myclasses-week-panel {
    padding: 12px;
    border-radius: 18px;
    display: grid;
    gap: 10px;
}

.week-header {
    display: grid;
    grid-template-columns: 36px 1fr 36px;
    align-items: center;
    gap: 12px;
}

.week-month {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    text-transform: lowercase;
}

.week-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.week-day {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    border-radius: 16px;
    padding: 10px 6px;
    display: grid;
    place-items: center;
    gap: 6px;
    color: var(--app-muted);
    font-size: 11px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.week-day .week-label {
    color: var(--app-muted);
}

.week-day.active {
    background: var(--app-gradient);
    color: #FFFFFF;
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(46, 93, 255, 0.25);
    transform: translateY(-2px);
}

.week-label {
    letter-spacing: 0.3px;
}

.week-date {
    font-size: 16px;
    color: var(--app-text);
}

.week-day.active .week-date {
    color: #FFFFFF;
}

.week-day.active .week-label {
    color: #FFFFFF;
}

.week-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #f5c400;
    box-shadow: 0 0 0 0 rgba(245, 196, 0, 0.6);
    position: absolute;
    top: 8px;
    right: 8px;
    animation: calendarPulse 1.6s ease-out infinite;
}

.myclasses-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.myclasses-list-title {
    margin-bottom: 0;
}

.myclasses-list-title::after {
    width: 42px;
}

.myclasses-list .class-card {
    border-radius: 18px;
}

.myclasses-empty-card {
    padding: 18px;
    border-radius: 18px;
    display: grid;
    gap: 8px;
    place-items: center;
    text-align: center;
}

.myclasses-empty-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--app-primary);
    background: rgba(110, 82, 211, 0.12);
}

.myclasses-empty-title {
    font-size: 15px;
    font-weight: 700;
}

.myclasses-empty-text {
    font-size: 12px;
    color: var(--app-muted);
    max-width: 260px;
}

.class-card {
    padding: 16px;
    display: grid;
    gap: 10px;
}

.class-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--app-muted);
    font-size: 12px;
}

.class-gym {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 600;
}

.class-card-title {
    font-size: 16px;
    font-weight: 700;
}

.class-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--app-muted);
    font-size: 12px;
}

.class-card-meta div {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.class-card-date {
    font-size: 12px;
    color: var(--app-muted);
}

.class-card-availability {
    display: grid;
    gap: 6px;
}

.availability-row {
    display: flex;
    justify-content: space-between;
    color: var(--app-muted);
    font-size: 12px;
}

.availability-count {
    font-weight: 700;
    color: var(--app-text);
}

.availability-bar {
    height: 6px;
    border-radius: 999px;
    background: var(--app-soft);
    overflow: hidden;
}

.availability-fill {
    height: 100%;
    background: linear-gradient(90deg, #2CA5FF 0%, #6E52D3 100%);
}

.class-card-action {
    width: 100%;
    margin-top: 6px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}
.status-label {
    font-size: 12px;
    color: var(--app-muted);
    margin-right: 6px;
}

.status-pill.confirmed {
    background: rgba(44, 165, 255, 0.12);
    color: var(--app-blue);
}

.status-pill.pending {
    background: rgba(245, 158, 11, 0.16);
    color: #B45309;
}
.status-pill.open {
    background: rgba(34, 197, 94, 0.16);
    color: #166534;
}
.status-pill.full {
    background: rgba(59, 130, 246, 0.16);
    color: #1E40AF;
}
.status-pill.canceled {
    background: rgba(239, 68, 68, 0.16);
    color: #B91C1C;
}
.status-pill.finished {
    background: rgba(107, 114, 128, 0.16);
    color: #374151;
}
.status-pill.closed {
    background: rgba(124, 58, 237, 0.16);
    color: #5B21B6;
}

.tabbar-item.tab-active .tabbar-icon-active {
    display: block;
    transform: skewY(10deg);
    width: 28px;
    height: 28px;
}

.tabbar-item:last-child.tab-active {
    margin-right: 12px;
}

.orbit-nav {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: min(520px, calc(100% - 28px));
    z-index: 110;
    animation: orbit-rise 0.4s ease;
}

.orbit-shell {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 10px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(250, 250, 250, 0.7));
    border: 1px solid rgba(17, 17, 17, 0.08);
    box-shadow: none;
    backdrop-filter: blur(16px);
    overflow: hidden;
}

body.theme-dark .orbit-shell {
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.92), rgba(34, 34, 34, 0.72));
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55);
}

.orbit-link {
    text-decoration: none;
    color: #1E293B;
    display: grid;
    place-items: center;
    gap: 6px;
    padding: 8px 6px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 700;
    position: relative;
    transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.orbit-link:hover {
    transform: translateY(-2px);
}

.orbit-link:focus-visible {
    outline: 2px solid rgba(44, 165, 255, 0.6);
    outline-offset: 3px;
}

body.theme-dark .orbit-link {
    color: #E5E7EB;
}

.orbit-link-wide {
    background: transparent;
}

body.theme-dark .orbit-link-wide {
    background: transparent;
}

.orbit-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.08);
    color: inherit;
}

.orbit-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.orbit-label {
    font-size: 11px;
    letter-spacing: 0.2px;
    display: block;
    width: 100%;
    text-align: center;
}

body.theme-light .orbit-link.orbit-active {
    color: #111111;
    transform: translateY(-6px);
}

.orbit-link.orbit-active {
    color: #FFFFFF;
    transform: translateY(-6px);
}

body.theme-light .orbit-link.orbit-active .orbit-icon {
    background: #0F172A;
    color: #FFFFFF;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.25);
}

.orbit-link.orbit-active .orbit-icon {
    background: linear-gradient(135deg, #2CA5FF, #6E52D3);
    color: #FFFFFF;
    box-shadow: 0 10px 18px rgba(46, 93, 255, 0.35);
}

body.theme-dark .orbit-link.orbit-active .orbit-icon {
    background: linear-gradient(135deg, #0B1020, #1F2937);
    color: #FFFFFF;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.4);
}

.orbit-link.orbit-active::after {
    content: "";
    position: absolute;
    bottom: 4px;
    width: 26px;
    height: 4px;
    border-radius: 999px;
    background: #6E52D3;
    animation: orbit-pulse 1.2s ease infinite;
}

.orbit-icon svg {
    stroke-linecap: round;
    stroke-linejoin: round;
}

.orbit-link.orbit-active {
    color: #FFFFFF;
    transform: translateY(-6px);
}

body.theme-dark .orbit-link.orbit-active::after {
    background: #9F84FF;
}

.orbit-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 0%, rgba(44, 165, 255, 0.22), transparent 55%),
        radial-gradient(circle at 70% 0%, rgba(110, 82, 211, 0.25), transparent 60%);
    pointer-events: none;
    z-index: -1;
}

body.theme-dark .orbit-glow {
    background: radial-gradient(circle at 25% 0%, rgba(111, 136, 255, 0.28), transparent 55%),
        radial-gradient(circle at 75% 0%, rgba(178, 132, 255, 0.26), transparent 60%);
}

@media (max-width: 520px) {
    .app-main {
        padding-bottom: 132px;
    }
}

@keyframes orbit-rise {
    from {
        transform: translateX(-50%) translateY(14px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes orbit-pulse {
    0%,
    100% {
        opacity: 0.6;
        transform: scaleX(0.9);
    }
    50% {
        opacity: 1;
        transform: scaleX(1.1);
    }
}

body.theme-dark .section-link {
    color: #9F84FF;
}

body.theme-dark .discount-card {
    background: #2A2A2A;
}

body.theme-dark .discount-badge {
    background: var(--app-gradient);
}

body.theme-dark .icon-button {
    background: #3D3D3D;
    color: #FFFFFF;
}

body.theme-dark .gym-rating {
    background: #3D3D3D;
    color: #FFFFFF;
}

body.theme-dark .result-title {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.85) 100%);
}

body.theme-dark .app-container {
    box-shadow: none;
}

body.theme-dark .status-pill.green {
    background: rgba(34, 197, 94, 0.22);
    color: #86EFAC;
}

body.theme-dark .status-pill.yellow,
body.theme-dark .status-pill.pending {
    background: rgba(245, 158, 11, 0.22);
    color: #FDE68A;
}

body.theme-dark .status-pill.confirmed {
    background: rgba(44, 165, 255, 0.2);
    color: #7DD3FC;
}

body.theme-dark .status-pill.open {
    background: rgba(34, 197, 94, 0.22);
    color: #86EFAC;
}

body.theme-dark .status-pill.full {
    background: rgba(59, 130, 246, 0.22);
    color: #93C5FD;
}

body.theme-dark .status-pill.canceled {
    background: rgba(239, 68, 68, 0.22);
    color: #FCA5A5;
}

body.theme-dark .status-pill.finished {
    background: rgba(107, 114, 128, 0.22);
    color: #D1D5DB;
}

body.theme-dark .status-pill.closed {
    background: rgba(124, 58, 237, 0.22);
    color: #C4B5FD;
}

body.theme-dark .field-label {
    color: #E5E7EB;
}

body.theme-dark .section-heading {
    color: #7DD3FC;
}

body.theme-dark .gym-card-button .class-title,
body.theme-dark .gym-card .class-title {
    color: #FFFFFF;
}

body.theme-dark .filter-card .field-label {
    color: #F1F5F9;
}

body.theme-dark .checkbox-row,
body.theme-dark .checkbox-row label {
    color: #FFFFFF;
}

.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 40;
}

.popup-overlay--visible {
    opacity: 1;
    pointer-events: auto;
}

.popup-shell {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateY(10px);
    z-index: 50;
    padding: 24px;
}

.popup-shell--visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.popup-card {
    width: min(360px, 100%);
    background: var(--app-surface);
    border-radius: 18px;
    border: 1px solid var(--app-border);
    box-shadow: var(--app-shadow);
    padding: 16px;
    display: grid;
    gap: 12px;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-title {
    font-size: 16px;
    font-weight: 700;
}

.popup-close {
    border: none;
    background: var(--app-soft);
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: var(--app-text);
    cursor: pointer;
}

.popup-body {
    color: var(--app-muted);
    font-size: 13px;
    line-height: 1.4;
    display: grid;
    gap: 6px;
}

.popup-actions {
    display: grid;
    gap: 8px;
}

body.theme-dark .popup-overlay {
    background: rgba(0, 0, 0, 0.6);
}

.app-loading {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    background: var(--app-bg);
}

@media (min-width: 768px) {
    .app-shell {
        padding: 12px;
    }

    .app-container {
        max-width: min(1040px, calc(100vw - 48px));
        min-height: calc(100vh - 24px);
        min-height: calc(100dvh - 24px);
        border-radius: 28px;
        overflow: hidden;
        border: 1px solid rgba(17, 17, 17, 0.06);
    }

    .app-container.app-container-wide .app-main {
        padding-left: clamp(24px, 4vw, 40px);
        padding-right: clamp(24px, 4vw, 40px);
        padding-bottom: 74px;
    }

    .app-container.app-container-wide .orbit-nav {
        width: min(860px, calc(100% - 48px));
        bottom: 8px;
    }
}

.app-loading img {
    width: 64px;
    height: 64px;
    animation: app-spin 1.1s linear infinite;
}

@keyframes app-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
