/** HEIGO shell ownership
 * ---------------------
 * Brand sizing, desktop navigation, global account actions and the site
 * footer live here. Page CSS must not redefine these selectors.*/

/*Migrated legacy shell rules, kept in original cascade order*/

.header-logo {
    max-width: 300px;
    margin-bottom: 15px;
    background: white;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    flex-wrap: wrap;
}

.nav-tab {
    padding: 12px 24px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: color 160ms ease, background 160ms ease, transform 120ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 160ms ease;
}

.nav-tab:hover {
    background: var(--accent-bg);
    color: var(--text-primary);
}

.nav-tab.active {
    background: var(--accent-gradient);
    color: #1a1a2e;
    font-weight: 600;
}

.nav-tab.hidden-tab {
    display: none;
}

header.shell-header {
    position: relative;
    z-index: 500;
    isolation: isolate;
    overflow: visible;
    text-align: left;
    padding: 0;
    border-bottom: none;
    margin-bottom: 24px;
}

.nav-tabs {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.shell-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    border-radius: 28px;
    padding: 18px 22px;
    margin-bottom: 20px;
    overflow: visible;
}

.brand-stack {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.header-logo {
    width: 74px;
    height: 74px;
    object-fit: cover;
    margin-bottom: 0;
    padding: 8px;
    flex-shrink: 0;
    border-radius: 26px;
}

.brand-copy h1 {
    margin: 0 0 8px;
    font-size: clamp(2rem, 3vw, 2.85rem);
    line-height: 1.05;
    color: var(--text-primary);
    background: none;
    -webkit-text-fill-color: initial;
}

.brand-copy p {
    margin: 0;
    max-width: 620px;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.brand-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.shell-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    overflow: visible;
}

body.global-coach-menu-open header.shell-header {
    z-index: calc(var(--z-popover) + 10);
}

.global-coach-account {
    position: relative;
    z-index: 120;
}

.global-coach-login,
.global-coach-trigger,
.shell-utility-button {
    display: flex;
    min-height: 50px;
    align-items: center;
    gap: 9px;
    padding: 5px 10px 5px 6px;
    border: 1px solid color-mix(in srgb, var(--accent-primary) 28%, var(--border-color));
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg-tertiary) 82%, transparent);
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(25, 51, 44, 0.08);
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.global-coach-login,
.shell-utility-button {
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 850;
    white-space: nowrap;
}

.global-coach-login:hover,
.global-coach-trigger:hover,
.shell-utility-button:hover,
.global-coach-account.is-open .global-coach-trigger {
    border-color: color-mix(in srgb, var(--accent-primary) 58%, var(--border-color));
    background: color-mix(in srgb, var(--accent-primary) 9%, var(--bg-tertiary));
    transform: translateY(-1px);
}

.global-coach-login:focus-visible,
.global-coach-trigger:focus-visible,
.shell-utility-button:focus-visible {
    border-color: color-mix(in srgb, var(--accent-primary) 72%, var(--border-color));
    outline: 3px solid color-mix(in srgb, var(--accent-primary) 18%, transparent);
    outline-offset: 2px;
}

.shell-utility-button:disabled {
    cursor: wait;
    opacity: 0.72;
    transform: none;
}

.global-coach-login-mark,
.shell-utility-mark {
    color: var(--accent-primary);
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1;
}

.shell-utility-mark svg,
.nav-tab-icon svg,
.mobile-bottom-nav-icon svg,
.mobile-more-menu-item > span:first-child svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mobile-more-menu-item > span:first-child svg {
    width: 18px;
    height: 18px;
}

.theme-control-icon .theme-sun-path {
    display: none;
}

.theme-control-icon.is-dark-mode .theme-moon-path {
    display: none;
}

.theme-control-icon.is-dark-mode .theme-sun-path {
    display: initial;
}

.shell-utility-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid color-mix(in srgb, var(--accent-primary) 24%, transparent);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: shellUtilitySpin 0.7s linear infinite;
}

.global-coach-avatar {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--accent-primary) 34%, var(--border-color));
    border-radius: 50%;
    background: linear-gradient(145deg, color-mix(in srgb, var(--accent-primary) 18%, var(--bg-tertiary)), var(--bg-secondary));
    color: var(--accent-primary);
    font-size: 0.68rem;
    font-weight: 900;
}

.global-coach-avatar.is-large {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
}

.global-coach-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.global-coach-copy {
    display: grid;
    min-width: 0;
    gap: 1px;
    text-align: left;
}

.global-coach-copy strong {
    max-width: 128px;
    overflow: hidden;
    color: var(--text-primary);
    font-size: 0.76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-coach-copy small {
    max-width: 128px;
    overflow: hidden;
    color: var(--text-muted);
    font-size: var(--text-xs);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-coach-chevron {
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: transform 160ms ease;
}

.global-coach-account.is-open .global-coach-chevron {
    transform: rotate(180deg);
}

.global-coach-menu {
    position: absolute;
    z-index: var(--z-popover);
    top: calc(100% + 10px);
    right: 0;
    width: min(330px, calc(100vw - 24px));
    max-height: min(70dvh, 540px);
    padding: 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    border: 1px solid color-mix(in srgb, var(--accent-primary) 24%, var(--border-color));
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface-strong) 97%, white 3%);
    box-shadow: 0 24px 60px rgba(18, 43, 36, 0.2);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    transform-origin: top right;
    animation: global-coach-menu-in 160ms ease-out both;
}

