:root {
  --bg: #050505;
  --panel: #111113;
  --panel-2: #18181b;
  --line: rgba(224, 173, 63, 0.24);
  --gold: #e0ad3f;
  --gold-2: #f6cf6a;
  --text: #f8fafc;
  --muted: #a1a1aa;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  --radius: 22px;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(224, 173, 63, 0.15), transparent 34rem),
    linear-gradient(135deg, #050505 0%, #111113 52%, #050505 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(440px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(17, 17, 19, 0.9);
  box-shadow: var(--shadow);
  text-align: center;
}

.login-card img {
  width: min(260px, 84%);
  margin-bottom: 20px;
}

.login-card h1,
.topbar h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.login-card p,
.muted {
  color: var(--muted);
}

.login-card label {
  margin-top: 16px;
  text-align: left;
}

.login-card .button {
  width: 100%;
  margin-top: 24px;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 290px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-gutter: stable;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 5, 5, 0.82);
  padding: 24px 24px 28px;
}

.brand {
  display: grid;
  gap: 10px;
  margin-bottom: 32px;
  color: var(--gold-2);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand img {
  width: 180px;
  max-width: 100%;
}

.nav {
  display: grid;
  gap: 10px;
  padding-bottom: 18px;
}

.nav a {
  border: 1px solid transparent;
  border-radius: 16px;
  color: var(--muted);
  padding: 14px 16px;
}

.nav a.active,
.nav a:hover {
  border-color: var(--line);
  background: rgba(224, 173, 63, 0.09);
  color: var(--text);
}

.sidebar-footer {
  display: grid;
  gap: 8px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

.content {
  min-width: 0;
  padding: 30px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.grid {
  display: grid;
  gap: 18px;
}

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

.two-col {
  grid-template-columns: 1.2fr 0.8fr;
}

.client-start-preview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.client-start-preview-grid > .card {
  min-width: 0;
  width: 100%;
}

.client-start-preview-grid .profile-head > .badge {
  flex: 0 0 auto;
  justify-content: center;
  min-width: 112px;
  text-align: center;
  white-space: nowrap;
}

.card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(17, 17, 19, 0.84);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
  padding: 22px;
}

.stat strong {
  display: block;
  color: var(--gold-2);
  font-size: 34px;
}

.stat span {
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 10px 18px;
}

.button.primary {
  border-color: var(--gold);
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #151006;
}

.button.danger {
  border-color: rgba(239, 68, 68, 0.45);
  color: #fecaca;
}

.button.disabled,
.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.compact-button {
  min-height: 38px;
  padding: 8px 14px;
}

.diet-food-editor {
  display: grid;
  gap: 16px;
}

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

.diet-food-totals > div {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
}

.diet-food-totals span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.diet-food-totals strong {
  color: var(--gold-2);
  font-size: 22px;
}

.diet-food-rows {
  display: grid;
  gap: 16px;
}

.diet-meal-group {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(245, 191, 73, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  padding: 16px;
}

.diet-meal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.diet-meal-head h3 {
  margin: 0;
}

.diet-meal-rows {
  display: grid;
  gap: 12px;
}

.diet-food-row {
  display: grid;
  align-items: end;
  gap: 12px;
  grid-template-columns: minmax(280px, 2fr) minmax(110px, 0.5fr) minmax(180px, 1fr) auto;
}

.diet-food-select input {
  min-width: 260px;
}

.diet-food-select .exercise-row-hint {
  margin-top: 6px;
}

.diet-food-select {
  position: relative;
}

.diet-food-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  overflow: hidden;
  border: 1px solid rgba(245, 191, 73, 0.28);
  border-radius: 14px;
  background: #101012;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.5);
}

.diet-food-result,
.diet-food-result-empty {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) 90px 84px minmax(170px, 1fr);
  gap: 12px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: var(--text);
  padding: 12px 14px;
  text-align: left;
}

.diet-food-result {
  cursor: pointer;
}

.diet-food-result:hover,
.diet-food-result:focus {
  background: rgba(245, 191, 73, 0.12);
}

.diet-food-result span {
  align-self: center;
  font-size: 13px;
}

.diet-food-result strong,
.diet-food-result small {
  display: block;
}

.diet-food-result small {
  color: var(--muted);
  margin-top: 3px;
}

.diet-food-result-empty {
  grid-template-columns: 1fr;
  color: var(--muted);
}

@media (max-width: 980px) {
  .diet-meal-head,
  .diet-food-row {
    grid-template-columns: 1fr;
  }

  .diet-meal-head {
    align-items: stretch;
    flex-direction: column;
  }

  .diet-food-results {
    position: static;
    margin-top: 8px;
  }

  .diet-food-result {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.macro-alert {
  border-radius: 14px;
  margin: 0;
  padding: 12px 14px;
}

.macro-alert.success {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

.macro-alert.warning {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
}

.macro-alert.danger {
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
}

.public-food-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--text);
}

.public-food-list span {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--gold-2);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.badge.active {
  border-color: rgba(34, 197, 94, 0.42);
  color: #86efac;
}

.badge.paused {
  border-color: rgba(245, 158, 11, 0.42);
  color: #fcd34d;
}

.badge.pending {
  border-color: rgba(224, 173, 63, 0.42);
  color: var(--gold-2);
}

.badge.archived {
  color: #d4d4d8;
}

.badge.current {
  border-color: rgba(34, 197, 94, 0.42);
  color: #86efac;
}

.badge.draft {
  border-color: rgba(224, 173, 63, 0.42);
  color: var(--gold-2);
}

.badge.suggested {
  border-color: rgba(96, 165, 250, 0.5);
  color: #93c5fd;
}

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

.field.full {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  background: #09090b;
  color: var(--text);
  font: inherit;
  padding: 12px 14px;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.brand-preview {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.brand-preview img,
.brand-logo-preview {
  display: block;
  width: min(260px, 100%);
  max-width: 260px;
  max-height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: #050505;
  object-fit: contain;
  padding: 10px;
}

.color-field {
  position: relative;
  display: grid;
  grid-template-columns: 74px 1fr;
  align-items: stretch;
  gap: 12px;
  min-height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    #09090b;
  padding: 10px;
  overflow: hidden;
}

.color-field::before {
  content: "";
  display: block;
  min-height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 42%),
    var(--swatch-color, var(--gold));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.color-field input[type="color"] {
  position: absolute;
  inset: 10px auto 10px 10px;
  width: 74px;
  height: calc(100% - 20px);
  min-height: 50px;
  opacity: 0;
  border: 0;
  cursor: pointer;
  padding: 0;
}

.color-field strong {
  align-self: center;
  color: var(--text);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.color-field strong::after {
  content: "Click para cambiar";
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.flash {
  margin-bottom: 18px;
  border-radius: 16px;
  padding: 14px 16px;
}

.flash.success {
  background: rgba(34, 197, 94, 0.14);
  color: #bbf7d0;
}

.flash.error {
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
}

.public-page {
  background:
    radial-gradient(circle at 50% 0%, rgba(224, 173, 63, 0.18), transparent 34rem),
    #050505;
}

.public-shell {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.public-header {
  padding: 18px 0 14px;
  text-align: center;
}

.public-header img {
  width: min(140px, 48vw);
  margin-bottom: 12px;
}

.public-header h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.public-shell .card {
  margin-bottom: 18px;
}

.profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.profile-head h2,
.card h2,
.card h3 {
  margin-top: 0;
}

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

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding-bottom: 10px;
}

.detail-list span:first-child {
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  border-left: 3px solid var(--gold);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  padding: 14px 16px;
}

.progress-panel {
  overflow: hidden;
}

.progress-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 16px;
  align-items: stretch;
  margin-top: 18px;
  border: 1px solid rgba(224, 173, 63, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 0% 0%, rgba(246, 207, 106, 0.18), transparent 28rem),
    rgba(224, 173, 63, 0.07);
  padding: 20px;
}

.progress-hero.single {
  grid-template-columns: 1fr;
}

.progress-hero span,
.progress-hero-stat span,
.progress-latest-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.progress-hero strong {
  display: block;
  margin-top: 8px;
  color: var(--gold-2);
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1;
}

.progress-hero p {
  margin: 12px 0 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}

.progress-hero-stat {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.22);
  padding: 16px;
  text-align: center;
}

.progress-hero-stat strong {
  margin: 6px 0;
  font-size: 44px;
}

.progress-hero-stat small {
  color: var(--muted);
  font-weight: 700;
}

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

.progress-metric-card,
.progress-latest-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  padding: 16px;
}

.progress-metric-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.progress-metric-card strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--gold-2);
  font-size: 28px;
}

.progress-metric-card small {
  color: var(--muted);
  font-weight: 700;
}

.progress-metric-card.good,
.progress-metric-card.down {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(34, 197, 94, 0.08);
}

.progress-metric-card.watch {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.1);
}

