/**
 * Apple-inspired UI — airy spacing, soft surfaces, minimal boxes
 */

:root {
    --gym-page: #f5f5f7;
    --gym-card: #ffffff;
    --gym-topbar-bg: rgba(255, 255, 255, 0.78);
    --gym-body-text: #1d1d1f;
    --gym-radius: 14px;
    --gym-radius-sm: 10px;
    --gym-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
    --gym-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
    --gym-font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
    --gym-font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
    --gym-space-page: 2rem;
    --gym-space-card: 1.75rem;
    --gym-space-section: 1.5rem;
    --gym-line: #e8e8ed;
    --gym-surface-soft: #f5f5f7;
}

/* ─── Typography & rhythm ─── */
body {
    line-height: 1.47059;
    letter-spacing: -0.022em;
    font-size: 15px;
}

h1, h2, h3, h4, h5, h6, .gym-display {
    font-weight: 600;
    letter-spacing: -0.025em;
}

p {
    margin-top: 0;
    margin-bottom: 1em;
}

/* ─── App shell (respect System Theme variables) ─── */
.gym-sidebar {
    background: var(--gym-bg);
    border-right: 1px solid var(--gym-border);
}

.gym-sidebar-nav {
    padding: 1.25rem 0.85rem;
}

.gym-nav-label {
    padding: 1rem 1rem 0.5rem;
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
    color: var(--gym-muted);
}

.gym-nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.55rem 0.85rem;
    margin-bottom: 3px;
    border-radius: 8px;
    color: var(--gym-muted);
}

.gym-nav-link i {
    font-size: 1rem;
    opacity: 0.85;
}

.gym-nav-link.active {
    background: color-mix(in srgb, var(--gym-accent) 16%, transparent);
    color: var(--gym-text);
    box-shadow: inset 2px 0 0 var(--gym-accent);
}

.gym-nav-link:hover {
    background: color-mix(in srgb, var(--gym-text) 8%, transparent);
    color: var(--gym-text);
}

.gym-user-chip {
    background: var(--gym-surface);
}

.gym-user-avatar {
    background: var(--gym-surface-2);
    border: 1px solid var(--gym-border);
    color: var(--gym-text);
    font-weight: 600;
    border-radius: 50%;
}

.gym-user-name {
    color: var(--gym-text);
}

.gym-user-role {
    color: var(--gym-muted);
}

