:root {
    --bg: #0d0f14;
    --panel: #171a22;
    --panel-2: #20242f;
    --text: #f7f7f8;
    --muted: #a5acba;
    --brand: #ff3d2e;
    --brand-2: #ff9d2e;
    --line: rgba(255, 255, 255, .09);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
}

a { color: inherit; }
.text-muted { color: var(--muted) !important; }
.brand-text { color: var(--brand-2); }

.navbar, .app-sidebar, .app-card, .table-dark, .modal-content {
    background: var(--panel) !important;
}

.app-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
}

.btn-brand {
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: #e63327;
    --bs-btn-hover-border-color: #e63327;
}

.btn-outline-light {
    --bs-btn-border-color: rgba(255,255,255,.25);
}

.form-control, .form-select {
    background: #11141b;
    border-color: rgba(255,255,255,.14);
    color: var(--text);
}

.form-control:focus, .form-select:focus {
    background: #11141b;
    border-color: var(--brand-2);
    color: var(--text);
    box-shadow: 0 0 0 .18rem rgba(255, 157, 46, .18);
}

.form-control::placeholder { color: #757d8c; }

.hero {
    min-height: 88vh;
    display: flex;
    align-items: center;
    background:
        linear-gradient(90deg, rgba(13,15,20,.94), rgba(13,15,20,.58)),
        url('../img/gym-hero.png') center/cover;
}

.hero h1 {
    font-size: clamp(2.35rem, 6vw, 5.4rem);
    line-height: .95;
    letter-spacing: 0;
}

.section-pad { padding: 76px 0; }
.stat-card { min-height: 132px; position: relative; overflow: hidden; }
.stat-card::after {
    content: "";
    position: absolute;
    right: -24px;
    bottom: -34px;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(255, 61, 46, .11);
}
.metric { font-size: 2rem; font-weight: 800; }

.app-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}

.app-sidebar {
    border-right: 1px solid var(--line);
    padding: 20px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.app-main { padding: 24px; min-width: 0; }
.mobile-appbar, .mobile-bottom-nav { display: none; }
.appbar-brand {
    font-weight: 800;
    line-height: 1;
}
.appbar-brand span { color: var(--brand-2); }
.appbar-icon {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    color: #fff;
    text-decoration: none;
}
.side-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    margin-bottom: 5px;
}
.side-link:hover, .side-link.active {
    background: rgba(255, 61, 46, .14);
    color: #fff;
}

.avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    background: #2b303c;
}

.student-photo {
    width: 104px;
    height: 104px;
    border-radius: 8px;
    object-fit: cover;
    background: #2b303c;
}

.gallery-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
}

.qr-img {
    max-width: 240px;
    width: 100%;
    border-radius: 8px;
    background: #fff;
    padding: 10px;
}

.badge-soft {
    background: rgba(255,157,46,.16);
    color: #ffd19a;
}

.dashboard-hero {
    min-height: 210px;
    border-radius: 8px;
    border: 1px solid var(--line);
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(14,16,22,.96), rgba(14,16,22,.66)),
        url('../img/gym-hero.png') center/cover;
}

.dashboard-hero .hero-copy {
    max-width: 680px;
    padding: 28px;
}

.stat-icon {
    width: 46px;
    height: 46px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255,61,46,.28), rgba(255,157,46,.18));
    color: #fff;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    text-decoration: none;
    background: rgba(255,255,255,.03);
}

.quick-action i {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 61, 46, .15);
    color: var(--brand-2);
}

.quick-action:hover {
    border-color: rgba(255,157,46,.45);
    background: rgba(255,157,46,.08);
}

.activity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.activity-item:last-child { border-bottom: 0; }
.activity-name { font-weight: 700; }

.student-app-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(255,61,46,.12), transparent 34%),
        var(--bg);
}

.student-main {
    max-width: 980px;
    margin: 0 auto;
    padding: 22px 16px 96px;
}

.student-hero {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
    background:
        linear-gradient(135deg, rgba(255,61,46,.22), rgba(255,157,46,.08)),
        var(--panel);
}

.student-avatar-xl {
    width: 92px;
    height: 92px;
    border-radius: 22px;
    object-fit: cover;
    background: #2b303c;
}

.diet-tile {
    border-radius: 8px;
    padding: 16px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--line);
}

.diet-tile h2 {
    font-size: .95rem;
    color: var(--brand-2);
    font-weight: 800;
}

