/* Stay Basic Basketball - marketing pages (pages app) */

:root {
    --color-primary: #E8541E;
    --color-primary-dark: #C43F10;
    --color-dark: #12172B;
    --color-dark-2: #1D2440;
    --color-light: #F6F7FB;
    --color-white: #FFFFFF;
    --color-gray: #5B6270;
    --color-gray-light: #8A8FA0;
    --color-border: #E4E6EE;
    --shadow-sm: 0 1px 3px rgba(18, 23, 43, 0.08);
    --shadow-md: 0 8px 24px rgba(18, 23, 43, 0.12);
    --radius: 12px;
    --max-width: 1180px;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-dark);
    background: var(--color-white);
    line-height: 1.55;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

.section-light {
    background: var(--color-light);
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 48px;
}

.eyebrow {
    display: inline-block;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.section-header h2 {
    font-size: 2rem;
    margin: 0 0 12px;
}

.section-header p {
    color: var(--color-gray);
    margin: 0;
}

.btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
}

.btn-outline {
    background: transparent;
    border-color: var(--color-white);
    color: var(--color-white);
}

.btn-outline:hover {
    background: var(--color-white);
    color: var(--color-dark);
}

.btn-dark {
    background: var(--color-dark);
    color: var(--color-white);
}

.btn-dark:hover {
    background: var(--color-dark-2);
}

.btn-small {
    padding: 9px 20px;
    font-size: 0.85rem;
}

/* ---------- Navbar ---------- */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--color-border);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.05rem;
}

.navbar-brand img {
    height: 44px;
    width: 44px;
    object-fit: contain;
    border-radius: 8px;
}

.navbar-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.navbar-links a {
    font-weight: 600;
    color: var(--color-dark-2);
}

.navbar-links a:hover {
    color: var(--color-primary);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-actions .btn-ghost {
    padding: 10px 18px;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 999px;
    color: var(--color-dark-2);
}

.navbar-actions .btn-ghost:hover {
    color: var(--color-primary);
}

.navbar-toggle {
    display: none;
}

/* ---------- Messages ---------- */

.messages {
    max-width: var(--max-width);
    margin: 16px auto 0;
    padding: 0 24px;
}

.messages li {
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 10px;
    background: var(--color-light);
    border-left: 4px solid var(--color-primary);
    font-size: 0.9rem;
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: var(--color-white);
    background: var(--color-dark);
}

.hero-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(18, 23, 43, 0.75) 0%, rgba(18, 23, 43, 0.55) 45%, rgba(18, 23, 43, 0.92) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 640px;
    padding: 100px 0;
}

.hero-content .eyebrow {
    color: var(--color-primary);
}

.hero-content h1 {
    font-size: 3.1rem;
    line-height: 1.1;
    margin: 0 0 20px;
}

.hero-content p {
    font-size: 1.15rem;
    color: #E4E6F0;
    margin: 0 0 32px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ---------- Program cards ---------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.program-card,
.coach-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.program-card:hover,
.coach-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.program-card-image,
.coach-card-image {
    height: 220px;
    overflow: hidden;
}

.program-card-image img,
.coach-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}

/* Per-photo crop tuning so heads/upper bodies stay in frame (portrait
   photos cropped into a landscape card slot default to a center crop,
   which cuts off the top of the head). Selectors are scoped under
   .program-card-image img so they win over the base rule above. */
.program-card-image img.crop-player1 { object-position: center 2%; }
.program-card-image img.crop-player2 { object-position: center 8%; }
.program-card-image img.crop-player3 { object-position: center 18%; }
.program-card-image img.crop-player4 { object-position: center 4%; }

.program-card-body,
.coach-card-body {
    padding: 22px;
}

.program-card-body h3,
.coach-card-body h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.program-card-body p,
.coach-card-body p {
    margin: 0;
    color: var(--color-gray);
    font-size: 0.92rem;
}

