:root {
  --bg: #f4f7fb;
  --bg-soft: #edf2f7;
  --card: #ffffff;
  --card-soft: rgba(255, 255, 255, 0.82);
  --text: #0f172a;
  --muted: #667085;
  --line: #e5e7eb;
  --line-strong: rgba(15, 23, 42, 0.08);
  --primary: #2f6df6;
  --primary-2: #3b82f6;
  --primary-soft: rgba(47, 109, 246, 0.1);
  --accent: #16a34a;
  --danger: #ef4444;
  --warn: #f59e0b;
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 44px rgba(15, 23, 42, 0.12);
  --radius: 18px;
  --radius-lg: 24px;
  --premium-coach: #1ec6b6;
  --premium-coach-soft: #e8fbf8;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--text);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    "SF Pro Display",
    "SF Pro Text",
    Inter,
    Roboto,
    Arial,
    sans-serif;
  background:
    radial-gradient(
      circle at top left,
      rgba(47, 109, 246, 0.06),
      transparent 24%
    ),
    radial-gradient(
      circle at top right,
      rgba(22, 163, 74, 0.05),
      transparent 18%
    ),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}
summary {
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
details summary:after {
  content: " ▾";
  color: var(--muted);
}

.app {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  grid-template-rows: 72px minmax(0, 1fr);
  grid-template-areas:
    "topbar topbar"
    "sidebar content";
  min-height: 100vh;
}

.topbar {
  grid-area: topbar;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--primary), #60a5fa);
}
.logo-img,
.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
  border: none;
  box-shadow: none;
  background: transparent;
}
.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.brand-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.brand-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.topbar-actions,
.topbar-right {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.field-label {
  font-size: 11px;
  line-height: 1;
  color: var(--muted);
}

.sidebar {
  grid-area: sidebar;
  min-width: 0;
  padding: 16px 14px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nav-item {
  position: relative;
  overflow: hidden;
  height: 46px;
  width: 100%;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-weight: 700;
  color: #172033;
}
.nav-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(47, 109, 246, 0.1),
    transparent
  );
  opacity: 0;
  transition: opacity 0.18s ease;
}
.nav-item:hover::before {
  opacity: 1;
}
.nav-item:hover {
  background: rgba(47, 109, 246, 0.07);
}
.nav-item.active {
  background: linear-gradient(
    135deg,
    rgba(47, 109, 246, 0.14),
    rgba(47, 109, 246, 0.06)
  );
  border-color: rgba(47, 109, 246, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.nav-item:active,
.bn-item:active,
.btn:active {
  transform: scale(0.98);
}

.nav-label-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.1;
}

.nav-mini-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: rgba(148, 163, 184, 0.16);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #64748b;
}

.nav-item.nav-item-premium[data-locked="1"] {
  opacity: 0.58;
  background: rgba(148, 163, 184, 0.05);
  border-color: rgba(148, 163, 184, 0.1);
}

.nav-item.nav-item-premium[data-locked="1"]:hover {
  background: rgba(148, 163, 184, 0.08);
}

.nav-item.nav-item-premium[data-locked="1"] i {
  opacity: 0.7;
}

.nav-item.nav-item-premium[data-locked="1"] .nav-mini-pill {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.24);
  color: #92400e;
}

.nav-item.nav-item-premium {
  border-color: rgba(245, 158, 11, 0.12);
}

.nav-item.nav-item-premium i {
  color: #d97706;
  opacity: 0.95;
}

.nav-item.nav-item-premium:hover {
  background: rgba(245, 158, 11, 0.08);
}

.nav-item.nav-item-premium.active {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.16),
    rgba(245, 158, 11, 0.08)
  );
  border-color: rgba(245, 158, 11, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.nav-item.nav-item-premium.active i {
  color: #b45309;
  opacity: 1;
}

.nav-item.nav-item-premium .nav-label-stack > span:first-child {
  color: #7c2d12;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
}
.mini-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
}
.mini-card-title {
  font-size: 12px;
  color: var(--muted);
}
.mini-card-value {
  margin-top: 6px;
  font-weight: 800;
}

.content {
  grid-area: content;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 22px 16px 28px;
  max-width: 100%;
}

.page-header,
.grid {
  width: 100%;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}
.page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.03em;
}
.page-meta {
  color: var(--muted);
  font-size: 13px;
}

.grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.card {
  grid-column: span 6;
  background: var(--card-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-lg);
  box-shadow:
    var(--shadow-md),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  padding: 18px;
}
.card.full {
  grid-column: span 12;
}
.card.third {
  grid-column: span 4;
}
.card-title {
  font-weight: 850;
  font-size: 17px;
  margin-bottom: 4px;
}
.card-sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 14px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
  flex-wrap: wrap;
}

.btn,
.select,
.kp-input,
.icon-btn {
  appearance: none;
  outline: none;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}
.btn,
.select,
.icon-btn {
  height: 42px;
}
.btn {
  padding: 0 16px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 750;
  transition:
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease,
    border-color 0.18s ease;
}
.btn:hover {
  filter: none;
  transform: translateY(-1px);
}
.btn-primary {
  border: none;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow:
    0 10px 22px rgba(47, 109, 246, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover {
  box-shadow:
    0 12px 26px rgba(47, 109, 246, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.62);
}
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

.select {
  padding: 0 12px;
  border-radius: 14px;
}
.kp-input {
  width: 100%;
  height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
}
.select:focus,
.kp-input:focus,
textarea:focus,
input[type="number"]:focus,
input[type="text"]:focus,
input[type="password"]:focus {
  border-color: rgba(47, 109, 246, 0.35);
  box-shadow: 0 0 0 4px rgba(47, 109, 246, 0.1);
}
.icon-btn {
  width: 38px;
  border-radius: 12px;
  cursor: pointer;
}

.badge,
.pill,
.chip,
.dosage-pill,
.duration-pill,
.premium-pill,
.toggle-pill,
.dosage-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  white-space: nowrap;
}
.badge {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
  border-color: rgba(22, 163, 74, 0.18);
}
.badge.soft {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.18);
  color: #1d4ed8;
}
.pill {
  background: rgba(15, 23, 42, 0.03);
}
.pill-warn {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.26);
}
.pill-muted {
  opacity: 0.65;
}
.chip {
  padding: 4px 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.8);
}
.chip-danger {
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
}
.dosage-badge,
.dosage-pill {
  background: rgba(47, 109, 246, 0.08);
  border-color: rgba(47, 109, 246, 0.18);
  color: #1d4ed8;
}
.duration-pill {
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.18);
  color: #166534;
}
.premium-pill {
  background: rgba(148, 163, 184, 0.14);
  color: #64748b;
  border-color: rgba(148, 163, 184, 0.35);
}
.premium-pill[data-on="1"] {
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.4);
}
.premium-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}
.premium-pill[data-on="1"] .premium-dot {
  background: #f59e0b;
}