.diet-tile p { color: var(--muted); margin-bottom: 0; }

.exercise-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: rgba(255,255,255,.04);
}

.exercise-card img,
.exercise-card video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.exercise-card h3 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.exercise-card p {
    color: var(--muted);
    margin-bottom: 0;
}

.exercise-demo {
    min-height: 128px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    gap: 4px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, rgba(255,61,46,.20), rgba(255,157,46,.08));
    color: var(--brand-2);
    text-align: center;
}

.exercise-demo i { font-size: 2rem; }
.exercise-demo span { display: block; font-size: .8rem; color: var(--muted); }

.workout-step {
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
}

.workout-step:last-child { border-bottom: 0; }

.table { vertical-align: middle; }
.receipt {
    max-width: 760px;
    margin: 0 auto;
    background: #fff;
    color: #111;
    border-radius: 8px;
    padding: 28px;
}

.public-navbar {
    background: rgba(13, 15, 20, .82) !important;
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.public-navbar .navbar-nav {
    gap: 12px !important;
}

.public-navbar .nav-link,
.public-navbar .btn,
.premium-hero .btn,
.slide-card .btn,
#free-trial .btn,
.pricing-card .btn,
.trainer-card .btn,
.referral-band .btn,
.cta-inner .btn,
.trial-page .btn-brand,
.trial-dashboard .btn-brand {
    position: relative;
    isolation: isolate;
    overflow: visible;
    border-radius: 999px !important;
    padding-left: 1.35rem;
    padding-right: 1.35rem;
}

.public-navbar .nav-link::before,
.public-navbar .nav-link::after,
.public-navbar .btn::before,
.public-navbar .btn::after,
.premium-hero .btn::before,
.premium-hero .btn::after,
.slide-card .btn::before,
.slide-card .btn::after,
#free-trial .btn::before,
#free-trial .btn::after,
.pricing-card .btn::before,
.pricing-card .btn::after,
.trainer-card .btn::before,
.trainer-card .btn::after,
.referral-band .btn::before,
.referral-band .btn::after,
.cta-inner .btn::before,
.cta-inner .btn::after,
.trial-page .btn-brand::before,
.trial-page .btn-brand::after,
.trial-dashboard .btn-brand::before,
.trial-dashboard .btn-brand::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 12px;
    height: 26px;
    border-radius: 4px;
    transform: translateY(-50%);
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255,255,255,.18), transparent 34%),
        linear-gradient(135deg, #ff3d2e, #ff9d2e);
    box-shadow:
        0 0 0 1px rgba(255,255,255,.16) inset,
        0 0 0 4px rgba(255,61,46,.22),
        0 10px 22px rgba(0,0,0,.26);
}

.public-navbar .nav-link::before,
.public-navbar .btn::before,
.premium-hero .btn::before,
.slide-card .btn::before,
#free-trial .btn::before,
.pricing-card .btn::before,
.trainer-card .btn::before,
.referral-band .btn::before,
.cta-inner .btn::before,
.trial-page .btn-brand::before,
.trial-dashboard .btn-brand::before {
    left: -7px;
}

.public-navbar .nav-link::after,
.public-navbar .btn::after,
.premium-hero .btn::after,
.slide-card .btn::after,
#free-trial .btn::after,
.pricing-card .btn::after,
.trainer-card .btn::after,
.referral-band .btn::after,
.cta-inner .btn::after,
.trial-page .btn-brand::after,
.trial-dashboard .btn-brand::after {
    right: -7px;
}

.public-navbar .nav-link {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    color: #d8dde8;
    border: 1px solid rgba(255,255,255,.13);
    background:
        linear-gradient(90deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
    font-size: .9rem;
    line-height: 1;
}

.public-navbar .nav-link:hover,
.public-navbar .nav-link:focus {
    color: #fff;
    border-color: rgba(255,157,46,.45);
    background: linear-gradient(90deg, rgba(255,61,46,.18), rgba(255,157,46,.10));
}

.public-navbar .btn-sm {
    min-height: 34px;
    padding: .42rem 1.1rem;
}

.btn-outline-light::before,
.btn-outline-light::after,
.btn-glass::before,
.btn-glass::after {
    background:
        linear-gradient(90deg, rgba(255,255,255,.22), transparent 38%),
        linear-gradient(135deg, rgba(255,255,255,.24), rgba(255,157,46,.18)) !important;
    box-shadow:
        0 0 0 1px rgba(255,255,255,.24) inset,
        0 0 0 4px rgba(255,255,255,.08),
        0 10px 22px rgba(0,0,0,.28) !important;
}

.btn-brand:hover::before,
.btn-brand:hover::after,
.public-navbar .nav-link:hover::before,
.public-navbar .nav-link:hover::after {
    box-shadow:
        0 0 0 1px rgba(255,255,255,.22) inset,
        0 0 0 5px rgba(255,157,46,.24),
        0 12px 26px rgba(255,61,46,.28);
}

.premium-hero {
    --hero-image: url('../img/gym-hero.png');
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(9,11,15,.96), rgba(9,11,15,.62) 48%, rgba(9,11,15,.26)),
        var(--hero-image) center/cover;
}