/* ─── Sidebar brand / logo ─── */
.gym-sidebar-brand {
    padding: 1.15rem 1rem 1.1rem;
    border-bottom: 1px solid var(--gym-border);
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gym-sidebar-brand .gym-brand--sidebar {
    flex: 1;
    min-width: 0;
}

.gym-sidebar-collapse {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: 1px solid var(--gym-border);
    border-radius: 8px;
    background: var(--gym-surface);
    color: var(--gym-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.gym-sidebar-collapse:hover {
    background: color-mix(in srgb, var(--gym-text) 8%, transparent);
    color: var(--gym-text);
}

.gym-nav-group {
    margin-bottom: 0.35rem;
    position: relative;
}

.gym-nav-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.85rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--gym-muted);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
}

.gym-nav-group-toggle i:first-child {
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
    opacity: 0.9;
}

.gym-nav-group-toggle .gym-nav-chevron {
    margin-left: auto;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    opacity: 0.7;
}

.gym-nav-group.is-open .gym-nav-group-toggle .gym-nav-chevron {
    transform: rotate(180deg);
}

.gym-nav-group-toggle:hover,
.gym-nav-group.is-open > .gym-nav-group-toggle {
    background: color-mix(in srgb, var(--gym-text) 8%, transparent);
    color: var(--gym-text);
}

.gym-nav-group.has-active > .gym-nav-group-toggle {
    color: var(--gym-accent);
}

.gym-nav-group-menu {
    display: none;
    padding: 0.15rem 0 0.35rem 0.35rem;
}

.gym-nav-group.is-open > .gym-nav-group-menu {
    display: block;
}

.gym-nav-group-menu .gym-nav-link {
    padding-left: 2.35rem;
    font-size: 0.84rem;
}

.gym-nav-standalone {
    margin-bottom: 0.35rem;
}

.gym-nav-link.gym-nav-link--alert:not(.active) {
    color: #dc2626;
}

.gym-sidebar,
.gym-main {
    transition: width 0.22s ease, margin-left 0.22s ease, transform 0.25s ease;
}

/* Collapsed sidebar */
.gym-shell.sidebar-collapsed {
    --gym-sidebar-w: 74px;
}

.gym-shell.sidebar-collapsed .gym-brand-copy,
.gym-shell.sidebar-collapsed .gym-nav-text,
.gym-shell.sidebar-collapsed .gym-nav-chevron,
.gym-shell.sidebar-collapsed .gym-user-chip > div:last-child,
.gym-shell.sidebar-collapsed .gym-nav-link-logout span {
    display: none;
}

.gym-shell.sidebar-collapsed .gym-sidebar-brand {
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
    padding-inline: 0.65rem;
}

.gym-shell.sidebar-collapsed .gym-brand--sidebar {
    justify-content: center;
}

.gym-shell.sidebar-collapsed .gym-sidebar-collapse {
    display: flex;
    width: 100%;
    justify-content: center;
}

.gym-sidebar-expand-topbar {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--gym-border, #e2e8f0);
    border-radius: 10px;
    background: var(--gym-card, #fff);
    color: var(--gym-muted, #64748b);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.15rem;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.gym-sidebar-expand-topbar:hover {
    background: color-mix(in srgb, var(--gym-text, #0f172a) 8%, transparent);
    color: var(--gym-text, #0f172a);
}

body.sidebar-collapsed .gym-sidebar-expand-topbar {
    display: flex;
}

.gym-shell.sidebar-collapsed .gym-nav-group-menu {
    display: none !important;
}

.gym-shell.sidebar-collapsed .gym-nav-group-toggle {
    justify-content: center;
    padding-inline: 0.65rem;
}

.gym-shell.sidebar-collapsed .gym-nav-group-toggle .gym-nav-text,
.gym-shell.sidebar-collapsed .gym-nav-group-toggle .gym-nav-chevron {
    display: none;
}

.gym-shell.sidebar-collapsed .gym-nav-link {
    justify-content: center;
    padding-inline: 0.65rem;
}

.gym-shell.sidebar-collapsed .gym-nav-group:hover .gym-nav-group-menu,
.gym-shell.sidebar-collapsed .gym-nav-group:focus-within .gym-nav-group-menu {
    display: block !important;
    position: absolute;
    left: calc(100% + 6px);
    top: 0;
    min-width: 210px;
    padding: 0.45rem;
    background: var(--gym-bg);
    border: 1px solid var(--gym-border);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    z-index: 200;
}

.gym-shell.sidebar-collapsed .gym-nav-group-menu .gym-nav-link {
    padding-left: 0.85rem;
}

.gym-shell.sidebar-collapsed .gym-user-chip {
    justify-content: center;
    padding-inline: 0.5rem;
}

@media (max-width: 900px) {
    .gym-sidebar-collapse {
        display: none;
    }

    .gym-sidebar-expand-topbar {
        display: none !important;
    }
}


.gym-brand--sidebar {
    gap: 0.7rem;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.15s ease;
}

.gym-brand--sidebar:hover {
    opacity: 0.88;
}

.gym-brand-mark {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--gym-surface);
    border: 1px solid var(--gym-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gym-brand--sidebar .gym-brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
    border-radius: 0;
}

.gym-brand--sidebar .gym-brand-icon {
    width: 100%;
    height: 100%;
    border-radius: 0;
    font-size: 1.2rem;
    background: transparent;
    border: none;
    box-shadow: none;
    color: var(--gym-accent);
}

.gym-brand-copy {
    min-width: 0;
    flex: 1;
}

.gym-brand--sidebar .gym-brand-text {
    font-family: var(--gym-font-display);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--gym-brand-name-color, var(--gym-text));
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gym-brand-tagline {
    margin-top: 0.2rem;
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--gym-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gym-topbar {
    padding: 0.875rem var(--gym-space-page);
    background: var(--gym-topbar-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--gym-border, rgba(0, 0, 0, 0.06));
}

.gym-topbar h1 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--gym-body-text);
}

.gym-content {
    padding: var(--gym-space-page) 2.25rem 2.5rem;
    background: var(--gym-page);
}

.gym-page-header {
    margin-bottom: var(--gym-space-section);
    gap: 1.25rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
}

.gym-page-header h2,
.gym-page-title {
    font-size: 1.625rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
}

.gym-page-sub,
.gym-page-subtitle {
    color: #86868b;
    margin: 0.4rem 0 0;
    font-size: 0.9375rem;
    line-height: 1.5;
    max-width: 42rem;
}

/* ─── Cards & surfaces ─── */
.gym-card {
    border: none;
    border-radius: var(--gym-radius);
    box-shadow: var(--gym-shadow);
    margin-bottom: var(--gym-space-section);
    overflow: hidden;
    background: var(--gym-card);
    color: var(--gym-body-text);
}

.gym-card-body {
    padding: var(--gym-space-card) 1.5rem;
}

.gym-card-padded {
    padding: 1.5rem;
}

.gym-card-title {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1d1d1f;
}

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

.gym-divider {
    border: none;
    border-top: 1px solid var(--gym-line);
    margin: 0 2rem;
}

.gym-surface-inset {
    background: var(--gym-surface-soft);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}

/* ─── Stats ─── */
.gym-stat-grid {
    gap: 1rem;
    margin-bottom: var(--gym-space-section);
}

.gym-stat-card {
    border: none;
    box-shadow: none;
    background: var(--gym-surface-soft);
    padding: 1.5rem 1.75rem;
    border-radius: 12px;
    gap: 1.15rem;
}

.gym-stat-card:hover {
    transform: none;
    box-shadow: none;
}

.gym-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 1.1rem;
    background: #fff;
    color: #86868b;
}

.gym-stat-icon.orange,
.gym-stat-icon.green,
.gym-stat-icon.blue,
.gym-stat-icon.purple {
    background: #fff;
    color: #86868b;
}

.gym-stat-card .label {
    font-size: 0.8125rem;
    color: #86868b;
    margin-bottom: 0.35rem;
}

.gym-stat-card .value {
    font-size: 1.375rem;
    font-weight: 600;
    color: #1d1d1f;
}

.gym-stat-sub {
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

/* ─── Dashboard ─── */
.gym-dashboard-compact .gym-page-header--compact {
    margin-bottom: 1.25rem;
}

.gym-dashboard-compact .gym-page-header--compact h2 {
    font-size: 1.625rem;
}

.gym-quick-bar {
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
    gap: 0.625rem;
    margin-bottom: 1.75rem;
}

.gym-quick-bar-link {
    padding: 0.5rem 1rem;
    border-radius: 980px;
    border: none;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    color: #1d1d1f;
    font-size: 0.8125rem;
    font-weight: 500;
}

.gym-quick-bar-link i {
    color: #86868b;
    font-size: 0.9375rem;
}

.gym-quick-bar-link:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    color: #1d1d1f;
}

.gym-quick-bar-link.is-primary {
    background: var(--gym-accent);
    color: #fff;
}

.gym-quick-bar-link.is-primary i {
    color: #fff;
}

.gym-quick-bar-link.is-primary:hover {
    background: var(--gym-accent-hover);
    opacity: 1;
}

.gym-dashboard-grid {
    gap: 1.25rem;
}

.gym-dashboard-block,
.gym-dashboard-panel {
    border: none;
    border-radius: var(--gym-radius);
    padding: 1.5rem 1.75rem;
    box-shadow: var(--gym-shadow);
    background: var(--gym-card);
    margin-bottom: 0;
}

.gym-dashboard-panel .gym-card-body {
    padding: 0;
}

.gym-dashboard-block-head {
    margin-bottom: 1.15rem;
    gap: 0.5rem 1rem;
}

.gym-dashboard-block-head h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1d1d1f;
}

.gym-dashboard-block-head h3 i {
    color: #86868b;
}

.gym-dashboard-block-head a {
    color: var(--gym-accent);
    font-weight: 500;
    font-size: 0.8125rem;
}

.gym-dashboard-meta {
    color: #86868b;
    font-size: 0.8125rem;
}

.gym-stat-grid--dash {
    gap: 0.75rem;
    margin-bottom: 0;
}

.gym-stat-card--dash {
    border: none;
    background: var(--gym-surface-soft);
    border-radius: 12px;
    padding: 1.15rem 1.35rem;
    gap: 0;
    box-shadow: none;
}

.gym-stat-card--dash .gym-stat-icon {
    display: none;
}

.gym-stat-card--dash .label {
    font-size: 0.8125rem;
    margin-bottom: 0.4rem;
    color: #86868b;
}

.gym-stat-card--dash .value {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.2;
}

.gym-stat-card--dash .value--money {
    font-size: 1rem;
}

.gym-stat-card--dash .gym-stat-sub {
    font-size: 0.75rem;
    margin-top: 0.3rem;
}

.gym-bar-chart-bar {
    background: #c7c7cc;
    border-radius: 4px 4px 2px 2px;
}

.gym-dashboard-empty {
    padding: 2rem 0;
    font-size: 0.9375rem;
}

/* ─── Tables (list-style) ─── */
.gym-table-wrap {
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
}

.gym-table {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 0.9375rem;
}

.gym-table th {
    background: #f8fafc;
    border-bottom: 1px solid var(--gym-line, #e8ecf1);
    padding: 0.85rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    text-align: left;
    white-space: nowrap;
}

.gym-table td {
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    color: #1d1d1f;
    vertical-align: middle;
}

.gym-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

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

.gym-table-compact th,
.gym-table-compact td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

/* Table inside card — stay inside card padding (no negative bleed) */
.gym-card > .gym-table-wrap {
    margin: 0;
    padding: 0;
}

.gym-card > .gym-table-wrap .gym-table th:first-child,
.gym-card > .gym-table-wrap .gym-table td:first-child {
    padding-left: 1.5rem;
}

.gym-card > .gym-table-wrap .gym-table th:last-child,
.gym-card > .gym-table-wrap .gym-table td:last-child {
    padding-right: 1.5rem;
}

.gym-card > .gym-table-wrap .gym-table thead th {
    padding-top: 1.15rem;
}

.gym-card > .gym-table-wrap .gym-table tbody tr:last-child td {
    padding-bottom: 1.15rem;
}

.gym-card-body .gym-table-wrap {
    margin: 0;
    padding: 0;
}

.gym-card-body .gym-table th:first-child,
.gym-card-body .gym-table td:first-child {
    padding-left: 0;
}

.gym-card-body .gym-table th:last-child,
.gym-card-body .gym-table td:last-child {
    padding-right: 0;
}

.gym-dashboard-block .gym-table-wrap,
.gym-dashboard-panel .gym-table-wrap {
    margin: 0;
}

.gym-dashboard-block .gym-table th:first-child,
.gym-dashboard-block .gym-table td:first-child,
.gym-dashboard-panel .gym-table th:first-child,
.gym-dashboard-panel .gym-table td:first-child {
    padding-left: 0;
}

.gym-dashboard-block .gym-table th:last-child,
.gym-dashboard-block .gym-table td:last-child,
.gym-dashboard-panel .gym-table th:last-child,
.gym-dashboard-panel .gym-table td:last-child {
    padding-right: 0;
}

.gym-table-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    white-space: nowrap;
}

.gym-inline-form {
    display: inline-flex;
    margin: 0;
}

.gym-hint-list {
    margin: 0;
    padding-left: 1.25rem;
    color: #64748b;
    line-height: 1.65;
}

.gym-hint-list li + li {
    margin-top: 0.5rem;
}

/* ─── Forms & buttons ─── */
.gym-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
}

.gym-input-group {
    margin-bottom: 1.35rem;
}

.gym-input {
    padding: 0.75rem 1rem;
    border: 1px solid #d2d2d7;
    border-radius: var(--gym-radius-sm);
    font-size: 1rem;
    background: #fff;
}

.gym-input:focus {
    border-color: var(--gym-accent);
    box-shadow: 0 0 0 3px rgba(232, 93, 26, 0.12);
}

.gym-btn {
    border-radius: 980px;
    padding: 0.625rem 1.35rem;
    font-weight: 500;
    font-size: 0.9375rem;
}

.gym-btn-primary {
    background: var(--gym-accent);
    box-shadow: none;
}

.gym-btn-primary:hover {
    transform: none;
    filter: brightness(0.96);
}

.gym-btn-success {
    background: var(--gym-success);
    box-shadow: none;
}

.gym-btn-success:hover {
    filter: brightness(0.96);
    transform: none;
}

.gym-btn-outline {
    border-color: #d2d2d7;
}

.gym-btn:focus-visible,
.gym-input:focus {
    outline: none;
}

.gym-filter-bar {
    margin-bottom: 1.75rem;
    gap: 1rem;
}

.gym-form-hint,
small.gym-muted,
.gym-muted-text {
    color: #86868b;
    font-size: 0.8125rem;
    line-height: 1.5;
}

/* ─── Badges & alerts ─── */
.gym-badge,
.gym-badge-active,
.gym-badge-expired,
.gym-badge-pending {
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.2rem 0.65rem;
}

.gym-alert {
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: none;
}

.gym-empty {
    padding: 3.5rem 2rem;
}

/* ─── Misc admin ─── */
.gym-action-tile {
    padding: 1.35rem 1rem;
    box-shadow: none;
    border: 1px solid var(--gym-line);
    border-radius: 12px;
}

.gym-action-tile i {
    font-size: 1.25rem;
    color: #86868b;
}

.gym-action-tile:hover {
    transform: none;
    box-shadow: none;
    border-color: #c7c7cc;
    color: #1d1d1f;
}

.gym-action-tile.highlight {
    background: var(--gym-card);
    border-color: var(--gym-accent);
    color: #1d1d1f;
}

.gym-action-tile.highlight i {
    color: var(--gym-accent);
}

.gym-action-tile.highlight:hover {
    background: #fffaf7;
}

.gym-scan-icon {
    animation: none;
    width: 88px;
    height: 88px;
    font-size: 2rem;
    background: var(--gym-surface-soft);
    border: none;
    color: #86868b;
    border-radius: 50%;
}

.gym-scan-tab.active {
    background: var(--gym-surface-soft);
    color: #1d1d1f;
    border-color: var(--gym-line);
}

.gym-link {
    font-weight: 500;
}

/* ─── Guide pages ─── */
.gym-guide-sheet .gym-card-body {
    padding: 0;
}

.gym-guide-section {
    padding: 1.5rem 2rem;
}

.gym-guide-section h3 {
    margin: 0 0 1rem;
    font-size: 1.0625rem;
    font-weight: 600;
    color: #1d1d1f;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gym-guide-section h3 i {
    color: #86868b;
    font-size: 1rem;
}

.gym-guide-body {
    line-height: 1.6;
    color: #424245;
    font-size: 0.9375rem;
}

.gym-guide-body ol,
.gym-guide-body ul {
    margin-bottom: 1.25rem;
    padding-left: 1.35rem;
}

.gym-guide-body li + li {
    margin-top: 0.35rem;
}

.gym-guide-footer {
    padding: 1.25rem 2rem;
    font-size: 0.8125rem;
    color: #86868b;
    text-align: center;
}

/* ─── Auth hero (left panel) ─── */
.gym-auth-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(2rem, 4vw, 3.25rem);
    color: #e8edf3;
    background: linear-gradient(165deg, #080b10 0%, #121a24 45%, #0a0e14 100%);
}

.gym-auth-hero::before,
.gym-auth-hero::after {
    display: none;
}

.gym-auth-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.gym-auth-hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 30% 20%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 20%, #000 20%, transparent 75%);
}

.gym-auth-hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
}