.progress {
  height: 12px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.08);
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.05);
}
.progress > div {
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, var(--primary), #60a5fa);
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(248, 250, 252, 0.78);
}
.item:hover {
  background: rgba(255, 255, 255, 0.95);
}
.item-left {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.item-title {
  font-weight: 800;
}
.item-sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.thumb {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #e0e7ff, #f3f4f6);
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #374151;
}
.item-exo {
  gap: 12px;
}
.item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 90px;
}

.kpi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.kpi .box {
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
}
.kpi .label {
  font-size: 12px;
  color: var(--muted);
}
.kpi .value {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.slider-wrap {
  display: grid;
  gap: 10px;
}
.slider-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}
input[type="range"] {
  width: 100%;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}
.toggle-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.switch {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.06);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
  transition: transform 0.15s ease;
}
.switch.on {
  background: rgba(47, 109, 246, 0.18);
  border-color: rgba(47, 109, 246, 0.35);
}
.switch.on::after {
  transform: translateX(22px);
}
.switch input {
  display: none;
}
.switch .track {
  width: 42px;
  height: 24px;
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  position: relative;
  border: 1px solid var(--line);
  transition: 0.15s;
}
.switch .thumb {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  position: absolute;
  top: 1px;
  left: 1px;
  transition: 0.15s;
}
.switch input:checked + .track {
  background: rgba(16, 185, 129, 0.35);
}
.switch input:checked + .track .thumb {
  left: 21px;
}
.toggle-pill {
  height: 28px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
}
.toggle-pill strong {
  color: #111827;
}

.notice {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(59, 130, 246, 0.08);
  color: var(--text);
}
.notice.warn {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.25);
}
.notice.danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
}

.bottomnav.apple-tabbar {
  display: none;
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 12px;
  height: 74px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 18px 38px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  gap: 4px;
  z-index: 40;
  align-items: stretch;
}

.bottomnav.apple-tabbar .bn-item {
  position: relative;
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 18px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 2px;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.12s ease,
    box-shadow 0.18s ease;
}

.bottomnav.apple-tabbar .bn-item:hover {
  background: rgba(15, 23, 42, 0.04);
}

.bottomnav.apple-tabbar .bn-item.active {
  background: linear-gradient(
    180deg,
    rgba(47, 109, 246, 0.16),
    rgba(47, 109, 246, 0.08)
  );
  color: #1d4ed8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 8px 18px rgba(47, 109, 246, 0.14);
}

.bottomnav.apple-tabbar .bn-item.active .bn-label {
  color: #1d4ed8;
}

.bottomnav.apple-tabbar .bn-icon {
  display: block;
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  opacity: 0.95;
}

.bottomnav.apple-tabbar .bn-label {
  display: block;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: inherit;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .bottomnav.apple-tabbar {
    display: flex;
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 18px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(15, 23, 42, 0.45);
  z-index: 50;
}
.modal {
  width: min(860px, 96vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  padding: 14px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 0 0 auto;
}
.modal-title {
  font-weight: 900;
}
.modal-body {
  color: #374151;
  margin: 12px 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 6px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
}
.modal-card {
  width: min(720px, 100%);
  max-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
}
.modal-content {
  flex: 1 1 auto;
  overflow: auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
.modal-card:not(:has(.modal-content)) {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  padding: 10px 12px;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  backdrop-filter: blur(10px);
}

.admin-fab {
  position: fixed;
  left: 14px;
  bottom: 86px;
  z-index: 60;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.14);
}
.admin-fab:active {
  transform: translateY(1px);
}

.cover {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
  background:
    radial-gradient(
      1200px 800px at 30% 20%,
      rgba(0, 160, 160, 0.12),
      transparent 55%
    ),
    radial-gradient(
      900px 700px at 80% 30%,
      rgba(80, 130, 255, 0.12),
      transparent 60%
    ),
    radial-gradient(
      1200px 800px at 50% 90%,
      rgba(255, 255, 255, 0.65),
      rgba(248, 250, 252, 1)
    );
}
.cover-card {
  width: min(640px, 100%);
  background: transparent !important;
  border: none !important;
  padding: 28px;
  box-shadow: none !important;
  text-align: center;
  backdrop-filter: none;
}
.cover-title {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  margin-top: 10px;
}
.cover-subtitle {
  font-size: 14px;
  color: rgba(15, 23, 42, 0.65);
  margin-top: 2px;
}
.cover-btn {
  margin-top: 16px;
  min-width: 160px;
}
.cover-hint {
  margin-top: 16px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.55);
}

.login-wrapper {
  max-width: 520px;
  margin: 44px auto;
  padding: 0 16px 24px;
}
.login-wrapper .card {
  background: rgba(255, 255, 255, 0.58) !important;
  border: 1px solid rgba(255, 255, 255, 0.46) !important;
  backdrop-filter: blur(16px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(140%) !important;
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}
.login-wrapper .notice {
  background: rgba(59, 130, 246, 0.1) !important;
  border-color: rgba(59, 130, 246, 0.22) !important;
  backdrop-filter: blur(10px) !important;
}
.login-wrapper .install-hint {
  background: rgba(148, 163, 184, 0.16) !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
  backdrop-filter: blur(10px) !important;
}
.login-wrapper .card,
.login-wrapper .notice,
.login-wrapper .install-hint {
  color: var(--text);
}

.login-hero {
  width: 100%;
  max-width: 520px;
  margin: 0 auto 18px;
  display: grid;
  gap: 14px;
  text-align: center;
}
.login-logo {
  width: 190px !important;
  height: auto !important;
  display: block;
  object-fit: contain;
  margin: 0 auto;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.18)) !important;
}
.login-title {
  display: none !important;
}
.login-subtitle,
.login-sub {
  color: #64748b;
  font-size: 14px;
  line-height: 1.4;
}
.install-hint,
.tip-card {
  margin-top: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(148, 163, 184, 0.14);
}
.tip-card strong {
  font-weight: 950;
}