.premium-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 180px;
    background: linear-gradient(0deg, var(--bg), transparent);
}

.premium-hero h1 {
    font-size: clamp(2.8rem, 8vw, 6.4rem);
    line-height: .92;
    font-weight: 900;
    max-width: 900px;
}

.hero-lead {
    max-width: 760px;
    font-size: clamp(1.05rem, 2vw, 1.32rem);
    color: #c6ccd8;
}

.btn-glass {
    color: #fff;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(14px);
}

.btn-glass:hover {
    color: #fff;
    border-color: rgba(255,157,46,.48);
    background: rgba(255,157,46,.14);
}

.pulse-btn {
    box-shadow: 0 0 0 0 rgba(255, 61, 46, .42);
    animation: pulseButton 2s infinite;
}

@keyframes pulseButton {
    70% { box-shadow: 0 0 0 18px rgba(255, 61, 46, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 61, 46, 0); }
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.hero-stats div, .glass-card {
    border: 1px solid rgba(255,255,255,.12);
    background: linear-gradient(145deg, rgba(255,255,255,.10), rgba(255,255,255,.035));
    box-shadow: 0 24px 80px rgba(0,0,0,.32);
    backdrop-filter: blur(18px);
    border-radius: 8px;
}

.hero-stats div {
    min-width: 148px;
    padding: 16px;
}

.hero-stats strong {
    display: block;
    font-size: 1.8rem;
    line-height: 1;
}

.hero-stats span, .transformation-panel span {
    display: block;
    color: var(--muted);
    font-size: .88rem;
}

.hero-orbit {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-orbit i {
    position: absolute;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: var(--brand-2);
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.1);
    animation: floatIcon 6s ease-in-out infinite;
}

.hero-orbit i:nth-child(1) { top: 20%; right: 22%; }
.hero-orbit i:nth-child(2) { top: 56%; right: 12%; animation-delay: -1.5s; }
.hero-orbit i:nth-child(3) { top: 74%; left: 7%; animation-delay: -3s; }

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-18px); }
}

.transformation-panel {
    padding: 28px;
    margin-left: auto;
    max-width: 420px;
}

.transformation-panel h2 {
    font-size: 1.35rem;
    line-height: 1.3;
    margin: 10px 0 18px;
}

.mini-progress, .referral-progress {
    height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    overflow: hidden;
}

.mini-progress div, .referral-progress .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.slider-section {
    padding: 24px 0 64px;
    background: linear-gradient(180deg, #0d0f14, #12151d);
}

.slide-card {
    min-height: 360px;
    display: flex;
    align-items: center;
    border-radius: 8px;
    padding: clamp(24px, 5vw, 58px);
    background:
        linear-gradient(90deg, rgba(11,13,18,.92), rgba(11,13,18,.45)),
        url('../img/gym-hero.png') center/cover;
    overflow: hidden;
}

.slide-card h2 {
    max-width: 720px;
    font-size: clamp(2rem, 5vw, 4.2rem);
    font-weight: 900;
}

.slide-card p { max-width: 560px; color: #c6ccd8; font-size: 1.1rem; }

.section-dark { background: #090b10; }
.section-title, .section-head h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1;
    font-weight: 900;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 34px;
}

.section-head p { color: var(--muted); max-width: 520px; margin: 0; }

.fitness-chip {
    min-height: 118px;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 8px;
    border-radius: 8px;
    background: rgba(255,255,255,.045);
    border: 1px solid var(--line);
}

.fitness-chip i {
    font-size: 2rem;
    color: var(--brand-2);
}

.pricing-card, .trainer-card, .program-card {
    height: 100%;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.025));
    padding: 24px;
    transition: transform .24s ease, border-color .24s ease, background .24s ease;
}

