﻿/* ==================================================
   ATHRA Design System Tokens
   Mobile-7 keeps backward compatibility with Mobile-5 variables while
   formalizing the ATHRA Coach Mobile App Design System v1.0 foundation.
   ================================================== */
:root {
  /* Brand / Primitive Colors */
  --athra-black: #07090b;
  --athra-charcoal: #101518;
  --athra-charcoal-soft: #171e22;
  --athra-charcoal-elevated: #202a2f;
  --accent-rgb: 217, 183, 95;
  --accent-light-rgb: 243, 217, 139;
  --accent-light: rgb(var(--accent-light-rgb));
  --text-scale: 1;
  --athra-gold: rgb(var(--accent-rgb));
  --athra-gold-soft: rgba(var(--accent-rgb),  .16);
  --athra-white: #f7f1e6;
  --athra-muted: #aab4af;
  --athra-red: #ef7f73;
  --athra-green: #7ad8a7;
  --athra-yellow: #f4c76f;
  --athra-blue: #9bb5f3;

  /* Semantic Colors */
  --color-bg: var(--athra-black);
  --color-surface: var(--athra-charcoal);
  --color-surface-2: var(--athra-charcoal-soft);
  --color-surface-3: var(--athra-charcoal-elevated);
  --color-surface-elevated: #232f35;
  --color-border: rgba(var(--accent-rgb),  .18);
  --color-border-soft: rgba(247, 241, 230, .08);
  --color-text: var(--athra-white);
  --color-text-muted: var(--athra-muted);
  --color-text-soft: rgba(247, 241, 230, .72);
  --color-accent: var(--athra-gold);
  --color-accent-soft: var(--athra-gold-soft);
  --color-danger: var(--athra-red);
  --color-success: var(--athra-green);
  --color-warning: var(--athra-yellow);

  /* Surface Tokens */
  --surface-app: #0b0f12;
  --surface-card: var(--color-surface);
  --surface-card-hover: var(--color-surface-2);
  --surface-panel: rgba(16, 21, 24, .96);
  --surface-overlay: rgba(0, 0, 0, .58);

  /* Text Tokens */
  --text-primary: var(--color-text);
  --text-secondary: var(--color-text-muted);
  --text-tertiary: rgba(247, 241, 230, .52);
  --text-accent: var(--color-accent);
  --text-danger: var(--color-danger);
  --text-success: var(--color-success);

  /* Border Tokens */
  --border-default: var(--color-border);
  --border-soft: var(--color-border-soft);
  --border-focus: rgba(var(--accent-rgb),  .56);

  /* Spacing Tokens */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;

  /* Radius Tokens */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-2xl: 32px;
  --radius-pill: 999px;

  /* Shadow Tokens */
  --shadow-soft: 0 10px 26px rgba(0, 0, 0, .24);
  --shadow-card: 0 18px 46px rgba(0, 0, 0, .34);
  --shadow-panel: 0 -18px 48px rgba(0, 0, 0, .44);
  --shadow-focus: 0 0 0 4px rgba(var(--accent-rgb),  .10);

  /* Typography Tokens */
  --font-family-base: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-size-xs: calc(8px * var(--text-scale));
  --font-size-sm: calc(10px * var(--text-scale));
  --font-size-small: calc(10px * var(--text-scale));
  --font-size-body: calc(13px * var(--text-scale));
  --font-size-md: calc(15px * var(--text-scale));
  --font-size-lg: calc(18px * var(--text-scale));
  --font-size-section: calc(16px * var(--text-scale));
  --font-size-title: calc(28px * var(--text-scale));
  --font-size-display: calc(48px * var(--text-scale));
  --line-height-tight: 1.08;
  --line-height-normal: 1.4;
  --line-height-relaxed: 1.55;
  --font-weight-regular: 400;
  --font-weight-medium: 600;
  --font-weight-semibold: 800;
  --font-weight-bold: 900;

  /* Motion Tokens */
  --motion-fast: .12s;
  --motion-normal: .18s;
  --motion-slow: .28s;
  --ease-standard: ease;
  --ease-emphasized: cubic-bezier(.2, .8, .2, 1);

  /* Z-index / Layer Tokens */
  --z-base: 1;
  --z-header: 10;
  --z-panel: 30;
  --z-toast: 40;
  --z-modal: 50;

  /* Component Tokens */
  --button-height: 52px;
  --button-radius: 17px;
  --card-radius: var(--radius-lg);
  --input-height: 44px;
  --input-radius: 13px;
  --panel-radius: var(--radius-xl);
  --touch-target-min: 40px;

  /* Backward-compatible Mobile-5 aliases */
  --ink: var(--color-text);
  --muted: var(--color-text-muted);
  --line: var(--color-border);
  --surface: var(--color-surface);
  --canvas: var(--surface-app);
  --forest: #141c20;
  --forest-2: #202b30;
  --mint: rgba(122, 216, 167, .16);
  --lime: var(--color-accent);
  --peach: rgba(239, 127, 115, .16);
  --blue: rgba(123, 156, 220, .18);
  --danger: var(--color-danger);
  --shadow: var(--shadow-card);

  font-family: var(--font-family-base);
  color: var(--ink);
  background: var(--color-bg);
  font-synthesis: none;
}

/* ==================================================
   Base / Reset
   CSS Architecture Sections:
   - App Shell
   - Typography
   - Layout Utilities
   - Components
   - Buttons
   - Cards
   - Forms
   - Badges / Status
   - States: Loading / Error / Empty
   - Navigation
   - Screens
   - Action Panels
   - Accessibility
   - Responsive
   ================================================== */