.program-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 10px;
}
.flip-card-front .program-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.flip-card-front .program-card-body p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.coach-specialty {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.placeholder-note {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.76rem;
    font-style: italic;
    color: var(--color-gray-light);
}

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

/* ---------- Flip cards (Featured Training Programs) ---------- */

.flip-card {
    perspective: 1400px;
    cursor: pointer;
    outline: none;
    height: 440px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front {
    position: absolute;
    inset: 0;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.flip-card:hover .flip-card-front,
.flip-card:focus-visible .flip-card-front {
    box-shadow: var(--shadow-md);
}

.flip-card:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
    border-radius: var(--radius);
}

.flip-card-back {
    position: absolute;
    inset: 0;
    background: var(--color-dark);
    color: var(--color-white);
    border-radius: var(--radius);
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: rotateY(180deg);
    box-shadow: var(--shadow-md);
}

.flip-card-back h3 {
    margin: 0 0 14px;
    font-size: 1.1rem;
    color: var(--color-white);
}

.flip-card-back ul {
    margin: 0 0 14px;
}

.flip-card-back li {
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: #D7D9E6;
}

.flip-card-back li strong {
    color: var(--color-white);
}

.flip-card-back .flip-note {
    font-size: 0.76rem;
    color: var(--color-gray-light);
    font-style: italic;
    margin: 0;
}

.flip-hint {
    display: block;
    padding: 0 22px 20px;
    margin-top: -8px;
    font-size: 0.78rem;
    color: var(--color-primary);
    font-weight: 700;
}

/* ---------- Why choose us ---------- */

.benefit-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.benefit-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 28px 22px;
    text-align: center;
}

.benefit-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: rgba(232, 84, 30, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.benefit-card h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.benefit-card p {
    margin: 0;
    color: var(--color-gray);
    font-size: 0.9rem;
}

.benefit-card.featured {
    padding: 0;
    overflow: hidden;
    text-align: left;
}

.benefit-card.featured .benefit-photo {
    height: 160px;
}

.benefit-card.featured .benefit-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.benefit-card.featured .benefit-card-text {
    padding: 22px;
}

.benefit-card.featured .benefit-icon {
    display: none;
}

/* ---------- About ---------- */

.about-section {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 56px;
    align-items: center;
}

.about-media {
    position: relative;
}

.about-media img.about-photo-main {
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.about-media img.about-photo-inset {
    position: absolute;
    width: 42%;
    border: 5px solid var(--color-white);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    bottom: -28px;
    right: -28px;
    height: 150px;
    object-fit: cover;
}

.about-text h2 {
    font-size: 2rem;
    margin: 0 0 18px;
}

.about-text p {
    color: var(--color-gray);
    margin: 0 0 16px;
}

.about-stats {
    display: flex;
    gap: 36px;
    margin: 28px 0 30px;
}

.about-stats div strong {
    display: block;
    font-size: 1.6rem;
    color: var(--color-primary);
}

.about-stats div span {
    font-size: 0.85rem;
    color: var(--color-gray);
}

/* ---------- FAQ ---------- */

.faq-list {
    max-width: 760px;
    margin: 0 auto;
}

.faq-item {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    margin-bottom: 14px;
    overflow: hidden;
}

.faq-item summary {
    cursor: pointer;
    padding: 18px 22px;
    font-weight: 700;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    font-size: 1.3rem;
    color: var(--color-primary);
    font-weight: 400;
    margin-left: 12px;
    flex-shrink: 0;
}

.faq-item[open] summary::after {
    content: "\2212";
}

.faq-item p {
    margin: 0;
    padding: 0 22px 20px;
    color: var(--color-gray);
}

.faq-cta {
    text-align: center;
    margin-top: 32px;
}

/* ---------- Final CTA ---------- */

.final-cta {
    position: relative;
    padding: 100px 0;
    text-align: center;
    color: var(--color-white);
    background: var(--color-dark);
    overflow: hidden;
}

.final-cta-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
}

.final-cta-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(18, 23, 43, 0.92), rgba(196, 63, 16, 0.55));
}

.final-cta-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
}

.final-cta-content h2 {
    font-size: 2.2rem;
    margin: 0 0 14px;
}

.final-cta-content p {
    color: #E4E6F0;
    margin: 0 0 32px;
}

/* ---------- Footer ---------- */

.footer {
    background: var(--color-dark);
    color: #C7CAD9;
    padding: 60px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-white);
    font-weight: 800;
    margin-bottom: 12px;
}

.footer-brand img {
    height: 38px;
    width: 38px;
    border-radius: 6px;
    object-fit: contain;
}

.footer p {
    font-size: 0.88rem;
    color: #9DA1B5;
}

.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #C7CAD9;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}

.social-icon:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.footer h4 {
    color: var(--color-white);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 16px;
}

.footer ul li {
    margin-bottom: 10px;
}

.footer ul li a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 22px;
    text-align: center;
    font-size: 0.82rem;
    color: #7D8199;
}

/* ---------- Page header (Programs / FAQ full pages) ---------- */

.page-header {
    background: var(--color-dark);
    color: var(--color-white);
    padding: 70px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.4rem;
    margin: 0 0 12px;
}

.page-header p {
    color: #C7CAD9;
    max-width: 560px;
    margin: 0 auto;
}

/* ---------- Logged-in dashboards ---------- */

.navbar-user {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-dark-2);
    margin-right: 4px;
}

.dashboard-page {
    background: var(--color-light);
    min-height: 100vh;
}

.dashboard-header {
    padding: 44px 0 12px;
}

.dashboard-header h1 {
    font-size: 1.7rem;
    margin: 0 0 6px;
}

.dashboard-header p {
    color: var(--color-gray);
    margin: 0;
    font-size: 0.95rem;
}

.dashboard-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #FFF4E1;
    border: 1px solid #F0C070;
    color: #7A4E00;
    border-radius: var(--radius);
    padding: 14px 18px;
    margin: 20px 0 0;
    font-size: 0.9rem;
}

.dashboard-alert-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.dashboard-alert a {
    color: var(--color-primary-dark);
    font-weight: 700;
    text-decoration: underline;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    padding: 28px 0 64px;
}

.dashboard-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.dashboard-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(232, 84, 30, 0.1);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.dashboard-card h3 {
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-card p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--color-gray);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

@media (max-width: 720px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Sidebar layout (logged-in Customer pages) ---------- */

.dashboard-shell {
    display: flex;
    align-items: stretch;
    min-height: 100vh;
    background: var(--color-light);
}

.sidebar {
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border-right: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--color-dark);
    border-bottom: 1px solid var(--color-border);
}

.sidebar-logo img {
    height: 34px;
    width: 34px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-nav {
    flex: 1;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--color-gray);
}

.sidebar-link:hover {
    background: var(--color-light);
    color: var(--color-dark);
}

.sidebar-link.active {
    background: rgba(232, 84, 30, 0.1);
    color: var(--color-primary);
}

.sidebar-icon {
    font-size: 1.05rem;
    width: 22px;
    flex-shrink: 0;
    display: inline-flex;
    justify-content: center;
}

.sidebar-link .badge {
    margin-left: auto;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--color-border);
}

.sidebar-user {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--color-dark-2);
    margin-bottom: 8px;
}

.sidebar-logout {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-gray);
}