.login-screen {
  grid-column: 1 / -1;
  width: 100%;
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 14px;
}
.login-floating {
  width: min(720px, 100%);
  display: flex;
  justify-content: center;
}
.login-logo-float {
  width: 110px;
  height: 110px;
  border-radius: 22px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.75);
  padding: 10px;
}
.login-h1 {
  margin-top: 16px;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
  text-align: center;
}
.login-box {
  margin-top: 18px;
  width: min(520px, 100%);
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.1);
}
.login-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.login-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.login-footer {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.homeScreen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.homeHero {
  width: min(560px, 92vw);
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0;
  text-align: center;
}
.homeLogoWrap {
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.homeLogoWrap img {
  width: 130px;
  height: auto;
  object-fit: contain;
  display: block;
  margin-bottom: 20px;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
}
.homeTitle {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.2px;
  margin: 0;
}
.homeSub {
  margin-top: 6px;
  font-size: 14px;
  opacity: 0.78;
}
.homeAuth,
.homeRow,
.homeButtons {
  width: 100%;
  display: grid;
  gap: 10px;
}
.homeAuth {
  margin-top: 18px;
  justify-items: center;
}
.homeInputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}
.homeInputs input {
  width: 100%;
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  background: rgba(255, 255, 255, 0.8) !important;
  color: var(--text);
  outline: none;
  visibility: visible !important;
  transition: all 0.2s ease;
}
.homeInputs input:focus {
  background: #fff;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}
.homeBtnPrimary {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 0;
  font-weight: 800;
  cursor: pointer;
}
.homeBtnGhost {
  width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  cursor: pointer;
}
.homeFooter,
.homeHint {
  margin-top: 18px;
  font-size: 12.5px;
  opacity: 0.78;
  line-height: 1.35;
}
.homeHint {
  margin-top: 10px;
  opacity: 0.75;
}
.homeHint strong {
  font-weight: 900;
}

.kp-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.kp-row > * {
  flex: 1 1 160px;
}
.kp-check input {
  transform: scale(1.1);
}

.consent-box,
.stretch-box {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
}
.stretch-head {
  font-weight: 700;
  margin-bottom: 10px;
}
.stretch-item {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px dashed rgba(0, 0, 0, 0.1);
}
.stretch-item:first-of-type {
  border-top: none;
  padding-top: 0;
}
.stretch-title {
  font-weight: 600;
}

.p-list {
  max-height: 55vh;
  overflow: auto;
  padding-right: 6px;
}
.p-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.p-row:first-child {
  border-top: none;
}
.p-code {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.5px;
}
.p-actions {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.exercise-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.premium-grid-wrapper {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
  padding: 8px 10px 30px;
}
.premium-home-grid {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 14px !important;
  justify-items: stretch !important;
  align-items: stretch !important;
}
.premium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  width: 100%;
}
.premium-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  width: 100%;
}
.premium-home-grid > .card,
.premium-home-grid > .premium-card {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: none !important;
  justify-self: stretch !important;
}
.premium-card {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(16, 185, 129, 0.14);
  background: linear-gradient(
    180deg,
    rgba(240, 255, 250, 0.96),
    rgba(255, 255, 255, 0.98)
  );
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.06);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.premium-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.premium-card > :first-child {
  display: grid;
  place-items: center;
}
.premium-card h3 {
  font-size: 15px;
  font-weight: 700;
}
.premium-card .muted {
  line-height: 1.35;
  margin-top: 2px;
}
.premium-card .btn {
  margin-top: auto;
  white-space: nowrap;
  align-self: flex-start;
}
.premium-catbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.premium-chip {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}
.premium-chip.active {
  border-color: rgba(47, 109, 246, 0.55);
  background: rgba(47, 109, 246, 0.08);
}
.premium-video {
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.premium-video:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  transition: 0.15s;
}
.premium-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: rgba(148, 163, 184, 0.14);
  display: block;
  object-fit: cover;
}
.premium-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 170px;
}
.premium-title {
  font-weight: 900;
  line-height: 1.15;
}
.premium-desc,
.premium-meta {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.35;
}
.premium-desc {
  font-size: 13px;
}
.premium-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
}

@media (min-width: 1100px) {
  .premium-grid-wrapper {
    padding: 10px 24px 40px;
  }
  .premium-cards {
    gap: 22px;
  }
}

@media (max-width: 1100px) {
  .app {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .brand-subtitle {
    max-width: 140px;
  }
}

@media (max-width: 920px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: 72px minmax(0, 1fr);
    grid-template-areas:
      "topbar"
      "content";
  }
  .sidebar {
    display: none;
  }
  .content {
    padding: 16px 14px 84px;
  }
  .page-header,
  .grid {
    max-width: none;
  }
  .bottomnav {
    display: flex;
  }
  .card,
  .card.third {
    grid-column: span 12;
  }
  .topbar {
    padding: 12px 14px;
  }
}

@media (max-width: 720px) {
  .modal {
    max-height: 90vh;
  }
  .modal-card {
    max-height: 86vh;
  }
}

@media (max-width: 520px) {
  .item-exo {
    flex-direction: column;
  }
  .item-right {
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
  }
  .premium-card {
    grid-template-columns: 40px 1fr;
    grid-template-rows: auto auto;
    align-items: start;
  }
  .premium-card .btn {
    grid-column: 2 / -1;
    justify-self: start;
    margin-top: 8px;
  }
}

@media (max-width: 420px) {
  .homeInputs {
    grid-template-columns: 1fr;
  }
}

.bottomnav {
  z-index: 1000;
}

@media (max-width: 920px) {
  .content {
    padding-bottom: 110px !important;
  }
}