.progress-metric-card.info,
.progress-metric-card.up {
  border-color: rgba(96, 165, 250, 0.34);
  background: rgba(96, 165, 250, 0.08);
}

.progress-metric-card.neutral {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.035);
}

.progress-metric-card.watch strong {
  color: #fbbf24;
}

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

.progress-latest-card strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 18px;
}

.progress-latest-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
}


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

.progress-chart-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  padding: 16px;
  overflow: hidden;
}

.progress-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.progress-chart-head span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.progress-chart-head strong {
  display: block;
  margin-top: 6px;
  color: var(--gold-2);
  font-size: 24px;
}

.progress-chart-head small {
  color: var(--muted);
  font-weight: 700;
  text-align: right;
}

.progress-chart {
  display: block;
  width: 100%;
  height: 170px;
  margin-top: 10px;
}

.progress-chart line {
  stroke: rgba(255, 255, 255, 0.13);
  stroke-width: 2;
}

.progress-chart polyline {
  fill: none;
  stroke: var(--gold);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.progress-chart circle {
  fill: #070707;
  stroke: var(--gold-2);
  stroke-width: 4;
}

.progress-chart-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.progress-table-wrap {
  margin-top: 16px;
}

.progress-photo-section {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.progress-photo-pair {
  margin-top: 0;
}

.progress-photo-pair article {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
}

.progress-photo-pair img,
.progress-photo-pair .empty-photo {
  min-height: 340px;
}
.progress-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.metric-card {
  border: 1px solid rgba(224, 173, 63, 0.2);
  border-radius: 18px;
  background: rgba(224, 173, 63, 0.07);
  padding: 16px;
}

.metric-card span,
.metric-card small,
.comparison-note {
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin: 6px 0;
  color: var(--gold-2);
  font-size: 24px;
}

.comparison-table strong {
  color: var(--gold-2);
}

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

.before-after article {
  display: grid;
  gap: 10px;
}

.before-after span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.before-after img,
.empty-photo {
  width: 100%;
  min-height: 280px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  object-fit: cover;
}

.empty-photo {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.exercise-media img,
.exercise-media video {
  display: block;
  width: 100%;
  max-height: 440px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  background: #050505;
  object-fit: contain;
}

.routine-reference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.routine-reference-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.routine-reference-preview {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #050505;
  cursor: zoom-in;
}

.routine-reference-preview img,
.routine-reference-preview video {
  display: block;
  width: 100%;
  height: 92px;
  background: #050505;
  object-fit: cover;
}

.routine-reference-card div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.routine-reference-card strong {
  color: var(--gold-2);
  font-size: 15px;
  line-height: 1.2;
}

.routine-reference-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.routine-reference-card span::before {
  content: "Grupo: ";
  color: var(--muted);
  font-weight: 800;
}

.exercise-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
}

.exercise-lightbox.open {
  display: grid;
}

.exercise-lightbox-panel {
  width: min(880px, 94vw);
  max-height: 88vh;
  overflow: hidden;
  border: 1px solid rgba(246, 207, 106, 0.28);
  border-radius: 24px;
  background: #080808;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
}

.exercise-lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.exercise-lightbox-head strong {
  display: block;
  color: var(--gold-2);
  font-size: 18px;
}

.exercise-lightbox-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.exercise-lightbox-close {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.exercise-lightbox-body {
  display: grid;
  place-items: center;
  padding: 18px;
}

.exercise-lightbox-body img,
.exercise-lightbox-body video {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 68vh;
  border-radius: 18px;
  background: #050505;
  object-fit: contain;
}

.routine-day-editor {
  display: grid;
  gap: 16px;
}

.routine-day-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.routine-day-heading h3,
.routine-day-heading p {
  margin-bottom: 0;
}

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

.routine-edit-rows {
  display: grid;
  gap: 10px;
}

.routine-edit-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) 90px 100px 115px minmax(160px, 1fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
}

.routine-edit-row label {
  gap: 6px;
}


.exercise-row-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.exercise-row-preview {
  display: inline-grid;
  width: 74px;
  height: 52px;
  margin-top: 4px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #050505;
}

.exercise-row-preview[hidden] {
  display: none;
}

.exercise-row-preview img,
.exercise-row-preview video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.exercise-library-link {
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.exercise-library-link[hidden] {
  display: none;
}
.compact-button {
  min-height: 42px;
  padding-inline: 14px;
}

.routine-legacy-text {
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 12px 14px;
}

.routine-legacy-text summary {
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.routine-legacy-text label {
  margin-top: 12px;
}
.routine-exercise-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.routine-exercise-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
}

.routine-exercise-media,
.routine-exercise-empty {
  display: grid;
  width: 96px;
  height: 76px;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #050505;
  color: var(--muted);
  cursor: zoom-in;
  font-size: 12px;
  font-weight: 800;
}

.routine-exercise-media img,
.routine-exercise-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.routine-exercise-main {
  display: grid;
  gap: 4px;
}

.routine-exercise-main strong {
  color: var(--gold-2);
  font-size: 16px;
}

.routine-exercise-main span,
.routine-exercise-main p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.routine-exercise-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.routine-exercise-meta span {
  display: grid;
  min-width: 76px;
  gap: 2px;
  border: 1px solid rgba(224, 173, 63, 0.2);
  border-radius: 14px;
  background: rgba(224, 173, 63, 0.07);
  padding: 8px 10px;
  text-align: center;
}

.routine-exercise-meta small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.routine-exercise-meta strong {
  color: var(--text);
  font-size: 14px;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.photo-grid figure {
  margin: 0;
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  object-fit: cover;
}

.photo-grid figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.photo-lightbox-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
}

.photo-lightbox-trigger img {
  transition: transform 0.2s ease, filter 0.2s ease;
}

.photo-lightbox-trigger:hover img {
  filter: brightness(1.08);
  transform: scale(1.02);
}

@media (max-width: 980px) {
  .progress-hero,
  .progress-chart-grid,
  .progress-metric-grid,
  .progress-latest-grid {
    grid-template-columns: 1fr;
  }

  .progress-hero-stat {
    min-height: 130px;
  }

  .progress-photo-pair img,
  .progress-photo-pair .empty-photo {
    min-height: 240px;
  }
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .stats,
  .two-col,
  .form-grid,
  .progress-summary,
  .before-after {
    grid-template-columns: 1fr;
  }

  .topbar,
  .profile-head {
    align-items: stretch;
    flex-direction: column;
  }

  .routine-exercise-row {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .routine-exercise-media,
  .routine-exercise-empty {
    width: 82px;
    height: 70px;
  }

  .routine-exercise-meta {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .content {
    padding: 20px;
  }
}

.client-portal-shell {
  max-width: 1180px;
}

.client-portal-header {
  margin-bottom: 28px;
  padding-top: 4px;
}

.client-portal-header img {
  max-width: 140px;
  margin-bottom: 12px;
}

.portal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 18px;
  align-items: center;
  border-color: rgba(224, 173, 63, 0.35);
  background: linear-gradient(135deg, rgba(224, 173, 63, 0.14), rgba(255, 255, 255, 0.035));
}

.portal-hero span,
.portal-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.portal-hero strong {
  display: block;
  margin-top: 8px;
  color: var(--gold-2);
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.05;
}

.portal-hero p {
  color: var(--muted);
}

.portal-hero-stat {
  display: grid;
  min-height: 130px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.25);
  padding: 18px;
  text-align: center;
}

.portal-hero-stat strong {
  margin: 0;
  color: var(--gold-2);
  font-size: 42px;
}

.portal-hero-stat small {
  color: var(--muted);
  font-weight: 800;
}

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

.portal-card {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  gap: 18px;
}

.portal-card-progress {
  border-color: rgba(25, 185, 105, 0.35);
}

.portal-card h2 {
  margin-top: 4px;
}

.portal-card .muted {
  line-height: 1.6;
}

.portal-metrics {
  display: grid;
  gap: 10px;
}

.portal-metrics div {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
}

.portal-metrics strong {
  color: var(--text);
  line-height: 1.35;
}

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

.portal-mini-list span,
.portal-empty {
  border: 1px dashed rgba(245, 191, 73, 0.22);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(245, 191, 73, 0.07), rgba(255, 255, 255, 0.025));
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
  padding: 12px 14px;
}

.portal-card > .portal-empty {
  margin-top: auto;
  min-height: 92px;
  display: flex;
  align-items: center;
}

.portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.portal-footer {
  margin: 24px 0 8px;
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.28em;
  text-align: center;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .portal-hero,
  .client-portal-grid {
    grid-template-columns: 1fr;
  }

  .portal-card {
    min-height: auto;
  }
}
.public-nav-actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.public-nav-actions .button {
  min-height: 42px;
  padding-inline: 18px;
}
.portal-card-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.portal-icon {
  display: grid;
  min-width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(224, 173, 63, 0.34);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(224, 173, 63, 0.22), rgba(255, 255, 255, 0.04));
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.portal-card .button.primary {
  width: 100%;
  justify-content: center;
}

.whatsapp-template-form textarea {
  min-height: 132px;
  resize: vertical;
}
.portal-coach-note {
  margin-top: 18px;
  border-color: rgba(224, 173, 63, 0.32);
  background: linear-gradient(135deg, rgba(224, 173, 63, 0.12), rgba(255, 255, 255, 0.035));
}

.portal-coach-note h2 {
  margin-bottom: 10px;
}

.portal-coach-note p:last-child {
  margin-bottom: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.7;
}
@media (max-width: 640px) {
  .public-page {
    background:
      radial-gradient(circle at 50% 0%, rgba(224, 173, 63, 0.2), transparent 18rem),
      #050505;
  }

  .public-shell,
  .client-portal-shell {
    width: 100%;
    padding: 16px 14px 28px;
  }

  .public-header,
  .client-portal-header {
    margin-bottom: 16px;
    padding: 6px 0 8px;
  }

  .public-header img,
  .client-portal-header img {
    width: 112px;
    max-width: 40vw;
    margin-bottom: 10px;
  }

  .public-header h1,
  .client-portal-header h1 {
    font-size: clamp(28px, 9vw, 38px);
    line-height: 1.05;
  }

  .public-header .eyebrow,
  .client-portal-header .eyebrow,
  .portal-card .eyebrow,
  .portal-coach-note .eyebrow {
    font-size: 11px;
    letter-spacing: 0.18em;
  }

  .public-shell .card,
  .portal-hero,
  .portal-coach-note,
  .portal-card {
    border-radius: 20px;
    padding: 18px;
  }

  .portal-hero {
    gap: 14px;
  }

  .portal-hero strong {
    font-size: clamp(32px, 12vw, 46px);
  }

  .portal-hero p {
    margin-bottom: 0;
    font-size: 15px;
    line-height: 1.55;
  }

  .portal-hero-stat {
    min-height: auto;
    grid-template-columns: 1fr auto;
    justify-items: start;
    align-items: center;
    padding: 14px 16px;
    text-align: left;
  }

  .portal-hero-stat strong {
    grid-row: 1 / span 2;
    grid-column: 2;
    font-size: 42px;
    line-height: 1;
  }

  .client-portal-grid {
    gap: 14px;
    margin-top: 14px;
  }

  .portal-card {
    gap: 16px;
  }

  .portal-card-title {
    gap: 10px;
  }

  .portal-icon {
    min-width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .portal-card h2 {
    font-size: 24px;
    line-height: 1.12;
  }

  .portal-metrics {
    gap: 8px;
  }

  .portal-metrics div,
  .portal-mini-list span,
  .portal-empty {
    border-radius: 14px;
    padding: 11px 12px;
  }

  .portal-actions,
  .public-nav-actions {
    width: 100%;
  }

  .portal-actions .button,
  .public-nav-actions .button,
  .portal-card .button.primary {
    width: 100%;
    min-height: 46px;
  }

  .portal-coach-note p:last-child {
    font-size: 16px;
    line-height: 1.6;
  }

  .portal-footer {
    margin-top: 18px;
    font-size: 10px;
    letter-spacing: 0.18em;
    line-height: 1.6;
  }
}
.portal-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -4px;
}

.portal-status-pill,
.portal-review-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 32px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 11px;
  text-align: center;
  white-space: nowrap;
}

.portal-status-pill {
  border: 1px solid rgba(34, 197, 94, 0.38);
  background: rgba(34, 197, 94, 0.09);
  color: #86efac;
}

.portal-review-pill {
  border: 1px solid rgba(224, 173, 63, 0.26);
  background: rgba(224, 173, 63, 0.08);
  color: var(--gold-2);
}

.portal-routine-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-day-list span {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  border-style: solid;
  background: rgba(255, 255, 255, 0.035);
}

.portal-day-list strong {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(224, 173, 63, 0.28);
  border-radius: 12px;
  background: rgba(224, 173, 63, 0.09);
  color: var(--gold-2);
  font-size: 12px;
}

.portal-day-list em {
  color: var(--text);
  font-style: normal;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .portal-status-row {
    gap: 7px;
  }

  .portal-status-pill,
  .portal-review-pill {
    width: 100%;
    justify-content: center;
  }

  .portal-routine-metrics {
    grid-template-columns: 1fr;
  }
}
.portal-today-card {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  border-color: rgba(34, 197, 94, 0.28);
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 197, 94, 0.14), transparent 24rem),
    linear-gradient(135deg, rgba(224, 173, 63, 0.1), rgba(255, 255, 255, 0.035));
}