.pricing-card:hover, .trainer-card:hover, .program-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255,157,46,.55);
    background: linear-gradient(145deg, rgba(255,61,46,.14), rgba(255,255,255,.035));
}

.pricing-card.recommended {
    border-color: rgba(255,157,46,.68);
    box-shadow: 0 0 0 1px rgba(255,157,46,.16), 0 26px 80px rgba(255,61,46,.12);
}

.plan-badge {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,157,46,.16);
    color: #ffd19a;
    font-weight: 700;
    font-size: .78rem;
}

.pricing-card h3, .program-card h3, .trainer-card h3 { font-weight: 850; }
.plan-price { font-size: 2.5rem; font-weight: 900; margin: 18px 0 6px; }
.pricing-card ul {
    padding: 0;
    margin: 22px 0;
    list-style: none;
    color: #c6ccd8;
}
.pricing-card li { margin-bottom: 10px; }
.pricing-card li i { color: var(--brand-2); margin-right: 6px; }

.program-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.program-card i {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: rgba(255,61,46,.16);
    color: var(--brand-2);
    font-size: 1.45rem;
    margin-bottom: 18px;
}

.program-card p { color: var(--muted); margin: 0; }

.trainer-card {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.trainer-card img {
    width: 92px;
    height: 112px;
    object-fit: cover;
    border-radius: 8px;
    background: #242936;
}

.trainer-card p, .trainer-card small { color: var(--muted); }
.trainer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
    color: #ffd19a;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.calc-grid div {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: rgba(255,255,255,.04);
}

.calc-grid strong { display: block; font-size: 1.45rem; }
.calc-grid span { color: var(--muted); font-size: .86rem; }

.referral-band, .cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-radius: 8px;
    padding: clamp(26px, 5vw, 56px);
    background:
        linear-gradient(135deg, rgba(255,61,46,.32), rgba(255,157,46,.13)),
        rgba(255,255,255,.04);
    border: 1px solid rgba(255,157,46,.24);
}

.referral-band h2, .cta-inner h2 { font-size: clamp(2rem, 5vw, 4.5rem); font-weight: 900; line-height: 1; }
.referral-band p { color: #d5d9e2; max-width: 700px; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.gallery-tile {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.gallery-tile img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform .35s ease;
}

.gallery-tile span {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(0,0,0,.54);
    backdrop-filter: blur(10px);
    font-weight: 700;
}

.gallery-tile:hover img { transform: scale(1.06); }

.premium-accordion .accordion-item {
    color: #fff;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--line);
}

.premium-accordion .accordion-button {
    color: #fff;
    background: transparent;
    font-weight: 750;
}

.premium-accordion .accordion-button:not(.collapsed) {
    color: #fff;
    background: rgba(255,61,46,.12);
}

.cta-final {
    padding: 40px 0 70px;
    background: #090b10;
}

.cta-inner {
    text-align: center;
    flex-direction: column;
}

.public-footer {
    padding: 30px 0;
    border-top: 1px solid var(--line);
    background: #080a0e;
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: none;
}

.trial-page {
    min-height: calc(100vh - 68px);
    padding: 56px 0;
    background:
        radial-gradient(circle at top right, rgba(255,61,46,.2), transparent 34%),
        radial-gradient(circle at bottom left, rgba(255,157,46,.12), transparent 34%),
        var(--bg);
}

.trial-copy {
    position: sticky;
    top: 96px;
}

.trial-copy h1 {
    font-size: clamp(2.4rem, 6vw, 5rem);
    line-height: .95;
    font-weight: 900;
}

.ref-preview, .reward-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 22px;
    padding: 18px;
    border: 1px solid rgba(255,157,46,.28);
    border-radius: 8px;
    background: rgba(255,157,46,.08);
}

.trial-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    background: rgba(13,15,20,.9);
    backdrop-filter: blur(16px);
}

.trial-dashboard {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 16px 90px;
}

.qr-ref {
    width: 180px;
    height: 180px;
    border-radius: 8px;
    background: #fff;
    padding: 10px;
}

.install-sheet {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: end center;
    padding: 18px;
    background: rgba(0,0,0,.44);
}

.install-sheet[hidden] { display: none; }

.install-card {
    position: relative;
    width: min(100%, 480px);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    padding: 24px;
    background: rgba(17,20,27,.96);
    box-shadow: 0 24px 90px rgba(0,0,0,.54);
}