.progress-block {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.03);
}

.section-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.progress-line {
  margin: 4px 0;
}

/* --- Icônes style plus natif / minimaliste --- */

.nav-item,
.topbar-btn,
.topbar-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-item i,
.topbar-btn i,
.topbar-label i {
  width: 17px;
  height: 17px;
  stroke-width: 1.9;
  opacity: 0.82;
  flex-shrink: 0;
}

.nav-item span,
.topbar-btn span,
.topbar-label span {
  display: inline-block;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-item i {
  width: 18px;
  height: 18px;
  opacity: 0.82;
}

.nav-item.active i {
  opacity: 1;
}

.topbar-btn i {
  width: 16px;
  height: 16px;
}

.topbar-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.brand-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.main-view {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  width: 100%;
}

.version-notes {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  text-align: center;
}

.version-title {
  font-weight: 700;
  font-size: 14px;
  color: #444;
}

.version-badge {
  font-size: 13px;
  margin-top: 4px;
  color: #059669;
}

.version-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: #2563eb;
}

.version-link:hover {
  text-decoration: underline;
}

.badge-new {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  background: #ef4444;
  border-radius: 50%;
  vertical-align: middle;
}

.badge-new[hidden] {
  display: none !important;
}

/* =========================
   FIX iPhone / Android header + bottomnav
   ========================= */

@media (max-width: 920px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
      "topbar"
      "content";
    min-height: 100vh;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: auto;
    min-height: unset;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 10px;
  }

  .brand {
    width: 100%;
    min-width: 0;
    align-items: center;
  }

  .brand-text {
    min-width: 0;
    flex: 1 1 auto;
  }

  .brand-meta-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
    min-width: 0;
  }

  .brand-subtitle {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-title-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
  }

  #premiumPillHost {
    width: auto;
    margin-left: 2px;
  }

  .premium-pill {
    align-self: flex-start;
    max-width: 100%;
  }

  .topbar-actions,
  .topbar-right {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: stretch;
  }

  .topbar-actions .field {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .topbar-btn,
  #logoutBtn,
  #helpBtn,
  #contactBtn,
  .select {
    width: 100%;
    min-width: 0;
  }

  .topbar-btn {
    justify-content: center;
  }

  .content {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding: 12px 12px 130px !important;
  }

  .bottomnav {
    display: flex;
    left: 10px;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
    height: 62px;
    padding: 6px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.14);
    z-index: 1000;
    gap: 4px;
  }

  .bn-item {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 4px;
    font-size: 12px;
    line-height: 1.1;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    word-break: break-word;
  }

  @media (max-width: 420px) {
    .homeInputs {
      grid-template-columns: 1fr;
    }
  }

  .bn-item.active {
    background: rgba(47, 109, 246, 0.14);
    font-weight: 700;
  }
}

.patient-range {
  width: 100%;
  accent-color: var(--primary);
  margin-top: 10px;
}

.patient-range::-webkit-slider-thumb {
  transform: scale(1.12);
}

.patient-range::-moz-range-thumb {
  transform: scale(1.12);
}

.pt-reco-card {
  background: var(--premium-coach-soft);
  border-radius: 20px;
  padding: 18px;
}

.pt-coach-btn {
  background: var(--premium-coach);
  color: white;
}

.pt-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: conic-gradient(
    var(--premium-coach) calc(var(--pct) * 1%),
    #eee 0
  );
  display: grid;
  place-items: center;
}

.pt-ring-inner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: white;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.pt-ring-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.premium-filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.premium-select {
  min-width: 170px;
}

.premium-premium-db-card {
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.premium-badge-guest {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: #4338ca;
  font-size: 12px;
  font-weight: 700;
}

.premium-badge-audio {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(30, 198, 182, 0.12);
  color: #0f766e;
  font-size: 12px;
  font-weight: 700;
}

.premium-badge-live {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
  font-size: 12px;
  font-weight: 700;
}

.challenge-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}

.premium-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  align-items: start;
}

.premium-quote-box-hero {
  min-width: 0;
}

.premium-quote-text {
  line-height: 1.45;
  word-break: break-word;
}

@media (max-width: 920px) {
  .premium-hero {
    grid-template-columns: 1fr;
  }

  .premium-quote-box-hero {
    width: 100%;
  }
}

.premium-quicknav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.premium-quicknav-btn {
  appearance: none;
  border: 1px solid rgba(245, 158, 11, 0.22);
  background: rgba(245, 158, 11, 0.08);
  color: #92400e;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.premium-quicknav-btn:hover {
  transform: translateY(-1px);
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.28);
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.12);
}

.premium-quicknav-btn.active {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.2),
    rgba(245, 158, 11, 0.1)
  );
  border-color: rgba(245, 158, 11, 0.34);
  color: #7c2d12;
  box-shadow: 0 10px 22px rgba(245, 158, 11, 0.14);
}

@media (max-width: 920px) {
  .premium-quicknav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .premium-quicknav-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 920px) {
  .bottomnav {
    gap: 4px;
    padding: 6px;
    height: 62px;
  }

  .bn-item {
    min-width: 0;
    font-size: 13px;
    line-height: 1.05;
    padding: 0 4px;
  }
}

@media (max-width: 420px) {
  .bn-item {
    font-size: 11px;
    padding: 0 2px;
  }
}
.bodyscan-head-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.bodyscan-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}

.bodyscan-panel {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  padding: 16px;
}

.bodyscan-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.bodyscan-svg {
  width: 100%;
  max-width: 340px;
  height: auto;
  object-fit: contain;
}

.bodyscan-wrap img {
  max-height: 420px;
  width: auto;
}

.bodyscan-base {
  fill: rgba(148, 163, 184, 0.18);
  stroke: rgba(100, 116, 139, 0.22);
  stroke-width: 2;
}

.bodyscan-zone {
  fill: rgba(245, 158, 11, 0.14);
  stroke: rgba(245, 158, 11, 0.35);
  stroke-width: 2;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    fill 0.12s ease,
    stroke 0.12s ease;
}

.bodyscan-zone:hover {
  fill: rgba(245, 158, 11, 0.22);
  stroke: rgba(217, 119, 6, 0.55);
}

