:root {
  --bg: #05080d;
  --bg-2: #08111f;
  --surface: #f7fbff;
  --surface-strong: #e8eef7;
  --panel: rgba(11, 20, 34, 0.86);
  --panel-strong: rgba(17, 31, 51, 0.94);
  --ink: #111827;
  --ink-light: #f5f8ff;
  --muted: #6f7d8f;
  --muted-light: #9fb1c8;
  --line: #d5dde8;
  --line-dark: rgba(132, 169, 213, 0.28);
  --accent: #148cff;
  --accent-strong: #006ee6;
  --accent-soft: #d9edff;
  --cyan: #46d8ff;
  --danger: #d33149;
  --warning: #8fbfff;
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.22);
  --olympus-bg: url("assets/hercules-olympus-cyber-bg.png");
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(1, 4, 10, 0.86), rgba(3, 8, 17, 0.92) 42%, rgba(2, 5, 11, 0.96)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 12%, transparent 12% 24%, rgba(255, 255, 255, 0.018) 24% 36%, transparent 36%),
    linear-gradient(rgba(70, 216, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 216, 255, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 18% 12%, rgba(20, 140, 255, 0.2), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(70, 216, 255, 0.14), transparent 28%),
    var(--olympus-bg) center top / cover fixed no-repeat,
    linear-gradient(135deg, #02040a 0%, #07101e 46%, #0b1220 100%);
  background-size: auto, 52px 52px, 42px 42px, 42px 42px, auto, auto, cover, auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.module-page {
  display: none;
  min-height: 100vh;
}

.module-page.active {
  display: block;
}

.hidden {
  display: none !important;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(70, 216, 255, 0.28);
  border-radius: 8px;
  color: var(--ink-light);
  background: rgba(8, 16, 29, 0.98);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateY(8px);
  opacity: 0;
  animation: toast-in 180ms ease-out forwards;
}

.toast::before {
  content: "OK";
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #ffffff;
  background: #159a6c;
  font-size: 11px;
  font-weight: 950;
}

.toast.toast-error::before {
  content: "!";
  background: var(--danger);
}

.toast.toast-info::before {
  content: "i";
  background: var(--accent);
}

.toast strong,
.toast small {
  display: block;
}

.toast strong {
  color: #ffffff;
}

.toast small {
  margin-top: 2px;
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 800;
}

@keyframes toast-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  max-width: min(360px, calc(100vw - 36px));
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(70, 216, 255, 0.32);
  border-radius: 8px;
  color: var(--muted-light);
  background: rgba(4, 10, 20, 0.88);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2), inset 0 0 16px rgba(20, 140, 255, 0.1);
  font-size: 12px;
  font-weight: 900;
}

.home-language-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.language-select-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.language-flag-buttons {
  display: flex;
  align-items: center;
  gap: 18px;
}

.language-flag-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
}

.language-flag-button:hover,
.language-flag-button.active {
  border-color: rgba(70, 216, 255, 0.55);
  background: rgba(20, 140, 255, 0.16);
  box-shadow: 0 0 16px rgba(70, 216, 255, 0.22);
}

.flag-icon {
  display: block;
  width: 26px;
  height: 18px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.flag-es {
  background: linear-gradient(#aa151b 0 25%, #f1bf00 25% 75%, #aa151b 75%);
}

.flag-ca {
  background: repeating-linear-gradient(180deg, #f1bf00 0 2px, #f1bf00 2px 4px, #d52b1e 4px 6px);
}

.flag-en {
  background:
    linear-gradient(90deg, transparent 42%, #ffffff 42% 58%, transparent 58%),
    linear-gradient(0deg, transparent 38%, #ffffff 38% 62%, transparent 62%),
    linear-gradient(90deg, transparent 46%, #c8102e 46% 54%, transparent 54%),
    linear-gradient(0deg, transparent 44%, #c8102e 44% 56%, transparent 56%),
    linear-gradient(33deg, transparent 44%, #ffffff 44% 50%, #c8102e 50% 54%, #ffffff 54% 60%, transparent 60%),
    linear-gradient(-33deg, transparent 44%, #ffffff 44% 50%, #c8102e 50% 54%, #ffffff 54% 60%, transparent 60%),
    #012169;
}

.app-header {
  position: relative;
  z-index: 80;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 14px 18px 0;
}

.notification-shell {
  position: relative;
  margin-left: auto;
}

.notification-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(70, 216, 255, 0.32);
  border-radius: 8px;
  color: var(--ink-light);
  background: rgba(4, 10, 20, 0.88);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24), inset 0 0 16px rgba(20, 140, 255, 0.12);
}

.notification-button span {
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 22a2.5 2.5 0 0 0 2.45-2h-4.9A2.5 2.5 0 0 0 12 22Zm7-6v-5a7 7 0 0 0-5-6.7V3a2 2 0 0 0-4 0v1.3A7 7 0 0 0 5 11v5l-2 2v1h18v-1l-2-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 22a2.5 2.5 0 0 0 2.45-2h-4.9A2.5 2.5 0 0 0 12 22Zm7-6v-5a7 7 0 0 0-5-6.7V3a2 2 0 0 0-4 0v1.3A7 7 0 0 0 5 11v5l-2 2v1h18v-1l-2-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.notification-button strong {
  position: absolute;
  top: -7px;
  right: -7px;
  display: none;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border: 2px solid #06101d;
  border-radius: 999px;
  color: #ffffff;
  background: var(--danger);
  font-size: 11px;
  font-weight: 950;
  line-height: 20px;
}

.notification-button.has-alerts strong {
  display: block;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(390px, calc(100vw - 24px));
  max-height: min(620px, calc(100vh - 92px));
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  color: var(--ink-light);
  background: rgba(8, 16, 29, 0.98);
  box-shadow: var(--shadow);
}

.notification-panel header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 6px 12px;
}

.notification-panel h2 {
  margin: 3px 0 0;
  color: #ffffff;
  font-size: 20px;
}

.notification-panel header > span {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border: 1px solid rgba(70, 216, 255, 0.3);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(70, 216, 255, 0.08);
  font-size: 12px;
  font-weight: 950;
}

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

.notification-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 4px 10px;
  width: 100%;
  padding: 11px;
  border: 1px solid rgba(132, 169, 213, 0.24);
  border-radius: 8px;
  color: var(--ink-light);
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
}

.notification-item:hover {
  border-color: rgba(70, 216, 255, 0.66);
  background: rgba(12, 31, 55, 0.94);
}

.notification-item > span {
  grid-row: 1 / span 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--accent);
  font-size: 11px;
  font-weight: 950;
}

.notification-item.tone-alta > span,
.notification-item.tone-energy > span {
  background: var(--danger);
}

.notification-item.tone-media > span,
.notification-item.tone-macro > span,
.notification-item.tone-planning > span {
  color: #07101e;
  background: #8fbfff;
}

.notification-item.tone-baja > span,
.notification-item.tone-body > span {
  background: #159a6c;
}

.notification-item strong {
  overflow: hidden;
  color: #ffffff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-item small,
.notification-item em {
  overflow: hidden;
  color: var(--muted-light);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.notification-empty {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(21, 154, 108, 0.34);
  border-radius: 8px;
  background: rgba(21, 154, 108, 0.08);
}

.notification-empty strong {
  color: #dffcf1;
}

.notification-empty small {
  color: var(--muted-light);
  font-weight: 800;
}

.user-zone-shell {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.user-zone {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
  max-width: min(280px, calc(100vw - 36px));
  padding: 9px 12px;
  border: 1px solid rgba(70, 216, 255, 0.32);
  border-radius: 8px;
  color: var(--ink-light);
  background: rgba(4, 10, 20, 0.88);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24), inset 0 0 16px rgba(20, 140, 255, 0.12);
  text-align: left;
}

.user-zone span:first-child {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--accent);
  font-size: 13px;
  font-weight: 950;
}

.user-zone strong,
.user-zone small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-zone small {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 800;
}

.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  justify-self: end;
  min-width: 210px;
  padding: 8px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: rgba(8, 16, 29, 0.98);
  box-shadow: var(--shadow);
}

.user-menu button {
  min-height: 38px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--ink-light);
  background: transparent;
  text-align: left;
  font-weight: 800;
}

.user-menu button:hover {
  background: rgba(70, 216, 255, 0.12);
}

.screen-nav {
  display: flex;
  gap: 8px;
}

.auth-page {
  color: var(--ink-light);
  padding: 32px;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 28px;
  align-items: stretch;
  max-width: 1180px;
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  padding: 0;
}

.auth-brand,
.auth-panel {
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 520px;
  padding: 36px;
  background:
    linear-gradient(90deg, rgba(2, 6, 13, 0.96), rgba(4, 13, 25, 0.66) 52%, rgba(5, 12, 21, 0.18)),
    linear-gradient(0deg, rgba(2, 5, 10, 0.88), rgba(2, 5, 10, 0.2) 54%),
    var(--olympus-bg) center / cover no-repeat;
  overflow: hidden;
}

.auth-brand::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(70, 216, 255, 0.16);
  border-radius: 6px;
}

.auth-brand-top,
.auth-brand-copy {
  position: relative;
  z-index: 1;
}

.auth-brand-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.auth-language-switcher {
  flex: none;
  margin-left: auto;
}

.auth-brand h1 {
  max-width: 720px;
  margin: 0;
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(56px, 9vw, 118px);
  line-height: 0.94;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 0 28px rgba(70, 216, 255, 0.34);
}

.auth-brand h1::after {
  content: "";
  display: block;
  width: min(420px, 100%);
  height: 4px;
  margin-top: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), rgba(20, 140, 255, 0.15), transparent);
  box-shadow: 0 0 22px rgba(70, 216, 255, 0.32);
}

.auth-brand-copy p {
  max-width: 560px;
  margin: 20px 0 0;
  color: var(--muted-light);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.55;
}

.auth-panel {
  align-self: center;
  padding: 24px;
  background: rgba(8, 16, 29, 0.94);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.auth-tab,
.logout-button {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 900;
}

.auth-tab {
  color: var(--muted-light);
  background: rgba(255, 255, 255, 0.06);
}

.auth-tab.active {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(20, 140, 255, 0.72), rgba(70, 216, 255, 0.16));
}

.auth-form {
  display: grid;
  gap: 10px;
}

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

.onboarding-fields {
  display: grid;
  gap: 10px;
  max-height: 48vh;
  overflow: auto;
  padding-right: 4px;
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
}

.checkbox-group legend {
  padding: 0 6px;
  color: var(--muted-light);
  font-size: 13px;
  font-weight: 900;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--ink-light);
  font-size: 13px;
}