.portal-today-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.portal-today-head .portal-status-pill {
  min-width: 112px;
}

.portal-today-head h2 {
  margin-bottom: 6px;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.05;
}

.portal-today-exercises {
  display: grid;
  gap: 10px;
}

.portal-today-exercise {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.22);
}

.portal-today-media {
  display: grid;
  width: 76px;
  height: 64px;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #020202;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
}

.portal-today-media img,
.portal-today-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-today-exercise strong {
  display: block;
  color: var(--gold-2);
  font-size: 16px;
  line-height: 1.2;
}

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

.portal-today-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.portal-today-meta span {
  min-width: 66px;
  padding: 9px 10px;
  border: 1px solid rgba(224, 173, 63, 0.24);
  border-radius: 14px;
  background: rgba(224, 173, 63, 0.09);
  color: var(--text);
  text-align: center;
  font-size: 16px;
  font-weight: 900;
}

.portal-today-meta small {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.portal-cardio-note {
  margin: 0;
  padding: 14px 16px;
  border: 1px dashed rgba(224, 173, 63, 0.28);
  border-radius: 16px;
  color: var(--muted);
}

.portal-cardio-note strong {
  color: var(--text);
}

@media (max-width: 640px) {
  .portal-today-card {
    gap: 14px;
    padding: 18px;
  }

  .portal-today-head {
    display: grid;
  }

  .portal-today-head h2 {
    font-size: clamp(28px, 9vw, 36px);
  }

  .portal-today-exercise {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 11px;
    align-items: start;
  }

  .portal-today-media {
    width: 64px;
    height: 58px;
  }

  .portal-today-meta {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .portal-today-meta span {
    flex: 1 1 0;
    min-width: 0;
  }
}
.portal-question-card {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  border-color: rgba(34, 197, 94, 0.28);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(224, 173, 63, 0.07));
}

.portal-question-card h2 {
  margin-bottom: 0;
}

.portal-question-card p {
  margin: 0;
  color: var(--muted);
}

.portal-question-card .button {
  justify-content: center;
  width: fit-content;
  min-width: 180px;
}

.public-question-card {
  margin-top: 18px;
}

@media (max-width: 640px) {
  .portal-question-card .button {
    width: 100%;
  }
}
.service-stats {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

@media (max-width: 1320px) {
  .service-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .service-stats {
    grid-template-columns: 1fr;
  }
}
.portal-service-pill {
  display: inline-flex;
  margin-top: 12px;
  border: 1px solid rgba(224, 173, 63, 0.35);
  border-radius: 999px;
  background: rgba(224, 173, 63, 0.12);
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 8px 12px;
  text-transform: uppercase;
}
.portal-summary-line {
  color: var(--muted) !important;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.portal-routine-metrics div {
  grid-template-columns: minmax(90px, auto) 1fr;
  align-items: center;
}

.portal-routine-metrics span {
  line-height: 1.15;
}

.portal-routine-metrics strong {
  justify-self: end;
  text-align: right;
  white-space: normal;
}

.portal-card-title h2 {
  line-height: 1.12;
}
.portal-card .portal-routine-metrics {
  grid-template-columns: 1fr;
}
.coach-progress-insight {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.coach-progress-insight article {
  border: 1px solid rgba(224, 173, 63, 0.22);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(224, 173, 63, 0.12), rgba(255, 255, 255, 0.035));
  padding: 18px;
}

.coach-progress-insight span,
.progress-section-label {
  color: var(--gold-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.coach-progress-insight strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.1;
}

.coach-progress-insight p {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.progress-section-label {
  margin: 18px 0 0;
}

.progress-body-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.progress-body-grid .progress-metric-card strong {
  font-size: 24px;
}

@media (max-width: 920px) {
  .coach-progress-insight,
  .progress-body-grid {
    grid-template-columns: 1fr;
  }
}
.coach-recommendation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.coach-recommendation-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  padding: 14px;
}

.coach-recommendation-card span {
  display: block;
  color: var(--text);
  font-weight: 900;
  margin-bottom: 8px;
}

.coach-recommendation-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.4;
}

.coach-recommendation-card.good {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.08);
}

.coach-recommendation-card.warning {
  border-color: rgba(250, 204, 21, 0.28);
  background: rgba(250, 204, 21, 0.08);
}

.coach-recommendation-card.info {
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(96, 165, 250, 0.07);
}

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

.badge.in_evaluation,
.badge.accepted,
.badge.converted {
    border-color: rgba(34, 197, 94, 0.55);
    color: #7cff9b;
    background: rgba(34, 197, 94, 0.08);
}

.badge.not_converted {
    border-color: rgba(239, 68, 68, 0.55);
    color: #ffb4b4;
    background: rgba(239, 68, 68, 0.08);
}

.badge.archived {
    border-color: rgba(148, 163, 184, 0.45);
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.08);
}
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin-bottom: 0;
}