.bodyscan-zone.is-selected {
  fill: rgba(47, 109, 246, 0.18);
  stroke: rgba(47, 109, 246, 0.65);
}

.bodyscan-result-title {
  font-size: 13px;
  color: var(--muted);
}

.bodyscan-result-zone {
  margin-top: 6px;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.1;
}

@media (max-width: 920px) {
  .bodyscan-grid {
    grid-template-columns: 1fr;
  }
}

.bodyscan-realimg {
  width: 100%;
  max-width: 340px;
  display: block;
}

.bodyscan-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.bodyscan-stage {
  display: flex;
  justify-content: center;
}

.bodyscan-wrap {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: auto;
}

.bodyscan-realimg {
  width: 100%;
  display: block;
}

.bodyscan-overlay {
  position: absolute;
  inset: 0;
  transform: translateY(-20px);
}

.bodyscan-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.bodyscan-hotspot span {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #64748b;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.bodyscan-hotspot.is-today span {
  background: #f59e0b;
}

.bodyscan-hotspot.is-recent span {
  background: #2563eb;
}

.bodyscan-hotspot.is-selected span {
  background: #22c55e;
  transform: scale(1.2);
}

.free-block-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(47, 109, 246, 0.18);
  background: rgba(47, 109, 246, 0.08);
  color: #1d4ed8;
  font-weight: 700;
}

.install-card {
  border: 1px solid rgba(37, 99, 235, 0.18);
  background: rgba(37, 99, 235, 0.06);
}

.install-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.install-card-title {
  font-weight: 900;
  font-size: 18px;
  color: #0f172a;
}

.install-card-text {
  margin-top: 6px;
  color: #334155;
  line-height: 1.5;
}

.install-card-note {
  margin-top: 10px;
  font-size: 12px;
}

.install-help {
  display: grid;
  gap: 10px;
}

.install-help-title {
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
}

.install-help-text {
  color: #334155;
  line-height: 1.6;
}

.install-help-note {
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .install-card-head {
    align-items: stretch;
  }

  .install-card-head .btn {
    width: 100%;
  }
}

.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tutorial-card {
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tutorial-card-title {
  font-weight: 900;
  line-height: 1.15;
}

.tutorial-card-desc {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.4;
}

.tutorial-card-meta {
  color: #6b7280;
  font-size: 12px;
}

.tutorial-card-actions {
  margin-top: auto;
}

@media (max-width: 720px) {
  .tutorial-grid {
    grid-template-columns: 1fr;
  }
}

.install-card {
  border: 1px solid rgba(37, 99, 235, 0.18);
  background: rgba(37, 99, 235, 0.06);
}

.install-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.install-card-title {
  font-weight: 900;
  font-size: 18px;
  color: #0f172a;
}

.install-card-text {
  margin-top: 6px;
  color: #334155;
  line-height: 1.5;
}

.install-card-note {
  margin-top: 10px;
  font-size: 12px;
}

.install-help {
  display: grid;
  gap: 10px;
}

.install-help-title {
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
}

.install-help-text {
  color: #334155;
  line-height: 1.6;
}

.install-help-note {
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .install-card-head {
    align-items: stretch;
  }

  .install-card-head .btn {
    width: 100%;
  }
}

/* ===== Home hierarchy patch ===== */

.grid {
  gap: 18px;
}

.card.full {
  padding: 22px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.card.full + .card.full {
  margin-top: 2px;
}

.card-title {
  position: relative;
  padding-left: 12px;
  margin-bottom: 6px;
}

.card-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), #60a5fa);
  opacity: 0.9;
}

.card-sub {
  margin-bottom: 18px;
}

.kpi {
  gap: 14px;
}

.kpi .box {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(47, 109, 246, 0.1);
  background: linear-gradient(180deg, #f8fbff 0%, #f3f7fd 100%);
  box-shadow: none;
}

.kpi .label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 6px;
}

.kpi .value {
  font-size: 18px;
  line-height: 1.2;
}

.card .actions {
  margin-top: 16px;
}

@media (max-width: 920px) {
  .card.full {
    padding: 18px;
  }

  .kpi {
    grid-template-columns: 1fr;
  }
}