.checkbox-group input {
  width: auto;
  min-height: auto;
}

.link-button {
  min-height: 34px;
  color: var(--cyan);
  background: transparent;
  font-weight: 900;
}

.recovery-prompt {
  display: grid;
  gap: 2px;
  justify-items: center;
  margin-top: 4px;
  color: var(--muted-light);
  font-size: 13px;
  text-align: center;
}

.recovery-form {
  margin-top: 14px;
}

.security-question {
  min-height: 20px;
  margin: 0;
  color: #ffffff;
  font-weight: 900;
}

.auth-form label {
  color: var(--muted-light);
}

.auth-submit {
  width: 100%;
  margin-top: 8px;
}

.auth-message {
  min-height: 20px;
  margin: 4px 0 0;
  color: var(--muted-light);
  font-size: 13px;
  line-height: 1.4;
}

.auth-message[data-type="error"] {
  color: #ff8da0;
}

.user-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logout-button {
  padding: 0 13px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-logout {
  margin-bottom: 18px;
}

.home-page,
.placeholder-page,
.stats-page,
.body-page,
.calories-page {
  color: var(--ink-light);
  padding: 32px;
}

.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
}

.home-header h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.home-header.compact {
  padding-bottom: 30px;
}

.system-chip {
  padding: 9px 13px;
  border: 1px solid rgba(70, 216, 255, 0.42);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(3, 11, 22, 0.74);
  box-shadow: inset 0 0 18px rgba(20, 140, 255, 0.16);
  font-size: 12px;
  font-weight: 900;
}

.home-main,
.placeholder-main,
.body-main,
.calories-main {
  max-width: 1180px;
  margin: 42px auto 0;
}

.home-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 520px;
  padding: 34px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(2, 7, 14, 0.96) 0%, rgba(4, 12, 24, 0.76) 42%, rgba(4, 12, 24, 0.2) 100%),
    linear-gradient(0deg, rgba(2, 7, 14, 0.9), rgba(2, 7, 14, 0.04) 58%),
    var(--olympus-bg) center / cover no-repeat;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(70, 216, 255, 0.16);
  border-radius: 6px;
  pointer-events: none;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(70, 216, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 216, 255, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 28% 74%, rgba(70, 216, 255, 0.14), transparent 22%);
  background-size: 54px 54px, 54px 54px, auto;
  mix-blend-mode: screen;
  opacity: 0.7;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.hero-copy h2 {
  margin: 0;
  max-width: 780px;
  color: #ffffff;
  font-size: clamp(72px, 12vw, 148px);
  line-height: 0.94;
  letter-spacing: 0;
}

.hero-text {
  max-width: 560px;
  margin: 22px 0 0;
  color: var(--muted-light);
  font-size: 17px;
  line-height: 1.6;
}

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

.today-workout-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.7fr);
  gap: 18px;
  align-items: stretch;
  margin-top: 18px;
  padding: 22px;
  border: 1px solid rgba(70, 216, 255, 0.28);
  border-radius: 8px;
  color: var(--ink-light);
  background:
    linear-gradient(135deg, rgba(20, 140, 255, 0.22), rgba(8, 16, 29, 0.94) 42%),
    rgba(8, 16, 29, 0.92);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.today-workout-panel.status-completed {
  border-color: rgba(21, 154, 108, 0.42);
  background:
    linear-gradient(135deg, rgba(21, 154, 108, 0.2), rgba(8, 16, 29, 0.94) 42%),
    rgba(8, 16, 29, 0.92);
}

.today-workout-main h2 {
  margin: 4px 0 10px;
  color: #ffffff;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1;
}

.today-workout-main p:last-child {
  max-width: 680px;
  margin: 0;
  color: var(--muted-light);
  font-weight: 800;
  line-height: 1.5;
}