.card.stat {
  text-decoration: none;
  color: inherit;
}
.dashboard-group {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.section-head.compact {
  margin-bottom: 0;
}

.section-head.compact h2 {
  font-size: 22px;
}
.preinscription-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-color: rgba(245, 190, 65, 0.22);
  background: linear-gradient(135deg, rgba(245, 190, 65, 0.08), rgba(10, 10, 10, 0.92));
}

.preinscription-hero h2 {
  margin-bottom: 8px;
  font-size: clamp(28px, 3vw, 42px);
}

.preinscription-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.preinscription-actions {
  justify-content: flex-end;
  min-width: 260px;
}

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

.note-card p {
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 900px) {
  .preinscription-hero {
    flex-direction: column;
  }

  .preinscription-actions {
    justify-content: flex-start;
    min-width: 0;
  }

  .preinscription-grid {
    grid-template-columns: 1fr;
  }
}
.inline-form {
  display: inline-flex;
  margin: 0;
}

.badge.evaluation-today {
  border-color: rgba(245, 190, 65, 0.55);
  color: var(--gold-2);
  background: rgba(245, 190, 65, 0.1);
}

.badge.evaluation-upcoming {
  border-color: rgba(96, 165, 250, 0.5);
  color: #93c5fd;
  background: rgba(96, 165, 250, 0.08);
}