.sidebar-logout:hover {
    color: var(--color-primary);
}

.dashboard-main {
    flex: 1;
    min-width: 0;
}

.dashboard-main .messages {
    max-width: none;
    margin: 20px 0 0;
    padding: 0;
}

.dashboard-tip {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-top: 20px;
    box-shadow: var(--shadow-sm);
}

.dashboard-tip-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.dashboard-tip strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.88rem;
}

.dashboard-tip p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-gray);
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-dark);
    padding: 4px 8px;
    margin-right: 10px;
}

.sidebar-overlay {
    display: none;
}

.sidebar-overlay.active {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;
}
html.sidebar-locked,
body.sidebar-locked {
    overflow: hidden;
    height: 100%;
    overscroll-behavior: none;
}

@media (max-width: 900px) {
    .dashboard-shell {
        flex-direction: column;
    }

    .topbar {
        justify-content: space-between !important;
    }
    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
	bottom: 0;
        width: 260px;
        max-width: 80vw;
	overflow-y: auto;
   	-webkit-overflow-scrolling: touch;
   	overscroll-behavior: contain;
        flex-direction: column;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 1000;
    }
    .sidebar.sidebar-open {
        transform: translateX(0);
    }

    .sidebar-logo span {
        display: inline;
    }

    .sidebar-nav {
        flex-direction: column;
        flex-wrap: nowrap;
        min-height: 0;
        gap: 2px;
        padding: 14px 12px;
    }

    .sidebar-link {
        flex-shrink: initial;
        white-space: normal;
    }

    .sidebar-footer {
        border-top: 1px solid var(--color-border);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 16px 20px;
    }

    .sidebar-user {
        margin-bottom: 0;
    }
}
/* ---------- Health profile page ---------- */

.health-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 24px;
}

.health-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.health-card h3 {
    margin: 0 0 16px;
    font-size: 1rem;
}

.bmi-gauge-wrap {
    text-align: center;
}

.bmi-value {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--color-dark);
    line-height: 1;
}

.bmi-category {
    display: inline-block;
    margin: 6px 0 20px;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.bmi-category-underweight {
    background: rgba(74, 144, 217, 0.12);
    color: #2E6DA4;
}

.bmi-category-normal-weight {
    background: rgba(30, 158, 90, 0.12);
    color: #1E9E5A;
}

.bmi-category-overweight {
    background: rgba(232, 84, 30, 0.12);
    color: var(--color-primary);
}

.bmi-category-obese {
    background: rgba(214, 69, 69, 0.12);
    color: #D64545;
}

.bmi-gauge {
    position: relative;
    display: flex;
    height: 10px;
    border-radius: 999px;
    margin: 0 4px;
}

.bmi-segment {
    height: 100%;
}

.bmi-segment:first-child {
    border-radius: 999px 0 0 999px;
}

.bmi-segment:last-child {
    border-radius: 0 999px 999px 0;
}

.bmi-segment-under {
    width: 14%;
    background: #4A90D9;
}

.bmi-segment-normal {
    width: 26%;
    background: #1E9E5A;
}

.bmi-segment-over {
    width: 20%;
    background: var(--color-primary);
}

.bmi-segment-obese {
    width: 40%;
    background: #D64545;
}

.bmi-marker {
    position: absolute;
    top: 50%;
    left: clamp(1%, calc(var(--bmi-pos) * 1%), 99%);
    width: 16px;
    height: 16px;
    background: var(--color-white);
    border: 3px solid var(--color-dark);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: var(--shadow-sm);
}

.bmi-gauge-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.66rem;
    color: var(--color-gray-light);
    font-weight: 600;
}

.bmi-recommendation {
    margin: 20px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    font-size: 0.85rem;
    color: var(--color-gray);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.stat-grid--five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.health-card .stat-grid--five .stat-tile {
    padding: 14px 4px;
}

.health-card .stat-grid--five .stat-value {
    font-size: 0.95rem;
}

.stat-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: var(--color-light);
    border-radius: 10px;
    padding: 14px 8px;
    text-align: center;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-dark);
}

.stat-label {
    font-size: 0.68rem;
    color: var(--color-gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ai-focus-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}

.ai-focus-row p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--color-dark-2);
    font-weight: 600;
}

.dashboard-header-tight {
    padding: 32px 0 4px;
}

.dashboard-header-tight h2 {
    font-size: 1.3rem;
    margin: 0;
}

.workout-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 16px;
}

.workout-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.workout-list {
    margin: 12px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.workout-list li {
    font-size: 0.85rem;
    color: var(--color-dark-2);
    padding-left: 18px;
    position: relative;
}

.workout-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
}

.ai-callout {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: rgba(232, 84, 30, 0.06);
    border: 1px solid rgba(232, 84, 30, 0.25);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-top: 24px;
}

.ai-callout-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.ai-callout strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.85rem;
    color: var(--color-dark);
}

.ai-callout p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--color-gray);
}

.health-form-card {
    margin-top: 28px;
}

.health-form-card h2 {
    margin: 0 0 18px;
    font-size: 1.2rem;
}