.global-coach-menu-head {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 7px 7px 12px;
    border-bottom: 1px solid var(--border-color);
}

.global-coach-menu-head > div {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.global-coach-menu-head strong {
    color: var(--text-primary);
    font-size: 0.88rem;
}

.global-coach-menu-head span,
.global-coach-menu-head small {
    color: var(--text-secondary);
    font-size: var(--text-xs);
}

.global-coach-menu-head small {
    color: var(--accent-primary);
}

.global-coach-menu-actions {
    display: grid;
    gap: 3px;
    padding: 7px 0;
}

.global-coach-menu-actions > button,
.global-coach-menu-alert {
    display: grid;
    grid-template-columns: 30px 1fr;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
}

.global-coach-menu-actions > button:hover,
.global-coach-menu-actions > button:focus-visible {
    background: color-mix(in srgb, var(--accent-primary) 9%, transparent);
}

.global-coach-menu-actions > button > span,
.global-coach-menu-alert > span {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 9px;
    background: color-mix(in srgb, var(--accent-primary) 11%, transparent);
    color: var(--accent-primary);
    font-size: 0.76rem;
    font-weight: 900;
}

.global-coach-menu-actions > button > span .ui-icon,
.global-coach-chevron .ui-icon {
    width: 16px;
    height: 16px;
}

.global-coach-chevron {
    display: grid;
    place-items: center;
}

.global-coach-menu-actions > button > div,
.global-coach-menu-alert > div {
    display: grid;
    gap: 1px;
}

.global-coach-menu-actions strong,
.global-coach-menu-alert strong {
    color: var(--text-primary);
    font-size: 0.74rem;
}

.global-coach-menu-actions small,
.global-coach-menu-alert small {
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.global-coach-menu-alert {
    margin-top: 7px;
    background: color-mix(in srgb, #d99a30 10%, transparent);
}

.global-coach-menu-alert > span,
.global-coach-menu-alert strong {
    color: #b77915;
}

.global-coach-logout {
    width: 100%;
    padding: 9px;
    border: 0;
    border-top: 1px solid var(--border-color);
    background: transparent;
    color: #c74658;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 800;
    text-align: center;
}

.shell-button {
    min-height: 48px;
    padding: 12px 20px;
    border-radius: 999px;
}

.theme-toggle {
    min-width: 0;
}

.nav-tabs {
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-bottom: none;
    border-radius: 24px;
    margin-bottom: 22px;
}

.nav-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
}

.nav-tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-bg) 78%, transparent);
    color: var(--accent-primary);
    font-size: 0.82rem;
    line-height: 1;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-primary) 16%, transparent);
    flex-shrink: 0;
}

.nav-tab-icon > svg {
    width: 16px;
    height: 16px;
}

.team-nav-icon svg {
    width: 18px;
    height: 18px;
    display: block;
    overflow: visible;
}