.badge.evaluation-overdue {
  border-color: rgba(239, 68, 68, 0.55);
  color: #ffb4b4;
  background: rgba(239, 68, 68, 0.08);
}

.badge.evaluation-neutral {
  border-color: rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.06);
}
.quick-update-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.quick-update-form .button {
  justify-self: start;
}

.quick-edit-panel {
  margin-top: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 12px 14px;
}

.quick-edit-panel summary {
  color: var(--gold-2);
  cursor: pointer;
  font-weight: 800;
}

.quick-edit-panel form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.quick-edit-panel .button {
  justify-self: start;
}
.conversion-checklist {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.conversion-checklist article {
  display: flex;
  gap: 12px;
  border: 1px solid rgba(224, 173, 63, 0.22);
  border-radius: 18px;
  background: rgba(224, 173, 63, 0.06);
  padding: 14px;
}

.conversion-checklist span {
  display: inline-grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  font-weight: 900;
}

.conversion-checklist strong {
  display: block;
  margin-bottom: 4px;
}

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

@media (max-width: 1100px) {
  .conversion-checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .conversion-checklist {
    grid-template-columns: 1fr;
  }
}
.onboarding-panel {
  border-color: rgba(34, 197, 94, 0.22);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(17, 17, 19, 0.88));
}

.onboarding-head {
  align-items: stretch;
}

.onboarding-summary {
  min-width: 280px;
  border: 1px solid rgba(245, 190, 65, 0.2);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.18);
  padding: 14px;
}

.onboarding-progress-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.onboarding-progress-head .onboarding-separator {
  color: var(--gold-2);
  font-size: 16px;
  line-height: 1;
}

.onboarding-progress-head span,
.onboarding-item-top small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.onboarding-progress-head span {
  white-space: nowrap;
}