.install-logo {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    font-weight: 900;
}

.install-close, .ai-chat-close {
    border: 0;
    background: transparent;
    color: #fff;
}

.install-close {
    position: absolute;
    top: 12px;
    right: 12px;
}

.iphone-guide {
    padding: 12px;
    border-radius: 8px;
    color: var(--muted);
    background: rgba(255,255,255,.05);
}

.install-steps {
    margin: 0;
    padding-left: 1.2rem;
    color: #c6ccd8;
}

.install-steps li {
    margin-bottom: 10px;
}

.ai-chat {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1990;
}

.ai-chat-toggle {
    width: 62px;
    height: 62px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 18px 48px rgba(255,61,46,.34);
    font-size: 1.5rem;
}

.ai-chat-panel {
    position: absolute;
    right: 0;
    bottom: 76px;
    width: min(360px, calc(100vw - 30px));
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 8px;
    background: #11141b;
    box-shadow: 0 24px 90px rgba(0,0,0,.55);
}

.ai-chat-panel[hidden] { display: none; }
.ai-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    background: rgba(255,61,46,.16);
}

.ai-chat-head small { display: block; color: var(--muted); }
.ai-chat-body {
    height: 300px;
    overflow-y: auto;
    padding: 14px;
}

.ai-msg {
    max-width: 88%;
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    color: #fff;
    background: rgba(255,255,255,.07);
}

.ai-msg-user {
    margin-left: auto;
    background: linear-gradient(135deg, rgba(255,61,46,.88), rgba(255,157,46,.72));
}

.ai-suggestions {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0 12px 12px;
}

.ai-suggestions button {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: transparent;
    padding: 7px 10px;
    font-size: .78rem;
}

.ai-chat-form {
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--line);
}

.ai-chat-form input {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    color: #fff;
    background: #0d0f14;
}

.ai-chat-form button {
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: rgba(255,61,46,.9);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

@media (max-width: 991.98px) {
    body { padding-bottom: 86px; }
    .app-shell {
        display: block;
        min-height: 100vh;
    }
    .app-sidebar { display: none; }
    .mobile-appbar {
        position: sticky;
        top: 0;
        z-index: 1030;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 16px;
        background: rgba(13, 15, 20, .94);
        border-bottom: 1px solid var(--line);
        backdrop-filter: blur(16px);
    }
    .mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1040;
        display: flex;
        gap: 6px;
        padding: 8px 10px 10px;
        overflow-x: auto;
        background: rgba(13, 15, 20, .96);
        border-top: 1px solid var(--line);
        box-shadow: 0 -12px 40px rgba(0,0,0,.45);
        scrollbar-width: none;
    }
    .mobile-bottom-nav::-webkit-scrollbar { display: none; }
    .mobile-bottom-nav a {
        flex: 0 0 74px;
        min-height: 58px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: var(--muted);
        text-decoration: none;
        border-radius: 8px;
        font-size: .72rem;
        line-height: 1.1;
    }
    .student-main { padding: 16px 14px 94px; }
    .student-hero { padding: 18px; }
    .student-avatar-xl { width: 76px; height: 76px; border-radius: 18px; }
    .mobile-bottom-nav a i { font-size: 1.22rem; }
    .mobile-bottom-nav a.active {
        color: #fff;
        background: linear-gradient(135deg, rgba(255,61,46,.32), rgba(255,157,46,.16));
    }
    .app-main { padding: 16px; }
    .app-main > .d-flex.no-print { display: none !important; }
    .dashboard-hero .hero-copy { padding: 20px; }
    .dashboard-hero { min-height: 240px; }
    .stat-card { min-height: 118px; }
    .metric { font-size: 1.55rem; }
    .hero { min-height: 78vh; }
    .premium-hero { min-height: auto; padding: 76px 0 92px; }
    .public-navbar .navbar-nav {
        align-items: stretch !important;
        gap: 10px !important;
        padding: 12px 0 4px;
    }
    .public-navbar .nav-link,
    .public-navbar .btn {
        justify-content: center;
        width: 100%;
        min-height: 42px;
    }
    .section-head, .referral-band { align-items: flex-start; flex-direction: column; }
    .program-grid, .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .calc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .trainer-card { flex-direction: column; }
    .trainer-card img { width: 100%; height: 220px; }
    .trial-copy { position: static; }
    .ai-chat { right: 12px; bottom: 88px; }
}