.team-nav-icon .team-nav-shirt {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.team-nav-icon .team-nav-stripe {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.2;
    stroke-linecap: round;
    opacity: 0.34;
}

.nav-stat-icon {
    gap: 2px;
    align-items: flex-end;
    padding: 5px;
}

.nav-stat-icon i {
    display: block;
    width: 3px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.95;
}

.nav-stat-icon i:nth-child(1) {
    height: 7px;
}

.nav-stat-icon i:nth-child(2) {
    height: 12px;
}

.nav-stat-icon i:nth-child(3) {
    height: 9px;
}

.nav-tab.active {
    color: #ffffff;
    background: var(--accent-gradient);
    box-shadow: 0 12px 26px rgba(30, 102, 245, 0.24);
}

.nav-tab.active .nav-tab-icon {
    background: rgba(255,255,255,0.22);
    color: #ffffff;
    box-shadow: none;
}

body:not(.light-mode) .nav-tab.active {
    color: #16161e;
    box-shadow: 0 12px 26px rgba(122, 162, 247, 0.22);
}

body:not(.light-mode) .nav-tab.active .nav-tab-icon {
    background: rgba(22,22,30,0.16);
    color: #16161e;
}

.site-footer {
    margin-top: 26px;
    padding: 18px 0 22px;
}

.footer-links-band {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    margin: 0 auto 2px;
    font-size: 0.9rem;
    line-height: 1.2;
}

.footer-link-card {
    display: inline-block;
    min-width: 4.5em;
    padding: 0;
    text-align: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: inherit;
    font-weight: 400;
    letter-spacing: 0;
    background: none;
    border: none;
    box-shadow: none;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.footer-link-card:hover {
    transform: none;
    background: none;
    color: var(--text-primary);
    text-decoration: underline;
}

.footer-signature {
    text-align: center;
}

.footer-visit-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    color: var(--text-muted);
    font-family: var(--font-data);
    font-size: 0.72rem;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
    opacity: 0.72;
}

.footer-visit-stats[hidden] {
    display: none;
}

.footer-visit-divider {
    opacity: 0.55;
}

.footer-version {
    display: inline-block;
    margin-left: 8px;
    color: var(--text-muted);
    opacity: 0.75;
    font-size: 0.82em;
    font-variant-numeric: tabular-nums;
}

.footer-compliance {
    margin-top: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.35;
}

.footer-compliance-separator {
    color: var(--text-muted);
    opacity: 0.5;
}

.footer-compliance a {
    color: var(--text-muted);
    text-decoration: none;
    opacity: 0.76;
    transition: color 0.2s ease, opacity 0.2s ease, text-decoration-color 0.2s ease;
}

.footer-public-security-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.footer-public-security-icon {
    width: 18px;
    height: 20px;
    object-fit: contain;
    flex: 0 0 auto;
}

.footer-compliance a:hover,
.footer-compliance a:focus-visible {
    color: var(--text-primary);
    text-decoration: underline;
    opacity: 1;
}

body.light-mode .footer-link-card:hover {
    color: var(--text-primary);
}

:root {
    --mobile-bottom-nav-height: 66px;
    --mobile-bottom-nav-gap: 12px;
    --mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
    --mobile-dock-bottom: calc(var(--mobile-bottom-nav-height) + var(--mobile-safe-bottom) + 22px);
}

.mobile-bottom-nav,
.mobile-more-menu {
    display: none;
}

.mobile-more-menu-divider {
    height: 1px;
    margin: 2px 8px;
    background: var(--border-color);
}

.nav-tabs.glass-card {
    gap: 4px;
    padding: 7px;
    border-radius: 20px;
}

.nav-tab {
    position: relative;
    min-height: 46px;
    gap: 8px;
    padding: 10px 15px;
    border: 1px solid transparent;
    color: var(--text-secondary);
}

.nav-tab .nav-tab-icon {
    width: 22px;
    height: 22px;
    padding: 0;
    background: transparent;
    box-shadow: none;
    transition: color var(--ui-duration-fast) var(--ui-ease-out), background var(--ui-duration-fast) var(--ui-ease-out);
}

.nav-tab .nav-tab-icon > svg,
.nav-tab .nav-stat-icon > svg {
    width: 18px;
    height: 18px;
}

.nav-tab:hover {
    background: color-mix(in srgb, var(--accent-primary) 7%, transparent);
    color: var(--text-primary);
}

.nav-tab.active,
body:not(.light-mode) .nav-tab.active {
    border-color: color-mix(in srgb, var(--accent-primary) 24%, transparent);
    background: color-mix(in srgb, var(--accent-primary) 11%, var(--surface-strong));
    color: var(--accent-primary);
    box-shadow: inset 0 1px 0 color-mix(in srgb, white 42%, transparent), 0 5px 14px color-mix(in srgb, var(--accent-primary) 10%, transparent);
    transform: none;
}

.nav-tab.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    opacity: .72;
    transform: translateX(-50%);
}

.nav-tab.active .nav-tab-icon,
body:not(.light-mode) .nav-tab.active .nav-tab-icon {
    background: color-mix(in srgb, var(--accent-primary) 13%, transparent);
    color: var(--accent-primary);
    box-shadow: none;
}

.nav-stat-icon,
.mobile-stat-icon {
    padding: 0;
}

.mobile-more-menu-label {
    padding: 5px 10px 2px;
    color: var(--text-secondary);
    font-size: var(--text-xs);
    font-weight: 850;
    letter-spacing: .04em;
}

@keyframes shellUtilitySpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes global-coach-menu-in {
    from {
        opacity: 0;
        transform: translateY(-5px) scale(0.98);
    }

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

body:not([data-active-tab="home"]) header.shell-header {
    margin-bottom: 14px;
}

body:not([data-active-tab="home"]) .shell-topbar {
    min-height: 78px;
    padding: 10px 16px;
    margin-bottom: 12px;
    border-radius: 20px;
}

body:not([data-active-tab="home"]) .header-logo {
    width: 52px;
    height: 52px;
    padding: 5px;
    border-radius: 17px;
}

body:not([data-active-tab="home"]) .brand-stack {
    gap: 12px;
}

body:not([data-active-tab="home"]) .brand-copy h1 {
    margin: 0;
    font-size: clamp(1.42rem, 2vw, 1.82rem);
    line-height: 1.08;
}

body:not([data-active-tab="home"]) .brand-copy .brand-eyebrow {
    display: none;
}

body:not([data-active-tab="home"]) .brand-copy p {
    display: none;
}

body:not([data-active-tab="home"]) .global-coach-login,
body:not([data-active-tab="home"]) .global-coach-trigger,
body:not([data-active-tab="home"]) .shell-utility-button {
    min-height: 42px;
}