.today-workout-side {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(132, 169, 213, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.today-workout-side .day-status {
  margin-top: 0;
}

.today-workout-side strong {
  color: #ffffff;
  font-size: 28px;
}

.home-command-panel {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(280px, 1.1fr) minmax(320px, 1.2fr);
  gap: 16px;
  align-items: stretch;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(70, 216, 255, 0.3);
  border-radius: 8px;
  color: var(--ink-light);
  background:
    linear-gradient(135deg, rgba(20, 140, 255, 0.18), rgba(4, 10, 18, 0.94) 42%),
    rgba(7, 14, 26, 0.94);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.home-command-panel.balance-balanced {
  border-color: rgba(70, 216, 255, 0.48);
}

.home-command-panel.balance-deficit {
  border-color: rgba(21, 154, 108, 0.44);
}

.home-command-panel.balance-surplus,
.home-command-panel.balance-warning {
  border-color: rgba(211, 49, 73, 0.42);
}

.home-command-dial {
  --home-dial: 0%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  min-height: 190px;
  padding: 20px;
  border: 1px solid rgba(132, 169, 213, 0.24);
  border-radius: 8px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(8, 16, 29, 0.96) 0 54%, transparent 55%),
    conic-gradient(var(--cyan) 0 var(--home-dial), rgba(255, 255, 255, 0.1) var(--home-dial) 100%);
}

.home-command-dial span,
.home-command-progress span,
.home-macro-pill span {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.home-command-dial strong {
  color: #ffffff;
  font-size: 28px;
  line-height: 1.05;
}

.home-command-dial small,
.home-command-progress small,
.home-macro-pill small {
  color: var(--muted-light);
  font-weight: 800;
}

.home-command-copy {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 10px 4px;
}

.home-command-copy h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.02;
}

.home-command-copy p:not(.eyebrow) {
  margin: 0;
  color: var(--muted-light);
  font-weight: 800;
  line-height: 1.5;
}

.home-command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.home-command-macros {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.home-macro-pill,
.home-command-progress {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(132, 169, 213, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.home-macro-pill strong,
.home-command-progress strong {
  display: block;
  margin-top: 5px;
  color: #ffffff;
  font-size: 24px;
  line-height: 1.05;
}

.home-mini-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.home-mini-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
}

.manager-dial {
  background:
    radial-gradient(circle at 50% 50%, rgba(8, 16, 29, 0.96) 0 54%, transparent 55%),
    conic-gradient(#159a6c 0 var(--home-dial), rgba(255, 255, 255, 0.1) var(--home-dial) 100%);
}

.home-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.home-quick-action {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 3px 12px;
  align-items: center;
  min-height: 82px;
  padding: 14px;
  border: 1px solid rgba(70, 216, 255, 0.24);
  border-radius: 8px;
  color: var(--ink-light);
  background:
    linear-gradient(135deg, rgba(70, 216, 255, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(8, 16, 29, 0.9);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.home-quick-action:hover {
  border-color: rgba(70, 216, 255, 0.72);
  background: rgba(12, 31, 55, 0.94);
}

.home-quick-action span {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(70, 216, 255, 0.34);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(20, 140, 255, 0.24);
  font-size: 12px;
  font-weight: 950;
}

.home-quick-action strong {
  overflow: hidden;
  color: #ffffff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-quick-action small {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 800;
}

.home-insights-panel {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.3fr);
  gap: 18px;
  margin-top: 18px;
}

.home-alerts-card,
.home-week-card,
.home-checklist-card,
.home-coach-card {
  padding: 18px;
  border: 1px solid rgba(70, 216, 255, 0.24);
  border-radius: 8px;
  color: var(--ink-light);
  background: rgba(8, 16, 29, 0.9);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.home-section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.home-section-head h2 {
  margin: 4px 0 0;
  color: #ffffff;
  font-size: 24px;
  line-height: 1.05;
}

.home-section-head > span {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(70, 216, 255, 0.3);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(70, 216, 255, 0.08);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.compact-button {
  min-height: 34px;
  padding: 8px 12px;
}

.home-alert-list {
  display: grid;
  gap: 10px;
}

.home-alert-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(132, 169, 213, 0.24);
  border-radius: 8px;
  color: var(--ink-light);
  background:
    linear-gradient(135deg, rgba(20, 140, 255, 0.12), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.035);
  text-align: left;
}

.home-alert-item:hover:not(:disabled) {
  border-color: rgba(70, 216, 255, 0.64);
  background: rgba(12, 31, 55, 0.88);
}

.home-alert-item strong {
  color: #ffffff;
}

.home-alert-item small {
  color: var(--muted-light);
  font-weight: 800;
  line-height: 1.35;
}

.home-alert-item span {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  padding: 8px 10px;
  border-radius: 7px;
  color: #ffffff;
  background: var(--accent);
  font-size: 12px;
  font-weight: 950;
}

.home-alert-item.alert-good {
  grid-template-columns: 1fr;
  border-color: rgba(21, 154, 108, 0.38);
}

.home-alert-item.alert-good strong {
  color: #dffcf1;
}

.home-alert-item.alert-nutrition {
  border-color: rgba(70, 216, 255, 0.36);
}

.home-alert-item.alert-macro,
.home-alert-item.alert-planning {
  border-color: rgba(143, 191, 255, 0.38);
}

.home-alert-item.alert-energy {
  border-color: rgba(211, 49, 73, 0.42);
}

.home-week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 9px;
}

.home-week-day {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 132px;
  padding: 12px 10px;
  overflow: hidden;
  border: 1px solid rgba(132, 169, 213, 0.22);
  border-radius: 8px;
  color: var(--ink-light);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.home-week-day::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: rgba(255, 255, 255, 0.16);
}

.home-week-day.status-completed::before {
  background: #159a6c;
}

.home-week-day.status-partial::before {
  background: #8fbfff;
}

.home-week-day.status-pending::before {
  background: var(--accent);
}

.home-week-day.is-today {
  border-color: rgba(70, 216, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(70, 216, 255, 0.18);
}

.home-week-day span {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.home-week-day strong {
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
}

.home-week-day small {
  min-height: 32px;
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.home-week-day em {
  justify-self: start;
  padding: 4px 7px;
  border-radius: 999px;
  color: #dff8ff;
  background: rgba(70, 216, 255, 0.16);
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.week-progress {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.week-progress::before {
  content: "";
  display: block;
  width: var(--week-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
}

.home-week-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 14px;
  color: var(--muted-light);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.home-week-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.legend-dot.completed {
  background: #159a6c;
}

.legend-dot.partial {
  background: #8fbfff;
}

.legend-dot.pending {
  background: var(--accent);
}

.legend-dot.food {
  background: var(--cyan);
}

.home-coach-board {
  margin-top: 18px;
}

.home-manager-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 18px;
}

.home-user-board {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.home-checklist-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.home-checklist-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #159a6c, var(--cyan));
}

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

.home-check-item {
  display: grid;
  gap: 8px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid rgba(132, 169, 213, 0.24);
  border-radius: 8px;
  color: var(--ink-light);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.home-check-item span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 26px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(211, 49, 73, 0.88);
  font-size: 11px;
  font-weight: 950;
}

.home-check-item.is-done {
  border-color: rgba(21, 154, 108, 0.46);
  background: linear-gradient(135deg, rgba(21, 154, 108, 0.18), rgba(255, 255, 255, 0.035));
}

.home-check-item.is-done span {
  background: #159a6c;
}

.home-check-item strong {
  color: #ffffff;
}

.home-check-item small {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.home-streak-list {
  display: grid;
  gap: 10px;
}

.home-streak-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  min-height: 72px;
  padding: 12px;
  border: 1px solid rgba(132, 169, 213, 0.24);
  border-radius: 8px;
  color: var(--ink-light);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.home-streak-row:hover {
  border-color: rgba(70, 216, 255, 0.68);
  background: rgba(12, 31, 55, 0.94);
}

.home-streak-row.tone-high {
  border-color: rgba(21, 154, 108, 0.42);
}

.home-streak-row.tone-low {
  border-color: rgba(211, 49, 73, 0.34);
}

.home-streak-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.home-streak-row strong {
  color: #ffffff;
}

.home-streak-row small {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 800;
}

.home-streak-row span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 950;
}

.home-streak-row i {
  grid-column: 1 / -1;
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.home-streak-row i::before {
  content: "";
  display: block;
  width: var(--streak-percent);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
}

.home-user-upcoming-card {
  grid-column: 1 / -1;
}

.home-user-upcoming-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.home-user-session-row {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 108px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(132, 169, 213, 0.24);
  border-radius: 8px;
  color: var(--ink-light);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.home-user-session-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
}

.home-user-session-row.status-completed::before {
  background: #159a6c;
}

.home-user-session-row.status-partial::before {
  background: #8fbfff;
}

.home-user-session-row:hover {
  border-color: rgba(70, 216, 255, 0.68);
  background: rgba(12, 31, 55, 0.94);
}

.home-user-session-row span {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.home-user-session-row strong {
  color: #ffffff;
}

.home-user-session-row small {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.home-user-session-row i {
  display: block;
  align-self: end;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.home-user-session-row i::before {
  content: "";
  display: block;
  width: var(--session-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
}

.home-coach-list,
.home-feedback-list,
.home-upcoming-list,
.home-planning-list {
  display: grid;
  gap: 10px;
}

.coach-status-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.coach-status-pill {
  display: grid;
  gap: 2px;
  min-height: 56px;
  padding: 10px;
  border: 1px solid rgba(132, 169, 213, 0.22);
  border-radius: 8px;
  background: rgba(8, 16, 29, 0.72);
}

.coach-status-pill b {
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
}

.coach-status-pill small {
  color: var(--muted-light);
  font-size: 11px;
  font-weight: 900;
}

.coach-status-pill.tone-danger {
  border-color: rgba(211, 49, 73, 0.44);
}

.coach-status-pill.tone-warning {
  border-color: rgba(143, 191, 255, 0.42);
}

.coach-status-pill.tone-ok {
  border-color: rgba(21, 154, 108, 0.46);
}

.coach-status-pill.tone-info {
  border-color: rgba(70, 216, 255, 0.42);
}

.home-coach-row {
  display: grid;
  grid-template-columns: 74px minmax(140px, 1fr) minmax(160px, 1.15fr) 105px 86px minmax(110px, 0.85fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 68px;
  padding: 12px;
  border: 1px solid rgba(132, 169, 213, 0.24);
  border-radius: 8px;
  color: var(--ink-light);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.coach-row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.home-coach-row:hover {
  border-color: rgba(70, 216, 255, 0.68);
  background: rgba(12, 31, 55, 0.94);
}

.home-coach-row strong {
  color: #ffffff;
}

.home-coach-row b {
  color: #ffffff;
}

.home-coach-row small,
.home-coach-row em,
.home-coach-row > span:last-child,
.home-coach-row > span:nth-of-type(2) {
  color: var(--muted-light);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.coach-priority {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--accent);
  font-size: 11px;
  font-weight: 950;
}

.home-coach-row.priority-alta .coach-priority {
  background: var(--danger);
}

.home-coach-row.priority-media .coach-priority {
  background: #8fbfff;
  color: #07101e;
}

.home-coach-row.priority-baja .coach-priority {
  background: #159a6c;
}

.home-coach-row.athlete-risk {
  border-color: rgba(143, 191, 255, 0.42);
}

.home-coach-row.athlete-paused {
  border-color: rgba(211, 49, 73, 0.46);
}

.home-feedback-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(132, 169, 213, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.home-feedback-main {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--ink-light);
  background: transparent;
  text-align: left;
}

.home-feedback-main strong {
  color: #ffffff;
}

.home-feedback-main small,
.home-feedback-main span {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.home-upcoming-card,
.home-load-card,
.home-muscle-card,
.home-planning-card,
.home-adherence-card,
.home-recovery-card {
  grid-column: 1 / -1;
}

.home-upcoming-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-upcoming-row {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(132, 169, 213, 0.24);
  border-radius: 8px;
  color: var(--ink-light);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.home-upcoming-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
}

.home-upcoming-row.status-completed::before {
  background: #159a6c;
}

.home-upcoming-row.status-partial::before {
  background: #8fbfff;
}

.home-upcoming-row:hover {
  border-color: rgba(70, 216, 255, 0.68);
  background: rgba(12, 31, 55, 0.94);
}

.home-upcoming-row span {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.home-upcoming-row strong {
  color: #ffffff;
}

.home-upcoming-row small {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.home-load-map {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.home-load-day {
  display: grid;
  gap: 7px;
  min-height: 126px;
  padding: 12px;
  border: 1px solid rgba(132, 169, 213, 0.24);
  border-radius: 8px;
  color: var(--ink-light);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.home-load-day:not(.is-empty):hover {
  border-color: rgba(70, 216, 255, 0.68);
  background: rgba(12, 31, 55, 0.94);
}

.home-load-day.is-empty {
  opacity: 0.72;
}

.home-load-day span {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.home-load-day strong {
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
}

.home-load-day small,
.home-load-day em {
  color: var(--muted-light);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.25;
}

.home-load-day em {
  color: #dff8ff;
}

.home-load-day i {
  display: block;
  align-self: end;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.home-load-day i::before {
  content: "";
  display: block;
  width: var(--load-percent);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
}

.home-muscle-balance {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.home-muscle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  min-height: 88px;
  padding: 12px;
  border: 1px solid rgba(132, 169, 213, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.home-muscle-row.tone-high {
  border-color: rgba(70, 216, 255, 0.44);
}

.home-muscle-row.tone-low {
  opacity: 0.78;
}

.home-muscle-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.home-muscle-row strong {
  color: #ffffff;
}

.home-muscle-row small {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 800;
}

.home-muscle-row span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 950;
}

.home-muscle-row i {
  grid-column: 1 / -1;
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.home-muscle-row i::before {
  content: "";
  display: block;
  width: var(--muscle-percent);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #159a6c, var(--cyan));
}

.home-planning-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-planning-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 7px 10px;
  align-items: center;
  min-height: 82px;
  padding: 12px;
  border: 1px solid rgba(132, 169, 213, 0.24);
  border-radius: 8px;
  color: var(--ink-light);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.home-planning-row:hover {
  border-color: rgba(70, 216, 255, 0.68);
  background: rgba(12, 31, 55, 0.94);
}

.home-planning-row > span {
  grid-row: span 2;
  display: inline-grid;
  place-items: center;
  min-width: 56px;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--danger);
  font-size: 11px;
  font-weight: 950;
}

.home-planning-row.priority-media > span {
  background: #8fbfff;
  color: #07101e;
}

.home-planning-row strong {
  color: #ffffff;
}

.home-planning-row small {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 800;
}

.home-planning-row em {
  grid-row: span 2;
  color: var(--cyan);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.home-adherence-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.home-adherence-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 86px;
  padding: 12px;
  border: 1px solid rgba(132, 169, 213, 0.24);
  border-radius: 8px;
  color: var(--ink-light);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.home-adherence-row:hover {
  border-color: rgba(70, 216, 255, 0.68);
  background: rgba(12, 31, 55, 0.94);
}

.adherence-ring {
  display: grid;
  place-items: center;
  width: 48px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(8, 16, 29, 0.96) 56%, transparent 58%),
    conic-gradient(var(--danger) var(--adherence), rgba(255, 255, 255, 0.12) 0);
}

.home-adherence-row.tone-mid .adherence-ring {
  background:
    radial-gradient(circle at center, rgba(8, 16, 29, 0.96) 56%, transparent 58%),
    conic-gradient(#8fbfff var(--adherence), rgba(255, 255, 255, 0.12) 0);
}

.home-adherence-row.tone-high .adherence-ring {
  background:
    radial-gradient(circle at center, rgba(8, 16, 29, 0.96) 56%, transparent 58%),
    conic-gradient(#159a6c var(--adherence), rgba(255, 255, 255, 0.12) 0);
}

.adherence-ring strong {
  color: #ffffff;
  font-size: 14px;
  line-height: 1;
}

.home-adherence-row > div:not(.adherence-ring) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.home-adherence-row > div:not(.adherence-ring) strong {
  color: #ffffff;
}

.home-adherence-row small {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.home-adherence-row > span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #dff8ff;
  background: rgba(70, 216, 255, 0.14);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.home-recovery-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.home-recovery-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 104px;
  padding: 12px;
  border: 1px solid rgba(132, 169, 213, 0.24);
  border-radius: 8px;
  color: var(--ink-light);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.home-recovery-row:hover {
  border-color: rgba(70, 216, 255, 0.68);
  background: rgba(12, 31, 55, 0.94);
}

.recovery-score-chip {
  display: grid;
  place-items: center;
  width: 54px;
  aspect-ratio: 1;
  border: 1px solid rgba(211, 49, 73, 0.48);
  border-radius: 8px;
  background: rgba(211, 49, 73, 0.14);
}

.home-recovery-row.recovery-medium .recovery-score-chip {
  border-color: rgba(143, 191, 255, 0.42);
  background: rgba(143, 191, 255, 0.12);
}

.recovery-score-chip strong {
  color: #ffffff;
  font-size: 18px;
  line-height: 1;
}

.recovery-score-chip small {
  color: var(--muted-light);
  font-size: 10px;
  font-weight: 900;
}

.home-recovery-row > div:not(.recovery-score-chip) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.home-recovery-row > div:not(.recovery-score-chip) strong {
  color: #ffffff;
}

.home-recovery-row small,
.home-recovery-row em {
  color: var(--muted-light);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
}

.home-coach-empty {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid rgba(21, 154, 108, 0.34);
  border-radius: 8px;
  background: rgba(21, 154, 108, 0.08);
}

.home-coach-empty strong {
  color: #dffcf1;
}

.home-coach-empty small {
  color: var(--muted-light);
  font-weight: 800;
}

.module-card {
  display: grid;
  gap: 12px;
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  color: var(--ink-light);
  background: rgba(8, 16, 29, 0.88);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.module-card::before {
  content: "";
  width: 42px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.module-card:hover:not(:disabled) {
  border-color: rgba(70, 216, 255, 0.78);
  background: rgba(12, 31, 55, 0.94);
}

.module-card.ready {
  background:
    linear-gradient(145deg, rgba(20, 140, 255, 0.24), rgba(6, 13, 24, 0.96)),
    rgba(8, 16, 29, 0.88);
}

.module-card.disabled {
  opacity: 0.54;
}

.module-kicker {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.module-card strong {
  color: #ffffff;
  font-size: 28px;
  line-height: 1.05;
}

.module-card span:last-child {
  color: var(--muted-light);
  line-height: 1.45;
}

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

.home-energy-balance {
  margin-top: 18px;
}

.home-summary-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  color: var(--ink-light);
  background:
    linear-gradient(135deg, rgba(20, 140, 255, 0.16), rgba(8, 16, 29, 0.9) 46%),
    rgba(8, 16, 29, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.home-summary-card span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.home-summary-card strong {
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
}

.home-summary-card small {
  color: var(--muted-light);
  font-weight: 800;
  line-height: 1.35;
}

.stats-page {
  color: var(--ink-light);
}

.stats-main {
  display: grid;
  gap: 18px;
}

.stats-controls,
.stats-chart-panel,
.stats-breakdowns article {
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: rgba(8, 16, 29, 0.9);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.stats-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.stats-controls h2,
.stats-chart-panel h2,
.stats-breakdowns h3 {
  margin: 0;
  color: #ffffff;
}

.stats-filters {
  display: grid;
  grid-template-columns: 210px 150px;
  gap: 7px 10px;
  align-items: end;
}

.stats-filters label {
  margin: 0;
  color: var(--muted-light);
}

.stats-refresh-button {
  min-height: 40px;
}

.stats-sync-status {
  align-self: center;
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.stats-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.stat-kpi {
  min-height: 118px;
  padding: 16px;
  border: 1px solid rgba(70, 216, 255, 0.22);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(20, 140, 255, 0.16), rgba(255, 255, 255, 0.045));
}

.stat-kpi span,
.stat-kpi small {
  display: block;
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 800;
}

.stat-kpi strong {
  display: block;
  margin: 10px 0 6px;
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
}

.stats-chart-panel {
  padding: 22px;
}

.stats-formula {
  color: var(--muted-light);
  font-size: 13px;
  font-weight: 800;
}

.line-chart {
  min-height: 240px;
  margin-top: 16px;
  border: 1px solid rgba(70, 216, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(rgba(70, 216, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 216, 255, 0.08) 1px, transparent 1px),
    rgba(0, 0, 0, 0.16);
  background-size: 38px 38px;
}

.line-chart svg {
  display: block;
  width: 100%;
  height: 240px;
}

.line-chart line {
  stroke: rgba(159, 177, 200, 0.36);
  stroke-width: 1;
}

.line-chart polyline {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(70, 216, 255, 0.42));
}

.line-chart circle {
  fill: #ffffff;
  stroke: var(--accent);
  stroke-width: 2;
}

.line-chart text {
  fill: var(--muted-light);
  font-size: 12px;
  font-weight: 800;
}

.stats-breakdowns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.stats-breakdowns article {
  padding: 18px;
}

.stats-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.stats-row {
  display: grid;
  gap: 8px;
}

.stats-row strong,
.stats-row span {
  display: block;
}

.stats-row strong {
  color: #ffffff;
}

.stats-row span {
  color: var(--muted-light);
  font-size: 12px;
}

.stats-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.stats-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
}

.calories-main,
.body-main {
  display: grid;
  gap: 18px;
}

.nutrition-controls,
.nutrition-chart-panel,
.body-controls,
.body-form-panel,
.body-calendar-panel,
.body-chart-panel,
.food-panel,
.meal-card {
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: rgba(8, 16, 29, 0.9);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nutrition-controls,
.body-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.nutrition-controls h2,
.nutrition-chart-panel h2,
.body-controls h2,
.body-form-panel h2,
.body-calendar-panel h2,
.body-chart-panel h2,
.food-panel h2,
.meal-card h3 {
  margin: 0;
  color: #ffffff;
}

.nutrition-date-actions {
  display: grid;
  grid-template-columns: 42px 180px 42px;
  gap: 8px;
  align-items: end;
}

.nutrition-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.body-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.nutrition-metric {
  min-height: 116px;
  padding: 16px;
  border: 1px solid rgba(70, 216, 255, 0.22);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(20, 140, 255, 0.18), rgba(255, 255, 255, 0.045));
}

.body-metric {
  min-height: 110px;
  padding: 16px;
  border: 1px solid rgba(70, 216, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(70, 216, 255, 0.12), rgba(255, 255, 255, 0.035)),
    rgba(8, 16, 29, 0.84);
}

.nutrition-metric span,
.body-metric span,
.nutrition-metric small {
  display: block;
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 800;
}

.body-metric small {
  display: block;
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 800;
}

.nutrition-metric strong {
  display: block;
  margin: 10px 0 6px;
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
}

.body-metric strong {
  display: block;
  margin: 10px 0 6px;
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
}

.body-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.body-form-panel,
.body-calendar-panel,
.body-chart-panel {
  padding: 22px;
}

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

.body-form-grid input[type="range"] {
  min-height: 30px;
  padding: 0;
  accent-color: var(--accent);
}

.body-form-grid label strong {
  display: inline-flex;
  min-width: 54px;
  margin-top: 6px;
  padding: 5px 8px;
  border: 1px solid rgba(70, 216, 255, 0.22);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(20, 140, 255, 0.18);
  font-size: 12px;
  justify-content: center;
}

.body-note-field {
  margin-top: 12px;
}

.body-photo-preview {
  margin-top: 14px;
}

.body-photo-frame {
  max-width: 360px;
}

.body-photo-frame img {
  display: block;
  width: min(360px, 100%);
  max-height: 280px;
  object-fit: cover;
  border: 1px solid rgba(70, 216, 255, 0.24);
  border-radius: 8px;
}

.body-calendar-grid .day {
  min-height: 104px;
}

.body-chart-panel .line-chart {
  margin-top: 16px;
}

.body-chart-panel .actual-line {
  stroke: var(--cyan);
}

.body-chart-panel .target-line {
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 3;
  stroke-dasharray: 7 7;
  filter: none;
}

.macro-target-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(70, 216, 255, 0.24);
  border-radius: 8px;
  color: var(--ink-light);
  background: rgba(8, 16, 29, 0.9);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.macro-target-heading h2 {
  margin: 4px 0 0;
  color: #ffffff;
  font-size: 26px;
}

.macro-target-list {
  display: grid;
  gap: 10px;
}

.macro-target-row {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(132, 169, 213, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.macro-target-row strong,
.macro-target-row span {
  display: block;
}

.macro-target-row strong {
  color: #ffffff;
}

.macro-target-row span {
  margin-top: 4px;
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 900;
}

.macro-target-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.macro-target-bar span {
  display: block;
  height: 100%;
  max-width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
}

.macro-target-row.macro-complete .macro-target-bar span {
  background: linear-gradient(90deg, #159a6c, var(--cyan));
}

.energy-balance-panel {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 1.4fr;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(70, 216, 255, 0.24);
  border-radius: 8px;
  color: var(--ink-light);
  background:
    linear-gradient(135deg, rgba(20, 140, 255, 0.2), rgba(8, 16, 29, 0.94) 48%),
    rgba(8, 16, 29, 0.92);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.energy-balance-copy h2 {
  margin: 4px 0;
  color: #ffffff;
  font-size: 36px;
}

.energy-balance-copy p:last-child {
  margin: 0;
  color: var(--muted-light);
  font-weight: 800;
}

.energy-target {
  display: grid;
  align-content: center;
  gap: 10px;
}

.energy-target-scale {
  position: relative;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #159a6c, var(--cyan), #d33149);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.energy-target-scale::after {
  content: "";
  position: absolute;
  top: -5px;
  bottom: -5px;
  left: 50%;
  width: 2px;
  background: rgba(255, 255, 255, 0.72);
}

.energy-target-marker {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 18px rgba(70, 216, 255, 0.62);
}

.energy-target-labels,
.energy-balance-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.energy-target-labels span,
.energy-balance-metrics span {
  color: var(--muted-light);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.energy-target-labels span:nth-child(2) {
  text-align: center;
}

.energy-target-labels span:last-child {
  text-align: right;
}

.energy-balance-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.energy-balance-metrics article {
  padding: 12px;
  border: 1px solid rgba(132, 169, 213, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.energy-balance-metrics strong {
  display: block;
  margin-top: 7px;
  color: #ffffff;
  font-size: 18px;
}

.nutrition-layout {
  display: block;
}

.meal-groups {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.meal-card {
  padding: 18px;
}

.meal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.meal-card-header p {
  margin: 6px 0 0;
  color: var(--muted-light);
  font-size: 13px;
  font-weight: 800;
}

.meal-items {
  display: grid;
  gap: 8px;
}

.food-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 90px 100px minmax(190px, 0.8fr) 82px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(70, 216, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.food-row.approximate {
  border-color: rgba(143, 191, 255, 0.32);
}

.food-macros {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 800;
}

.food-panel {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.profile-window.food-library-window {
  width: min(880px, calc(100vw - 30px));
}

.food-library-window .food-panel {
  max-height: min(72vh, 760px);
  overflow: auto;
}

.food-picker-window {
  width: min(820px, calc(100vw - 30px));
}

.food-picker-body {
  display: grid;
  grid-template-columns: minmax(240px, 0.38fr) minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
}

.food-picker-controls {
  align-self: start;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(70, 216, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.food-filter-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.food-filter-row label {
  display: block;
  margin-bottom: 5px;
}

.food-picker-list {
  display: grid;
  gap: 10px;
  max-height: min(58vh, 620px);
  overflow: auto;
}

.food-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: stretch;
}

.food-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(70, 216, 255, 0.12);
  border-radius: 8px;
  color: var(--ink-light);
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
}

.favorite-food {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(70, 216, 255, 0.24);
  border-radius: 8px;
  color: var(--muted-light);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 950;
}

.favorite-food.active {
  color: #ffffff;
  border-color: rgba(70, 216, 255, 0.58);
  background: rgba(20, 140, 255, 0.22);
}

.food-picker-item.selected {
  border-color: rgba(70, 216, 255, 0.52);
  background: rgba(20, 140, 255, 0.16);
}

.food-picker-item strong,
.food-picker-item small {
  display: block;
}

.food-picker-item small {
  margin-top: 4px;
  color: var(--muted-light);
  font-size: 12px;
}

.food-picker-source {
  flex: 0 0 auto;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.food-library-list {
  display: grid;
  gap: 10px;
}

.food-library-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(70, 216, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.food-library-item.custom-food {
  border-color: rgba(70, 216, 255, 0.34);
  background: rgba(20, 140, 255, 0.08);
}

.food-library-item strong,
.food-library-item span {
  display: block;
}

.food-library-item strong {
  color: #ffffff;
}

.food-library-item span {
  margin-top: 4px;
  color: var(--muted-light);
  font-size: 12px;
}

.food-library-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.food-library-actions {
  flex: 0 0 auto;
}

.food-library-actions .ghost,
.food-library-actions .danger {
  min-height: 32px;
  padding: 0 8px;
  font-size: 12px;
}

.custom-food-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(70, 216, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

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

.custom-food-grid + .custom-food-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.nutrition-chart-panel {
  padding: 22px;
}

.nutrition-chart .target-line {
  stroke: rgba(255, 255, 255, 0.42);
  stroke-width: 2;
  stroke-dasharray: 8 8;
  filter: none;
}

.back-home {
  width: max-content;
  min-height: 34px;
  margin-bottom: 18px;
  padding: 0 12px;
  border: 1px solid rgba(70, 216, 255, 0.32);
  border-radius: 8px;
  color: var(--cyan);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 900;
}

.app-shell {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(2, 5, 11, 0.9), rgba(7, 15, 28, 0.42) 48%, rgba(2, 5, 11, 0.66)),
    linear-gradient(rgba(70, 216, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 216, 255, 0.045) 1px, transparent 1px),
    var(--olympus-bg) center / cover fixed no-repeat,
    #07101e;
  background-size: auto, 48px 48px, 48px 48px, cover, auto;
}

.sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px;
  color: var(--ink-light);
  background:
    linear-gradient(180deg, rgba(4, 9, 18, 0.98), rgba(7, 18, 34, 0.94)),
    linear-gradient(90deg, rgba(20, 140, 255, 0.08), transparent),
    var(--olympus-bg) left center / cover no-repeat,
    #05080d;
  border-right: 1px solid rgba(20, 140, 255, 0.24);
}

.app-shell main {
  background:
    linear-gradient(180deg, rgba(247, 251, 255, 0.94), rgba(231, 238, 247, 0.9)),
    linear-gradient(rgba(20, 140, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 140, 255, 0.05) 1px, transparent 1px);
  background-size: auto, 38px 38px, 38px 38px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
  backdrop-filter: blur(10px);
}

.sidebar-toggle {
  position: absolute;
  top: 18px;
  right: -16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 42px;
  border: 1px solid rgba(70, 216, 255, 0.3);
  border-radius: 8px;
  color: var(--cyan);
  background: #071224;
  font-weight: 950;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 36px minmax(0, 1fr);
}

.app-shell.sidebar-collapsed .sidebar > *:not(.sidebar-toggle) {
  opacity: 0;
  pointer-events: none;
}

.app-shell.sidebar-collapsed .sidebar {
  padding: 0;
}

.app-shell.sidebar-collapsed .sidebar-toggle {
  right: -18px;
}

.sidebar h1,
.topbar h2,
.section-heading h2 {
  margin: 0;
  letter-spacing: 0;
}

.sidebar h1 {
  font-size: 30px;
  line-height: 1.08;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.view-tabs {
  display: grid;
  gap: 8px;
}

.tab-button {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #dce9f8;
  background: rgba(255, 255, 255, 0.06);
  text-align: left;
}

.tab-button.active {
  color: #ffffff;
  border-color: rgba(70, 216, 255, 0.58);
  background: linear-gradient(90deg, rgba(20, 140, 255, 0.44), rgba(70, 216, 255, 0.1));
  font-weight: 900;
}

.panel {
  padding: 18px;
  border: 1px solid rgba(70, 216, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.selected-date {
  margin: 0 0 18px;
  color: #d8e6f6;
}

label {
  display: block;
  margin-bottom: 7px;
  color: inherit;
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
}

input[type="file"] {
  padding: 7px 10px;
}

textarea {
  resize: vertical;
}

input[readonly] {
  color: var(--muted);
  background: #edf2f7;
}

.password-field {
  position: relative;
}

.password-field input {
  width: 100%;
  padding-right: 50px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border-radius: 6px;
  color: #ffffff;
  background: var(--accent);
  transform: translateY(-50%);
}

.password-toggle::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.password-toggle.is-visible::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M4 20 20 4' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M4 20 20 4' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.password-toggle:hover {
  background: var(--accent-strong);
}

main {
  min-width: 0;
  padding: 28px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.topbar,
.section-heading,
.exercise-head,
.routine-title-row,
.history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  margin-bottom: 22px;
}

.topbar h2 {
  font-size: 30px;
}

.button-row,
.month-controls,
.calendar-mode-toggle,
.routine-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.primary,
.ghost,
.danger,
.icon-button,
.mode-button {
  min-height: 38px;
  border-radius: 8px;
  font-weight: 900;
}

.icon-action {
  width: 38px;
  min-width: 38px;
  padding: 0;
  font-size: 15px;
  line-height: 1;
}

.primary {
  padding: 0 15px;
  color: #ffffff;
  background: var(--accent);
}

.primary:hover {
  background: var(--accent-strong);
}

.ghost {
  padding: 0 13px;
  color: var(--ink);
  background: var(--surface-strong);
}

.ghost.icon-action {
  width: 38px;
  min-width: 38px;
  padding: 0;
}

.mode-button {
  padding: 0 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface);
}

.mode-button.active {
  color: #ffffff;
  border-color: var(--accent);
  background: var(--accent);
}

.danger {
  padding: 0 12px;
  color: #ffffff;
  background: var(--danger);
}

.icon-button {
  width: 42px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 18px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-grid.week-mode .day {
  min-height: 148px;
}

.weekdays {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.weekdays span {
  padding: 0 4px;
}

.day {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 96px;
  padding: 10px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(8, 17, 31, 0.96), rgba(13, 27, 45, 0.94));
  color: var(--ink-light);
  text-align: left;
  box-shadow: 0 1px 0 rgba(28, 43, 52, 0.03);
}

.day.status-pending {
  border-color: rgba(20, 140, 255, 0.38);
}

.day.status-partial {
  border-color: rgba(143, 191, 255, 0.66);
  background: linear-gradient(180deg, rgba(14, 32, 54, 0.96), rgba(22, 45, 70, 0.94));
}

.day.status-completed {
  border-color: rgba(21, 154, 108, 0.48);
  background: linear-gradient(180deg, rgba(7, 38, 34, 0.96), rgba(12, 58, 49, 0.94));
}

.day.muted {
  opacity: 0.42;
}

.day.selected {
  outline: 3px solid var(--accent);
}

.day.today .date-number {
  color: #ffffff;
  background: var(--accent);
}

.date-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 900;
}

.routine-pill {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 6px 7px;
  border-radius: 6px;
  color: #eaf6ff;
  background: rgba(20, 140, 255, 0.22);
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-status {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  margin-top: 8px;
  padding: 4px 6px;
  border-radius: 999px;
  color: var(--muted);
  background: #edf2f7;
  font-size: 11px;
  font-weight: 900;
}

.status-pending .day-status {
  color: #dceeff;
  background: rgba(20, 140, 255, 0.18);
}

.status-partial .day-status {
  color: #e7f0ff;
  background: rgba(143, 191, 255, 0.22);
}

.status-completed .day-status {
  color: #dcfff0;
  background: rgba(21, 154, 108, 0.24);
}

.routine-push .routine-pill,
.routine-push.routine-pill {
  background: rgba(20, 140, 255, 0.28);
}

.routine-pull .routine-pill,
.routine-pull.routine-pill {
  background: rgba(70, 216, 255, 0.24);
}

.routine-legs .routine-pill,
.routine-legs.routine-pill {
  background: rgba(33, 188, 124, 0.26);
}

.routine-upper .routine-pill,
.routine-upper.routine-pill {
  background: rgba(143, 191, 255, 0.26);
}

.routine-chest-back .routine-pill,
.routine-chest-back.routine-pill {
  background: rgba(92, 127, 255, 0.28);
}

.routine-arms .routine-pill,
.routine-arms.routine-pill {
  background: rgba(185, 214, 255, 0.22);
}

.day-progress {
  display: block;
  width: 100%;
  height: 6px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.day-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
}

.day-progress-text {
  margin-top: 5px;
  color: var(--muted-light);
  font-size: 11px;
  font-weight: 900;
}

.note-pill {
  display: inline-flex;
  width: max-content;
  margin-top: 6px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #dff8ff;
  background: rgba(70, 216, 255, 0.18);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.workout-panel,
.routine-pane,
.history-item {
  margin-top: 22px;
  padding: 22px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.workout-heading-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.training-focus-mode .app-header,
.training-focus-mode .sidebar,
.training-focus-mode #calendarView > .topbar,
.training-focus-mode #calendarGrid,
.training-focus-mode #calendarView > .weekdays {
  display: none;
}

.training-focus-mode .app-shell {
  grid-template-columns: 1fr;
}

.training-focus-mode .app-shell main {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(3, 7, 14, 0.96), rgba(6, 14, 26, 0.94)),
    var(--olympus-bg) center / cover fixed no-repeat;
}

.training-focus-mode .workout-panel {
  margin: 0 auto;
  max-width: 1180px;
  color: var(--ink-light);
  background: rgba(7, 14, 26, 0.94);
  border: 1px solid rgba(70, 216, 255, 0.24);
}

.training-focus-mode .workout-panel .eyebrow {
  color: var(--cyan);
}

.workout-panel .eyebrow,
.topbar .eyebrow {
  color: var(--accent);
}

.empty-state {
  margin: 18px 0 0;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcfd;
}

.workout-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
}

.workout-status-banner > div {
  display: grid;
  gap: 5px;
}

.workout-status-banner strong {
  color: var(--ink);
}

.workout-status-banner span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.workout-status-banner.status-pending {
  border-color: rgba(20, 140, 255, 0.28);
  background: #eef7ff;
}

.workout-status-banner.status-partial {
  border-color: rgba(143, 191, 255, 0.54);
  background: #f1f7ff;
}

.workout-status-banner.status-completed {
  border-color: rgba(21, 154, 108, 0.35);
  background: #effbf5;
}

.training-focus-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(170px, 0.7fr) minmax(190px, 0.8fr) minmax(190px, 0.8fr);
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(70, 216, 255, 0.28);
  border-radius: 8px;
  color: var(--ink-light);
  background:
    linear-gradient(135deg, rgba(20, 140, 255, 0.18), rgba(8, 16, 29, 0.95)),
    rgba(8, 16, 29, 0.94);
}

.training-next-card,
.training-rest-card,
.training-history-card,
.training-feeling-card {
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 14px;
  border: 1px solid rgba(132, 169, 213, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.training-next-card h3,
.training-next-card p {
  margin: 0;
}

.training-next-card h3,
.training-rest-card strong,
.training-history-card strong {
  color: #ffffff;
}

.training-rest-card strong {
  font-size: 42px;
  line-height: 1;
}

.training-focus-panel span,
.training-focus-panel small,
.training-next-card p {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 800;
}

.training-focus-actions,
.training-feeling-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.training-feeling-card button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(20, 140, 255, 0.35);
  font-size: 12px;
  font-weight: 900;
}

.training-focus-panel.timer-active {
  border-color: rgba(70, 216, 255, 0.58);
  box-shadow: inset 0 0 24px rgba(70, 216, 255, 0.12);
}

.trainer-note-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin: 18px 0 4px;
  padding: 14px;
  border: 1px solid rgba(70, 216, 255, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(20, 140, 255, 0.08), #f7fbff);
}

.trainer-note-panel textarea {
  min-height: 76px;
  resize: vertical;
}

.trainer-note-panel p:not(.eyebrow) {
  margin: 4px 0 0;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.45;
}

.recovery-panel {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(132, 169, 213, 0.28);
  border-radius: 8px;
  background: #f7fbff;
}

.recovery-panel header,
.next-session-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.recovery-panel h3 {
  margin: 4px 0 0;
  color: var(--ink);
}

.recovery-panel header > span {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(20, 140, 255, 0.1);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.recovery-panel.recovery-good {
  border-color: rgba(21, 154, 108, 0.34);
  background: #effbf5;
}

.recovery-panel.recovery-low {
  border-color: rgba(211, 49, 73, 0.34);
  background: #fff3f5;
}

.recovery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.recovery-grid label,
.recovery-note {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.recovery-grid strong {
  color: var(--ink);
  font-size: 14px;
}

.recovery-input {
  width: 100%;
  min-height: 26px;
  padding: 0;
}

.recovery-note textarea {
  min-height: 64px;
  resize: vertical;
}

.workout-progress-summary {
  min-width: min(220px, 100%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.routine-layout {
  display: grid;
  gap: 18px;
}

.routine-pane {
  margin-top: 0;
  padding-left: 0;
}

.routine-pane.collapsed .exercise-list,
.exercise-card.collapsed .exercise-body {
  display: none;
}

.routine-title-row {
  margin-bottom: 18px;
}

.routine-pane.collapsed .routine-title-row {
  margin-bottom: 0;
}

.routine-title-row,
.exercise-head {
  justify-content: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  cursor: pointer;
}

.routine-title-row {
  border-color: rgba(20, 140, 255, 0.46);
  background: linear-gradient(90deg, rgba(5, 12, 23, 0.98), rgba(8, 22, 39, 0.96));
  box-shadow: inset 4px 0 0 var(--accent);
}

.exercise-head {
  border-color: rgba(70, 216, 255, 0.34);
  background: linear-gradient(90deg, rgba(11, 25, 43, 0.98), rgba(16, 36, 58, 0.96));
  box-shadow: inset 4px 0 0 rgba(70, 216, 255, 0.74);
}

.routine-title-row:hover {
  border-color: rgba(20, 140, 255, 0.72);
  background: linear-gradient(90deg, rgba(8, 18, 33, 0.98), rgba(12, 31, 54, 0.96));
}

.exercise-head:hover {
  border-color: rgba(70, 216, 255, 0.6);
  background: linear-gradient(90deg, rgba(14, 31, 52, 0.98), rgba(18, 43, 69, 0.96));
}

.routine-title-row .button-row,
.exercise-head .button-row {
  margin-left: auto;
}

.routine-title-row::before,
.exercise-head::before {
  content: "▾";
  color: var(--cyan);
  font-size: 16px;
  font-weight: 950;
}

.routine-pane.collapsed .routine-title-row::before,
.exercise-card.collapsed .exercise-head::before {
  content: "▸";
}

.routine-title {
  flex: 0 1 460px;
  max-width: 460px;
  color: var(--ink-light);
  border-color: rgba(70, 216, 255, 0.26);
  background: rgba(255, 255, 255, 0.06);
  font-size: 24px;
  font-weight: 900;
}

.exercise-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  margin-left: 18px;
  padding-left: 16px;
  border-left: 2px solid rgba(20, 140, 255, 0.18);
}

.exercise-card {
  padding: 14px;
  border: 1px solid rgba(70, 216, 255, 0.18);
  border-radius: 8px;
  background: rgba(9, 21, 36, 0.08);
}

.exercise-body,
.exercise-media-editor {
  display: grid;
  gap: 10px;
}

.exercise-body {
  margin-top: 12px;
  margin-left: 22px;
  padding-left: 16px;
  border-left: 2px solid rgba(70, 216, 255, 0.18);
}

.exercise-name {
  flex: 0 1 420px;
  max-width: 420px;
  color: var(--ink-light);
  border-color: rgba(70, 216, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
  font-weight: 900;
}

.series-table {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(132, 169, 213, 0.34);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(17, 34, 54, 0.96), rgba(22, 44, 68, 0.94));
}

.series-table .add-set {
  justify-self: start;
}

.table-head,
.set-row {
  display: grid;
  grid-template-columns: 70px repeat(3, minmax(96px, 1fr)) 88px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(132, 169, 213, 0.34);
  border-radius: 8px;
  background: rgba(26, 47, 72, 0.94);
}

.set-row.set-empty {
  box-shadow: inset 4px 0 0 rgba(159, 177, 200, 0.34);
}

.set-row.set-partial {
  border-color: rgba(143, 191, 255, 0.62);
  box-shadow: inset 4px 0 0 rgba(143, 191, 255, 0.88);
}

.set-row.set-ready {
  border-color: rgba(70, 216, 255, 0.64);
  box-shadow: inset 4px 0 0 rgba(70, 216, 255, 0.9);
}

.set-row.set-confirmed,
.set-row.set-complete {
  border-color: rgba(21, 154, 108, 0.58);
  box-shadow: inset 4px 0 0 rgba(21, 154, 108, 0.9);
}

.set-row.set-error {
  border-color: rgba(211, 49, 73, 0.72);
  box-shadow: inset 4px 0 0 rgba(211, 49, 73, 0.95);
}

.set-row.set-confirmed input:disabled {
  color: #dffcf1;
  border-color: rgba(21, 154, 108, 0.48);
  background: rgba(21, 154, 108, 0.12);
  opacity: 1;
}

.set-row .set-done-button:disabled {
  color: #dffcf1;
  background: rgba(21, 154, 108, 0.22);
  opacity: 1;
}

.set-actions {
  display: grid;
  gap: 4px;
}

.set-validation {
  color: #ff8da0;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
}

.log-table .table-head,
.log-table .set-row {
  grid-template-columns: 70px repeat(6, minmax(84px, 1fr)) minmax(92px, 0.7fr);
}

.table-head {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.set-index {
  color: var(--ink-light);
  font-weight: 900;
}

.set-row > span {
  color: var(--ink-light);
  font-weight: 800;
}

.workout-exercise {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.workout-exercise:first-child {
  border-top: 0;
}

.workout-exercise h3 {
  margin: 0 0 12px;
}

.exercise-last-session {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  gap: 8px;
  align-items: center;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid rgba(20, 140, 255, 0.2);
  border-radius: 999px;
  color: var(--muted);
  background: #eef7ff;
  font-size: 12px;
  font-weight: 850;
}

.exercise-last-session span {
  color: var(--accent);
  font-weight: 950;
  text-transform: uppercase;
}

.exercise-last-session strong {
  color: var(--ink);
}

.exercise-pr-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.exercise-pr-badges span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid rgba(21, 154, 108, 0.28);
  border-radius: 999px;
  color: #0d5f46;
  background: #effbf5;
  font-size: 12px;
  font-weight: 850;
}

.exercise-pr-badges strong {
  color: #086142;
  font-weight: 950;
  text-transform: uppercase;
}

.set-row.set-highlight {
  border-color: rgba(70, 216, 255, 0.95);
  box-shadow: 0 0 0 3px rgba(70, 216, 255, 0.22), inset 4px 0 0 var(--cyan);
}

.workout-exercise-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.workout-exercise-head h3 {
  margin: 0;
}

.workout-exercise-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.workout-exercise-head span {
  flex: none;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 900;
}

.copy-targets {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.set-done-button,
.edit-set-button {
  min-height: 34px;
  padding: 0 8px;
  color: var(--ink-light);
  background: rgba(20, 140, 255, 0.28);
}

.set-done-button:hover:not(:disabled),
.edit-set-button:hover:not(:disabled) {
  background: var(--accent);
}

.edit-set-button {
  color: #dffcf1;
  background: rgba(21, 154, 108, 0.22);
  font-size: 18px;
}

.exercise-feedback-grid {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(132, 169, 213, 0.28);
  border-radius: 8px;
  background: rgba(8, 17, 31, 0.05);
}

.exercise-feedback-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.exercise-feedback-grid textarea {
  min-height: 76px;
  resize: vertical;
}

.exercise-recommendation {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(132, 169, 213, 0.28);
  border-radius: 8px;
  color: var(--ink);
  background: #f7fbff;
}

.exercise-recommendation strong {
  color: var(--ink);
}

.exercise-recommendation span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.exercise-recommendation.recommendation-increase {
  border-color: rgba(21, 154, 108, 0.34);
  background: #effbf5;
}

.exercise-recommendation.recommendation-reduce {
  border-color: rgba(211, 49, 73, 0.32);
  background: #fff3f5;
}

.exercise-recommendation.recommendation-maintain {
  border-color: rgba(20, 140, 255, 0.3);
}

.exercise-recommendation.recommendation-pending {
  border-style: dashed;
}

.workout-summary-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(21, 154, 108, 0.3);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(21, 154, 108, 0.12), rgba(247, 251, 255, 0.96));
}

.workout-summary-panel h3,
.workout-summary-panel p {
  margin: 0;
}

.workout-summary-panel h3 {
  color: var(--ink);
  font-size: 24px;
}

.workout-summary-panel p {
  color: var(--muted);
  font-weight: 800;
}

.workout-summary-metrics,
.history-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.workout-summary-metrics article,
.history-summary-grid article {
  padding: 10px;
  border: 1px solid rgba(132, 169, 213, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.workout-summary-metrics span,
.history-summary-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.workout-summary-metrics strong,
.history-summary-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 18px;
}

.next-session-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(70, 216, 255, 0.28);
  border-radius: 8px;
  background: #f7fbff;
}

.next-session-panel h3 {
  margin: 4px 0 0;
  color: var(--ink);
}

.next-session-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.next-session-exercise {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(132, 169, 213, 0.28);
  border-radius: 8px;
  background: #ffffff;
}

.next-session-exercise.recommendation-increase {
  border-color: rgba(21, 154, 108, 0.34);
}

.next-session-exercise.recommendation-reduce {
  border-color: rgba(211, 49, 73, 0.32);
}

.next-session-exercise strong {
  color: var(--ink);
}

.next-session-exercise > span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.next-session-sets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.next-session-sets small {
  padding: 5px 7px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(20, 140, 255, 0.08);
  font-size: 11px;
  font-weight: 850;
}

.exercise-feeling {
  font-weight: 900;
}

.exercise-feeling.feeling-easy {
  border-color: rgba(21, 154, 108, 0.42);
  background: #effbf5;
}

.exercise-feeling.feeling-good {
  border-color: rgba(20, 140, 255, 0.42);
  background: #eef7ff;
}

.exercise-feeling.feeling-heavy {
  border-color: rgba(143, 191, 255, 0.62);
  background: #f1f7ff;
}

.exercise-feeling.feeling-failure {
  border-color: rgba(211, 49, 73, 0.42);
  background: #fff1f4;
}

.exercise-media {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
}

.exercise-image-frame {
  display: grid;
  gap: 8px;
}

.exercise-image-frame.editor-preview {
  max-width: 360px;
}

.exercise-image-button {
  display: block;
  width: max-content;
  max-width: 100%;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  cursor: zoom-in;
}

.exercise-image-button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.exercise-media img,
.exercise-image-preview img {
  display: block;
  width: min(520px, 100%);
  max-height: 320px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.exercise-image-preview img {
  width: min(360px, 100%);
  max-height: 220px;
}

.exercise-media a,
.exercise-image-preview a {
  width: max-content;
  color: var(--accent);
  font-weight: 900;
}

.image-fallback {
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.image-viewer-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(1, 4, 10, 0.9);
  backdrop-filter: blur(10px);
}

.image-viewer-stage {
  display: grid;
  place-items: center;
  width: min(1100px, 92vw);
  height: min(780px, 82vh);
  overflow: auto;
  border: 1px solid rgba(70, 216, 255, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(rgba(70, 216, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 216, 255, 0.06) 1px, transparent 1px),
    rgba(4, 10, 20, 0.94);
  background-size: 34px 34px;
  cursor: zoom-in;
  touch-action: none;
}

.image-viewer-stage img {
  display: block;
  max-width: 92%;
  max-height: 92%;
  transform-origin: center;
  transition: transform 120ms ease;
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  user-select: none;
  -webkit-user-drag: none;
  cursor: inherit;
}

.image-viewer-stage.is-zoomed {
  cursor: grab;
}

.image-viewer-stage.dragging {
  cursor: grabbing;
}

.image-viewer-stage.dragging img {
  transition: none;
}

.image-viewer-close {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 61;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(70, 216, 255, 0.38);
  border-radius: 8px;
  color: var(--ink-light);
  background: rgba(8, 16, 29, 0.96);
  font-size: 18px;
  font-weight: 950;
}

.history-list {
  display: grid;
  gap: 14px;
}

.history-item {
  margin-top: 0;
}

.history-details summary {
  cursor: pointer;
  list-style: none;
}

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

.history-item h3,
.history-item p {
  margin: 0;
}

.history-meta {
  color: var(--muted);
  font-size: 13px;
}

.history-summary-grid {
  margin-top: 14px;
}

.history-note {
  margin-top: 10px;
  color: var(--muted);
  font-weight: 800;
}

.history-exercises {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.history-exercise {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
}

.history-exercise header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.history-exercise header strong {
  color: var(--ink);
}

.history-exercise header span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.history-set-table {
  display: grid;
  grid-template-columns: 70px repeat(3, minmax(70px, 1fr));
  gap: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.history-set-table span {
  padding: 7px 8px;
  border-radius: 6px;
  background: rgba(8, 17, 31, 0.06);
}

.history-set-table span:nth-child(-n + 4) {
  color: var(--muted);
  font-weight: 950;
  text-transform: uppercase;
}

.status {
  font-size: 12px;
  font-weight: 900;
  color: var(--warning);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(1, 4, 10, 0.72);
  backdrop-filter: blur(10px);
}

.profile-window {
  width: min(1120px, 100%);
  max-height: min(860px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  color: var(--ink-light);
  background: rgba(8, 16, 29, 0.98);
  box-shadow: var(--shadow);
}

.profile-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border-bottom: 1px solid var(--line-dark);
  background: rgba(8, 16, 29, 0.98);
}

.profile-header h2 {
  margin: 0;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 18px;
  padding: 22px;
}

.profile-grid.single-panel {
  grid-template-columns: minmax(0, 1fr);
}

.profile-section {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.profile-section h3 {
  margin: 0;
  color: #ffffff;
}

.profile-section label,
.security-form label {
  color: var(--muted-light);
}

.security-form {
  display: grid;
  gap: 10px;
}

.security-form + .security-form {
  padding-top: 16px;
  border-top: 1px solid var(--line-dark);
}

.recovery-callout {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(70, 216, 255, 0.22);
  border-radius: 8px;
  background: rgba(70, 216, 255, 0.07);
}

.recovery-callout strong {
  color: #ffffff;
}

.recovery-callout p {
  margin: 0;
  color: var(--muted-light);
  font-size: 13px;
  line-height: 1.45;
}

.admin-users-window {
  max-width: 920px;
}

.users-admin-body {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.admin-note {
  margin: 0;
  color: var(--muted-light);
  line-height: 1.45;
}

.users-admin-list {
  display: grid;
  gap: 10px;
}

.user-admin-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px 190px 105px 105px;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.user-admin-row strong,
.user-admin-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-admin-row strong {
  color: #ffffff;
}

.user-admin-row span {
  color: var(--muted-light);
  font-size: 13px;
}

.user-admin-row button:disabled,
.user-admin-row select:disabled {
  opacity: 0.5;
}

.placeholder-main {
  display: grid;
  min-height: 62vh;
  place-items: center;
}

.placeholder-panel {
  width: min(760px, 100%);
  padding: 34px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.placeholder-panel h2 {
  margin: 0 0 26px;
  color: #ffffff;
  font-size: 42px;
  line-height: 1.05;
}

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

.placeholder-grid div {
  padding: 18px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.metric-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.placeholder-grid strong {
  color: #ffffff;
  font-size: 28px;
}

@media (max-width: 960px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    min-height: 360px;
  }

  .module-grid,
  .today-workout-panel,
  .home-command-panel,
  .home-quick-actions,
  .home-insights-panel,
  .home-summary-grid,
  .home-user-board,
  .home-checklist-grid,
  .home-user-upcoming-list,
  .home-manager-grid,
  .training-focus-panel,
  .profile-grid,
  .stats-kpis,
  .stats-breakdowns,
  .nutrition-summary,
  .body-summary,
  .macro-target-panel,
  .energy-balance-panel,
  .nutrition-layout,
  .body-layout,
  .body-form-grid,
  .workout-summary-panel,
  .food-picker-body {
    grid-template-columns: 1fr;
  }

  .home-command-macros,
  .coach-status-strip,
  .home-upcoming-list,
  .home-load-map,
  .home-muscle-balance,
  .home-planning-list,
  .home-adherence-list,
  .home-recovery-list,
  .workout-summary-metrics,
  .history-summary-grid,
  .next-session-list,
  .recovery-grid {
    grid-template-columns: 1fr;
  }

  .home-week-strip {
    grid-template-columns: repeat(7, minmax(112px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .home-coach-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .home-coach-row small,
  .home-coach-row em,
  .home-coach-row > span:last-child,
  .home-coach-row > span:nth-of-type(2),
  .coach-row-actions {
    grid-column: 2;
  }

  .coach-row-actions {
    justify-content: flex-start;
  }

  .home-feedback-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 880px) {
  .app-header {
    gap: 10px;
    padding: 12px;
  }

  .screen-nav {
    flex: 0 0 auto;
  }

  .user-zone-shell {
    min-width: 0;
    justify-content: flex-end;
  }

  .user-zone {
    max-width: min(280px, calc(100vw - 114px));
  }

  .user-menu {
    right: 0;
    width: min(260px, calc(100vw - 24px));
    max-width: none;
  }

  .home-page,
  .auth-page,
  .placeholder-page,
  .stats-page,
  .body-page,
  .calories-page {
    padding: 20px;
  }

  .home-header,
  .user-cluster,
  .auth-brand-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-language-switcher {
    margin-left: 0;
  }

  .auth-brand {
    padding: 24px;
  }

  .auth-brand h1 {
    font-size: 44px;
  }

  .home-hero {
    padding: 24px;
  }

  .hero-copy h2 {
    font-size: 44px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding: 22px;
  }

  main {
    padding: 22px;
  }

  .topbar,
  .section-heading,
  .exercise-head,
  .routine-title-row,
  .history-row {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-grid {
    gap: 5px;
  }

  .day {
    min-height: 76px;
    padding: 7px;
  }

  .routine-pill {
    font-size: 11px;
  }

  .table-head {
    display: none;
  }

  .table-head,
  .set-row,
  .log-table .table-head,
  .log-table .set-row,
  .placeholder-grid,
  .form-grid,
  .checkbox-group,
  .user-admin-row,
  .stats-filters,
  .nutrition-date-actions,
  .macro-target-row,
  .food-row,
  .custom-food-grid,
  .custom-food-grid + .custom-food-grid,
  .food-filter-row,
  .home-quick-action,
  .trainer-note-panel {
    grid-template-columns: 1fr;
  }

  .home-quick-action span {
    grid-row: auto;
  }

  .stats-controls,
  .nutrition-controls,
  .body-controls,
  .meal-card-header,
  .workout-status-banner,
  .workout-exercise-head {
    align-items: stretch;
    flex-direction: column;
  }

  .exercise-feedback-grid {
    grid-template-columns: 1fr;
  }

  .home-language-row {
    justify-content: flex-start;
  }

  .modal {
    padding: 12px;
  }
}