@media (max-width: 900px) {
    .health-grid,
    .workout-grid {
        grid-template-columns: 1fr;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---------- Customer sub-pages (health dashboard, scheduling, chat, notifications, achievements) ---------- */

.section-block {
    margin-top: 28px;
}

.section-block h2 {
    font-size: 1.2rem;
    margin: 0 0 14px;
}

.chart-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.chart-card canvas {
    max-width: 100%;
    height: 300px !important;
}

.chart-note {
    margin: 12px 0 0;
    font-size: 0.8rem;
    color: var(--color-gray-light);
    font-style: italic;
}

.empty-state {
    background: var(--color-white);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius);
    padding: 22px;
    color: var(--color-gray);
    font-size: 0.88rem;
    text-align: center;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-list-item {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-primary);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.88rem;
    color: var(--color-dark-2);
}

.info-list-item span {
    color: var(--color-gray);
}

/* Data table (Log Daily Health Data) */

.table-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

@media (max-width: 900px) {
    .table-card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        min-width: 640px;
    }
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.data-table th {
    background: var(--color-light);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-gray);
    font-weight: 700;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: var(--color-light);
}

/* Scheduling: available slots / bookings */

.list-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.list-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.list-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.list-card-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--color-dark);
}

.list-card-meta {
    font-size: 0.8rem;
    color: var(--color-gray);
}

.list-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.status-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(30, 158, 90, 0.12);
    color: #1E9E5A;
}

.btn-danger-ghost {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #D64545;
    border: 1px solid rgba(214, 69, 69, 0.4);
    background: transparent;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-danger-ghost:hover {
    background: #D64545;
    color: var(--color-white);
    border-color: #D64545;
}

.list-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Cancel booking confirmation */

.confirm-card {
    max-width: 460px;
    margin: 40px auto 0;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 32px;
    text-align: center;
}

.confirm-card h1 {
    font-size: 1.4rem;
    margin: 0 0 12px;
}

.confirm-card .list-card {
    margin: 0 0 24px;
    text-align: left;
}

.confirm-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.confirm-actions .btn {
    width: 100%;
    text-align: center;
}

.btn-danger {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-white);
    background: #D64545;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-danger:hover {
    background: #B93636;
}

/* Announcements */

.announcement-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.announcement-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.announcement-card h3 {
    margin: 0;
    font-size: 1rem;
}

.announcement-date {
    font-size: 0.76rem;
    color: var(--color-gray-light);
    white-space: nowrap;
}

.announcement-card p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--color-gray);
}

/* Notifications */

.notification-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 14px 18px;
    font-size: 0.88rem;
    color: var(--color-dark-2);
}

.notification-item.is-unread {
    background: rgba(232, 84, 30, 0.05);
    border-color: rgba(232, 84, 30, 0.3);
    font-weight: 700;
}

.notification-time {
    font-size: 0.76rem;
    color: var(--color-gray-light);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Achievements */

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.achievement-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.achievement-card.locked {
    opacity: 0.6;
}

.achievement-icon {
    font-size: 1.6rem;
}

.achievement-card h3 {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-dark);
}

.achievement-card.earned h3 {
    color: #1E9E5A;
}

.achievement-card p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--color-gray);
}

.achievement-earned-date {
    font-size: 0.76rem;
    color: var(--color-gray-light);
    font-style: italic;
}

/* AI Assistant chat */

.chat-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    align-items: start;
}

.chat-history-panel {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.chat-new-link {
    display: block;
    text-align: center;
    padding: 9px 12px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 0.82rem;
    font-weight: 700;
}

.chat-new-link:hover {
    background: var(--color-primary-dark);
}

.chat-history-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-gray-light);
    font-weight: 700;
    margin: 0 0 8px;
}

.chat-session-link {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--color-gray);
    margin-bottom: 2px;
}

.chat-session-link:hover {
    background: var(--color-light);
    color: var(--color-dark);
}

.chat-session-link.active {
    background: rgba(232, 84, 30, 0.1);
    color: var(--color-primary);
    font-weight: 700;
}

.chat-window {
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.chat-messages {
    height: 440px;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-bubble-row {
    display: flex;
}

.chat-bubble-row.is-user {
    justify-content: flex-end;
}

.chat-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.45;
}

.chat-bubble-row.is-user .chat-bubble {
    background: var(--color-primary);
    color: var(--color-white);
    border-bottom-right-radius: 4px;
}

.chat-bubble-row.is-ai .chat-bubble {
    background: var(--color-light);
    color: var(--color-dark-2);
    border-bottom-left-radius: 4px;
}

.chat-empty {
    margin: auto;
    color: var(--color-gray-light);
    font-size: 0.88rem;
}

.chat-form {
    display: flex;
    gap: 10px;
    padding: 16px;
    border-top: 1px solid var(--color-border);
}

.chat-form input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 0.9rem;
    font-family: inherit;
}

.chat-form input[type="text"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(232, 84, 30, 0.15);
}

@media (max-width: 900px) {
    .chat-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .list-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .achievement-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Trainer sub-pages (roster, customer detail, sessions, drills) ---------- */

.data-table tr.needs-attention {
    background: rgba(214, 69, 69, 0.06);
}

.attention-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(214, 69, 69, 0.12);
    color: #D64545;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.data-table .btn-small-link {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.data-table .btn-small-link:hover {
    background: var(--color-primary-dark);
}

.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.detail-header .btn-ghost-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-gray);
}

.detail-header .btn-ghost-link:hover {
    color: var(--color-primary);
}

.profile-fact-row {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.profile-fact {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-fact-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-gray-light);
    font-weight: 700;
}

.profile-fact-value {
    font-size: 0.92rem;
    color: var(--color-dark-2);
    font-weight: 600;
}

.feedback-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
}

.feedback-card-date {
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
}

.feedback-card p {
    margin: 0 0 6px;
    font-size: 0.88rem;
    color: var(--color-dark-2);
}

.feedback-card p:last-child {
    margin-bottom: 0;
}

.feedback-card .adjustment-label {
    font-weight: 700;
    color: var(--color-gray);
}