/* === Align home simplification patch === */
body[data-align-view="home"] .brand-meta-row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}
body[data-align-view="home"] .brand-subtitle:empty {
  display: none;
}
body[data-align-view="home"] #premiumPillHost {
  width: auto;
}
body[data-align-view="home"] .premium-pill {
  align-self: auto;
  white-space: nowrap;
}
body[data-align-view="home"] .topbar-actions,
body[data-align-view="home"] .topbar-right {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
body[data-align-view="home"] .topbar-actions .field {
  display: none !important;
}
.split-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}
.split-actions .btn {
  width: 100%;
  min-width: 0;
}
.compact-kpi {
  gap: 12px;
}
.compact-kpi .box,
.summary-kpi .box {
  min-width: 0;
}
.summary-kpi {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.patient-status-card .card-sub {
  display: none;
}
.patient-status-copy {
  display: grid;
  gap: 6px;
}
.patient-status-line {
  font-size: 16px;
  line-height: 1.35;
}
.patient-status-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}
.badge-done {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.22);
  color: #166534;
}
.badge-todo {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.2);
  color: #166534;
}
.tone-blue {
  background: linear-gradient(
    180deg,
    rgba(47, 109, 246, 0.08),
    rgba(47, 109, 246, 0.03)
  );
  border-color: rgba(47, 109, 246, 0.12);
}
.tone-blue .card-title::before,
.tone-blue-soft .card-title::before {
  background: linear-gradient(180deg, #3b82f6, #60a5fa);
}
.tone-blue-soft {
  background: linear-gradient(
    180deg,
    rgba(59, 130, 246, 0.06),
    rgba(59, 130, 246, 0.02)
  );
  border-color: rgba(59, 130, 246, 0.1);
}
.tone-green {
  background: linear-gradient(
    180deg,
    rgba(34, 197, 94, 0.07),
    rgba(34, 197, 94, 0.02)
  );
  border-color: rgba(34, 197, 94, 0.12);
}
.tone-green .card-title::before {
  background: linear-gradient(180deg, #22c55e, #4ade80);
}
.tone-violet {
  background: linear-gradient(
    180deg,
    rgba(139, 92, 246, 0.07),
    rgba(139, 92, 246, 0.025)
  );
  border-color: rgba(139, 92, 246, 0.12);
}
.tone-violet .card-title::before {
  background: linear-gradient(180deg, #8b5cf6, #a78bfa);
}
.tone-slate,
.tone-ice {
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.04),
    rgba(148, 163, 184, 0.04)
  );
  border-color: rgba(148, 163, 184, 0.16);
}
.tone-slate .card-title::before,
.tone-ice .card-title::before {
  background: linear-gradient(180deg, #94a3b8, #cbd5e1);
}
.summary-card .card-sub {
  margin-bottom: 14px;
}
@media (max-width: 920px) {
  body[data-align-view="home"] .brand-subtitle {
    display: none;
  }
}

.section-card {
  padding: 0;
  overflow: hidden;
}

.section-header {
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
}

.section-content {
  padding: 12px;
}

.sub-card {
  margin-top: 10px;
}

.section-blue {
  background: rgba(59, 130, 246, 0.05);
}
.section-green {
  background: rgba(34, 197, 94, 0.05);
}
.section-violet {
  background: rgba(139, 92, 246, 0.05);
}
.section-amber {
  background: rgba(245, 158, 11, 0.05);
}
.section-slate {
  background: rgba(100, 116, 139, 0.06);
}

.brand-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.brand-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.field-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-label-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  white-space: nowrap;
}

.patient-select-inline {
  min-width: 170px;
}

@media (max-width: 768px) {
  .content {
    padding-bottom: 110px;
  }
}

.home-section-violet {
  background: linear-gradient(
    180deg,
    rgba(139, 92, 246, 0.12),
    rgba(139, 92, 246, 0.04)
  );
}

.home-section-amber {
  background: linear-gradient(
    180deg,
    rgba(245, 158, 11, 0.14),
    rgba(245, 158, 11, 0.05)
  );
}

.premium-landing-hero {
  border-radius: 28px;
  padding: 18px;
  overflow: hidden;
}

.premium-landing-hero-on {
  border: 1px solid rgba(245, 158, 11, 0.24);
  background:
    radial-gradient(
      circle at top right,
      rgba(245, 158, 11, 0.16),
      transparent 28%
    ),
    linear-gradient(180deg, rgba(124, 58, 237, 0.1), rgba(255, 255, 255, 0.92));
}

.premium-landing-hero-off {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background:
    radial-gradient(
      circle at top right,
      rgba(148, 163, 184, 0.12),
      transparent 28%
    ),
    linear-gradient(
      180deg,
      rgba(241, 245, 249, 0.88),
      rgba(255, 255, 255, 0.96)
    );
}

.premium-landing-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.premium-landing-kicker {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #92400e;
}

.premium-landing-title {
  margin-top: 6px;
  font-size: 28px;
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.premium-landing-text {
  margin-top: 10px;
  max-width: 720px;
  color: #475569;
  line-height: 1.55;
}

.premium-landing-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.28);
  font-weight: 900;
  white-space: nowrap;
}

.premium-landing-badge-off {
  background: rgba(148, 163, 184, 0.14);
  color: #475569;
  border-color: rgba(148, 163, 184, 0.28);
}

.premium-section {
  grid-column: span 12;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow-sm);
  background: rgba(255, 255, 255, 0.86);
}

.premium-section-violet {
  background: linear-gradient(
    180deg,
    rgba(139, 92, 246, 0.1),
    rgba(255, 255, 255, 0.94)
  );
}

.premium-section-amber {
  background: linear-gradient(
    180deg,
    rgba(245, 158, 11, 0.1),
    rgba(255, 255, 255, 0.94)
  );
}

.premium-section-slate {
  background: linear-gradient(
    180deg,
    rgba(100, 116, 139, 0.1),
    rgba(255, 255, 255, 0.94)
  );
}

.premium-section-gold {
  background: linear-gradient(
    180deg,
    rgba(234, 179, 8, 0.12),
    rgba(255, 255, 255, 0.95)
  );
}

.premium-section-summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.premium-section-summary::-webkit-details-marker {
  display: none;
}

.premium-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.premium-section-chevron {
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
  transition: transform 0.18s ease;
}

.premium-section[open] .premium-section-chevron {
  transform: rotate(180deg);
}

.premium-section-body {
  padding: 0 16px 16px 16px;
}

.premium-section-intro {
  margin: 0 0 12px 0;
  color: #64748b;
  line-height: 1.5;
  font-size: 14px;
}

.premium-section-stack {
  display: grid;
  gap: 14px;
}

.premium-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.premium-entry-card {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 8px 22px rgba(15, 23, 42, 0.05);
  padding: 16px;
}

.premium-entry-card-main {
  border-color: rgba(245, 158, 11, 0.18);
  background: linear-gradient(
    180deg,
    rgba(255, 248, 235, 0.92),
    rgba(255, 255, 255, 0.76)
  );
}

.premium-entry-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.premium-entry-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.18);
  font-size: 20px;
}

.premium-entry-title {
  font-weight: 900;
  font-size: 17px;
  line-height: 1.15;
}

.premium-entry-sub {
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 920px) {
  .premium-entry-grid {
    grid-template-columns: 1fr;
  }

  .premium-landing-title {
    font-size: 24px;
  }
}
/* ===== FIX CHAT FINAL ===== */

.pt-chat {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.pt-chat-row {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.pt-chat-row.assistant {
  align-items: flex-start;
}

.pt-chat-row.user {
  align-items: flex-end;
}

.pt-chat-author {
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 4px;
}

.pt-chat-row.assistant .pt-chat-author {
  color: #64748b;
}

.pt-chat-row.user .pt-chat-author {
  color: #0f766e;
  text-align: right;
}

.pt-chat-bubble {
  max-width: 75%;
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.6;
  text-align: left !important;
  word-break: break-word;
}

.pt-chat-bubble.assistant {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.pt-chat-bubble.user {
  background: rgba(30, 198, 182, 0.14);
}

.premium-card {
  background: linear-gradient(
    180deg,
    rgba(240, 255, 250, 0.96),
    rgba(255, 255, 255, 0.98)
  );
  border: 1px solid rgba(16, 185, 129, 0.14);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.06);
}

.premium-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.premium-card-head i {
  width: 18px;
  height: 18px;
  color: #0f172a;
  opacity: 0.85;
  flex: 0 0 auto;
}

.premium-card {
  background: linear-gradient(
    180deg,
    rgba(240, 255, 250, 0.96),
    rgba(255, 255, 255, 0.98)
  );
  border: 1px solid rgba(16, 185, 129, 0.14);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.06);
}

.premium-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.premium-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.14);
  flex: 0 0 34px;
}

