@font-face {
  font-family: Inter;
  src: url('/inter-latin-ext.woff2') format('woff2');
  font-display: swap;
  font-weight: 100 900;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Inter;
  src: url('/inter-latin.woff2') format('woff2');
  font-display: swap;
  font-weight: 100 900;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", sans-serif;
  color: #1d2c24;
  background: #f3f5f0;
  --ink: #1d2c24;
  --muted: #58695f;
  --pine: #1c3428;
  --green: #2d5942;
  --green-hover: #244936;
  --line: #dfe6dd;
  --line-strong: #c8d4c9;
  --white: #ffffff;
  --paper: #fbfcfa;
  --soft: #edf3ec;
  --accent: #edac80;
  --accent-hover: #f2bd9b;
  --radius: 15px;
  --focus: #b35832;
  --shadow: 0 2px 3px #20362905;
  line-height: 1.5;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, dl, dd, ol, ul, fieldset { margin: 0; }
button, input, select, textarea { color: inherit; font: inherit; }
button, input, select, textarea, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, h4 { letter-spacing: -.035em; line-height: 1.15; font-weight: 720; }
h1 { font-size: clamp(2rem, 2.65vw, 3.2rem); letter-spacing: -.065em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.13rem; }
h4 { font-size: .96rem; }
time, .calendar-number, .stat strong, .nutrition-metrics dd { font-variant-numeric: tabular-nums; }
p, dd { overflow-wrap: anywhere; }
.icon { width: 20px; height: 20px; display: inline-block; flex: 0 0 auto; vertical-align: middle; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 20; left: 12px; top: -100px; background: white; padding: 10px 15px; border-radius: 8px; }
.skip-link:focus { top: 8px; }

.btn, .icon-btn, .text-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: .89rem;
  font-weight: 660;
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  line-height: 1.2;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn { min-height: 42px; padding: 8px 13px; white-space: nowrap; }
.btn .icon, .text-link .icon, .icon-btn .icon { width: 17px; height: 17px; }
.icon-btn { width: 38px; height: 38px; padding: 0; background: var(--white); border-color: var(--line); flex: 0 0 auto; }
.icon-btn:hover:not(:disabled), .btn.secondary:hover { background: var(--soft); border-color: var(--line-strong); }
.primary { background: var(--green); color: white; }
.primary:hover:not(:disabled) { background: var(--green-hover); }
.accent { background: var(--accent); color: #312417; border-color: #e2a478; }
.accent:hover:not(:disabled) { background: var(--accent-hover); }
.secondary { background: var(--white); border-color: var(--line-strong); }
.subtle, .text-btn { background: transparent; color: var(--green-hover); }
.subtle:hover, .text-btn:hover { background: var(--soft); }
.text-link { color: var(--green-hover); min-height: 30px; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100dvh; }
.rail { position: sticky; top: 0; height: 100dvh; background: var(--pine); color: white; padding: 27px 16px 17px; display: flex; flex-direction: column; }
.brand { display: inline-flex; align-items: center; gap: 11px; padding: 0 8px; }
.brand-mark { display: inline-grid; place-items: center; width: 39px; height: 39px; border-radius: 10px; background: var(--accent); color: var(--pine); font-size: 1.24rem; font-weight: 900; font-style: italic; letter-spacing: -.12em; padding-right: 3px; }
.brand-type { display: flex; flex-direction: column; gap: 2px; }
.brand-type strong { color: white; font-size: 1.48rem; line-height: .98; font-weight: 850; letter-spacing: -.07em; }
.brand-type small { color: #c1d1c3; font-size: .76rem; font-weight: 570; }
.rail-nav { display: grid; gap: 6px; margin-top: 53px; }
.nav-item, .diary-link { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 46px; border: 1px solid transparent; border-radius: 8px; padding: 8px 11px; text-align: left; text-decoration: none; background: transparent; color: #d2dfd4; font-size: .89rem; font-weight: 610; }
.nav-item:hover, .diary-link:hover { background: #2b4437; color: white; }
.nav-item[aria-current] { border-color: #3e5949; background: #314b3d; color: white; }
.nav-item[aria-current] .icon { color: #f3be99; }
.nav-count { margin-left: auto; background: #50715c; min-width: 23px; padding: 1px 5px; text-align: center; border-radius: 6px; color: #fff; font-size: .76rem; }
.rail-bottom { margin-top: auto; }
.rail-person { display: flex; align-items: center; gap: 9px; min-height: 60px; margin-top: 12px; padding: 13px 3px 0; border-top: 1px solid #3e5748; }
.rail-person > div { min-width: 0; flex: 1; }
.rail-person strong, .rail-person small { display: block; overflow-wrap: anywhere; }
.rail-person strong { color: #f4f7f4; font-size: .85rem; line-height: 1.35; }
.rail-person small { color: #c1d1c3; font-size: .74rem; }
.rail-person .avatar { width: 33px; height: 33px; font-size: .7rem; }
.rail-person .icon-btn { width: 30px; height: 34px; background: transparent; border-color: transparent; color: #e1eee4; }
.rail-person .icon-btn:hover { background: #314b3d; border-color: #436452; }

.workspace { min-width: 0; }
.topbar { min-height: 65px; display: flex; justify-content: space-between; align-items: center; gap: 13px; padding: 9px clamp(21px, 2.6vw, 52px); background: #f9fbf8; border-bottom: 1px solid var(--line); }
.breadcrumb, .top-end, .today-date { display: flex; align-items: center; gap: 9px; font-size: .86rem; color: var(--muted); }
.breadcrumb b { color: var(--ink); font-weight: 670; }
.breadcrumb .icon { width: 13px; height: 13px; }
.today-date { white-space: nowrap; }
.today-date > span::first-letter, .day-top time::first-letter { text-transform: uppercase; }
.today-date .icon { width: 17px; height: 17px; }
.top-end { gap: 17px; }
.demo-tag { border: 1px solid #efd2bb; background: #faf0e7; color: #6d3b21; border-radius: 6px; padding: 4px 8px; font-size: .76rem; white-space: nowrap; }
.mobile-logout, .mobile-diary { display: none; }
.main { width: 100%; min-width: 0; padding: 29px clamp(21px, 2.6vw, 52px) 56px; }
.page-heading { min-height: 53px; display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 22px; }
.page-heading p { color: var(--muted); margin-top: 5px; font-size: .98rem; }
.page-heading > .btn { min-height: 45px; padding-inline: 16px; }

.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 20px; }
.stat { display: flex; align-items: center; gap: 15px; min-width: 0; min-height: 104px; padding: 13px clamp(12px, 1.6vw, 25px); text-align: left; border: 1px solid var(--line); background: var(--white); border-radius: 12px; box-shadow: var(--shadow); }
.stat-link:hover { background: #fcfdfb; border-color: #a4baa7; }
.stat-icon, .tile-icon { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 10px; flex: 0 0 auto; background: #e9f1e9; color: #38634d; }
.stat-icon.dumbbell { background: #e9eee1; color: #415d3c; }
.stat-icon.message { background: #f9eee5; color: #834d30; }
.stat-content { display: grid; line-height: 1.22; gap: 3px; min-width: 0; }
.stat-content > span { color: var(--muted); font-weight: 600; font-size: .875rem; }
.stat-content strong { font-size: 1.8rem; font-weight: 740; letter-spacing: -.06em; }
.stat-content small { color: var(--muted); font-size: .78rem; }
.stat-link .stat-content small { color: #315941; }

.studio { display: grid; grid-template-columns: clamp(185px, 15vw, 245px) minmax(0, 1fr); border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow); align-items: stretch; min-height: 540px; }
.roster { background: #f9fbf7; padding: 19px 13px; border-right: 1px solid var(--line); border-radius: var(--radius) 0 0 var(--radius); min-width: 0; }
.roster-heading { display: flex; align-items: center; gap: 9px; margin: 2px 5px 15px; }
.roster-heading h2 { font-size: 1.02rem; letter-spacing: -.025em; }
.roster-heading > span { padding: 1px 6px; border-radius: 5px; background: #eaf0e8; color: #4a6050; font-size: .76rem; font-weight: 640; }
.roster-search, .search-field { display: flex; align-items: center; gap: 8px; padding: 0 9px; background: white; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.roster-search { margin-bottom: 11px; }
.roster-search .icon, .search-field .icon { width: 17px; height: 17px; }
.roster-search input, .search-field input { margin: 0; border: 0; padding: 7px 2px; min-width: 0; width: 100%; min-height: 39px; outline: none; }
.roster-search input { font-size: .85rem; }
.roster-search:focus-within, .search-field:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.roster-list { display: grid; gap: 5px; }
.roster-item { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 59px; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 7px 7px; text-align: left; }
.roster-item[aria-current] { background: #e9f0e8; border-color: #d3e0d2; box-shadow: inset 3px 0 #547d5f; }
.roster-item:hover:not([aria-current]) { background: #edf3ed; }
.roster-name { display: grid; min-width: 0; margin-right: auto; gap: 2px; }
.roster-name strong { font-weight: 680; font-size: .88rem; line-height: 1.3; overflow-wrap: anywhere; }
.roster-name small { color: var(--muted); font-size: .76rem; line-height: 1.25; overflow-wrap: anywhere; }
.roster-badge { background: #f4ddcb; color: #6d3a22; border-radius: 5px; min-width: 19px; text-align: center; padding: 1px 3px; flex: none; font-size: .7rem; font-weight: 760; }
.roster-empty { padding: 8px; color: var(--muted); font-size: .85rem; }
.roster-select { display: none; }
.avatar { display: inline-grid; place-items: center; width: 35px; height: 35px; border-radius: 10px; font-weight: 750; font-size: .77rem; flex: none; color: #315741; background: #dcebdd; letter-spacing: -.015em; }
.avatar.tone-1 { color: #734729; background: #f3e4d3; }
.avatar.tone-2 { color: #3d5d55; background: #def0e9; }
.avatar.tone-3 { color: #4c4c68; background: #ebe9f2; }
.avatar-lg { width: 49px; height: 49px; font-size: 1rem; border-radius: 12px; }

.client-space { min-width: 0; }
.client-header { min-height: 86px; padding: 15px 23px 10px; display: flex; align-items: center; justify-content: space-between; gap: 13px; }
.client-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.client-identity h2 { font-size: clamp(1.3rem, 1.7vw, 1.75rem); overflow-wrap: anywhere; }
.client-identity p { color: var(--muted); font-size: .88rem; margin-top: 3px; }
.client-header-actions { display: flex; align-items: center; gap: 7px; }
.client-header-actions .icon-btn { height: 42px; width: 42px; }
.client-tabs { display: flex; gap: 21px; margin: 0; padding: 0 23px; border-bottom: 1px solid var(--line); }
.client-tabs button { background: transparent; color: var(--muted); border: 0; border-bottom: 2px solid transparent; padding: 9px 1px; min-height: 43px; font-weight: 640; font-size: .89rem; white-space: nowrap; }
.client-tabs button:hover, .client-tabs button[aria-current] { color: var(--green-hover); }
.client-tabs button[aria-current] { border-color: #487455; }
.plan-workspace { display: grid; grid-template-columns: minmax(0, 1fr) clamp(250px, 21.5vw, 350px); }
.plan-center, .day-inspector { padding: 20px 22px 24px; min-width: 0; }
.calendar { min-width: 0; }
.calendar-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.calendar-head h3 { font-size: 1.22rem; }
.calendar-head p { color: var(--muted); font-size: .86rem; margin-top: 4px; }
.calendar-head .btn { border-color: #bcd1bf; color: var(--green-hover); background: #f1f6f0; }
.calendar-head .btn:hover { background: #e3eee3; }
.calendar-tools { display: flex; align-items: center; gap: 4px; margin: 12px 0 10px; }
.calendar-tools .icon-btn { width: 34px; height: 34px; }
.calendar-tools .btn { min-height: 34px; padding: 5px 11px; }
.period-note { color: var(--muted); margin-left: auto; font-size: .79rem; }
.week-labels, .day-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.week-labels { margin-bottom: 6px; }
.week-labels span { font-size: .76rem; color: var(--muted); font-weight: 650; padding-left: 7px; }
.calendar-day { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; min-height: 76px; width: 100%; padding: 7px 7px 8px; text-align: left; border: 1px solid #d9e5d8; border-radius: 8px; background: #f0f5ee; color: #2b583e; transition: background-color .15s, border-color .15s; }
.calendar-day.cardio { background: #eef2e9; border-color: #e1e8da; color: #4d6344; }
.calendar-day.mobility { background: #f9f0e6; border-color: #f0e4d7; color: #754f33; }
.calendar-day.rest, .calendar-day.unplanned { background: #f6f7f5; border-color: #e8eae7; color: #58685f; }
.calendar-day.unplanned { border-style: dashed; background: #fff; }
.calendar-day:hover { border-color: #7c9c83; }
.calendar-day.selected { background: var(--green); color: white; border-color: var(--green); box-shadow: 0 2px 3px #254c3b21; }
.calendar-day[aria-current="date"]:not(.selected) { box-shadow: inset 0 0 0 1px #74917c; }
.calendar-number { display: flex; align-items: center; gap: 5px; font-size: 1.16rem; font-weight: 745; letter-spacing: -.06em; line-height: 1.1; }
.calendar-kind { display: flex; align-items: center; gap: 3px; white-space: nowrap; font-size: .74rem; font-weight: 660; }
.calendar-kind .icon, .calendar-check { width: 14px; height: 14px; }
.kind-compact { display: none; }
.date-dot { width: 6px; height: 6px; border-radius: 50%; background: #a25b32; }
.selected .date-dot { background: #f7bd95; }
.calendar-check { position: absolute; top: 7px; right: 5px; color: currentColor; }
.day-dash { font-size: .95rem; }
.week-progress { margin-top: 15px; border: 1px solid var(--line); padding: 10px 12px; border-radius: 8px; }
.week-progress > div { display: flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--muted); }
.week-progress > div .icon { width: 15px; height: 15px; color: #436b4e; }
.week-progress strong { margin-left: auto; color: var(--ink); font-weight: 690; }
.week-progress progress { display: block; height: 5px; width: 100%; margin-top: 7px; appearance: none; border: 0; border-radius: 99px; background: #e8eee7; color: #568562; overflow: hidden; }
.week-progress progress::-webkit-progress-bar { background: #e8eee7; }
.week-progress progress::-webkit-progress-value { background: #568562; border-radius: 8px; }
.week-progress progress::-moz-progress-bar { background: #568562; border-radius: 8px; }
.focus-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 13px; padding: 13px 12px; background: #faf4ed; border: 1px solid #efe2d6; border-radius: 9px; }
.focus-note > .icon { margin-top: 1px; width: 18px; height: 18px; color: #89532e; }
.focus-note > div { flex: 1; min-width: 0; }
.focus-note h3 { color: #613e25; font-size: .90rem; }
.focus-note p { color: #654e3d; font-size: .85rem; margin-top: 4px; white-space: pre-wrap; }
.focus-note .icon-btn { width: 32px; height: 32px; background: transparent; border-color: #e7d8c9; color: #734a2d; }

.day-inspector { background: #f7f9f6; border-left: 1px solid var(--line); border-radius: 0 0 var(--radius) 0; }
.day-top { display: flex; align-items: center; gap: 6px; justify-content: space-between; margin-bottom: 14px; }
.day-top time { color: var(--muted); font-size: .84rem; font-weight: 650; }
.day-status { display: inline-flex; align-items: center; gap: 4px; background: #e6eee5; color: #365d42; padding: 3px 7px; border-radius: 5px; white-space: nowrap; font-size: .73rem; font-weight: 700; }
.day-status .icon { width: 14px; height: 14px; }
.day-status.complete { background: #dceedd; }
.inspector-title { display: flex; align-items: center; gap: 9px; }
.inspector-title h3, .day-inspector > h3 { font-size: clamp(1.1rem, 1.4vw, 1.4rem); overflow-wrap: anywhere; }
.tile-icon { width: 40px; height: 40px; }
.tile-icon.cardio { background: #e9eee4; color: #455e40; }
.tile-icon.mobility { background: #f5e6d5; color: #774525; }
.tile-icon.rest { background: #e8ede7; color: #576c5b; }
.workout-facts { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; margin-top: 9px; color: var(--muted); font-size: .84rem; font-weight: 560; }
.workout-facts:empty { display: none; }
.workout-facts span { display: inline-flex; align-items: center; gap: 5px; }
.workout-facts .icon { height: 15px; width: 15px; }
.exercise-peek { list-style: none; padding: 0; margin-top: 12px; }
.exercise-peek li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; border-top: 1px solid var(--line); padding: 9px 0; font-size: .835rem; line-height: 1.3; }
.exercise-peek li:last-child { border-bottom: 1px solid var(--line); }
.exercise-peek li span { font-weight: 620; overflow-wrap: anywhere; }
.exercise-peek li b { color: #4b6253; font-size: .75rem; font-weight: 680; }
.inspector-note { margin-top: 12px; font-size: .83rem; color: var(--muted); white-space: pre-wrap; }
.inspector-actions { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 14px; }
.inspector-actions .primary { flex: 1 1 100%; }
.inspector-actions .text-btn { min-height: 35px; padding-inline: 2px; font-size: .78rem; }

.content-box { padding: clamp(16px, 2.1vw, 28px); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.content-box > header { min-height: 34px; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.content-box p { color: var(--muted); white-space: pre-wrap; }
.content-box h4 { margin: 16px 0 5px; }
.content-box h4 .icon { width: 16px; height: 16px; }
.panel-content { padding: 20px 22px 24px; }
.basics-grid, .profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.profile-fields { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.profile-fields dt, .nutrition-metrics dt { color: var(--muted); font-size: .86rem; }
.profile-fields dd { font-weight: 680; }
.box-actions { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 5px 10px; }
.nutrition-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 13px; }
.nutrition-metrics > div { background: var(--soft); border-radius: 8px; padding: 12px; }
.nutrition-metrics dd { font-weight: 735; font-size: clamp(1.25rem, 2.2vw, 1.75rem); letter-spacing: -.045em; }
.nutrition-metrics small { font-weight: 560; font-size: .81rem; letter-spacing: 0; color: var(--muted); display: inline-block; }
.habit-list, .regime-list { display: grid; list-style: none; padding: 0; margin-top: 12px; }
.habit-list li, .regime-list li { display: flex; align-items: flex-start; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); }
.habit-list .icon, .regime-list .icon { color: #51765b; width: 17px; height: 17px; margin-top: 3px; }
.steps-row { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.steps-row strong { font-size: 1.4rem; line-height: 1.25; display: block; letter-spacing: -.045em; }
.steps-row small { color: var(--muted); font-size: .83rem; }
.empty-space { min-height: 310px; background: white; border: 1px solid var(--line); border-radius: var(--radius); gap: 10px; display: grid; place-content: center; justify-items: center; padding: 23px; text-align: center; }
.empty-space p { color: var(--muted); }
.boot { margin: 8vh auto; width: min(92%, 650px); text-align: center; }

.client-board { display: grid; grid-template-columns: minmax(0, 1.27fr) minmax(0, 1fr); gap: 17px; align-items: start; }
.client-hero { min-height: 244px; align-self: stretch; isolation: isolate; overflow: hidden; position: relative; display: flex; align-items: center; padding: clamp(22px, 3.1vw, 46px); background: #284537; color: white; border-radius: var(--radius); }
.client-hero::before, .auth-photo::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(87deg, #1b3327 5%, #1c3429e3 46%, #11251b28 100%), url('/posilovna.webp') 65% 52% / cover; }
.client-hero:not(.strength)::before { background: linear-gradient(108deg, #263f32, #3c604e); }
.hero-date { display: flex; align-items: center; gap: 8px; color: #dbe7dc; font-size: .86rem; }
.hero-date .icon { width: 17px; height: 17px; }
.hero-body { min-width: 0; }
.hero-body h2 { font-size: clamp(2rem, 3.25vw, 3.75rem); line-height: 1.03; letter-spacing: -.065em; margin-top: 8px; overflow-wrap: anywhere; }
.hero-body .workout-facts, .hero-note { color: #e7efe7; }
.hero-note { margin-top: 10px; }
.hero-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hero-actions:not(:empty) { margin-top: 18px; }
.hero-actions .accent { min-height: 45px; padding-inline: 17px; }
.hero-secondary { color: white; border-color: #7c9a87; background: #244334b3; }
.hero-secondary:hover { background: #3e6650; }
.hero-complete { display: inline-flex; align-items: center; gap: 5px; color: #e3f8df; font-weight: 650; margin-right: 4px; font-size: .9rem; }
.client-calendar-wrap, .workout-card { padding: clamp(15px, 2vw, 25px); border-radius: var(--radius); border: 1px solid var(--line); background: white; min-width: 0; box-shadow: var(--shadow); }
.client-calendar-wrap .calendar-day { min-height: 61px; }
.client-calendar-wrap .calendar-tools { margin: 8px 0; }
.client-calendar-wrap .week-progress { margin-top: 10px; }
.workout-card > header { display: flex; justify-content: space-between; gap: 9px; align-items: baseline; margin: 0 0 9px; }
.workout-note { color: var(--muted); font-size: .96rem; white-space: pre-wrap; }
.client-exercises { list-style: none; padding: 0; margin-top: 12px; }
.client-exercises li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; border-top: 1px solid var(--line); min-height: 56px; padding: 13px 0; }
.exercise-number { width: 28px; height: 29px; border-radius: 6px; background: var(--soft); display: grid; place-items: center; font-size: .8rem; color: #42634e; font-weight: 650; }
.client-exercises h3 { font-size: 1rem; overflow-wrap: anywhere; }
.client-exercises p { color: var(--muted); font-size: .89rem; margin-top: 4px; white-space: pre-wrap; }
.exercise-dose { text-align: right; display: grid; align-content: start; gap: 3px; color: #3e604c; }
.exercise-dose strong { font-size: .88rem; white-space: nowrap; }
.exercise-dose span { font-size: .78rem; color: var(--muted); }
.workout-footer { border-top: 1px solid var(--line); padding-top: 13px; margin-top: 6px; }
.client-guidance { display: grid; gap: 12px; }
.client-guidance .focus-note { margin-top: 0; padding: 15px; }
.client-guidance .focus-note p { font-size: .93rem; }
.daily-steps { padding: 14px; border: 1px solid var(--line); background: white; border-radius: 10px; display: flex; align-items: center; gap: 10px; }
.daily-steps h3 { font-size: 1rem; }
.daily-steps p { color: var(--muted); font-size: .82rem; }

.messages-studio { min-height: 0; }
.messages-space { min-width: 0; }
.client-thread { grid-template-columns: minmax(0, 1fr); max-width: 1020px; }
.thread-heading { padding: 15px 22px; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); }
.thread-heading h2 { font-size: 1.25rem; }
.thread-heading p { color: var(--muted); font-size: .84rem; }
.thread { padding: 16px 22px; min-height: 265px; height: min(51dvh, 500px); overflow: auto; display: flex; flex-direction: column; gap: 10px; background: #f8faf7; }
.thread > .btn { margin-inline: auto; flex: 0 0 auto; }
.thread-empty { color: var(--muted); padding-top: 15px; }
.bubble { align-self: flex-start; max-width: min(85%, 650px); border: 1px solid var(--line); padding: 10px 13px; border-radius: 10px 10px 10px 3px; background: white; }
.bubble.own { align-self: flex-end; background: #eaf2e9; border-color: #d7e5d7; border-radius: 10px 10px 3px 10px; }
.bubble-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; font-size: .77rem; color: var(--muted); }
.bubble-meta strong { color: var(--ink); }
.bubble p { margin-top: 4px; white-space: pre-wrap; }
.message-day, .reply-context { display: flex; align-items: center; gap: 5px; font-size: .82rem; color: var(--muted); }
.message-day .icon, .reply-context .icon { width: 15px; height: 15px; }
.reply-context .icon-btn { width: 29px; height: 29px; }
.message-form { padding: 14px 22px; border-top: 1px solid var(--line); display: grid; gap: 7px; }
.message-form textarea { min-height: 71px; width: 100%; }
.composer-tools { display: flex; justify-content: space-between; gap: 8px; }

.library-filters { display: flex; gap: 10px; margin-bottom: 15px; }
.search-field { flex: 1; max-width: 470px; }
.library-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 17px; margin-bottom: 15px; }
.library-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; min-width: 0; border-top: 1px solid var(--line); }
.library-row h3 { font-size: 1.03rem; }
.library-row p { margin-top: 3px; font-size: .86rem; }
.library-row .library-cue { color: var(--ink); }
.empty-list { padding: 12px 0 4px; }

input, select, textarea { background: white; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: 7px; min-width: 0; line-height: 1.35; min-height: 41px; }
textarea { resize: vertical; }
input[type='checkbox'] { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; flex: 0 0 auto; accent-color: var(--green); }
input::placeholder, textarea::placeholder { color: #6c7b71; opacity: 1; }
form label, .form-content > label { display: grid; gap: 5px; min-width: 0; font-size: .88rem; font-weight: 640; }
label > input, label > textarea, label > select { font-weight: 450; font-size: 1rem; width: 100%; }
label.roster-search, label.search-field { display: flex; }
.form-error { background: #fff0e9; color: #8d311d; border: 1px solid #efc7b8; border-radius: 7px; padding: 8px 10px; font-size: .86rem; }
dialog { padding: 0; border: 1px solid #bccdbe; border-radius: 14px; width: min(94vw, 530px); max-height: min(90dvh, 920px); color: var(--ink); box-shadow: 0 21px 90px #10261739; }
dialog.wide { width: min(94vw, 770px); }
dialog::backdrop { background: #16281ecc; }
dialog[open], .editor-form { display: flex; flex-direction: column; min-height: 0; }
body:has(dialog[open]) { overflow: hidden; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 17px 21px; border-bottom: 1px solid var(--line); }
.dialog-heading h2 { font-size: 1.45rem; }
.dialog-heading p { color: var(--muted); font-size: .88rem; margin-top: 2px; }
.form-content { display: grid; gap: 14px; padding: 17px 21px 20px; overflow: auto; overscroll-behavior: contain; }
.form-content > p:not(.form-error) { color: var(--muted); }
.dialog-footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 12px 21px; border-top: 1px solid var(--line); background: #f9fbf8; }
.dialog-footer .form-error { flex: 1 0 100%; }
.field-grid { display: grid; gap: 10px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.day-fields { grid-template-columns: minmax(95px, .82fr) minmax(0, 1.7fr) minmax(70px, .5fr); }
.form-divider { border-top: 1px solid var(--line); margin-top: 3px; padding-top: 12px; }
.form-divider p { color: var(--muted); font-size: .86rem; }
.exercise-editor, .form-exercise, .weekday-select { min-width: 0; border: 0; padding: 0; }
.exercise-editor > legend, .weekday-select > legend { font-weight: 730; font-size: .98rem; margin-bottom: 8px; padding: 0; }
.exercise-picker { display: flex; align-items: end; gap: 8px; margin-bottom: 12px; }
.exercise-picker label { flex: 1; }
.form-exercise { display: grid; gap: 8px; padding: 10px; margin-bottom: 8px; border: 1px solid var(--line); background: var(--paper); border-radius: 8px; }
.exercise-fields { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(170px, .94fr) auto; grid-template-areas: 'name dose tools'; gap: 6px; align-items: end; }
.exercise-fields > label { grid-area: name; }
.exercise-dose-fields { grid-area: dose; display: grid; grid-template-columns: .6fr 1.16fr .71fr; gap: 6px; }
.exercise-row-tools { grid-area: tools; align-self: end; display: flex; gap: 4px; }
.exercise-row-tools .icon-btn { width: 29px; height: 36px; }
.form-exercise details summary { cursor: pointer; color: var(--green); font-size: .84rem; padding: 4px 0; }
.form-exercise details > label { margin-top: 8px; }
.brief-field { display: grid; gap: 6px; }
.brief-field .btn { justify-self: start; }
.weekday-select { display: flex; flex-wrap: wrap; gap: 5px; }
.weekday-select > legend small { font-size: .78rem; font-weight: 450; color: var(--muted); margin-left: 3px; }
.weekday-select label { position: relative; display: block; }
.weekday-select input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.weekday-select span { display: grid; place-items: center; width: 39px; height: 34px; border-radius: 6px; border: 1px solid var(--line-strong); }
.weekday-select input:checked + span { background: var(--green); color: white; border-color: var(--green); }
.weekday-select input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.check-pair { display: flex; flex-wrap: wrap; gap: 9px 16px; }
.check-pair label, .review-overlap label { display: flex; align-items: center; gap: 6px; min-height: 26px; }
.review-overlap { background: #fcf3ea; color: #633e27; border: 1px solid #efdbca; border-radius: 8px; padding: 10px; }
.review-overlap p { font-size: .88rem; margin-bottom: 7px; }
.review-days { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; align-items: start; }
.review-days details { border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fbfcfa; }
.review-days .review-strength { background: #f0f6ef; }
.review-days summary { cursor: pointer; display: flex; align-items: center; gap: 7px; }
.review-days summary > .icon { width: 17px; height: 17px; color: #4e7357; }
.review-days summary small { display: block; color: var(--muted); font-size: .75rem; }
.review-days summary strong { display: block; font-size: .86rem; font-weight: 680; line-height: 1.3; }
.review-minutes { margin-left: auto; color: var(--muted); font-size: .73rem; white-space: nowrap; }
.review-days details p, .review-days details ul { font-size: .83rem; margin-top: 6px; }
.review-days details ul { padding-left: 19px; }

.auth-screen { width: min(900px, calc(100% - 32px)); margin: clamp(20px, 10vh, 115px) auto 25px; border: 1px solid var(--line); background: white; border-radius: var(--radius); display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; box-shadow: var(--shadow); }
.auth-photo { position: relative; isolation: isolate; display: flex; align-items: end; min-height: 320px; padding: 28px; color: white; background: var(--pine); }
.auth-photo::before { background: linear-gradient(20deg, #142c21f0, #20372849), url('/posilovna.webp') center / cover; }
.auth-photo h1 { margin: 15px 0 0; }
.auth-photo .brand { padding: 0; }
.auth-box { align-self: center; padding: 27px; }
.auth-box p { margin-top: 8px; }
.auth-box form { display: grid; gap: 12px; margin-top: 15px; }
.auth-box .btn { justify-self: start; }
.toast { pointer-events: none; position: fixed; z-index: 10; right: 17px; bottom: 17px; max-width: min(400px, calc(100% - 34px)); padding: 9px 14px; background: #1d3b2c; color: white; box-shadow: 0 8px 32px #13261a44; border-radius: 8px; font-size: .92rem; opacity: 0; transform: translateY(5px); transition: opacity .16s, transform .16s; }
.toast.visible { opacity: 1; transform: translateY(0); }

@media (min-width: 1500px) {
  .plan-center, .day-inspector { padding: 22px 24px 27px; }
  .calendar-day { min-height: 84px; padding: 9px 9px 10px; }
  .calendar-kind { font-size: .8rem; }
  .calendar-check { right: 8px; }
  .roster { padding-inline: 16px; }
}
@media (max-width: 1270px) {
  .shell { grid-template-columns: 189px minmax(0, 1fr); }
  .rail { padding-inline: 12px; }
  .client-header { padding-inline: 17px; }
  .client-tabs { padding-inline: 17px; }
  .plan-center, .day-inspector { padding-inline: 15px; }
  .calendar-day { padding-inline: 5px; }
  .calendar-kind { font-size: .70rem; }
  .calendar-kind .icon { width: 12px; height: 12px; }
}
@media (max-width: 1130px) {
  .plan-workspace { grid-template-columns: minmax(0, 1fr); }
  .plan-center { display: contents; }
  .plan-center > .calendar { grid-row: 1; padding: 20px 16px 15px; }
  .day-inspector { grid-row: 2; border-left: 0; border-top: 1px solid var(--line); border-radius: 0; }
  .plan-center > .week-progress { margin: 14px 16px 0; }
  .plan-center > .focus-note { margin: 13px 16px 16px; }
  .inspector-actions .primary { flex: 0 1 auto; }
  .inspector-actions .text-btn { padding-inline: 8px; }
  .calendar-kind { font-size: .76rem; }
  .client-board { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
}
@media (max-width: 940px) {
  .shell { display: block; }
  .rail { position: relative; height: auto; padding: 11px 14px; }
  .brand { padding: 0; }
  .brand-mark { width: 35px; height: 35px; font-size: 1.12rem; }
  .brand-type strong { font-size: 1.26rem; }
  .brand-type small { font-size: .72rem; }
  .rail-bottom { display: none; }
  .rail-nav { position: fixed; z-index: 4; bottom: 0; left: 0; right: 0; margin: 0; padding: 5px 7px max(5px, env(safe-area-inset-bottom)); grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px #1a30260e; }
  .rail-nav .nav-item { position: relative; border: 0; min-height: 49px; flex-direction: column; gap: 2px; color: var(--muted); justify-content: center; text-align: center; padding: 4px; font-size: .77rem; }
  .rail-nav .nav-item:hover, .rail-nav .nav-item[aria-current] { color: #234a36; background: #e6efe5; }
  .rail-nav .nav-item[aria-current] .icon { color: #345e45; }
  .nav-count { position: absolute; left: calc(50% + 13px); top: 3px; min-width: 17px; padding: 1px 3px; font-size: .66rem; }
  .topbar { min-height: 47px; padding-top: 5px; padding-bottom: 5px; }
  .top-end { gap: 8px; }
  .mobile-logout, .mobile-diary { display: inline-flex; }
  .mobile-logout .icon-btn, .mobile-diary { width: 34px; height: 34px; }
  .main { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(69px + env(safe-area-inset-bottom)); }
}
@media (max-width: 700px) {
  .main { padding: 17px 12px calc(79px + env(safe-area-inset-bottom)); }
  .topbar { padding-inline: 13px; }
  .page-heading { margin-bottom: 14px; min-height: 43px; }
  .page-heading h1 { font-size: clamp(1.7rem, 5.7vw, 2.15rem); }
  .page-heading > .btn { min-height: 40px; padding-inline: 9px; }
  .studio { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .roster { padding: 10px 12px; border-radius: var(--radius) var(--radius) 0 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .roster-heading, .roster-search, label.roster-search, .roster-list { display: none; }
  .roster-select { display: flex; align-items: center; gap: 9px; font-size: .88rem; font-weight: 640; }
  .roster-select select { font-size: .94rem; }
  .client-header { min-height: 68px; padding: 10px 12px; }
  .client-identity { gap: 8px; }
  .avatar-lg { width: 38px; height: 38px; font-size: .81rem; border-radius: 8px; }
  .client-header-actions .btn { padding: 8px 8px; }
  .client-tabs { padding-inline: 12px; gap: 13px; }
  .plan-center > .calendar, .day-inspector, .panel-content { padding: 14px 12px; }
  .plan-center > .week-progress { margin-inline: 12px; }
  .plan-center > .focus-note { margin-inline: 12px; }
  .summary { gap: 6px; margin-bottom: 12px; }
  .stat { gap: 7px; padding: 8px; min-height: 89px; border-radius: 8px; }
  .stat-icon { width: 32px; height: 32px; border-radius: 6px; }
  .stat-icon .icon { width: 16px; height: 16px; }
  .stat-content > span { font-size: .82rem; }
  .stat-content strong { font-size: 1.4rem; }
  .stat-content small { font-size: .72rem; }
  .basics-grid, .profile-grid, .client-board { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .client-hero { min-height: 177px; padding: 17px; }
  .client-hero { grid-row: 2; }
  .hero-body h2 { font-size: clamp(1.9rem, 7vw, 2.65rem); }
  .hero-actions:not(:empty) { margin-top: 13px; }
  .client-calendar-wrap { grid-row: 1; padding: 14px 11px; }
  .client-calendar-wrap .calendar-day { min-height: 58px; }
  .thread-heading, .thread, .message-form { padding-inline: 12px; }
  .thread { min-height: 200px; }
  .library-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 465px) {
  .breadcrumb > span, .breadcrumb > .icon { display: none; }
  .top-end .today-date { display: none; }
  .topbar .btn { min-height: 34px; }
  .page-heading { align-items: flex-start; }
  .page-heading:has(> .btn) { flex-direction: column; gap: 9px; }
  .page-heading > .btn { min-height: 40px; }
  .stat { align-items: flex-start; }
  .stat-icon { display: none; }
  .stat-content { min-height: 75px; align-content: space-between; }
  .stat-content > span { min-height: 29px; }
  .stat-content small { line-height: 1.15; }
  .client-identity h2 { font-size: 1.14rem; }
  .client-identity p { font-size: .79rem; }
  .client-header-actions { flex-direction: column; align-items: flex-end; gap: 4px; }
  .client-header-actions .icon-btn { display: none; }
  .client-header-actions .btn { font-size: .78rem; min-height: 40px; gap: 4px; }
  .client-header-actions .icon { width: 15px; height: 15px; }
  .client-tabs { justify-content: space-between; gap: 5px; }
  .client-tabs button { font-size: .8rem; }
  .calendar-head h3 { font-size: 1.05rem; }
  .calendar-head p { font-size: .80rem; }
  .calendar-head .btn { padding: 6px 7px; gap: 3px; font-size: .78rem; }
  .calendar-head .btn .icon { width: 14px; height: 14px; }
  .week-labels, .day-grid { gap: 3px; }
  .week-labels span { padding-left: 0; text-align: center; }
  .calendar-day { align-items: center; padding: 6px 1px; min-height: 62px; border-radius: 6px; text-align: center; }
  .calendar-number { font-size: 1.06rem; gap: 2px; }
  .calendar-kind { justify-content: center; font-size: .64rem; gap: 0; flex-direction: column; line-height: 1.1; }
  .calendar-kind .icon { width: 12px; height: 12px; }
  .calendar-check { top: 5px; right: 2px; width: 9px; height: 9px; }
  .date-dot { width: 4px; height: 4px; }
  .workout-card > header { align-items: flex-start; }
  .workout-card h2 { font-size: 1.2rem; }
  .diary-inline { font-size: .78rem; min-height: 22px; white-space: nowrap; }
  .client-exercises li { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 7px; }
  .exercise-number { width: 23px; height: 25px; }
  .exercise-dose strong { font-size: .79rem; }
  .exercise-dose span { font-size: .71rem; }
  .dialog-heading, .dialog-footer, .form-content { padding-inline: 13px; }
  .cols-3 { grid-template-columns: minmax(0, 1fr); }
  .day-fields { grid-template-columns: minmax(0, 1.55fr) minmax(0, .72fr); }
  .day-fields label:has([name="title"]) { grid-column: 1 / -1; grid-row: 2; }
  .exercise-fields { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'name name' 'dose tools'; }
  .exercise-dose-fields { grid-template-columns: .68fr 1fr .67fr; }
  .exercise-dose-fields label { font-size: .75rem; }
  .review-days { grid-template-columns: minmax(0, 1fr); }
  .auth-screen { grid-template-columns: minmax(0, 1fr); }
  .auth-photo { min-height: 167px; padding: 17px; }
  .auth-box { padding: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
@media (max-width: 360px) {
  .calendar-kind .kind-full { display: none; }
  .calendar-kind .kind-compact { display: inline; }
}