/* ---------- Admin pages (manage users / bookings / announcements) ---------- */

.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-bar input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 9px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--color-white);
}

.filter-bar select {
    min-width: 160px;
    padding: 9px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--color-white);
}

.filter-bar input[type="text"]:focus,
.filter-bar select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(232, 84, 30, 0.15);
}

.status-tag.status-inactive,
.status-tag.status-cancelled {
    background: rgba(214, 69, 69, 0.12);
    color: #D64545;
}

.btn-success-ghost {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #1E9E5A;
    border: 1px solid rgba(30, 158, 90, 0.4);
    background: transparent;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-success-ghost:hover {
    background: #1E9E5A;
    color: var(--color-white);
    border-color: #1E9E5A;
}

/* ---------- Auth pages (login / register / verify) ---------- */

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 480px) 1fr;
}

.auth-panel {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 0 48px;
}

.auth-header {
    padding: 16px 0;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1rem;
    color: var(--color-dark);
}

.auth-logo img {
    height: 34px;
    width: 34px;
    border-radius: 8px;
    object-fit: contain;
}

.auth-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
    padding: 8px 0 20px;
}

.auth-title {
    font-size: 1.55rem;
    margin: 0 0 4px;
}

.auth-subtitle {
    color: var(--color-gray);
    margin: 0 0 14px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.auth-page .messages {
    max-width: none;
    margin: 0 0 14px;
    padding: 0;
}

.auth-page .messages li {
    margin-bottom: 6px;
    padding: 9px 14px;
    font-size: 0.85rem;
}

.auth-form .form-group {
    margin-bottom: 8px;
}

.auth-form label {
    display: block;
    font-weight: 600;
    font-size: 0.78rem;
    margin-bottom: 3px;
    color: var(--color-dark-2);
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="number"],
.auth-form input[type="date"],
.auth-form input[type="time"],
.auth-form select,
.auth-form textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--color-white);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-form textarea {
    resize: vertical;
    min-height: 80px;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(232, 84, 30, 0.15);
}

.auth-form .form-group.has-error input,
.auth-form .form-group.has-error select,
.auth-form .form-group.has-error textarea {
    border-color: #D64545;
}

.auth-form .field-error {
    color: #D64545;
    font-size: 0.72rem;
    margin: 4px 0 0;
}

.auth-form .field-help {
    color: var(--color-gray-light);
    font-size: 0.7rem;
    margin: 4px 0 0;
    line-height: 1.35;
}

.auth-form .field-help ul {
    margin: 3px 0 0;
    padding-left: 16px;
    list-style: disc;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 8px;
}

.form-row .form-group {
    margin-bottom: 0;
}

/* Password field + show/hide toggle */

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 40px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--color-gray-light);
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--color-primary);
}

.password-toggle .icon-eye-off {
    display: none;
}

.password-toggle.is-visible .icon-eye {
    display: none;
}

.password-toggle.is-visible .icon-eye-off {
    display: block;
}

/* Live password requirement checklist */

.password-requirements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 10px;
    margin: 6px 0 0;
}

.req-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    color: var(--color-gray-light);
    line-height: 1.3;
}

.req-item .req-icon {
    font-style: normal;
    width: 11px;
    flex-shrink: 0;
    display: inline-flex;
    justify-content: center;
}

.password-requirements.is-active .req-item.unmet {
    color: #D64545;
}

.password-requirements.is-active .req-item.met {
    color: #1E9E5A;
}

/* Live password-match feedback */

.field-live-message {
    min-height: 15px;
    font-size: 0.72rem;
    margin: 4px 0 0;
}

.field-live-message.is-error {
    color: #D64545;
}

.field-live-message.is-success {
    color: #1E9E5A;
}

.form-group-checkbox {
    margin-bottom: 12px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--color-gray);
    font-weight: 500;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 15px;
    height: 15px;
    accent-color: var(--color-primary);
    flex-shrink: 0;
}
.checkbox-label a {
    font-weight: 700;
    text-decoration: underline;
    color: var(--color-primary);
}

.checkbox-label a:hover {
    color: var(--color-primary-dark);
}
.link-emphasis {
    font-weight: 700;
    text-decoration: underline;
    color: var(--color-primary);
}

.link-emphasis:hover {
    color: var(--color-primary-dark);
}

.auth-submit {
    width: 100%;
    text-align: center;
    margin-top: 4px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.auth-switch {
    margin-top: 12px;
    font-size: 0.82rem;
    color: var(--color-gray);
    text-align: center;
}

.auth-switch a {
    color: var(--color-primary);
    font-weight: 700;
}

.auth-forgot-link {
    margin: 0 0 10px;
    font-size: 0.8rem;
    text-align: right;
}

.auth-forgot-link a {
    color: var(--color-primary);
    font-weight: 600;
}

.auth-form .errorlist {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    color: #b42318;
    font-size: 0.8rem;
}

.auth-form input[type="email"],
.auth-form input[type="password"].auth-plain {
    width: 100%;
}

.auth-media {
    position: relative;
    overflow: hidden;
}

.auth-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(18, 23, 43, 0.15) 0%, rgba(18, 23, 43, 0.8) 100%);
}

.auth-media-quote {
    position: absolute;
    left: 48px;
    right: 48px;
    bottom: 56px;
    z-index: 2;
    color: var(--color-white);
}

.auth-media-quote p {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 10px;
}

.auth-media-quote span {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
}

/* Centered single-column auth layout (Verify OTP) */

.auth-page-single {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-light);
}

.auth-page-single .auth-panel {
    min-height: auto;
    padding: 24px;
    width: 100%;
    max-width: 460px;
}