* { box-sizing: border-box; }
html { min-height: 100%; background: #dde5e1; -webkit-text-size-adjust: 100%; }
body { min-height: 100%; margin: 0; background: radial-gradient(circle at 50% 0, #edf3ef 0, #dbe4df 72%); }
html.body-scroll-locked,
body.body-scroll-locked {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, [data-route] { cursor: pointer; }
button { border: 0; }
h1, h2, h3, p { margin: 0; }

/* ==================================================
   Layout Utilities
   These classes are intentionally additive. Mobile-7 does not require
   a mass markup refactor; future stages can adopt them gradually.
   ================================================== */
.ds-container { width: min(100%, 430px); margin: 0 auto; }
.ds-section { margin-top: var(--space-6); }
.ds-stack { display: grid; gap: var(--space-4); }
.ds-stack-sm { display: grid; gap: var(--space-2); }
.ds-stack-lg { display: grid; gap: var(--space-6); }
.ds-row { display: flex; align-items: center; gap: var(--space-3); }
.ds-row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.ds-grid { display: grid; gap: var(--space-4); }
.ds-divider { height: 1px; background: var(--border-soft); }

/* Typography */
.ds-title { color: var(--text-primary); font-size: var(--font-size-title); font-weight: var(--font-weight-bold); line-height: var(--line-height-tight); letter-spacing: -.045em; }
.ds-section-title { color: var(--text-primary); font-size: var(--font-size-section); font-weight: var(--font-weight-semibold); line-height: var(--line-height-tight); }
.ds-body { color: var(--text-primary); font-size: var(--font-size-body); line-height: var(--line-height-normal); }
.ds-muted { color: var(--text-secondary); }
.ds-caption { color: var(--text-tertiary); font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); letter-spacing: .04em; }

/* Surface */
.ds-card { border: 1px solid var(--border-default); border-radius: var(--card-radius); background: var(--surface-card); box-shadow: var(--shadow-soft); color: var(--text-primary); }
.ds-card-elevated { border: 1px solid var(--border-default); border-radius: var(--radius-xl); background: var(--color-surface-elevated); box-shadow: var(--shadow-card); color: var(--text-primary); }
.ds-panel { border: 1px solid var(--border-default); border-radius: var(--panel-radius); background: var(--surface-panel); box-shadow: var(--shadow-panel); color: var(--text-primary); }

/* State */
.ds-loading { color: var(--text-secondary); }
.ds-error { color: var(--text-danger); }
.ds-empty { color: var(--text-secondary); }
.ds-success { color: var(--text-success); }

/* ==================================================
   Component Class Foundation
   New athra-* classes are contracts for Mobile-8+ refactors. Existing
   prototype classes remain the active runtime styling for now.
   ================================================== */
.athra-button { display: inline-flex; min-height: var(--button-height); align-items: center; justify-content: center; gap: var(--space-2); border-radius: var(--button-radius); font-weight: var(--font-weight-bold); transition: background-color var(--motion-normal) var(--ease-standard), border-color var(--motion-normal) var(--ease-standard), box-shadow var(--motion-normal) var(--ease-standard), transform var(--motion-fast) var(--ease-standard); }
.athra-button--primary { background: linear-gradient(135deg, var(--accent-light), var(--color-accent)); color: #17110a; box-shadow: 0 16px 32px rgba(var(--accent-rgb),  .18); }
.athra-button--secondary { border: 1px solid var(--border-default); background: rgba(255,255,255,.035); color: var(--text-primary); }
.athra-button--ghost { background: transparent; color: var(--text-secondary); }
.athra-button--danger { border: 1px solid rgba(239,127,115,.24); background: rgba(239,127,115,.12); color: var(--color-danger); }
.athra-button--loading { cursor: wait; opacity: .72; }

.athra-card { border: 1px solid var(--border-default); border-radius: var(--card-radius); background: var(--surface-card); box-shadow: var(--shadow-soft); color: var(--text-primary); }
.athra-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.athra-card__title { color: var(--text-primary); font-size: var(--font-size-section); font-weight: var(--font-weight-semibold); line-height: var(--line-height-tight); }
.athra-card__subtitle { color: var(--text-secondary); font-size: var(--font-size-sm); line-height: var(--line-height-normal); }
.athra-card__body { display: grid; gap: var(--space-3); }
.athra-card__footer { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.athra-card--interactive { cursor: pointer; transition: background-color var(--motion-normal) var(--ease-standard), border-color var(--motion-normal) var(--ease-standard), transform var(--motion-fast) var(--ease-standard); }
.athra-card--compact { padding: var(--space-3); }
.athra-card--metric { min-height: 116px; padding: var(--space-4); }
.athra-card--client { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); }
.athra-card--training { padding: var(--space-3); border-radius: var(--radius-lg); }
.athra-card--settings { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); }

.athra-form { display: grid; gap: var(--space-3); }
.athra-form__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.athra-field { display: grid; gap: var(--space-2); }
.athra-label { color: var(--text-accent); font-size: var(--font-size-sm); font-weight: var(--font-weight-bold); letter-spacing: .03em; text-transform: uppercase; }
.athra-input { min-height: var(--input-height); border: 1px solid var(--border-default); border-radius: var(--input-radius); background: rgba(255,255,255,.045); color: var(--text-primary); font-size: max(16px, var(--font-size-body)); line-height: var(--line-height-normal); }
.athra-input:disabled { cursor: not-allowed; opacity: .62; }
.athra-help { color: var(--text-tertiary); font-size: var(--font-size-sm); }
.athra-field-error { color: var(--text-danger); font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); }

.athra-badge { display: inline-flex; width: fit-content; align-items: center; gap: var(--space-1); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: var(--space-1) var(--space-2); font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); }
.athra-badge--success { background: rgba(122,216,167,.14); color: var(--color-success); }
.athra-badge--warning { background: rgba(244,199,111,.16); color: var(--color-warning); }
.athra-badge--danger { background: rgba(239,127,115,.14); color: var(--color-danger); }
.athra-badge--muted { background: rgba(255,255,255,.06); color: var(--text-secondary); }
.athra-badge--gold { background: var(--color-accent-soft); color: var(--color-accent); }

.athra-bottom-sheet,
.athra-action-panel { border-radius: var(--panel-radius) var(--panel-radius) 0 0; background: var(--surface-panel); box-shadow: var(--shadow-panel); }
.athra-panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.athra-panel-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.athra-loading-state,
.athra-error-state,
.athra-empty-state,
.athra-success-state { display: grid; gap: var(--space-3); place-items: center; text-align: center; }
.athra-loading-state { color: var(--text-secondary); }
.athra-error-state { color: var(--text-danger); }
.athra-empty-state { color: var(--text-secondary); }
.athra-success-state { color: var(--text-success); }

/* ==================================================
   App Shell
   ================================================== */
#app { min-height: 100vh; min-height: 100svh; min-height: 100dvh; }
.app-shell { position: relative; width: min(100%, 430px); min-height: 100vh; min-height: 100svh; min-height: 100dvh; margin: 0 auto; background: var(--canvas); box-shadow: 0 0 70px rgba(14, 44, 39, .15); overflow-x: hidden; }
.app-content { min-height: 100vh; min-height: 100svh; min-height: 100dvh; }
.screen { min-height: 100vh; min-height: 100svh; min-height: 100dvh; padding: max(24px, env(safe-area-inset-top)) 20px calc(112px + env(safe-area-inset-bottom)); }
.grow { flex: 1; min-width: 0; }
.eyebrow { margin-bottom: 5px; color: #75908b; font-size: calc(10px * var(--text-scale)); font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow.light { color: #9ebbb3; }
.chevron { color: #91a09e; font-size: calc(28px * var(--text-scale)); font-weight: 300; line-height: 1; }
.success-text { color: #37816c !important; }

.bottom-nav { position: fixed; z-index: 20; bottom: 0; left: 50%; display: grid; grid-template-columns: repeat(5, 1fr); width: min(100%, 430px); padding: 10px 8px calc(8px + env(safe-area-inset-bottom)); transform: translateX(-50%); border-top: 1px solid rgba(218, 227, 224, .8); background: rgba(255,255,255,.94); backdrop-filter: blur(18px); }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 5px 1px; border-radius: 14px; background: transparent; color: #8c9998; }
.nav-item span { display: grid; width: 27px; height: 25px; place-items: center; font-size: calc(22px * var(--text-scale)); line-height: 1; }
.nav-item small { font-size: calc(9px * var(--text-scale)); font-weight: 700; letter-spacing: -.02em; }
.nav-item.active { color: var(--forest); }
.nav-item.active span { border-radius: 10px; background: var(--lime); }

.screen-header, .dashboard-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.screen-header h1, .dashboard-header h1 { font-size: calc(28px * var(--text-scale)); line-height: 1.08; letter-spacing: -.045em; }
.screen-header p:not(.eyebrow), .dashboard-header p { margin-top: 5px; color: var(--muted); font-size: calc(13px * var(--text-scale)); }
.header-leading { display: flex; align-items: flex-start; gap: 10px; }
.icon-button { width: 34px; height: 34px; margin-left: -6px; border-radius: 50%; background: #e5ece9; font-size: calc(20px * var(--text-scale)); }
.header-action { padding: 9px 12px; border-radius: 12px; background: var(--mint); color: var(--forest); font-size: calc(12px * var(--text-scale)); font-weight: 800; }

.auth-shell { background: var(--forest); }
.auth-screen { position: relative; display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; padding: max(46px, env(safe-area-inset-top)) 28px max(30px, env(safe-area-inset-bottom)); overflow: hidden; background: linear-gradient(155deg, #102c2b 0%, #183e39 53%, #1d4b43 100%); color: white; }
.auth-screen::after { position: absolute; right: -100px; bottom: 170px; width: 300px; height: 300px; border: 1px solid rgba(217,245,111,.2); border-radius: 50%; content: ""; }
.auth-orbit { position: absolute; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; }
.orbit-one { top: -80px; right: -100px; width: 320px; height: 320px; }
.orbit-two { top: 40px; right: -35px; width: 170px; height: 170px; border-color: rgba(217,245,111,.18); }
.brand-mark { position: relative; z-index: 1; display: grid; width: 62px; height: 62px; place-items: center; border: 1px solid rgba(255,255,255,.24); border-radius: 20px; background: rgba(255,255,255,.1); box-shadow: inset 0 1px rgba(255,255,255,.14); color: var(--lime); font-size: calc(19px * var(--text-scale)); font-weight: 900; letter-spacing: -.06em; }
.brand-mark.small { width: 48px; height: 48px; border-radius: 15px; background: var(--forest); }
.auth-copy { position: relative; z-index: 1; margin: auto 0 70px; }
.auth-copy h1 { max-width: 340px; font-size: calc(48px * var(--text-scale)); line-height: .98; letter-spacing: -.065em; }
.auth-copy h1 em { color: var(--lime); font-style: normal; }
.auth-copy > p:last-child { max-width: 315px; margin-top: 22px; color: #c2d4cf; font-size: calc(15px * var(--text-scale)); line-height: 1.55; }
.auth-panel { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; }
.token-auth-screen .auth-copy { margin-bottom: 36px; }
.role-pill { width: fit-content; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.08); color: #d7e3df; font-size: calc(11px * var(--text-scale)); font-weight: 700; }
.role-pill span { margin-right: 6px; color: var(--lime); }
.auth-panel-title { display: grid; gap: 4px; }
.auth-panel-title strong { font-size: calc(20px * var(--text-scale)); line-height: 1.1; letter-spacing: -.04em; }
.auth-panel-title small { color: #a8beb8; font-size: calc(11px * var(--text-scale)); text-align: left; }
.primary-button { display: flex; min-height: 56px; align-items: center; justify-content: space-between; padding: 0 20px; border-radius: 17px; background: var(--lime); color: #18312e; box-shadow: 0 14px 30px rgba(0,0,0,.18); font-weight: 900; }
.primary-button:disabled { cursor: wait; opacity: .72; }
.primary-button span { font-size: calc(22px * var(--text-scale)); }
.auth-panel small { color: #90aaa3; font-size: calc(10px * var(--text-scale)); text-align: center; }
.auth-form { display: grid; gap: 12px; }
.auth-form .form-field span { color: #c8d9d4; }
.auth-form .form-field input { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.1); color: white; }
.auth-form .form-field input::placeholder { color: rgba(255,255,255,.36); }
.auth-message { padding: 10px 12px; border-radius: 13px; font-size: calc(10px * var(--text-scale)); font-weight: 800; line-height: 1.35; }
.auth-message.error { background: rgba(248,229,226,.14); color: #ffd0ca; }
.auth-message.success { background: rgba(217,245,111,.13); color: var(--lime); }
.auth-trainer-card { display: grid; gap: 4px; padding: 14px; border: 1px solid rgba(255,255,255,.11); border-radius: 16px; background: rgba(255,255,255,.08); }
.auth-trainer-card strong { font-size: calc(13px * var(--text-scale)); }
.auth-trainer-card small { color: #b8cbc6; text-align: left; }
.ghost-auth-button { min-height: 42px; border-radius: 14px; background: rgba(255,255,255,.1); color: #dce9e4; font-size: calc(11px * var(--text-scale)); font-weight: 900; }

.dashboard-screen { background: linear-gradient(180deg, #eef4f0 0, var(--canvas) 240px); }
.dashboard-header p { margin: 0 0 5px; font-size: calc(11px * var(--text-scale)); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.dashboard-header h1 span { color: #8eb117; font-size: calc(18px * var(--text-scale)); }
.profile-button { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 15px; background: var(--forest); color: white; font-size: calc(13px * var(--text-scale)); font-weight: 800; }
.hero-card { display: flex; min-height: 156px; align-items: center; justify-content: space-between; padding: 24px; border-radius: 26px; background: linear-gradient(135deg, #173a37, #24544a); box-shadow: 0 17px 35px rgba(24,60,56,.2); color: white; }
.hero-card p { color: #a9c1bb; font-size: calc(12px * var(--text-scale)); }
.hero-card > div:first-child { display: flex; max-width: 210px; flex-direction: column; gap: 8px; }
.hero-card strong { font-size: calc(25px * var(--text-scale)); letter-spacing: -.04em; }
.hero-card span { color: #b9cdc8; font-size: calc(11px * var(--text-scale)); line-height: 1.4; }
.hero-ring { display: grid; width: 76px; height: 76px; place-content: center; border: 7px solid rgba(255,255,255,.14); border-top-color: var(--lime); border-radius: 50%; text-align: center; }
.hero-ring b { font-size: calc(22px * var(--text-scale)); }
.hero-ring small { color: #b9ccc7; font-size: calc(10px * var(--text-scale)); }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 12px; }
.section-heading h2 { font-size: calc(16px * var(--text-scale)); letter-spacing: -.02em; }
.section-heading button, .section-heading > span { background: transparent; color: #66817b; font-size: calc(11px * var(--text-scale)); font-weight: 700; }
.metric-grid { display: grid; gap: 10px; }
.two-columns { grid-template-columns: repeat(2, 1fr); }
.three-columns { grid-template-columns: repeat(3, 1fr); }
.metric-card { display: flex; min-height: 116px; flex-direction: column; padding: 16px; border: 1px solid rgba(225,232,229,.9); border-radius: 20px; background: var(--surface); box-shadow: 0 9px 25px rgba(33,67,61,.04); }
.metric-icon { display: grid; width: 30px; height: 30px; margin-bottom: auto; place-items: center; border-radius: 10px; background: #edf1ef; font-weight: 900; }
.metric-card strong { margin-top: 10px; font-size: calc(18px * var(--text-scale)); letter-spacing: -.04em; }
.metric-card small { margin-top: 3px; color: var(--muted); font-size: calc(10px * var(--text-scale)); }
.tone-mint .metric-icon { background: var(--mint); }.tone-lime .metric-icon { background: var(--lime); }.tone-peach .metric-icon { background: var(--peach); }.tone-blue .metric-icon { background: var(--blue); }
.next-training-card { display: flex; align-items: center; gap: 12px; padding: 17px; border-radius: 20px; background: white; box-shadow: var(--shadow); }
.next-time { min-width: 48px; }.next-time strong { display: block; font-size: calc(18px * var(--text-scale)); }.next-time span { color: var(--muted); font-size: calc(9px * var(--text-scale)); }
.vertical-line { width: 1px; height: 42px; background: var(--line); }
.next-training-card .grow strong { display: block; font-size: calc(13px * var(--text-scale)); }.next-training-card .grow span { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: calc(10px * var(--text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.quick-actions button { display: grid; grid-template-columns: 36px 1fr; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: transparent; text-align: left; }
.quick-actions button > span { display: grid; grid-row: span 2; width: 30px; height: 30px; place-items: center; border-radius: 10px; background: var(--mint); font-size: calc(17px * var(--text-scale)); }
.quick-actions strong { font-size: calc(11px * var(--text-scale)); }.quick-actions small { color: var(--muted); font-size: calc(9px * var(--text-scale)); }
.attention-list { display: flex; flex-direction: column; gap: 8px; }
.attention-list button { display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid #e8e1d7; border-radius: 17px; background: #fffaf4; text-align: left; }
.attention-list strong { display: block; font-size: calc(12px * var(--text-scale)); }.attention-list small { display: block; margin-top: 3px; color: #907b63; font-size: calc(9px * var(--text-scale)); }.attention-list b { color: #9a6a36; font-size: calc(9px * var(--text-scale)); }

.avatar { display: inline-grid; flex: 0 0 auto; place-items: center; border-radius: 50%; background: linear-gradient(135deg, #d5ebe3, #b8dbcf); color: #225149; font-weight: 900; }
.avatar-sm { width: 36px; height: 36px; font-size: calc(10px * var(--text-scale)); }.avatar-md { width: 48px; height: 48px; font-size: calc(12px * var(--text-scale)); }.avatar-lg { width: 76px; height: 76px; border: 5px solid rgba(255,255,255,.8); font-size: calc(20px * var(--text-scale)); box-shadow: 0 10px 25px rgba(31,77,68,.14); }

.search-field { display: flex; align-items: center; gap: 9px; height: 48px; padding: 0 15px; border: 1px solid #e0e7e4; border-radius: 16px; background: white; }
.search-field span { color: #77908b; font-size: calc(22px * var(--text-scale)); }.search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: calc(13px * var(--text-scale)); }
.filter-chips, .period-tabs { display: flex; gap: 7px; margin: 13px 0 17px; overflow-x: auto; scrollbar-width: none; }
.chip, .period-tabs button { padding: 9px 13px; border: 1px solid #dce4e1; border-radius: 999px; background: transparent; color: #667673; font-size: calc(10px * var(--text-scale)); font-weight: 800; white-space: nowrap; }
.chip.active, .period-tabs button.active { border-color: var(--forest); background: var(--forest); color: white; }
.client-list { display: flex; flex-direction: column; gap: 9px; }
.client-card { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid #e5ebe8; border-radius: 20px; background: white; }
.client-card[hidden] { display: none; }
.client-card .grow strong { display: block; font-size: calc(13px * var(--text-scale)); }.client-card .grow span { display: block; margin-top: 2px; color: var(--muted); font-size: calc(10px * var(--text-scale)); }.client-card .grow small { display: block; max-width: 185px; margin-top: 6px; overflow: hidden; color: #748480; font-size: calc(9px * var(--text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.client-balance { text-align: right; }.client-balance strong { display: block; font-size: calc(12px * var(--text-scale)); }.client-balance span { display: inline-block; margin-top: 5px; padding: 4px 7px; border-radius: 8px; background: var(--mint); color: #3e7165; font-size: calc(8px * var(--text-scale)); font-weight: 800; }.client-balance.low span { background: var(--peach); color: #9d653e; }
.floating-count { width: fit-content; margin: 18px auto 0; padding: 8px 12px; border-radius: 999px; background: #e7ecea; color: #6e7d7a; font-size: calc(9px * var(--text-scale)); }.floating-count span { color: #98643c; font-weight: 900; }

.client-identity { display: flex; flex-direction: column; align-items: center; margin-top: -2px; text-align: center; }.client-identity h2 { margin-top: 10px; font-size: calc(22px * var(--text-scale)); letter-spacing: -.04em; }.client-identity p { max-width: 270px; margin-top: 5px; color: var(--muted); font-size: calc(10px * var(--text-scale)); }
.detail-tabs { display: flex; gap: 4px; margin: 24px -20px 16px; padding: 0 20px 10px; overflow-x: auto; border-bottom: 1px solid #e2e8e5; scrollbar-width: none; }.detail-tabs button { position: relative; padding: 8px 10px; background: transparent; color: #7a8886; font-size: calc(10px * var(--text-scale)); font-weight: 800; white-space: nowrap; }.detail-tabs button.active { color: var(--forest); }.detail-tabs button.active::after { position: absolute; right: 7px; bottom: -11px; left: 7px; height: 3px; border-radius: 2px; background: var(--forest); content: ""; }
.detail-balance-card { padding: 21px; border-radius: 23px; background: var(--forest); color: white; }.detail-balance-card > span { color: #a8bcb7; font-size: calc(10px * var(--text-scale)); }.detail-balance-card > strong { display: block; margin-top: 5px; font-size: calc(31px * var(--text-scale)); letter-spacing: -.05em; }.detail-balance-card > small { color: #adc0bc; font-size: calc(9px * var(--text-scale)); }.balance-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }.balance-actions button { padding: 11px 7px; border-radius: 12px; background: rgba(255,255,255,.1); color: white; font-size: calc(10px * var(--text-scale)); font-weight: 800; }.balance-actions button:first-child { background: var(--lime); color: var(--forest); }
.detail-section { margin-top: 12px; padding: 18px; border: 1px solid #e3e9e6; border-radius: 19px; background: white; }.detail-section h3 { margin-bottom: 13px; font-size: calc(12px * var(--text-scale)); }.detail-section p { color: #5f706d; font-size: calc(11px * var(--text-scale)); line-height: 1.55; }
.info-row { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid #edf0ef; }.info-row span { color: var(--muted); font-size: calc(10px * var(--text-scale)); }.info-row strong { font-size: calc(10px * var(--text-scale)); }
.timeline-list article, .payment-list article { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid #edf1ef; }.timeline-list article:last-child, .payment-list article:last-child { border-bottom: 0; }.timeline-list strong, .payment-list strong { display: block; font-size: calc(11px * var(--text-scale)); }.timeline-list span:not(.status-badge), .payment-list small { display: block; margin-top: 4px; color: var(--muted); font-size: calc(9px * var(--text-scale)); }
.payment-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 10px; font-weight: 900; }.payment-icon.positive { background: var(--mint); color: #377661; }.payment-icon.negative { background: var(--peach); color: #a06743; }.payment-list b { font-size: calc(11px * var(--text-scale)); }
.progress-hero { padding: 22px; border-radius: 22px; background: linear-gradient(135deg, #dff0e8, #eef7d4); }.progress-hero span { color: #5e756f; font-size: calc(10px * var(--text-scale)); }.progress-hero strong { float: right; font-size: calc(25px * var(--text-scale)); }.progress-track { height: 7px; margin-top: 26px; overflow: hidden; border-radius: 5px; background: rgba(31,71,63,.13); }.progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--forest); }
.tab-content .three-columns { margin-top: 10px; }.tab-content .three-columns article { padding: 14px; border-radius: 16px; background: white; text-align: center; }.tab-content .three-columns small, .tab-content .three-columns span { display: block; color: var(--muted); font-size: calc(8px * var(--text-scale)); }.tab-content .three-columns strong { display: block; margin: 5px 0 2px; font-size: calc(18px * var(--text-scale)); }.attendance { display: flex; align-items: baseline; gap: 8px; }.attendance strong { color: #3b806c; font-size: calc(28px * var(--text-scale)); }.attendance span { color: var(--muted); font-size: calc(10px * var(--text-scale)); }
.secondary-button { padding: 13px 15px; border: 1px solid #d8e3df; border-radius: 14px; background: transparent; color: var(--forest); font-size: calc(11px * var(--text-scale)); font-weight: 800; }.full-width { width: 100%; }.comment-list { margin-top: 14px; }.comment-list article { display: flex; gap: 12px; padding: 0 5px 18px; }.comment-dot { width: 9px; height: 9px; margin-top: 4px; border: 3px solid #b4d3c9; border-radius: 50%; background: white; }.comment-list small { color: #82908e; font-size: calc(8px * var(--text-scale)); }.comment-list p { margin-top: 4px; color: #4d5f5c; font-size: calc(11px * var(--text-scale)); line-height: 1.45; }

.schedule-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: #e4eae7; }.schedule-switch button { padding: 9px; border-radius: 11px; background: transparent; color: #71807d; font-size: calc(10px * var(--text-scale)); font-weight: 800; }.schedule-switch button.active { background: white; box-shadow: 0 4px 12px rgba(31,63,57,.07); color: var(--forest); }
.date-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin: 17px 0; }.date-strip button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 9px 3px; border-radius: 14px; background: transparent; color: #788784; }.date-strip small { font-size: calc(8px * var(--text-scale)); font-weight: 700; }.date-strip strong { font-size: calc(13px * var(--text-scale)); }.date-strip button.active { background: var(--forest); color: white; box-shadow: 0 8px 18px rgba(27,66,60,.2); }
.schedule-summary { display: flex; justify-content: space-around; margin-bottom: 18px; padding: 12px; border-radius: 15px; background: white; }.schedule-summary span { color: var(--muted); font-size: calc(8px * var(--text-scale)); }.schedule-summary b { color: var(--ink); font-size: calc(11px * var(--text-scale)); }
.timeline { display: flex; flex-direction: column; gap: 4px; }.training-row { display: grid; grid-template-columns: 44px 11px 1fr; align-items: flex-start; gap: 7px; }.training-row > time { padding-top: 15px; font-size: calc(11px * var(--text-scale)); font-weight: 800; }.timeline-marker { position: relative; width: 10px; height: 100%; }.timeline-marker::before { position: absolute; top: 20px; left: 3px; width: 6px; height: 6px; border: 2px solid var(--forest); border-radius: 50%; background: var(--canvas); content: ""; }.timeline-marker::after { position: absolute; top: 29px; bottom: -5px; left: 6px; width: 1px; background: #d8e1de; content: ""; }.training-row:last-child .timeline-marker::after { display: none; }
.training-card { margin-bottom: 8px; padding: 13px; border-radius: 17px; background: white; box-shadow: 0 6px 18px rgba(26,61,55,.04); }.card-row { display: flex; align-items: center; gap: 9px; }.card-row strong { display: block; font-size: calc(11px * var(--text-scale)); }.card-row .grow span { display: block; margin-top: 3px; color: var(--muted); font-size: calc(8px * var(--text-scale)); }
.status-badge { display: inline-flex; width: fit-content; align-items: center; gap: 5px; margin-top: 9px; padding: 4px 7px; border-radius: 8px; background: #edf2ef; color: #61716e; font-size: calc(8px * var(--text-scale)); font-weight: 800; }.status-badge i { width: 5px; height: 5px; border-radius: 50%; background: #7e908c; }.status-planned { background: #eaf3f0; color: #38715f; }.status-planned i, .status-completed i { background: #46a07f; }.status-completed { background: #def3e9; color: #34725d; }.status-cancelled { background: #f8e5e2; color: #a45a51; }.status-cancelled i { background: #c86b62; }.status-rescheduled { background: #e7edfa; color: #5f72a1; }.status-rescheduled i { background: #758bc2; }
.training-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }.training-actions button { padding: 6px 8px; border-radius: 9px; background: #eef4f0; color: var(--forest); font-size: calc(8px * var(--text-scale)); font-weight: 900; }.training-actions button:disabled { cursor: wait; opacity: .65; }
.training-actions .athra-button { min-height: var(--touch-target-min); }
.week-overview { display: grid; grid-template-columns: repeat(3, 1fr); margin: 16px 0; padding: 15px 10px; border-radius: 17px; background: var(--forest); color: white; }.week-overview div { border-right: 1px solid rgba(255,255,255,.12); text-align: center; }.week-overview div:last-child { border: 0; }.week-overview strong, .week-overview span { display: block; }.week-overview strong { font-size: calc(18px * var(--text-scale)); }.week-overview span { margin-top: 3px; color: #b2c5c0; font-size: calc(8px * var(--text-scale)); }
.day-group { margin-top: 15px; }.day-group > header { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 8px; }.day-group > header strong { font-size: calc(11px * var(--text-scale)); }.day-group > header span { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 8px; background: #e2e9e6; font-size: calc(8px * var(--text-scale)); font-weight: 800; }.day-group article { display: flex; align-items: center; gap: 12px; padding: 12px 13px; border-bottom: 1px solid #edf1ef; background: white; }.day-group article:first-of-type { border-radius: 17px 17px 0 0; }.day-group article:last-child { border: 0; border-radius: 0 0 17px 17px; }.day-group article:only-of-type { border-radius: 17px; }.day-group time { width: 36px; font-size: calc(11px * var(--text-scale)); font-weight: 900; }.day-group .grow > strong { display: block; font-size: calc(11px * var(--text-scale)); }.day-group .status-badge { margin-top: 5px; }

.period-tabs { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border-radius: 14px; background: #e3eae7; }.period-tabs button { border: 0; border-radius: 11px; }.period-tabs button.active { background: white; box-shadow: 0 4px 12px rgba(31,63,57,.07); color: var(--forest); }
.income-hero { position: relative; min-height: 188px; margin-top: 14px; padding: 22px; overflow: hidden; border-radius: 24px; background: linear-gradient(145deg, #173a36, #245247); color: white; }.income-hero > span { color: #aec2bd; font-size: calc(10px * var(--text-scale)); }.income-hero > strong { display: block; margin-top: 7px; font-size: calc(33px * var(--text-scale)); letter-spacing: -.055em; }.income-hero > small { display: block; margin-top: 8px; color: #acc0bb; font-size: calc(9px * var(--text-scale)); }.income-hero small i { color: var(--lime); font-style: normal; font-weight: 900; }.sparkline { position: absolute; right: 20px; bottom: 22px; left: 20px; display: flex; height: 55px; align-items: flex-end; gap: 7px; }.sparkline i { flex: 1; border-radius: 6px 6px 2px 2px; background: rgba(217,245,111,.2); }.sparkline i:nth-last-child(-n+2) { background: var(--lime); }
.stats-grid { margin-top: 10px; }.chart-card { margin-top: 12px; padding: 18px; border-radius: 20px; background: white; }.chart-card .section-heading { margin: 0 0 16px; }.horizontal-bars { display: flex; flex-direction: column; gap: 13px; }.horizontal-bars div { display: grid; grid-template-columns: 58px 1fr 70px; align-items: center; gap: 8px; }.horizontal-bars span { color: var(--muted); font-size: calc(8px * var(--text-scale)); }.horizontal-bars i { display: block; max-width: 100%; height: 7px; border-radius: 5px; background: #bedfd4; }.horizontal-bars i.accent { background: var(--lime); }.horizontal-bars i.muted { background: #dfe6e3; }.horizontal-bars b { font-size: calc(9px * var(--text-scale)); text-align: right; }
.insight-card { display: flex; gap: 12px; margin-top: 12px; padding: 16px; border: 1px solid #dce9c1; border-radius: 18px; background: #f3f9df; }.insight-card > span { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 11px; background: var(--lime); }.insight-card strong { font-size: calc(11px * var(--text-scale)); }.insight-card p { margin-top: 4px; color: #6d7e62; font-size: calc(9px * var(--text-scale)); }

.trainer-profile { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 20px; background: var(--forest); color: white; }.trainer-profile > span { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 14px; background: var(--lime); color: var(--forest); font-size: calc(12px * var(--text-scale)); font-weight: 900; }.trainer-profile strong, .trainer-profile small { display: block; }.trainer-profile strong { font-size: calc(12px * var(--text-scale)); }.trainer-profile small { margin-top: 4px; color: #afc3be; font-size: calc(9px * var(--text-scale)); }.trainer-profile button { margin-left: auto; background: transparent; color: white; font-size: calc(25px * var(--text-scale)); }
.settings-group { margin-top: 22px; }.settings-group h2 { margin: 0 0 9px 4px; color: #71817e; font-size: calc(9px * var(--text-scale)); letter-spacing: .08em; text-transform: uppercase; }.setting-row { display: flex; width: 100%; align-items: center; gap: 11px; padding: 13px; border-bottom: 1px solid #edf1ef; background: white; text-align: left; }.settings-group .setting-row:first-of-type { border-radius: 17px 17px 0 0; }.settings-group .setting-row:last-of-type { border-bottom: 0; border-radius: 0 0 17px 17px; }.settings-group .setting-row:only-of-type { border-radius: 17px; }.setting-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 10px; background: #eaf1ee; color: var(--forest); font-size: calc(14px * var(--text-scale)); font-weight: 900; }.setting-row strong, .setting-row small { display: block; }.setting-row strong { font-size: calc(10px * var(--text-scale)); }.setting-row small { margin-top: 3px; color: var(--muted); font-size: calc(8px * var(--text-scale)); }.setting-row > b { color: #637471; font-size: calc(9px * var(--text-scale)); }
.toggle { position: relative; width: 38px; height: 23px; border-radius: 20px; background: #dce3e1; transition: .2s; }.toggle i { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.14); transition: .2s; }.toggle.is-on { background: var(--forest); }.toggle.is-on i { transform: translateX(15px); background: var(--lime); }
.setting-row--placeholder,
.setting-row--readonly { cursor: default; }
.setting-row--placeholder:active,
.setting-row--readonly:active,
.settings-placeholder-action:active { transform: none; }
.setting-row--placeholder { opacity: .82; }
.setting-row--readonly { opacity: .9; }
.setting-row .athra-badge { flex: 0 0 auto; margin-left: var(--space-1); }
.settings-placeholder-action { min-height: var(--touch-target-min); opacity: .72; }
.logout-button { width: 100%; margin-top: 22px; padding: 14px; border-radius: 15px; background: #f3e7e4; color: #a15b53; font-size: calc(10px * var(--text-scale)); font-weight: 800; }

.empty-state, .fatal-state, .loading-screen { display: flex; min-height: 60vh; flex-direction: column; align-items: center; justify-content: center; padding: 30px; text-align: center; }.empty-state > span { font-size: calc(34px * var(--text-scale)); }.empty-state strong, .fatal-state strong { margin-top: 12px; font-size: calc(15px * var(--text-scale)); }.empty-state p, .fatal-state p, .loading-screen p { margin-top: 6px; color: var(--muted); font-size: calc(10px * var(--text-scale)); }.fatal-state .primary-button { min-height: 44px; margin-top: 20px; }
.loading-screen { gap: 14px; }.loading-screen > i { width: 70px; height: 3px; overflow: hidden; border-radius: 3px; background: #dae3df; }.loading-screen > i::after { display: block; width: 40%; height: 100%; animation: loading 1s infinite ease-in-out; border-radius: inherit; background: var(--forest); content: ""; }
.toast { position: fixed; z-index: 40; bottom: calc(82px + env(safe-area-inset-bottom)); left: 50%; width: min(calc(100% - 40px), 390px); padding: 12px 16px; transform: translate(-50%, 20px); border-radius: 14px; background: #152e2b; box-shadow: 0 12px 28px rgba(15,42,38,.25); color: white; font-size: calc(10px * var(--text-scale)); font-weight: 700; text-align: center; opacity: 0; pointer-events: none; transition: .25s; }.toast.visible { transform: translate(-50%, 0); opacity: 1; }
.action-backdrop { position: fixed; z-index: 29; inset: 0; left: 50%; width: min(100%, 430px); transform: translateX(-50%); background: rgba(8, 28, 25, .22); }
.action-panel { position: fixed; z-index: 30; right: 50%; bottom: 0; width: min(100%, 430px); max-height: 86vh; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); transform: translateX(50%); overflow-y: auto; border-radius: 24px 24px 0 0; background: white; box-shadow: 0 -18px 44px rgba(19, 55, 49, .18); }
.action-panel header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }.action-panel header strong { display: block; font-size: calc(16px * var(--text-scale)); letter-spacing: -.03em; }.action-panel header p { margin-top: 4px; color: var(--muted); font-size: calc(10px * var(--text-scale)); }
.form-grid { display: grid; gap: 10px; }.form-field { display: grid; gap: 6px; }.form-field span { color: #667673; font-size: calc(9px * var(--text-scale)); font-weight: 900; letter-spacing: .03em; text-transform: uppercase; }.form-field input, .form-field textarea, .form-field select { width: 100%; border: 1px solid #dce5e2; border-radius: 13px; outline: 0; background: #f9fbfa; color: var(--ink); font-size: calc(16px * var(--text-scale)); line-height: 1.35; }.form-field input, .form-field select { height: 44px; padding: 0 12px; }.form-field textarea { padding: 12px; resize: vertical; }
.form-message { margin-bottom: 11px; padding: 10px 12px; border-radius: 13px; font-size: calc(10px * var(--text-scale)); font-weight: 800; line-height: 1.35; }.form-message.error { background: #f8e5e2; color: #9c5149; }.form-message.success { background: #e2f4ed; color: #2f745f; }
.full-submit { width: 100%; margin-top: 14px; }.full-submit:disabled { cursor: wait; opacity: .7; }

/* Mobile-5 UI Polish Foundation: ATHRA premium dark / gold layer. */
html { background: var(--color-bg); }
body {
  background:
    radial-gradient(circle at 50% -120px, rgba(var(--accent-rgb),  .22), transparent 36%),
    radial-gradient(circle at 16% 12%, rgba(122, 216, 167, .08), transparent 28%),
    linear-gradient(180deg, #050607 0%, #0b0f12 100%);
  color: var(--color-text);
}

button,
input,
textarea {
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease, opacity .18s ease, transform .18s ease;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[data-route]:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

button:active { transform: translateY(1px); }
button:disabled { transform: none; }

.app-shell {
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb),  .08) 0, transparent 190px),
    var(--canvas);
  border-right: 1px solid rgba(255,255,255,.06);
  border-left: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 0 80px rgba(0,0,0,.52), 0 0 0 1px rgba(var(--accent-rgb), .08);
}

.screen {
  padding-right: var(--space-5);
  padding-left: var(--space-5);
  background: transparent;
}

.screen-header,
.dashboard-header {
  margin-bottom: var(--space-5);
}

.screen-header h1,
.dashboard-header h1 {
  color: var(--color-text);
  font-size: var(--font-size-title);
}

.screen-header p:not(.eyebrow),
.dashboard-header p,
.client-identity p,
.detail-section p,
.next-training-card .grow span,
.client-card .grow span,
.client-card .grow small,
.setting-row small,
.info-row span,
.timeline-list span:not(.status-badge),
.payment-list small {
  color: var(--color-text-muted);
}

.eyebrow,
.settings-group h2,
.section-heading button,
.section-heading > span {
  color: rgba(var(--accent-rgb),  .78);
}

.bottom-nav {
  border-top: 1px solid var(--color-border);
  background: rgba(12, 16, 18, .88);
  box-shadow: 0 -18px 36px rgba(0,0,0,.26);
}

.nav-item {
  min-height: 48px;
  color: rgba(247, 241, 230, .58);
}

.nav-item:hover {
  background: rgba(255,255,255,.04);
  color: var(--color-text);
}

.nav-item.active {
  color: var(--color-accent);
}

.nav-item.active span {
  background: var(--color-accent-soft);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .22);
}

.dashboard-screen {
  background:
    radial-gradient(circle at 20% 0%, rgba(var(--accent-rgb), .12), transparent 34%),
    transparent;
}

/* Mobile-9 Dashboard Screen */
.dashboard-command-center {
  background:
    radial-gradient(circle at 50% -90px, rgba(var(--accent-rgb), .14), transparent 38%),
    transparent;
}

.dashboard-command-header {
  align-items: center;
}

.dashboard-command-header h1 {
  margin-top: var(--space-2);
}

.dashboard-command-header small {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--font-size-sm);
}

.dashboard-hero-card {
  position: relative;
  overflow: hidden;
}

.dashboard-hero-card::after {
  position: absolute;
  right: -54px;
  bottom: -78px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(var(--accent-rgb), .18);
  border-radius: 50%;
  content: "";
}

.dashboard-schedule-preview {
  margin-top: var(--space-2);
}

.dashboard-training-preview {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 62px;
  padding: var(--space-3);
}

.dashboard-training-preview time {
  min-width: 46px;
  color: var(--text-accent);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
}

.dashboard-training-preview strong,
.dashboard-training-preview small {
  display: block;
}

.dashboard-training-preview small {
  margin-top: var(--space-1);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

.quick-actions .athra-button {
  min-height: 72px;
  align-items: center;
}

.hero-card,
.detail-balance-card,
.income-hero,
.week-overview,
.trainer-profile {
  border: 1px solid rgba(var(--accent-rgb), .22);
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), .12), transparent 42%),
    linear-gradient(135deg, #12191d, #1d292e);
  box-shadow: var(--shadow-card);
}

.hero-card p,
.hero-card span,
.hero-ring small,
.detail-balance-card > span,
.detail-balance-card > small,
.income-hero > span,
.income-hero > small,
.week-overview span,
.trainer-profile small {
  color: rgba(247, 241, 230, .64);
}

.hero-ring {
  border-color: rgba(255,255,255,.12);
  border-top-color: var(--color-accent);
  background: rgba(255,255,255,.04);
}

.metric-card,
.next-training-card,
.client-card,
.detail-section,
.tab-content .three-columns article,
.schedule-summary,
.training-card,
.day-group article,
.chart-card,
.setting-row,
.progress-hero,
.action-panel {
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)), var(--color-surface);
  box-shadow: var(--shadow-soft);
  color: var(--color-text);
}

.metric-card,
.client-card,
.training-card,
.day-group article,
.setting-row,
.quick-actions button,
.attention-list button {
  min-height: 56px;
}

.metric-card:hover,
.client-card:hover,
.next-training-card:hover,
.training-card:hover,
.day-group article:hover,
.setting-row:hover,
.quick-actions button:hover,
.attention-list button:hover {
  border-color: rgba(var(--accent-rgb), .34);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), .055), rgba(255,255,255,.018)), var(--color-surface-2);
}

.metric-icon,
.setting-icon,
.payment-icon,
.date-strip button.active,
.profile-button,
.brand-mark.small {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .18);
}

.tone-mint .metric-icon { background: rgba(122,216,167,.16); color: var(--color-success); }
.tone-lime .metric-icon { background: var(--color-accent-soft); color: var(--color-accent); }
.tone-gold .metric-icon { background: var(--color-accent-soft); color: var(--color-accent); }
.tone-peach .metric-icon { background: rgba(239,127,115,.16); color: var(--color-danger); }
.tone-blue .metric-icon { background: rgba(126,158,220,.16); color: #9bb5f3; }

.primary-button {
  min-height: 52px;
  background: linear-gradient(135deg, var(--accent-light), var(--color-accent));
  color: #17110a;
  box-shadow: 0 16px 32px rgba(var(--accent-rgb),  .18);
}

.primary-button:hover:not(:disabled),
.header-action:hover,
.secondary-button:hover,
.ghost-auth-button:hover {
  box-shadow: 0 18px 38px rgba(var(--accent-rgb),  .22);
}

.secondary-button,
.header-action,
.ghost-auth-button,
.training-actions button,
.balance-actions button,
.quick-actions button,
.chip,
.period-tabs button,
.schedule-switch button,
.date-strip button,
.icon-button {
  min-height: 40px;
  border: 1px solid var(--color-border);
  background: rgba(255,255,255,.035);
  color: var(--color-text);
}

.header-action,
.chip.active,
.period-tabs button.active,
.schedule-switch button.active,
.date-strip button.active {
  border-color: rgba(var(--accent-rgb), .38);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.icon-button,
.profile-button {
  color: var(--color-accent);
}

.search-field,
.form-field input,
.form-field textarea {
  border-color: var(--color-border);
  background: rgba(255,255,255,.045);
  color: var(--color-text);
}

.search-field:focus-within,
.form-field:focus-within input,
.form-field:focus-within textarea,
.auth-form .form-field:focus-within input {
  border-color: rgba(var(--accent-rgb), .56);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .10);
}

.form-field span,
.search-field span {
  color: rgba(var(--accent-rgb), .78);
}

.form-field input::placeholder,
.form-field textarea::placeholder,
.search-field input::placeholder {
  color: rgba(247,241,230,.34);
}

.auth-screen {
  background:
    radial-gradient(circle at 82% 4%, rgba(var(--accent-rgb), .18), transparent 34%),
    linear-gradient(155deg, #060809 0%, #10171a 52%, #172228 100%);
}

/* Mobile-9 Auth Screen */
.auth-brand-block {
  position: relative;
  z-index: var(--z-base);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.auth-brand-block strong {
  display: block;
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-login-card {
  border-radius: var(--radius-xl);
}

.auth-debug-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding-top: var(--space-1);
}

.auth-beta-note {
  color: var(--text-secondary);
  line-height: var(--line-height-normal);
  text-align: left;
}

.token-auth-screen .auth-panel-title strong {
  color: var(--text-primary);
  font-size: calc(22px * var(--text-scale));
}

.token-auth-screen .auth-panel-title small {
  color: var(--text-secondary);
}

.auth-panel {
  padding: var(--space-4);
  border: 1px solid rgba(var(--accent-rgb), .20);
  border-radius: var(--radius-xl);
  background: rgba(12, 16, 18, .58);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
}

.auth-trainer-card,
.role-pill {
  border-color: rgba(var(--accent-rgb), .16);
  background: rgba(255,255,255,.055);
}

.role-pill span,
.auth-copy h1 em,
.dashboard-header h1 span,
.income-hero small i,
.insight-card > span {
  color: var(--color-accent);
}

.client-balance span,
.status-planned,
.status-completed,
.payment-icon.positive,
.form-message.success {
  background: rgba(122,216,167,.14);
  color: var(--color-success);
}

.client-balance.low span,
.status-cancelled,
.payment-icon.negative,
.form-message.error,
.auth-message.error {
  background: rgba(239,127,115,.14);
  color: var(--color-danger);
}

.status-warning {
  background: rgba(244,199,111,.16);
  color: var(--color-warning);
}

.status-rescheduled {
  background: rgba(126,158,220,.16);
  color: #9bb5f3;
}

.status-badge {
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.06);
  color: rgba(247,241,230,.74);
}

.detail-tabs {
  border-bottom-color: var(--color-border);
}

.detail-tabs button {
  min-height: 40px;
  color: rgba(247,241,230,.56);
}

.detail-tabs button.active {
  color: var(--color-accent);
}

.detail-tabs button.active::after,
.progress-track i,
.loading-screen > i::after,
.sparkline i:nth-last-child(-n+2),
.horizontal-bars i.accent {
  background: var(--color-accent);
}

.balance-actions button:first-child,
.sparkline i,
.insight-card {
  background: var(--color-accent-soft);
}

.attention-list button {
  border-color: rgba(244,199,111,.18);
  background: rgba(244,199,111,.07);
}

.attention-list small,
.attention-list b,
.insight-card p {
  color: rgba(247,241,230,.62);
}

.schedule-switch,
.period-tabs,
.date-strip button,
.floating-count,
.loading-screen > i,
.toggle {
  background: rgba(255,255,255,.055);
}

.schedule-summary span,
.schedule-summary b,
.day-group > header strong,
.day-group time,
.day-group .grow > strong,
.horizontal-bars b,
.horizontal-bars span,
.chart-card .section-heading h2 {
  color: var(--color-text);
}

.timeline-marker::before {
  border-color: var(--color-accent);
  background: var(--canvas);
}

.timeline-marker::after,
.vertical-line,
.info-row,
.timeline-list article,
.payment-list article,
.day-group article {
  border-color: var(--color-border);
}

.action-backdrop {
  background: rgba(0, 0, 0, .58);
  backdrop-filter: blur(7px);
}

.action-panel {
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border-bottom: 0;
}

.toast {
  border: 1px solid rgba(var(--accent-rgb), .18);
  background: rgba(16,21,24,.94);
  box-shadow: var(--shadow-card);
}

.empty-state,
.fatal-state,
.loading-screen {
  color: var(--color-text);
}

.empty-state p,
.fatal-state p,
.loading-screen p {
  color: var(--color-text-muted);
}

.logout-button {
  border: 1px solid rgba(239,127,115,.24);
  background: rgba(239,127,115,.12);
  color: var(--color-danger);
}

/* Mobile-10 Clients + Client Profile Screens */
.clients-command-center,
.client-profile-screen {
  background:
    radial-gradient(circle at 50% -80px, rgba(var(--accent-rgb), .13), transparent 34%),
    transparent;
}

.clients-summary-grid {
  margin-bottom: var(--space-4);
}

.clients-search-panel {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-xl);
}

.clients-search {
  height: 50px;
  border-radius: var(--radius-lg);
}

.client-filter-chips {
  margin: 0;
  padding-bottom: 1px;
}

.client-filter-chips .athra-button {
  min-height: 38px;
  padding: 0 var(--space-3);
}

.client-list-premium {
  margin-top: var(--space-4);
  gap: var(--space-3);
}

.premium-client-card {
  position: relative;
  overflow: hidden;
  align-items: flex-start;
  border-radius: var(--radius-xl);
}

.premium-client-card::after {
  position: absolute;
  right: -45px;
  bottom: -54px;
  width: 124px;
  height: 124px;
  border: 1px solid rgba(var(--accent-rgb), .12);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.premium-client-card .avatar {
  flex: 0 0 auto;
}

.client-card__main {
  display: grid;
  gap: var(--space-2);
}

.client-card__header,
.client-card__meta,
.client-card__stats {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.client-card__header {
  justify-content: space-between;
}

.client-card__header strong {
  color: var(--text-primary);
  font-size: var(--font-size-md);
  line-height: var(--line-height-tight);
}

.client-card__meta {
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

.client-card-shortcuts {
  position: relative;
  z-index: var(--z-base);
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: var(--space-2);
  margin-top: var(--space-1);
  min-width: 0;
}

.client-card-shortcut {
  flex: 1 1 72px;
  min-width: 0;
  min-height: var(--touch-target-min);
  padding: 0 var(--space-2);
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.client-card-shortcut:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), .72);
  outline-offset: 2px;
}

.client-card-shortcut:active {
  transform: translateY(1px) scale(.99);
}

.client-card-main-action {
  border-color: rgba(var(--accent-rgb), .26);
}

.client-card-danger-action {
  border-color: rgba(239,127,115,.30);
  background: rgba(239,127,115,.10);
}

.premium-client-card small {
  max-width: none;
  color: var(--text-tertiary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  white-space: normal;
}

.client-card__stats {
  z-index: var(--z-base);
  align-self: stretch;
  justify-content: flex-end;
  margin-left: auto;
}

.premium-client-card .client-balance strong {
  color: var(--text-accent);
  font-size: var(--font-size-md);
}

.premium-client-card .client-balance span {
  border: 1px solid rgba(122,216,167,.16);
}

.premium-client-card .client-balance.low span {
  border-color: rgba(239,127,115,.22);
}

.client-status-badge {
  flex: 0 0 auto;
}

.clients-attention-count {
  border: 1px solid rgba(244,199,111,.18);
  color: var(--text-secondary);
}

.clients-attention-count span {
  color: var(--color-warning);
}

.client-empty-actions {
  display: flex;
  justify-content: center;
  margin-top: var(--space-4);
}

.client-profile-hero {
  position: relative;
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  margin-top: 0;
  padding: var(--space-5);
  overflow: hidden;
  border-radius: var(--radius-xl);
  text-align: center;
}

.client-profile-hero::after {
  position: absolute;
  top: -76px;
  right: -72px;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(var(--accent-rgb), .15);
  border-radius: 50%;
  content: "";
}

.client-profile-hero .avatar {
  border-color: rgba(var(--accent-rgb), .24);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .20), var(--shadow-soft);
}

.client-profile-headline {
  position: relative;
  z-index: var(--z-base);
  display: grid;
  gap: var(--space-2);
}

.client-profile-headline h2 {
  color: var(--text-primary);
  font-size: calc(26px * var(--text-scale));
}

.client-profile-headline p {
  color: var(--text-secondary);
  font-size: var(--font-size-body);
  line-height: var(--line-height-normal);
}

.client-profile-facts {
  position: relative;
  z-index: var(--z-base);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

.client-profile-facts > span:not(.athra-badge) {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: var(--space-1) var(--space-2);
  background: rgba(255,255,255,.045);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.client-profile-tabs {
  margin-top: var(--space-5);
}

.client-kpi-grid {
  margin-top: 0;
}

.client-action-card {
  display: grid;
  gap: var(--space-2);
}

.client-action-card > strong {
  font-size: calc(24px * var(--text-scale));
}

.client-primary-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.client-primary-actions .athra-button {
  min-height: 48px;
  padding: 0 var(--space-2);
  font-size: var(--font-size-sm);
}

.client-info-card,
.client-note-card,
.client-ledger-section {
  border-radius: var(--radius-xl);
}

.client-info-card .athra-card__header {
  align-items: flex-start;
  margin-bottom: var(--space-3);
}

.client-info-card h3,
.client-note-card h3,
.client-ledger-header h3 {
  color: var(--text-primary);
  font-size: var(--font-size-section);
}

.client-info-grid {
  display: grid;
  gap: var(--space-1);
}

.client-info-grid .info-row {
  border-top: 1px solid var(--border-soft);
}

.client-note-card p {
  color: var(--text-secondary);
  font-size: var(--font-size-body);
  line-height: var(--line-height-relaxed);
}

.client-ledger-section {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-4);
}

.client-ledger-header {
  margin-bottom: 0;
}

.client-training-list,
.client-payment-list {
  display: grid;
  gap: var(--space-2);
}

.timeline-list .client-training-row,
.payment-list .client-payment-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.035);
}

.timeline-list .client-training-row:last-child,
.payment-list .client-payment-row:last-child {
  border-bottom: 1px solid var(--border-soft);
}

.client-training-date,
.client-payment-row .grow {
  min-width: 0;
}

.client-training-date strong,
.client-payment-row strong {
  display: block;
  color: var(--text-primary);
  font-size: var(--font-size-body);
}

.client-training-date span,
.client-payment-row small {
  display: block;
  margin-top: var(--space-1);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

.client-training-status {
  justify-self: end;
}

.client-training-row .training-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.client-training-row .training-actions .athra-button {
  min-height: 42px;
  padding: 0 var(--space-2);
  font-size: var(--font-size-xs);
}

.client-payment-row {
  grid-template-columns: auto 1fr auto;
}

.payment-amount {
  color: var(--text-danger);
  font-size: var(--font-size-body);
}

.payment-amount.success-text {
  color: var(--text-success) !important;
}

.danger-text {
  color: var(--text-danger);
}

.client-comment-list article {
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,.035);
}

/* Mobile-27 Client Profile Polish */
.client-profile-screen {
  overflow-x: hidden;
  padding-bottom: calc(116px + env(safe-area-inset-bottom));
  color: var(--text-primary);
}

.client-profile-screen,
.client-profile-screen * {
  box-sizing: border-box;
}

.client-profile-back {
  width: fit-content;
  min-height: 40px;
  margin: calc(var(--space-2) * -1) 0 var(--space-3);
  padding: 0 var(--space-3);
  border: 1px solid rgba(var(--accent-rgb), .24);
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.035);
  color: var(--color-accent);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.client-profile-back:focus-visible,
.client-profile-screen button:focus-visible,
.client-profile-screen a:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), .72);
  outline-offset: 3px;
}

.client-profile-hero {
  align-items: center;
  justify-items: center;
  gap: var(--space-4);
  width: 100%;
  max-width: 100%;
  padding: 28px 20px 22px;
  border: 1px solid rgba(var(--accent-rgb), .26);
  background:
    radial-gradient(circle at 50% -70px, rgba(var(--accent-rgb), .28), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,.050), rgba(255,255,255,.018)),
    var(--surface-panel);
  box-shadow: var(--shadow-card);
}

.client-profile-hero::before {
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), .14), transparent 36%, rgba(122,216,167,.05));
  content: "";
  pointer-events: none;
}

.client-profile-hero::after {
  border-color: rgba(var(--accent-rgb), .18);
}

.client-profile-avatar {
  position: relative;
  z-index: var(--z-base);
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), .44);
  border-radius: 30px;
  background:
    radial-gradient(circle at 35% 22%, rgba(247,241,230,.20), transparent 28%),
    linear-gradient(145deg, rgba(var(--accent-rgb), .22), rgba(255,255,255,.035)),
    #11181c;
  color: var(--color-accent);
  box-shadow: 0 18px 44px rgba(0,0,0,.36), inset 0 1px rgba(247,241,230,.16);
}

.client-profile-avatar span {
  color: #f7f1e6;
  font-size: calc(30px * var(--text-scale));
  font-weight: var(--font-weight-bold);
  letter-spacing: .04em;
  line-height: 1;
}

.client-profile-eyebrow {
  color: rgba(var(--accent-rgb), .76);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.client-profile-headline {
  width: 100%;
  max-width: 100%;
  text-align: center;
}

.client-profile-headline h1,
.client-profile-headline h2 {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--text-primary);
  font-size: clamp(28px, 8vw, 38px);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: -.055em;
}

.client-profile-facts {
  width: 100%;
  max-width: 100%;
}

.client-profile-facts > span:not(.athra-badge),
.client-status-badge--premium {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: var(--space-1);
}

.client-profile-facts > span:not(.athra-badge) {
  max-width: 100%;
}

.client-profile-id {
  color: var(--text-tertiary) !important;
}

.client-status-badge--premium {
  border-color: rgba(var(--accent-rgb), .28);
  background: rgba(var(--accent-rgb), .10);
  color: var(--color-accent);
}

.client-status-badge--premium.is-active {
  border-color: rgba(122,216,167,.28);
  background: rgba(122,216,167,.12);
  color: var(--color-success);
}

.client-status-badge--premium.is-warning {
  border-color: rgba(244,199,111,.28);
  background: rgba(244,199,111,.12);
  color: var(--color-warning);
}

.client-status-badge--premium.is-muted {
  border-color: var(--border-soft);
  background: rgba(255,255,255,.045);
  color: var(--text-secondary);
}

.client-profile-edit-ghost {
  position: relative;
  z-index: var(--z-base);
  width: 100%;
  max-width: 280px;
  min-height: 46px;
  justify-content: center;
  gap: var(--space-2);
  border-style: dashed;
  opacity: .78;
}

.client-profile-edit-ghost:disabled,
.client-secondary-action--disabled:disabled {
  cursor: not-allowed;
  opacity: .72;
}

.athra-profile-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}

.client-profile-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  width: 100%;
  max-width: 100%;
}

.client-profile-metric {
  display: grid;
  container-type: inline-size;
  min-width: 0;
  min-height: 144px;
  align-content: space-between;
  gap: var(--space-2);
  padding: var(--space-4);
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), .18);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.016)),
    var(--color-surface);
}

.client-profile-metric:nth-child(3) {
  grid-column: 1 / -1;
}

.client-profile-metric__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), .22);
  border-radius: var(--radius-md);
  background: rgba(var(--accent-rgb), .10);
  color: var(--color-accent);
}

.client-profile-metric small {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* mobile-37: an amount never breaks across lines ("123 4 / 56 ₴"). The size follows
   the tile width (container query units); older browsers keep the vw size and cut
   with an ellipsis instead of wrapping. */
.client-profile-metric strong {
  color: var(--text-primary);
  font-size: clamp(22px, 7vw, 30px);
  line-height: var(--line-height-tight);
  letter-spacing: -.045em;
  white-space: nowrap;
  overflow-wrap: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-profile-metric--money strong {
  font-size: clamp(15px, 20cqi, 30px);
}

.client-profile-metric em {
  color: var(--text-tertiary);
  font-size: var(--font-size-sm);
  font-style: normal;
  line-height: var(--line-height-normal);
}

.client-profile-metric.tone-success .client-profile-metric__icon {
  border-color: rgba(122,216,167,.24);
  background: rgba(122,216,167,.12);
  color: var(--color-success);
}

.client-profile-metric.tone-warning .client-profile-metric__icon {
  border-color: rgba(244,199,111,.26);
  background: rgba(244,199,111,.12);
  color: var(--color-warning);
}

.client-profile-metric.tone-danger .client-profile-metric__icon {
  border-color: rgba(239,127,115,.26);
  background: rgba(239,127,115,.12);
  color: var(--color-danger);
}

.client-actions-panel {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid rgba(var(--accent-rgb), .22);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 100% 0, rgba(var(--accent-rgb), .12), transparent 32%),
    rgba(16,21,24,.92);
}

.client-actions-panel__header {
  display: grid;
  gap: var(--space-1);
}

.client-actions-panel__header span {
  color: rgba(var(--accent-rgb), .78);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: .10em;
  text-transform: uppercase;
}

.client-actions-panel__header strong {
  color: var(--text-primary);
  font-size: var(--font-size-lg);
  line-height: var(--line-height-tight);
}

.client-actions-panel__header small {
  color: var(--text-secondary);
}

.client-primary-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.client-action-button {
  min-height: 58px;
  justify-content: center;
  gap: var(--space-2);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-md);
}

.client-action-button--payment {
  border-color: rgba(122,216,167,.30);
  background:
    linear-gradient(180deg, rgba(122,216,167,.14), rgba(255,255,255,.035)),
    rgba(16,21,24,.94);
  color: var(--text-primary);
}

.client-secondary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.client-secondary-action {
  min-width: 0;
  min-height: 50px;
  justify-content: center;
  gap: var(--space-2);
  padding: 0 var(--space-2);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  line-height: 1.15;
  white-space: normal;
}

.client-secondary-action--disabled {
  grid-column: 1 / -1;
  border-style: dashed;
}

.client-info-card,
.client-note-card,
.client-edit-limitation {
  padding: var(--space-4);
  border: 1px solid rgba(var(--accent-rgb), .18);
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.014)),
    var(--color-surface);
}

.client-info-grid {
  gap: 0;
}

.client-info-row {
  display: grid;
  grid-template-columns: 28px minmax(88px, .78fr) minmax(0, 1.22fr);
  gap: var(--space-2);
  align-items: center;
  min-width: 0;
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border-soft);
}

.client-info-row:first-child {
  border-top: 0;
}

.client-info-row__icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: var(--radius-sm);
  background: rgba(var(--accent-rgb), .08);
  color: var(--color-accent);
}

.client-info-row__icon .athra-profile-icon {
  width: 17px;
  height: 17px;
}

.client-info-row > span:not(.client-info-row__icon) {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

.client-info-row strong,
.client-info-row a {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text-primary);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-bold);
  text-decoration: none;
}

.client-info-row a {
  color: var(--color-accent);
}

.client-info-row--subtle strong {
  color: var(--text-tertiary);
  font-size: var(--font-size-sm);
}

.client-note-card {
  display: grid;
  gap: var(--space-3);
}

.client-note-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-accent);
}

.client-note-card__header h3 {
  margin: 0;
}

.client-edit-limitation {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: flex-start;
  border-style: dashed;
  color: var(--text-secondary);
}

.client-edit-limitation > .athra-profile-icon {
  width: 38px;
  height: 38px;
  padding: 9px;
  border: 1px solid rgba(var(--accent-rgb), .18);
  border-radius: var(--radius-md);
  color: var(--color-accent);
}

.client-edit-limitation strong {
  display: block;
  color: var(--text-primary);
  font-size: var(--font-size-body);
}

.client-edit-limitation p {
  margin-top: var(--space-1);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.client-training-actions .athra-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
}

.client-training-actions .athra-profile-icon {
  width: 16px;
  height: 16px;
}

@media (min-width: 390px) {
  .client-profile-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .client-profile-metric:nth-child(3) {
    grid-column: auto;
  }

  .client-profile-metric {
    min-height: 136px;
  }
}

@media (max-width: 360px) {
  .client-profile-hero {
    padding-inline: var(--space-4);
  }

  .client-profile-avatar {
    width: 82px;
    height: 82px;
    border-radius: 26px;
  }

  .client-info-row {
    grid-template-columns: 24px minmax(76px, .75fr) minmax(0, 1.25fr);
    gap: var(--space-1);
  }

  .client-secondary-actions {
    grid-template-columns: 1fr;
  }
}

/* Mobile-11 Schedule + Calendar Screens */
.schedule-command-center,
.week-calendar-screen {
  background:
    radial-gradient(circle at 50% -84px, rgba(var(--accent-rgb), .14), transparent 36%),
    transparent;
}

.schedule-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  width: 100%;
  max-width: 100%;
  overflow: visible;
  padding: var(--space-1);
  border-radius: var(--radius-lg);
  scrollbar-width: none;
}

.schedule-mode-switch::-webkit-scrollbar {
  display: none;
}

.schedule-mode-switch .athra-button {
  min-width: 0;
  min-height: 44px;
  padding-inline: var(--space-2);
  white-space: normal;
}

.schedule-period-switch .athra-button[aria-current="true"] {
  border-color: rgba(var(--accent-rgb), .48);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.schedule-screen {
  overflow-x: hidden;
  padding-bottom: calc(var(--bottom-nav-height, 88px) + 64px + env(safe-area-inset-bottom));
  scroll-padding-bottom: calc(var(--bottom-nav-height, 88px) + 64px + env(safe-area-inset-bottom));
}

.schedule-screen,
.schedule-screen * {
  box-sizing: border-box;
}

.schedule-context-back {
  width: fit-content;
  min-height: 40px;
  margin: calc(var(--space-2) * -1) 0 var(--space-3);
  border-color: rgba(var(--accent-rgb), .28);
  color: var(--color-accent);
}

.schedule-navigation {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px auto;
  gap: var(--space-2);
  align-items: center;
  margin-top: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-xl);
}

.schedule-nav-button {
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  font-size: calc(24px * var(--text-scale));
  line-height: 1;
}

.schedule-active-period {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
  text-align: center;
}

.schedule-active-period span {
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.schedule-active-period strong {
  overflow: hidden;
  color: var(--text-primary);
  font-size: var(--font-size-md);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-today-button {
  min-height: 44px;
}

.schedule-today-button.active {
  border-color: rgba(var(--accent-rgb), .45);
  color: var(--color-accent);
}

.schedule-calendar-strip {
  gap: var(--space-2);
  margin: var(--space-4) 0;
}

.schedule-calendar-strip .athra-button {
  min-height: 62px;
  border-radius: var(--radius-lg);
}

.schedule-calendar-strip button small,
.schedule-calendar-strip button strong {
  display: block;
}

.schedule-calendar-strip button small {
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.schedule-calendar-strip button strong {
  color: var(--text-primary);
  font-size: var(--font-size-md);
}

.schedule-calendar-strip button.active small,
.schedule-calendar-strip button.active strong {
  color: var(--color-accent);
}

.schedule-metrics-grid {
  margin: var(--space-4) 0;
}

.schedule-status-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius-xl);
}

.schedule-status-summary span {
  display: grid;
  gap: var(--space-1);
  justify-items: center;
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  text-align: center;
}

.schedule-status-summary b {
  color: var(--text-primary);
  font-size: var(--font-size-md);
}

.schedule-timeline {
  gap: var(--space-3);
}

.schedule-timeline .schedule-training-row {
  grid-template-columns: 52px 14px 1fr;
  gap: var(--space-2);
}

.schedule-time-anchor {
  padding-top: var(--space-4);
  color: var(--text-accent);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  letter-spacing: -.02em;
}

.schedule-timeline-marker::before {
  top: 24px;
  left: 2px;
  width: 8px;
  height: 8px;
  border-color: rgba(var(--accent-rgb), .88);
  background: var(--color-bg);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .10);
}

.schedule-timeline-marker::after {
  top: 36px;
  left: 6px;
  background: rgba(var(--accent-rgb), .18);
}

.schedule-training-card {
  position: relative;
  display: grid;
  gap: var(--space-3);
  margin-bottom: 0;
  padding: var(--space-4);
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.schedule-training-card::after {
  position: absolute;
  right: -42px;
  bottom: -54px;
  width: 124px;
  height: 124px;
  border: 1px solid rgba(var(--accent-rgb), .10);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.schedule-training-card__header {
  position: relative;
  z-index: var(--z-base);
  align-items: center;
  gap: var(--space-3);
}

.schedule-training-card__header .grow strong {
  color: var(--text-primary);
  font-size: var(--font-size-md);
}

.schedule-training-card__header .grow span {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.schedule-training-card__header .status-badge {
  flex: 0 0 auto;
  margin-top: 0;
  margin-left: auto;
}

.schedule-training-card__actions {
  position: relative;
  z-index: var(--z-base);
}

.schedule-training-card__actions:empty {
  display: none;
}

.schedule-training-card__actions .training-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  margin-top: 0;
}

.schedule-training-card__actions .athra-button {
  min-height: 42px;
  padding: 0 var(--space-2);
  font-size: var(--font-size-xs);
}

.schedule-training-card__actions [data-action="late-cancel-training"] {
  border-color: rgba(244,199,111,.28);
  background: rgba(244,199,111,.12);
  color: var(--color-warning);
}

.week-calendar-overview {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin: var(--space-4) 0;
  padding: 0;
  border-radius: 0;
}

.week-calendar-groups {
  margin-top: var(--space-4);
}

.schedule-week-list {
  grid-template-columns: 1fr;
  max-width: 100%;
}

.schedule-day-empty {
  padding: var(--space-3);
  border: 1px dashed rgba(255,255,255,.10);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

.schedule-month-view,
.schedule-custom-view {
  margin-top: var(--space-4);
}

.schedule-month-weekdays,
.schedule-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--space-1);
}

.schedule-month-weekdays {
  margin-bottom: var(--space-2);
  color: rgba(var(--accent-rgb), .74);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-align: center;
  text-transform: uppercase;
}

.schedule-month-grid {
  padding: var(--space-2);
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), .16);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 50% -60px, rgba(var(--accent-rgb), .10), transparent 36%),
    rgba(255,255,255,.025);
}

.schedule-month-day {
  display: grid;
  min-width: 0;
  min-height: 48px;
  place-items: center;
  gap: 2px;
  overflow: hidden;
  padding: var(--space-1);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.025);
  color: var(--text-primary);
}

.schedule-month-day span {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.schedule-month-day b {
  max-width: 100%;
  min-width: 18px;
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: calc(10px * var(--text-scale));
}

.schedule-month-day i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: transparent;
}

.schedule-month-day.is-outside {
  opacity: .36;
}

.schedule-month-day.is-today {
  border-color: rgba(122,216,167,.42);
}

.schedule-month-day.is-selected {
  border-color: rgba(var(--accent-rgb), .58);
  background: rgba(var(--accent-rgb), .13);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .10), 0 14px 32px rgba(0,0,0,.22);
}

.schedule-month-selected {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-xl);
}

.schedule-month-selected header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.schedule-period-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-panel);
  background: rgba(0,0,0,.52);
  backdrop-filter: blur(8px);
}

.schedule-period-panel {
  position: fixed;
  right: var(--space-3);
  bottom: calc(var(--bottom-nav-height, 88px) + var(--space-3) + env(safe-area-inset-bottom));
  left: var(--space-3);
  z-index: var(--z-modal);
  display: grid;
  gap: var(--space-4);
  max-height: min(78dvh, 620px);
  overflow-y: auto;
  padding: var(--space-4);
  border: 1px solid rgba(var(--accent-rgb), .24);
  border-radius: var(--radius-2xl);
  background:
    radial-gradient(circle at 50% -80px, rgba(var(--accent-rgb), .14), transparent 34%),
    var(--surface-panel);
  box-shadow: var(--shadow-panel);
}

.schedule-period-panel header,
.schedule-period-panel footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.schedule-period-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.schedule-period-fields label {
  display: grid;
  gap: var(--space-2);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

.schedule-date-input {
  min-height: 48px;
  font-size: calc(16px * var(--text-scale));
}

.schedule-period-error {
  padding: var(--space-3);
  border-radius: var(--radius-lg);
}

@media (max-width: 430px) {
  .schedule-navigation {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }

  .schedule-today-button {
    grid-column: 1 / -1;
  }

  .schedule-period-fields {
    grid-template-columns: 1fr;
  }

  .schedule-month-day {
    min-height: 42px;
  }
}

@media (min-width: 400px) {
  .schedule-mode-switch {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.week-day-section {
  display: grid;
  min-width: 0;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-xl);
}

.week-day-summary-card {
  width: 100%;
  border: 1px solid rgba(var(--accent-rgb), .14);
  background:
    radial-gradient(circle at 100% -42px, rgba(var(--accent-rgb), .12), transparent 38%),
    rgba(255,255,255,.035);
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.week-day-summary-card:hover,
.week-day-summary-card:focus-visible {
  border-color: rgba(var(--accent-rgb), .38);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .10), 0 18px 38px rgba(0,0,0,.18);
  outline: none;
}

.week-day-summary-header {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.week-day-summary-header > div {
  min-width: 0;
}

.week-day-summary-header strong {
  display: block;
  color: var(--text-primary);
  font-size: var(--font-size-section);
  line-height: var(--line-height-tight);
}

.week-day-summary-header small {
  display: block;
  margin-top: var(--space-1);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.week-day-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
  margin: 0;
}

.week-day-stat {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
  padding: var(--space-2);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.035);
}

.week-day-stat dt {
  overflow-wrap: anywhere;
  color: var(--text-secondary);
  font-size: calc(10px * var(--text-scale));
  font-weight: var(--font-weight-semibold);
}

.week-day-stat dd {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
}

.week-day-availability {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.week-day-action {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: var(--space-1);
  color: var(--color-accent);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.week-day-header {
  align-items: flex-start;
  padding: 0;
}

.week-day-select {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.week-day-header strong {
  display: block;
  color: var(--text-primary);
  font-size: var(--font-size-section);
}

.week-day-header small {
  display: block;
  margin-top: var(--space-1);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

.week-day-trainings {
  gap: var(--space-3);
}

.week-day-trainings .schedule-training-row {
  grid-template-columns: 48px 12px 1fr;
}

.week-day-trainings .schedule-training-card {
  padding: var(--space-3);
  border-radius: var(--radius-lg);
}

.schedule-empty-actions {
  display: flex;
  justify-content: center;
  margin-top: var(--space-4);
}

@media (max-width: 360px) {
  .week-day-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-status-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile-12 Finance + Statistics + Settings UI */
.finance-card {
  position: relative;
  overflow: hidden;
}

.finance-card::after {
  position: absolute;
  right: -52px;
  bottom: -68px;
  width: 148px;
  height: 148px;
  border: 1px solid rgba(var(--accent-rgb), .10);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.finance-value {
  color: var(--text-accent);
  font-weight: var(--font-weight-bold);
  letter-spacing: -.03em;
  white-space: nowrap;
}

.finance-value--positive {
  color: var(--text-success) !important;
}

.finance-value--negative {
  color: var(--text-danger) !important;
}

.finance-ledger-row {
  position: relative;
  overflow: hidden;
}

.finance-ledger-row .payment-icon {
  flex: 0 0 auto;
}

.finance-ledger-row .finance-value {
  position: relative;
  z-index: var(--z-base);
  white-space: nowrap;
}

.finance-empty-actions {
  display: flex;
  justify-content: center;
  margin-top: var(--space-4);
}

.analytics-screen {
  background:
    radial-gradient(circle at 50% -90px, rgba(var(--accent-rgb), .14), transparent 36%),
    transparent;
}

.analytics-period-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
  padding: var(--space-1);
}

.analytics-period-tabs .athra-button {
  min-height: 42px;
}

.analytics-income-card {
  display: grid;
  gap: var(--space-2);
  min-height: 190px;
}

.analytics-income-card > strong {
  position: relative;
  z-index: var(--z-base);
  font-size: calc(36px * var(--text-scale));
}

.analytics-income-card > small {
  position: relative;
  z-index: var(--z-base);
}

.analytics-sparkline {
  z-index: var(--z-base);
}

.analytics-zero-state {
  min-height: auto;
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-xl);
}

.analytics-grid {
  margin-top: var(--space-4);
}

.analytics-chart-card {
  padding: var(--space-4);
  border-radius: var(--radius-xl);
}

.analytics-bars {
  position: relative;
  z-index: var(--z-base);
}

.analytics-bars div {
  grid-template-columns: 70px 1fr 84px;
}

.analytics-insight-card {
  align-items: flex-start;
  border-color: rgba(var(--accent-rgb), .22);
  background: rgba(var(--accent-rgb), .08);
}

.analytics-insight-card em {
  font-style: normal;
}

/* Mobile-28 Finance Module Expansion */
.finance-module-screen {
  overflow-x: hidden;
  padding-bottom: calc(118px + env(safe-area-inset-bottom));
}

.athra-finance-icon {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.finance-period-toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding: var(--space-3);
}

.finance-period-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
}

.finance-period-tabs .athra-button,
.finance-period-stepper .athra-button {
  min-width: 0;
  min-height: var(--touch-target-min);
  padding-inline: var(--space-2);
  white-space: nowrap;
}

.finance-period-disabled {
  cursor: not-allowed;
  opacity: .5;
}

.finance-period-stepper {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px auto;
  align-items: center;
  gap: var(--space-2);
}

.finance-period-stepper strong {
  min-width: 0;
  color: var(--text-primary);
  font-size: var(--font-size-body);
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-overview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finance-overview-grid .metric-card {
  min-width: 0;
}

/* mobile-37: an amount never breaks inside ("987 6 / 54 ₴"). */
.finance-overview-grid .metric-card strong {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.finance-metric-note {
  margin-top: var(--space-1);
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-normal);
}

.finance-quick-actions,
.finance-filter-card,
.finance-journal {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding: var(--space-4);
}

.finance-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.finance-action-grid .athra-button {
  display: grid;
  min-width: 0;
  min-height: 92px;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-2);
  text-align: left;
}

.finance-action-grid .athra-button > span {
  grid-row: span 2;
}

.finance-action-grid strong,
.finance-action-grid small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.finance-action-grid small {
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-normal);
}

.finance-distribution-bars div {
  grid-template-columns: minmax(64px, 82px) minmax(0, 1fr) minmax(76px, 92px);
}

.finance-type-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.finance-type-filters .chip {
  min-height: 40px;
}

.finance-search-field {
  min-width: 0;
  height: auto;
  min-height: 50px;
}

.finance-search-field .athra-finance-icon {
  width: 18px;
  height: 18px;
}

.finance-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.finance-filter-actions .athra-button {
  min-height: 42px;
}

.finance-date-group {
  display: grid;
  gap: var(--space-2);
}

.finance-date-group + .finance-date-group {
  margin-top: var(--space-4);
}

.finance-date-group[hidden],
.finance-transaction-item[hidden],
.finance-filter-empty[hidden] {
  display: none !important;
}

.finance-date-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.finance-date-group h3 {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.finance-date-group header span {
  display: grid;
  min-width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), .14);
  color: var(--text-accent);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
}

.finance-date-group__items {
  display: grid;
  gap: var(--space-2);
}

.finance-transaction-item {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: 38px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-color: rgba(var(--accent-rgb), .12);
  text-align: left;
}

.finance-transaction-item:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), .72);
  outline-offset: 2px;
}

.finance-transaction-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: var(--radius-md);
  background: rgba(var(--accent-rgb), .12);
  color: var(--text-accent);
}

.finance-transaction-item--payment .finance-transaction-icon {
  background: rgba(122,216,167,.13);
  color: var(--text-success);
}

.finance-transaction-main {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.finance-transaction-main strong,
.finance-transaction-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-transaction-main strong {
  color: var(--text-primary);
  font-size: var(--font-size-body);
}

.finance-transaction-main small {
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
}

.finance-transaction-amount {
  max-width: 104px;
  font-size: var(--font-size-sm);
  text-align: right;
  white-space: nowrap;
}

.finance-transaction-chevron {
  color: var(--text-secondary);
}

.finance-transaction-chevron .athra-finance-icon {
  width: 16px;
  height: 16px;
}

.finance-filter-empty {
  min-height: 180px;
  padding: var(--space-4);
}

@media (max-width: 370px) {
  .finance-overview-grid,
  .finance-action-grid {
    grid-template-columns: 1fr;
  }

  .finance-period-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-period-stepper {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }

  .finance-period-stepper [data-action="finance-current-period"] {
    grid-column: 1 / -1;
  }

  .finance-transaction-item {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .finance-transaction-chevron {
    display: none;
  }

  .finance-transaction-amount {
    max-width: 92px;
  }
}

@media (max-width: 414px) {
  .finance-module-screen .screen-header,
  .finance-module-screen .finance-period-toolbar,
  .finance-module-screen .income-hero,
  .finance-module-screen .finance-overview-grid,
  .finance-module-screen .finance-quick-actions,
  .finance-module-screen .finance-filter-card,
  .finance-module-screen .finance-journal,
  .finance-module-screen .analytics-chart-card,
  .finance-module-screen .analytics-insight-card {
    max-width: 100%;
  }

  .finance-period-toolbar,
  .finance-filter-card,
  .finance-journal {
    padding-inline: var(--space-3);
  }

  .finance-action-grid .athra-button {
    grid-template-columns: 24px minmax(0, 1fr);
    min-height: 84px;
  }

  .finance-distribution-bars div {
    grid-template-columns: minmax(56px, 70px) minmax(0, 1fr);
  }

  .finance-distribution-bars b {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .finance-transaction-item {
    gap: var(--space-2);
    padding: var(--space-2);
  }
}

.settings-command-center {
  background:
    radial-gradient(circle at 50% -80px, rgba(var(--accent-rgb), .12), transparent 34%),
    transparent;
}

.settings-screen .screen-header {
  margin-bottom: var(--space-4);
}

.settings-trainer-card {
  border-radius: var(--radius-xl);
}

.settings-section {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.settings-section h2 {
  margin: 0 0 var(--space-1) var(--space-1);
}

.settings-row {
  position: relative;
  overflow: hidden;
  min-height: 70px;
  border-color: rgba(var(--accent-rgb), .16);
  background:
    linear-gradient(135deg, rgba(255,255,255,.052), rgba(255,255,255,.018)),
    var(--surface-card);
  color: var(--text-primary);
}

.settings-row > b {
  max-width: 42%;
  overflow-wrap: anywhere;
  color: rgba(247,241,230,.78);
  text-align: right;
}

.settings-row--active {
  border-color: rgba(122,216,167,.18);
}

.settings-row--readonly {
  border-color: rgba(var(--accent-rgb), .18);
}

.settings-row--action {
  cursor: pointer;
}

.settings-row--action:hover {
  border-color: rgba(var(--accent-rgb), .35);
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), .11), rgba(255,255,255,.024)),
    var(--surface-card);
}

.settings-row--future {
  border-style: dashed;
}

.settings-row--debug {
  border-style: dashed;
  opacity: .92;
}

.settings-row--disabled {
  border-style: dashed;
  cursor: not-allowed;
  opacity: .72;
}

.settings-row--disabled:disabled {
  transform: none;
}

.settings-row--disabled .setting-icon {
  background: rgba(255,255,255,.055);
  color: var(--text-secondary);
}

.settings-group--runtime .setting-icon {
  background: rgba(122,216,167,.14);
  color: var(--text-success);
}

.settings-group--coach-profile .settings-section {
  margin-top: 0;
}

.settings-profile-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-5);
  border: 1px solid rgba(var(--accent-rgb), .26);
  border-radius: var(--radius-2xl);
  background:
    radial-gradient(circle at 24px 24px, rgba(var(--accent-rgb), .18), transparent 38%),
    linear-gradient(145deg, rgba(var(--accent-rgb), .12), rgba(255,255,255,.028)),
    var(--surface-panel);
  box-shadow: var(--shadow-card);
}

.settings-avatar-placeholder {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), .62);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 20%, rgba(255,255,255,.18), transparent 28%),
    linear-gradient(145deg, rgba(var(--accent-rgb), .30), rgba(var(--accent-rgb), .08)),
    #141914;
  color: var(--color-accent);
  box-shadow:
    0 0 0 7px rgba(var(--accent-rgb), .06),
    0 18px 42px rgba(0,0,0,.32);
  font-size: calc(20px * var(--text-scale));
  font-weight: var(--font-weight-black);
  letter-spacing: .08em;
}

.settings-profile-card__body {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}

.settings-profile-card__eyebrow {
  color: rgba(var(--accent-rgb), .78);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.settings-profile-card__body strong {
  color: var(--text-primary);
  font-size: calc(20px * var(--text-scale));
  line-height: var(--line-height-tight);
}

.settings-profile-card__body small,
.settings-profile-card__details span {
  color: var(--text-secondary);
}

.settings-profile-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.settings-profile-card__details {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255,255,255,.08);
}

.settings-profile-card__details b {
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.settings-group--preferences .setting-icon,
.settings-group--about .setting-icon {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.settings-group--data-source .setting-icon,
.settings-group--account .setting-icon {
  background: rgba(122,216,167,.14);
  color: var(--text-success);
}

.settings-group--future .setting-icon {
  background: rgba(244,199,111,.12);
  color: var(--color-warning);
}

.settings-group--debug .setting-icon {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.settings-group--debug .settings-row,
.settings-group--future .settings-row {
  background: rgba(255,255,255,.025);
}

.settings-group--future .settings-row {
  background:
    linear-gradient(135deg, rgba(244,199,111,.052), rgba(255,255,255,.016)),
    rgba(255,255,255,.018);
}

/* Mobile-13 Action Panels + States Polish */
.action-backdrop {
  position: fixed;
  inset: 0;
  left: 50%;
  z-index: 59;
  width: min(100%, 430px);
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 100%, rgba(var(--accent-rgb), .10), transparent 34%),
    rgba(0, 0, 0, .64);
  backdrop-filter: blur(10px);
  overscroll-behavior: contain;
  touch-action: none;
}

.action-panel {
  --action-panel-surface: radial-gradient(circle at 50% -80px, rgba(var(--accent-rgb), .14), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018)),
    var(--surface-panel);
  position: fixed;
  right: 50%;
  bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: var(--space-4);
  width: min(100%, 430px);
  max-height: min(88vh, 760px);
  max-height: min(92dvh, 760px);
  transform: translateX(50%);
  overflow: hidden;
  overscroll-behavior: contain;
  padding: var(--space-5) var(--space-5) 0;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(var(--accent-rgb), .24);
  border-bottom: 0;
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  background: var(--action-panel-surface);
  box-shadow: var(--shadow-panel);
  overflow-x: hidden;
}

.action-panel--danger {
  border-color: rgba(239,127,115,.28);
}

.action-panel__header {
  margin-bottom: 0;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-soft);
}

.action-panel__header strong {
  color: var(--text-primary);
  font-size: calc(20px * var(--text-scale));
}

.action-panel__header p {
  color: var(--text-secondary);
  font-size: var(--font-size-body);
  line-height: var(--line-height-normal);
}

.action-panel__header .icon-button {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
}

.action-panel__status:empty {
  display: none;
}

.action-panel-state {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: 0;
  padding: var(--space-3);
  border: 1px solid currentColor;
  border-radius: var(--radius-lg);
  text-align: left;
}

.action-panel-state span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.08);
  font-weight: var(--font-weight-bold);
}

.action-panel-state p {
  margin: 0;
  color: inherit;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.action-panel__body {
  gap: var(--space-3);
  width: 100%;
  max-width: 100%;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 2px;
  padding-bottom: var(--space-3);
  -webkit-overflow-scrolling: touch;
}

.action-panel .form-field {
  gap: var(--space-2);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-inline-size: 0;
  box-sizing: border-box;
}

.action-panel__field {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-inline-size: 0;
  box-sizing: border-box;
  overflow: visible;
}

.action-panel .form-field input,
.action-panel .form-field textarea,
.action-panel .form-field select,
.action-panel .athra-input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  box-sizing: border-box;
  min-height: 48px;
  border-color: rgba(var(--accent-rgb), .22);
  background: rgba(255,255,255,.055);
  color: var(--text-primary);
  font-size: calc(16px * var(--text-scale));
  line-height: 1.35;
}

.action-panel input[type="date"],
.action-panel input[type="time"] {
  display: block;
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-size: calc(16px * var(--text-scale));
}

.action-panel--add-payment input[name="amount"] {
  height: 48px;
  min-height: 48px;
}

.action-panel input:focus-visible,
.action-panel textarea:focus-visible,
.action-panel select:focus-visible {
  outline: none;
}

.action-panel .form-field:focus-within input,
.action-panel .form-field:focus-within textarea,
.action-panel .form-field:focus-within select {
  border-color: rgba(var(--accent-rgb), .62);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .30) inset;
}

.action-panel .form-field textarea {
  min-height: 92px;
  max-height: 132px;
  resize: vertical;
}

.action-panel__form {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
}

.action-panel--training-rebuild {
  --training-control-height: 56px;
  --training-control-radius: var(--radius-lg);
  --training-control-padding-x: 14px;
  --training-field-gap: 16px;
  gap: var(--space-3);
  max-height: min(92dvh, 680px);
  padding: 22px 24px 0;
}

.action-panel--training-rebuild .action-panel__header {
  padding-bottom: 18px;
}

.action-panel--training-rebuild .action-panel__body,
.action-panel__body--training {
  gap: 0;
  padding-right: 0;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.action-panel__form--training {
  display: flex;
  flex-direction: column;
  gap: var(--training-field-gap);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  grid-template-rows: none;
  overflow: visible;
}

.action-panel--training-rebuild .action-panel__field {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow: visible;
  transform: none;
}

.action-panel__label {
  color: rgba(var(--accent-rgb), .78);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.action-panel__control-shell,
.action-panel--training-rebuild .action-panel__control--price {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  height: var(--training-control-height);
  min-height: var(--training-control-height);
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  transform: none;
  border: 1px solid rgba(var(--accent-rgb), .22);
  border-radius: var(--training-control-radius);
  background: rgba(255,255,255,.055);
  color: var(--text-primary);
}

.action-panel--training-rebuild .action-panel__control {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  margin: 0;
  box-sizing: border-box;
  font-size: calc(16px * var(--text-scale));
  line-height: 1.35;
  transform: none;
}

.action-panel__control-shell .action-panel__control {
  position: relative;
  height: 100%;
  min-height: 0;
  padding: 0 42px 0 var(--training-control-padding-x);
  overflow: hidden;
  appearance: auto;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: inherit;
}

.action-panel__control-shell .action-panel__control::-webkit-date-and-time-value {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  text-align: left;
}

.action-panel__control-shell .action-panel__control::-webkit-calendar-picker-indicator {
  position: absolute;
  top: 18px;
  right: 12px;
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
}

.action-panel__control-shell .action-panel__control::-webkit-scrollbar {
  display: none;
}

.action-panel--training-rebuild .action-panel__control--price {
  padding: 0 var(--training-control-padding-x);
}

.action-panel__field:focus-within .action-panel__control-shell,
.action-panel__field:focus-within > .action-panel__control--price,
.action-panel__field:focus-within > .action-panel__control--comment {
  border-color: rgba(var(--accent-rgb), .62);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .30) inset;
}

.action-panel--training-rebuild .action-panel__control--comment {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  min-height: 112px;
  max-height: 120px;
  margin: 0;
  padding: 14px;
  box-sizing: border-box;
  overflow: hidden;
  resize: none;
}

.action-panel__primary-action,
.action-panel__secondary-action {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  box-sizing: border-box;
}

.action-panel__primary-action {
  min-height: 58px;
  margin-top: 6px;
}

.action-panel__secondary-action {
  min-height: 52px;
  border-color: rgba(var(--accent-rgb), .24);
  background: rgba(255,255,255,.045);
  color: var(--text-primary);
}

.action-panel__footer {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-4);
  margin-inline: calc(var(--space-5) * -1);
  padding: var(--space-3) var(--space-5) calc(var(--space-4) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-soft);
  background: var(--action-panel-surface);
  background-color: var(--surface-panel);
  box-shadow: none;
}

.action-panel__footer .full-submit {
  margin-top: 0;
}

.action-panel__cancel {
  justify-content: center;
}

.action-panel .athra-button--danger {
  border-color: rgba(239,127,115,.36);
  background: rgba(239,127,115,.14);
  color: var(--color-danger);
}

.action-panel--edit-client {
  max-height: min(92dvh, 680px);
}

.action-panel--edit-client .action-panel__body {
  padding-bottom: var(--space-2);
}

.action-panel--edit-client .action-panel__footer {
  position: sticky;
  bottom: 0;
  padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom));
}

.client-secondary-action--edit {
  grid-column: 1 / -1;
}

.action-panel [data-loading] {
  position: relative;
}

.action-panel [data-loading]::after {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0,0,0,.18);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  content: "";
}

/* Mobile-19 Real Device QA Findings Patch: in-app confirmation modal */
.confirmation-backdrop {
  position: fixed;
  z-index: 44;
  inset: 0;
  left: 50%;
  width: min(100%, 430px);
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 100%, rgba(var(--accent-rgb), .12), transparent 34%),
    rgba(0,0,0,.68);
  backdrop-filter: blur(10px);
}

.confirmation-modal {
  position: fixed;
  z-index: 45;
  right: 50%;
  bottom: 0;
  display: grid;
  width: min(100%, 430px);
  max-height: min(82vh, 620px);
  max-height: min(82dvh, 620px);
  gap: var(--space-4);
  padding: var(--space-5) var(--space-5) calc(var(--space-5) + env(safe-area-inset-bottom));
  transform: translateX(50%);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(var(--accent-rgb), .28);
  border-bottom: 0;
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  background:
    radial-gradient(circle at 50% -80px, rgba(var(--accent-rgb), .16), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018)),
    var(--surface-panel);
  box-shadow: var(--shadow-panel);
  color: var(--text-primary);
}

.confirmation-modal--danger {
  border-color: rgba(239,127,115,.34);
}

.confirmation-modal__header {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: var(--space-3);
  align-items: flex-start;
}

.confirmation-modal__header > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), .28);
  border-radius: var(--radius-lg);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-weight: var(--font-weight-bold);
}

.confirmation-modal--danger .confirmation-modal__header > span {
  border-color: rgba(239,127,115,.32);
  background: rgba(239,127,115,.12);
  color: var(--color-danger);
}

.confirmation-modal__header strong {
  color: var(--text-primary);
  font-size: calc(20px * var(--text-scale));
  line-height: var(--line-height-tight);
}

.confirmation-modal__header p {
  margin-top: var(--space-2);
  color: var(--text-secondary);
  font-size: var(--font-size-body);
  line-height: var(--line-height-normal);
}

.confirmation-modal__error {
  padding: var(--space-3);
  border: 1px solid rgba(239,127,115,.32);
  border-radius: var(--radius-lg);
  background: rgba(239,127,115,.12);
  color: var(--color-danger);
  font-size: var(--font-size-body);
  line-height: var(--line-height-normal);
}

.confirmation-modal__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}

.confirmation-modal__actions .athra-button {
  min-height: 48px;
}

.state-card {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)),
    var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.empty-state.state-card,
.fatal-state.state-card,
.loading-screen.state-card,
.success-state.state-card {
  min-height: auto;
  padding: var(--space-6) var(--space-5);
}

.empty-state > span,
.success-state > span {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), .18);
  border-radius: var(--radius-lg);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.success-state strong,