.gym-auth-hero-orb--1 {
    width: 320px;
    height: 320px;
    top: -80px;
    right: -60px;
    background: var(--gym-accent);
    opacity: 0.22;
}

.gym-auth-hero-orb--2 {
    width: 260px;
    height: 260px;
    bottom: 10%;
    left: -80px;
    background: #3b82f6;
    opacity: 0.12;
}

.gym-auth-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.5rem;
    min-height: calc(100vh - clamp(4rem, 8vw, 6.5rem));
}

.gym-auth-hero-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.gym-auth-hero-logo {
    width: 76px;
    height: 76px;
    object-fit: contain;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.gym-auth-hero-logo--wide {
    width: auto;
    max-width: min(220px, 70%);
    height: auto;
    max-height: 88px;
    padding: 10px 14px;
}

.gym-auth-hero-logo-fallback {
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--gym-accent);
    font-size: 1.75rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.gym-auth-hero-name {
    font-family: var(--gym-font-display);
    font-size: clamp(1.35rem, 2.5vw, 1.65rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--gym-brand-name-color, #f8fafc);
}

.gym-auth-hero-content {
    max-width: 440px;
}

.gym-auth-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 1rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
}

.gym-auth-hero-headline {
    margin: 0 0 1rem;
    font-family: var(--gym-font-display);
    font-size: clamp(2rem, 3.8vw, 2.85rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.035em;
    color: #fff;
}

.gym-auth-hero-headline br {
    display: block;
}

.gym-auth-hero-desc {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.65;
    color: #94a3b8;
}

.gym-auth-hero-contact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.35rem;
    font-size: 0.88rem;
    color: #cbd5e1;
}

.gym-auth-hero-contact span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.gym-auth-hero-contact i {
    color: var(--gym-accent);
    font-size: 0.85rem;
}

.gym-auth-hero-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.gym-auth-hero-feature {
    padding: 1rem 0.85rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.gym-auth-hero-feature:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
}

.gym-auth-hero-feature i {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 1.15rem;
    color: var(--gym-accent);
}

.gym-auth-hero-feature strong {
    display: block;
    font-family: var(--gym-font-display);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    letter-spacing: -0.02em;
}

.gym-auth-hero-feature span {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}

.gym-auth-panel {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(232, 93, 26, 0.06), transparent),
        var(--gym-page);
}