.premium-card-icon svg {
  width: 18px;
  height: 18px;
  stroke: #0f172a;
  opacity: 0.9;
}

.premium-card-copy {
  min-width: 0;
}

.premium-card-copy .card-title {
  margin-bottom: 4px;
}

.premium-card-copy .card-sub {
  margin-bottom: 0;
}

.premium-card-coach {
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(232, 251, 248, 0.98),
    rgba(255, 255, 255, 0.99)
  );
  border: 1px solid rgba(30, 198, 182, 0.2);
  box-shadow:
    0 10px 24px rgba(30, 198, 182, 0.08),
    0 0 0 1px rgba(30, 198, 182, 0.04) inset;
}

.premium-card-coach .premium-card-head {
  border: 1px solid rgba(52, 127, 119, 0.16);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.55);
}

.premium-card-coach .actions {
  margin-top: 14px !important;
  justify-content: flex-start !important;
}

.premium-card-coach:hover {
  transform: translateY(-3px);
  box-shadow:
    0 16px 34px rgba(30, 198, 182, 0.14),
    0 0 0 1px rgba(30, 198, 182, 0.08) inset;
}

.premium-card-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(30, 198, 182, 0.12);
  border: 1px solid rgba(30, 198, 182, 0.22);
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.premium-card-icon-coach {
  background: rgba(30, 198, 182, 0.14);
  border: 1px solid rgba(30, 198, 182, 0.24);
  box-shadow: 0 6px 14px rgba(30, 198, 182, 0.1);
}

.premium-card-icon-coach svg {
  stroke: #0f766e;
}

.premium-card-coach .card-title {
  color: #0f172a;
}

.premium-card-coach .card-sub {
  color: #475569;
}

.btn-request-account {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  margin: 22px auto 0; /* plus bas + centré */

  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid rgba(30, 198, 182, 0.24);
  background: linear-gradient(
    180deg,
    rgba(232, 251, 248, 0.95),
    rgba(255, 255, 255, 0.98)
  );
  color: #0f766e;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(30, 198, 182, 0.08);
}

.btn-request-account:hover {
  transform: translateY(-1px);
  border-color: rgba(30, 198, 182, 0.34);
  box-shadow: 0 10px 22px rgba(30, 198, 182, 0.12);
}

.btn-request-account svg {
  width: 16px;
  height: 16px;
  stroke: #0f766e;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid rgba(37, 211, 102, 0.25);
  background: linear-gradient(
    180deg,
    rgba(230, 255, 240, 0.95),
    rgba(255, 255, 255, 0.98)
  );
  color: #16a34a;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.08);
  text-decoration: none;
}

.app,
.content,
main {
  max-width: 100%;
  overflow-x: hidden;
}

#viewRoot {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

* {
  min-width: 0;
}

.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* ratio 16:9 */
  border-radius: 16px;
  overflow: hidden;
  margin-top: 10px;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ===== Dashboard home cards V2 ===== */

