/* A compact training-console layout. Operational colors remain semantic. */
.dashboard-activity { display: grid; grid-template-columns: minmax(0, 2fr) minmax(290px, 1fr); gap: 24px; margin: 24px 0; }
.dashboard-activity > section { min-width: 0; }
.dashboard-activity > section:only-child { grid-column: 1 / -1; }
.dashboard-period-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; min-height: 70px; margin-bottom: 12px; }
.dashboard-period-head h2 { font-size: 15px; margin: 0 0 5px; }
.dashboard-period-head time { font-size: 12px; color: var(--gym-dim); }
.dashboard-period-head form { display: flex; align-items: end; gap: 8px; max-width: 100%; }
.dashboard-period-head label { display: grid; gap: 6px; font-size: 11px; min-width: 0; }
.dashboard-period-head input { min-width: 0; width: 168px; max-width: 100%; height: 40px; padding: 8px; }
.dashboard-period-head button { width: 36px; height: 40px; flex: 0 0 36px; }
.dashboard-activity .dashboard-period-metrics { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
@media (max-width: 1200px) {
    .dashboard-activity { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .dashboard-period-head { min-height: 0; }
}
@media (max-width: 480px) {
    .dashboard-activity .dashboard-period-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-period-head { align-items: start; }
}
:root {
    --gym-frame: #0d1012;
    --gym-panel: #191d20;
    --gym-field: #13171a;
    --gym-head: #22282c;
    --gym-line: #333b40;
    --gym-hover: #252d32;
    --gym-dim: #a9b3b9;
    --gym-accent-ink: var(--primary);
    --gym-positive: #88dbb6;
    --gym-access: #80d4dc;
    --gym-warning: #f3c76d;
}
:root[data-theme="light"] {
    --gym-frame: #ffffff;
    --gym-panel: #ffffff;
    --gym-field: #f7f9fa;
    --gym-head: #eef2f4;
    --gym-line: #d1d9de;
    --gym-hover: #edf2f4;
    --gym-dim: #53616b;
    --gym-accent-ink: var(--link-ink);
    --gym-positive: #176243;
    --gym-access: #126873;
    --gym-warning: #805400;
}
:root[data-theme="light"] img[data-logo-light]:not([data-logo-active="light"]) { visibility: hidden; }
:root[data-theme] img[data-logo-light] { filter: none; background: transparent; }
.overview-date { padding-left: 14px; margin-left: 14px; border-left: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }

.checkin-waiting { display: none; }
@media screen {
    .checkin-profile:has(.member-fields > div:first-child > span:empty) .member-fields { display: none; }
    .checkin-profile:has(.member-fields > div:first-child > span:empty) .checkin-waiting { display: block; }
    .checkin-waiting p { margin: 0 0 8px; color: var(--gym-dim); font-size: 11px; text-transform: uppercase; }
    .checkin-waiting h2 { margin: 0; font-size: 20px; line-height: 1.35; font-weight: 650; color: var(--ink); }
    .checkin-benefits { padding: 10px 18px; border-top: 1px solid var(--gym-line); min-width: 0; }
    .checkin-benefits h3 { margin: 0 0 7px; font-size: 11px; font-weight: 650; line-height: 1.4; color: var(--gym-dim); }
    .checkin-benefits ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; }
    .checkin-benefits li { display: grid; grid-template-columns: 20px minmax(0,1fr); align-items: start; gap: 7px; min-width: 0; }
    .checkin-benefits .lucide { width: 20px; height: 20px; color: var(--gym-positive); }
    .checkin-benefits strong { display: block; font-size: 11px; line-height: 1.4; }
    .checkin-benefits span, .checkin-benefits > p { display: block; font-size: 11px; line-height: 1.4; color: var(--gym-dim); margin: 2px 0 0; overflow-wrap: anywhere; }
    .checkin-benefits [data-included="0"] .lucide { color: var(--gym-dim); }
    .checkin-benefits [data-included="0"] span { color: var(--gym-warning); }
    .member-benefits-preview { grid-column: 1 / -1; min-width: 0; }
    .membership-benefits { border-top: 1px solid var(--gym-line); padding: 18px 0; min-width: 0; }
    .membership-benefits h3 { font-size: 14px; margin: 0 0 6px; }
    .benefit-plan-name { color: var(--gym-accent-ink); font-size: 12px; font-weight: 700; margin: 0 0 14px; overflow-wrap: anywhere; }
    .benefit-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit,minmax(min(100%,200px),1fr)); }
    .benefit-list li { display: grid; grid-template-columns: 26px minmax(0,1fr); align-items: start; gap: 10px; min-width: 0; }
    .benefit-list strong { font-size: 12px; line-height: 1.4; display: block; }
    .benefit-list p,.benefits-unset { font-size: 12px; color: var(--gym-dim); line-height: 1.5; margin: 3px 0 0; overflow-wrap: anywhere; }
    .benefit-icon { width: 26px; height: 26px; color: var(--gym-access); display: grid; place-items: start; }
    .benefit-icon .lucide { width: 24px; height: 24px; }
    .benefit-list [data-included="0"] .benefit-icon { color: var(--gym-dim); }
    .benefit-list [data-included="0"] p { color: var(--gym-warning); }
    .benefits-editor { min-width: 0; border: 1px solid var(--gym-line); padding: 16px; }
    .benefits-editor-fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr)); gap: 16px; margin-top: 16px; align-items: start; }
    .benefits-editor-fields[hidden], [data-benefit-minutes][hidden] { display: none !important; }
    [data-live-search-results][aria-busy="true"] { opacity: .55; }
    .live-search-status { color: var(--gym-dim); font-size: 12px; }
    [data-live-search-export][aria-disabled="true"] { opacity: .5; cursor: wait; }
    [data-weekly-limit-field][hidden] { display: none !important; }
    [data-promotion-feedback][hidden] { display: none !important; }
    [data-campaign-months][hidden], [data-campaign-plan][hidden] { display: none !important; }
    .campaign-tabs { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; border-bottom: 1px solid var(--gym-line); }
    .campaign-tabs a { padding: 10px 0; text-decoration: none; color: var(--gym-dim); border-bottom: 2px solid transparent; }
    .campaign-tabs a[aria-current] { color: var(--ink); border-bottom-color: var(--primary); }
    .campaign-plan-picker { min-width: 0; border: 1px solid var(--gym-line); padding: 14px; }
    .campaign-plan-picker > label { max-width: 400px; }
    .campaign-plans { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); gap: 8px 18px; max-height: 260px; overflow: auto; padding: 12px 0; }
    .campaign-plans label { min-width: 0; overflow-wrap: anywhere; align-items: start; }
    .membership-promotion-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 20px; padding: 14px 0; margin-bottom: 16px; border-block: 1px solid var(--gym-line); font-size: 12px; overflow-wrap: anywhere; }
    .membership-promotion-summary > span:not(.promotion-status) { color: var(--gym-dim); }
    .membership-promotion-summary .promotion-status { color: var(--gym-positive); }
    .membership-promotion-summary[data-eligible="0"] .promotion-status, .membership-promotion-feedback { color: var(--gym-warning); }
    .membership-promotion-feedback { margin: 0; font-size: 13px; }
    :root[data-theme] .sidebar { padding-inline: 12px; background: var(--gym-frame); border-color: var(--gym-line); }
    :root[data-theme] .brand { min-height: 88px; padding: 18px 4px; gap: 12px; border-bottom: 1px solid var(--gym-line); margin-bottom: 12px; }
    :root[data-theme] .brand-mark { width: 46px; height: 48px; flex-basis: 46px; }
    :root[data-theme] .brand strong { font-size: 13px; font-weight: 800; }
    :root[data-theme] .brand div > span { font-size: 8px; color: var(--gym-dim); }
    :root[data-theme] .sidebar nav { gap: 4px; padding: 0 2px 16px; }
    :root[data-theme] .nav-section { font-size: 9px; padding: 18px 12px 8px; color: var(--gym-dim); }
    :root[data-theme] .sidebar nav a { padding: 9px 11px; border-radius: 3px; min-height: 38px; border-color: transparent; }
    :root[data-theme] .sidebar nav a.active { color: var(--ink); background: var(--gym-hover); border-color: transparent; box-shadow: inset 3px 0 var(--primary); }
    :root[data-theme] .sidebar nav a.active .lucide { color: var(--gym-accent-ink); }
    :root[data-theme] .sidebar nav a.active::after { content: ''; width: 12px; height: 2px; margin-left: auto; flex: 0 0 12px; background: var(--primary); }
    :root[data-theme] .sidebar nav a:hover { background: var(--gym-hover); color: var(--ink); }
    :root[data-theme] .userbox { padding: 14px 4px; border-color: var(--gym-line); }
    :root[data-theme] .user-avatar { border-radius: 3px; background: transparent; border-color: var(--gym-line); }
    :root[data-theme] .workspace-bar { min-height: 60px; padding-block: 10px; background: var(--gym-frame); border-color: var(--gym-line); backdrop-filter: none; }
    :root[data-theme] .branch-switch select { height: 36px; min-height: 36px; font-size: 12px; border-radius: 3px; }
    :root[data-theme] .branch-switch .icon-button { height: 36px; min-height: 36px; }
    :root[data-theme] .shell { padding-top: 26px; }
    :root[data-theme] .topbar { min-height: 62px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--gym-line); align-items: center; }
    :root[data-theme] .topbar h1 { font-size: 26px; font-weight: 800; line-height: 1.3; }
    :root[data-theme] .eyebrow { font-size: 10px; text-transform: uppercase; color: var(--gym-dim); margin-bottom: 7px; }
    :root[data-theme] .topbar .eyebrow { display: flex; align-items: center; flex-wrap: wrap; }
    :root[data-theme] button,
    :root[data-theme] .button { border-radius: 3px; }
    :root[data-theme] button.primary,
    :root[data-theme] a.primary { border-radius: 3px; font-weight: 800; box-shadow: none; }
    :root[data-theme] input:not([type="checkbox"]):not([type="radio"]),
    :root[data-theme] select,
    :root[data-theme] textarea { border-radius: 3px; }
    :root[data-theme] input:focus,
    :root[data-theme] select:focus,
    :root[data-theme] textarea:focus { border-color: var(--primary); outline: 2px solid color-mix(in srgb, var(--primary) 28%, transparent); }
    :root[data-theme] .module-table { border-radius: 3px; border-color: var(--gym-line); }
    :root[data-theme] th,
    :root[data-theme] .module-table th,
    :root[data-theme] .record-table th.record-controls { color: var(--gym-dim); background: var(--gym-head); padding-block: 12px; font-size: 10px; font-weight: 750; border-bottom: 1px solid var(--gym-line); }
    :root[data-theme] td,
    :root[data-theme] .module-table td { padding-block: 13px; }
    :root[data-theme] .record-actions { gap: 5px; }
    :root[data-theme] .record-actions .icon-button { background: transparent; border-color: var(--gym-line); border-radius: 3px; }
    :root[data-theme] .record-actions .icon-button:hover { background: var(--gym-hover); border-color: var(--gym-dim); }
    :root[data-theme] .record-actions [data-membership-state="enabled"] { color: #acedcf; background: #153b2d; border-color: #477d60; }
    :root[data-theme] .record-actions [data-membership-state="enabled"]:hover { background: #20553f; border-color: #83ceab; }
    :root[data-theme] .record-actions [data-membership-state="disabled"] { color: #ffb4c0; background: #44252c; border-color: #995563; }
    :root[data-theme] .record-actions [data-membership-state="disabled"]:hover { background: #65313e; border-color: #f09bad; }
    :root[data-theme="light"] .record-actions [data-membership-state="enabled"] { color: #17613e; background: #e3f5eb; border-color: #74a98b; }
    :root[data-theme="light"] .record-actions [data-membership-state="enabled"]:hover { background: #c8ead8; border-color: #367654; }
    :root[data-theme="light"] .record-actions [data-membership-state="disabled"] { color: #a32042; background: #ffe8ed; border-color: #bd7284; }
    :root[data-theme="light"] .record-actions [data-membership-state="disabled"]:hover { background: #ffd3de; border-color: #a32042; }
    :root[data-theme] .status-label,
    :root[data-theme] .badge { border-radius: 3px; font-weight: 700; }
    :root[data-theme] .metrics:not(.member-kpis) { gap: 0; border-block: 1px solid var(--gym-line); margin-bottom: 16px; }
    :root[data-theme] .metrics:not(.member-kpis) article { position: relative; background: var(--gym-panel); border: 0; border-right: 1px solid var(--gym-line); border-radius: 0; padding: 21px 22px; }
    :root[data-theme] .metrics:not(.member-kpis) article:last-child { border-right: 0; padding-top: 21px; }
    :root[data-theme] .metrics:not(.member-kpis) article > div { min-height: 38px; align-items: flex-start; gap: 10px; }
    :root[data-theme] .metrics:not(.member-kpis) article > div .lucide { margin-top: 2px; }
    :root[data-theme] .metrics:not(.member-kpis) span { font-size: 11px; color: var(--gym-dim); }
    :root[data-theme] .metrics:not(.member-kpis) strong { font-family: Consolas, 'SFMono-Regular', ui-monospace, monospace; font-size: 36px; font-weight: 600; min-height: 44px; margin-top: 12px; line-height: 1.2; }
    :root[data-theme] .metrics:not(.member-kpis) [data-metric="income"] strong { font-size: 24px; line-height: 1.8; }
    :root[data-theme] .metrics [data-metric="active"] .lucide { color: var(--gym-positive); }
    :root[data-theme] .metrics [data-metric="access"] .lucide { color: var(--gym-access); }
    :root[data-theme] .metrics [data-metric="expiry"] .lucide { color: var(--gym-warning); }
    :root[data-theme] .metrics [data-metric="income"] .lucide { color: var(--gym-accent-ink); }
    :root[data-theme] .metrics [data-metric="income"]::after { content: ''; position: absolute; top: -1px; left: 22px; right: 22px; height: 2px; background: var(--primary); }
    :root[data-theme] .quick-actions { padding: 0 0 16px; border-top: 0; border-bottom: 1px solid var(--gym-line); margin-bottom: 22px; }
    :root[data-theme] .quick-actions a { min-height: 44px; padding: 10px 14px; border: 0; }
    :root[data-theme] .quick-actions a:hover { background: var(--gym-hover); }
    :root[data-theme] .quick-actions a span { font-size: 12px; }
    :root[data-theme] .quick-actions a .lucide:first-child { color: var(--gym-accent-ink); }
    :root[data-theme] .panel-head { padding: 16px 0; }
    :root[data-theme] .panel-head h2 { display: flex; gap: 10px; align-items: center; font-size: 15px; }
    :root[data-theme] .panel-head h2 .lucide { color: var(--gym-dim); }
    :root[data-theme] .dashboard-table { border-color: var(--gym-line); }
    :root[data-theme] .dashboard-table td { padding-block: 16px; }
    :root[data-theme] .dashboard-table .visitor-link { font-weight: 650; }
    :root[data-theme] .dashboard-table time { font-family: Consolas, 'SFMono-Regular', ui-monospace, monospace; font-size: 12px; color: var(--gym-dim); white-space: nowrap; }
    :root[data-theme] .dashboard-visitors table { min-width: 0; table-layout: fixed; width: 100%; }
    :root[data-theme] .dashboard-visitors th:first-child { width: 74px; }
    :root[data-theme] .dashboard-visitors th:last-child { width: 102px; }
    :root[data-theme] .dashboard-visitors td { overflow-wrap: anywhere; }
    :root[data-theme] .dashboard-visitors td:last-child { white-space: nowrap; }
    :root[data-theme] .dashboard-visitors tr[data-member-row]:hover td { background: var(--gym-hover); }
    :root[data-theme] .checkin-topbar { border-bottom: 0; padding-bottom: 0; min-height: 46px; margin-bottom: 18px; }
    :root[data-theme] .checkin-board { border: 1px solid var(--gym-line); border-radius: 4px; background: var(--gym-panel); }
    :root[data-theme] .checkin-header { position: relative; grid-template-columns: minmax(0,1fr) 78px; padding: 20px 24px; background-color: var(--gym-field); border-color: var(--gym-line); }
    :root[data-theme] .checkin-header::after { content: ''; position: absolute; left: 24px; bottom: -1px; width: 64px; height: 2px; background: var(--primary); }
    :root[data-theme] .checkin-header h2 { font-size: 22px; font-weight: 800; }
    :root[data-theme] .checkin-header p { font-size: 11px; }
    :root[data-theme] .gym-logo { width: 78px; height: 78px; }
    :root[data-theme] .checkin-search { padding: 24px; grid-template-columns: minmax(0,1fr) 220px auto; gap: 12px; }
    :root[data-theme] .checkin-search label { font-size: 13px; }
    :root[data-theme] .checkin-search input { height: 44px; font-family: Consolas, 'SFMono-Regular', ui-monospace, monospace; font-size: 19px; background: var(--gym-field); }
    :root[data-theme] .checkin-search button { min-height: 44px; }
    :root[data-theme] .checkin-profile { padding: 0 24px 24px; grid-template-columns: minmax(0,1fr) 124px; gap: 22px; }
    :root[data-theme] .member-fields div { grid-template-columns: 104px minmax(0,1fr); gap: 14px; }
    :root[data-theme] .member-fields strong { font-size: 10px; font-weight: 650; text-transform: uppercase; }
    :root[data-theme] .member-fields span { background: var(--gym-field); border-bottom: 1px solid var(--gym-line); border-radius: 0; min-height: 36px; padding: 8px 10px; font-size: 14px; }
    :root[data-theme] .member-fields div:first-child span { font-weight: 700; }
    :root[data-theme] .checkin-profile .member-photo { min-height: 110px; }
    :root[data-theme] .checkin-profile .member-photo img { width: 110px; height: 110px; object-fit: cover; border-radius: 3px; }
    :root[data-theme] .routine-card { margin-inline: 24px; border: 0; border-block: 1px solid var(--gym-line); }
    :root[data-theme] .routine-tabs { background: transparent; padding: 0; border-bottom: 1px solid var(--gym-line); }
    :root[data-theme] .routine-tabs span,
    :root[data-theme] .routine-tabs a { padding: 12px 14px; font-weight: 650; font-size: 11px; }
    :root[data-theme] .routine-tabs span { border-bottom: 2px solid var(--primary); }
    :root[data-theme] .routine-grid { padding: 16px 0; gap: 7px 12px; }
    :root[data-theme] .checkin-status { padding: 24px; gap: 20px; }
    :root[data-theme] .checkin-status strong { font-family: Consolas, 'SFMono-Regular', ui-monospace, monospace; font-size: 21px; }
    :root[data-theme] .checkin-footer { background: transparent; border: 0; border-radius: 0; padding: 20px 0; border-block: 1px solid var(--gym-line); }
    :root[data-theme] .checkin-footer div a { background: var(--gym-field); border-color: var(--gym-line); border-radius: 3px; }
    :root[data-theme] .member-detail-card { border-color: var(--gym-line); }
    :root[data-theme] .member-detail-card h2 { font-size: 23px; font-weight: 800; }
    :root[data-theme] .membership-facts { background: var(--gym-field); border-block: 1px solid var(--gym-line); }
    :root[data-theme] #member-payment-form > label.membership-observation { grid-column: 1 / -1; }
    :root[data-theme] .login-shell { background: var(--bg); }
    :root[data-theme] .login-card { border-radius: 4px; border: 1px solid var(--gym-line); border-top: 2px solid var(--primary); background: var(--gym-panel); padding-top: 40px; }
    :root[data-theme] .login-logo { width: 100px; height: 104px; margin-bottom: 20px; }
    :root[data-theme] .login-card h1 { font-size: 28px; font-weight: 800; }
    :root[data-theme] .login-card .eyebrow { color: var(--gym-accent-ink); font-size: 11px; }
    :root[data-theme] .login-audience { border-radius: 3px; border-color: var(--gym-line); background: transparent; padding: 0; gap: 0; }
    :root[data-theme] .login-audience a { border-radius: 0; border-bottom: 2px solid transparent; }
    :root[data-theme] .login-audience a[aria-current] { border-bottom-color: var(--primary); }
    :root[data-theme] .client-header { background: var(--gym-frame); border-color: var(--gym-line); }
    :root[data-theme] .client-nav a { border-radius: 3px; }
    :root[data-theme] .client-heading { padding-bottom: 22px; border-bottom: 1px solid var(--gym-line); }
    :root[data-theme] .client-heading h1 { font-weight: 800; }
}
@media screen and (min-width: 681px) {
    :root[data-theme] #member-payment-form > label.membership-plan { grid-column: span 2; }
}
@media screen and (max-width: 1200px) {
    :root[data-theme] .metrics:not(.member-kpis) article { padding-inline: 18px; }
    :root[data-theme] .metrics:not(.member-kpis) strong { font-size: 32px; }
}
/* The staff workspace uses one top bar; the client portal keeps its own navigation. */
@media screen {
    :root .workspace-bar.app-header { margin-left: 0; min-height: 60px; padding: 8px 20px; gap: 16px; z-index: 50; background: var(--gym-frame); border-color: var(--gym-line); }
    .app-header ~ .shell { margin-left: 0; }
    .header-brand { display: flex; align-items: center; flex: 0 0 auto; gap: 9px; text-decoration: none; color: var(--ink); }
    .header-brand img { width: 40px; height: 42px; object-fit: contain; }
    .header-brand strong { max-width: 130px; font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
    .top-navigation { display: flex; align-items: center; gap: 2px; min-width: 0; }
    .top-navigation[hidden] { display: none !important; }
    .top-navigation a, .top-nav-group > summary { display: flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 10px; color: var(--gym-dim); font-size: 12px; font-weight: 650; white-space: nowrap; text-decoration: none; border-bottom: 2px solid transparent; cursor: pointer; }
    .top-navigation a:hover, .top-nav-group > summary:hover { color: var(--ink); background: var(--gym-hover); }
    .top-navigation a.active, .top-nav-group.is-active > summary { color: var(--gym-accent-ink); border-bottom-color: var(--primary); background: var(--gym-field); }
    .top-navigation .lucide { width: 17px; height: 17px; flex: 0 0 17px; }
    .top-nav-group, .header-account { position: relative; }
    .app-header summary { list-style: none; }
    .app-header summary::-webkit-details-marker { display: none; }
    .top-nav-group > summary > .lucide { width: 13px; height: 13px; flex-basis: 13px; transform: rotate(90deg); }
    .top-nav-group[open] > summary > .lucide { transform: rotate(-90deg); }
    .top-nav-dropdown { position: absolute; top: calc(100% + 6px); left: 0; z-index: 2; width: 224px; max-height: min(480px, calc(100dvh - 82px)); overflow: auto; padding: 6px; border: 1px solid var(--gym-line); border-radius: 5px; background: var(--gym-panel); box-shadow: 0 8px 24px #00000030; }
    .top-nav-dropdown a { min-height: 38px; white-space: normal; overflow-wrap: anywhere; border-bottom: 0; border-radius: 3px; }
    .top-nav-dropdown a.active { box-shadow: inset 2px 0 var(--primary); }
    .header-tools { display: flex; align-items: center; flex: 0 0 auto; gap: 8px; margin-left: auto; min-width: 0; }
    .app-header .branch-switch { gap: 6px; margin: 0; max-width: 220px; }
    .app-header .branch-switch label { display: none; }
    .app-header .branch-switch select { width: 160px; }
    .header-tools > .icon-button, .header-account > summary { width: 36px; height: 36px; min-height: 36px; padding: 7px; display: grid; place-items: center; border: 1px solid var(--gym-line); border-radius: 3px; color: var(--ink); cursor: pointer; }
    .header-account > summary:hover { background: var(--gym-hover); }
    .account-dropdown { left: auto; right: 0; }
    .account-dropdown > small, .account-dropdown > strong { display: block; padding: 4px 10px; overflow-wrap: anywhere; }
    .account-dropdown > small { color: var(--gym-dim); }
    .account-dropdown > strong { font-size: 13px; padding-bottom: 12px; border-bottom: 1px solid var(--gym-line); }
    .account-dropdown a { display: flex; align-items: center; gap: 10px; padding: 10px; color: var(--ink); text-decoration: none; }
    .account-dropdown a:hover { background: var(--gym-hover); }
    .app-header #navigation-toggle, .mobile-nav-heading { display: none; }
}
@media screen and (max-width: 1399px) {
    .header-brand strong { display: none; }
}
@media screen and (max-width: 1199px) {
    :root .workspace-bar.app-header { flex-wrap: wrap; gap: 8px; padding-inline: 16px; }
    :root .app-header:has([data-nav-ready]) { flex-wrap: nowrap; }
    .app-header:has([data-nav-ready]) #navigation-toggle { display: grid; place-items: center; width: 34px; min-height: 36px; padding: 6px; flex: 0 0 34px; }
    .header-tools { flex: 1; gap: 6px; }
    .app-header .branch-switch { flex: 1; max-width: none; }
    .app-header .branch-switch select { width: 0; min-width: 0; flex: 1; }
    .top-navigation { order: 3; flex: 0 0 100%; align-items: stretch; flex-direction: column; padding-block: 8px; }
    .top-navigation[data-nav-ready] { position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100dvh - 62px); overflow-y: auto; padding: 10px 16px 16px; border-bottom: 1px solid var(--gym-line); background: var(--gym-panel); box-shadow: 0 8px 18px #00000028; }
    .top-navigation a, .top-nav-group > summary { min-height: 44px; }
    .top-nav-group > summary { justify-content: space-between; }
    .top-nav-dropdown { position: static; width: auto; max-height: none; margin: 0 0 6px 12px; box-shadow: none; border: 0; border-left: 1px solid var(--gym-line); border-radius: 0; }
    .header-account .account-dropdown { position: absolute; width: 224px; margin: 0; border: 1px solid var(--gym-line); box-shadow: 0 8px 24px #00000030; }
    .mobile-nav-heading { display: flex; align-items: center; justify-content: space-between; padding-left: 10px; color: var(--gym-dim); }
    .mobile-nav-heading .nav-close { display: grid; place-items: center; width: 36px; min-height: 36px; padding: 6px; }
    .top-navigation:not([data-nav-ready]) .mobile-nav-heading { display: none; }
    .app-header + .nav-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 45; width: 100%; height: 100dvh; border: 0; border-radius: 0; background: #0009; }
    body.navigation-open { overflow: hidden; }
}
@media screen and (max-width: 680px) {
    :root .workspace-bar.app-header { gap: 6px; padding-inline: 12px; }
    .header-brand img { width: 30px; height: 36px; }
}
@media screen and (max-width: 980px) {
}
@media print {
    .checkin-notices { display: none; }
}
@media screen and (min-width: 1100px) {
    :root[data-theme] body[data-page="registro"] {
        min-height: 100dvh;
        display: grid;
        grid-template-rows: auto 1fr;
    }
    :root[data-theme] body[data-page="registro"] .shell {
        display: flex;
        flex-direction: column;
        padding: 12px 22px 16px;
    }
    :root[data-theme] body[data-page="registro"] .shell > * { flex-shrink: 0; }
    :root[data-theme] .checkin-topbar { min-height: 30px; margin-bottom: 10px; }
    :root[data-theme] .checkin-topbar > div { display: flex; align-items: center; gap: 14px; }
    :root[data-theme] .checkin-topbar .eyebrow { margin: 0; }
    :root[data-theme] .checkin-topbar h1 { font-size: 20px; }
    :root[data-theme] body[data-page="registro"] .flash { padding: 9px 12px; margin-bottom: 10px; }
    :root[data-theme] .checkin-board {
        display: grid;
        flex: 1 0 auto;
        grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
        grid-template-areas: "brand search" "birthday birthday" "profile routine" "benefits benefits" "status status" "warning warning";
        grid-template-rows: auto auto minmax(min-content, 1fr) auto auto auto;
        width: 100%; max-width: none; margin-bottom: 0;
    }
    :root[data-theme] .checkin-header { grid-area: brand; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; padding: 12px 18px; }
    :root[data-theme] .checkin-header > div:first-child { grid-column: 2; grid-row: 1; min-width: 0; }
    :root[data-theme] .checkin-header h2 { font-size: 18px; margin-bottom: 4px; }
    :root[data-theme] .checkin-header p { display: inline; font-size: 10px; line-height: 1.5; }
    :root[data-theme] .checkin-header p:empty { display: none; }
    :root[data-theme] .checkin-header p + p:not(:empty)::before { content: ' / '; color: var(--gym-dim); }
    :root[data-theme] .checkin-header .gym-logo { grid-column: 1; grid-row: 1; width: 52px; height: 54px; }
    :root[data-theme] .checkin-header::after { left: 18px; }
    :root[data-theme] .checkin-search { grid-area: search; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; padding: 12px 18px; border-bottom: 1px solid var(--gym-line); background: var(--gym-field); }
    :root[data-theme] .checkin-search label { grid-column: 1 / -1; font-size: 12px; }
    :root[data-theme] .checkin-search input { width: 100%; min-width: 0; height: 44px; font-size: 21px; }
    :root[data-theme] .checkin-profile { grid-area: profile; grid-template-columns: 140px minmax(0, 1fr); align-content: center; align-items: center; padding: 24px; gap: 24px; }
    :root[data-theme] .checkin-benefits { grid-area: benefits; display: grid; grid-template-columns: 124px minmax(0,1fr); gap: 12px; align-items: center; padding: 8px 18px; }
    :root[data-theme] .checkin-benefits h3 { margin: 0; }
    :root[data-theme] .checkin-profile .member-fields { grid-column: 2; grid-row: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; align-self: center; }
    :root[data-theme] .checkin-profile .member-fields div { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
    :root[data-theme] .checkin-profile .member-fields div:nth-child(-n+2) { grid-column: 1 / -1; }
    :root[data-theme] .checkin-profile .member-fields div:nth-child(2) { padding-top: 12px; border-top: 1px solid var(--gym-line); }
    :root[data-theme] .checkin-profile .member-fields strong { font-size: 10px; color: var(--gym-dim); }
    :root[data-theme] .checkin-profile .member-fields span { display: block; min-height: 0; padding: 0; font-size: 14px; line-height: 1.45; background: transparent; border: 0; width: 100%; overflow-wrap: anywhere; }
    :root[data-theme] .checkin-profile .member-fields div:first-child span { font-size: 22px; font-weight: 750; line-height: 1.25; }
    :root[data-theme] .checkin-profile .member-fields div:nth-child(2) span { font-size: 16px; font-weight: 650; }
    :root[data-theme] .checkin-waiting { grid-column: 2; grid-row: 1; }
    :root[data-theme] .checkin-profile .member-photo { grid-column: 1; grid-row: 1; width: 140px; height: 175px; min-height: 0; border: 1px solid var(--gym-line); border-radius: 6px; overflow: hidden; background: var(--gym-field); }
    :root[data-theme] .checkin-profile .member-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
    :root[data-theme] .checkin-profile .silhouette { width: 100%; height: 100%; }
    :root[data-theme] .checkin-profile .silhouette svg { width: 64px; height: 64px; color: var(--gym-dim); }
    :root[data-theme] .checkin-board > .routine-card { grid-area: routine; display: flex; flex-direction: column; margin: 0; padding: 0 24px 20px; border: 0; border-left: 1px solid var(--gym-line); min-width: 0; }
    :root[data-theme] .checkin-board .routine-tabs { flex: 0 0 auto; gap: 18px; }
    :root[data-theme] .checkin-board .routine-tabs a { padding: 12px 2px; }
    :root[data-theme] .checkin-board .routine-tabs a:first-child { border-bottom: 2px solid var(--primary); }
    :root[data-theme] .checkin-board .routine-grid { flex: 1; grid-template-columns: 86px minmax(0, 1fr); grid-auto-rows: 38px; gap: 0; padding: 12px 0 0; align-content: center; align-items: stretch; }
    :root[data-theme] .checkin-board .routine-grid strong,
    :root[data-theme] .checkin-board .routine-grid span { min-width: 0; padding: 9px 10px; border-bottom: 1px solid var(--gym-line); line-height: 19px; }
    :root[data-theme] .checkin-board .routine-grid strong { font-size: 11px; font-weight: 600; color: var(--gym-dim); }
    :root[data-theme] .checkin-board .routine-grid span { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    :root[data-theme] .checkin-board .routine-grid .is-today { background: var(--gym-field); }
    :root[data-theme] .checkin-board .routine-grid strong.is-today { box-shadow: inset 2px 0 var(--primary); color: var(--gym-accent-ink); }
    :root[data-theme] .checkin-status { grid-area: status; grid-template-columns: minmax(0, 1fr) minmax(120px, 1fr) minmax(110px, 1fr) auto; padding: 13px 18px; gap: 18px; border-top: 1px solid var(--gym-line); background: var(--gym-field); }
    :root[data-theme] .checkin-status strong { font-size: 23px; line-height: 1.2; }
    :root[data-theme] .checkin-warning { grid-area: warning; margin: 0; padding: 9px 18px; border-radius: 0; font-size: 13px; }
    :root[data-theme] .checkin-board:has(> .birthday-greeting) .checkin-header { display: none; }
    :root[data-theme] .checkin-board > .birthday-greeting { grid-area: brand; grid-template-columns: 38px minmax(0, 1fr) 28px; align-items: center; margin: 0; padding: 10px 18px; gap: 10px; border-radius: 0; }
    :root[data-theme] .checkin-board .birthday-greeting h2 { font-size: 16px; }
    :root[data-theme] .checkin-board .birthday-greeting .birthday-emblem { width: 38px; height: 38px; }
    :root[data-theme] .checkin-board .birthday-eyebrow { display: none; }
    :root[data-theme] .checkin-board .birthday-message > p:last-child { margin: 3px 0 0; font-size: 11px; }
    :root[data-theme] .checkin-footer { width: 100%; max-width: none; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 8px 0; margin: 10px auto 0; }
    :root[data-theme] .checkin-footer label { font-size: 11px; }
    :root[data-theme] .checkin-footer > strong { grid-column: 2; grid-row: 1; text-align: center; font-size: 12px; }
    :root[data-theme] .checkin-footer div { grid-column: 3; grid-row: 1; display: flex; align-items: center; gap: 8px; }
    :root[data-theme] .checkin-footer div a { padding: 7px 10px; margin-left: 0; font-size: 11px; }
    :root[data-theme] .checkin-footer div strong { font-size: 18px; margin: 0 0 0 8px; }
    :root[data-theme] .checkin-detail-panel { width: 100%; max-width: none; }
}
@media screen and (min-width: 1100px) and (max-height: 800px) {
    :root[data-theme] body[data-page="registro"] .shell { padding-block: 8px 10px; }
    :root[data-theme] .checkin-header, :root[data-theme] .checkin-search { padding-block: 8px; }
    :root[data-theme] .checkin-profile { padding-block: 16px; }
    :root[data-theme] .checkin-board > .routine-card { padding-bottom: 12px; }
    :root[data-theme] .checkin-status { padding-block: 8px; }
    :root[data-theme] .checkin-warning { padding-block: 6px; }
    :root[data-theme] .checkin-footer { padding-block: 5px; }
}
@media screen and (min-width: 1100px) and (min-height: 801px) {
    :root[data-theme] .checkin-profile { grid-template-columns: 168px minmax(0, 1fr); gap: 28px; }
    :root[data-theme] .checkin-profile .member-photo { width: 168px; height: 210px; }
    :root[data-theme] .checkin-profile .member-fields div:first-child span { font-size: 24px; }
    :root[data-theme] .checkin-board .routine-grid { grid-auto-rows: 48px; }
    :root[data-theme] .checkin-board .routine-grid strong,
    :root[data-theme] .checkin-board .routine-grid span { padding-block: 14px; }
    :root[data-theme] .checkin-board .routine-grid span { font-size: 14px; }
    :root[data-theme] .checkin-board .routine-grid strong { font-size: 12px; }
}
@media screen and (min-width: 1100px) and (max-height: 740px) {
    :root[data-theme] .checkin-profile { grid-template-columns: 120px minmax(0, 1fr); padding: 12px 18px; gap: 18px; }
    :root[data-theme] .checkin-profile .member-photo { width: 120px; height: 150px; }
    :root[data-theme] .checkin-profile .member-fields { gap: 10px 14px; }
    :root[data-theme] .checkin-profile .member-fields div { gap: 2px; }
    :root[data-theme] .checkin-profile .member-fields div:first-child span { font-size: 18px; }
    :root[data-theme] .checkin-profile .member-fields div:nth-child(2) { padding-top: 8px; }
    :root[data-theme] .checkin-profile .member-fields div:nth-child(2) span { font-size: 14px; }
    :root[data-theme] .checkin-profile .member-fields strong { font-size: 9px; }
    :root[data-theme] .checkin-profile .member-fields span { font-size: 12px; }
    :root[data-theme] .checkin-board > .routine-card { padding: 0 18px 8px; }
    :root[data-theme] .checkin-board .routine-tabs a { padding-block: 8px; }
    :root[data-theme] .checkin-board .routine-grid { grid-auto-rows: 24px; padding-top: 8px; }
    :root[data-theme] .checkin-board .routine-grid strong,
    :root[data-theme] .checkin-board .routine-grid span { padding-block: 2px; font-size: 11px; }
    :root[data-theme] .checkin-status { padding-block: 6px; }
}
@media screen and (min-width: 1100px) and (max-height: 660px) {
    :root[data-theme] .checkin-board .routine-tabs a { padding-block: 4px; }
    :root[data-theme] .checkin-board .routine-grid { grid-auto-rows: 22px; }
    :root[data-theme] .checkin-board .routine-grid strong,
    :root[data-theme] .checkin-board .routine-grid span { line-height: 17px; }
}
@media screen and (max-width: 980px) {
    :root[data-theme] .sidebar { padding-inline: 12px; }
    :root[data-theme] .sidebar .brand { padding-inline: 4px; }
}
@media screen and (max-width: 680px) {
    .checkin-benefits ul { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
    .membership-promotion-summary { grid-template-columns: minmax(0,1fr); }
    :root[data-theme] .shell { padding-top: 22px; }
    :root[data-theme] .topbar { gap: 14px; padding-bottom: 16px; }
    :root[data-theme] .topbar h1 { font-size: 23px; }
    :root[data-theme] .metrics:not(.member-kpis) article { padding: 16px; border-bottom: 1px solid var(--gym-line); }
    :root[data-theme] .metrics:not(.member-kpis) article:nth-child(even) { border-right: 0; }
    :root[data-theme] .metrics:not(.member-kpis) article:last-child { padding-top: 16px; border-bottom: 0; }
    :root[data-theme] .metrics:not(.member-kpis) strong { font-size: 30px; }
    :root[data-theme] .metrics:not(.member-kpis) article > div { min-height: 38px; gap: 8px; }
    :root[data-theme] .metrics:not(.member-kpis) span { font-size: 10px; }
    :root[data-theme] .quick-actions { margin-bottom: 16px; padding-bottom: 12px; }
    :root[data-theme] .quick-actions a { padding-inline: 8px; }
    :root[data-theme] .dashboard-visitors th:first-child { width: 60px; }
    :root[data-theme] .dashboard-visitors th:last-child { width: 76px; }
    :root[data-theme] .dashboard-visitors th,
    :root[data-theme] .dashboard-visitors td { padding-inline: 8px; }
    :root[data-theme] .dashboard-visitors time { font-size: 11px; }
    :root[data-theme] .checkin-topbar { padding-bottom: 0; }
    :root[data-theme] .checkin-header { padding: 18px 16px; grid-template-columns: minmax(0,1fr) 64px; gap: 12px; }
    :root[data-theme] .checkin-header h2 { font-size: 19px; }
    :root[data-theme] .checkin-header::after { left: 16px; }
    :root[data-theme] .gym-logo { width: 64px; height: 64px; }
    :root[data-theme] .checkin-search { padding: 20px 16px; grid-template-columns: minmax(0,1fr) auto; }
    :root[data-theme] .checkin-profile { padding: 0 16px 20px; grid-template-columns: minmax(0,1fr); gap: 18px; }
    :root[data-theme] .checkin-profile .member-photo:has(.silhouette) { display: none; }
    :root[data-theme] .checkin-profile .member-photo { min-height: 64px; }
    :root[data-theme] .checkin-profile .member-photo img { width: 64px; height: 64px; }
    :root[data-theme] .member-fields div { grid-template-columns: 76px minmax(0,1fr); gap: 8px; }
    :root[data-theme] .member-fields span { font-size: 13px; }
    :root[data-theme] .routine-card { margin-inline: 16px; }
    :root[data-theme] .checkin-status { padding: 20px 16px; }
    :root[data-theme] .checkin-status strong { font-size: 18px; }
    :root[data-theme] .checkin-footer { padding-block: 16px; }
    :root[data-theme] .login-card { padding: 36px 24px 28px; }
    :root[data-theme] .login-logo { width: 90px; height: 94px; }
}

html[data-navigation-loading]::before {
    content: '';
    position: fixed;
    inset: 0 0 auto;
    height: 3px;
    background: #ff9400;
    z-index: 10000;
    pointer-events: none;
}
main[tabindex="-1"]:focus { outline: none; }