.onboarding-progress-head strong,
.onboarding-progress-head .onboarding-percent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  border: 1px solid rgba(245, 190, 65, 0.35);
  border-radius: 999px;
  color: var(--gold-2);
  font-size: 18px;
  padding: 5px 12px;
}

.onboarding-progress-bar {
  height: 9px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.onboarding-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, var(--gold-2));
}

.onboarding-summary p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.onboarding-summary p strong {
  color: var(--text);
}

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

.onboarding-item {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  padding: 16px;
}

.onboarding-item.pending {
  border-color: rgba(245, 190, 65, 0.32);
  background: rgba(245, 190, 65, 0.05);
}

.onboarding-item.done {
  border-color: rgba(34, 197, 94, 0.22);
}

.onboarding-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.onboarding-item-top span {
  display: inline-flex;
  border: 1px solid rgba(245, 190, 65, 0.4);
  border-radius: 999px;
  color: var(--gold-2);
  font-size: 11px;
  font-weight: 900;
  padding: 5px 9px;
}

.onboarding-item.done .onboarding-item-top span {
  border-color: rgba(34, 197, 94, 0.42);
  color: #86efac;
}

.onboarding-item h3 {
  margin: 0 0 8px;
}

.onboarding-item p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.5;
}

.onboarding-item .button {
  margin-top: auto;
  align-self: flex-start;
}

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

.startup-status-grid article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 16px;
  border: 1px solid rgba(245, 190, 65, 0.24);
  border-radius: 16px;
  background: rgba(245, 190, 65, 0.06);
}

.startup-status-grid strong {
  min-width: 0;
  font-size: 17px;
}

.startup-status-grid .badge {
  justify-self: end;
  font-style: normal;
  white-space: nowrap;
}

.startup-step {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.24);
  color: #86efac;
  font-weight: 900;
}

.startup-main-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(245, 190, 65, 0.24);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
}

.startup-main-action > div {
  min-width: 0;
}

.startup-main-action strong,
.startup-main-action span {
  display: block;
}

.startup-main-action strong {
  margin-bottom: 4px;
  font-size: 17px;
}

.startup-main-action span {
  color: var(--muted);
  line-height: 1.45;
}

.startup-main-action form {
  flex: 0 0 auto;
}

@media (max-width: 1100px) {
  .onboarding-head {
    flex-direction: column;
  }

  .onboarding-summary {
    min-width: 0;
  }

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

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

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

  .startup-status-grid {
    grid-template-columns: 1fr;
  }

  .startup-main-action {
    align-items: stretch;
    flex-direction: column;
  }

  .startup-main-action .button {
    width: 100%;
  }

  .startup-status-grid article {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .startup-status-grid .badge {
    grid-column: 2;
    justify-self: start;
  }
}
.note-template-panel > span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.note-template-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.note-template-chip {
  border: 1px solid rgba(245, 190, 65, 0.28);
  border-radius: 999px;
  background: rgba(245, 190, 65, 0.08);
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
  padding: 10px 14px;
}

.note-template-chip:hover,
.note-template-chip.active {
  border-color: rgba(245, 190, 65, 0.75);
  background: rgba(245, 190, 65, 0.2);
  color: var(--gold-2);
}
.note-shortcuts {
  flex-wrap: wrap;
}

.note-shortcuts .button {
  padding: 10px 14px;
}
.note-hero-card {
  background: linear-gradient(135deg, rgba(245, 190, 65, 0.08), rgba(255, 255, 255, 0.03));
}

.note-detail-card {
  overflow: hidden;
}

.note-paragraph {
  margin-top: 16px;
  border-left: 3px solid rgba(245, 190, 65, 0.7);
  border-radius: 14px;
  background: rgba(245, 190, 65, 0.06);
  color: var(--text);
  line-height: 1.65;
  padding: 14px 16px;
}

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

.note-detail-row {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  padding: 14px 16px;
}

.note-detail-row span,
.note-pending-box span {
  display: block;
  margin-bottom: 8px;
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.note-detail-row strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
}

.note-pending-box,
.note-empty-state {
  margin-top: 18px;
  border: 1px dashed rgba(245, 190, 65, 0.35);
  border-radius: 16px;
  background: rgba(245, 190, 65, 0.05);
  padding: 16px;
}

.note-pending-box p,
.note-empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.note-empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--gold-2);
  font-size: 18px;
}

@media (max-width: 760px) {
  .note-detail-grid {
    grid-template-columns: 1fr;
  }
}
.note-timeline-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.note-timeline-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.note-timeline-head strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 16px;
}

.note-type-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 5px 9px;
  text-transform: uppercase;
}

.note-type-badge.context {
  border-color: rgba(245, 190, 65, 0.38);
  background: rgba(245, 190, 65, 0.1);
  color: var(--gold-2);
}

.note-type-badge.review {
  border-color: rgba(59, 130, 246, 0.38);
  background: rgba(59, 130, 246, 0.1);
  color: #bfdbfe;
}

.note-type-badge.diet {
  border-color: rgba(34, 197, 94, 0.38);
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
}

.note-type-badge.routine {
  border-color: rgba(168, 85, 247, 0.38);
  background: rgba(168, 85, 247, 0.1);
  color: #e9d5ff;
}

.note-type-badge.pending {
  border-color: rgba(248, 113, 113, 0.38);
  background: rgba(248, 113, 113, 0.08);
  color: #fecaca;
}

.note-preview {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.portal-overview-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.portal-overview-item {
  display: grid;
  gap: 6px;
  min-height: 86px;
  align-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  padding: 14px 16px;
}

.portal-overview-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portal-overview-item strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
}

.portal-overview-item.is-ready {
  border-color: rgba(34, 197, 94, 0.28);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(255, 255, 255, 0.035));
}

.portal-overview-item.is-pending {
  border-color: rgba(224, 173, 63, 0.24);
  background: linear-gradient(135deg, rgba(224, 173, 63, 0.09), rgba(255, 255, 255, 0.03));
}

.portal-overview-item.is-ready strong {
  color: #86efac;
}

.portal-overview-item.is-pending strong {
  color: var(--gold-2);
}

