:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  --ink: #152234;
  --muted: #526279;
  --subtle: #627289;
  --line: #dfe7ef;
  --surface: #fff;
  --base: #f3f6fa;
  --nav: #101a28;
  --nav-hover: #1b2a3c;
  --cyan: #40dbf3;
  --cyan-ink: #08768d;
  --shadow: 0 3px 12px #12253b07;
  --radius: 17px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--base); color: var(--ink); -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; }
input, select, textarea { min-width: 0; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button, a { touch-action: manipulation; }
svg { display: block; flex: 0 0 auto; }
p, h1, h2, dl, dd { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #1597b3; outline-offset: 3px; }

.shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 236px; background: var(--nav); color: #fff; padding: 29px 18px 20px; display: flex; flex-direction: column; z-index: 3; }
.brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; }
.sidebar > .brand { margin-left: 8px; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--cyan); color: #12263a; box-shadow: 0 5px 18px #28d1e532; flex: 0 0 auto; }
.brand strong { display: block; font-size: 25px; font-weight: 900; line-height: .93; letter-spacing: -.055em; }
.brand strong span { color: var(--cyan); }
.brand small { display: block; margin-top: 7px; color: #aab8cb; font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.side-nav { margin-top: 47px; }
.side-label { display: block; margin: 0 0 12px 12px; color: #8fa1b8; font-size: .68rem; font-weight: 750; letter-spacing: .14em; }
.side-nav nav { display: grid; gap: 5px; }
.side-nav a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 10px 13px; border: 1px solid transparent; border-radius: 10px; color: #bbc9da; font-size: .92rem; font-weight: 600; }
.side-nav a[aria-current] { border-color: #1e5564; background: #16313f; color: #64e0f1; }
.side-nav a:hover:not([aria-current]) { background: var(--nav-hover); color: #fff; }
.side-end { margin-top: auto; display: grid; gap: 19px; }
.sidebar-offline { display: flex; align-items: flex-start; gap: 10px; padding: 12px 11px; border: 1px solid #29384a; border-radius: 11px; background: #162333; color: #8be1eb; }
.sidebar-offline strong, .trainer strong { display: block; color: #f0f6fd; font-size: .81rem; line-height: 1.25; }
.sidebar-offline small, .trainer small { display: block; margin-top: 4px; color: #aab8cb; font-size: .74rem; line-height: 1.2; }
.trainer { display: flex; align-items: center; gap: 10px; padding: 16px 3px 0; border-top: 1px solid #283648; }
.trainer-avatar { width: 35px; height: 35px; flex: 0 0 35px; display: grid; place-items: center; border-radius: 50%; background: #263a51; color: #bce7f0; font-size: .75rem; font-weight: 800; }

.workspace { margin-left: 236px; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(22px, 3vw, 43px); min-height: 63px; border-bottom: 1px solid var(--line); background: var(--surface); }
.breadcrumb { color: var(--muted); font-size: .87rem; font-weight: 550; }
.breadcrumb span { color: #8898a9; margin: 0 10px; }
.breadcrumb strong { color: var(--ink); font-weight: 700; }
.top-offline { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid #d6eee5; border-radius: 999px; background: #ecfaf4; color: #15664f; font-size: .75rem; font-weight: 750; white-space: nowrap; }
.top-offline i, .hero-kicker i, .pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.mobile-brand, .mobile-nav { display: none; }
.main { width: min(100%, 1400px); margin: 0 auto; min-width: 0; padding: 30px clamp(22px, 3vw, 43px) 44px; outline: none; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 0 23px; }
h1 { color: var(--ink); font-size: clamp(1.75rem, 3vw, 2.26rem); letter-spacing: -.043em; font-weight: 820; line-height: 1.13; overflow-wrap: anywhere; }
.page-heading p { color: var(--muted); margin-top: 6px; line-height: 1.45; font-size: .93rem; }
.page-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.date-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; color: #42536a; font-size: .82rem; font-weight: 650; white-space: nowrap; }
.date-chip svg { color: #526880; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 9px 15px; border: 1px solid transparent; border-radius: 9px; line-height: 1.2; font-weight: 750; font-size: .88rem; transition: background-color .15s ease, border-color .15s ease; }
.btn.primary { background: var(--cyan); border-color: #31cfe9; color: #102538; box-shadow: 0 3px 8px #108ca51a; }
.btn.primary:hover { background: #69e6f8; border-color: #21b7d0; }
.btn.secondary { border-color: #dce5ee; color: #2d4056; background: #fff; }
.btn.secondary:hover, .icon-btn:hover { background: #eff5f9; border-color: #b9cedc; }
.btn.small { min-height: 36px; padding: 7px 10px; font-size: .81rem; }
.btn.danger { background: #bd2637; color: #fff; }
.btn.danger:hover { background: #9e1525; }
.icon-btn { display: inline-grid; width: 36px; height: 36px; place-items: center; flex: 0 0 auto; padding: 0; border: 1px solid var(--line); border-radius: 9px; color: #41546c; background: #fff; }
.icon-btn[data-action="delete"] { color: #a83444; }
.icon-btn[data-action="complete"] { color: #147452; }
.icon-btn[data-action="mark-missed"] { color: #936119; }

.hero { display: flex; align-items: center; min-height: 257px; padding: 24px 32px 25px; position: relative; isolation: isolate; overflow: hidden; border-radius: 19px; background: #101e2c; color: #fff; box-shadow: 0 8px 20px #10233a1f; }
.hero::before { content: ""; position: absolute; inset: 0 0 0 27%; z-index: -2; background: url("hero.jpg") 58% 51% / cover no-repeat; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #101d2a 17%, #101d2aef 32%, #101d2a4d 67%, #101d2a00 100%), linear-gradient(0deg,#0d192558,transparent 48%); }
.hero-copy { max-width: 420px; }
.hero-kicker { display: flex; align-items: center; gap: 8px; color: #79eafa; font-size: .72rem; font-weight: 800; letter-spacing: .16em; }
.hero-kicker i { width: 7px; height: 7px; box-shadow: 0 0 11px #43eaff88; }
.hero h2 { margin-top: 9px; font-size: clamp(2.55rem, 4.05vw, 3.75rem); font-weight: 900; line-height: .98; letter-spacing: -.061em; }
.hero h2 em { color: #53e5fa; font-style: normal; }
.hero p { color: #d2deea; line-height: 1.45; margin: 12px 0 15px; font-size: .87rem; }
.hero-button { min-height: 37px; padding: 7px 12px; border-color: #547084; background: #172d3ee3; color: #e9f9ff; font-size: .81rem; }
.hero-button:hover { background: #285463; border-color: #72c8d5; }
.hero-button svg { color: #68e4f3; }

.section-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 23px 0 11px; }
.section-line h2, .panel-heading h2, .settings-intro h2 { color: var(--ink); font-size: 1.07rem; line-height: 1.2; font-weight: 790; letter-spacing: -.017em; }
.section-line > span { color: var(--muted); font-weight: 650; font-size: .79rem; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.metric { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; min-height: 139px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); transition: border-color .15s ease, transform .15s ease; }
.metric:hover { border-color: #a1c3d7; transform: translateY(-2px); }
.metric-top { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 4px; color: #7d8da0; }
.metric-icon { display: grid; place-items: center; flex: 0 0 auto; width: 37px; height: 37px; border-radius: 10px; }
.metric-blue { background: #eaf0ff; color: #375bb2; }
.metric-teal { background: #def7fb; color: #087b94; }
.metric-violet { background: #f1eaff; color: #7252b6; }
.metric-green { background: #e2f6eb; color: #267a53; }
.metric-label { color: #495c74; line-height: 1.25; font-size: .83rem; font-weight: 700; margin-top: 10px; }
.metric > strong { color: var(--ink); font-size: 1.78rem; letter-spacing: -.045em; font-weight: 820; line-height: 1.14; margin-top: 3px; overflow-wrap: anywhere; max-width: 100%; }
.metric > small { color: var(--subtle); font-size: .75rem; line-height: 1.2; margin-top: 4px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 15px; margin-top: 16px; align-items: start; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 13px; padding: 17px 19px 13px; }
.panel-heading p, .settings-intro p { color: var(--muted); font-size: .85rem; line-height: 1.4; margin-top: 4px; }
.panel-heading .btn { flex: 0 0 auto; }
.text-link, .back-link { display: inline-flex; align-items: center; gap: 3px; color: var(--cyan-ink); font-size: .82rem; font-weight: 760; flex: 0 0 auto; min-height: 35px; }
.text-link:hover, .back-link:hover { color: #075267; text-decoration: underline; }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 0 17px 9px; }
.week-strip button { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 54px; gap: 3px; padding: 3px 0 2px; border: 1px solid transparent; border-radius: 9px; background: #f1f5f9; color: var(--ink); }
.week-strip button:hover { border-color: #89c8d6; }
.week-strip button[aria-current] { background: #def6fb; border-color: #a4e1ed; color: #08677d; }
.week-strip span { color: var(--muted); text-transform: uppercase; font-size: .64rem; font-weight: 750; }
.week-strip strong { font-size: .95rem; line-height: 1; }
.week-strip i { width: 4px; height: 4px; margin-top: 1px; border-radius: 50%; }
.week-strip .has-session { background: #087d96; }
.table-list { padding: 0 18px 6px; }
.client-row, .session-row, .record-row { display: flex; align-items: center; gap: 11px; min-width: 0; min-height: 58px; padding: 9px 0; border-bottom: 1px solid #e9eef3; }
.table-list > :last-child { border-bottom: 0; }
.client-row > svg { color: #74869a; }
.client-row:hover .row-copy strong { color: var(--cyan-ink); }
.row-copy { min-width: 0; flex: 1; }
.row-copy > strong, .row-copy > small { display: block; overflow-wrap: anywhere; }
.row-copy > strong { color: var(--ink); font-size: .88rem; font-weight: 750; line-height: 1.25; }
.row-copy > small { color: var(--muted); font-size: .77rem; line-height: 1.35; margin-top: 3px; }
.row-copy .record-note { white-space: pre-wrap; margin-top: 5px; max-width: 100%; }
.session-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 10px; background: #edf4f8; color: #3a6279; }
.session-end { display: grid; justify-items: end; gap: 4px; flex: 0 0 auto; }
.session-time { color: #40536a; font-size: .77rem; white-space: nowrap; font-weight: 700; }
.record-actions { display: flex; flex: 0 0 auto; gap: 5px; margin-left: auto; }
.pill { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; width: fit-content; padding: 4px 7px; border-radius: 99px; background: #eef3f8; color: #4f6478; font-size: .7rem; font-weight: 750; line-height: 1.15; white-space: nowrap; }
.pill.active, .pill.completed { background: #e5f6ee; color: #186c50; }
.pill.paused { background: #fff3de; color: #805312; }
.pill.scheduled { background: #e9f1ff; color: #315c9d; }
.pill.cancelled { background: #fbecef; color: #8b3040; }
.pill.missed { background: #fff1df; color: #8a5112; }
.pill i { width: 5px; height: 5px; }
.avatar { display: grid; flex: 0 0 auto; place-items: center; width: 35px; height: 35px; border-radius: 50%; font-size: .76rem; font-weight: 800; line-height: 1; overflow: hidden; }
.avatar-lg { width: 47px; height: 47px; font-size: 1rem; }
.avatar-xl { width: 65px; height: 65px; font-size: 1.32rem; }
.tone-0 { background: #e9efff; color: #405fa3; }
.tone-1 { background: #e1f7f2; color: #247565; }
.tone-2 { background: #f0e9ff; color: #714da3; }
.tone-3 { background: #ffede7; color: #9c523a; }
.tone-4 { background: #e7f1fc; color: #386899; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 23px 12px 25px; }
.dashboard-grid .empty { min-height: 142px; justify-content: center; padding-top: 13px; padding-bottom: 15px; }
.empty-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 8px; border-radius: 13px; background: #eaf5fa; color: #31738b; }
.empty > strong { color: var(--ink); font-weight: 770; font-size: .93rem; }
.empty p { color: var(--muted); font-size: .83rem; line-height: 1.4; margin-top: 4px; }
.empty .btn { margin-top: 11px; }

.toolbar { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.record-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 13px; }
.record-tools .btn { min-height: 40px; }
.record-tools .btn svg { color: var(--cyan-ink); width: 16px; height: 16px; }
.record-actions [data-action="report-pdf"], .record-actions [data-action="report-print"] { color: var(--cyan-ink); }
.search-box { display: flex; align-items: center; width: min(100%, 350px); min-height: 44px; padding: 0 12px; gap: 9px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #596e83; }
.search-box:focus-within { border-color: #469bb0; outline: 2px solid #93d5e2; }
.search-box input { width: 100%; padding: 10px 0; border: 0; outline: none; background: transparent; color: var(--ink); font-size: .92rem; }
.filters { display: flex; max-width: 100%; overflow-x: auto; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #eaf0f6; }
.filters button { min-height: 33px; border: 1px solid transparent; border-radius: 7px; padding: 5px 11px; background: transparent; color: #52647b; font-size: .81rem; font-weight: 750; white-space: nowrap; }
.filters button[aria-pressed="true"] { border-color: #dae5ee; background: #fff; color: #17657a; box-shadow: 0 1px 4px #142e4d10; }
.filters button:hover:not([aria-pressed="true"]) { background: #dce8f0; color: #304b65; }
.results-count { margin: 3px 0 9px; color: var(--muted); font-size: .82rem; font-weight: 650; }
.client-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.client-card { position: relative; padding: 17px; }
.client-card:hover { border-color: #93c4d4; }
.client-card .pill { position: absolute; top: 18px; right: 16px; }
.client-card h2 { font-size: 1.05rem; margin-top: 10px; overflow-wrap: anywhere; }
.client-card p { margin-top: 3px; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.client-card-details { display: flex; flex-wrap: wrap; gap: 7px 12px; margin-top: 12px; font-size: .78rem; color: #53677c; }
.client-card-details span { display: inline-flex; align-items: center; gap: 5px; overflow-wrap: anywhere; }
.card-link { display: flex; align-items: center; gap: 4px; justify-content: space-between; margin-top: 14px; padding-top: 10px; border-top: 1px solid #e6edf3; font-size: .83rem; font-weight: 750; color: var(--cyan-ink); }

.back-link { margin-bottom: 10px; }
.profile-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 20px; }
.profile-title { flex: 1; min-width: 100px; }
.profile-title h1 { font-size: clamp(1.5rem, 3vw, 2rem); }
.profile-title p { font-size: .86rem; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.profile-actions { display: flex; align-items: center; gap: 6px; }
.profile-tabs { display: flex; overflow-x: auto; gap: 17px; margin: 11px 0 16px; padding: 0 3px; border-bottom: 1px solid #d7e1eb; }
.profile-tabs a { padding: 12px 3px 10px; border-bottom: 2px solid transparent; color: var(--muted); font-size: .86rem; font-weight: 750; white-space: nowrap; }
.profile-tabs a[aria-current] { color: var(--cyan-ink); border-color: #1b9db5; }
.profile-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 13px; }
.profile-summary > div { display: grid; gap: 4px; padding: 12px 13px; border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 12px; background: #fff; }
.profile-summary span { color: var(--muted); font-size: .79rem; font-weight: 650; }
.profile-summary strong { font-size: 1.37rem; line-height: 1.2; letter-spacing: -.034em; overflow-wrap: anywhere; }
.package-panel, .package-followups { margin-block: 0 13px; }
.package-followups { margin-block: 15px 0; }
.package-panel .panel-heading p { overflow-wrap: anywhere; }
.package-balances { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; padding: 0 18px 14px; }
.package-balances div { display: grid; gap: 3px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #f3f8fb; }
.package-balances div:last-child { background: #fff7e7; }
.package-balances dt { color: var(--muted); font-size: .76rem; font-weight: 650; }
.package-balances dd { font-size: 1rem; font-weight: 800; overflow-wrap: anywhere; }
.package-overused { margin: 0 18px 10px; color: #8a5112; font-size: .83rem; font-weight: 700; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; align-items: start; }
.detail-notes { grid-column: 1/-1; }
.details { padding: 0 18px 11px; }
.details > div { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid #e8eef4; }
.details dt { display: flex; align-items: flex-start; gap: 7px; color: var(--muted); font-size: .82rem; line-height: 1.4; }
.details dt svg { margin-top: 1px; }
.details dd { color: #293d51; font-weight: 650; font-size: .83rem; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; }
.stack { display: grid; gap: 14px; }
.weight-chip { color: #206a5c; background: #e2f5ef; border-radius: 8px; padding: 6px 8px; font-size: .78rem; font-weight: 750; white-space: nowrap; }
.chart-wrap { padding: 0 16px 10px; }
.chart-wrap canvas { display: block; width: 100%; height: 220px; }
.filter-select { display: inline-flex; align-items: center; gap: 10px; width: min(100%, 360px); color: var(--muted); font-size: .87rem; font-weight: 750; }
.filter-select select { width: 100%; }
.settings-stack { max-width: 790px; }
.settings-intro { display: flex; align-items: flex-start; padding: 18px; gap: 12px; }
.settings-avatar { width: 38px; height: 38px; flex-basis: 38px; background: #dff6fa; color: #146f81; }
.setting-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 12px 0; margin: 0 18px; border-top: 1px solid #e8eef4; }
.setting-row strong { color: var(--ink); font-size: .88rem; font-weight: 750; }
.setting-row p { color: var(--muted); font-size: .79rem; line-height: 1.4; margin-top: 3px; }
.setting-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.setting-actions:empty { display: none; }
.demo-strip, .storage-alert { display: flex; align-items: center; gap: 9px; min-height: 43px; margin-bottom: 16px; border: 1px solid #c2dfe8; border-radius: 10px; padding: 6px 10px; background: #eaf6fa; color: #255c74; font-size: .84rem; font-weight: 700; }
.demo-strip .btn, .storage-alert a { margin-left: auto; }
.storage-alert { flex-wrap: wrap; border-color: #f0cfd3; background: #fdf0f2; color: #8f2635; }
.storage-alert a { text-decoration: underline; }

dialog { width: min(calc(100% - 28px), 605px); max-height: calc(100% - 28px); padding: 0; border: 1px solid #d8e4ed; border-radius: 17px; background: #fff; color: var(--ink); box-shadow: 0 20px 90px #0d203e61; }
dialog::backdrop { background: #0813209e; }
#dialog-form { display: flex; flex-direction: column; max-height: min(720px, calc(100vh - 30px)); max-height: min(720px, calc(100dvh - 30px)); }
.dialog-head, .dialog-foot { display: flex; flex: 0 0 auto; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 18px; }
.dialog-head { border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 1.23rem; letter-spacing: -.024em; }
.dialog-head p { color: var(--muted); margin-top: 4px; font-size: .84rem; }
.dialog-body { min-height: 0; overflow-y: auto; padding: 15px 18px; overscroll-behavior: contain; }
.dialog-foot { border-top: 1px solid var(--line); justify-content: flex-end; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 13px; }
.field { display: grid; min-width: 0; gap: 5px; align-content: start; }
.field-wide { grid-column: 1/-1; }
.form-section { padding: 12px 0 2px; border-top: 1px solid var(--line); }
.form-section h3 { margin: 0; font-size: 1rem; }
.form-section p { margin-top: 4px; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.field label { font-size: .83rem; color: #34495f; font-weight: 730; }
.field label span { color: #08768d; }
.field input, .field textarea, select { border: 1px solid #d6e2ec; border-radius: 8px; min-width: 0; min-height: 42px; padding: 7px 9px; color: var(--ink); background-color: #f9fbfd; font-size: 1rem; }
.field textarea { min-height: 70px; resize: vertical; }
select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg,transparent 50%,#516a80 50%), linear-gradient(135deg,#516a80 50%,transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field input::placeholder, .field textarea::placeholder { color: #65788d; }
.field input:focus, .field textarea:focus, select:focus { outline: 2px solid #8dd6e2; outline-offset: 1px; border-color: #529faf; }
.form-error { padding: 9px 10px; margin-top: 12px; border-radius: 7px; background: #ffedf0; color: #982639; font-size: .86rem; }
.confirm-copy { color: #43546b; line-height: 1.5; font-size: .95rem; }
.toast-host { position: fixed; right: 20px; bottom: 18px; z-index: 10; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 42px); padding: 11px 13px; border-radius: 11px; border: 1px solid #1b3b54; background: #172a3b; color: #f5fbff; box-shadow: 0 5px 18px #10283d36; font-size: .87rem; }
.toast svg { color: #76e5c5; }
.toast-error svg { color: #ff9ea8; }
#report-print { display: none; }

@media (max-width: 1080px) {
  .sidebar { width: 204px; padding-left: 14px; padding-right: 14px; }
  .workspace { margin-left: 204px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); }
  .metrics { gap: 9px; }
  .metric { padding-left: 12px; padding-right: 12px; }
}

@media (max-width: 860px) {
  .sidebar, .breadcrumb { display: none; }
  .workspace { margin-left: 0; }
  .topbar { min-height: 60px; padding: 0 19px; background: var(--nav); border-bottom-color: #253647; color: #fff; }
  .mobile-brand { display: block; }
  .brand-mark { width: 35px; height: 35px; border-radius: 9px; }
  .brand-mark svg { width: 20px; height: 20px; }
  .brand { gap: 8px; }
  .brand strong { font-size: 21px; }
  .brand small { font-size: 8px; margin-top: 5px; }
  .top-offline { background: #183a3b; border-color: #2a5e5f; color: #a0efe0; }
  .main { padding-bottom: calc(85px + env(safe-area-inset-bottom)); }
  .mobile-nav { position: fixed; z-index: 4; inset: auto 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: stretch; gap: 1px; background: #fff; border-top: 1px solid #d9e4ef; box-shadow: 0 -3px 18px #213d5a0b; padding: 4px max(5px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(5px, env(safe-area-inset-left)); }
  .mobile-nav a { min-height: 52px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; padding: 3px 1px; border-radius: 9px; color: #53667d; font-size: .69rem; font-weight: 700; }
  .mobile-nav a[aria-current] { background: #e7f7fa; color: #086d83; }
  .toast-host { bottom: calc(69px + env(safe-area-inset-bottom)); right: 12px; }
}

@media (max-width: 620px) {
  .main { padding: 19px 15px calc(80px + env(safe-area-inset-bottom)); }
  .topbar { padding: 0 15px; }
  .page-heading { gap: 9px; margin-bottom: 16px; align-items: flex-start; }
  .page-heading p { font-size: .83rem; margin-top: 5px; }
  .date-chip { display: none; }
  .page-actions { margin-top: 2px; }
  .page-actions .btn { min-height: 39px; padding: 7px 9px; font-size: .8rem; gap: 5px; }
  .page-actions .btn svg { width: 15px; height: 15px; }
  .hero { min-height: 235px; padding: 19px 18px; border-radius: 15px; }
  .hero::before { inset-inline-start: 6%; background-position: 58% 50%; }
  .hero::after { background: linear-gradient(90deg, #101d2afa 1%, #101d2ae9 24%, #101d2a70 73%, #101d2a32 100%); }
  .hero-copy { max-width: 230px; }
  .hero-kicker { font-size: .62rem; letter-spacing: .12em; }
  .hero h2 { font-size: clamp(2.36rem, 10vw, 3rem); margin-top: 9px; }
  .hero p { font-size: .79rem; line-height: 1.35; margin: 9px 0 12px; }
  .hero-button { min-height: 34px; padding: 6px 8px; font-size: .75rem; }
  .section-line { margin: 18px 0 9px; }
  .section-line h2, .panel-heading h2 { font-size: 1rem; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .metric { padding: 10px 11px; min-height: 119px; border-radius: 12px; }
  .metric-icon { width: 32px; height: 32px; border-radius: 9px; }
  .metric-icon svg { width: 18px; height: 18px; }
  .metric-label { margin-top: 7px; font-size: .76rem; }
  .metric > strong { font-size: 1.54rem; }
  .metric > small { font-size: .7rem; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); gap: 11px; margin-top: 12px; }
  .panel-heading { padding: 13px 13px 9px; }
  .panel-heading p { font-size: .77rem; }
  .panel { border-radius: 13px; }
  .week-strip { margin-inline: 12px; gap: 4px; }
  .table-list { padding-inline: 12px; }
  .toolbar { gap: 9px; margin-bottom: 11px; }
  .search-box { width: 100%; }
  .client-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .client-card { padding: 12px; }
  .client-card .pill { top: 13px; right: 10px; }
  .client-card h2 { font-size: .94rem; }
  .client-card p { font-size: .78rem; }
  .client-card-details { margin-top: 9px; }
  .client-card .avatar-lg { width: 35px; height: 35px; font-size: .75rem; }
  .profile-head { padding: 13px; gap: 8px; }
  .profile-head .avatar-xl { width: 45px; height: 45px; font-size: 1rem; }
  .profile-actions { flex-basis: 100%; justify-content: flex-end; }
  .profile-tabs { gap: 12px; }
  .profile-tabs a { font-size: .81rem; }
  .profile-summary { gap: 6px; }
  .profile-summary > div { padding: 9px 8px; }
  .profile-summary span { font-size: .72rem; }
  .profile-summary strong { font-size: 1.12rem; }
  .package-balances { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-inline: 12px; }
  .package-balances div { padding: 7px; }
  .package-balances dd { font-size: .91rem; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .details { padding-inline: 13px; }
  .session-row, .record-row { gap: 7px; }
  .session-row.with-actions { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
  .session-row .record-actions { grid-column: 2 / 4; }
  .session-row .session-time { max-width: 120px; white-space: normal; text-align: right; }
  .record-row.with-report-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); }
  .record-row.with-report-actions .record-actions { grid-column: 2; }
  .record-actions .icon-btn { width: 34px; height: 34px; }
  .session-row .session-icon, .record-row .session-icon { width: 31px; height: 31px; }
  .setting-row { gap: 7px; margin-inline: 12px; }
  .setting-row > .session-icon { width: 30px; height: 30px; }
  .setting-actions { justify-content: flex-start; grid-column: 2 / -1; }
  .chart-wrap { padding-inline: 7px; }
  .chart-wrap canvas { height: 190px; }
  .dialog-head, .dialog-foot, .dialog-body { padding-inline: 12px; }
  .form-grid { gap: 10px; }
}

@media (max-width: 365px) {
  .main, .topbar { padding-inline: 11px; }
  .top-offline { padding-inline: 7px; font-size: .68rem; }
  .filters { flex-wrap: wrap; overflow-x: visible; }
  .filters button { padding-inline: 6px; }
  .client-card-details { font-size: .74rem; }
  .profile-tabs { gap: 9px; }
  .profile-tabs a { font-size: .76rem; }
  .session-row .pill { font-size: .64rem; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media print {
  @page { size: A4; margin: 15mm; }
  body { background: #fff; color: #182635; }
  .printing-report .shell, .printing-report dialog, .printing-report .toast-host { display: none !important; }
  .printing-report #report-print { display: block; }
  .report-print { font: 10pt/1.43 system-ui, sans-serif; }
  .report-print__header { border-top: 4px solid #1096ab; border-bottom: 1px solid #c7d6e0; padding: 12px 0 13px; margin-bottom: 16px; }
  .report-print__brand { font-size: 10pt; font-weight: 850; letter-spacing: .1em; color: #155971; }
  .report-print h1 { font-size: 25pt; margin: 2px 0 4px; font-weight: 800; }
  .report-print__subtitle { color: #445973; font-size: 12pt; }
  .report-print__byline { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; color: #445973; margin-top: 7px; }
  .report-print__section { margin-bottom: 15px; }
  .report-print__section h2 { font-size: 13pt; margin-bottom: 5px; break-after: avoid; }
  .report-print__section-meta, .report-print__empty { margin: 4px 0 8px; color: #445973; }
  .report-print table { width: 100%; margin-top: 6px; border-collapse: collapse; }
  .report-print thead { display: table-header-group; }
  .report-print tr { break-inside: avoid; }
  .report-print td, .report-print th { padding: 6px 8px; border: 1px solid #d2dde6; text-align: left; vertical-align: top; overflow-wrap: anywhere; white-space: pre-wrap; }
  .report-print th { color: #103e54; background: #ebf6f8; print-color-adjust: exact; }
  .report-print__notes { white-space: pre-wrap; padding-left: 20px; }
}
