/* FitIts "Aurora" look for the signed-in app and the sign-in pages.
   Loaded after the admin theme (assets/css/style.css) and custom.css, so it only
   restyles: layout, colours and spacing stay driven by the theme's classes.
   Surfaces are restyled for light mode only; dark mode keeps the theme's colours
   and just gets the new typeface. The accent follows the gym's theme colour
   (--primary-rgb): gyms on the default colour get the logo gradient (--fx-grad,
   set in admin/head), gyms that picked their own colour get that colour. */
@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("../fonts/plus-jakarta-sans/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
    font-weight: 200 800; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("../fonts/plus-jakarta-sans/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2");
    font-weight: 200 800; font-style: normal; font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --fx-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", "Noto Sans", "Noto Sans Bengali", sans-serif;
    --fx-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --fx-ink: #0b1e33;
    --fx-ink-2: #33475b;
    --fx-muted: #5b6b7b;
    --fx-subtle: #647486;
    --fx-line: #e3eaf0;
    --fx-line-2: #d5dee6;
    --fx-bg: #f7fafc;
    --fx-surface: #ffffff;
    --fx-hover: #eef3f7;
    --fx-active: #e6eef4;
    --fx-teal: #72c8d5;
    --fx-teal-soft: #e3f5f8;
    --fx-teal-ink: #0e5e6d;
    --fx-radius: 16px;
    --fx-shadow: 0 1px 2px rgba(11, 30, 51, .04), 0 8px 24px rgba(36, 114, 176, .06);
    /* Solid theme colour unless admin/head sets the logo gradient. */
    --fx-grad: var(--primary-bg-color);
    --fx-grad-light: var(--primary-bg-color);
    --bs-font-sans-serif: var(--fx-sans);
    --bs-font-monospace: var(--fx-mono);
}