.empty-state strong,
.fatal-state strong {
  color: var(--text-primary);
}

.success-state p,
.empty-state p,
.fatal-state p,
.loading-screen p {
  color: var(--text-secondary);
  font-size: var(--font-size-body);
  line-height: var(--line-height-normal);
}

.fatal-state {
  border-color: rgba(239,127,115,.24);
}

.success-state {
  border-color: rgba(122,216,167,.22);
}

.loading-screen {
  border-color: rgba(var(--accent-rgb), .18);
}

.loading-screen > i {
  width: min(120px, 48vw);
  height: 4px;
}

.toast {
  border-color: rgba(var(--accent-rgb), .24);
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), .10), rgba(255,255,255,.02)),
    rgba(16,21,24,.96);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.toast--success {
  border-color: rgba(122,216,167,.34);
  background:
    linear-gradient(180deg, rgba(122,216,167,.14), rgba(255,255,255,.02)),
    rgba(16,21,24,.96);
}

.toast--error {
  border-color: rgba(239,127,115,.38);
  background:
    linear-gradient(180deg, rgba(239,127,115,.14), rgba(255,255,255,.02)),
    rgba(16,21,24,.96);
}

.toast--info {
  border-color: rgba(var(--accent-rgb), .28);
}

.toast--warning {
  border-color: rgba(245,190,87,.42);
  background:
    linear-gradient(180deg, rgba(245,190,87,.16), rgba(255,255,255,.02)),
    rgba(16,21,24,.96);
}