@media (max-width: 575.98px) {
    .premium-hero h1 { font-size: 3rem; }
    .premium-hero .btn,
    .cta-inner .btn,
    #free-trial .btn {
        width: 100%;
        justify-content: center;
    }
    .hero-stats { display: grid; grid-template-columns: 1fr; }
    .slide-card { min-height: 300px; }
    .program-grid, .gallery-grid, .calc-grid { grid-template-columns: 1fr; }
    .install-sheet { place-items: end center; padding: 10px; }
    .ai-chat.open .ai-chat-panel {
        position: fixed;
        inset: 8px;
        width: auto;
        height: auto;
        display: grid;
        grid-template-rows: auto 1fr auto auto;
    }
    .ai-chat.open .ai-chat-body { height: auto; }
}

@media print {
    body { background: #fff; color: #111; }
    .no-print, .app-sidebar, .navbar { display: none !important; }
    .app-shell { display: block; }
    .app-main { padding: 0; }
    .receipt, .app-card { box-shadow: none; border: 0; }
}

/* Shared mobile navigation: four shortcuts and a complete slide-out menu. */
.mobile-menu-drawer { width: min(88vw, 360px) !important; background: #11151d; color: #f7f7f8; border-right: 1px solid var(--line); }
.mobile-menu-drawer .offcanvas-header { padding: 22px 20px; border-bottom: 1px solid var(--line); }
.mobile-menu-drawer .offcanvas-body { padding: 18px 16px; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.mobile-menu-links { display: grid; gap: 8px; }
.mobile-menu-links a { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 1px solid transparent; color: #c4cbd6; text-decoration: none; }
.mobile-menu-links a > i:first-child { font-size: 1.15rem; width: 24px; text-align: center; }
.mobile-menu-links a:hover, .mobile-menu-links a.active { color: #fff; background: rgba(255,61,46,.13); border-color: rgba(255,61,46,.3); }
.mobile-menu-links .mobile-menu-logout { color: #ff8e85; border-top: 1px solid var(--line); margin-top: 12px; }
.mobile-menu-trigger { border: 0; background: transparent; color: inherit; }
.mobile-menu-trigger:focus-visible, .mobile-menu-links a:focus-visible, .mobile-bottom-nav a:focus-visible { outline: 2px solid #ff9d2e; outline-offset: -2px; }
@media (max-width: 991.98px) {
    body { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
    .mobile-appbar { padding-top: max(12px, env(safe-area-inset-top)); }
    .mobile-appbar .appbar-icon { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
    .mobile-bottom-nav.mobile-nav-five { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; overflow: visible; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
    .mobile-nav-five a, .mobile-nav-five .mobile-menu-trigger { min-width: 0; min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; font-size: .68rem; line-height: 1.2; border-radius: 12px; text-align: center; color: var(--muted); padding: 6px 2px; }
    .mobile-nav-five i { font-size: 1.24rem; }
    .mobile-nav-five .active { color: #fff; background: linear-gradient(135deg, rgba(255,61,46,.32), rgba(255,157,46,.16)); }
    .app-main > .d-flex.no-print:not(.alert) { display: none !important; }
    .app-main > .alert.d-flex.no-print { display: flex !important; }
    .app-main, .student-main, .app-shell { min-width: 0; }
    .table-responsive { max-width: 100%; }
    .offcanvas-backdrop { z-index: 1045; }
    .mobile-menu-drawer { z-index: 1055; }
    .public-navbar .navbar-brand { font-size: 1.15rem; }
    .public-navbar .navbar-toggler { min-width: 44px; min-height: 44px; }
}
@media (min-width: 992px) {
    .student-app-shell .student-only { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--line); }
    .student-only .mobile-menu-trigger { display: none; }
    .student-tabs.mobile-nav-five { display: flex; justify-content: center; gap: 10px; padding: 12px; }
    .student-tabs.mobile-nav-five a { padding: 10px 20px; text-decoration: none; color: var(--muted); }
    .student-tabs.mobile-nav-five .mobile-menu-trigger { display: flex; align-items: center; gap: 8px; padding: 10px 20px; }
}

body:has(.mobile-menu-drawer.show) .ai-chat, body:has(.mobile-menu-drawer.showing) .ai-chat { visibility: hidden; pointer-events: none; }
.mobile-menu-drawer .offcanvas-body { scrollbar-width: thin; scrollbar-color: #414957 #11151d; }