.auth-page-single .auth-header {
    display: flex;
    justify-content: center;
    padding: 0 0 22px;
}

.auth-card-boxed {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 32px 36px;
    text-align: center;
    flex: none;
}

.auth-card-boxed .auth-subtitle {
    font-size: 0.85rem;
}

.auth-card-boxed .auth-form {
    text-align: left;
    margin-top: 6px;
}

.otp-input {
    text-align: center;
    font-size: 1.4rem !important;
    font-weight: 700;
    letter-spacing: 0.5em;
    padding-left: 8px !important;
}

@media (max-width: 900px) {
    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-media {
        display: none;
    }

    .auth-panel {
        padding: 0 24px;
    }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
    .card-grid,
    .benefit-grid,
    .card-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-section {
        grid-template-columns: 1fr;
    }

    .about-media img.about-photo-main {
        height: 320px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .navbar-links {
        display: none;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .card-grid,
    .benefit-grid,
    .card-grid-3 {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 56px 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .about-media img.about-photo-inset {
        display: none;
    }
}
@media (max-width: 900px) {
    .meal-plan-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .meal-plan-grid {
        grid-template-columns: 1fr;
    }
}


/* ---------- Top bar (logged-in pages) ---------- */

.topbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 8px 24px;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
}

.topbar-settings {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--color-gray);
    transition: background 0.15s ease, color 0.15s ease;
}

.topbar-settings:hover {
    background: var(--color-light);
    color: var(--color-primary);
}

/* ---------- Settings & Help pages ---------- */

.settings-form .health-card,
.settings-links {
    margin-bottom: 20px;
}

.option-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.option-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    color: var(--color-dark-2);
}

.option-pill:has(input:checked) {
    border-color: var(--color-primary);
    background: rgba(232, 84, 30, 0.08);
}

.option-pill small {
    font-weight: 400;
    color: var(--color-gray);
}

.option-font-poppins { font-family: "Poppins", var(--font-body); }
.option-font-nunito { font-family: "Nunito", var(--font-body); }

.settings-link-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

.settings-link-list li:last-child {
    border-bottom: none;
}

.settings-link-list a,
.contact-list a {
    color: var(--color-primary);
    font-weight: 700;
}

.settings-link-list span {
    display: block;
    color: var(--color-gray);
    font-size: 0.88rem;
}

.contact-card {
    margin-top: 28px;
}

.contact-list li {
    padding: 4px 0;
}

.dashboard-page .faq-list {
    max-width: none;
}

/* ---------- User font preference ---------- */

[data-font="poppins"] {
    --font-body: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-font="nunito"] {
    --font-body: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-font="poppins"] button,
[data-font="poppins"] input,
[data-font="poppins"] select,
[data-font="poppins"] textarea,
[data-font="nunito"] button,
[data-font="nunito"] input,
[data-font="nunito"] select,
[data-font="nunito"] textarea {
    font-family: inherit;
}

/* ---------- User theme preference: dark mode ---------- */
/* Redefines the palette variables; components that sit on dark/brand
   backgrounds are pinned back to their original colors below. */

[data-theme="dark"] {
    color-scheme: dark;
    --color-dark: #ECEEF6;
    --color-dark-2: #D2D6E6;
    --color-light: #0E1224;
    --color-white: #181E36;
    --color-gray: #A4A9BC;
    --color-gray-light: #8A8FA6;
    --color-border: #2B3352;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .navbar {
    background: rgba(24, 30, 54, 0.96);
}

/* Elements that use --color-dark as a background keep the original navy */
[data-theme="dark"] .btn-dark,
[data-theme="dark"] .hero,
[data-theme="dark"] .flip-card-back,
[data-theme="dark"] .final-cta,
[data-theme="dark"] .footer,
[data-theme="dark"] .page-header {
    background: #12172B;
    color: #FFFFFF;
}

[data-theme="dark"] .btn-dark:hover {
    background: #1D2440;
}

/* Text sitting on those navy/brand backgrounds stays white */
[data-theme="dark"] .flip-card-back h3,
[data-theme="dark"] .flip-card-back li strong,
[data-theme="dark"] .footer-brand,
[data-theme="dark"] .footer h4,
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .badge,
[data-theme="dark"] .btn-danger,
[data-theme="dark"] .chat-new-link,
[data-theme="dark"] .chat-bubble-row.is-user .chat-bubble,
[data-theme="dark"] .data-table .btn-small-link,
[data-theme="dark"] .btn-danger-ghost:hover,
[data-theme="dark"] .btn-success-ghost:hover,
[data-theme="dark"] .social-icon:hover {
    color: #FFFFFF;
}

[data-theme="dark"] .btn-outline {
    border-color: #FFFFFF;
    color: #FFFFFF;
}

[data-theme="dark"] .btn-outline:hover {
    background: #FFFFFF;
    color: #12172B;
}

/* ---------- Dashboard content cards (Customer / Trainer / Admin) ---------- */
/* Reuses --color-* variables (so it follows dark mode automatically) and the
   same navy-on-white look already established by .stat-tile / .dashboard-tip. */

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 22px;
}
.dashboard-card-wide {
    grid-column: 1 / -1;
}

.dashboard-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.dashboard-card-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--color-dark-2);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-card-blurb {
    margin: 0 0 14px;
    font-size: 0.85rem;
    color: var(--color-gray);
}

.dashboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.dashboard-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--color-light);
    border-radius: 8px;
}

.dashboard-list-item .item-title {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-dark);
}