.settings-row--disabled,
.setting-row--placeholder[disabled] {
  pointer-events: none;
}

.settings-row--disabled .athra-badge,
.setting-row--placeholder[disabled] .athra-badge {
  border-style: dashed;
}

.splash-screen,
.welcome-intro {
  position: relative;
  display: grid;
  min-height: 100dvh;
  place-items: center;
  overflow: hidden;
  padding:
    max(var(--space-6), env(safe-area-inset-top))
    var(--space-5)
    max(var(--space-6), env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 18%, rgba(var(--accent-rgb), .18), transparent 34%),
    radial-gradient(circle at 12% 12%, rgba(255,255,255,.07), transparent 28%),
    linear-gradient(145deg, #05080a 0%, #101518 52%, #07090b 100%);
  color: var(--text-primary);
}

.splash-screen__background {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.splash-screen__background span {
  position: absolute;
  border: 1px solid rgba(var(--accent-rgb), .12);
  border-radius: 999px;
  opacity: .72;
  animation: splash-soft-glow 4.8s ease-in-out infinite alternate;
}

.splash-screen__background span:nth-child(1) {
  top: -92px;
  right: -88px;
  width: 250px;
  height: 250px;
}

.splash-screen__background span:nth-child(2) {
  bottom: 8%;
  left: -120px;
  width: 260px;
  height: 260px;
  animation-delay: .32s;
}

.welcome-intro__content {
  position: relative;
  z-index: 1;
  width: min(100%, 380px);
  justify-items: center;
  text-align: center;
  animation: splash-simple-in .72s var(--ease-emphasized) both;
}

.splash-screen__logo,
.welcome-intro__logo {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  box-shadow: 0 22px 58px rgba(var(--accent-rgb), .22), 0 0 0 1px rgba(247,241,230,.08);
  animation: splash-logo-in .78s var(--ease-emphasized) .08s both;
}

.welcome-intro__copy {
  justify-items: center;
}

.splash-screen__meta {
  color: rgba(var(--accent-rgb), .82);
  animation: splash-text-rise .52s var(--ease-emphasized) .16s both;
}

.splash-screen__brand,
.welcome-intro__brand {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(50px, 16vw, 72px);
  font-weight: var(--font-weight-bold);
  letter-spacing: .08em;
  line-height: .92;
  text-shadow: 0 16px 42px rgba(0,0,0,.36);
  animation: splash-text-rise .56s var(--ease-emphasized) .22s both;
}

.splash-screen__tagline,
.welcome-intro__tagline {
  color: var(--text-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -.02em;
  line-height: var(--line-height-normal);
  animation: splash-text-rise .58s var(--ease-emphasized) .30s both;
}

.welcome-intro__meta {
  font-size: var(--font-size-body);
  line-height: var(--line-height-relaxed);
  animation: splash-text-rise .58s var(--ease-emphasized) .38s both;
}

.welcome-intro__actions {
  width: 100%;
  animation: splash-cta-rise .62s var(--ease-emphasized) .46s both;
}

.splash-screen__cta,
.welcome-intro__cta {
  width: 100%;
  min-height: 56px;
  border: 1px solid rgba(247,241,230,.10);
  box-shadow: 0 18px 46px rgba(var(--accent-rgb), .20), inset 0 1px rgba(255,255,255,.32);
}

@keyframes splash-simple-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes splash-logo-in {
  from { opacity: 0; filter: blur(8px); transform: translateY(10px) scale(.9); }
  to { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
}

@keyframes splash-soft-glow {
  from { opacity: .36; transform: translate3d(0, 0, 0) scale(.96); }
  to { opacity: .82; transform: translate3d(0, -8px, 0) scale(1.04); }
}

@keyframes splash-text-rise {
  from { opacity: 0; filter: blur(7px); transform: translateY(12px); }
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}

@keyframes splash-cta-rise {
  from { opacity: 0; filter: blur(7px); transform: translateY(14px) scale(.98); }
  to { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .splash-screen *,
  .splash-screen *::before,
  .splash-screen *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
  }

  .welcome-intro__content,
  .welcome-intro__logo,
  .splash-screen__meta,
  .splash-screen__brand,
  .splash-screen__tagline,
  .welcome-intro__meta,
  .welcome-intro__actions {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
  }
}
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes loading { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

@media (min-width: 700px) {
  body { padding: 24px 0; }
  .app-shell { min-height: calc(100vh - 48px); border-radius: 32px; }
  .bottom-nav { bottom: 24px; border-radius: 0 0 32px 32px; }
  .auth-screen { min-height: calc(100vh - 48px); border-radius: 32px; }
}

@media (max-width: 370px) {
  .screen { padding-right: 15px; padding-left: 15px; }
  .auth-copy h1 { font-size: calc(43px * var(--text-scale)); }
  .detail-tabs { margin-right: -15px; margin-left: -15px; padding-right: 15px; padding-left: 15px; }
  .client-card .grow small { max-width: 145px; }
  .client-card-shortcut { flex-basis: calc(50% - var(--space-2)); }
}

/* Mobile-31: accounts — login & registration, profile, modes, client home */
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-1); padding: var(--space-1); border: 1px solid var(--border-soft); border-radius: var(--radius-pill); background: rgba(255,255,255,.04); }
.auth-tab { min-height: 38px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--text-secondary); font-size: var(--font-size-body); font-weight: var(--font-weight-bold); cursor: pointer; }
.auth-tab.is-active { background: var(--color-accent-soft); color: var(--color-accent); }
.auth-link { padding: 0; border: 0; background: none; color: var(--color-accent); font: inherit; font-weight: var(--font-weight-bold); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.auth-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.auth-form .athra-input, .profile-form .athra-input { width: 100%; padding: 0 var(--space-3); }
.athra-field-hint { color: var(--text-secondary); font-size: var(--font-size-sm); line-height: 1.35; text-align: left !important; }
.athra-field-hint.is-ok { color: var(--color-success); }
.athra-field-hint.is-error, .auth-panel .athra-field-error { color: var(--color-danger); text-align: left; }
.nickname-input { display: flex; align-items: center; border: 1px solid var(--border-default); border-radius: var(--input-radius); background: rgba(255,255,255,.045); }
.nickname-input > span,
.auth-form .form-field .nickname-input > span { padding-left: var(--space-3); color: var(--color-accent); font-size: max(16px, var(--font-size-body)); font-weight: var(--font-weight-bold); letter-spacing: 0; line-height: 1; text-transform: none; }
/* The wrapper draws the box (1px border each side), so the inner input is 2px shorter. */
.nickname-input .athra-input, .auth-form .form-field .nickname-input input { height: calc(var(--input-height) - 2px); min-height: 0; border: 0; background: transparent; padding-left: var(--space-1); }
.auth-form .nickname-input { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.1); }
/* Focus the whole field like the other inputs, never the inner input alone. */
.nickname-input:focus-within { border-color: rgba(var(--accent-rgb), .56); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .10); outline: 2px solid var(--color-accent); outline-offset: 3px; }
.nickname-input .athra-input:focus, .nickname-input .athra-input:focus-visible,
.auth-form .form-field:focus-within .nickname-input input { outline: none; border: 0; box-shadow: none; }
.auth-mode-picker { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); margin: 0; padding: 0; border: 0; }
.auth-mode-picker legend { grid-column: 1 / -1; margin-bottom: var(--space-2); padding: 0; }
.auth-mode-option { position: relative; display: grid; gap: 3px; padding: var(--space-3); border: 1px solid var(--border-soft); border-radius: var(--radius-md); background: rgba(255,255,255,.04); cursor: pointer; }
.auth-mode-option input { position: absolute; opacity: 0; pointer-events: none; }
.auth-mode-option strong { color: var(--text-primary); font-size: var(--font-size-body); }
.auth-mode-option small { color: var(--text-secondary) !important; font-size: var(--font-size-sm); text-align: left !important; }
.auth-mode-option.is-selected, .auth-mode-option:has(input:checked) { border-color: var(--color-accent); background: var(--color-accent-soft); }
.auth-mode-option:focus-within { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.auth-account-card { display: flex; align-items: center; gap: var(--space-3); }
.auth-account-card > span:last-child { display: grid; gap: 2px; }

.account-avatar { display: inline-grid; flex: 0 0 auto; overflow: hidden; place-items: center; border: 1px solid var(--border-default); border-radius: 50%; background: linear-gradient(135deg, rgba(var(--accent-light-rgb), .28), rgba(var(--accent-rgb), .12)); color: var(--color-accent); font-weight: var(--font-weight-bold); }
.account-avatar--sm { width: 36px; height: 36px; font-size: calc(12px * var(--text-scale)); }
.account-avatar--md { width: 48px; height: 48px; font-size: calc(15px * var(--text-scale)); }
.account-avatar--xl { width: 96px; height: 96px; font-size: calc(30px * var(--text-scale)); }
.account-avatar__photo, .profile-button__photo { width: 100%; height: 100%; object-fit: cover; }
.profile-button.athra-button { position: relative; overflow: hidden; padding: 0; }
.profile-button .account-avatar { position: absolute; inset: 0; width: auto; height: auto; border: 0; border-radius: inherit; font-size: calc(13px * var(--text-scale)); }

.profile-screen, .client-home-screen { display: grid; align-content: start; gap: var(--space-4); }
.profile-header { align-items: center; justify-content: flex-start; margin-bottom: 0; }
.icon-button { display: grid; width: 43px; height: 43px; place-items: center; padding: 0; font-size: calc(18px * var(--text-scale)); }
.profile-card { display: grid; justify-items: center; gap: var(--space-3); padding: var(--space-5) var(--space-4); text-align: center; }
.profile-card__photo { display: grid; justify-items: center; gap: var(--space-3); }
.profile-card__photo-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); }
.profile-photo-button { padding: 0 var(--space-4); white-space: nowrap; cursor: pointer; }
.profile-card__identity { display: grid; gap: 4px; }
.profile-card__identity strong { font-size: var(--font-size-lg); }
.profile-card__identity span { color: var(--color-accent); font-weight: var(--font-weight-bold); }
.profile-card__identity small, .profile-hint { color: var(--text-secondary); font-size: var(--font-size-sm); line-height: 1.4; }
.profile-section { display: grid; gap: var(--space-3); }
.profile-section h2 { font-size: var(--font-size-section); letter-spacing: -.02em; }
.profile-form { display: grid; gap: var(--space-3); }
.profile-logout { width: 100%; margin-top: var(--space-2); }