@media (max-width: 760px) {
  .portal-overview-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .portal-overview-item {
    min-height: 76px;
    border-radius: 16px;
    padding: 12px;
  }

  .portal-overview-item strong {
    font-size: 16px;
  }
}

@media (max-width: 420px) {
  .portal-overview-strip {
    grid-template-columns: 1fr;
  }
}
.agenda-panel {
  margin: 18px 0;
  border-color: rgba(245, 190, 65, 0.2);
  background: linear-gradient(135deg, rgba(245, 190, 65, 0.06), rgba(17, 17, 19, 0.86));
}

.agenda-total {
  display: grid;
  min-width: 132px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 14px;
  text-align: center;
}

.agenda-total strong {
  color: var(--gold-2);
  font-size: 34px;
  line-height: 1;
}

.agenda-total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.agenda-total.is-clear {
  border-color: rgba(34, 197, 94, 0.28);
}

.agenda-clear {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 16px;
  background: rgba(34, 197, 94, 0.07);
  color: #bbf7d0;
  margin-bottom: 14px;
  padding: 14px 16px;
}

.agenda-clear span {
  color: var(--muted);
}

.agenda-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  align-items: start;
  gap: 12px;
}

.agenda-card {
  min-height: 190px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  padding: 16px;
  transition: border-color 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.agenda-card.has-pending {
  border-color: rgba(245, 190, 65, 0.34);
  background: rgba(245, 190, 65, 0.055);
}

.agenda-card.is-clear {
  min-height: 108px;
  border-color: rgba(34, 197, 94, 0.18);
  background: rgba(34, 197, 94, 0.035);
  opacity: 0.62;
}

.agenda-card.is-clear:hover {
  opacity: 0.9;
}

.agenda-card.is-compact {
  padding: 14px 16px;
}

.agenda-card.is-compact .agenda-card-head {
  margin-bottom: 0;
}

.agenda-card.is-compact .agenda-card-head h3 {
  font-size: 15px;
}

.agenda-card.needs-action {
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.agenda-card.needs-action:hover {
  transform: translateY(-2px);
}

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

.agenda-card-head h3 {
  margin: 0;
  font-size: 16px;
}

.agenda-card-head small {
  display: inline-block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.agenda-card.needs-action .agenda-card-head small {
  color: var(--gold-2);
}

.agenda-card.is-clear .agenda-card-head small {
  color: #86efac;
}

.agenda-card-head span {
  display: inline-grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(245, 190, 65, 0.38);
  border-radius: 999px;
  color: var(--gold-2);
  font-weight: 900;
}

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

.agenda-item {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.16);
  padding: 12px;
}

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

.agenda-item small {
  color: var(--muted);
  margin-top: 3px;
}

.agenda-item em {
  color: var(--gold-2);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.agenda-empty {
  line-height: 1.45;
}

.agenda-card.is-compact .agenda-empty {
  display: none;
}

@media (max-width: 1400px) {
  .agenda-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .agenda-total {
    min-width: 0;
  }
}
.portal-question-card-muted {
  border-style: dashed;
  opacity: 0.92;
}

.portal-start-card {
  margin: 22px 0 18px;
  border: 1px solid rgba(245, 191, 73, 0.45);
  border-radius: 24px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(245, 191, 73, 0.12), rgba(18, 18, 20, 0.92));
  box-shadow: var(--shadow);
}

.portal-start-card h2 {
  margin: 8px 0;
}

.portal-start-card p {
  margin: 0;
  color: var(--muted);
}

.portal-mobile-cta {
  display: none;
}

@media (max-width: 640px) {
  .client-portal-page {
    padding-bottom: 92px;
  }

  .portal-mobile-cta {
    display: block;
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 60;
  }

  .portal-mobile-cta .button {
    width: 100%;
    justify-content: center;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  }

  .portal-start-card {
    margin: 18px 0 14px;
    padding: 18px;
  }
}

/* Agenda compact final polish */
.agenda-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.agenda-card.is-compact {
  min-height: 0 !important;
  padding: 14px 16px !important;
  border-radius: 16px;
  display: flex;
  align-items: center;
}

.agenda-card.is-compact .agenda-card-head {
  width: 100%;
  margin-bottom: 0 !important;
}

.agenda-card.is-compact .agenda-card-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.agenda-card.is-compact .agenda-card-head h3 {
  font-size: 15px;
  line-height: 1.2;
}

.agenda-card.is-compact .agenda-card-head small {
  margin-top: 0;
  padding: 2px 8px;
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.08);
  color: #86efac;
}

.agenda-card.is-compact .agenda-card-head span {
  min-width: 30px;
  height: 30px;
}

.agenda-card.is-compact .agenda-empty,
.agenda-card.is-compact .agenda-list {
  display: none !important;
}

.agenda-card.is-clear {
  opacity: 0.78;
}

.agenda-card.is-clear:hover {
  opacity: 1;
}

@media (max-width: 1400px) {
  .agenda-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

/* Agenda ordering final polish */
.agenda-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.agenda-card.needs-action {
  min-height: 198px;
}

.agenda-card.is-compact {
  min-height: 76px !important;
}

.agenda-card.is-compact .agenda-card-head {
  align-items: center;
}

.agenda-card.is-compact .agenda-card-head h3 {
  max-width: 170px;
}
.flow-hint {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(246, 195, 76, 0.32);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(246, 195, 76, 0.14), rgba(7, 20, 13, 0.42));
}

.flow-hint h3 {
  margin: 4px 0 8px;
}

.flow-hint p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.choice-grid .choice-option {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  cursor: pointer;
}

.choice-grid .choice-option input {
  flex: 0 0 auto;
  width: 18px !important;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--gold);
}

.choice-grid .choice-option span {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
}

.choice-grid .choice-primary {
  grid-column: 2;
  margin-top: 6px;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  color: var(--muted) !important;
  font-size: 12px !important;
  white-space: nowrap;
}

.choice-grid .choice-primary input {
  width: 14px !important;
  height: 14px !important;
  margin: 0;
}