.dashboard-list-item .item-sub {
    display: block;
    font-size: 0.76rem;
    color: var(--color-gray);
    margin-top: 2px;
}

.dashboard-empty {
    font-style: italic;
    color: var(--color-gray);
    font-size: 0.85rem;
    margin: 4px 0 14px;
}

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

.dashboard-action-btn {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.8rem;
    border: 1px solid var(--color-border);
    color: var(--color-dark-2);
    background: var(--color-white);
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.dashboard-action-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.dashboard-action-btn.primary {
    background: var(--color-dark);
    border-color: var(--color-dark);
    color: var(--color-white);
}

.dashboard-action-btn.primary:hover {
    background: var(--color-dark-2);
    border-color: var(--color-dark-2);
    color: var(--color-white);
}

.badge-earned {
    flex-shrink: 0;
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(29, 36, 64, 0.1);
    color: var(--color-dark-2);
}

@media (max-width: 900px) {
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
}
/* Coach bio collapse/expand */
.coach-bio {
    max-height: 140px;
    overflow: hidden;
    position: relative;
    margin: 0.5rem 0;
    transition: max-height 0.3s ease;
}
.coach-bio.collapsed::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--color-white));
}
.coach-bio:not(.collapsed) {
    max-height: 3000px;
}
.coach-bio-toggle {
    background: none;
    border: none;
    color: var(--color-primary);
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    margin-top: 0.25rem;
    font-size: 0.85rem;
}
.coach-bio-toggle:hover {
    text-decoration: underline;
}

/* Homepage announcement banner */
.announcement-banner {
    background: rgba(232, 84, 30, 0.06);
    border: 1px solid rgba(232, 84, 30, 0.25);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    text-align: center;
}
.announcement-badge {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}
.announcement-banner h2 {
    color: var(--color-dark);
    margin: 0 0 0.5rem;
}
.announcement-banner p {
    color: var(--color-gray);
    margin: 0;
}
/* ---------- Suggested Meal Plan (Dashboard) ---------- */
.meal-plan-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.meal-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.meal-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.meal-card-image img,
.meal-card-image svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.meal-card-body {
    padding: 16px;
}

.meal-card-body h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.meal-card-body ul {
    margin: 0;
    padding-left: 18px;
}

.meal-card-body li {
    font-size: 0.85rem;
    color: var(--color-gray);
    margin-bottom: 4px;
}

/* Show more / Show less buttons (static/js/showmore.js) */
.show-more-btn { display: block; margin: 14px auto 18px; padding: 8px 20px; font-size: 14px; cursor: pointer; }


/* ---------- Edit slot button ---------- */

.btn-edit-ghost {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-edit-ghost:hover {
    background: var(--color-primary);
    color: var(--color-white);
}


/* ---------- Edit slot save button ---------- */

.btn-edit-ghost {
    vertical-align: middle;
    font-family: inherit;
    line-height: 1.4;
}

.btn-edit-solid {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-edit-solid:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}


/* ---------- Footer brand link ---------- */

a.footer-brand,
a.footer-brand:hover {
    color: var(--color-white);
    text-decoration: none;
}

a.footer-brand:hover {
    opacity: 0.85;
}


/* Hide the browser's own reveal-password icon; the site provides its own toggle. */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}


/* Smaller Show more button inside the AI Assistant chat history panel */
.chat-history-panel .show-more-btn {
    padding: 5px 14px;
    font-size: 12px;
    margin: 10px auto 4px;
    white-space: nowrap;
}


/* Compact + New button in the AI Assistant chat history panel */
.chat-history-panel .chat-new-link {
    width: fit-content;
    margin: 0 auto 14px;
    padding: 5px 14px;
    font-size: 12px;
}


/* Same size and alignment for link and button versions of the small table buttons */
.data-table .btn-small-link {
    line-height: 1.2;
    box-sizing: border-box;
    vertical-align: middle;
    margin: 0;
}
.data-table form[style*="inline-block"] {
    vertical-align: middle;
}


/* Equal gap after a link-style small button (matches the margin of the button forms) */
.data-table a.btn-small-link + form[style*="inline-block"] {
    margin-left: 6px;
}


/* Chat: thinking / searching indicator */
.chat-dots { display: inline-block; margin-left: 2px; }
.chat-dots span { display: inline-block; opacity: 0.25; animation: chatDotPulse 1.2s infinite ease-in-out; }
.chat-dots span:nth-child(2) { animation-delay: 0.2s; }
.chat-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chatDotPulse { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .chat-dots span { animation: none; opacity: 0.7; } }

/* Book a session: coach profile */
.slot-filter { display: flex; align-items: center; gap: 0.75rem; margin: 0 0 1.25rem; flex-wrap: wrap; }
.slot-filter label { font-weight: 700; }
.slot-filter select { padding: 0.55rem 0.9rem; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.06); color: inherit; min-width: 220px; }
.slot-filter select option { color: #111; }
.slot-coach { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 0.35rem; }
.slot-coach-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid rgba(255, 255, 255, 0.15); }
.slot-coach-text { display: flex; flex-direction: column; }
.slot-coach-title { font-size: 0.85rem; opacity: 0.75; }
.slot-coach-details { margin: 0.25rem 0 0.6rem; }
.slot-coach-details summary { cursor: pointer; color: var(--color-primary); font-weight: 700; font-size: 0.85rem; }
.slot-coach-details summary:hover { text-decoration: underline; }
.slot-coach-bio { margin-top: 0.5rem; font-size: 0.9rem; line-height: 1.5; max-height: 320px; overflow-y: auto; }
.slot-coach-bio p { margin: 0 0 0.6rem; }

