/* GYM Manage — Design System */
:root {
    --gym-bg: #111418;
    --gym-surface: #181c22;
    --gym-surface-2: #1f242b;
    --gym-border: rgba(255, 255, 255, 0.07);
    --gym-text: #e8edf3;
    --gym-muted: #8b95a5;
    --gym-accent: #e85d1a;
    --gym-accent-hover: #d45316;
    --gym-accent-glow: rgba(232, 93, 26, 0.12);
    --gym-lime: #b8d936;
    --gym-success: #16a34a;
    --gym-danger: #dc2626;
    --gym-warning: #d97706;
    --gym-page: #f4f6f9;
    --gym-card: #ffffff;
    --gym-topbar-bg: #ffffff;
    --gym-body-text: #1e293b;
    --gym-sidebar-w: 240px;
    --gym-radius: 12px;
    --gym-radius-sm: 8px;
    --gym-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    --gym-shadow-lg: 0 4px 16px rgba(15, 23, 42, 0.06);
    --gym-font: 'DM Sans', system-ui, sans-serif;
    --gym-font-display: 'Outfit', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    min-height: 100vh;
    margin: 0;
    font-family: var(--gym-font);
    color: var(--gym-body-text);
    background: var(--gym-page);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .gym-display {
    font-family: var(--gym-font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a { text-decoration: none; }

/* ─── Auth Layout ─── */
.gym-auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.gym-auth-hero {
    position: relative;
    background: linear-gradient(145deg, #0c0f14 0%, #1a2332 50%, #0f1419 100%);
    color: var(--gym-text);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.gym-auth-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 40px,
            rgba(255, 92, 26, 0.03) 40px,
            rgba(255, 92, 26, 0.03) 42px
        );
    pointer-events: none;
}

.gym-auth-hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--gym-accent-glow) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    pointer-events: none;
}

.gym-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gym-brand-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--gym-accent), #ff8c42);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 8px 24px var(--gym-accent-glow);
}

.gym-brand-text {
    font-family: var(--gym-font-display);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--gym-brand-name-color, inherit);
}

.gym-brand-text span { color: var(--gym-accent); }

.gym-brand-center { justify-content: center; }

.gym-brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 12px;
    flex-shrink: 0;
}

.gym-brand-logo-lg {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    border: 2px solid #e8ecf1;
    background: #fff;
    padding: 4px;
}

.gym-hero-content {
    position: relative;
    z-index: 1;
    max-width: 420px;
}

.gym-hero-content h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.15;
    margin-bottom: 1rem;
}

.gym-hero-content p {
    color: var(--gym-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0;
}

.gym-hero-stats {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 2rem;
}

.gym-stat-num {
    font-family: var(--gym-font-display);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gym-accent);
}

.gym-stat-label {
    font-size: 0.8rem;
    color: var(--gym-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.gym-auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--gym-page);
}

.gym-auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--gym-card);
    border-radius: var(--gym-radius);
    padding: 2.25rem;
    box-shadow: var(--gym-shadow-lg);
}

.gym-auth-card h2 {
    font-size: 1.5rem;
    margin: 0 0 0.35rem;
}

.gym-auth-sub {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1.75rem;
}

/* ─── App Shell ─── */
.gym-shell {
    display: flex;
    min-height: 100vh;
}

.gym-sidebar {
    width: var(--gym-sidebar-w);
    background: var(--gym-bg);
    color: var(--gym-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    border-right: 1px solid var(--gym-border);
}

.gym-sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    overflow-y: auto;
}

.gym-nav-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #475569;
    padding: 0.75rem 1rem 0.35rem;
    font-weight: 600;
}

.gym-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-radius: var(--gym-radius-sm);
    color: var(--gym-muted);
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 2px;
}

.gym-nav-link i { font-size: 1.15rem; width: 1.25rem; text-align: center; }

.gym-nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--gym-text);
}

.gym-nav-link.active {
    background: linear-gradient(90deg, rgba(255, 92, 26, 0.2), rgba(255, 92, 26, 0.05));
    color: var(--gym-accent);
    box-shadow: inset 3px 0 0 var(--gym-accent);
}

.gym-sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--gym-border);
}

.gym-user-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem;
    border-radius: var(--gym-radius-sm);
    background: var(--gym-surface);
}

.gym-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gym-accent), #ff8c42);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    flex-shrink: 0;
}

.gym-user-name { font-size: 0.85rem; font-weight: 600; color: var(--gym-text); }
.gym-user-role { font-size: 0.72rem; color: var(--gym-muted); text-transform: capitalize; }