.choice-grid .choice-option.is-selected,
.choice-grid .choice-option:has(input:checked) {
  border-color: rgba(245, 191, 73, 0.62);
  background: rgba(245, 191, 73, 0.12);
}

.public-link-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
  border-color: rgba(34, 197, 94, 0.28);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(18, 18, 20, 0.92));
}

.public-link-card h2 {
  margin: 4px 0 8px;
}

.public-link-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.public-link-actions input {
  min-width: 0;
}

.public-preinscription-form {
  margin-bottom: 40px;
}

.measure-spacer {
  min-height: 1px;
}

.template-meal-panel {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px solid rgba(245, 191, 73, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.template-meal-panel h3 {
  margin: 0 0 14px;
}

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

.diet-flow-option {
  min-height: 220px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.diet-flow-option h2 {
  margin: 4px 0 10px;
}

.diet-flow-option .actions {
  margin-top: 18px;
}

.diet-generate-method-form {
  align-items: end;
}

.diet-generate-method-form .compact-actions {
  display: flex;
  align-items: end;
}

.diet-generate-method-form .button,
.diet-generate-actions .button {
  min-height: 44px;
  padding: 10px 18px;
}

.diet-generate-actions {
  align-items: end;
  gap: 12px;
}

.diet-generate-actions label {
  margin: 0;
}

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

.weekday-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

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

.weekday-option span {
  position: relative;
  z-index: 1;
  font-weight: 800;
  line-height: 1.1;
}

.weekday-option.is-selected,
.weekday-option:has(input:checked) {
  border-color: rgba(224, 173, 63, 0.85);
  background: rgba(224, 173, 63, 0.16);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(224, 173, 63, 0.22);
}

.weekday-option:hover {
  border-color: rgba(224, 173, 63, 0.55);
  transform: translateY(-1px);
}

.weekday-option:focus-within {
  border-color: rgba(252, 207, 106, 0.9);
  box-shadow: 0 0 0 3px rgba(224, 173, 63, 0.12);
}

@media (max-width: 980px) {
  .weekday-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .weekday-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    background:
      radial-gradient(circle at 50% 0%, rgba(224, 173, 63, 0.16), transparent 20rem),
      #050505;
  }

  .app-shell {
    display: block;
    min-height: 100vh;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: auto;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(5, 5, 5, 0.96);
    backdrop-filter: blur(16px);
    padding: 12px 14px;
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    letter-spacing: 0.06em;
  }

  .brand img {
    width: 74px;
    max-height: 54px;
    object-fit: contain;
  }

  .brand span {
    font-size: 14px;
    line-height: 1.15;
  }

  .nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 8px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .nav a {
    flex: 0 0 auto;
    min-height: 38px;
    border-radius: 999px;
    padding: 9px 13px;
    white-space: nowrap;
  }

  .sidebar-footer {
    display: none;
  }

  .content {
    padding: 16px 14px 28px;
  }

  .topbar {
    gap: 12px;
    margin-bottom: 16px;
  }

  .topbar h1 {
    font-size: clamp(28px, 9vw, 36px);
    line-height: 1.05;
  }

  .topbar .button {
    width: 100%;
  }

  .eyebrow {
    font-size: 11px;
    letter-spacing: 0.16em;
    line-height: 1.5;
  }

  .card {
    border-radius: 18px;
    padding: 18px;
  }

  .stat strong {
    font-size: 30px;
  }

  .actions {
    width: 100%;
    align-items: stretch;
  }

  .actions .button {
    flex: 1 1 150px;
  }

  .profile-head .actions,
  .topbar {
    align-items: stretch;
  }

  .form-grid > .full,
  .form-grid > fieldset,
  .form-grid > section {
    grid-column: 1 / -1;
  }

  .goal-grid,
  .diet-food-totals,
  .client-start-grid,
  .startup-step-grid,
  .onboarding-grid,
  .portal-overview-strip {
    grid-template-columns: 1fr;
  }

  .startup-step,
  .onboarding-item,
  .goal-card,
  .weekday-option {
    min-width: 0;
  }

  .startup-step {
    align-items: flex-start;
  }

  .startup-step .badge,
  .onboarding-item .button {
    width: auto;
  }

  .table-wrap {
    margin-inline: -4px;
    padding-bottom: 4px;
  }

  table {
    min-width: 720px;
  }

  th,
  td {
    padding: 12px 9px;
  }

  input,
  select,
  textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .color-field {
    grid-template-columns: 60px 1fr;
    min-height: 64px;
  }

  .color-field input[type="color"] {
    width: 60px;
  }

  .diet-food-totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .routine-day-heading,
  .diet-meal-head {
    align-items: stretch;
    flex-direction: column;
  }

  .routine-edit-row {
    grid-template-columns: 1fr;
  }

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

  .measure-spacer {
    display: none;
  }

  .diet-flow-grid {
    grid-template-columns: 1fr;
  }

  .public-link-card,
  .public-link-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .content {
    padding-inline: 12px;
  }

  .card {
    padding: 16px;
  }

  .button {
    width: 100%;
    min-height: 44px;
    padding-inline: 14px;
  }

  .topbar h1,
  .profile-head h2,
  .client-portal-header h1 {
    overflow-wrap: anywhere;
  }

  .actions {
    gap: 8px;
  }

  .actions .button,
  .profile-head .actions .button {
    flex: 1 1 100%;
  }

  .stats,
  .grid,
  .form-grid,
  .goal-grid,
  .diet-food-totals,
  .progress-metric-grid,
  .progress-chart-grid,
  .progress-latest-grid,
  .startup-step-grid,
  .onboarding-grid {
    gap: 12px;
  }

  .goal-card,
  .weekday-option {
    min-height: 48px;
    padding: 11px 12px;
  }

  .weekday-grid {
    gap: 8px;
  }

  .routine-exercise-row {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 10px;
  }

  .routine-exercise-media,
  .routine-exercise-empty {
    width: 74px;
    height: 64px;
    border-radius: 12px;
  }

  .public-shell,
  .client-portal-shell {
    padding-inline: 12px;
  }

  .public-shell .form-grid {
    gap: 13px;
  }
}