/* Book a session: credentials toggle label */
.slot-coach-details .when-open { display: none; }
.slot-coach-details[open] .when-open { display: inline; }
.slot-coach-details[open] .when-closed { display: none; }

/* MOBILE FIXES: customer pages (meal plan, AI chat, notifications) */

/* Meal plan: placed after the base rule so these actually apply */
@media (max-width: 900px) {
    .meal-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    .meal-plan-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .meal-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: start; }
    .meal-card-body { padding: 12px; }
}
.meal-card-body li { overflow-wrap: anywhere; }

/* AI chat: long links wrap, nothing widens the page, Send stays visible */
.chat-bubble { overflow-wrap: anywhere; word-break: break-word; }
.chat-window, .chat-layout > * { min-width: 0; }
.chat-form input[type="text"] { min-width: 0; }
.chat-form .btn { flex-shrink: 0; }
@media (max-width: 900px) {
    .chat-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
    .chat-messages { padding: 12px; }
    .chat-bubble { max-width: 92%; }
    .chat-form { padding: 12px; gap: 8px; }
}

/* Notifications (all roles): message on top, date and status below */
@media (max-width: 720px) {
    .notification-item { flex-wrap: wrap; row-gap: 6px; }
    .notification-item > a,
    .notification-item > span:not(.notification-time) {
        flex: 1 1 calc(100% - 36px) !important;
        min-width: 0;
        overflow-wrap: anywhere;
    }
    .notification-item > .notification-time { margin-left: 30px; }
    .notification-item > .notification-time:last-child {
        margin-left: auto;
        min-width: 0 !important;
    }
}

/* MOBILE FIXES: AI chat history toggle */
.chat-history-toggle { display: none; }
@media (max-width: 900px) {
    .chat-history-panel { padding: 10px 12px; }
    .chat-history-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    .chat-history-bar .chat-new-link { margin-bottom: 0; }
    .chat-history-toggle {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: transparent;
        color: inherit;
        border: 1px solid var(--color-border);
        border-radius: 999px;
        padding: 7px 14px;
        font: inherit;
        font-size: 0.82rem;
        font-weight: 700;
        cursor: pointer;
    }
    .chat-history-list { display: none; margin-top: 12px; }
    .chat-history-panel.is-open .chat-history-list { display: block; }
}

/* MOBILE FIX: align + New to the right */
@media (max-width: 900px) {
    .chat-history-bar .chat-new-link {
        margin: 0 0 0 auto !important;
        flex: 0 0 auto;
    }
}

/* MOBILE FIXES: table cards, action buttons, pending status */

.status-tag.status-pending {
    background: rgba(217, 154, 0, 0.16);
    color: #9a6a00;
    white-space: normal;
    line-height: 1.25;
}
[data-theme="dark"] .status-tag.status-pending { color: #f0b429; }

/* Action buttons: same size, even gap (all screen sizes) */
.action-pair {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.action-pair > form { margin: 0 !important; display: block !important; }
.action-pair > form > button,
.action-pair > a {
    min-width: 108px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
}

@media (max-width: 720px) {
    .table-card:has(.table-stack) {
        overflow: visible;
        background: transparent;
        border: 0;
        box-shadow: none;
    }
    .data-table.table-stack { min-width: 0; }
    .table-stack,
    .table-stack tbody,
    .table-stack tr,
    .table-stack td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    .table-stack thead { display: none; }
    .table-stack tr {
        background: var(--color-white);
        border: 1px solid var(--color-border);
        border-radius: var(--radius);
        box-shadow: var(--shadow-sm);
        margin-bottom: 12px;
        padding: 6px 0;
    }
    .table-stack tbody tr:hover { background: var(--color-white); }
    .table-stack tr[hidden],
    .table-stack tbody > tr[class*="hidden"] { display: none !important; }
    .table-stack td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 8px 14px;
        border-bottom: 0;
        text-align: right;
    }
    .table-stack td::before {
        content: attr(data-label);
        flex: 0 0 38%;
        text-align: left;
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        color: var(--color-gray);
    }
    .table-stack td[colspan] { display: block; text-align: center; }
    .table-stack td[colspan]::before { content: none; }
    .table-stack td[data-label="Action"] { display: block; text-align: left; }
    .table-stack td[data-label="Action"]::before { display: block; margin-bottom: 8px; }
    .table-stack td[data-label="Action"]:not(:has(.action-pair)) { display: none; }
    .table-stack .action-pair { flex-direction: column; align-items: stretch; }
    .table-stack .action-pair > form,
    .table-stack .action-pair > a,
    .table-stack .action-pair > form > button {
        width: 100%;
    }
}

/* FIX: spacing between attendance buttons in My Sessions */
#past-sessions-body td form[style*="inline-block"] {
    margin: 0 6px 8px 0 !important;
}
#past-sessions-body td a.btn-small-link {
    margin: 0 6px 8px 0;
}

/* FIX: Manage Bookings status pill and Approve/Reject */
#bookings-table td { vertical-align: middle; }
#bookings-table .status-tag {
    white-space: nowrap;
    padding: 4px 10px;
    font-size: 0.68rem;
    line-height: 1.3;
}
#bookings-table .status-tag.status-pending {
    background: rgba(217, 154, 0, 0.16);
    color: #9a6a00;
}
[data-theme="dark"] #bookings-table .status-tag.status-pending { color: #f0b429; }
#bookings-table .action-pair {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
#bookings-table .action-pair > form { margin: 0 !important; display: block !important; }
#bookings-table .action-pair button {
    width: 108px !important;
    height: 36px !important;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