.dashboard-home-grid {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.dashboard-card {
  position: relative;
  border-radius: 26px;
  padding: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  display: grid;
  gap: 16px;
  min-height: 210px;
}

.dashboard-card-compact {
  min-height: 180px;
}

.dashboard-card-blue {
  background: linear-gradient(180deg, rgba(59,130,246,.10), rgba(255,255,255,.96));
  border-color: rgba(59,130,246,.18);
}

.dashboard-card-green {
  background: linear-gradient(180deg, rgba(34,197,94,.10), rgba(255,255,255,.96));
  border-color: rgba(34,197,94,.18);
}

.dashboard-card-violet {
  background: linear-gradient(180deg, rgba(139,92,246,.10), rgba(255,255,255,.96));
  border-color: rgba(139,92,246,.18);
}

.dashboard-card-amber {
  background: linear-gradient(180deg, rgba(245,158,11,.12), rgba(255,255,255,.96));
  border-color: rgba(245,158,11,.20);
}

.dashboard-card-slate {
  background: linear-gradient(180deg, rgba(100,116,139,.10), rgba(255,255,255,.96));
  border-color: rgba(100,116,139,.18);
}

.dashboard-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.dashboard-card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-card-dot {
  width: 6px;
  height: 28px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.dashboard-card-dot-blue { background: #3b82f6; }
.dashboard-card-dot-green { background: #22c55e; }
.dashboard-card-dot-violet { background: #8b5cf6; }
.dashboard-card-dot-amber { background: #f59e0b; }
.dashboard-card-dot-slate { background: #64748b; }

.dashboard-card-title {
  margin: 0;
  font-size: 21px;
  line-height: 1.1;
  font-weight: 900;
  color: #0f172a;
}

.dashboard-card-subtitle {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #475569;
}

.dashboard-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
  text-align: center;
  line-height: 1.15;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(15,23,42,.08);
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  max-width: 110px;
}

.dashboard-card-secondary {
  display: grid;
  gap: 12px;
}

.dashboard-mini-list {
  display: grid;
  gap: 8px;
}

.dashboard-mini-line {
  font-size: 14px;
  line-height: 1.5;
  color: #334155;
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-card-badge {
  max-width: 92px;
  padding: 6px 8px;
  font-size: 11px;
}

.dashboard-kpi-box {
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255,255,255,.76);
  border: 1px solid rgba(15,23,42,.06);
}

.dashboard-kpi-label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 6px;
}

.dashboard-kpi-value {
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
}

.dashboard-card-actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-start;
}

.dashboard-card-actions .btn {
  min-width: 0;
}

@media (max-width: 920px) {
  .dashboard-home-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-card,
  .dashboard-card-compact {
    min-height: unset;
  }

  .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Mobile compact home patch ===== */

.home-info-card .card-sub {
  margin-bottom: 12px;
}

.home-info-stack {
  display: grid;
  gap: 10px;
}

.home-info-line {
  font-size: 14px;
  line-height: 1.45;
  color: #334155;
}

.home-info-note {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.home-info-sep {
  height: 1px;
  background: rgba(15, 23, 42, 0.08);
  margin: 2px 0;
}

.home-info-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.version-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

@media (max-width: 920px) {
  body[data-align-view="home"] .content {
    padding: 14px 12px 108px;
  }

  body[data-align-view="home"] .grid {
    gap: 12px;
    margin-top: 10px;
  }

  body[data-align-view="home"] .home-section {
    border-radius: 18px;
  }

  body[data-align-view="home"] .home-section-summary {
    padding: 14px 14px;
    font-size: 15px;
    line-height: 1.2;
  }

  body[data-align-view="home"] .home-section-body {
    padding: 0 10px 10px 10px;
  }

  body[data-align-view="home"] .home-section-stack {
    gap: 10px;
  }

  body[data-align-view="home"] .card,
  body[data-align-view="home"] .card.full {
    padding: 14px;
    border-radius: 16px;
  }

  body[data-align-view="home"] .card-title {
    font-size: 16px;
    margin-bottom: 4px;
    padding-left: 10px;
  }

  body[data-align-view="home"] .card-title::before {
    width: 3px;
    top: 3px;
    bottom: 3px;
  }

  body[data-align-view="home"] .card-sub {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  body[data-align-view="home"] .kpi {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body[data-align-view="home"] .kpi .box {
    padding: 12px 14px;
    border-radius: 14px;
  }

  body[data-align-view="home"] .kpi .label {
    font-size: 11px;
    margin-bottom: 4px;
  }

  body[data-align-view="home"] .kpi .value {
    font-size: 16px;
  }

  body[data-align-view="home"] .actions {
    margin-top: 12px;
    gap: 8px;
  }

  body[data-align-view="home"] .actions .btn {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 13px;
  }

  body[data-align-view="home"] .split-actions,
  body[data-align-view="home"] .home-info-actions {
    grid-template-columns: 1fr;
  }

  body[data-align-view="home"] .version-notes {
    display: none !important;
  }

  body[data-align-view="home"] .home-info-card {
    background: linear-gradient(
      180deg,
      rgba(34, 197, 94, 0.08),
      rgba(255, 255, 255, 0.96)
    );
    border-color: rgba(34, 197, 94, 0.16);
  }

  body[data-align-view="home"] .home-info-line {
    font-size: 13px;
    line-height: 1.4;
  }

  body[data-align-view="home"] .home-info-note {
    font-size: 11px;
  }

  body[data-align-view="home"] .patient-status-line {
    font-size: 15px;
    line-height: 1.3;
  }

  body[data-align-view="home"] .patient-status-sub {
    font-size: 13px;
    line-height: 1.4;
  }
}

/* ===== Programme : feedback fin de séance ===== */

.program-end-feedback {
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    rgba(59, 130, 246, 0.06),
    rgba(255, 255, 255, 0.96)
  );
  border: 1px solid rgba(59, 130, 246, 0.14);
}

.program-end-feedback-title {
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
}

.program-end-feedback-sub {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.program-end-feedback-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.program-end-field {
  display: grid;
  gap: 6px;
}

.program-end-field span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 920px) {
  .program-end-feedback {
    padding: 14px;
    border-radius: 16px;
  }

  .program-end-feedback-title {
    font-size: 16px;
  }

  .program-end-feedback-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* ===== Programme : adaptation visible par exercice ===== */

.program-adaptation-box {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.program-adaptation-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.program-adaptation-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(100, 116, 139, 0.18);
  background: rgba(100, 116, 139, 0.10);
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.program-adaptation-badge[data-tone="green"] {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.22);
  color: #166534;
}

.program-adaptation-badge[data-tone="amber"] {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.22);
  color: #b45309;
}

.program-adaptation-badge[data-tone="blue"] {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.22);
  color: #1d4ed8;
}

.program-adaptation-badge[data-tone="slate"] {
  background: rgba(100, 116, 139, 0.10);
  border-color: rgba(100, 116, 139, 0.20);
  color: #334155;
}

.program-adaptation-text {
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}

@media (max-width: 920px) {
  .program-adaptation-badge {
    font-size: 11px;
    padding: 5px 9px;
  }

  .program-adaptation-text {
    font-size: 11px;
    line-height: 1.4;
  }
}

/* ===== Programme : adaptation visible par exercice ===== */

.program-adaptation-box {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.program-adaptation-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.program-adaptation-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(100, 116, 139, 0.18);
  background: rgba(100, 116, 139, 0.10);
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.program-adaptation-badge[data-tone="green"] {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.22);
  color: #166534;
}

.program-adaptation-badge[data-tone="amber"] {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.22);
  color: #b45309;
}

.program-adaptation-badge[data-tone="blue"] {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.22);
  color: #1d4ed8;
}

.program-adaptation-badge[data-tone="slate"] {
  background: rgba(100, 116, 139, 0.10);
  border-color: rgba(100, 116, 139, 0.20);
  color: #334155;
}

.program-adaptation-change {
  font-size: 12px;
  line-height: 1.45;
  color: #0f172a;
  font-weight: 700;
}

.program-adaptation-text {
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}

@media (max-width: 920px) {
  .program-adaptation-badge {
    font-size: 11px;
    padding: 5px 9px;
  }

  .program-adaptation-change,
  .program-adaptation-text {
    font-size: 11px;
    line-height: 1.4;
  }
  /* ===== Notes de version ===== */

.version-modal-list {
  display: grid;
  gap: 12px;
}

.version-modal-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  padding: 14px;
}

.version-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.version-modal-version {
  font-size: 16px;
  font-weight: 900;
  color: #0f172a;
}

.version-modal-date {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.version-modal-items {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #334155;
  line-height: 1.5;
}

.version-modal-items li + li {
  margin-top: 6px;
}}