/* Dark mode keeps the theme's colours; the shared surface tokens follow it. */
body.darkmode { --fx-surface: #22242b; --fx-line: rgba(255, 255, 255, .1); --fx-line-2: rgba(255, 255, 255, .14); --fx-hover: rgba(255, 255, 255, .06); --fx-active: rgba(255, 255, 255, .1); }

/* ---------- Type (every mode) ---------- */
/* Plus Jakarta Sans has a narrow word space: open it up a little. */
body { font-family: var(--fx-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; word-spacing: .07em; }
input, textarea, select, button { word-spacing: inherit; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: var(--fx-sans); letter-spacing: -.015em; }
button, input, select, textarea, .btn, .form-control, .form-select { font-family: var(--fx-sans); }
code, kbd, pre, samp { font-family: var(--fx-mono); }

/* ---------- Page ---------- */
body.lightmode { background-color: var(--fx-bg); color: var(--fx-ink); font-size: 14px; }
body.lightmode p { color: inherit; }

/* Header bar */
body.lightmode .codex-header {
    background-color: rgba(251, 251, 250, .92); backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--fx-line); min-height: 64px; padding: 12px 28px; box-shadow: none;
}
body.lightmode .codex-header .navicon-wrap { width: 36px; height: 36px; border-radius: 8px; border-color: var(--fx-line-2); color: var(--fx-muted); background: var(--fx-surface); }
body.lightmode .codex-header .navicon-wrap:hover { background: var(--fx-hover); }
body.lightmode .codex-header .navicon-wrap:hover i, body.lightmode .codex-header .navicon-wrap:hover svg { color: var(--fx-ink); }
body.lightmode .codex-header .nav-profile .media { gap: 10px; align-items: center; }
body.lightmode .codex-header .nav-profile .user-icon img { width: 32px; height: 32px; border-radius: 999px; object-fit: cover; }
body.lightmode .codex-header .nav-profile h6 { font-size: 14px; font-weight: 500; color: var(--fx-ink); margin: 0; }
body.lightmode .codex-header .nav-profile .text-light { color: var(--fx-subtle) !important; font-size: 12px; text-transform: capitalize; }
body.lightmode .codex-header .hover-dropdown { border: 1px solid var(--fx-line); border-radius: 10px; box-shadow: 0 12px 32px rgba(15, 23, 32, .08); }
body.lightmode .codex-header .hover-dropdown::before { display: none; }
body.lightmode .codex-header .hover-dropdown ul li a { color: var(--fx-ink-2); font-size: 14px; border-radius: 6px; }
body.lightmode .codex-header .hover-dropdown ul li a:hover { background: var(--fx-hover); color: var(--fx-ink); }
.themebody-wrap { margin-block-start: 64px; }

/* Sidebar (light) */
.codex-sidebar.sidebar-light { background-color: var(--fx-bg); border-right: 1px solid var(--fx-line); box-shadow: none; }
.codex-sidebar .logo-gridwrap, .codex-sidebar .icon-logo { padding: 16px 22px !important; min-height: 64px; border-bottom: 0; }
.codex-sidebar .codexbrand-logo img, .codex-sidebar .codex-darklogo img { max-height: 30px; max-width: 170px; width: auto !important; height: auto; }
.codex-sidebar .icon-logo img { max-height: 28px; width: auto; }
.codex-sidebar .codex-menu { margin-block-start: 4px; padding-inline-start: 14px; padding-inline-end: 14px; height: calc(100vh - 68px); }
.codex-sidebar .codex-menu .cdxmenu-title { margin: 18px 0 4px; padding: 0 10px; }
.codex-sidebar .codex-menu .cdxmenu-title:first-child { margin-top: 4px; }
.codex-sidebar .codex-menu .cdxmenu-title h5 { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.codex-sidebar.sidebar-light .codex-menu .cdxmenu-title h5 { color: #8a939c; }
.codex-sidebar .codex-menu li a { font-size: 14px; padding: 8px 10px; margin: 1px 0; border-radius: 7px; text-transform: none; }
.codex-sidebar .codex-menu li > a .icon-item { margin-inline-end: 10px; }
.codex-sidebar .codex-menu li > a .icon-item svg { width: 17px; stroke-width: 1.8; }
.codex-sidebar .codex-menu li > a > i.fa { font-size: 13px; opacity: .6; }
.codex-sidebar.sidebar-light .codex-menu li a { color: var(--fx-muted); }
.codex-sidebar.sidebar-light .codex-menu li.menu-item:hover > a { background-color: var(--fx-hover); color: var(--fx-ink); }
.codex-sidebar.sidebar-light .codex-menu li.menu-item.active > a { background-color: var(--fx-active); color: var(--fx-ink); font-weight: 500; }
.codex-sidebar.sidebar-light .codex-menu li.menu-item.active > a .icon-item { color: var(--primary-bg-color); }
.codex-sidebar .codex-menu .submenu-list { padding-inline-start: 20px; margin: 2px 0 6px 8px; border-left: 1px solid var(--fx-line); }
.codex-sidebar .codex-menu .submenu-list a { font-size: 13.5px; padding: 6px 12px; margin: 1px 0; }
.codex-sidebar.sidebar-light .codex-menu .submenu-list > li > a:hover { background: var(--fx-hover); color: var(--fx-ink); }
.codex-sidebar.sidebar-light .codex-menu .submenu-list > li.active > a { color: var(--fx-ink); font-weight: 500; background: transparent; }

/* Page title row */
.codex-breadcrumb { padding: 28px 28px 16px; margin: 0; }
body.lightmode .codex-breadcrumb .breadcrumb-contain .left-breadcrumb .breadcrumb li a { color: var(--fx-subtle); font-weight: 400; }
body.lightmode .codex-breadcrumb .breadcrumb-contain .left-breadcrumb .breadcrumb li a h1 { color: var(--fx-ink); }
.codex-breadcrumb .breadcrumb-contain .left-breadcrumb .breadcrumb li a h1 { font-size: 24px; font-weight: 600; letter-spacing: -.025em; margin: 0; }
/* "Dashboard / Invoice": the last item is the page name, so it gets the big title. */
.codex-breadcrumb .breadcrumb li:not(:last-child) a h1 { font-size: 14px !important; font-weight: 400 !important; letter-spacing: 0 !important; display: inline; }
body.lightmode .codex-breadcrumb .breadcrumb li:not(:last-child) a h1 { color: var(--fx-subtle) !important; }
.codex-breadcrumb .breadcrumb li.active:last-child, .codex-breadcrumb .breadcrumb li:last-child > a:not(:has(h1)) { font-size: 24px; font-weight: 600; letter-spacing: -.025em; }
body.lightmode .codex-breadcrumb .breadcrumb li.active:last-child, body.lightmode .codex-breadcrumb .breadcrumb-contain .left-breadcrumb .breadcrumb li.active:last-child a { color: var(--fx-ink); }
.codex-breadcrumb .breadcrumb-contain .left-breadcrumb .breadcrumb li.active:last-child a { font-weight: 600; }
.codex-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: #b3b9bf; font-size: 14px; font-weight: 400; vertical-align: 3px; }
.codex-breadcrumb .breadcrumb { align-items: baseline; font-size: 14px; }
.codex-breadcrumb .breadcrumb-contain .left-breadcrumb .breadcrumb li.active a,
.codex-breadcrumb .breadcrumb-contain .left-breadcrumb .breadcrumb li.active { color: var(--fx-subtle); font-weight: 400; }
.codex-breadcrumb .breadcrumb-contain { text-transform: none; }
.theme-body { padding-inline-start: 16px; padding-inline-end: 16px; }

/* Cards */
body.lightmode .card { background-color: var(--fx-surface); border: 1px solid var(--fx-line); border-radius: var(--fx-radius); box-shadow: none; margin-block-end: 20px; }
.card .card-header { padding: 16px 20px; padding-block-end: 16px !important; align-items: center; gap: 12px; flex-wrap: wrap; }
body.lightmode .card .card-header { border-bottom: 1px solid var(--fx-line); }
.card .card-header h4, .card .card-header h5 { font-size: 15px; font-weight: 600; margin: 0; text-transform: none; }
.card .card-body { padding: 20px; }
body.lightmode .card .card-footer { background: transparent; border-top: 1px solid var(--fx-line); }

/* Buttons */
.btn { border-radius: 8px; font-weight: 500; font-size: 14px; padding: 8px 14px; line-height: 1.35; box-shadow: none !important; }
.btn-sm, .btn-group-sm > .btn { padding: 5px 10px; font-size: 13px; border-radius: 7px; }
.btn-lg { padding: 11px 20px; font-size: 16px; }
.btn-primary, a.btn-primary { background-color: var(--primary-bg-color); border-color: var(--primary-bg-color); color: #fff; }
.btn-primary:hover, .btn-primary:focus, a.btn-primary:hover { background-color: rgba(var(--primary-rgb), .88); border-color: transparent; color: #fff; }
.btn-success, .btn-danger, .btn-info, .btn-warning, .btn-dark { color: #fff; }
body.lightmode .btn-light, body.lightmode .btn-secondary, body.lightmode .btn-outline-secondary, body.lightmode .btn-outline-light {
    background-color: var(--fx-surface); border: 1px solid var(--fx-line-2); color: var(--fx-ink);
}
body.lightmode .btn-light:hover, body.lightmode .btn-secondary:hover, body.lightmode .btn-outline-secondary:hover, body.lightmode .btn-outline-light:hover { background-color: var(--fx-hover); color: var(--fx-ink); }
body.lightmode .btn.btn-outline-primary { border: 1px solid var(--fx-line-2) !important; color: var(--fx-ink) !important; background-color: var(--fx-surface) !important; }
body.lightmode .btn.btn-outline-primary:hover, body.lightmode .btn.btn-outline-primary:focus, body.lightmode .btn.btn-outline-primary:active { border-color: #b9c0c7 !important; background-color: var(--fx-hover) !important; color: var(--fx-ink) !important; }
.btn:focus-visible { outline: 2px solid var(--primary-bg-color); outline-offset: 2px; }

/* Forms */
.form-label, label.form-label { font-size: 13px; font-weight: 500; margin-bottom: 6px; text-transform: none; }
body.lightmode .form-label { color: var(--fx-ink-2); }
.form-control, .form-select { border-radius: 8px; font-size: 14px; padding: 9px 12px; min-height: 40px; }
body.lightmode .form-control, body.lightmode .form-select, body.lightmode .select2-container--default .select2-selection--single, body.lightmode .select2-container--default .select2-selection--multiple {
    background-color: var(--fx-surface); border: 1px solid var(--fx-line-2); color: var(--fx-ink);
}
body.lightmode .form-control::placeholder { color: #98a0a8; }
.form-control:focus, .form-select:focus { border-color: var(--primary-bg-color) !important; box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .14) !important; }
body.lightmode .input-group-text { background: var(--fx-hover); border-color: var(--fx-line-2); color: var(--fx-muted); border-radius: 8px; }
.form-check-input:checked { background-color: var(--primary-bg-color); border-color: var(--primary-bg-color); }
.select2-container--default .select2-selection--single { border-radius: 8px; min-height: 40px; }

/* Tables */
body.lightmode .table { color: var(--fx-ink); --bs-table-hover-bg: var(--fx-hover); }
.table > :not(caption) > * > * { padding: 11px 12px; }
body.lightmode .table > :not(caption) > * > * { border-bottom-color: #eef0f2; }
body.lightmode .table thead th, body.lightmode table.dataTable thead th {
    font-size: 12px; font-weight: 500; color: var(--fx-subtle); text-transform: none; letter-spacing: 0; background-color: transparent;
    border-bottom: 1px solid var(--fx-line) !important;
}
/* Sort arrows: one small arrow at the right of the heading, never tiled across it. */
table.dataTable thead .sorting, table.dataTable thead .sorting_asc, table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_asc_disabled, table.dataTable thead .sorting_desc_disabled {
    background-repeat: no-repeat !important; background-position: right 6px center !important; background-size: 14px 14px; padding-right: 26px !important;
}
body.lightmode .table-bordered > :not(caption) > * > *, body.lightmode .table-bordered > :not(caption) > * { border-width: 0 0 1px 0; }
body.lightmode .table-bordered { border: 0; }
body.lightmode table.dataTable thead th, body.lightmode table.dataTable thead td,
body.lightmode table.dataTable tbody th, body.lightmode table.dataTable tbody td { border-color: #eef0f2; }
body.lightmode table.dataTable.display tbody tr.odd, body.lightmode table.dataTable.stripe tbody tr.odd,
body.lightmode table.dataTable.display tbody tr.odd > .sorting_1 { background-color: transparent; }
body.lightmode table.dataTable tbody tr:hover > * { background-color: #f7f8f9; }
body.lightmode table.dataTable { border: 0 !important; }
body.lightmode table.dataTable th, body.lightmode table.dataTable td { border-left: 0 !important; border-right: 0 !important; }
body.lightmode table.dataTable thead th, body.lightmode table.dataTable thead td { border-top: 0 !important; }
body.lightmode table.dataTable tbody th, body.lightmode table.dataTable tbody td { border-top: 0 !important; border-bottom: 1px solid #eef0f2 !important; }
body.lightmode table.dataTable tbody td { color: var(--fx-ink-2); }
body.lightmode .table thead th a, body.lightmode table.dataTable thead th a { color: inherit; font-weight: 500; }
/* Row actions (view / edit / delete): quiet until hovered. */
.cart-action form, .cart-action { display: inline-flex; align-items: center; gap: 2px; }
.cart-action a { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 7px; }
body.lightmode .cart-action a, body.lightmode .cart-action a.text-warning, body.lightmode .cart-action a.text-success, body.lightmode .cart-action a.text-danger, body.lightmode .cart-action a.text-primary, body.lightmode .cart-action a.text-info { color: var(--fx-subtle) !important; }
body.lightmode .cart-action a:hover { background: var(--fx-hover); color: var(--fx-ink) !important; }
body.lightmode .cart-action a.text-danger:hover { color: #c62828 !important; }
.cart-action a svg { width: 17px; height: 17px; stroke-width: 1.8; }
.dataTables_wrapper .dataTables_length select, .dataTables_wrapper .dataTables_filter input { border-radius: 8px; border: 1px solid var(--fx-line-2); padding: 6px 10px; }
.dataTables_wrapper .dataTables_info { font-size: 13px; color: var(--fx-subtle); }
body.lightmode .dataTables_wrapper .dt-button { background: var(--fx-surface) !important; color: var(--fx-ink) !important; border: 1px solid var(--fx-line-2) !important; border-radius: 7px !important; font-size: 13px; padding: 5px 12px !important; }
body.lightmode .dataTables_wrapper .dt-button:hover { background: var(--fx-hover) !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button { border-radius: 7px !important; }
body.lightmode .dataTables_wrapper .dataTables_paginate .paginate_button.current,
body.lightmode .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover { background: var(--fx-ink) !important; color: #fff !important; border-color: var(--fx-ink) !important; }
body.lightmode .pagination .page-link { border-color: var(--fx-line); color: var(--fx-ink-2); }
body.lightmode .pagination .page-item.active .page-link { background: var(--fx-ink); border-color: var(--fx-ink); color: #fff; }

/* Badges and alerts */
.codex-sidebar .codex-menu .badge.bg-success { background: var(--fx-grad) !important; color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; }
.badge { border-radius: 999px; font-weight: 500; font-size: 12px; padding: 4px 10px; letter-spacing: 0; }
.alert { border-radius: var(--fx-radius); font-size: 14px; }

/* Dropdowns and modals */
body.lightmode .dropdown-menu { border: 1px solid var(--fx-line); border-radius: 10px; box-shadow: 0 12px 32px rgba(15, 23, 32, .08); padding: 6px; }
body.lightmode .dropdown-item { border-radius: 6px; font-size: 14px; color: var(--fx-ink-2); }
body.lightmode .dropdown-item:hover { background: var(--fx-hover); color: var(--fx-ink); }
.modal-content { border-radius: 12px; border: 1px solid var(--fx-line); box-shadow: 0 24px 64px rgba(15, 23, 32, .16); overflow: hidden; }
.modal-header { padding: 16px 20px; }
body.lightmode .modal-header { border-bottom: 1px solid var(--fx-line); }
.modal-header .modal-title { font-size: 16px; font-weight: 600; }
body.lightmode .modal-footer { border-top: 1px solid var(--fx-line); }
.modal-backdrop.show { opacity: .35; }

/* Tabs and nav pills */
body.lightmode .nav-tabs { border-bottom: 1px solid var(--fx-line); }
body.lightmode .nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--fx-muted); font-weight: 500; font-size: 14px; }
body.lightmode .nav-tabs .nav-link.active { border-bottom-color: var(--fx-ink); color: var(--fx-ink); background: transparent; }

/* Footer */
body.lightmode .codex-footer { background: transparent; border-top: 1px solid var(--fx-line); box-shadow: none; }
.codex-footer p { font-size: 13px; }
body.lightmode .codex-footer p { color: var(--fx-subtle); }

/* ---------- Sign-in pages (layouts/auth) ---------- */
/* One calm, centred card instead of the photo split screen. */
body.lightmode .auth-main { background: var(--fx-bg); }
.auth-main { justify-content: center; height: auto; min-height: 100vh; overflow: auto; padding: 48px 16px; }
.auth-main::before { display: none; }
.auth-main .authbox-img { display: none; }
.auth-main .codex-authbox {
    min-width: 0; width: 100%; max-width: 440px; min-height: 0; margin: 0 auto; padding: 40px 36px 32px;
    border-radius: 12px; box-shadow: 0 1px 2px rgba(15, 23, 32, .04), 0 12px 32px rgba(15, 23, 32, .06);
}
body.lightmode .auth-main .codex-authbox { background: var(--fx-surface); border: 1px solid var(--fx-line); }
body.darkmode .auth-main .codex-authbox { border: 1px solid rgba(255, 255, 255, .1); }
.auth-main .codex-authbox form { width: 100%; }
.auth-main .codex-authbox .auth-header { text-transform: none; margin-block-end: 28px; }
.auth-main .codex-authbox .auth-header .codex-brand { margin-block-end: 24px; }
.auth-main .codex-authbox .codex-brand img { max-height: 30px; width: auto; }
.auth-main .codex-authbox .auth-header h3 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin: 0; }
body.lightmode .auth-main .codex-authbox .auth-header h3 { color: var(--fx-ink); }
.auth-main .codex-authbox .auth-header p, .auth-main .codex-authbox .auth-header span { font-size: 14px; }
.auth-main .codex-authbox .form-label { text-transform: none; }
.auth-main .codex-authbox .form-group { margin-bottom: 16px; }
.auth-main .codex-authbox .form-control { min-height: 44px; }
.auth-main .codex-authbox .group-input .input-group-text { color: var(--fx-subtle); font-size: 15px; }
.auth-main .codex-authbox .btn { margin-block-start: 24px; min-height: 44px; font-size: 15px; width: 100%; }
.auth-main .codex-authbox .auth-remember { font-size: 14px; }

/* Accessible focus everywhere */
a:focus-visible, button:focus-visible { outline: 2px solid var(--primary-bg-color); outline-offset: 2px; border-radius: 6px; }

@media (max-width: 991px) {
    .codex-header, body.lightmode .codex-header { padding: 12px 16px; }
    .codex-breadcrumb { padding: 20px 16px 12px; }
    .theme-body { padding-inline-start: 4px; padding-inline-end: 4px; }
}

/* Theme settings panel: no shadow bleeding onto the page while it is closed. */
.theme-cutomizer { box-shadow: none; }
.theme-cutomizer.active { box-shadow: -12px 0 40px rgba(15, 23, 32, .12); }

/* ---------- Aurora touches (light mode) ---------- */
/* A soft glow of the logo colours behind the top of every page. */
body.lightmode {
    background:
        radial-gradient(900px 420px at 22% -140px, rgba(114, 200, 213, .30), transparent 70%),
        radial-gradient(820px 400px at 94% -120px, rgba(36, 114, 176, .16), transparent 70%),
        var(--fx-bg);
    background-repeat: no-repeat;
}
body.lightmode .codex-header { background-color: rgba(247, 250, 252, .72); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom-color: rgba(227, 234, 240, .8); }
.codex-sidebar.sidebar-light { background-color: rgba(255, 255, 255, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.codex-sidebar.sidebar-light .codex-menu li.menu-item.active > a { background: var(--fx-grad); color: #fff; font-weight: 600; box-shadow: 0 6px 16px rgba(28, 90, 147, .22); }
.codex-sidebar.sidebar-light .codex-menu li.menu-item.active > a .icon-item { color: #fff; }
.codex-sidebar.sidebar-light .codex-menu li.menu-item.active > a:hover { color: #fff; }
.codex-sidebar .codex-menu li a { border-radius: 10px; font-weight: 500; }
.codex-breadcrumb .breadcrumb-contain .left-breadcrumb .breadcrumb li a h1,
.codex-breadcrumb .breadcrumb li.active:last-child { font-weight: 800; letter-spacing: -.03em; }
.codex-breadcrumb .breadcrumb-contain .left-breadcrumb .breadcrumb li.active:last-child a { font-weight: 800; }

/* Cards: rounder, with a soft blue shadow. */
body.lightmode .card { border-radius: var(--fx-radius); box-shadow: var(--fx-shadow); }
body.lightmode .card .card-header { border-top-left-radius: var(--fx-radius); border-top-right-radius: var(--fx-radius); }

/* Buttons: the logo gradient for the main action. */
.btn { border-radius: 10px; font-weight: 600; }
.btn-sm, .btn-group-sm > .btn { border-radius: 8px; }
.btn-primary, a.btn-primary, .btn.btn-primary { background: var(--fx-grad); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(28, 90, 147, .22) !important; }
.btn-primary:hover, .btn-primary:focus, a.btn-primary:hover { background: var(--fx-grad); filter: brightness(1.08); color: #fff; }
.form-check-input:checked { background-color: var(--primary-bg-color); }

/* Dashboard pieces that have their own styles. */
.fob { border-radius: var(--fx-radius) !important; box-shadow: var(--fx-shadow); border-color: var(--fx-line) !important; }
.fob-bar span { background: var(--fx-grad) !important; }
.fob-step { border-radius: 12px !important; }
.fds-tile, .fds-card { border-radius: var(--fx-radius) !important; box-shadow: var(--fx-shadow); }
.fds-tile.fds-feature { background: var(--fx-grad) !important; border-color: transparent !important; color: #fff !important; box-shadow: 0 12px 28px rgba(28, 90, 147, .25); }
.fds-tile.fds-feature .fds-label, .fds-tile.fds-feature .fds-sub { color: #e1f1f6; opacity: 1; }
.fib .fib-toggle button.active { background: var(--fx-grad); }
.fib .fib-plan { border-radius: 20px; }
.fib .fib-plan.featured { border: 2px solid transparent; background: linear-gradient(var(--fx-surface), var(--fx-surface)) padding-box, var(--fx-grad-light) border-box; }
.fib .fib-ribbon { background: var(--fx-grad); }
.fib .fib-meter > span:not(.warn):not(.bad) { background: var(--fx-grad); }

/* Sign-in pages: the same glow behind the card. */
body.lightmode .auth-main {
    background:
        radial-gradient(700px 420px at 20% 0%, rgba(114, 200, 213, .38), transparent 70%),
        radial-gradient(700px 420px at 85% 10%, rgba(36, 114, 176, .20), transparent 70%),
        var(--fx-bg);
}
.auth-main .codex-authbox { border-radius: 22px; box-shadow: 0 30px 80px rgba(36, 114, 176, .16); }
body.lightmode .auth-main .codex-authbox { background: rgba(255, 255, 255, .88); border-color: rgba(255, 255, 255, .95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.auth-main .codex-authbox .auth-header h3 { font-weight: 800; letter-spacing: -.03em; }
.auth-main .codex-authbox .btn { border-radius: 999px; min-height: 48px; }

/* Loading screen: the gym's logo (or FitIts) gently pulsing, with a thin bar sliding underneath. */
.codex-loader.fx-loader { background: #fff; display: flex; align-items: center; justify-content: center; transition: opacity .3s ease; }
.codex-loader.fx-loader.is-done { opacity: 0; pointer-events: none; }
.fx-loader-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.fx-loader-logo { max-width: 170px; max-height: 56px; width: auto; height: auto; animation: fx-loader-pulse 1.4s ease-in-out infinite; }
.fx-loader-bar { position: relative; width: 140px; height: 3px; border-radius: 3px; background: rgba(11, 30, 51, .08); overflow: hidden; }
.fx-loader-bar span { position: absolute; top: 0; left: 0; height: 100%; width: 40%; border-radius: 3px; background: var(--primary-bg-color, #1a6b8f); animation: fx-loader-slide 1.1s ease-in-out infinite; }
@keyframes fx-loader-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.96); } }
@keyframes fx-loader-slide { 0% { left: -40%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .fx-loader-logo, .fx-loader-bar span { animation: none; } }
body.darkmode .codex-loader.fx-loader { background: #111827; }

/* Footer credit */
.codex-footer .fx-credit { margin-left: 6px; }
.codex-footer .fx-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.codex-footer .fx-credit a:hover { color: var(--primary-bg-color); }
@media (max-width: 575px) { .codex-footer .fx-credit { display: block; margin: 4px 0 0; } }

/* ---------- Guide: tours, welcome card, Help (?) menu (App\Guides\Guides, js/fitits-guide.js) ---------- */
.fx-guide-help { position: relative; display: flex; align-items: center; margin-right: 10px; list-style: none; }
.fx-guide-help-btn { position: relative; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--fx-line-2); background: var(--fx-surface); color: inherit; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.fx-guide-help-btn:hover { background: var(--fx-hover); }
.fx-guide-help-btn svg { width: 18px; height: 18px; }
.fx-guide-help-btn:focus-visible, .fx-guide-item:focus-visible, .fx-guide-switch:focus-visible, .fx-guide-pop button:focus-visible, .fx-guide-hot:focus-visible { outline: 2px solid var(--primary-bg-color); outline-offset: 2px; }
.fx-guide-dot { position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary-bg-color); border: 2px solid var(--fx-surface); }
.fx-guide-menu { width: 310px; padding: 6px; border-radius: 14px; border: 1px solid var(--fx-line); box-shadow: 0 12px 32px rgba(15, 23, 32, .14); background: var(--fx-surface); }
.fx-guide-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 10px; color: inherit; font-size: 14px; font-weight: 600; text-decoration: none; }
.fx-guide-item:hover { background: var(--fx-hover); color: inherit; }
.fx-guide-item small, .fx-guide-switch-row small { font-size: 12px; font-weight: 400; color: var(--fx-muted); }
.fx-guide-sep { height: 1px; background: var(--fx-line); margin: 6px 8px; }
.fx-guide-switch-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.fx-guide-switch-row > span { flex: 1; display: flex; flex-direction: column; }
.fx-guide-switch-title { font-size: 14px; font-weight: 600; }
.fx-guide-switch { position: relative; width: 44px; height: 26px; flex: none; border-radius: 999px; border: 0; padding: 0; background: #b8c4cf; transition: background .2s ease; cursor: pointer; }
.fx-guide-switch[aria-checked="true"] { background: var(--fx-grad); }
.fx-guide-switch span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: left .2s ease; }
.fx-guide-switch[aria-checked="true"] span { left: 21px; }
.fx-guide-note { margin: 6px 8px 4px; padding: 10px 12px; border-radius: 10px; background: var(--fx-hover); font-size: 12px; line-height: 1.5; }

/* Welcome card: offers the tour, never starts it. */
.fx-guide-welcome { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 16px 20px; margin-bottom: 20px; border-radius: var(--fx-radius); background: var(--fx-surface); border: 1px solid rgba(var(--primary-rgb), .28); box-shadow: var(--fx-shadow); }
.fx-guide-welcome-ico { width: 46px; height: 46px; flex: none; border-radius: 13px; background: var(--fx-grad-light); color: #fff; display: flex; align-items: center; justify-content: center; }
.fx-guide-welcome-text { flex: 1 1 280px; min-width: 0; }
.fx-guide-welcome-text h2 { margin: 0; font-size: 16px; font-weight: 700; }
.fx-guide-welcome-text p { margin: 2px 0 0; font-size: 14px; color: var(--fx-muted); }
.fx-guide-welcome-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.fx-guide-never { color: var(--fx-muted); font-size: 13px; font-weight: 600; }

/* Tour popover (Driver.js) in the Aurora look. */
.driver-popover.fx-guide-pop { font-family: var(--fx-sans); word-spacing: .07em; color: var(--fx-ink); background: #fff; border: 1px solid var(--fx-line); border-radius: 16px; box-shadow: 0 24px 64px rgba(15, 23, 32, .22); padding: 18px; max-width: 340px; min-width: 260px; }
.driver-popover.fx-guide-pop .driver-popover-title { font-size: 15px; font-weight: 700; letter-spacing: -.01em; font-family: inherit; }
.driver-popover.fx-guide-pop .driver-popover-description { font-size: 14px; line-height: 1.55; color: var(--fx-ink-2); font-family: inherit; }
.driver-popover.fx-guide-pop .driver-popover-progress-text { font-size: 12px; font-weight: 600; color: var(--fx-subtle); }
.driver-popover.fx-guide-pop .driver-popover-footer { margin-top: 14px; gap: 8px; align-items: center; }
.driver-popover.fx-guide-pop .driver-popover-footer button { font-family: inherit; text-shadow: none; border-radius: 10px; font-size: 13px; font-weight: 600; padding: 8px 14px; border: 1px solid var(--fx-line-2); background: #fff; color: var(--fx-ink); }
.driver-popover.fx-guide-pop .driver-popover-footer .driver-popover-next-btn { border: 0; background: var(--fx-grad); color: #fff; box-shadow: 0 6px 16px rgba(28, 90, 147, .22); }
.driver-popover.fx-guide-pop .fx-guide-skip { border: 0 !important; background: none !important; color: var(--fx-muted) !important; padding: 6px 4px !important; text-decoration: underline; text-underline-offset: 3px; margin-right: auto; }
.driver-popover.fx-guide-pop .driver-popover-close-btn { display: none; }
/* Phones: the popover becomes a bottom sheet. */
@media (max-width: 575px) {
    .driver-popover.fx-guide-pop { position: fixed !important; left: 8px !important; right: 8px !important; bottom: 8px !important; top: auto !important; max-width: none; }
    .driver-popover.fx-guide-pop .driver-popover-arrow { display: none; }
}

/* Page tip: a small pulsing "?" that opens a one-step tip when clicked (never by itself). */
.fx-guide-hot { width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0; background: var(--primary-bg-color); color: #fff; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; margin-left: 8px; animation: fx-guide-hot 1.8s ease-out infinite; cursor: pointer; }
.fx-guide-off .fx-guide-hot { display: none; }
@keyframes fx-guide-hot { 0% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), .5); } 70% { box-shadow: 0 0 0 10px rgba(var(--primary-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0); } }

/* Short notice after closing a tour or changing the switch. */
.fx-guide-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100000; max-width: calc(100% - 32px); background: var(--fx-ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; box-shadow: 0 12px 32px rgba(15, 23, 32, .25); display: flex; gap: 14px; align-items: center; }
.fx-guide-toast button { background: none; border: 0; padding: 0; color: var(--fx-teal); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .fx-guide-hot { animation: none; } .fx-guide-switch, .fx-guide-switch span { transition: none; } }
body.darkmode .driver-popover.fx-guide-pop { background: #22242b; color: #f1f3f5; }
body.darkmode .driver-popover.fx-guide-pop .driver-popover-description { color: rgba(255, 255, 255, .78); }
body.darkmode .driver-popover.fx-guide-pop .driver-popover-footer button { background: transparent; color: inherit; }

/* ---------- Guide: ⓘ explanations (partials/guide/explain, public/js/fitits-guide.js) ---------- */
.fx-explain, .fx-explain-sample { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 1.5px solid rgba(var(--primary-rgb), .45); background: transparent; color: var(--primary-bg-color); padding: 0; margin-left: 6px; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; font: italic 700 12px/1 Georgia, 'Times New Roman', serif; cursor: pointer; position: relative; transition: background .15s ease, color .15s ease; }
.fx-explain::after { content: ""; position: absolute; inset: -10px; } /* 40px tap target */
.fx-explain:hover, .fx-explain[aria-expanded="true"] { background: var(--primary-bg-color); color: #fff; border-color: var(--primary-bg-color); }
.fx-explain:focus-visible { outline: 2px solid var(--primary-bg-color); outline-offset: 2px; }
.fx-explain-sample { cursor: default; margin: 0 2px; width: 18px; height: 18px; }
.fdb-brief .fx-explain, .ffd-answer.ok .fx-explain, .ffd-answer.bad .fx-explain { border-color: rgba(255, 255, 255, .7); color: #fff; }
.fdb-brief .fx-explain:hover, .fdb-brief .fx-explain[aria-expanded="true"] { background: #fff; color: var(--primary-bg-color); }
.fdb-eyebrow .fx-explain, .fib-eyebrow .fx-explain { width: 18px; height: 18px; font-size: 11px; margin-left: 4px; text-transform: none; letter-spacing: 0; }
.fx-guide-welcome-hint { font-size: 13px !important; }
.fx-explain-panel { position: absolute; z-index: 1080; width: 320px; max-width: calc(100vw - 16px); background: #fff; color: var(--fx-ink); border: 1px solid var(--fx-line); border-radius: 14px; box-shadow: 0 18px 48px rgba(15, 23, 32, .2); padding: 14px 40px 12px 16px; font-size: 13.5px; line-height: 1.5; outline: none; animation: fx-explain-in .15s ease-out; }
.fx-explain-panel[hidden] { display: none; }
.fx-explain-panel .fx-explain-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; letter-spacing: -.01em; }
.fx-explain-panel p { margin: 0 0 6px; color: var(--fx-ink-2); }
.fx-explain-panel p:last-child { margin-bottom: 0; }
.fx-explain-panel strong, .fx-explain-pop .driver-popover-description strong { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--fx-subtle); margin-bottom: 1px; }
.fx-explain-pop .driver-popover-description p { margin: 0 0 8px; }
.fx-explain-pop .driver-popover-description p:last-child { margin-bottom: 0; }
.fx-explain-close { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--fx-muted); font-size: 20px; line-height: 1; cursor: pointer; }
.fx-explain-close:hover { background: rgba(127, 127, 127, .12); }
.fx-explain-close:focus-visible { outline: 2px solid var(--primary-bg-color); outline-offset: 1px; }
@keyframes fx-explain-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (max-width: 575px) {
    .fx-explain-panel { position: fixed; left: 8px !important; right: 8px; bottom: 8px; top: auto !important; width: auto; max-width: none; padding-bottom: 16px; box-shadow: 0 -8px 40px rgba(15, 23, 32, .25); }
}
@media (prefers-reduced-motion: reduce) { .fx-explain-panel { animation: none; } .fx-explain { transition: none; } }
body.darkmode .fx-explain-panel { background: #22242b; color: #f1f3f5; border-color: rgba(255, 255, 255, .12); }
body.darkmode .fx-explain-panel p { color: rgba(255, 255, 255, .78); }
body.darkmode .fx-explain-panel strong { color: rgba(255, 255, 255, .55); }
.fx-menu-tip { position: absolute; z-index: 1085; max-width: 260px; background: #0b1e33; color: #fff; font-size: 13px; line-height: 1.45; padding: 8px 12px; border-radius: 10px; box-shadow: 0 10px 30px rgba(11, 30, 51, .25); pointer-events: auto; }
.fx-menu-tip[hidden] { display: none; }
body.darkmode .fx-menu-tip { background: #f1f3f5; color: #0b1e33; }

/* ---------- Guide: "How do I…?" walkthroughs (public/js/fitits-tasks.js) ---------- */
.fx-task-panel { position: fixed; inset: 0; z-index: 1090; background: rgba(11, 30, 51, .45); display: flex; justify-content: flex-end; }
.fx-task-panel[hidden] { display: none; }
.fx-task-panel-box { width: 420px; max-width: 100%; height: 100%; overflow-y: auto; background: #fff; color: var(--fx-ink); padding: 20px 20px 32px; box-shadow: -18px 0 48px rgba(11, 30, 51, .2); animation: fx-task-in .2s ease-out; }
.fx-task-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fx-task-panel-head h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.fx-task-close { width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; font-size: 24px; color: var(--fx-muted); }
.fx-task-close:hover { background: rgba(127, 127, 127, .12); }
.fx-task-intro { color: var(--fx-muted); font-size: 14px; margin: 4px 0 12px; }
.fx-task-list h3 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--fx-subtle); margin: 18px 0 6px; }
.fx-task-list ul { list-style: none; margin: 0; padding: 0; }
.fx-task-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--fx-line); }
.fx-task-name { font-size: 14px; font-weight: 600; min-width: 0; }
.fx-task-tick { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; background: rgba(25, 135, 84, .14); color: #198754; font-size: 11px; align-items: center; justify-content: center; margin-right: 6px; }
.fx-task-acts { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.fx-task-acts .btn { min-height: 34px; }
.fx-task-read { font-size: 12px; }
.fx-task-empty { color: var(--fx-muted); margin-top: 16px; }
.fx-task-pop .fx-task-progress { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--fx-subtle); margin-bottom: 4px; }
.fx-task-pop .fx-task-note { background: rgba(255, 153, 0, .14); color: #8a5300; border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.fx-task-lost { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 1085; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: #0b1e33; color: #fff; padding: 10px 14px; border-radius: 12px; box-shadow: 0 12px 32px rgba(11, 30, 51, .3); font-size: 14px; max-width: calc(100vw - 24px); }
.fx-task-lost button { border: 0; border-radius: 8px; padding: 6px 12px; font-weight: 600; background: #fff; color: #0b1e33; }
.fx-task-lost .fx-task-lost-stop { background: transparent; color: #fff; text-decoration: underline; }
html.fx-task-open { overflow: hidden; }
@keyframes fx-task-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 575px) { .fx-task-panel-box { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .fx-task-panel-box { animation: none; } }
body.darkmode .fx-task-panel-box { background: #1b1d23; color: #f1f3f5; }