.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.mode-switch__option { display: grid; gap: 3px; min-height: 64px; padding: var(--space-3); border: 1px solid var(--border-soft); border-radius: var(--radius-md); background: rgba(255,255,255,.04); color: var(--text-primary); text-align: left; cursor: pointer; }
.mode-switch__option small { color: var(--text-secondary); font-size: var(--font-size-sm); }
.mode-switch__option.is-active { border-color: var(--color-accent); background: var(--color-accent-soft); }
.mode-switch__option.is-active small { color: var(--color-accent); }
.mode-switch__option:disabled:not(.is-active) { cursor: not-allowed; opacity: .55; }
.profile-callout { display: grid; gap: var(--space-3); padding: var(--space-4); }
.profile-callout > span { display: grid; gap: 4px; }
.profile-callout small { color: var(--text-secondary); font-size: var(--font-size-sm); line-height: 1.4; }

.client-home-header { align-items: center; margin-bottom: 0; }
.client-home-card { display: grid; gap: var(--space-2); padding: var(--space-4); }
.client-home-card > small { color: var(--text-secondary); font-size: var(--font-size-body); line-height: 1.45; }
.client-home-trainer > strong { font-size: calc(22px * var(--text-scale)); letter-spacing: -.03em; }
.client-home-trainer .athra-badge { justify-self: start; }
.client-home-nickname { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-2); padding: var(--space-3); border: 1px dashed var(--border-default); border-radius: var(--radius-md); }
.client-home-nickname span { color: var(--color-accent); font-size: var(--font-size-md); font-weight: var(--font-weight-bold); }
.mode-chip { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: var(--space-3) var(--space-4); color: var(--text-primary); font-weight: var(--font-weight-bold); cursor: pointer; }
.mode-chip b { color: var(--color-accent); }