.gym-main {
    flex: 1;
    margin-left: var(--gym-sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.gym-topbar {
    background: var(--gym-topbar-bg, var(--gym-card));
    border-bottom: 1px solid var(--gym-border, #e2e8f0);
    padding: 1rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.gym-topbar h1 {
    font-size: 1.35rem;
    margin: 0;
    color: var(--gym-body-text);
}

.gym-topbar-meta {
    font-size: 0.85rem;
    color: var(--gym-muted, #64748b);
}

.gym-content {
    padding: 1.75rem;
    flex: 1;
}

/* ─── Cards & Dashboard ─── */
.gym-card {
    background: var(--gym-card);
    border-radius: var(--gym-radius);
    box-shadow: var(--gym-shadow);
    border: 1px solid #e8ecf1;
    overflow: hidden;
}

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

.gym-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.gym-stat-card {
    background: var(--gym-card);
    border-radius: var(--gym-radius);
    padding: 1.35rem;
    box-shadow: var(--gym-shadow);
    border: 1px solid #e8ecf1;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.gym-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--gym-shadow-lg);
}

.gym-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.gym-stat-icon.orange { background: rgba(255, 92, 26, 0.12); color: var(--gym-accent); }
.gym-stat-icon.green { background: rgba(34, 197, 94, 0.12); color: var(--gym-success); }
.gym-stat-icon.blue { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.gym-stat-icon.purple { background: rgba(168, 85, 247, 0.12); color: #a855f7; }

.gym-stat-card .label { font-size: 0.8rem; color: #64748b; margin-bottom: 0.15rem; }
.gym-stat-card .value { font-family: var(--gym-font-display); font-size: 1.5rem; font-weight: 800; color: #0f172a; }
.gym-stat-sub { font-size: 0.75rem; color: #94a3b8; margin-top: 0.15rem; }

.gym-dashboard-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gym-dashboard-section {
    margin-bottom: 1.5rem;
}

.gym-dashboard-section-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 1rem;
    color: #475569;
    font-weight: 700;
    margin: 0 0 0.85rem;
}

.gym-dashboard-mini-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.gym-dashboard-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
}

.gym-stat-grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.gym-dashboard-chart-card {
    margin-top: 0.85rem;
}

.gym-dashboard-chart-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.gym-dashboard-chart-head strong {
    color: #0f172a;
    font-size: 0.92rem;
}

.gym-dashboard-chart-head span {
    color: #94a3b8;
    font-size: 0.78rem;
}

.gym-bar-chart {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
    align-items: end;
    min-height: 140px;
}

.gym-bar-chart-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
}

.gym-bar-chart-bar-wrap {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.gym-bar-chart-bar {
    width: 72%;
    max-width: 36px;
    min-height: 4px;
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, var(--gym-accent), #ea580c);
    transition: height 0.25s ease;
}

.gym-bar-chart-label {
    font-size: 0.68rem;
    color: #64748b;
    font-weight: 600;
}

.gym-bar-chart-value {
    font-size: 0.72rem;
    color: #0f172a;
    font-weight: 700;
}

.gym-dashboard-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.gym-dashboard-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.gym-dashboard-panel-head h3 {
    margin: 0;
    font-size: 0.95rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.gym-dashboard-panel-head a {
    font-size: 0.8rem;
    color: var(--gym-accent);
    font-weight: 600;
}

.gym-dashboard-empty {
    margin: 0;
    color: #94a3b8;
    font-size: 0.88rem;
}

.gym-table-compact th,
.gym-table-compact td {
    padding: 0.55rem 0.65rem;
    font-size: 0.84rem;
}

.gym-btn-secondary {
    background: #fff;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.gym-btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.gym-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

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

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

.gym-quick-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
    padding: 0.55rem;
    background: var(--gym-card);
    border: 1px solid #e8ecf1;
    border-radius: var(--gym-radius);
    box-shadow: var(--gym-shadow);
}

.gym-quick-bar-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.7rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.gym-quick-bar-link i {
    font-size: 0.9rem;
    color: var(--gym-accent);
}

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

.gym-quick-bar-link.is-primary {
    background: linear-gradient(135deg, var(--gym-accent), #ff8c42);
    border-color: transparent;
    color: #fff;
}

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

.gym-quick-bar-link.is-primary:hover {
    color: #fff;
    opacity: 0.92;
}

.gym-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.gym-dashboard-block {
    background: var(--gym-card);
    border: 1px solid #e8ecf1;
    border-radius: var(--gym-radius);
    padding: 0.75rem 0.85rem;
    box-shadow: var(--gym-shadow);
}

.gym-dashboard-block--wide {
    grid-column: 1 / -1;
}

.gym-dashboard-block-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    margin-bottom: 0.65rem;
}

.gym-dashboard-block-head h3 {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
}

.gym-dashboard-block-head a {
    font-size: 0.72rem;
    color: var(--gym-accent);
    font-weight: 600;
    white-space: nowrap;
}

.gym-dashboard-meta {
    font-size: 0.72rem;
    color: #94a3b8;
    white-space: nowrap;
}

.gym-stat-grid--dash {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
    margin-bottom: 0;
}

.gym-stat-card--dash {
    padding: 0.55rem 0.6rem;
    gap: 0.55rem;
    box-shadow: none;
    border-color: #eef2f6;
}

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

.gym-stat-card--dash .gym-stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.gym-stat-card--dash .label {
    font-size: 0.68rem;
    margin-bottom: 0.05rem;
}

.gym-stat-card--dash .value {
    font-size: 1.05rem;
    line-height: 1.15;
}

.gym-stat-card--dash .value--money {
    font-size: 0.82rem;
    word-break: break-word;
}

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

.gym-bar-chart--compact {
    min-height: 88px;
}

.gym-bar-chart--compact .gym-bar-chart-bar-wrap {
    height: 64px;
}

.gym-dashboard-panel--compact .gym-card-body {
    padding: 0.75rem 0.85rem;
}

.gym-dashboard-panel--compact {
    margin-bottom: 0;
}

@media (max-width: 1100px) {
    .gym-stat-grid--dash {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .gym-quick-bar-link span {
        display: none;
    }

    .gym-quick-bar-link {
        padding: 0.5rem;
        border-radius: 10px;
    }

    .gym-quick-bar-link i {
        font-size: 1.05rem;
    }
}

.gym-action-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 1.5rem 1rem;
    background: var(--gym-card);
    border-radius: var(--gym-radius);
    border: 1px solid #e8ecf1;
    color: #334155;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.2s;
    box-shadow: var(--gym-shadow);
}

.gym-action-tile i {
    font-size: 1.75rem;
    color: var(--gym-accent);
}

.gym-action-tile:hover {
    border-color: var(--gym-accent);
    color: var(--gym-accent);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px var(--gym-accent-glow);
}

.gym-action-tile.highlight {
    background: linear-gradient(135deg, var(--gym-accent), #ff8c42);
    border-color: transparent;
    color: #fff;
}

.gym-action-tile.highlight i { color: #fff; }
.gym-action-tile.highlight:hover { color: #fff; opacity: 0.92; }

/* ─── Forms ─── */
.gym-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.4rem;
}

.gym-input {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--gym-radius-sm);
    font-family: var(--gym-font);
    font-size: 0.95rem;
    color: #0f172a;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gym-input:focus {
    outline: none;
    border-color: var(--gym-accent);
    box-shadow: 0 0 0 3px var(--gym-accent-glow);
}

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

.gym-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.35rem;
    border: none;
    border-radius: var(--gym-radius-sm);
    font-family: var(--gym-font);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.gym-btn-primary {
    background: linear-gradient(135deg, var(--gym-accent), #ff7a3d);
    color: #fff;
    box-shadow: 0 4px 14px var(--gym-accent-glow);
}

.gym-btn-primary:hover { background: var(--gym-accent-hover); transform: translateY(-1px); }

.gym-btn-outline {
    background: transparent;
    border: 1.5px solid #e2e8f0;
    color: #475569;
}

.gym-btn-outline:hover { border-color: var(--gym-accent); color: var(--gym-accent); }

.gym-btn-success {
    background: linear-gradient(135deg, #16a34a, var(--gym-success));
    color: #fff;
}

.gym-btn-block { width: 100%; }

.gym-btn-sm { padding: 0.45rem 0.9rem; font-size: 0.82rem; }

/* ─── Tables ─── */
.gym-table-wrap { overflow-x: auto; }

.gym-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.gym-table th {
    text-align: left;
    padding: 0.85rem 1.25rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    font-weight: 600;
    background: #f8fafc;
    border-bottom: 1px solid #e8ecf1;
}

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

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

.gym-badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.gym-badge-active { background: rgba(34, 197, 94, 0.12); color: #15803d; }
.gym-badge-expired { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
.gym-badge-suspended { background: rgba(245, 158, 11, 0.12); color: #b45309; }
.gym-badge-cancelled { background: rgba(100, 116, 139, 0.12); color: #475569; }

/* ─── Alerts ─── */
.gym-alert {
    padding: 0.85rem 1.15rem;
    border-radius: var(--gym-radius-sm);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.gym-alert-success { background: rgba(34, 197, 94, 0.1); color: #15803d; border: 1px solid rgba(34, 197, 94, 0.25); }
.gym-alert-danger { background: rgba(239, 68, 68, 0.1); color: #b91c1c; border: 1px solid rgba(239, 68, 68, 0.25); }

/* ─── Member Card (Mobile) ─── */
.gym-member-layout {
    min-height: 100vh;
    background: linear-gradient(180deg, #0c0f14 0%, #1a2332 40%, var(--gym-page) 40%);
}

.gym-member-header {
    padding: 1.5rem 1.25rem 2rem;
    text-align: center;
    color: var(--gym-text);
}

.gym-member-header .gym-brand { justify-content: center; margin-bottom: 0.5rem; }

.gym-pass {
    max-width: 380px;
    margin: -1rem auto 2rem;
    padding: 0 1.25rem;
}

.gym-pass-card {
    background: linear-gradient(160deg, #1e2733 0%, #0c0f14 100%);
    border-radius: 20px;
    padding: 1.75rem;
    color: var(--gym-text);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 92, 26, 0.3);
    position: relative;
    overflow: hidden;
}

.gym-pass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gym-accent), var(--gym-lime));
}

.gym-pass-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gym-accent);
    margin: 0 auto 1rem;
    display: block;
}

.gym-pass-initial {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gym-accent), #ff8c42);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    margin: 0 auto 1rem;
    color: #fff;
}

.gym-pass-name {
    font-family: var(--gym-font-display);
    font-size: 1.35rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.25rem;
}

.gym-pass-id {
    text-align: center;
    font-size: 0.82rem;
    color: var(--gym-lime);
    font-weight: 600;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
}

.gym-pass-phone {
    text-align: center;
    font-size: 0.85rem;
    color: var(--gym-muted);
    margin-bottom: 1.25rem;
}

.gym-pass-qr {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.gym-pass-qr img { max-width: 200px; }

.gym-pass-footer {
    text-align: center;
    font-size: 0.72rem;
    color: var(--gym-muted);
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.gym-pass-gym {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gym-pass-gym-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 0.35rem;
}

.gym-pass-gym-name {
    font-family: var(--gym-font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gym-brand-name-color, var(--gym-accent));
}

.gym-member-card-page {
    padding: 0.5rem 0 2rem;
}

.gym-member-card-wrap {
    max-width: 430px;
}

/* ─── Bank card (CR80: 85.6mm × 53.98mm) ─── */
.gym-bank-card-note {
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 1rem;
}

.gym-bank-card-preview {
    margin: 0 auto;
}

.gym-bank-card {
    position: relative;
    width: 100%;
    aspect-ratio: 85.6 / 53.98;
    background: linear-gradient(135deg, var(--gym-card-bg-start, #1e2733) 0%, var(--gym-card-bg-end, #0c0f14) 55%, var(--gym-card-bg-end, #141a22) 100%);
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--gym-card-border, var(--gym-accent)) 35%, transparent);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    display: flex;
    color: var(--gym-card-text, #f1f5f9);
    font-family: var(--gym-font-body);
}

.gym-bank-card__stripe {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gym-card-stripe-start, var(--gym-accent)), var(--gym-card-stripe-end, var(--gym-lime)));
}

.gym-bank-card__left {
    flex: 1 1 58%;
    padding: 7% 5% 6% 6%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.gym-bank-card__right {
    flex: 0 0 38%;
    padding: 6% 5% 5% 2%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    min-width: 0;
}

.gym-bank-card__brand {
    display: flex;
    align-items: center;
    gap: 0.45em;
    min-width: 0;
}

.gym-bank-card__logo-wrap {
    width: 1.85em;
    height: 1.85em;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0.22em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.gym-bank-card__logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gym-bank-card__gym {
    font-family: var(--gym-font-display);
    font-size: clamp(0.55rem, 2.8vw, 0.82rem);
    font-weight: 800;
    color: var(--gym-brand-name-color, var(--gym-card-stripe-start, var(--gym-accent)));
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gym-bank-card__label {
    font-size: clamp(0.42rem, 1.8vw, 0.55rem);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gym-card-muted, #94a3b8);
    margin-bottom: 0.15em;
}

.gym-bank-card__name {
    font-family: var(--gym-font-display);
    font-size: clamp(0.72rem, 3.6vw, 1.05rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--gym-card-text, #f1f5f9);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gym-bank-card__id {
    font-size: clamp(0.48rem, 2.2vw, 0.68rem);
    color: var(--gym-card-id, var(--gym-lime));
    font-weight: 700;
    letter-spacing: 0.06em;
    margin-top: 0.2em;
}

.gym-bank-card__phone {
    font-size: clamp(0.45rem, 2vw, 0.62rem);
    color: var(--gym-card-muted, #94a3b8);
    margin-top: 0.15em;
}

.gym-bank-card__dates {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35em 0.65em;
}

.gym-bank-card__date {
    font-size: clamp(0.4rem, 1.7vw, 0.55rem);
    color: var(--gym-card-muted, #94a3b8);
}

.gym-bank-card__date strong {
    display: block;
    color: var(--gym-card-text, #e2e8f0);
    font-size: clamp(0.45rem, 1.9vw, 0.6rem);
    margin-top: 0.1em;
}

.gym-bank-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25em;
    justify-content: center;
    width: 100%;
}

.gym-bank-card__tier,
.gym-bank-card__status {
    font-size: clamp(0.38rem, 1.6vw, 0.52rem);
    font-weight: 700;
    padding: 0.2em 0.45em;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.gym-bank-card__tier {
    background: color-mix(in srgb, var(--tier-color, #94a3b8) 25%, transparent);
    color: var(--tier-color, #cbd5e1);
    border: 1px solid color-mix(in srgb, var(--tier-color, #94a3b8) 45%, transparent);
}

.gym-bank-card__status.is-active {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.gym-bank-card__status.is-expired {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.gym-bank-card__photo,
.gym-bank-card__initial {
    width: clamp(28px, 14%, 52px);
    height: clamp(28px, 14%, 52px);
    border-radius: 50%;
    flex-shrink: 0;
}

.gym-bank-card__photo {
    object-fit: cover;
    border: 2px solid var(--gym-card-photo-border, var(--gym-accent));
}

.gym-bank-card__initial {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gym-card-stripe-start, var(--gym-accent)), var(--gym-card-stripe-end, #ff8c42));
    font-weight: 800;
    font-size: clamp(0.65rem, 3vw, 1rem);
    color: #fff;
}

.gym-bank-card__qr {
    background: #fff;
    border-radius: 6px;
    padding: 0.25em;
    line-height: 0;
    width: clamp(52px, 28%, 88px);
}

.gym-bank-card__qr img {
    width: 100%;
    height: auto;
    display: block;
}

.gym-bank-card__scan {
    font-size: clamp(0.35rem, 1.4vw, 0.48rem);
    color: var(--gym-card-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
}

.gym-member-print-card .gym-print-status {
    display: block;
    text-align: center;
    margin: 0 auto 1rem;
    width: fit-content;
    font-size: 0.75rem;
}

.gym-print-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.gym-print-meta-item {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    text-align: center;
}

.gym-print-meta-item .lbl {
    font-size: 0.68rem;
    color: var(--gym-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.gym-print-meta-item .val {
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 0.15rem;
}

/* ─── Gym check-in QR poster ─── */
.gym-display-body {
    min-height: 100dvh;
    margin: 0;
    background: #0c0f14;
}

.gym-checkin-show {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.gym-checkin-poster {
    position: relative;
    width: 100%;
    max-width: 420px;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(145deg, var(--gym-checkin-bg-start, #1e2733) 0%, var(--gym-checkin-bg-end, #0c0f14) 100%);
    border: 1px solid color-mix(in srgb, var(--gym-checkin-accent, #ff5c1a) 35%, transparent);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    color: #f1f5f9;
    padding: 1.5rem 1.35rem 1.25rem;
}

.gym-checkin-poster__stripe {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gym-checkin-accent, #ff5c1a), var(--gym-checkin-stripe-end, #a3e635));
}

.gym-checkin-poster__head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.gym-checkin-poster__logo-wrap {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.gym-checkin-poster__logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gym-checkin-poster__logo-fallback {
    color: var(--gym-checkin-accent, #ff5c1a);
    font-size: 1.5rem;
}

.gym-checkin-poster__name {
    margin: 0;
    font-family: var(--gym-font-display);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--gym-checkin-name, #f1f5f9);
}

.gym-checkin-poster__tagline {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    color: #94a3b8;
}

.gym-checkin-poster__hero {
    text-align: center;
    margin-bottom: 1rem;
}

.gym-checkin-poster__kicker {
    margin: 0 0 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gym-checkin-accent, #ff5c1a);
}

.gym-checkin-poster__qr-frame {
    display: inline-block;
    background: #fff;
    border-radius: 18px;
    padding: 0.85rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.gym-checkin-poster__qr {
    display: block;
    width: min(62vw, 240px);
    height: auto;
}

.gym-checkin-poster__scan-label {
    margin: 0.75rem 0 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: #cbd5e1;
}

.gym-checkin-poster__steps {
    margin: 0 0 1rem;
    padding-left: 1.15rem;
    font-size: 0.88rem;
    line-height: 1.65;
    color: #cbd5e1;
}

.gym-checkin-poster__foot {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.85rem;
}

.gym-checkin-poster__foot span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.gym-checkin-poster__note {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    opacity: 0.85;
}

.gym-checkin-poster--display {
    max-width: min(520px, 92vw);
    padding: 2rem 1.75rem 1.5rem;
}

.gym-checkin-poster--display .gym-checkin-poster__name {
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.gym-checkin-poster--display .gym-checkin-poster__qr {
    width: min(72vw, 320px);
}

.gym-checkin-poster--display .gym-checkin-poster__steps {
    font-size: 1rem;
}

.gym-checkin-poster-preview {
    max-width: 420px;
    margin: 0 auto 2rem;
}

.gym-checkin-poster-print-area {
    display: none;
}

.gym-checkin-poster--print {
    max-width: none;
    width: 100%;
    box-shadow: none;
    page-break-inside: avoid;
}

.gym-checkin-poster--print .gym-checkin-poster__qr {
    width: 280px;
}

@media print {
    .gym-sidebar,
    .gym-topbar,
    .gym-no-print,
    .gym-mobile-toggle,
    .gym-invoice-tabs,
    .gym-print-toolbar,
    .gym-payment-manage,
    .gym-invoice-shell-head,
    .gym-invoice-preview-label {
        display: none !important;
    }

    .gym-main {
        margin: 0 !important;
        width: 100% !important;
    }

    .gym-content {
        padding: 0 !important;
    }

    body.gym-print-active[data-print-mode="member-card"] .gym-member-card-page {
        padding: 0;
    }

    body.gym-print-active[data-print-mode="member-card"] .gym-bank-card-preview {
        max-width: none;
        width: 85.6mm;
        margin: 0 auto;
    }

    body.gym-print-active[data-print-mode="member-card"] .gym-bank-card {
        width: 85.6mm;
        height: 53.98mm;
        aspect-ratio: auto;
        box-shadow: none;
        break-inside: avoid;
        page-break-inside: avoid;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .gym-pass {
        margin: 0 auto;
        max-width: 100%;
    }

    .gym-pass-card {
        box-shadow: none;
        break-inside: avoid;
    }

    body.gym-print-active[data-print-mode^="checkin-"] .gym-checkin-poster-preview,
    body.gym-print-active[data-print-mode^="checkin-"] .gym-page-header,
    body.gym-print-active[data-print-mode^="checkin-"] .gym-bank-card-note {
        display: none !important;
    }

    body.gym-print-active[data-print-mode^="checkin-"] .gym-checkin-poster-print-area {
        display: flex !important;
        align-items: center;
        justify-content: center;
        min-height: auto;
    }

    body.gym-print-active[data-print-mode="checkin-a4"] .gym-checkin-poster--print {
        max-width: 170mm;
        margin: 0 auto;
    }

    body.gym-print-active[data-print-mode="checkin-a5"] .gym-checkin-poster--print {
        max-width: 128mm;
        margin: 0 auto;
    }

    body.gym-print-active[data-print-mode^="checkin-"] .gym-checkin-poster--print {
        box-shadow: none;
        break-inside: avoid;
        page-break-inside: avoid;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ─── Scan Page ─── */
.gym-scan-zone {
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.gym-scan-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: rgba(255, 92, 26, 0.1);
    border: 2px dashed var(--gym-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--gym-accent);
    animation: gym-pulse 2s ease infinite;
}

@keyframes gym-pulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--gym-accent-glow); }
    50% { box-shadow: 0 0 0 12px transparent; }
}

.gym-result {
    margin-top: 1.25rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: var(--gym-radius-sm);
    font-size: 0.82rem;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-all;
    border: 1px solid #e2e8f0;
    min-height: 60px;
}

.gym-result.success { background: rgba(34, 197, 94, 0.08); border-color: rgba(34, 197, 94, 0.3); }
.gym-result.error { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.3); }

.gym-scan-card { max-width: 720px; margin: 0 auto; }

.gym-scan-tabs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.gym-scan-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.gym-scan-tab:hover {
    border-color: var(--gym-accent);
    color: var(--gym-accent);
}

.gym-scan-tab.active {
    background: var(--gym-accent);
    border-color: var(--gym-accent);
    color: #fff;
}

.gym-scan-panel {
    display: none;
    max-width: 480px;
    margin: 0 auto;
    text-align: left;
}

.gym-scan-panel.active {
    display: block;
}

.gym-scan-hardware,
.gym-scan-webcam-wrap {
    padding: 0.25rem 0;
}

.gym-scan-ready {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    padding: 0.65rem 0.85rem;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: var(--gym-radius-sm);
    font-size: 0.82rem;
    color: #166534;
}

.gym-scan-ready-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: gym-pulse 2s ease infinite;
    flex-shrink: 0;
}

.gym-scan-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.95rem;
}

.gym-scan-hint {
    margin: 0.75rem 0 1rem;
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.45;
}

.gym-qr-reader {
    width: 100%;
    min-height: 280px;
    border-radius: var(--gym-radius);
    overflow: hidden;
    background: #0f172a;
    border: 1px solid #1e293b;
}

.gym-qr-reader video {
    border-radius: var(--gym-radius);
}

.gym-scan-webcam-status {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    color: #64748b;
    text-align: center;
}

.gym-scan-webcam-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.85rem;
}

.gym-scan-secure-warning {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: var(--gym-radius);
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #92400e;
    font-size: 0.84rem;
    line-height: 1.5;
}

.gym-scan-secure-warning strong {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
    color: #b45309;
}

.gym-scan-secure-warning p {
    margin: 0 0 0.5rem;
}

.gym-scan-secure-warning ul {
    margin: 0 0 0.5rem;
    padding-left: 1.15rem;
}

.gym-scan-secure-warning li {
    margin-bottom: 0.25rem;
}

.gym-scan-secure-warning code {
    font-size: 0.78rem;
    background: rgba(0, 0, 0, 0.06);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

.gym-scan-secure-note {
    margin: 0 !important;
    font-size: 0.8rem;
    color: #a16207;
}

/* ─── Page header ─── */
.gym-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gym-page-header h2 {
    font-size: 1.35rem;
    margin: 0;
    color: #0f172a;
}

.gym-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    align-items: flex-end;
}

.gym-period-tabs {
    margin-bottom: 1rem;
}

.gym-period-tabs .gym-scan-tab {
    text-decoration: none;
}

.gym-invoice-report-print {
    display: none;
}

.gym-invoice-report-total-row td {
    border-top: 2px solid #e2e8f0;
    background: #f8fafc;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.gym-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #94a3b8;
}

.gym-empty i { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; opacity: 0.5; }

.gym-link {
    color: var(--gym-accent);
    font-weight: 600;
    font-size: 0.88rem;
}

.gym-link:hover { color: var(--gym-accent-hover); }

/* ─── 404 ─── */
.gym-error-page {
    text-align: center;
    padding: 4rem 1.5rem;
}

.gym-error-code {
    font-family: var(--gym-font-display);
    font-size: 6rem;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--gym-accent), #ff8c42);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Utilities ─── */
.gym-flex { display: flex; }
.gym-flex-center { align-items: center; }
.gym-gap-3 { gap: 0.75rem; }
.gym-mt-2 { margin-top: 0.5rem; }

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .gym-auth { grid-template-columns: 1fr; }
    .gym-auth-hero { display: none; }
    .gym-sidebar { transform: translateX(-100%); transition: transform 0.25s; }
    .gym-main { margin-left: 0; }
    .gym-sidebar.open { transform: translateX(0); }
    .gym-mobile-toggle { display: flex !important; }
}

@media (max-width: 600px) {
    .gym-form-grid { grid-template-columns: 1fr !important; }
    .gym-form-grid .gym-span-2 { grid-column: span 1 !important; }
}

.gym-mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    color: #475569;
}

/* Dark system theme — form & table contrast */
html[data-gym-system-theme="dark"] .gym-card,
html[data-gym-system-theme="dark"] .gym-stat-card {
    color: var(--gym-body-text);
    border-color: var(--gym-border);
}

html[data-gym-system-theme="dark"] .gym-input,
html[data-gym-system-theme="dark"] select.gym-input,
html[data-gym-system-theme="dark"] textarea.gym-input {
    background: var(--gym-surface-2);
    border-color: var(--gym-border);
    color: var(--gym-body-text);
}

html[data-gym-system-theme="dark"] .gym-table th,
html[data-gym-system-theme="dark"] .gym-table td {
    color: var(--gym-body-text);
    border-color: var(--gym-border);
}

html[data-gym-system-theme="dark"] .gym-mobile-toggle {
    background: var(--gym-surface-2);
    border-color: var(--gym-border);
    color: var(--gym-body-text);
}

/* Theme picker (settings) */
.gym-theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.gym-theme-option {
    position: relative;
    cursor: pointer;
}

.gym-theme-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gym-theme-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.65rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: #fff;
}

.gym-theme-option input:checked + .gym-theme-card {
    border-color: var(--gym-accent);
    box-shadow: 0 0 0 3px var(--gym-accent-glow);
}

.gym-theme-swatches {
    display: flex;
    gap: 4px;
    margin-bottom: 0.5rem;
}

.gym-theme-swatches span {
    flex: 1;
    height: 22px;
    border-radius: 6px;
}

.gym-theme-card strong {
    display: block;
    font-size: 0.82rem;
    color: #0f172a;
}

.gym-theme-card small {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 0.15rem;
    line-height: 1.35;
}

/* ─── Invoice ─── */
.gym-invoice-wrap {
    max-width: 800px;
    margin: 0 auto;
}

.gym-invoice {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--gym-radius);
    padding: 2rem;
    box-shadow: var(--gym-shadow);
}

.gym-invoice-header {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--gym-accent);
}

.gym-invoice-brand {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.gym-invoice-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.gym-invoice-gym {
    font-family: var(--gym-font-display);
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
}

.gym-invoice-title-block {
    text-align: right;
}

.gym-invoice-title {
    font-family: var(--gym-font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gym-accent);
    letter-spacing: 0.08em;
}

.gym-invoice-no {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0.25rem 0;
}

.gym-invoice-meta {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
}

.gym-invoice-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}

.gym-invoice-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 0.35rem;
}

.gym-invoice-party-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: #0f172a;
}

.gym-invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
}

.gym-invoice-table th,
.gym-invoice-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.gym-invoice-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.gym-invoice-totals {
    margin-left: auto;
    max-width: 280px;
}

.gym-invoice-total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.92rem;
    color: #475569;
}

.gym-invoice-grand {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 2px solid #0f172a;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.gym-invoice-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px dashed #e2e8f0;
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
}

.gym-invoice-tagline {
    color: var(--gym-accent);
    font-weight: 600;
}

.gym-invoice-tab-shell {
    max-width: 800px;
    margin: 0 auto;
}

.gym-invoice-shell-card {
    overflow: hidden;
}

.gym-invoice-shell-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e8ecf1;
    background: #fafbfc;
}

.gym-invoice-shell-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
}

.gym-invoice-shell-meta {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 0.2rem;
}

.gym-invoice-shell-actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.gym-invoice-shell-body {
    padding: 1.25rem;
}

.gym-invoice-wrap--nested {
    max-width: none;
    margin: 0;
}

.gym-invoice-wrap--nested .gym-invoice {
    box-shadow: none;
    border: 1px dashed #e2e8f0;
    border-radius: 10px;
    padding: 1.5rem;
}

.gym-invoice-preview-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.gym-payment-manage {
    padding: 1.1rem 1.25rem 1.25rem;
    border-bottom: 1px solid #e8ecf1;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.gym-payment-manage-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.gym-payment-manage-desc {
    margin: 0.3rem 0 0;
    font-size: 0.82rem;
    color: #64748b;
}

.gym-payment-manage-form {
    margin-top: 1rem;
}

.gym-payment-manage-foot {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px dashed #e2e8f0;
}

.gym-invoice-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.gym-invoice-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.gym-invoice-tab:hover {
    border-color: #cbd5e1;
    color: #0f172a;
}

.gym-invoice-tab.is-active {
    background: var(--gym-accent);
    border-color: var(--gym-accent);
    color: #fff;
}

.gym-invoice-tab-panel {
    display: none;
}

.gym-invoice-tab-panel.is-active {
    display: block;
}

.gym-print-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    max-width: 800px;
}

.gym-print-toolbar-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    margin-right: 0.25rem;
}

.gym-payment-receipt .gym-receipt-header {
    margin-bottom: 1.25rem;
}

.gym-receipt-member {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #e2e8f0;
}

@media print {
    .gym-invoice-wrap {
        max-width: 100%;
    }

    .gym-invoice {
        box-shadow: none;
        border: none;
        padding: 0;
    }

    body.gym-print-active .gym-invoice-tab-panel {
        display: none !important;
    }

    body.gym-print-active[data-print-mode^="invoice-"] #invoiceTabPanel,
    body.gym-print-active[data-print-mode^="payments-"] #paymentsTabPanel {
        display: block !important;
    }

    body.gym-print-active[data-print-mode="invoice-pos"] .gym-invoice-wrap,
    body.gym-print-active[data-print-mode="payments-pos"] .gym-invoice-wrap {
        max-width: 80mm !important;
        margin: 0 auto !important;
    }

    body.gym-print-active[data-print-mode="invoice-pos"] .gym-invoice,
    body.gym-print-active[data-print-mode="payments-pos"] .gym-invoice {
        font-size: 11px;
        padding: 0.25rem 0 !important;
    }

    body.gym-print-active .gym-invoice-shell-card {
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    body.gym-print-active .gym-invoice-shell-body {
        padding: 0 !important;
    }

    body.gym-print-active .gym-invoice-wrap--nested .gym-invoice {
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
    }

    body.gym-print-active[data-print-mode="invoice-pos"] .gym-invoice-header,
    body.gym-print-active[data-print-mode="payments-pos"] .gym-invoice-header {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }

    body.gym-print-active[data-print-mode="invoice-pos"] .gym-invoice-title-block,
    body.gym-print-active[data-print-mode="payments-pos"] .gym-invoice-title-block {
        text-align: left;
    }

    body.gym-print-active[data-print-mode="invoice-pos"] .gym-invoice-parties,
    body.gym-print-active[data-print-mode="payments-pos"] .gym-invoice-parties {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    body.gym-print-active[data-print-mode="invoice-pos"] .gym-invoice-logo,
    body.gym-print-active[data-print-mode="payments-pos"] .gym-invoice-logo {
        width: 36px;
        height: 36px;
    }

    body.gym-print-active[data-print-mode="invoice-pos"] .gym-invoice-table th,
    body.gym-print-active[data-print-mode="invoice-pos"] .gym-invoice-table td,
    body.gym-print-active[data-print-mode="payments-pos"] .gym-invoice-table th,
    body.gym-print-active[data-print-mode="payments-pos"] .gym-invoice-table td {
        padding: 0.35rem 0.15rem;
        font-size: 10px;
    }

    body.gym-print-active[data-print-mode="invoice-pos"] .gym-invoice-totals,
    body.gym-print-active[data-print-mode="payments-pos"] .gym-invoice-totals {
        max-width: 100%;
    }

    body.gym-print-active[data-print-mode="invoice-pos"] .gym-invoice-footer,
    body.gym-print-active[data-print-mode="payments-pos"] .gym-invoice-footer {
        margin-top: 1rem;
        font-size: 10px;
    }

    .gym-invoice-report-print {
        display: block;
        margin-bottom: 1rem;
    }

    .gym-invoice-report-print h2 {
        font-family: var(--gym-font-display);
        font-size: 1.25rem;
        margin: 0 0 0.25rem;
    }

    .gym-invoice-report-print p {
        margin: 0;
        color: #475569;
        font-size: 0.9rem;
    }

    .gym-stat-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
        margin-bottom: 1rem !important;
    }

    .gym-stat-card {
        box-shadow: none;
        border: 1px solid #e2e8f0;
        padding: 0.65rem;
    }

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

    .gym-invoice-report-table {
        font-size: 0.8rem;
    }
}
