/* WIIN visual system. Layout only: business rules, status colours and data are preserved. */
:root{color-scheme:light;--bg:#f7f8fb;--card:#fff;--line:#dfe5ef;--text:#183e86;--muted:#526580;--blue:#183e86;--blue-soft:#eef2fa;--red:#a20e1a;--shadow:0 4px 20px #183e8606}
body.wiin-staff,body.member-body{background:#f7f8fb;color:#183e86}
.wiin-staff h1,.wiin-staff h2,.wiin-staff h3,.wiin-staff h4,.member-main h1,.member-main h2,.member-main h3{color:#183e86;opacity:1;overflow-wrap:anywhere}
.wiin-staff .main-content{padding:32px 32px 56px;max-width:1700px;min-width:0}
.wiin-staff .sidebar{padding:26px 16px 18px;overflow-y:auto}
.wiin-staff .brand{display:block;padding:0 12px 28px}
.wiin-staff .brand .wiin-brand-logo{display:block;width:90px!important;height:auto!important;max-width:100%;object-fit:contain;margin-bottom:12px}
.wiin-staff .brand span{font-size:11px;color:#526580;line-height:1.5}
.wiin-staff .nav-link{padding:13px 12px;font-weight:500;color:#526580;line-height:1.4}
.wiin-staff .nav-link.active{background:#eef2fa;color:#183e86;font-weight:700}
.wiin-staff .nav-link:hover{background:#f2f5fb;color:#183e86}
.wiin-staff .sidebar-bottom{padding-top:28px}
.wiin-staff .page-head{gap:20px;margin-bottom:24px}
.wiin-staff .page-head h1{font-size:28px;line-height:1.25;letter-spacing:-.025em}
.wiin-staff .page-head p{font-size:13px;line-height:1.65;max-width:850px;color:#526580}
.wiin-staff .card,.wiin-staff .kpi-card{border-color:#dfe5ef;border-radius:14px;box-shadow:0 4px 20px #183e8606}
.wiin-staff .card h3{font-size:15px;line-height:1.4}
.wiin-staff .btn,.member-body .btn{min-height:40px;height:auto;padding:10px 14px;line-height:1.4;border-radius:9px;white-space:normal;text-align:center}
.wiin-staff .btn.primary,.member-body .btn.primary{background:#a20e1a;color:#fff;border-color:#a20e1a}
.wiin-staff .btn.primary:hover,.member-body .btn.primary:hover{background:#850b15;border-color:#850b15}
.wiin-staff .btn.secondary{background:#fff;color:#183e86;border-color:#dfe5ef}
.wiin-staff .btn:disabled{opacity:.5;cursor:not-allowed}
.wiin-staff :is(input,select,textarea){accent-color:#183e86}
.wiin-staff :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=color]){color:#183e86;background:#fff;border-color:#d5ddeb;border-radius:9px;max-width:100%}
.wiin-staff ::placeholder{color:#64748b;opacity:1}
.wiin-staff :is(a,button,input,textarea,select,summary):focus-visible{outline:2px solid #183e86;outline-offset:3px}
.wiin-staff .tr-subnav{background:#f7f8fb;border-bottom:1px solid #dfe5ef;gap:6px;padding:10px 0;margin-bottom:26px;overflow-x:auto;flex-wrap:nowrap}
.wiin-staff .tr-subnav a{flex-shrink:0;border-radius:0;padding:12px 15px;color:#526580;background:transparent}
.wiin-staff .tr-subnav a[aria-current=page]{color:#183e86;border-bottom:2px solid #183e86;background:transparent}
.wiin-staff :is(.client-tabs,.mg-tabs,.report-tabs) :is(.selected,[aria-selected=true]),.wiin-staff #editor-session-tabs button[aria-selected=true]{background:#183e86;color:#fff}
.wiin-staff .data-table th{color:#526580;background:#f7f8fb;font-size:11px;padding:13px 14px}
.wiin-staff .data-table td{font-size:12px;padding:13px 14px}
.wiin-staff .data-table small{color:#526580;font-size:11px;line-height:1.5}
.wiin-staff .data-table .client-cell strong{font-size:12px}
.wiin-staff .form-grid label,.wiin-staff .client-form label{color:#526580;font-size:12px}
.wiin-staff .kpi-card span{font-size:12px;line-height:1.5}
.wiin-staff .kpi-card strong{font-size:25px;line-height:1.2}
.wiin-staff .mobile-bar{color:#183e86}
/* Library: compact cards, a separate editor, and no hidden form mutations. */
.library-import,.library-create{margin-bottom:16px}
.library-import summary,.library-create summary{cursor:pointer;font-weight:650;line-height:1.5}
.library-create[open] summary{margin-bottom:20px}
.library-filters{display:flex;align-items:end;gap:16px;margin-top:24px}
.library-filters label{display:grid;gap:8px;flex:1;font-size:12px;color:#526580;min-width:0}
.library-filters label:first-child{flex:2}
.library-filters #exercise-search{margin:0;width:100%;max-width:none;min-height:44px}
.library-filters select{min-height:44px;padding:10px 12px;border:1px solid #dfe5ef;width:100%}
#exercise-results{color:#526580;font-size:12px;margin:16px 0}
.library-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:start}
#exercise-list.library-grid>details{margin:0;padding:22px;min-width:0}
.library-grid>details>summary{display:flex;flex-direction:column;align-items:start;list-style:none;cursor:pointer;gap:18px;min-height:170px}
.library-grid>details>summary::-webkit-details-marker{display:none}
.library-category{display:inline-block;background:#eef2fa;color:#183e86;border-radius:6px;padding:5px 9px;font-size:11px;line-height:1.5}
.library-title{font-size:15px;font-weight:700;line-height:1.5;color:#183e86;overflow-wrap:anywhere}
.library-open{font-size:12px;border:1px solid #dfe5ef;border-radius:8px;padding:9px 12px;margin-top:auto;color:#183e86}
.library-grid>details[open]{grid-column:1/-1}
.library-grid>details[open]>summary{min-height:0;gap:12px;border-bottom:1px solid #dfe5ef;padding-bottom:20px}
.library-grid>details[open] .library-open{display:none}
.library-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:24px 0;font-size:12px}
.library-grid .exercise-library-form:focus-within>button{position:static;box-shadow:none}
/* Editorial page has its own stylesheet; use scoped selectors to keep one palette. */
.wiin-staff .wiin-exercise-editor{--ee-ink:#183e86;--ee-muted:#526580;--ee-line:#dfe5ef;max-width:1200px}
.wiin-staff .wiin-exercise-editor .ee-card{border-radius:14px;box-shadow:0 4px 20px #183e8606}
.wiin-staff .wiin-exercise-editor :is(h1,h2,h3){color:#183e86}
.wiin-staff .wiin-exercise-editor .ee-save{background:#a20e1a;color:white}
.member-body .member-session-tabs button.active,.member-body .member-session-tabs button[aria-selected=true]{background:#183e86;color:#fff}
@media(min-width:801px) and (max-width:1180px){.library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:800px){.wiin-staff .main-content{padding:16px 16px 44px}.wiin-staff .page-head h1{font-size:25px}.library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.wiin-staff .mobile-bar{margin:0 0 20px;padding:12px 0}.wiin-staff .sidebar{max-width:calc(100vw - 60px)}.library-filters{flex-wrap:wrap}.wiin-staff .tr-subnav{margin-bottom:20px}}
@media(max-width:580px){.library-grid{grid-template-columns:minmax(0,1fr)}.library-filters{display:grid;grid-template-columns:1fr}.library-grid>details>summary{min-height:150px}.wiin-staff .page-head{align-items:stretch}.wiin-staff .toolbar{gap:8px}.wiin-staff .tr-subnav a{padding:10px 12px}}
@media(prefers-reduced-motion:reduce){.wiin-staff *{scroll-behavior:auto!important;transition:none!important}}
@media print{.wiin-staff .main-content{padding:0;margin:0;width:100%}.library-grid{display:block}.library-pagination,.library-filters,#show-create-exercise{display:none}}
.wiin-staff .wiin-exercise-editor{--ee-green:#183e86}
.wiin-staff .wiin-exercise-editor .ee-secondary:hover,.wiin-staff .wiin-exercise-editor .ee-back:hover{background:#eef2fa;border-color:#183e86}
.wiin-staff .wiin-exercise-editor :is(.ee-preview,.ee-table-head,.ee-save-bar){background:#f7f8fb}
.wiin-staff .wiin-exercise-editor :is(.ee-count,.exercise-muscle-row[data-selected=true]){background:#eef2fa;color:#183e86}
.wiin-staff .wiin-exercise-editor .ee-save:hover{background:#850b15;border-color:#850b15}

.wiin-staff .wiin-exercise-editor .ee-category{background:#eef2fa;color:#183e86;border-color:#dfe5ef}

.attendance-alphabet{display:flex;flex-wrap:wrap;gap:5px;padding:12px 0}.attendance-alphabet button{min-width:32px;min-height:36px}.attendance-alphabet [aria-pressed="true"]{background:#183e86!important;color:#fff!important}

/* 5.48 · management menu in WIIN blue, as in the approved sketch: white logo and text, the current page in a lighter band. */
.wiin-staff .sidebar{background:#183e86;border-right:0;color:#dfe6f5}
.wiin-staff .sidebar .brand .wiin-brand-logo{background:#fff;border-radius:10px;padding:8px 12px;box-sizing:content-box;width:76px!important}
.wiin-staff .brand span{color:#b9c8e6}
.wiin-staff .sidebar .nav-link{color:#dfe6f5;border-radius:8px}
.wiin-staff .sidebar .nav-link span{color:#b9c8e6}
.wiin-staff .sidebar .nav-link:hover{background:#ffffff1a;color:#fff}
.wiin-staff .sidebar .nav-link.active{background:#ffffff26;color:#fff;font-weight:700}
.wiin-staff .sidebar .nav-link.active span{color:#fff}
.wiin-staff .sidebar .nav-link:focus-visible{outline:2px solid #fff;outline-offset:2px}
.wiin-staff .sidebar-bottom{border-top:1px solid #ffffff2e}
/* 5.48 (G14) · one sentence that says the month in plain words, and a 12-month line inside each number. */
.month-sentence{background:#fff;border:1px solid #dfe5ef;border-left:4px solid #183e86;border-radius:0 12px 12px 0;padding:14px 18px;margin:0 0 14px}
.month-sentence p{margin:0;font-size:17px;line-height:1.5;color:#26324a}
.month-sentence strong{color:#0f1b33}
.month-sentence small{display:block;margin-top:6px;color:#5c6b80;font-size:12.5px}
.kpi-spark{display:block;width:100%;height:34px;margin:6px 0 2px}
.kpi-spark polyline{fill:none;stroke:#b9c8e6;stroke-width:2.2;stroke-linejoin:round;stroke-linecap:round}
.kpi-spark circle{fill:#183e86}
.kpi-unpaid strong{color:#a20e1a}
/* G16 · new-client permanence as a heat map: darker blue = more of them stayed. */
.mg-cell.heat-0{background:#f2f5fb}.mg-cell.heat-1{background:#dfe7f4}.mg-cell.heat-2{background:#b9c8e6}
.mg-cell.heat-3{background:#6f88b8;color:#fff}.mg-cell.heat-4{background:#183e86;color:#fff}
.mg-cell.heat-3 small,.mg-cell.heat-4 small{color:#e6ecf7}
/* G18 · clients per plan, month by month. */
.plan-mix{display:flex;gap:14px;align-items:flex-end;padding:8px 4px 0;overflow-x:auto}
.plan-mix-month{flex:1 0 64px;display:grid;justify-items:center;gap:4px;text-align:center}
.plan-mix-bar{width:100%;max-width:72px;height:170px;display:flex;flex-direction:column-reverse;border-bottom:1px solid #dfe5ef}
.plan-mix-bar i{display:block;width:100%}
.plan-mix-month b{font-variant-numeric:tabular-nums;color:#0f1b33}
.plan-mix-month span{font-size:12px;color:#5c6b80;line-height:1.25}
.plan-mix-month.is-partial .plan-mix-bar{opacity:.65}
.plan-mix-legend{display:flex;flex-wrap:wrap;gap:14px;font-size:13px;color:#33405a;margin:10px 0}
.plan-mix-legend i{display:inline-block;width:11px;height:11px;border-radius:2px;margin-right:6px;vertical-align:-1px}
.pm-0{background:#183e86}.pm-1{background:#4c6aa6}.pm-2{background:#8ea3c9}.pm-3{background:#c7d3ea}.pm-4{background:#a20e1a}.pm-5{background:#9aa3b3}
/* G17 · the reason first, then the last paid month and the last marked presence. */
.contact-reason{font-weight:600;color:#0f1b33}