/* Mobile-31: choosing the area of the profile photo */
.crop-dialog { justify-items: center; }
.crop-dialog:focus { outline: none; }
.crop-dialog__header { display: grid; gap: var(--space-1); justify-self: stretch; }
.crop-dialog__header strong { font-size: calc(20px * var(--text-scale)); line-height: 1.25; }
.crop-dialog__header small { color: var(--text-secondary); line-height: 1.4; }
.crop-dialog > .confirmation-modal__actions,
.crop-dialog > .confirmation-modal__error { justify-self: stretch; }
.crop-viewport {
  position: relative;
  overflow: hidden;
  flex: none;
  border-radius: var(--radius-lg, 16px);
  background: #000;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.crop-viewport.is-dragging { cursor: grabbing; }
.crop-viewport:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.crop-viewport__image {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  max-height: none;
  pointer-events: none;
  user-select: none;
  will-change: transform;
}
.crop-viewport__mask {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255,255,255,.85);
  border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(0,0,0,.58);
  pointer-events: none;
}
.crop-zoom { display: flex; align-items: center; gap: var(--space-3); justify-self: stretch; color: var(--text-secondary); font-weight: var(--font-weight-bold); }
.crop-zoom input[type="range"] { flex: 1; min-width: 0; accent-color: var(--color-accent); }

/* Mobile-32: collaboration — bell, people search, invitations, QR, notifications */
.header-actions { display: flex; align-items: center; gap: var(--space-2); }
.bell-button.athra-button {
  position: relative;
  display: grid;
  width: 43px;
  height: 43px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border-default);
  border-radius: 15px;
  color: var(--color-accent);
}
.bell-button svg { width: 22px; height: 22px; }
.bell-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--color-danger);
  color: #fff;
  font-size: calc(11px * var(--text-scale));
  font-weight: var(--font-weight-bold);
  line-height: 20px;
  text-align: center;
}
.bell-badge[hidden] { display: none; }

.people-screen, .notifications-screen, .invite-screen { display: grid; align-content: start; gap: var(--space-4); }
.people-section { display: grid; gap: var(--space-3); }
.people-section > h2 { display: flex; align-items: center; gap: var(--space-2); margin: 0; font-size: calc(18px * var(--text-scale)); }
.people-card-context, .people-search, .qr-start { display: grid; gap: var(--space-2); padding: var(--space-4); }
.people-card-context small, .qr-start small, .people-hint { color: var(--text-secondary); font-size: var(--font-size-sm); line-height: 1.45; }
.people-hint { margin: 0; }
.people-hint.is-error { color: var(--color-danger); }
.people-results { display: grid; gap: var(--space-2); }
.person-list, .invitation-list, .notification-list { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.person-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--space-3); padding: var(--space-3); }
.person-row__main { display: grid; min-width: 0; gap: 2px; }
.person-row__main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-row__nick { color: var(--color-accent); font-size: var(--font-size-sm); }
.person-row__badge { justify-self: end; }
.person-row__actions { display: flex; flex-wrap: wrap; grid-column: 1 / -1; gap: var(--space-2); }
.person-row__actions .athra-button { flex: 1 1 auto; min-height: 40px; }
.qr-start__actions, .qr-panel__actions, .invitation-card__actions, .invite-card__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.qr-start__actions .athra-button, .invitation-card__actions .athra-button, .invite-card__actions .athra-button { flex: 1 1 auto; }

.invitation-card { display: grid; gap: var(--space-3); padding: var(--space-3); }
.invitation-card__head { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--space-3); }
.invitation-card__head p { display: grid; gap: 2px; margin: 0; line-height: 1.4; }
.invitation-card__head small { color: var(--text-secondary); font-size: var(--font-size-sm); }
.invitation-card__qr span { color: var(--color-accent); font-size: calc(11px * var(--text-scale)); font-weight: var(--font-weight-bold); }

.qr-panel { display: grid; justify-items: center; gap: var(--space-3); padding: var(--space-4); text-align: center; }
.qr-panel header { display: grid; gap: var(--space-1); }
.qr-panel header small { color: var(--text-secondary); font-size: var(--font-size-sm); line-height: 1.45; }
.qr-panel__code { width: min(100%, 260px); padding: 8px; border-radius: var(--radius-md); background: #fff; }
.qr-panel__code .qr-code { display: block; width: 100%; height: auto; }
.qr-panel__link { max-width: 100%; overflow-wrap: anywhere; color: var(--text-secondary); font-size: calc(12px * var(--text-scale)); }
.qr-panel__actions { justify-content: center; }

.accept-card-options { display: grid; gap: var(--space-2); max-height: 40vh; overflow-y: auto; }
.accept-card-option { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--border-soft, rgba(255,255,255,.08)); border-radius: var(--radius-md); background: rgba(255,255,255,.04); cursor: pointer; }
.accept-card-option.is-selected { border-color: rgba(var(--accent-rgb), .56); background: var(--color-accent-soft); }
.accept-card-option input { accent-color: var(--color-accent); }
.accept-card-option span { display: grid; gap: 2px; }
.accept-card-option small { color: var(--text-secondary); font-size: var(--font-size-sm); }

.notification-item { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); padding: var(--space-3); }
.notification-item.is-unread { border-color: rgba(var(--accent-rgb), .42); }
.notification-item__body { display: grid; gap: var(--space-1); }
.notification-item__body p { margin: 0; line-height: 1.4; }
.notification-item__body small { color: var(--text-secondary); font-size: var(--font-size-sm); }
.notification-item__body b { color: var(--color-accent); }
.notification-item__body .athra-button { justify-self: start; margin-top: var(--space-1); }
.notification-empty { display: grid; gap: var(--space-1); padding: var(--space-4); }
.notification-empty small { color: var(--text-secondary); }

.invite-card { display: grid; justify-items: center; gap: var(--space-3); padding: var(--space-5) var(--space-4); text-align: center; }
.invite-card > small { color: var(--text-secondary); font-size: var(--font-size-sm); line-height: 1.45; }
.invite-card__nick { color: var(--color-accent); font-weight: var(--font-weight-bold); }
.invite-card__headline { margin: 0; font-size: calc(18px * var(--text-scale)); line-height: 1.4; }
.invite-card__actions { justify-self: stretch; }
.invite-blocker { display: grid; justify-items: center; gap: var(--space-2); padding: var(--space-3); border: 1px dashed rgba(var(--accent-rgb), .42); border-radius: var(--radius-md); }
.invite-blocker small { color: var(--text-primary); font-size: var(--font-size-sm); line-height: 1.45; }

.client-app-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--space-3); margin-top: var(--space-3); padding: var(--space-3) var(--space-4); }
.client-app-card[data-client-app-card="none"] { grid-template-columns: 1fr; }
.client-app-card__main { display: grid; gap: 2px; min-width: 0; }
.client-app-card__main small { color: var(--text-secondary); font-size: var(--font-size-sm); }
.client-app-card .athra-button { grid-column: 1 / -1; }
.client-home-end { justify-self: start; margin-top: var(--space-1); color: var(--text-secondary); }
.client-home-empty .athra-button--primary { justify-self: stretch; }
/* mobile-45: client home — balance, next session, my schedule, payments */
.client-home-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--space-3); }
.client-home-summary .athra-badge { justify-self: start; }
.client-balance-amount { font-size: calc(34px * var(--text-scale)); letter-spacing: -.03em; line-height: 1.1; white-space: nowrap; color: var(--accent-light); }
.client-balance-hint { color: var(--text-primary); font-size: var(--font-size-body); font-weight: var(--font-weight-bold); }
.client-balance-card--warning { border-color: rgba(var(--accent-rgb), .55); }
.client-balance-card--danger { border-color: var(--color-danger); }
.client-balance-card--danger .client-balance-hint { color: var(--color-danger); }
.client-balance-note { font-size: calc(13px * var(--text-scale)); }
.client-next-card > strong { font-size: calc(20px * var(--text-scale)); letter-spacing: -.02em; }
.client-next-time { font-size: calc(28px * var(--text-scale)); font-weight: var(--font-weight-bold); color: var(--text-primary); line-height: 1.1; }
.client-home-section { display: grid; gap: var(--space-3); }
.client-home-section.payment-list .client-payment-row { grid-template-columns: auto minmax(0, 1fr) auto; }
.client-home-section .payment-amount { font-size: var(--font-size-body); }
.client-home-more summary { cursor: pointer; padding: var(--space-2) 0; color: var(--text-secondary); font-size: var(--font-size-body); font-weight: var(--font-weight-bold); }
.client-home-more summary:hover, .client-home-more summary:focus-visible { color: var(--accent-light); }
.client-home-more[open] summary { margin-bottom: var(--space-2); }
.client-home-empty-text { color: var(--text-secondary); font-size: var(--font-size-body); }
.client-home-error .athra-button { justify-self: start; }
.auth-invite-notice { display: grid; gap: 2px; margin-bottom: var(--space-3); padding: var(--space-3); border-color: rgba(var(--accent-rgb), .42); }
.auth-invite-notice small { color: var(--text-secondary); }
.clients-invite-link { margin: 0; }

/* mobile-38: daily summaries for the trainer (time + switch in settings) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.settings-section__note {
  margin: 0 0 var(--space-3) 4px;
  color: var(--text-secondary, var(--color-text-muted));
  font-size: calc(12px * var(--text-scale));
  line-height: 1.4;
}

.summary-setting {
  flex-wrap: wrap;
  gap: var(--space-3);
}

.summary-setting .grow {
  flex: 1 1 160px;
  min-width: 0;
}

.summary-setting__time input {
  min-width: 92px;
  padding: 8px 10px;
  border: 1px solid rgba(var(--accent-rgb), .28);
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  color: var(--text-primary, var(--color-text));
  font: inherit;
  font-size: 16px; /* 16px: iOS does not zoom into the field */
  color-scheme: dark;
}

.summary-setting__time input:disabled {
  opacity: .45;
}

.summary-setting__switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  margin-left: auto;
  cursor: pointer;
}

.summary-setting__switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.summary-setting__track {
  position: relative;
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  transition: background .2s;
}

.summary-setting__track::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--athra-white);
  content: "";
  transition: transform .2s;
}

.summary-setting__switch input:checked + .summary-setting__track {
  background: var(--color-accent);
}

.summary-setting__switch input:checked + .summary-setting__track::after {
  transform: translateX(18px);
  background: var(--athra-black);
}