.gym-auth-card {
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
    padding: 2.5rem 2.25rem;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.gym-auth-mobile-brand {
    display: none;
    justify-content: center;
    margin-bottom: 1.75rem;
}

.gym-auth-header {
    margin-bottom: 1.75rem;
}

.gym-auth-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.75rem 0 0.35rem;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.gym-auth-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gym-accent);
    background: rgba(232, 93, 26, 0.08);
    border-radius: 999px;
}

.gym-auth-role-badge i {
    font-size: 0.8rem;
}

.gym-auth-role-badge--staff {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
}

.gym-auth-sub {
    margin: 0;
    line-height: 1.5;
    color: #64748b;
    font-size: 0.9rem;
}

.gym-auth-alert {
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

.gym-auth-form {
    margin-top: 0.25rem;
}

.gym-auth-field {
    margin-bottom: 1.15rem;
}

.gym-auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.gym-auth-input-icon {
    position: absolute;
    left: 0.9rem;
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}

.gym-auth-input {
    padding-left: 2.65rem;
    padding-right: 2.65rem;
    height: 46px;
    border-color: #e8ecf1;
    background: #fafbfc;
}

.gym-auth-input:focus {
    background: #fff;
}

.gym-auth-input-wrap:focus-within .gym-auth-input-icon {
    color: var(--gym-accent);
}

.gym-auth-toggle-pw {
    position: absolute;
    right: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.gym-auth-toggle-pw:hover {
    color: #475569;
    background: rgba(15, 23, 42, 0.04);
}

.gym-auth-submit {
    margin-top: 0.5rem;
    height: 46px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(232, 93, 26, 0.2);
}

.gym-auth-submit i {
    font-size: 1.35rem;
    margin-left: -0.15rem;
    transition: transform 0.2s;
}

.gym-auth-submit:hover i {
    transform: translateX(2px);
}

.gym-auth-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eef1f5;
    text-align: center;
}

.gym-auth-footer-label {
    margin: 0 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
}

.gym-auth-footer-links {
    display: flex;
    justify-content: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.gym-auth-portal-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e8ecf1;
    border-radius: 999px;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.gym-auth-portal-link:hover {
    color: var(--gym-accent);
    border-color: rgba(232, 93, 26, 0.35);
    background: rgba(232, 93, 26, 0.04);
}

.gym-auth-portal-link i {
    font-size: 0.95rem;
    opacity: 0.85;
}

@media (max-width: 900px) {
    .gym-auth-panel {
        padding: 1.5rem 1.25rem;
        align-items: flex-start;
        padding-top: 2.5rem;
    }

    .gym-auth-card {
        max-width: 420px;
        margin: 0 auto;
        padding: 2rem 1.5rem;
    }

    .gym-auth-mobile-brand {
        display: flex;
    }
}

.gym-bank-card,
.gym-pass-card {
    box-shadow: var(--gym-shadow-lg);
}

/* ─── Mobile app ─── */
.gym-mobile-app {
    background: #000;
}

.gym-mobile-login-card {
    border-radius: 14px;
    box-shadow: var(--gym-shadow-lg);
    padding: 2rem 1.75rem;
}

.gym-mobile-login-card h2 {
    font-size: 1.375rem;
    font-weight: 600;
}

.gym-mobile-tabbar {
    background: rgba(22, 22, 23, 0.94);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.gym-mobile-tab.active,
.gym-mobile-tab.active i {
    color: var(--gym-accent);
}

.gym-pwa-install-inner {
    background: rgba(28, 28, 30, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--gym-shadow-lg);
    animation: none;
    border-radius: 14px;
}

.gym-pwa-install-icon {
    background: rgba(255, 255, 255, 0.08);
    color: #aeaeb2;
}

.gym-plan-card {
    border-color: rgba(255, 255, 255, 0.1);
    border-radius: 14px;
}

.gym-profile-save,
.gym-mobile-bottom-bar .gym-btn-success {
    background: var(--gym-accent);
    box-shadow: none;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .gym-content {
        padding: 1.25rem 1rem 2rem;
    }

    .gym-page-header h2 {
        font-size: 1.375rem;
    }

    .gym-card-body,
    .gym-card-padded {
        padding: 1.25rem;
    }

    .gym-guide-section {
        padding: 1.25rem 1.25rem;
    }

    .gym-divider {
        margin: 0 1.25rem;
    }

    .gym-card > .gym-table-wrap .gym-table th:first-child,
    .gym-card > .gym-table-wrap .gym-table td:first-child {
        padding-left: 1.25rem;
    }

    .gym-card > .gym-table-wrap .gym-table th:last-child,
    .gym-card > .gym-table-wrap .gym-table td:last-child {
        padding-right: 1.25rem;
    }

    .gym-table-actions {
        justify-content: flex-start;
    }
}

/* ─── Mobile customer app spacing ─── */
.gym-mobile-top {
    padding: 1.25rem 1.5rem 0.75rem;
}

.gym-mobile-login-wrap {
    padding: 1.25rem 1.5rem 2.5rem;
}

.gym-mobile-card-screen,
.gym-mobile-screen--scan .gym-mobile-scan-screen {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.gym-mobile-scan-card {
    border: none;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 1.25rem;
}

.gym-mobile-login-card .sub {
    line-height: 1.5;
    margin-bottom: 1.75rem;
}

.gym-mobile-login-card .gym-input-group {
    margin-bottom: 1.25rem;
}

.gym-mobile-footer-links {
    padding: 1.25rem 1.5rem 2rem;
    line-height: 1.5;
}

.gym-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.gym-lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.gym-lang-switcher-label {
    display: inline-flex;
    align-items: center;
    color: var(--gym-muted, #64748b);
    font-size: 0.95rem;
    margin: 0;
}

.gym-lang-switcher-select {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 0.5rem;
    background-color: #ffffff;
    color: #0f172a;
    color-scheme: light;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.35rem 1.75rem 0.35rem 0.55rem;
    line-height: 1.3;
    cursor: pointer;
    min-width: 8.5rem;
    max-width: 12rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.45rem center;
}

.gym-lang-switcher-select:hover,
.gym-lang-switcher-select:focus {
    border-color: rgba(15, 23, 42, 0.28);
    outline: none;
    box-shadow: 0 0 0 2px rgba(232, 93, 26, 0.15);
}

.gym-lang-switcher-select option {
    background-color: #ffffff;
    color: #0f172a;
}

html[data-gym-system-theme="dark"] .gym-lang-switcher-select,
html[data-gym-system-theme="dark"] .gym-lang-switcher-select option {
    background-color: #ffffff;
    color: #0f172a;
    color-scheme: light;
}

.gym-auth .gym-lang-switcher-select,
.gym-auth .gym-lang-switcher-select option {
    background-color: #ffffff;
    color: #0f172a;
}

.gym-lang-switcher--compact .gym-lang-switcher-label {
    display: none;
}

.gym-auth-lang {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
}

.gym-mobile-auth-lang {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
}