.summary-setting__switch input:focus-visible + .summary-setting__track {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.summary-setting.is-off strong {
  opacity: .7;
}

/* mobile-39: four training actions (Проведено, Перенести, Скасувати, Пізня) — 2 × 2 */
.client-training-row .training-actions,
.schedule-training-card__actions .training-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

[data-action="open-reschedule-training"] {
  border-color: rgba(155,181,243,.3);
  background: rgba(155,181,243,.1);
  color: var(--athra-blue);
}

.action-panel__hint {
  margin: 0;
  color: var(--text-secondary, var(--color-text-muted));
  font-size: calc(12px * var(--text-scale));
  line-height: 1.4;
}

/* mobile-39: stacked buttons (e.g. «Перенести» над «Скасувати») must read as separate buttons.
   The old long gold glow spilled into the gap and merged them; hovering the lower
   button also lit a gold glow over the upper one. Now each button keeps its light to itself
   and reacts on its own to hover, press and keyboard focus. */
.athra-button--primary,
.primary-button {
  box-shadow: 0 4px 12px rgba(var(--accent-rgb),  .16);
}

.athra-button--primary:hover:not(:disabled),
.primary-button:hover:not(:disabled) {
  box-shadow: 0 6px 16px rgba(var(--accent-rgb),  .24);
  filter: brightness(1.05);
}

.secondary-button:hover:not(:disabled),
.header-action:hover,
.ghost-auth-button:hover,
.athra-button--secondary:hover:not(:disabled),
.athra-button--ghost:hover:not(:disabled) {
  border-color: rgba(var(--accent-rgb),  .45);
  background-color: rgba(255, 255, 255, .07);
  box-shadow: none;
}

.athra-button:active:not(:disabled),
.primary-button:active:not(:disabled),
.secondary-button:active:not(:disabled) {
  transform: scale(.98);
}

.athra-button--primary:active:not(:disabled),
.primary-button:active:not(:disabled) {
  box-shadow: 0 2px 6px rgba(var(--accent-rgb),  .2);
  filter: brightness(.97);
}

.athra-button:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.action-panel__footer,
.confirmation-modal__actions {
  gap: var(--space-3);
}

.action-panel__form--training .action-panel__primary-action {
  margin-top: var(--space-2);
}

/* mobile-40: «Вигляд» — text size and accent colour; client notification numbers; developer block */
.appearance-group {
  display: grid;
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
  padding: var(--space-3) var(--space-4, 16px) var(--space-4, 16px);
  border: 1px solid rgba(var(--accent-rgb), .16);
  border-radius: 17px;
  min-inline-size: 0;
}

.appearance-group legend {
  padding: 0 4px;
  color: var(--text-primary, var(--color-text));
  font-size: calc(13px * var(--text-scale));
  font-weight: var(--font-weight-bold);
}

.appearance-options {
  display: grid;
  gap: var(--space-2);
}

.appearance-options--size {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.appearance-options--accent {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.appearance-option {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding: 10px 4px;
  border: 1px solid var(--border-soft, rgba(247,241,230,.08));
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  color: var(--text-secondary, var(--color-text-muted));
  font-size: calc(10px * var(--text-scale));
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background-color .2s;
}

.appearance-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.appearance-option:hover {
  border-color: rgba(var(--accent-rgb), .4);
}

.appearance-option.is-selected {
  border-color: var(--color-accent);
  background: rgba(var(--accent-rgb), .12);
  color: var(--text-primary, var(--color-text));
}

.appearance-option:has(input:focus-visible) {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.appearance-option__sample {
  color: var(--text-primary, var(--color-text));
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
}

.appearance-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgb(var(--swatch-light-rgb)), rgb(var(--swatch-rgb)));
  box-shadow: 0 0 0 2px rgba(255,255,255,.08);
}

.appearance-option.is-selected .appearance-swatch {
  box-shadow: 0 0 0 2px var(--color-bg, #07090b), 0 0 0 4px rgb(var(--swatch-rgb));
}

.pref-number {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary, var(--color-text-muted));
  font-size: calc(12px * var(--text-scale));
}

.pref-number input {
  width: 64px;
  padding: 8px 10px;
  border: 1px solid rgba(var(--accent-rgb), .28);
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  color: var(--text-primary, var(--color-text));
  font: inherit;
  font-size: 16px; /* 16px: iOS does not zoom into the field */
  text-align: center;
}

.pref-number input:disabled {
  opacity: .45;
}

.settings-developer {
  margin-top: 22px;
  border: 1px dashed rgba(var(--accent-rgb), .22);
  border-radius: 17px;
  padding: var(--space-3);
}

.settings-developer > summary {
  color: var(--text-secondary, var(--color-text-muted));
  font-size: calc(12px * var(--text-scale));
  font-weight: var(--font-weight-bold);
  letter-spacing: .04em;
  cursor: pointer;
}

.settings-developer[open] > summary {
  margin-bottom: var(--space-2);
}

/* mobile-40: one row of options; at the largest text size they wrap instead of overlapping */
html[data-text-size="xlarge"] .appearance-options--size {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-text-size="xlarge"] .appearance-options--accent {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.appearance-option > span:last-child {
  max-width: 100%;
  overflow-wrap: anywhere;
  hyphens: auto;
  line-height: 1.2;
}

/* mobile-41: language choice */
.appearance-options--language {
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
}

.appearance-option__code {
  color: var(--text-primary, var(--color-text));
  font-size: calc(13px * var(--text-scale));
  font-weight: var(--font-weight-bold);
  letter-spacing: .06em;
}

.appearance-option.is-disabled {
  cursor: not-allowed;
  opacity: .5;
}

.appearance-option.is-disabled input {
  cursor: not-allowed;
}

.appearance-option__soon {
  color: var(--text-secondary, var(--color-text-muted));
  font-size: calc(9px * var(--text-scale));
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* mobile-41: language switch on the sign-in screen */
.auth-language {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: var(--space-3);
}

.auth-language-option {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(var(--accent-rgb), .22);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: var(--text-secondary, var(--color-text-muted));
  font-size: calc(11px * var(--text-scale));
  font-weight: var(--font-weight-bold);
  letter-spacing: .06em;
  cursor: pointer;
}

.auth-language-option input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.auth-language-option.is-selected {
  border-color: var(--color-accent);
  background: rgba(var(--accent-rgb), .14);
  color: var(--text-primary, var(--color-text));
}

.auth-language-option:has(input:focus-visible) {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* mobile-43: trainer currency — three options in one row */
.appearance-options--currency {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.appearance-option--currency .appearance-option__code {
  font-size: calc(18px * var(--text-scale));
}

/* mobile-46: chat between a trainer and a client */
.chat-screen { display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-height: 0; padding: max(12px, env(safe-area-inset-top)) 0 0; }
.chat-header { display: flex; align-items: center; gap: var(--space-3); padding: 0 var(--space-4) var(--space-3); border-bottom: 1px solid var(--border-soft); }
.chat-header__text { display: grid; min-width: 0; }
.chat-header__text strong { overflow: hidden; color: var(--text-primary); font-size: calc(18px * var(--text-scale)); white-space: nowrap; text-overflow: ellipsis; }
.chat-header__text small { color: var(--text-secondary); font-size: calc(13px * var(--text-scale)); }
.chat-messages { display: flex; flex: 1; flex-direction: column; gap: var(--space-2); min-height: 0; padding: var(--space-3) var(--space-4); overflow-y: auto; overscroll-behavior: contain; }
.chat-day { align-self: center; margin: var(--space-2) 0; padding: 2px 12px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--text-secondary); font-size: calc(12px * var(--text-scale)); }
.chat-empty { margin: auto; color: var(--text-secondary); font-size: var(--font-size-body); text-align: center; }
.chat-older { align-self: center; min-height: 36px; font-size: calc(13px * var(--text-scale)); }
.chat-message { display: flex; align-items: flex-end; gap: 4px; max-width: 86%; }
.chat-message--mine { flex-direction: row-reverse; align-self: flex-end; }
.chat-message--theirs { align-self: flex-start; }
.chat-bubble { display: grid; gap: 4px; min-width: 64px; padding: 8px 12px 6px; border: 1px solid var(--border-soft); border-radius: 18px 18px 18px 6px; background: var(--surface-card); }
.chat-message--mine .chat-bubble { border-color: rgba(var(--accent-rgb), .35); border-radius: 18px 18px 6px 18px; background: rgba(var(--accent-rgb), .16); }
.chat-text { margin: 0; color: var(--text-primary); font-size: calc(15px * var(--text-scale)); line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-meta { display: flex; align-items: center; justify-content: flex-end; gap: 4px; color: var(--text-secondary); font-size: calc(11px * var(--text-scale)); }
.chat-read { letter-spacing: -2px; }
.chat-read--seen { color: var(--accent-light); }
.chat-reply-quote { display: grid; gap: 1px; padding: 4px 8px; border-left: 3px solid rgba(var(--accent-rgb), .8); border-radius: 6px; background: rgba(255, 255, 255, .05); font-size: calc(12px * var(--text-scale)); }
.chat-reply-quote b { color: var(--accent-light); }
.chat-reply-quote span { overflow: hidden; color: var(--text-secondary); white-space: nowrap; text-overflow: ellipsis; }
.chat-photo { display: block; padding: 0; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .05); overflow: hidden; cursor: zoom-in; }
.chat-photo img { display: block; width: 100%; max-width: 240px; min-height: 80px; max-height: 320px; object-fit: cover; }
.chat-menu-button { min-width: 32px; min-height: 32px; padding: 0; color: var(--text-secondary); font-size: calc(18px * var(--text-scale)); opacity: .55; }
.chat-menu-button:hover, .chat-menu-button:focus-visible { opacity: 1; }
/* mobile-51: edited / timer marks, service lines, message menu and chat settings */
.chat-bubble[data-action="chat-menu"] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.chat-edited { font-style: italic; }
.chat-timer { font-size: calc(10px * var(--text-scale)); opacity: .8; }
.chat-reply-quote--deleted span { font-style: italic; }
.chat-system { display: grid; justify-items: center; gap: 2px; align-self: center; max-width: 90%; margin: var(--space-1) 0; padding: 6px 14px; border: 1px dashed rgba(var(--accent-rgb), .35); border-radius: 14px; background: rgba(var(--accent-rgb), .06); color: var(--text-secondary); font-size: calc(12px * var(--text-scale)); text-align: center; }
.chat-system time { font-size: calc(11px * var(--text-scale)); opacity: .7; }
.chat-header .chat-settings-button { margin-left: auto; flex: 0 0 auto; }
.chat-header__text { flex: 1 1 auto; }
.chat-auto-delete-badge { flex: 0 0 auto; padding: 2px 8px; border-radius: 999px; background: rgba(var(--accent-rgb), .14); color: var(--accent-light); font-size: calc(12px * var(--text-scale)); white-space: nowrap; }
.chat-sheet-layer { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: flex-end; justify-content: center; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); background: rgba(0, 0, 0, .55); }
.chat-sheet-layer[hidden] { display: none; }
.chat-sheet { display: grid; gap: 12px; width: min(100%, 480px); padding: var(--space-4); border: 1px solid var(--border-soft); border-radius: 20px; background: var(--surface-panel); box-shadow: 0 -8px 32px rgba(0, 0, 0, .45); }
.chat-sheet > strong { color: var(--text-primary); font-size: calc(17px * var(--text-scale)); }
.chat-sheet > small, .chat-sheet__note { color: var(--text-secondary); font-size: calc(13px * var(--text-scale)); line-height: 1.4; }
.chat-sheet .athra-button { justify-content: flex-start; min-height: 46px; text-align: left; }
.chat-sheet .athra-button--danger { justify-content: center; }
.chat-sheet__danger { color: var(--color-danger); }
.chat-sheet__toggle { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--border-soft); border-radius: 14px; background: var(--surface-card); cursor: pointer; }
.chat-sheet__toggle > span { display: grid; gap: 4px; min-width: 0; }
.chat-sheet__toggle b { color: var(--text-primary); font-size: calc(15px * var(--text-scale)); }
.chat-sheet__toggle small { color: var(--text-secondary); font-size: calc(13px * var(--text-scale)); line-height: 1.4; }
.chat-sheet__toggle input { flex: 0 0 auto; width: 46px; height: 26px; accent-color: var(--accent-light); }
.chat-error { margin: 0 var(--space-4) var(--space-2); color: var(--text-danger); font-size: calc(13px * var(--text-scale)); }
.chat-composer { display: grid; gap: var(--space-2); padding: var(--space-2) var(--space-3) calc(var(--space-3) + env(safe-area-inset-bottom)); border-top: 1px solid var(--border-soft); background: var(--surface-panel); }
.chat-composer > * { min-width: 0; }
.chat-composer__row { display: flex; align-items: flex-end; gap: var(--space-2); min-width: 0; }
.chat-composer textarea { flex: 1; min-width: 0; min-height: 44px; max-height: 160px; padding: 11px 14px; border: 1px solid var(--border-default); border-radius: 22px; background: var(--surface-card); color: var(--text-primary); font: inherit; font-size: calc(15px * var(--text-scale)); line-height: 1.35; resize: none; }
.chat-composer textarea:focus { border-color: rgba(var(--accent-rgb), .7); outline: none; }
.chat-attach, .chat-send { display: grid; flex: 0 0 44px; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; place-items: center; border-radius: 50%; font-size: calc(18px * var(--text-scale)); cursor: pointer; }
.chat-send:disabled { opacity: .5; }
.chat-reply-bar, .chat-photo-preview { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: 6px 6px 6px 12px; border-left: 3px solid rgba(var(--accent-rgb), .8); border-radius: 10px; background: rgba(255, 255, 255, .05); color: var(--text-secondary); font-size: calc(13px * var(--text-scale)); }
.chat-reply-bar span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chat-reply-bar .athra-button, .chat-photo-preview .athra-button { flex: 0 0 auto; }
.chat-reply-bar b { color: var(--accent-light); }
.chat-photo-preview img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.chat-photo-viewer { position: fixed; inset: 0; z-index: 9999; display: grid; padding: env(safe-area-inset-top) 12px env(safe-area-inset-bottom); place-items: center; background: rgba(0, 0, 0, .9); cursor: zoom-out; }
.chat-photo-viewer img { max-width: 100%; max-height: 100%; border-radius: 12px; object-fit: contain; }
.chat-list-screen { display: grid; align-content: start; gap: var(--space-2); padding-left: 0; padding-right: 0; }
.chat-list-screen > :not(.chat-header) { margin: 0 var(--space-4); }
.chat-list-row { display: flex; align-items: center; gap: var(--space-3); width: auto; padding: var(--space-3); text-align: left; cursor: pointer; }
.chat-list-row__text { display: grid; flex: 1; gap: 2px; min-width: 0; }
.chat-list-row__text strong { overflow: hidden; color: var(--text-primary); font-size: calc(15px * var(--text-scale)); white-space: nowrap; text-overflow: ellipsis; }
.chat-list-row__text strong small { color: var(--text-secondary); font-weight: 500; }
.chat-list-row__text > small { overflow: hidden; color: var(--text-secondary); font-size: calc(13px * var(--text-scale)); white-space: nowrap; text-overflow: ellipsis; }
.chat-list-row--unread .chat-list-row__text > small { color: var(--text-primary); }
.chat-list-row__side { display: grid; justify-items: end; gap: 4px; color: var(--text-secondary); font-size: calc(12px * var(--text-scale)); }
.chat-unread-badge { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: rgb(var(--accent-rgb)); color: #111; font-size: calc(12px * var(--text-scale)); text-align: center; }
.chat-list-empty { display: grid; gap: var(--space-2); padding: var(--space-4); }
.chat-list-empty small { color: var(--text-secondary); font-size: var(--font-size-body); }
.client-home-write { justify-self: stretch; margin-top: var(--space-2); }

/* mobile-47: weekly reports */
.report-form-screen, .report-list-screen, .report-detail-screen, .report-editor-screen { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: var(--space-3); padding-left: 0; padding-right: 0; }
.report-form-screen > :not(.chat-header), .report-list-screen > :not(.chat-header), .report-detail-screen > :not(.chat-header), .report-editor-screen > :not(.chat-header) { margin: 0 var(--space-4); }
.report-header { gap: var(--space-3); }
.report-header .report-percent { margin-left: auto; }
.report-form, .report-editor { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
.report-field { display: grid; gap: var(--space-2); margin: 0; padding: var(--space-4); border: 1px solid var(--border-default); }
.report-field legend, .report-field > label { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); padding: 0; color: var(--text-primary); font-size: calc(16px * var(--text-scale)); font-weight: var(--font-weight-bold); }
.report-field legend { float: left; width: 100%; margin-bottom: var(--space-1); }
.report-field legend + * { clear: both; }
.report-field__hint { color: var(--text-secondary); font-size: calc(13px * var(--text-scale)); line-height: 1.4; }
.report-field output { color: var(--accent-light); font-size: calc(18px * var(--text-scale)); white-space: nowrap; }
.report-field textarea { width: 100%; min-height: 64px; padding: 10px 12px; border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--surface-card); color: var(--text-primary); font: inherit; font-size: calc(15px * var(--text-scale)); resize: vertical; }
.report-number { display: flex; align-items: center; gap: var(--space-2); }
.report-number input { width: min(100%, 160px); min-height: 48px; padding: 0 14px; border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--surface-card); color: var(--text-primary); font: inherit; font-size: calc(18px * var(--text-scale)); }
.report-number span { color: var(--text-secondary); font-size: calc(15px * var(--text-scale)); }
.report-field input[type="range"] { width: 100%; min-height: 36px; accent-color: rgb(var(--accent-rgb)); }
.report-field input[type="range"]:not([data-touched]) { opacity: .55; }
.report-scale { display: flex; justify-content: space-between; color: var(--text-secondary); font-size: calc(11px * var(--text-scale)); }
.report-photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.report-photo-thumb, .report-photo-add { position: relative; display: grid; aspect-ratio: 3 / 4; place-items: center; overflow: hidden; border-radius: var(--radius-md); background: rgba(255, 255, 255, .05); }
.report-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.report-photo-thumb span { color: var(--text-secondary); font-size: calc(12px * var(--text-scale)); text-align: center; }
.report-photo-thumb button { position: absolute; top: 4px; right: 4px; min-width: 32px; min-height: 32px; padding: 0; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; }
.report-photo-add { gap: 4px; border: 1px dashed rgba(var(--accent-rgb), .6); color: var(--accent-light); cursor: pointer; align-content: center; }
.report-photo-add span { font-size: calc(28px * var(--text-scale)); line-height: 1; }
.report-photo-add small { font-size: calc(12px * var(--text-scale)); }
.report-submit, .report-new-button { min-height: 52px; font-size: calc(16px * var(--text-scale)); }
.report-summary { display: flex; align-items: center; gap: var(--space-3); width: auto; padding: var(--space-3) var(--space-4); text-align: left; cursor: pointer; }
.report-summary__date { display: grid; flex: 1; gap: 2px; min-width: 0; }
.report-summary__date strong { color: var(--text-primary); font-size: calc(15px * var(--text-scale)); }
.report-summary__date small { color: var(--text-secondary); font-size: calc(12px * var(--text-scale)); }
.report-percent { flex: 0 0 auto; padding: 3px 10px; border-radius: 999px; font-size: calc(13px * var(--text-scale)); font-weight: var(--font-weight-bold); white-space: nowrap; }
.report-percent--good { background: rgba(78, 196, 140, .16); color: var(--text-success); }
.report-percent--warn { background: rgba(var(--accent-rgb), .18); color: var(--accent-light); }
.report-percent--low { background: rgba(226, 109, 109, .16); color: var(--text-danger); }
.report-percent--neutral { background: rgba(255, 255, 255, .06); color: var(--text-secondary); }
.report-reviewed { color: var(--text-success); font-size: calc(12px * var(--text-scale)); }
.report-new-badge { padding: 2px 8px; border-radius: 999px; background: rgb(var(--accent-rgb)); color: #111; font-size: calc(11px * var(--text-scale)); }
.report-empty { display: grid; gap: var(--space-2); padding: var(--space-4); }
.report-empty small { color: var(--text-secondary); font-size: var(--font-size-body); line-height: 1.45; }
.report-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); padding: var(--space-4); }
.report-values { display: grid; gap: var(--space-2); margin: 0; }
.report-value { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px var(--space-2); }
.report-value dt { color: var(--text-secondary); font-size: calc(14px * var(--text-scale)); }
.report-value dd { display: flex; align-items: center; gap: var(--space-2); margin: 0; color: var(--text-primary); font-size: calc(15px * var(--text-scale)); font-weight: var(--font-weight-bold); white-space: nowrap; }
.report-bar { grid-column: 1 / -1; height: 4px; border-radius: 999px; background: linear-gradient(90deg, currentColor var(--percent), rgba(255, 255, 255, .08) var(--percent)); }
.report-bar--good { color: var(--text-success); }
.report-bar--warn { color: rgb(var(--accent-rgb)); }
.report-bar--low { color: var(--text-danger); }
.report-comment { margin: 0; padding: var(--space-3); border-left: 3px solid rgba(var(--accent-rgb), .7); border-radius: 8px; background: rgba(255, 255, 255, .04); color: var(--text-primary); font-size: calc(14px * var(--text-scale)); white-space: pre-wrap; overflow-wrap: anywhere; }
.report-photo-strip { display: flex; gap: var(--space-2); overflow-x: auto; padding-bottom: 2px; }
.report-photo-open { flex: 0 0 auto; width: 84px; padding: 0; border: 0; border-radius: var(--radius-md); background: rgba(255, 255, 255, .05); overflow: hidden; cursor: zoom-in; }
.report-photo-open img { display: block; width: 84px; height: 112px; object-fit: cover; }
.weekly-report-card__actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); margin-top: var(--space-2); }
.client-reports-tab { display: grid; gap: var(--space-3); }
.client-reports-tab h3 { margin: 0 0 var(--space-2); color: var(--text-primary); font-size: calc(17px * var(--text-scale)); }
.report-targets { display: grid; gap: var(--space-3); padding: var(--space-4); }
.report-targets__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.report-target { display: grid; gap: 4px; min-width: 0; }
.report-target span { overflow: hidden; color: var(--text-secondary); font-size: calc(12px * var(--text-scale)); white-space: nowrap; text-overflow: ellipsis; }
.report-target input { width: 100%; min-height: 44px; padding: 0 10px; border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--surface-card); color: var(--text-primary); font: inherit; font-size: calc(16px * var(--text-scale)); }
.report-target small { color: var(--text-secondary); font-size: calc(11px * var(--text-scale)); }
.report-stats__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.report-stat { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; padding: var(--space-3); overflow: hidden; }
.report-stat__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.report-stat__head strong { flex: 1; min-width: 0; color: var(--text-secondary); font-size: calc(13px * var(--text-scale)); line-height: 1.25; overflow-wrap: anywhere; }
.report-stat__head .report-percent { flex: 0 0 auto; padding: 1px 7px; font-size: calc(11px * var(--text-scale)); }
.report-stat__body { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.report-stat__value { color: var(--text-primary); font-size: calc(16px * var(--text-scale)); font-weight: var(--font-weight-bold); }
.report-stat__change { color: var(--text-secondary); font-size: calc(12px * var(--text-scale)); }
.report-spark { width: 100%; height: 36px; color: rgb(var(--accent-rgb)); }
.report-folders { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); padding: var(--space-4); }
.report-folder summary { padding: var(--space-2) 0; color: var(--text-primary); font-size: calc(15px * var(--text-scale)); font-weight: var(--font-weight-bold); cursor: pointer; }
.report-folder summary small { color: var(--text-secondary); font-weight: 500; }
.report-list { display: grid; gap: var(--space-2); }
.report-item { padding: 0; overflow: hidden; }
.report-item > summary { list-style: none; }
.report-item > summary::-webkit-details-marker { display: none; }
.report-item--new { border-color: rgba(var(--accent-rgb), .55); }
.report-item__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); padding: 0 var(--space-4) var(--space-4); }
.report-editor__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); padding: var(--space-3); }
.report-editor__row.is-off { opacity: .6; }
.report-editor__head { display: flex; align-items: center; gap: var(--space-2); }
.report-editor__head .grow { display: grid; flex: 1; gap: 2px; min-width: 0; }
.report-editor__head strong { color: var(--text-primary); font-size: calc(15px * var(--text-scale)); }
.report-editor__head small { color: var(--text-secondary); font-size: calc(12px * var(--text-scale)); line-height: 1.35; }
.report-editor__move { display: grid; gap: 2px; }
.report-editor__move .athra-button { min-width: 32px; min-height: 26px; padding: 0; font-size: calc(14px * var(--text-scale)); }
.report-editor__label, .report-editor__inline input, .report-editor__inline select, .report-editor__target input { min-height: 40px; padding: 0 10px; border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--surface-card); color: var(--text-primary); font: inherit; font-size: calc(15px * var(--text-scale)); }
.report-editor__label { flex: 1; min-width: 0; }
.report-editor__options { display: flex; flex-wrap: wrap; align-items: end; gap: var(--space-2); padding-left: 38px; }
.report-editor__inline, .report-editor__target { display: grid; gap: 2px; color: var(--text-secondary); font-size: calc(12px * var(--text-scale)); }
.report-editor__inline input { width: 110px; }
.report-editor__target { grid-template-columns: auto 100px auto; align-items: center; gap: var(--space-2); padding-left: 38px; }
.report-editor__check { display: flex; align-items: center; gap: 6px; min-height: 40px; color: var(--text-secondary); font-size: calc(13px * var(--text-scale)); }
.report-editor__type { min-height: 40px; color: var(--text-primary); font-size: calc(14px * var(--text-scale)); line-height: 40px; }
.report-editor__remove { color: var(--text-danger); font-size: calc(13px * var(--text-scale)); }
.report-day-select select { min-height: 40px; padding: 0 8px; border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--surface-card); color: var(--text-primary); font: inherit; font-size: calc(14px * var(--text-scale)); }
.report-form-link { display: flex; align-items: center; gap: var(--space-3); width: 100%; text-align: left; cursor: pointer; }

/* mobile-48: the trainer's "Reports" screen and its dashboard entry. */
.reports-entry { display: flex; align-items: center; gap: var(--space-3); width: 100%; padding: var(--space-3) var(--space-4); text-align: left; cursor: pointer; }
.reports-entry__icon { display: grid; flex: 0 0 auto; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(var(--accent-rgb), .12); color: var(--accent-light); font-size: calc(20px * var(--text-scale)); }
.reports-entry__text { display: grid; flex: 1; gap: 2px; min-width: 0; }
.reports-entry__text strong { color: var(--text-primary); font-size: calc(15px * var(--text-scale)); }
.reports-entry__text small { color: var(--text-secondary); font-size: calc(13px * var(--text-scale)); }
.reports-entry--new { border-color: rgba(var(--accent-rgb), .6); box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .25); }
.reports-entry--new .reports-entry__text small { color: var(--accent-light); font-weight: var(--font-weight-bold); }
.reports-inbox-screen { display: grid; align-content: start; gap: var(--space-2); padding-left: 0; padding-right: 0; }
.reports-inbox-screen > :not(.chat-header) { margin: 0 var(--space-4); }
.reports-inbox__form { flex: 0 0 auto; min-height: 36px; padding: 6px 10px; font-size: calc(13px * var(--text-scale)); }
.reports-inbox__heading { margin-top: var(--space-2); color: var(--text-secondary); font-size: calc(12px * var(--text-scale)); letter-spacing: .06em; text-transform: uppercase; }
.reports-inbox__row { display: flex; align-items: center; gap: var(--space-3); width: auto; padding: var(--space-3); text-align: left; cursor: pointer; }
.reports-inbox__row--new { border-color: rgba(var(--accent-rgb), .6); background: linear-gradient(90deg, rgba(var(--accent-rgb), .12), transparent 70%); }
.reports-inbox__text { display: grid; flex: 1; gap: 2px; min-width: 0; }
.reports-inbox__text strong { overflow: hidden; color: var(--text-primary); font-size: calc(15px * var(--text-scale)); white-space: nowrap; text-overflow: ellipsis; }
.reports-inbox__text strong small { color: var(--text-secondary); font-weight: 500; }
.reports-inbox__text > small { overflow: hidden; color: var(--text-secondary); font-size: calc(13px * var(--text-scale)); white-space: nowrap; text-overflow: ellipsis; }
.reports-inbox__side { display: grid; flex: 0 0 auto; justify-items: end; gap: 4px; max-width: 45%; }
.reports-inbox__muted { color: var(--text-secondary); font-size: calc(12px * var(--text-scale)); text-align: right; }
.reports-inbox__stale { color: var(--color-warning); font-size: calc(12px * var(--text-scale)); text-align: right; }
.report-item--focus { border-color: rgba(var(--accent-rgb), .7); scroll-margin-top: var(--space-4); }

/* mobile-49: personal report forms, edited reports, the archive. */
.report-card-form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-3) var(--space-4); }
.report-card-form .grow { display: grid; flex: 1 1 160px; gap: 2px; min-width: 0; }
.report-card-form strong { color: var(--text-primary); font-size: calc(15px * var(--text-scale)); }
.report-card-form small { color: var(--text-secondary); font-size: calc(13px * var(--text-scale)); }
.report-card-form .athra-button { min-height: 38px; padding: 6px 14px; font-size: calc(13px * var(--text-scale)); }
.report-edited { display: block; color: var(--accent-light); font-size: calc(12px * var(--text-scale)); }
.report-item__manage { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid rgba(255, 255, 255, .06); }
.report-item__manage .athra-button { flex: 1 1 120px; min-height: 40px; font-size: calc(13px * var(--text-scale)); white-space: normal; }
.report-delete--confirm { font-weight: var(--font-weight-bold); }
.report-archive { display: grid; gap: var(--space-2); }
.report-archive__toggle { justify-self: start; font-size: calc(13px * var(--text-scale)); }
.report-editor__apply { display: grid; gap: var(--space-2); padding: var(--space-4); border-color: rgba(var(--accent-rgb), .6); }
.report-editor__apply strong { color: var(--text-primary); font-size: calc(15px * var(--text-scale)); }
.report-editor__apply small { color: var(--text-secondary); font-size: calc(13px * var(--text-scale)); }
.report-editor__apply-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--space-2); }
.report-editor__missing { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.report-editor__missing small { flex: 1 1 100%; color: var(--text-secondary); font-size: calc(13px * var(--text-scale)); }
.report-editor__missing .athra-button { min-height: 36px; padding: 6px 12px; font-size: calc(13px * var(--text-scale)); }

/* mobile-50: choosing and deleting notifications. */
.notifications-toolbar { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.notifications-toolbar .athra-button { flex: 1 1 110px; min-height: 40px; padding: 6px 12px; font-size: calc(13px * var(--text-scale)); white-space: normal; }
.notifications-toolbar--select { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); position: sticky; top: var(--space-2); z-index: 5; padding: var(--space-2); border: 1px solid rgba(var(--accent-rgb), .35); border-radius: var(--radius-lg); background: var(--surface-card); }
.notification-item.is-selectable { grid-template-columns: auto auto minmax(0, 1fr); cursor: pointer; }
.notification-item.is-selected { border-color: rgba(var(--accent-rgb), .7); background: rgba(var(--accent-rgb), .08); }
.notification-item__check { display: grid; place-items: center; align-self: center; }
.notification-item__check input { width: 22px; height: 22px; accent-color: rgb(var(--accent-rgb)); }

/* mobile-52: voice messages, video circles, recording */
.chat-voice { display: flex; align-items: center; gap: 8px; min-width: min(240px, 62vw); }
.chat-voice__play { display: grid; flex: 0 0 38px; width: 38px; height: 38px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: rgb(var(--accent-rgb)); color: #111; font-size: calc(15px * var(--text-scale)); cursor: pointer; }
.chat-voice__play:focus-visible, .chat-voice__speed:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
.chat-voice__track { display: grid; flex: 1 1 auto; gap: 2px; min-width: 0; }
.chat-voice__track input[type="range"] { width: 100%; height: 22px; margin: 0; background: transparent; accent-color: var(--accent-light); cursor: pointer; -webkit-appearance: none; appearance: none; }
.chat-voice__track input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: linear-gradient(to right, rgb(var(--accent-rgb)) var(--progress, 0%), rgba(255, 255, 255, .18) var(--progress, 0%)); }
.chat-voice__track input[type="range"]::-webkit-slider-thumb { width: 14px; height: 14px; margin-top: -5px; border: 0; border-radius: 50%; background: var(--accent-light); -webkit-appearance: none; appearance: none; }
.chat-voice__track input[type="range"]::-moz-range-track { height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .18); }
.chat-voice__track input[type="range"]::-moz-range-progress { height: 4px; border-radius: 999px; background: rgb(var(--accent-rgb)); }
.chat-voice__track input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--accent-light); }
.chat-voice__time { color: var(--text-secondary); font-size: calc(11px * var(--text-scale)); font-variant-numeric: tabular-nums; }
.chat-voice__speed { flex: 0 0 auto; min-width: 40px; min-height: 28px; padding: 2px 6px; border: 1px solid rgba(var(--accent-rgb), .45); border-radius: 999px; background: rgba(var(--accent-rgb), .1); color: var(--accent-light); font: inherit; font-size: calc(12px * var(--text-scale)); font-weight: 700; cursor: pointer; }
.chat-voice.is-unavailable, .chat-circle.is-unavailable { opacity: .55; }
.chat-message--circle .chat-bubble { padding: 4px; border: 0; background: transparent; }
.chat-message--mine.chat-message--circle .chat-bubble { background: transparent; }
.chat-circle { position: relative; display: block; width: min(200px, 56vw); aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .06); overflow: hidden; cursor: pointer; }
.chat-circle video, .chat-circle-recorder__frame video { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.chat-circle__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.chat-circle__ring circle { fill: none; stroke: rgb(var(--accent-rgb)); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset .2s linear; }
.chat-circle__badge { position: absolute; left: 50%; bottom: 10px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: calc(12px * var(--text-scale)); font-variant-numeric: tabular-nums; white-space: nowrap; transform: translateX(-50%); }
.chat-composer.is-recording .chat-composer__row { display: none; }
.chat-composer__row > [hidden] { display: none; }
.chat-recorder { display: flex; align-items: center; gap: var(--space-2); min-height: 48px; }
.chat-recorder > span:first-child { flex: 1; color: var(--text-secondary); font-size: calc(14px * var(--text-scale)); }
.chat-recorder__time { flex: 1 1 auto; color: var(--text-primary); font-size: calc(15px * var(--text-scale)); font-variant-numeric: tabular-nums; }
.chat-recorder__dot { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--color-danger); animation: chat-recording-dot 1s ease-in-out infinite; }
@keyframes chat-recording-dot { 50% { opacity: .25; } }
.chat-circle-recorder { justify-items: center; }
.chat-circle-recorder > .athra-button { justify-content: center; width: 100%; }
.chat-circle-recorder__frame { position: relative; display: grid; width: min(260px, 70vw); aspect-ratio: 1; place-items: center; border-radius: 50%; background: #000; overflow: hidden; }
.chat-circle-recorder__frame video[data-chat-circle-live] { transform: scaleX(-1); }
.chat-circle-recorder__frame .chat-circle__ring circle { stroke-width: 4; }
.chat-circle-recorder__frame.is-recording .chat-circle__ring circle { stroke: var(--color-danger); }
.chat-circle-recorder__wait { position: absolute; color: var(--text-secondary); font-size: calc(14px * var(--text-scale)); }
.chat-circle-recorder__time { color: var(--text-primary); font-size: calc(16px * var(--text-scale)); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .chat-recorder__dot { animation: none; } .chat-circle__ring circle { transition: none; } }

/* mobile-53: collages of 2–4 report photos */
.report-folders .client-ledger-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.report-folders__collage { flex: 0 0 auto; min-height: 36px; font-size: calc(13px * var(--text-scale)); white-space: nowrap; }
.report-folders.is-picking { padding-bottom: calc(230px * var(--text-scale)); }
.report-folders.is-picking .report-photo-open { position: relative; }
.report-folders.is-picking .report-photo-open img { transition: opacity .15s ease; }
.report-folders.is-picking .report-photo-open:disabled img { opacity: .35; }
.report-photo-open.is-selected { outline: 3px solid rgb(var(--accent-rgb)); outline-offset: -3px; }
.collage-badge { position: absolute; top: 6px; right: 6px; display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: rgb(var(--accent-rgb)); color: #111; font-size: calc(13px * var(--text-scale)); }
/* Fixed above the bottom menu: .screen has overflow-x: hidden, so position: sticky would not follow the page. */
.collage-picker { position: fixed; z-index: 21; left: 50%; bottom: calc(var(--bottom-nav-height, 84px) + env(safe-area-inset-bottom)); width: min(calc(100% - 24px), 406px); transform: translateX(-50%); display: grid; gap: var(--space-2); padding: var(--space-3); border: 1px solid rgba(var(--accent-rgb), .45); border-radius: 16px; background: var(--surface-panel); box-shadow: 0 8px 28px rgba(0, 0, 0, .45); }
.collage-picker__count { color: var(--text-primary); font-size: calc(15px * var(--text-scale)); font-weight: 700; }
.collage-picker > small { color: var(--text-secondary); font-size: calc(13px * var(--text-scale)); }
.collage-picker__actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--space-2); }
.collage-suggest { display: grid; justify-items: start; gap: 2px; min-height: 44px; text-align: left; }
.collage-suggest small { color: var(--text-secondary); font-size: calc(12px * var(--text-scale)); font-weight: 400; }
.collage-screen { display: grid; align-content: start; gap: var(--space-3); padding-left: 0; padding-right: 0; padding-bottom: calc(var(--space-5, 24px) + env(safe-area-inset-bottom)); }
.collage-screen > :not(.chat-header) { margin: 0 var(--space-4); }
.collage-preview { display: grid; min-height: 220px; place-items: center; border-radius: 16px; background: #0e0e10; overflow: hidden; }
.collage-preview__image { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; }
.collage-preview__wait { padding: var(--space-4); color: var(--text-secondary); font-size: calc(14px * var(--text-scale)); text-align: center; }
.collage-period { margin-top: calc(var(--space-2) * -1); color: var(--accent-light); font-size: calc(13px * var(--text-scale)); text-align: center; }
.collage-options { display: grid; gap: var(--space-3); padding: var(--space-3); }
.collage-options__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); color: var(--text-primary); font-size: calc(14px * var(--text-scale)); }
.collage-options__toggle input { width: 46px; height: 26px; accent-color: var(--accent-light); }
.collage-segmented { display: inline-flex; padding: 3px; border: 1px solid var(--border-soft); border-radius: 999px; background: var(--surface-card); }
.collage-segmented__item { min-height: 34px; padding: 4px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--text-secondary); font: inherit; font-size: calc(13px * var(--text-scale)); white-space: nowrap; cursor: pointer; }
.collage-segmented__item.is-active { background: rgba(var(--accent-rgb), .2); color: var(--accent-light); font-weight: 700; }
.collage-order { display: grid; gap: var(--space-2); color: var(--text-primary); font-size: calc(14px * var(--text-scale)); }
.collage-order__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); }
.collage-order__item { display: grid; justify-items: center; gap: 4px; }
.collage-order__item img { width: 100%; aspect-ratio: 3 / 4; border-radius: 10px; object-fit: cover; background: rgba(255, 255, 255, .05); }
.collage-order__item small { color: var(--text-secondary); font-size: calc(11px * var(--text-scale)); }
.collage-order__item .athra-button { min-width: 36px; min-height: 32px; padding: 0; }
.collage-comment { display: grid; gap: 6px; color: var(--text-primary); font-size: calc(14px * var(--text-scale)); }
.collage-comment textarea { min-height: 60px; padding: 10px 12px; border: 1px solid var(--border-default); border-radius: 14px; background: var(--surface-card); color: var(--text-primary); font: inherit; font-size: calc(15px * var(--text-scale)); resize: vertical; }
.collage-actions { display: grid; gap: var(--space-2); }
.collage-actions .athra-button { justify-content: center; min-height: 48px; }

/* mobile-54: videos in weekly reports */
.report-videos { display: grid; gap: var(--space-2); margin-top: var(--space-3); }
.report-video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.report-video-grid:empty { display: none; }
.report-video-thumb { position: relative; display: grid; min-height: 96px; place-items: center; border: 1px solid var(--border-soft); border-radius: 12px; background: linear-gradient(160deg, rgba(var(--accent-rgb), .18), rgba(255, 255, 255, .04)); overflow: hidden; }
.report-video-thumb.is-busy { background: rgba(255, 255, 255, .05); }
.report-video-thumb__play, .report-video-open { display: grid; width: 100%; height: 100%; min-height: 96px; padding: 8px; place-items: center; align-content: center; gap: 4px; border: 0; background: transparent; color: var(--text-primary); font: inherit; cursor: pointer; }
.report-video-thumb__play > span, .report-video-open > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: rgb(var(--accent-rgb)); color: #111; font-size: calc(15px * var(--text-scale)); }
.report-video-thumb__play small, .report-video-open small { color: var(--text-secondary); font-size: calc(12px * var(--text-scale)); font-variant-numeric: tabular-nums; }
.report-video-thumb__state small { color: var(--text-secondary); font-size: calc(12px * var(--text-scale)); }
.report-video-thumb__remove { position: absolute; top: 4px; right: 4px; min-width: 30px; min-height: 30px; padding: 0; font-size: calc(13px * var(--text-scale)); }
.report-video-progress { display: grid; width: calc(100% - 16px); gap: 4px; justify-items: center; text-align: center; }
.report-video-progress small { color: var(--text-secondary); font-size: calc(11px * var(--text-scale)); }
.report-video-progress b { color: var(--text-primary); font-size: calc(12px * var(--text-scale)); font-variant-numeric: tabular-nums; }
.report-video-progress__bar { display: block; width: 100%; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.report-video-progress__bar > span { display: block; height: 100%; background: rgb(var(--accent-rgb)); transition: width .2s linear; }
.report-video-add { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: var(--space-2); }
.report-video-add .athra-button { justify-content: center; min-height: 44px; font-size: calc(14px * var(--text-scale)); cursor: pointer; }
.report-video-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); margin: var(--space-2) 0; }
.report-video-open { border: 1px solid var(--border-soft); border-radius: 12px; background: linear-gradient(160deg, rgba(var(--accent-rgb), .18), rgba(255, 255, 255, .04)); }
.report-video-viewer { position: fixed; inset: 0; z-index: 9999; display: grid; padding: calc(env(safe-area-inset-top) + 48px) 8px calc(env(safe-area-inset-bottom) + 12px); place-items: center; background: rgba(0, 0, 0, .92); }
.report-video-viewer video { max-width: 100%; max-height: 100%; border-radius: 12px; background: #000; }
.report-video-viewer__close { position: absolute; top: calc(env(safe-area-inset-top) + 8px); right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: calc(18px * var(--text-scale)); cursor: pointer; }
.report-video-recorder { justify-items: center; }
.report-video-recorder > .athra-button { justify-content: center; width: 100%; }
.report-video-recorder__frame { position: relative; display: grid; width: 100%; aspect-ratio: 3 / 4; max-height: 56vh; place-items: center; border: 2px solid transparent; border-radius: 16px; background: #000; overflow: hidden; }
.report-video-recorder__frame.is-recording { border-color: var(--color-danger); }
.report-video-recorder__frame video { width: 100%; height: 100%; object-fit: cover; }
.report-video-recorder__frame video[data-report-recorder-draft] { object-fit: contain; }
.report-video-recorder__frame video.is-mirrored { transform: scaleX(-1); }
.report-video-recorder__wait { position: absolute; color: var(--text-secondary); font-size: calc(14px * var(--text-scale)); }
.report-video-recorder__rec { position: absolute; top: 10px; left: 12px; color: var(--color-danger); font-size: calc(13px * var(--text-scale)); font-weight: 700; animation: chat-recording-dot 1s ease-in-out infinite; }
.report-video-recorder__time { color: var(--text-primary); font-size: calc(16px * var(--text-scale)); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .report-video-recorder__rec { animation: none; } }

/* mobile-55: «📎 Файл» (original quality) */
.report-video-thumb__badge { padding: 1px 6px; border-radius: 999px; background: rgba(var(--accent-rgb), .2); color: var(--accent-light); font-size: calc(10px * var(--text-scale)); }

/* mobile-56: permanent weekly schedule (card block + editor) */
.recurring-card__days { margin: var(--space-2) 0 var(--space-3); font-size: calc(17px * var(--text-scale)); font-weight: 600; color: var(--accent-light); }
.recurring-card__empty { margin: var(--space-2) 0 0; color: var(--text-secondary); font-size: calc(14px * var(--text-scale)); }
.recurring-card__actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.recurring-card__edit { flex: 0 0 auto; }
.recurring-result { margin-top: var(--space-3); padding: var(--space-3); border-radius: 14px; border: 1px solid var(--border-soft); background: rgba(var(--accent-rgb), 0.06); display: grid; gap: var(--space-2); }
.recurring-result ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: calc(14px * var(--text-scale)); }
.recurring-result__ok { color: var(--text-primary); }
.recurring-result__skip { color: var(--text-secondary); }
.recurring-screen > :not(.chat-header) { margin-left: var(--space-4); margin-right: var(--space-4); }
.recurring-screen__hint { color: var(--text-secondary); font-size: calc(14px * var(--text-scale)); margin-top: var(--space-3); }
.recurring-days { display: grid; gap: 0; padding: var(--space-2) var(--space-3) !important; }
.recurring-day { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-2); padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.recurring-day:last-child { border-bottom: 0; }
.recurring-day__toggle span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recurring-day__toggle { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: calc(15px * var(--text-scale)); cursor: pointer; }
.recurring-day__toggle input { width: 22px; height: 22px; accent-color: var(--accent-light); flex: 0 0 auto; }
.recurring-day:not(.is-on) .recurring-day__toggle span { color: var(--text-secondary); }
.recurring-day input[type="time"] { width: 7.2em; font-size: calc(15px * var(--text-scale)); padding: 8px 4px; border-radius: 10px; border: 1px solid var(--border-soft); background: var(--surface-panel); color: inherit; min-width: 0; }
.recurring-day input[type="time"]:disabled { opacity: 0.35; }
.recurring-screen__actions { display: grid; gap: 12px; margin-top: var(--space-4); margin-bottom: var(--space-6); }
.recurring-screen__note { color: var(--text-secondary); font-size: calc(13px * var(--text-scale)); text-align: center; }

/* mobile-57: debtors */
.debtors-screen { display: grid; align-content: start; gap: var(--space-2); padding-left: 0; padding-right: 0; }
.debtors-screen > :not(.chat-header) { margin: 0 var(--space-4); }
.debtors-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); margin-top: var(--space-3) !important; }
.debtors-summary__tile { display: grid; gap: 4px; padding: var(--space-3) !important; min-width: 0; }
.debtors-summary__tile small { color: var(--text-secondary); font-size: calc(12px * var(--text-scale)); }
.debtors-summary__tile strong { font-size: calc(18px * var(--text-scale)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.debtors-screen .reports-inbox__heading small { color: var(--text-secondary); font-weight: 400; text-transform: none; letter-spacing: 0; font-size: calc(13px * var(--text-scale)); }
.debtor-row { display: grid; gap: var(--space-3); padding: var(--space-3) !important; }
.debtor-row--owes { border-color: rgba(229, 115, 115, 0.45); }
.debtor-row__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); background: none; border: 0; padding: 0; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.debtor-row__text { display: grid; gap: 3px; min-width: 0; }
.debtor-row__text strong { font-size: calc(16px * var(--text-scale)); overflow-wrap: anywhere; }
.debtor-row__text small { color: var(--text-secondary); font-size: calc(13px * var(--text-scale)); }
.debtor-row__planned { color: var(--text-accent) !important; }
.debtor-row__money { display: grid; justify-items: end; gap: 2px; }
.debtor-row__money strong { font-size: calc(17px * var(--text-scale)); white-space: nowrap; }
.debtor-row__money small { color: var(--text-secondary); font-size: calc(12px * var(--text-scale)); white-space: nowrap; }
.debtor-row__negative { color: var(--text-danger); }
.debtor-row__actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 12px; align-items: center; }
.debtor-row__note { color: var(--text-secondary); font-size: calc(12px * var(--text-scale)); }
.debtors-screen__hint { color: var(--text-secondary); font-size: calc(13px * var(--text-scale)); margin-bottom: var(--space-5); }

/* mobile-58: packages and monthly passes */
.packages-screen { display: grid; align-content: start; gap: var(--space-3); padding-left: 0; padding-right: 0; padding-bottom: var(--space-5); }
.packages-screen > :not(.chat-header) { margin: 0 var(--space-4); }
.packages-screen__hint { color: var(--text-secondary); font-size: calc(14px * var(--text-scale)); margin-top: var(--space-3) !important; }
.package-template { display: grid; gap: var(--space-2); padding: var(--space-3) !important; }
.package-template__text { display: grid; gap: 3px; min-width: 0; }
.package-template__text strong { font-size: calc(16px * var(--text-scale)); overflow-wrap: anywhere; }
.package-template__text small { color: var(--text-secondary); font-size: calc(13px * var(--text-scale)); }
.package-template__unit { color: var(--text-accent) !important; }
.package-template__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.package-form { display: grid; gap: var(--space-3); padding: var(--space-4) !important; }
.package-form h3 { margin: 0; font-size: calc(17px * var(--text-scale)); }
.package-form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); gap: var(--space-3); }
.package-form__actions { display: grid; gap: 12px; }
.package-form__note { color: var(--text-secondary); font-size: calc(12px * var(--text-scale)); }
.package-field { display: grid; gap: 6px; min-width: 0; }
.package-field > span:first-child { color: var(--text-secondary); font-size: calc(13px * var(--text-scale)); }
.package-field__input { display: flex; align-items: center; gap: 8px; min-width: 0; }
.package-field__input input { flex: 1 1 auto; min-width: 0; font-size: calc(16px * var(--text-scale)); padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border-soft); background: var(--surface-panel); color: inherit; }
.package-field__input small { color: var(--text-secondary); font-size: calc(13px * var(--text-scale)); white-space: nowrap; }
.package-terms { flex-wrap: wrap; }
.package-preview { display: grid; gap: 4px; margin: 0; padding: var(--space-3); border-radius: 12px; background: rgba(var(--accent-rgb), 0.08); font-size: calc(14px * var(--text-scale)); }
.package-preview strong { font-size: calc(17px * var(--text-scale)); color: var(--accent-light); }
.package-preview__saving { color: var(--text-success); }
.package-add { justify-self: stretch; }
.package-templates-pick { flex-wrap: wrap; }
.client-packages { display: grid; gap: var(--space-3); }
.client-packages__sell { flex: 0 0 auto; }
.package-line { display: grid; gap: 6px; padding: var(--space-3); border-radius: 14px; border: 1px solid var(--border-soft); }
.package-line--ending { border-color: rgba(var(--accent-rgb), 0.7); }
.package-line__head { display: flex; justify-content: space-between; gap: var(--space-2); align-items: baseline; }
.package-line__head strong { font-size: calc(15px * var(--text-scale)); overflow-wrap: anywhere; }
.package-line__head b { font-size: calc(17px * var(--text-scale)); white-space: nowrap; color: var(--accent-light); }
.package-line small { color: var(--text-secondary); font-size: calc(13px * var(--text-scale)); }
.package-progress { display: block; height: 6px; border-radius: 999px; background: var(--surface-panel); overflow: hidden; }
.package-progress span { display: block; height: 100%; border-radius: inherit; background: var(--accent-light); }
.client-packages__history summary { cursor: pointer; color: var(--text-secondary); font-size: calc(13px * var(--text-scale)); }
.client-packages__history ul { margin: var(--space-2) 0 0; padding-left: 18px; color: var(--text-secondary); font-size: calc(13px * var(--text-scale)); display: grid; gap: 4px; }
.client-home-package { display: grid; gap: var(--space-2); }
.client-home-package h3 { margin: 0; font-size: calc(16px * var(--text-scale)); }
.client-home-package__note { color: var(--text-secondary); font-size: calc(12px * var(--text-scale)); }
