:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-soft: #eef4ed;
  --ink: #1b2520;
  --muted: #65746c;
  --line: #dfe6dd;
  --primary: #2f7d5c;
  --primary-dark: #225f46;
  --accent: #d78339;
  --blue: #326d8f;
  --danger: #bc4b4b;
  --shadow: 0 18px 45px rgba(35, 55, 44, 0.12);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
}

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

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
}

.public-site {
  min-height: 100vh;
  background: #f5f8f8;
}

.public-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 78px;
  padding: 0 clamp(22px, 5vw, 72px);
  border-bottom: 1px solid rgba(123, 142, 158, 0.18);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
  will-change: transform;
}

.public-nav.nav-condensed {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 42px rgba(23, 33, 43, 0.12);
}

.mobile-menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid rgba(39, 116, 93, 0.16);
  border-radius: 8px;
  color: var(--primary-dark);
  background: #edf6f2;
  box-shadow: 0 12px 30px rgba(35, 55, 44, 0.1);
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.public-nav.is-open .mobile-menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.public-nav.is-open .mobile-menu-toggle span:nth-child(2) {
  opacity: 0;
}

.public-nav.is-open .mobile-menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.public-nav nav,
.public-actions,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.signed-in-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(123, 142, 158, 0.22);
  border-radius: 8px;
  padding: 7px 10px 7px 7px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.user-chip strong,
.user-chip small {
  display: block;
}

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

.mini-avatar {
  width: 38px;
  height: 38px;
  font-size: 13px;
}

.public-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-radius: 8px;
  padding: 0 12px;
  color: #536173;
  text-decoration: none;
  font-weight: 800;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.public-nav a.active,
.public-nav a:hover {
  color: var(--primary-dark);
  background: #e7f1ed;
  box-shadow: inset 0 0 0 1px rgba(39, 116, 93, 0.12);
  transform: translateY(-1px);
}

.public-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.72fr);
  gap: clamp(28px, 6vw, 72px);
  min-height: calc(100vh - 78px);
  align-items: center;
  padding: clamp(32px, 7vw, 84px);
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(232, 244, 238, 0.95), rgba(242, 247, 249, 0.92)),
    #f6f9f8;
}

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

.eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  color: #2f7d5c;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.public-hero .eyebrow {
  color: var(--primary);
}

.public-hero h1 {
  margin: 0;
  max-width: 700px;
  font-size: clamp(34px, 4.8vw, 58px);
  line-height: 1.06;
  letter-spacing: 0;
}

.public-hero p {
  max-width: 650px;
  margin: 22px 0 0;
  color: #536173;
  font-size: 19px;
  line-height: 1.65;
}

.hero-actions {
  margin-top: 28px;
}

.hero-proof {
  display: none;
}

.hero-proof span {
  border: 1px solid rgba(39, 116, 93, 0.16);
  border-radius: 8px;
  padding: 10px 12px;
  color: #31413a;
  background: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 900;
}

.public-site .primary-btn,
.public-site .secondary-btn,
.auth-back {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.public-site .primary-btn::before,
.public-site .secondary-btn::before,
.auth-back::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  background: rgba(255, 255, 255, 0.22);
  transition: transform 0.28s ease;
}

.public-site .secondary-btn::before {
  background: linear-gradient(135deg, rgba(39, 116, 93, 0.16), rgba(61, 93, 169, 0.16));
}

.public-site .primary-btn:hover::before,
.public-site .secondary-btn:hover::before,
.auth-back:hover::before {
  transform: scaleX(1);
}

.public-site .primary-btn:hover,
.public-site .secondary-btn:hover {
  box-shadow: 0 16px 32px rgba(39, 116, 93, 0.22);
}

.hero-media-panel {
  position: relative;
  z-index: 1;
  min-height: min(58vh, 540px);
  border: 1px solid rgba(123, 142, 158, 0.22);
  border-radius: 8px;
  overflow: hidden;
  background: #dfe9e7;
  box-shadow: 0 28px 70px rgba(23, 33, 43, 0.18);
}

.hero-media-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(23, 33, 43, 0.06), rgba(23, 33, 43, 0.38)),
    linear-gradient(90deg, rgba(39, 116, 93, 0.22), rgba(61, 93, 169, 0.08));
  pointer-events: none;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-position: center;
  background-size: cover;
  animation: heroSlideshow 36s infinite;
}

.hero-slide-one {
  background-image: url("https://images.unsplash.com/photo-1498837167922-ddd27525d352?auto=format&fit=crop&w=1400&q=85");
}

.hero-slide-two {
  background-image: url("https://images.unsplash.com/photo-1518611012118-696072aa579a?auto=format&fit=crop&w=1400&q=85");
  animation-delay: 6s;
}

.hero-slide-three {
  background-image: url("https://images.unsplash.com/photo-1576091160399-112ba8d25d1d?auto=format&fit=crop&w=1400&q=85");
  animation-delay: 12s;
}

.hero-slide-four {
  background-image: url("https://images.unsplash.com/photo-1610832958506-aa56368176cf?auto=format&fit=crop&w=1400&q=85");
  animation-delay: 18s;
}

.hero-slide-five {
  background-image: url("https://images.unsplash.com/photo-1571019613454-1cb2f99b2d8b?auto=format&fit=crop&w=1400&q=85");
  animation-delay: 24s;
}

.hero-slide-six {
  background-image: url("https://images.unsplash.com/photo-1505576399279-565b52d4ac71?auto=format&fit=crop&w=1400&q=85");
  animation-delay: 30s;
}

.hero-slide span {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 18px;
  z-index: 2;
  max-width: 440px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  padding: 12px 14px;
  color: #ffffff;
  background: rgba(23, 33, 43, 0.5);
  backdrop-filter: blur(16px);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

@keyframes heroSlideshow {
  0%,
  13% {
    opacity: 1;
    transform: scale(1);
  }

  18%,
  96% {
    opacity: 0;
    transform: scale(1.04);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.public-section {
  padding: clamp(44px, 7vw, 82px) clamp(22px, 5vw, 72px);
}

.page-section {
  min-height: calc(100vh - 78px);
}

.public-auth-section {
  padding: clamp(44px, 7vw, 82px) clamp(22px, 5vw, 72px);
  background: #f5f8f8;
}

.public-auth-card {
  width: min(100%, 560px);
  margin: 0;
}

.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: start center;
  overflow: hidden;
  padding: clamp(18px, 6vh, 56px) 18px;
  background: rgba(23, 33, 43, 0.58);
  backdrop-filter: blur(8px);
}

.auth-modal {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(123, 142, 158, 0.24);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
}

.auth-modal .public-auth-section {
  padding: clamp(22px, 5vw, 34px);
  background: transparent;
}

.auth-modal .public-auth-card {
  width: 100%;
  box-shadow: none;
}

.auth-modal .section-title h2 {
  font-size: clamp(24px, 4vw, 34px);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #eef3f4;
  color: var(--ink);
  font-size: 22px;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid #d5e0e5;
  border-radius: 8px;
  background: #ffffff;
}

.password-field input {
  border: 0;
  background: transparent;
}

.password-field input:focus {
  outline: none;
}

.password-field button {
  min-height: 38px;
  margin-right: 5px;
  border-radius: 6px;
  padding: 0 12px;
  color: var(--primary-dark);
  background: #eef6f3;
  font-weight: 800;
}

.password-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.password-rules span {
  border: 1px solid #d9e3e8;
  border-radius: 999px;
  padding: 6px 10px;
  color: #6b7481;
  background: #f7fafb;
  font-size: 12px;
  font-weight: 800;
}

.password-rules span.valid {
  border-color: rgba(39, 116, 93, 0.3);
  color: #1d6c55;
  background: #e8f4ee;
}

.auth-helper-link {
  display: inline-flex;
  width: fit-content;
  min-height: 0;
  margin-top: 10px;
  padding: 0;
  color: #536173;
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-helper-link:hover,
.auth-helper-link:focus-visible {
  color: var(--primary-dark);
}

.auth-helper-link.center {
  margin: 12px auto 0;
  justify-content: center;
}

.link-button {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  color: var(--primary-dark);
  background: transparent;
  text-decoration: underline;
  font: inherit;
  font-weight: 800;
}

.legal-modal {
  width: min(680px, 94vw);
  max-height: 86vh;
  overflow: auto;
  border-radius: 8px;
  padding: 22px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
}

.legal-backdrop {
  z-index: 220;
}

.auth-modal .legal-backdrop {
  position: fixed;
  z-index: 320;
}

.legal-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.legal-modal header strong {
  font-size: 24px;
}

.legal-copy {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  color: #536173;
  line-height: 1.65;
}

.hero-auth-shell {
  position: relative;
  z-index: 2;
}

.hero-auth-shell .public-auth-section {
  padding: 0;
  background: transparent;
}

.hero-auth-shell .section-title {
  margin-bottom: 18px;
}

.hero-auth-shell .section-title h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.hero-auth-shell .public-auth-card {
  box-shadow: 0 28px 70px rgba(23, 33, 43, 0.16);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 40px;
  align-items: start;
}

.about-profile-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 0.9fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
}

.about-portrait-wrap {
  justify-self: center;
  width: min(360px, 72vw);
  aspect-ratio: 1;
  border: 1px solid rgba(39, 116, 93, 0.16);
  border-radius: 50%;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(236, 246, 240, 0.96)),
    #ffffff;
  box-shadow: 0 28px 70px rgba(23, 33, 43, 0.14);
}

.about-portrait {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 12%;
}

.about-intro {
  display: grid;
  gap: 18px;
}

.about-intro p {
  max-width: 820px;
}

.about-intro h2 {
  font-size: clamp(28px, 3.2vw, 42px);
}

.public-section h2 {
  margin: 0;
  max-width: 760px;
  color: #17212b;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
}

.public-section p {
  margin: 0;
  color: #5f6f7c;
  font-size: 18px;
  line-height: 1.75;
}

.section-title {
  margin-bottom: 26px;
}

.services-title {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.7fr);
  gap: 28px 54px;
  align-items: end;
  margin-bottom: 34px;
}

.services-title .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.services-title p {
  max-width: 560px;
  font-size: 17px;
}

.services-page {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 150px, rgba(47, 125, 92, 0.12), transparent 34%),
    linear-gradient(180deg, #f8fbfa 0%, #eef4f3 52%, #f8fbfa 100%);
}

.services-hero {
  display: grid;
  justify-items: center;
  max-width: 980px;
  margin: 0 auto clamp(34px, 6vw, 72px);
  text-align: center;
}

.services-hero h2 {
  max-width: 760px;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.08;
}

.services-hero p {
  max-width: 780px;
  margin-top: 20px;
  font-size: 18px;
}

.services-flow {
  display: grid;
  gap: clamp(34px, 6vw, 72px);
  max-width: 940px;
  margin: 0 auto;
}

.service-row {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 22px;
  border: 1px solid rgba(123, 142, 158, 0.18);
  border-radius: 8px;
  padding: clamp(28px, 5vw, 52px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 249, 0.96)),
    #ffffff;
  box-shadow: 0 22px 58px rgba(23, 33, 43, 0.08);
  text-align: center;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.service-row::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 36%;
  background: linear-gradient(180deg, rgba(39, 116, 93, 0.08), transparent);
  pointer-events: none;
}

.service-row:hover {
  border-color: rgba(39, 116, 93, 0.28);
  transform: translateY(-2px);
  box-shadow: 0 28px 70px rgba(23, 33, 43, 0.11);
}

.service-photo {
  position: relative;
  z-index: 1;
  width: min(190px, 48vw);
  aspect-ratio: 1;
  border: 1px solid rgba(39, 116, 93, 0.18);
  border-radius: 50%;
  padding: 9px;
  background: #ffffff;
  box-shadow: 0 22px 52px rgba(23, 33, 43, 0.14);
}

.service-photo img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.service-row h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  color: #17212b;
  font-size: clamp(25px, 3.3vw, 38px);
  line-height: 1.1;
}

.service-row p {
  position: relative;
  z-index: 1;
  max-width: 830px;
  margin: 8px auto 0;
  color: #52616e;
  font-size: 16px;
  line-height: 1.72;
}

.service-grid,
.article-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.scientific-services {
  position: relative;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 8px 0;
}

.service-grid article,
.article-list article {
  display: grid;
  gap: 10px;
  min-height: 150px;
  align-content: start;
  border: 1px solid rgba(123, 142, 158, 0.22);
  border-radius: 8px;
  padding: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.scientific-services::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 35px;
  width: 1px;
  background: linear-gradient(180deg, rgba(39, 116, 93, 0), rgba(39, 116, 93, 0.35), rgba(47, 100, 127, 0));
}

.scientific-services article {
  position: relative;
  grid-template-columns: 70px minmax(0, 1fr) minmax(190px, 0.38fr);
  min-height: auto;
  align-items: center;
  border: 1px solid rgba(123, 142, 158, 0.18);
  border-radius: 8px;
  padding: 24px 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(247, 251, 249, 0.98)),
    radial-gradient(circle at 0% 0%, rgba(39, 116, 93, 0.14), transparent 30%);
  box-shadow: 0 18px 50px rgba(23, 33, 43, 0.08);
  overflow: hidden;
}

.scientific-services article::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 28%;
  height: 100%;
  background: linear-gradient(135deg, rgba(47, 100, 127, 0.09), rgba(39, 116, 93, 0.03));
  pointer-events: none;
}

.scientific-services article:hover {
  border-color: rgba(39, 116, 93, 0.28);
  transform: translateY(-2px);
  box-shadow: 0 24px 62px rgba(23, 33, 43, 0.11);
}

.scientific-services em {
  position: relative;
  z-index: 1;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(39, 116, 93, 0.22);
  border-radius: 50%;
  color: #2f647f;
  background: #ffffff;
  font-style: normal;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(23, 33, 43, 0.08);
}

.service-grid strong,
.article-list strong {
  color: #17212b;
  font-size: 19px;
}

.service-grid span,
.article-list span {
  color: #6d7887;
  line-height: 1.55;
}

.scientific-services article {
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.scientific-services strong {
  display: block;
  margin-bottom: 8px;
  color: #19332a;
  font-size: 23px;
  line-height: 1.16;
}

.scientific-services span {
  display: block;
  max-width: 900px;
  color: #52616e;
  font-size: 16px;
  line-height: 1.7;
}

.scientific-services small {
  position: relative;
  z-index: 1;
  justify-self: end;
  max-width: 230px;
  border: 1px solid rgba(39, 116, 93, 0.14);
  border-radius: 8px;
  padding: 10px 12px;
  color: #2f647f;
  background: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
  text-align: right;
}

.articles-band {
  background: #eef4f3;
}

.articles-page {
  background:
    radial-gradient(circle at 12% 10%, rgba(47, 125, 92, 0.1), transparent 28%),
    linear-gradient(180deg, #f8fbfa 0%, #eef4f3 58%, #f8fbfa 100%);
}

.articles-hero {
  display: grid;
  justify-items: center;
  max-width: 860px;
  margin: 0 auto clamp(30px, 6vw, 70px);
  text-align: center;
}

.articles-hero h2 {
  max-width: 760px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.06;
}

.articles-hero p {
  max-width: 740px;
  margin-top: 18px;
}

.article-deck {
  display: grid;
  gap: 22px;
  max-width: 1120px;
  margin: 0 auto;
}

.science-article {
  display: grid;
  grid-template-columns: minmax(250px, 0.42fr) minmax(0, 0.9fr);
  gap: clamp(22px, 4vw, 44px);
  align-items: stretch;
  border: 1px solid rgba(123, 142, 158, 0.18);
  border-radius: 8px;
  padding: clamp(18px, 3vw, 28px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 249, 0.96)),
    #ffffff;
  box-shadow: 0 22px 58px rgba(23, 33, 43, 0.08);
}

.science-article img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  border-radius: 8px;
  object-fit: cover;
}

.science-article > div {
  display: grid;
  align-content: center;
}

.science-article span {
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.science-article h3 {
  margin: 0 0 16px;
  color: #17212b;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.1;
}

.science-article p {
  margin-top: 10px;
  color: #52616e;
  font-size: 16px;
  line-height: 1.72;
}

.article-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.article-sources a {
  border: 1px solid rgba(39, 116, 93, 0.16);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--primary-dark);
  background: rgba(239, 248, 244, 0.82);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.about-story-section {
  background: #eef4f3;
}

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

.about-story-grid article {
  display: grid;
  align-content: start;
  min-height: 280px;
  border: 1px solid rgba(123, 142, 158, 0.2);
  border-radius: 8px;
  padding: clamp(22px, 3vw, 32px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 249, 0.95)),
    #ffffff;
  box-shadow: 0 18px 45px rgba(23, 33, 43, 0.07);
}

.about-story-grid article span {
  margin-bottom: 14px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.about-story-grid h3 {
  margin: 0 0 14px;
  color: #17212b;
  font-size: 24px;
  line-height: 1.18;
}

.about-story-grid p {
  font-size: 16px;
  line-height: 1.72;
}

.about-closing-section {
  display: grid;
  justify-items: center;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(23, 33, 43, 0.97), rgba(32, 91, 72, 0.93)),
    #17212b;
}

.about-closing-section h2,
.about-closing-section p {
  color: #ffffff;
}

.about-closing-section p {
  max-width: 850px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.78);
}

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

.article-list article span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.contact-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #17212b;
  color: #ffffff;
}

.contact-section h2,
.contact-section p {
  color: #ffffff;
}

.contact-section p {
  max-width: 780px;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.76);
}

.home-contact-section {
  position: relative;
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(23, 33, 43, 0.98), rgba(32, 91, 72, 0.94)),
    #17212b;
}

.home-contact-section::after {
  content: "";
  position: absolute;
  inset: auto -12% -58% auto;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.home-contact-section > * {
  position: relative;
  z-index: 1;
}

.home-contact-section h2 {
  max-width: 720px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
}

.home-contact-section .primary-btn {
  color: #1f4f3c;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.auth-back {
  width: fit-content;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  min-height: 100vh;
}

.brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(22, 83, 61, 0.92), rgba(28, 103, 123, 0.82)),
    url("https://images.unsplash.com/photo-1490818387583-1baba5e638af?auto=format&fit=crop&w=1400&q=80");
  background-position: center;
  background-size: cover;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-name {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.02;
}

.brand-name strong {
  color: var(--primary-dark);
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0;
}

.brand-name small {
  display: block;
  margin-top: 4px;
  color: #5d7168;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.mark-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
}

.mark-logo-frame {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: #f8fbfa;
  box-shadow: 0 10px 24px rgba(23, 33, 43, 0.14);
}

.mark-logo {
  display: block;
  width: 58px;
  height: 58px;
  max-width: none;
  object-fit: contain;
}

.brand-copy {
  max-width: 560px;
}

.brand-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: 0;
}

.brand-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
  line-height: 1.6;
}

.auth-panel {
  display: grid;
  align-content: center;
  padding: 40px;
}

.auth-card {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tab-row,
.section-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
}

.tab-row button,
.section-tabs button {
  flex: 1;
  min-height: 42px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.tab-row button.active,
.section-tabs button.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 4px 16px rgba(33, 48, 40, 0.08);
}

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

.field {
  display: grid;
  gap: 7px;
}

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

.field label {
  color: #31413a;
  font-size: 13px;
  font-weight: 800;
}

.field legend {
  margin: 0 0 8px;
  color: #31413a;
  font-size: 13px;
  font-weight: 800;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 12px;
  color: var(--ink);
  background: #ffffff;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 3px solid rgba(47, 125, 92, 0.18);
  border-color: var(--primary);
}

.option-field {
  grid-column: 1 / -1;
  margin: 0;
  border: 0;
  padding: 0;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.choice,
.scale-choice {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  background: #ffffff;
  color: #31413a;
  font-weight: 700;
}

.choice input,
.scale-choice input {
  width: 16px;
  min-height: 16px;
}

.scale-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(58px, 1fr));
  gap: 10px;
  max-width: 520px;
}

.scale-choice {
  justify-content: center;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 7px;
  padding: 0 16px;
  font-weight: 800;
}

.primary-btn {
  color: #ffffff;
  background: var(--primary);
}

.primary-btn:hover {
  background: var(--primary-dark);
}

.secondary-btn {
  color: var(--primary-dark);
  background: #dcece3;
}

.ghost-btn {
  color: var(--ink);
  background: transparent;
}

.danger-btn {
  color: #ffffff;
  background: var(--danger);
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.notice {
  margin: 16px 0 0;
  padding: 12px;
  border-radius: 7px;
  color: #25513c;
  background: #e5f3eb;
  font-weight: 700;
}

.auth-notice {
  border: 1px solid #cfe2d9;
  border-radius: 8px;
  padding: 13px 14px;
  color: #25513c;
  background: #e8f5ef;
  font-weight: 800;
  line-height: 1.55;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #dbe5ec;
  border-radius: 8px;
  padding: 12px;
  color: #52616e;
  background: #fbfcfa;
  font-size: 14px;
  line-height: 1.55;
}

.consent-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 247, 244, 0.92);
  backdrop-filter: blur(12px);
  max-width: 100%;
}

.topbar .brand-mark {
  color: var(--ink);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.top-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dashboard-menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid rgba(39, 116, 93, 0.16);
  border-radius: 8px;
  background: #eef6f2;
  box-shadow: 0 12px 28px rgba(39, 116, 93, 0.1);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dashboard-menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--primary-dark);
  transition: transform 0.22s ease, opacity 0.18s ease, background 0.18s ease;
}

.dashboard-menu-toggle:hover,
.dashboard-menu-toggle:focus-visible {
  background: #e7f1ed;
  border-color: rgba(39, 116, 93, 0.28);
  box-shadow: inset 0 0 0 1px rgba(39, 116, 93, 0.08), 0 16px 34px rgba(39, 116, 93, 0.14);
  transform: translateY(-1px);
}

.topbar.is-open .dashboard-menu-toggle {
  background: linear-gradient(135deg, rgba(39, 116, 93, 0.16), rgba(61, 93, 169, 0.14));
}

.top-menu .ghost-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  color: #536173;
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.top-menu .ghost-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(135deg, rgba(39, 116, 93, 0.16), rgba(61, 93, 169, 0.14));
  transition: transform 0.24s ease;
}

.top-menu .ghost-btn:hover,
.top-menu .ghost-btn:focus-visible {
  color: var(--primary-dark);
  background: #e7f1ed;
  border-color: rgba(39, 116, 93, 0.12);
  box-shadow: inset 0 0 0 1px rgba(39, 116, 93, 0.08), 0 12px 26px rgba(39, 116, 93, 0.12);
  transform: translateY(-1px);
}

.top-menu .ghost-btn:hover::before,
.top-menu .ghost-btn:focus-visible::before {
  transform: scaleX(1);
}

.workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
  height: fit-content;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.profile-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.avatar {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--blue);
  font-weight: 800;
}

.avatar-image {
  object-fit: cover;
}

.profile-mini strong,
.profile-mini span {
  display: block;
  min-width: 0;
}

.profile-mini span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.profile-editor-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  border: 1px solid rgba(123, 142, 158, 0.18);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(231, 241, 237, 0.9), rgba(244, 248, 249, 0.96)),
    #ffffff;
}

.profile-editor-head strong,
.profile-editor-head span {
  display: block;
}

.profile-editor-head strong {
  color: var(--ink);
  font-size: 21px;
}

.profile-editor-head span {
  margin-top: 4px;
  color: var(--muted);
}

.avatar-upload-btn {
  width: fit-content;
  margin-top: 12px;
  cursor: pointer;
}

.avatar-upload-btn input {
  display: none;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 42px;
  border-radius: 7px;
  padding: 0 11px;
  color: #43534b;
  background: transparent;
  text-align: left;
  font-weight: 700;
}

.nav button > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-badge {
  display: inline-grid;
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  padding: 0 7px;
  color: #ffffff;
  background: #d65f75;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.nav button.active,
.nav button:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.content {
  display: grid;
  gap: 22px;
  min-width: 0;
  max-width: 100%;
}

.hero-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 26px;
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(38, 97, 74, 0.95), rgba(42, 101, 128, 0.9)),
    url("https://images.unsplash.com/photo-1512621776951-a57141f2eefd?auto=format&fit=crop&w=1400&q=80");
  background-position: center;
  background-size: cover;
}

.hero-strip h2,
.page-title h2,
.panel h3,
.metric-card h3 {
  margin: 0;
  letter-spacing: 0;
}

.hero-strip p,
.page-title p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.55;
}

.page-title p {
  color: var(--muted);
}

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

.metric-card,
.panel,
.client-card,
.appointment-slot,
.plan-item,
.photo-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric-card {
  padding: 18px;
}

.metric-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.panel {
  padding: 22px;
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-header p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.questionnaire-shell {
  min-height: 100vh;
  padding: 28px;
}

.questionnaire-card {
  max-width: 980px;
  margin: 0 auto;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ebe2;
}

.progress div {
  height: 100%;
  background: var(--primary);
  transition: width 0.2s ease;
}

.step-heading {
  margin: 22px 0;
}

.step-heading h1 {
  margin: 0 0 8px;
  font-size: 30px;
}

.step-heading p {
  margin: 0;
  color: var(--muted);
}

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

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 8px;
  text-align: left;
}

.table th {
  color: var(--muted);
  font-size: 13px;
}

.summary-section th {
  padding-top: 18px;
  color: var(--primary-dark);
  background: #f4f8f3;
  font-size: 14px;
}

.compare-grid,
.client-grid,
.plan-grid,
.photo-grid,
.appointment-grid {
  display: grid;
  gap: 14px;
}

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

.client-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.plan-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.photo-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.appointment-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.client-card,
.appointment-slot,
.plan-item,
.photo-card {
  padding: 16px;
}

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

.client-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  color: #225f46;
  background: #e1f0e8;
  font-size: 12px;
  font-weight: 800;
}

.photo-placeholder {
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 5;
  place-items: center;
  margin-bottom: 12px;
  border: 0;
  border-radius: 7px;
  color: #ffffff;
  background:
    linear-gradient(145deg, rgba(50, 109, 143, 0.85), rgba(47, 125, 92, 0.88)),
    url("https://images.unsplash.com/photo-1579126038374-6064e9370f0f?auto=format&fit=crop&w=600&q=80");
  background-position: center;
  background-size: cover;
  font-weight: 800;
  cursor: pointer;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 22px;
}

.admin-workspace {
  grid-template-columns: 240px minmax(0, 1fr);
}

.admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.admin-heading h2 {
  margin: 0;
  font-size: 30px;
}

.admin-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  min-width: 0;
}

.view-toggle {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.view-toggle button,
.icon-btn {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--blue);
  background: #ffffff;
  font-size: 18px;
  font-weight: 800;
}

.view-toggle button.active {
  color: #ffffff;
  background: #405ca8;
}

.admin-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(100%, 280px);
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 14px;
  background: #ffffff;
  color: var(--blue);
}

.admin-search input {
  min-height: auto;
  border: 0;
  padding: 0;
}

.admin-search input:focus {
  outline: 0;
}

.compact-select {
  display: grid;
  min-width: 110px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 12px;
  background: #ffffff;
}

.compact-select.wide {
  min-width: 250px;
}

.compact-select span {
  color: #97a1b3;
  font-size: 11px;
  font-weight: 800;
}

.compact-select select {
  min-height: 27px;
  border: 0;
  padding: 0;
}

.toolbar-spacer {
  flex: 1;
}

.admin-client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  min-width: 0;
}

.admin-client-card {
  position: relative;
  display: grid;
  min-height: 230px;
  align-content: center;
  justify-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background: var(--surface);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.client-status-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.client-status-badge.active {
  color: #1f5e4b;
  background: #dff1e8;
}

.client-status-badge.inactive {
  color: #8d2f2f;
  background: #f7dddd;
}

.client-delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  opacity: 0.78;
}

.client-delete-btn:hover {
  opacity: 1;
}

.admin-client-card:hover,
.admin-client-card.selected {
  border-color: #b8c5e9;
  box-shadow: 0 14px 35px rgba(55, 75, 125, 0.12);
  transform: translateY(-1px);
}

.admin-client-card::after {
  content: "Άνοιγμα φακέλου";
  position: absolute;
  top: 14px;
  right: 14px;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--primary-dark);
  background: #e7f1ed;
  font-size: 12px;
  font-weight: 900;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.admin-client-card:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.client-avatar-lg {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border-radius: 50%;
  color: #405ca8;
  background: #ecf1fb;
  font-size: 20px;
  font-weight: 800;
}

.admin-client-card h3 {
  margin: 4px 0 0;
  font-size: 21px;
}

.phone-pill {
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 10px;
  color: #405ca8;
  background: #f1f4fb;
  font-size: 13px;
  font-weight: 700;
}

.client-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  gap: 10px;
  margin-top: 24px;
}

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

.client-card-stats strong {
  font-size: 24px;
}

.client-card-stats span {
  margin-top: 6px;
  color: #98a1b1;
  font-size: 13px;
}

.selected-client {
  display: grid;
  gap: 18px;
}

.admin-client-placeholder {
  display: grid;
  min-height: 180px;
  place-items: center;
  gap: 6px;
  border: 1px dashed #b9c9d5;
  border-radius: 8px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  text-align: center;
}

.admin-client-placeholder strong {
  color: var(--ink);
  font-size: 22px;
}

.admin-client-detail {
  display: grid;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(123, 142, 158, 0.22);
  border-radius: 8px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.client-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  border-bottom: 1px solid #e5edf2;
  padding-bottom: 12px;
}

.admin-detail-tabs button {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  color: #536173;
  background: transparent;
  font-weight: 800;
}

.admin-detail-tabs button.active,
.admin-detail-tabs button:hover {
  color: var(--primary-dark);
  background: #e7f1ed;
}

.admin-form-section {
  margin-top: 12px;
  border-top: 1px solid #e5edf2;
  padding-top: 18px;
}

.admin-form-section h3 {
  margin: 0;
}

.micronutrient-details {
  align-self: stretch;
  border: 1px solid #dbe5ec;
  border-radius: 8px;
  padding: 0;
  background: #fbfcfa;
  overflow: hidden;
}

.micronutrient-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
  list-style: none;
}

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

.micronutrient-details summary::after {
  content: "+";
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #e7f1ed;
  color: var(--primary-dark);
  font-size: 20px;
  line-height: 1;
}

.micronutrient-details[open] summary::after {
  content: "-";
}

.micronutrient-details summary small {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.micronutrient-details > p {
  margin: 0;
  border-top: 1px solid #e5edf2;
  padding: 14px 16px 0;
  color: var(--muted);
}

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

.compact-admin-form {
  align-items: end;
  margin-bottom: 22px;
}

.admin-table {
  margin-top: 18px;
  max-width: 100%;
}

.upload-form {
  margin: 12px 0 22px;
}

.biochemical-manual-form {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}

.biochemical-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 18px;
  align-items: end;
  border: 1px solid rgba(123, 142, 158, 0.18);
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(135deg, #f8fbfa, #eef5f3);
}

.biochemical-intro h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.biochemical-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.biochemical-groups,
.biochemical-history {
  display: grid;
  gap: 14px;
}

.biochemical-group,
.biochemical-history-card {
  border: 1px solid rgba(123, 142, 158, 0.2);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.biochemical-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  background: #f7fafb;
}

.biochemical-group summary strong {
  color: var(--ink);
  font-size: 18px;
}

.biochemical-group summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.biochemical-group > p {
  margin: 0;
  padding: 0 18px 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.biochemical-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}

.biochemical-test-card {
  display: grid;
  gap: 8px;
  border: 1px solid #dfe7ec;
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.biochemical-test-card.status-ok {
  border-color: rgba(39, 116, 93, 0.28);
  background: #eff8f3;
}

.biochemical-test-card.status-out {
  border-color: rgba(199, 79, 79, 0.3);
  background: #fff0f0;
}

.biochemical-test-name {
  color: #253443;
  font-weight: 900;
}

.biochemical-value-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, 132px);
  gap: 8px;
}

.biochemical-value-row input,
.biochemical-value-row select {
  min-height: 42px;
}

.biochemical-range,
.biochemical-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.biochemical-status {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: #eef3f5;
}

.status-ok .biochemical-status,
.biochemical-result-row.status-ok small {
  color: #1f5e4b;
  background: #dff1e8;
}

.status-out .biochemical-status,
.biochemical-result-row.status-out small {
  color: #8d2f2f;
  background: #f7dddd;
}

.biochemical-history {
  margin: 18px 0 24px;
}

.biochemical-history-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.biochemical-history-card .client-detail-header {
  border-bottom: 1px solid #edf1f4;
  padding-bottom: 12px;
}

.biochemical-result-group {
  display: grid;
  gap: 8px;
}

.biochemical-result-group h4 {
  margin: 0;
  color: #17212b;
}

.biochemical-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #edf1f4;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fbfcfd;
}

.biochemical-result-row strong {
  color: var(--ink);
}

.biochemical-result-row small {
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  background: #eef3f5;
  font-weight: 900;
}

.upload-drop {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px dashed #aebfca;
  border-radius: 8px;
  min-height: 126px;
  padding: 20px;
  background: #f7fafb;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.upload-drop:hover,
.upload-drop.selected {
  border-color: rgba(39, 116, 93, 0.55);
  background: #eef8f3;
  box-shadow: inset 0 0 0 1px rgba(39, 116, 93, 0.12);
  transform: translateY(-1px);
}

.upload-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.upload-drop strong {
  color: var(--ink);
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  font-size: 30px;
  font-weight: 900;
}

.upload-copy {
  display: grid;
  gap: 5px;
}

.upload-copy small {
  color: var(--muted);
  line-height: 1.45;
}

.upload-copy em {
  margin-top: 4px;
  color: var(--primary-dark);
  font-style: normal;
  font-weight: 900;
}

.upload-drop span,
.file-list span {
  color: var(--muted);
  font-size: 13px;
}

.upload-drop .upload-icon {
  color: #ffffff;
  font-size: 30px;
}

.upload-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.upload-submit {
  min-width: 260px;
  justify-content: center;
}

.upload-submit:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  box-shadow: none;
}

.file-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.file-list article {
  display: grid;
  gap: 4px;
  border: 1px solid #dbe5ec;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.rich-file-list article,
.file-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.file-preview {
  display: grid;
  place-items: center;
  width: 86px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid #dbe5ec;
  border-radius: 8px;
  background: #f3f6f7;
}

.file-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-thumb {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--primary-dark);
  font-weight: 900;
}

.icon-file-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--primary);
  font-size: 20px;
  font-weight: 900;
}

.file-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

.danger-file-btn {
  background: var(--danger);
}

.file-card-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.file-card-copy strong,
.file-card-copy span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.file-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 150px;
  border: 1px solid rgba(123, 142, 158, 0.22);
  border-radius: 999px;
  padding: 6px 9px;
  color: #627084;
  background: #f3f6f7;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
}

.compare-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

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

.compare-photo {
  display: grid;
  gap: 10px;
  border: 1px solid #dbe5ec;
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.compare-photo button {
  overflow: hidden;
  border-radius: 8px;
  background: #f3f6f7;
}

.compare-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #f3f6f7;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(23, 33, 43, 0.62);
}

.conversation-panel {
  display: grid;
  gap: 18px;
}

.conversation-header {
  align-items: flex-start;
}

.conversation-thread {
  display: grid;
  gap: 12px;
  max-height: 440px;
  overflow: auto;
  border: 1px solid #dbe5ec;
  border-radius: 8px;
  padding: 16px;
  background: #f8fbfb;
}

.message-bubble {
  width: min(76%, 640px);
  border: 1px solid #d9e3e8;
  border-radius: 8px;
  padding: 12px 14px;
  background: #ffffff;
}

.message-bubble.own {
  justify-self: end;
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #27745d, #2e5680);
}

.message-bubble div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.message-bubble time {
  opacity: 0.72;
  font-size: 12px;
}

.message-delete-btn {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-left: auto;
  border: 1px solid rgba(130, 68, 68, 0.16);
  border-radius: 999px;
  color: #8a4b4b;
  background: rgba(255, 245, 245, 0.8);
  font-size: 16px;
  line-height: 1;
}

.message-delete-btn:hover {
  color: #ffffff;
  background: #a74d4d;
}

.message-bubble p {
  margin: 0;
  line-height: 1.55;
  white-space: pre-wrap;
}

.appointment-coming-soon {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 26px;
  border: 1px solid #dbe5ec;
  border-radius: 8px;
  padding: clamp(20px, 4vw, 34px);
  background:
    linear-gradient(135deg, rgba(231, 241, 237, 0.92), rgba(244, 248, 249, 0.96)),
    #ffffff;
  box-shadow: 0 18px 45px rgba(23, 33, 43, 0.08);
}

.appointment-visual {
  position: relative;
  display: grid;
  min-height: 210px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(39, 116, 93, 0.86), rgba(46, 86, 128, 0.9)),
    url("https://images.unsplash.com/photo-1506784983877-45594efa4cbe?auto=format&fit=crop&w=900&q=80");
  background-position: center;
  background-size: cover;
}

.appointment-visual span {
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
}

.appointment-visual strong {
  z-index: 1;
  font-size: 32px;
}

.appointment-visual small {
  z-index: 1;
  margin-top: -62px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.appointment-coming-soon h3 {
  margin: 8px 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

.appointment-coming-soon p {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.appointment-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.appointment-preview-list span {
  border: 1px solid rgba(39, 116, 93, 0.14);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.conversation-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.conversation-form textarea {
  min-height: 76px;
  resize: vertical;
}

.messages-workspace {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 18px;
}

.messages-client-list {
  display: grid;
  align-content: start;
  gap: 8px;
}

.messages-client-list button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 70px;
  border: 1px solid #dbe5ec;
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  text-align: left;
}

.messages-client-list button.active,
.messages-client-list button:hover {
  border-color: rgba(39, 116, 93, 0.24);
  background: #edf4f2;
}

.messages-client-list strong,
.messages-client-list small {
  display: block;
}

.messages-client-list small {
  overflow: hidden;
  color: #647184;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1040px, 96vw);
  max-height: 92vh;
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.file-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid #dbe5ec;
}

.file-modal header span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.viewer-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.viewer-tools span {
  min-width: 48px;
  margin: 0;
  color: var(--ink);
  text-align: center;
  font-weight: 900;
}

.viewer-zoom-stage {
  width: 100%;
  height: min(76vh, 820px);
  overflow: auto;
  background: #f7fafb;
  cursor: grab;
  overscroll-behavior: contain;
  text-align: left;
  user-select: none;
}

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

.viewer-image,
.viewer-frame {
  width: 100%;
  height: min(76vh, 820px);
  border: 0;
  background: #f7fafb;
}

.viewer-image {
  display: block;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  transition: width 0.18s ease;
  user-select: none;
}

.viewer-download {
  display: grid;
  place-items: center;
  gap: 16px;
  min-height: 360px;
  padding: 30px;
  text-align: center;
}

.generated-plan-modal {
  width: min(1120px, 96vw);
}

.generated-plan-document {
  overflow: auto;
  height: min(76vh, 820px);
  padding: 28px;
  background: #eef4f3;
}

.print-sheet {
  max-width: 980px;
  margin: 0 auto;
  border: 1px solid #dbe5ec;
  border-radius: 10px;
  padding: clamp(20px, 3vw, 34px);
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(28, 52, 66, 0.12);
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.print-sheet .print-sheet-header {
  border-color: color-mix(in srgb, var(--print-accent, #416f62) 28%, #dbe5ec);
}

.print-sheet .eyebrow,
.print-sheet h2 {
  color: var(--print-accent, #416f62);
}

.print-sheet .diet-plan-table thead th {
  color: #ffffff;
  background: var(--print-accent, #416f62) !important;
}

.print-sheet .diet-plan-table tbody th {
  color: #17342b;
  background: var(--print-secondary, #dbeafe) !important;
}

.print-sheet.checker .diet-plan-table td:nth-child(even),
.print-sheet.stripes .diet-plan-table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--print-secondary, #dbeafe) 24%, #ffffff);
}

.print-sheet.playful .diet-plan-table td {
  background: color-mix(in srgb, var(--print-secondary, #dbeafe) 18%, #ffffff) !important;
}

.print-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid #dbe5ec;
  padding-bottom: 18px;
}

.print-sheet-header h2 {
  margin: 4px 0;
}

.print-sheet .mark-logo-frame {
  width: 70px;
  height: 70px;
  flex: 0 0 auto;
}

.print-notes {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.generated-pdf-card .file-thumb {
  background: linear-gradient(135deg, #416f62, #4f6f98);
  color: #ffffff;
}

@media print {
  @page {
    size: A4 landscape;
    margin: 8mm;
  }

  html,
  body {
    width: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
  }

  body > *:not(#app) {
    display: none !important;
  }

  #app,
  #app > * {
    display: block !important;
    min-height: 0 !important;
    background: #ffffff !important;
  }

  .app-shell,
  .modal-backdrop,
  .generated-plan-modal,
  .generated-plan-document {
    position: static !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  .topbar,
  .workspace,
  .sidebar-card,
  .client-sidebar,
  .admin-sidebar,
  .viewer-tools,
  .no-print,
  .app-shell > *:not(.modal-backdrop),
  .file-modal header,
  .generated-plan-backdrop > *:not(.generated-plan-modal) {
    display: none !important;
  }

  .print-sheet {
    max-width: none;
    border: 0;
    box-shadow: none;
    padding: 0 !important;
    page-break-before: avoid;
    page-break-after: avoid;
    break-inside: avoid;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .diet-table-wrap {
    overflow: visible !important;
  }

  .diet-plan-table {
    width: 100%;
    table-layout: fixed;
    font-size: 11px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .diet-plan-table th,
  .diet-plan-table td {
    padding: 7px;
  }

  .diet-food-chip {
    break-inside: avoid;
  }
}

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

.measurement-chart {
  display: grid;
  gap: 14px;
  align-items: center;
  border: 1px solid #dbe5ec;
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(180deg, #ffffff, #f9fbfc);
  color: var(--primary);
}

.measurement-chart strong,
.measurement-chart span {
  display: block;
}

.measurement-chart strong {
  color: var(--ink);
}

.measurement-chart span {
  margin-top: 6px;
  color: var(--muted);
}

.measurement-chart svg {
  width: 100%;
  height: 170px;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfcfd, #ffffff);
}

.chart-grid-line {
  stroke: #dfe7ed;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.chart-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.chart-footer strong {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--ink);
  background: #eef3f5;
  font-size: 13px;
}

.editable-table input {
  min-height: 40px;
  width: 100%;
  min-width: 76px;
  padding: 8px 10px;
}

#adminMeasurementEditForm {
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
}

.editable-table .icon-btn {
  width: 40px;
  height: 40px;
}

.compact-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.session-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
}

.session-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.session-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
  border: 1px solid #dbe5ec;
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.session-list-item > button:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
  text-align: left;
}

.session-list-item.active,
.session-list-item:hover {
  border-color: rgba(39, 116, 93, 0.38);
  background: #eef8f3;
}

.session-list-item .icon-btn {
  width: 40px;
  height: 40px;
}

.session-list span {
  color: var(--muted);
  font-size: 13px;
}

.session-editor {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  border: 1px solid #dbe5ec;
  border-radius: 8px;
  padding: 8px;
  background: #f7fafb;
}

.rich-toolbar button {
  min-height: 34px;
  border-radius: 7px;
  padding: 0 10px;
  color: #31413a;
  background: #ffffff;
  font-weight: 800;
}

.color-tool {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border-radius: 7px;
  padding: 0 8px;
  color: #31413a;
  background: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.color-tool input {
  width: 34px;
  min-height: 24px;
  border: 0;
  padding: 0;
  background: transparent;
}

.rich-toolbar button:hover {
  background: #e7f1ed;
}

.rich-editor {
  min-height: 240px;
  max-width: 100%;
  overflow-wrap: anywhere;
  border: 1px solid #d8e2ea;
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  line-height: 1.65;
}

.rich-editor:focus {
  border-color: #5d8d7a;
  box-shadow: 0 0 0 4px rgba(39, 116, 93, 0.12);
  outline: 0;
}

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

.note {
  padding: 12px;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: #fff8ef;
}

.note strong {
  display: block;
  margin-bottom: 5px;
}

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

.empty {
  padding: 22px;
  border: 1px dashed #bfcabe;
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcfa;
}

.diet-builder-shell {
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
  border: 1px solid rgba(123, 142, 158, 0.2);
  border-radius: 8px;
  padding: clamp(18px, 3vw, 28px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 249, 0.96)),
    #ffffff;
  box-shadow: 0 18px 45px rgba(23, 33, 43, 0.08);
}

.diet-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.diet-mode-tabs button {
  border: 1px solid rgba(39, 116, 93, 0.14);
  border-radius: 8px;
  padding: 12px 14px;
  color: #52616e;
  background: #ffffff;
  font-weight: 900;
}

.diet-mode-tabs button.active {
  color: var(--primary-dark);
  background: #e7f1ed;
  box-shadow: inset 0 0 0 1px rgba(39, 116, 93, 0.12);
}

.diet-builder-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.diet-builder-head h3 {
  margin: 0 0 8px;
  font-size: 28px;
}

.diet-macro-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(80px, 1fr));
  gap: 8px;
  min-width: 360px;
}

.diet-macro-summary span {
  border: 1px solid rgba(39, 116, 93, 0.14);
  border-radius: 8px;
  padding: 10px;
  color: #52616e;
  background: rgba(239, 248, 244, 0.78);
  font-size: 13px;
}

.diet-macro-summary strong {
  display: block;
  color: var(--primary-dark);
  font-size: 20px;
}

.diet-food-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
}

.diet-food-left {
  display: grid;
  gap: 14px;
}

.food-library-panel {
  border: 1px solid rgba(123, 142, 158, 0.18);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfa;
}

.food-library-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.admin-page-head h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3vw, 38px);
}

.admin-page-head p {
  margin: 0;
  color: var(--muted);
}

.foods-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 220px minmax(180px, auto);
  align-items: end;
  gap: 14px;
  margin-bottom: 30px;
  border-radius: 18px;
  padding: 28px 32px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(22, 35, 52, 0.05);
}

.foods-toolbar input,
.foods-toolbar select {
  width: 100%;
  min-height: 52px;
  border: 1px solid #d9e2ea;
  border-radius: 8px;
  padding: 0 16px;
  color: #52616e;
  background: #ffffff;
  font-size: 16px;
}

.floating-select {
  position: relative;
}

.floating-select span {
  position: absolute;
  top: -10px;
  left: 12px;
  padding: 0 6px;
  color: #9aa6b5;
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.foods-add-btn {
  justify-self: end;
  min-height: 54px;
  min-width: 240px;
  background: #3f5ea8;
  box-shadow: 0 0 0 3px rgba(63, 94, 168, 0.16);
}

.foods-table-card {
  border-radius: 18px;
  padding: 28px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(22, 35, 52, 0.05);
  overflow: auto;
}

.foods-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  color: #52616e;
}

.foods-table th {
  padding: 20px 18px;
  color: #ffffff;
  background: #3f5ea8;
  text-align: left;
  font-weight: 900;
}

.foods-table th:first-child {
  border-top-left-radius: 0;
}

.foods-table th:last-child {
  border-top-right-radius: 0;
}

.foods-table td {
  padding: 18px;
  border-bottom: 0;
}

.foods-table tbody tr {
  transition: background 0.16s ease;
}

.foods-table tbody tr:nth-child(even) {
  background: #f5f7fb;
}

.foods-table tbody tr:hover {
  background: #edf3fb;
}

.foods-table td strong,
.foods-table td span {
  display: block;
}

.foods-table td strong {
  color: #415064;
  font-weight: 500;
}

.foods-table td span {
  margin-top: 3px;
  color: #9aa6b5;
  font-size: 13px;
}

.foods-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
  color: var(--muted);
  font-weight: 800;
}

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

.print-template-card {
  display: grid;
  gap: 18px;
  border-radius: 18px;
  padding: 22px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(22, 35, 52, 0.06);
}

.print-template-preview {
  border-radius: 14px;
  padding: 18px;
  background:
    radial-gradient(circle at 12% 14%, color-mix(in srgb, var(--template-secondary) 42%, transparent), transparent 24%),
    linear-gradient(135deg, color-mix(in srgb, var(--template-accent) 10%, white), #ffffff);
}

.template-paper {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--template-accent) 18%, #dbe5ec);
  border-radius: 12px;
  padding: 14px;
  background: #ffffff;
}

.template-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  padding: 10px 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--template-accent), var(--template-secondary));
}

.template-header strong,
.template-header span {
  position: relative;
  z-index: 1;
}

.template-header span {
  font-size: 12px;
  font-weight: 900;
  opacity: 0.92;
}

.template-grid-preview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid #e4ebf0;
}

.template-grid-preview span {
  min-height: 26px;
  border-right: 1px solid #e4ebf0;
  border-bottom: 1px solid #e4ebf0;
  background: #ffffff;
}

.print-template-card.stripes .template-grid-preview span:nth-child(10n + 1),
.print-template-card.stripes .template-grid-preview span:nth-child(10n + 2),
.print-template-card.stripes .template-grid-preview span:nth-child(10n + 3),
.print-template-card.stripes .template-grid-preview span:nth-child(10n + 4),
.print-template-card.stripes .template-grid-preview span:nth-child(10n + 5) {
  background: color-mix(in srgb, var(--template-secondary) 22%, white);
}

.print-template-card.checker .template-grid-preview span:nth-child(odd) {
  background: color-mix(in srgb, var(--template-secondary) 24%, white);
}

.print-template-card.playful .template-grid-preview span:nth-child(3n) {
  background: color-mix(in srgb, var(--template-secondary) 34%, white);
}

.print-template-card.playful .template-grid-preview span:nth-child(4n) {
  background: color-mix(in srgb, var(--template-accent) 16%, white);
}

.kids-doodle {
  position: absolute;
  right: 12px;
  bottom: 8px;
  color: var(--template-accent);
  font-size: 24px;
  font-weight: 900;
  opacity: 0.45;
}

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

.print-template-form div {
  display: grid;
  gap: 7px;
}

.print-template-form label {
  color: #536173;
  font-size: 13px;
  font-weight: 900;
}

.print-template-form input,
.print-template-form select {
  min-height: 42px;
  border: 1px solid #dbe5ec;
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
}

.print-template-form button {
  grid-column: 1 / -1;
}

.food-form-stage {
  display: grid;
  min-height: 68vh;
  place-items: start center;
  padding: 42px 0;
}

.food-form-window {
  width: min(980px, 100%);
  border-radius: 18px;
  padding: 34px 40px 38px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(22, 35, 52, 0.16);
}

.food-form-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.food-form-titlebar h2 {
  margin: 0;
  color: #343d4b;
  font-size: 26px;
}

.food-entry-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 28px;
}

.food-entry-form .field:nth-child(1),
.food-entry-form .field:nth-child(3),
.food-entry-form .field.full {
  grid-column: 1 / -1;
}

.unit-field > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.unit-field input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.unit-field span {
  display: grid;
  min-width: 58px;
  place-items: center;
  border: 1px solid #d9e2ea;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  color: #415064;
  background: #eef2f6;
  font-size: 16px;
}

.form-actions-right {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.food-library-list {
  display: grid;
  gap: 8px;
  max-height: 330px;
  overflow: auto;
}

.food-library-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(123, 142, 158, 0.18);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.food-library-row label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  cursor: pointer;
}

.favorite-food-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #99a3ad;
  background: #f3f6f7;
  font-size: 18px;
}

.favorite-food-btn.active {
  color: #ffffff;
  background: #d2a740;
}

.food-library-row:hover {
  border-color: rgba(39, 116, 93, 0.34);
  background: #f2faf6;
  transform: translateY(-1px);
}

.food-library-row small {
  display: block;
  margin-top: 4px;
  color: #6d7887;
}

.food-library-row em {
  display: block;
  margin-top: 2px;
  color: #7d8794;
  font-size: 12px;
  font-style: normal;
}

.usda-search-panel {
  display: grid;
  gap: 12px;
  margin: 10px 0 12px;
  border: 1px solid rgba(50, 109, 143, 0.18);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(145deg, #f8fbff, #f3faf6);
}

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

.usda-search-head strong,
.usda-search-head span {
  display: block;
}

.usda-search-head span {
  margin-top: 3px;
  color: #6d7887;
  font-size: 13px;
}

.usda-results {
  display: grid;
  gap: 8px;
}

.usda-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(123, 142, 158, 0.18);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.usda-result-row strong,
.usda-result-row span,
.usda-result-row small {
  display: block;
}

.usda-result-row span {
  margin-top: 3px;
  color: #6d7887;
  font-size: 13px;
}

.usda-result-row small {
  margin-top: 5px;
  color: #415064;
}

.diet-food-actions {
  display: grid;
  align-content: start;
  gap: 10px;
}

.horizontal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

.diet-table-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid rgba(123, 142, 158, 0.22);
  border-radius: 8px;
}

.diet-plan-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #ffffff;
}

.diet-plan-table th,
.diet-plan-table td {
  border: 1px solid rgba(123, 142, 158, 0.22);
  padding: 10px;
  vertical-align: top;
}

.diet-plan-table td {
  cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.diet-plan-table td:hover {
  background: #f0f8f5;
  box-shadow: inset 0 0 0 2px rgba(39, 116, 93, 0.18);
}

.diet-plan-table td.active {
  background: #edf6f2;
  box-shadow: inset 0 0 0 2px rgba(39, 116, 93, 0.22);
}

.diet-plan-table thead th {
  background: #f1f5f4;
  text-align: center;
}

.diet-plan-table tbody th {
  width: 130px;
  text-align: center;
  background: #fbfcfa;
}

.diet-empty-cell {
  display: grid;
  min-height: 44px;
  place-items: center;
  color: #b5c0bc;
}

.active-meal-card {
  border: 1px solid rgba(39, 116, 93, 0.16);
  border-radius: 8px;
  padding: 16px;
  background: #f4faf7;
}

.active-meal-card h3 {
  margin: 4px 0 12px;
}

.diet-meal-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(23, 33, 43, 0.55);
}

.diet-meal-modal {
  position: relative;
  width: min(1180px, 96vw);
  max-height: 88vh;
  overflow: auto;
  border-radius: 18px;
  padding: clamp(22px, 3vw, 34px);
  background: #ffffff;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.26);
}

.diet-meal-modal .modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #5f6f7c;
  background: #f1f5f4;
  font-size: 22px;
}

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

.diet-template-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(123, 142, 158, 0.18);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
}

.diet-template-list h4 {
  margin: 0 0 4px;
  font-size: 18px;
}

.diet-food-chip {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  border-radius: 3px;
  padding: 6px 7px;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.25;
}

.diet-food-chip button {
  flex: 0 0 auto;
  color: inherit;
  background: transparent;
  font-size: 16px;
  line-height: 1;
}

.diet-food-chip.blue {
  background: #3f5da8;
}

.diet-food-chip.green {
  background: #60b79a;
}

.diet-food-chip.beige,
.diet-food-chip.yellow {
  color: #17212b;
  background: #efd69a;
}

.diet-food-chip.pink,
.diet-food-chip.purple {
  background: #9b5ca7;
}

.diet-food-chip.gray {
  color: #17212b;
  background: #e8edf0;
}

.diet-food-chip.print-clean {
  display: block;
  margin-bottom: 3px;
  border-radius: 0;
  padding: 0;
  color: #17212b;
  background: transparent;
  font-size: 11px;
}

.generated-plan-card {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(123, 142, 158, 0.22);
  border-radius: 8px;
  padding: 20px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(23, 33, 43, 0.08);
}

.generated-plan-card h3 {
  margin: 8px 0 4px;
  font-size: 24px;
}

.generated-plan-card details {
  max-width: 100%;
}

.generated-plan-card summary {
  cursor: pointer;
  color: var(--primary-dark);
  font-weight: 900;
}

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

  .foods-toolbar,
  .food-entry-form,
  .print-template-grid,
  .print-template-form {
    grid-template-columns: 1fr;
  }

  .foods-add-btn {
    justify-self: stretch;
    width: 100%;
  }

  .auth-layout,
  .workspace,
  .admin-layout,
  .admin-workspace,
  .hero-strip,
  .about-profile-section,
  .about-story-grid,
  .split-section,
  .service-row,
  .science-article,
  .scientific-services,
  .service-grid,
  .article-list {
    grid-template-columns: 1fr;
  }

  .service-photo {
    width: min(150px, 58vw);
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
  }

  .dashboard-menu-toggle {
    display: inline-flex;
  }

  .topbar .top-actions {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
  }

  .topbar.is-open .top-actions {
    display: grid;
    gap: 10px;
  }

  .topbar.is-open .dashboard-menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .topbar.is-open .dashboard-menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .topbar.is-open .dashboard-menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .topbar .top-menu {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .topbar .top-menu .ghost-btn,
  .topbar .top-actions > .ghost-btn,
  .topbar .top-actions > .primary-btn {
    width: 100%;
    justify-content: flex-start;
  }

  .diet-builder-head,
  .diet-food-form {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .diet-meal-modal-backdrop {
    align-items: start;
    padding: 14px;
  }

  .diet-macro-summary,
  .food-library-controls {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .admin-detail-tabs {
    flex-wrap: nowrap;
  }

  .services-title,
  .scientific-services article {
    grid-template-columns: 1fr;
  }

  .scientific-services::before,
  .scientific-services article::after {
    display: none;
  }

  .scientific-services small {
    justify-self: start;
    max-width: 100%;
    text-align: left;
  }

  .public-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-media-panel {
    min-height: 360px;
    order: -1;
  }

  .contact-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-contact-section .primary-btn {
    width: 100%;
  }

  .admin-heading,
  .admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-spacer {
    display: none;
  }

  .brand-panel {
    min-height: 42vh;
  }

  .sidebar {
    position: static;
  }

  .stat-row,
  .compare-grid,
  .session-layout {
    grid-template-columns: 1fr;
  }

  .messages-workspace,
  .conversation-form {
    grid-template-columns: 1fr;
  }

  .message-bubble {
    width: 100%;
  }

  .auth-modal-backdrop {
    place-items: start center;
    padding: 12px;
  }

  .auth-modal .public-auth-section {
    padding: 18px;
  }
}

@media (max-width: 1100px) {
  .public-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 74px;
    padding: 12px clamp(16px, 5vw, 26px);
  }

  .public-nav.nav-hidden {
    transform: translateY(-105%);
  }

  .public-nav.is-open {
    transform: translateY(0);
    box-shadow: 0 22px 58px rgba(23, 33, 43, 0.14);
  }

  .public-nav .brand-mark {
    min-width: 0;
  }

  .public-nav .brand-name strong {
    font-size: clamp(26px, 8vw, 42px);
  }

  .public-nav .brand-name small {
    font-size: clamp(10px, 3vw, 14px);
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .public-nav nav,
  .public-nav .public-actions {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
  }

  .public-nav.is-open nav,
  .public-nav.is-open .public-actions {
    display: grid;
  }

  .public-nav nav {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-top: 10px;
  }

  .public-nav a,
  .public-nav .ghost-btn,
  .public-nav .primary-btn,
  .public-nav .secondary-btn {
    width: 100%;
    justify-content: flex-start;
    min-height: 48px;
  }

  .public-actions,
  .signed-in-actions {
    grid-template-columns: 1fr;
    align-items: stretch;
    justify-content: stretch;
    gap: 10px;
    padding-top: 8px;
  }

  .signed-in-actions .user-chip {
    width: 100%;
  }

  .signed-in-actions .primary-btn,
  .signed-in-actions .ghost-btn {
    justify-content: center;
  }

  .user-chip {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

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

@media (max-width: 620px) {
  .public-nav {
    padding: 12px 16px;
  }

  .public-nav .mark-logo-frame {
    width: 68px;
    height: 68px;
    border-radius: 14px;
  }

  .public-hero {
    padding: 28px 16px 44px;
  }

  .hero-media-panel {
    width: 100%;
    max-width: 100%;
  }

  .article-deck {
    gap: 18px;
  }

  .science-article {
    display: block;
    padding: 14px;
    overflow: hidden;
  }

  .science-article img {
    display: block;
    height: 220px;
    min-height: 0;
    margin: 0 0 18px;
    border-radius: 8px;
    object-fit: cover;
  }

  .science-article > div {
    display: block;
  }

  .science-article span {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
  }

  .science-article h3 {
    font-size: 24px;
    line-height: 1.15;
  }

  .science-article p {
    font-size: 15px;
    line-height: 1.65;
  }

  .article-sources a {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .brand-panel,
  .auth-panel,
  .questionnaire-shell,
  .workspace {
    padding: 18px;
  }

  .top-menu .ghost-btn {
    padding: 0 10px;
  }

  .form-grid,
  .stat-row,
  .compare-grid,
  .compare-controls,
  .before-after-grid,
  .appointment-coming-soon,
  .measurement-chart-grid,
  .session-layout,
  .measurement-chart {
    grid-template-columns: 1fr;
  }

  .rich-file-list article,
  .file-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .file-card-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .file-preview {
    width: 72px;
  }

  .form-actions {
    flex-direction: column;
  }

  .upload-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .upload-submit {
    width: 100%;
    min-width: 0;
  }

  .client-detail-header,
  .admin-heading,
  .profile-editor-head,
  .biochemical-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .biochemical-intro,
  .biochemical-value-row,
  .biochemical-result-row {
    grid-template-columns: 1fr;
  }

  .biochemical-grid {
    grid-template-columns: 1fr;
    padding: 0 12px 12px;
  }

  .biochemical-group summary {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .session-list-item {
    grid-template-columns: minmax(0, 1fr) 40px;
  }
}

/* Polished application skin */
:root {
  --bg: #f3f6f7;
  --surface: #ffffff;
  --surface-soft: #eef5f3;
  --ink: #17212b;
  --muted: #6d7887;
  --line: #dde5ec;
  --primary: #27745d;
  --primary-dark: #1f5e4b;
  --accent: #c88442;
  --blue: #3d5da9;
  --danger: #c74f4f;
  --shadow: 0 18px 48px rgba(23, 33, 43, 0.1);
  --shadow-soft: 0 10px 28px rgba(23, 33, 43, 0.07);
}

body {
  background:
    linear-gradient(180deg, #eef3f5 0, #f7f9f8 340px, #f4f6f7 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.brand-mark {
  font-size: 16px;
}

.mark-icon {
  border-radius: 8px;
  background: linear-gradient(135deg, #2a8065, #3d5da9);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.brand-panel {
  padding: 54px;
  background:
    linear-gradient(135deg, rgba(14, 42, 36, 0.92), rgba(42, 78, 119, 0.78)),
    url("https://images.unsplash.com/photo-1498837167922-ddd27525d352?auto=format&fit=crop&w=1600&q=85");
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.18);
}

.brand-copy h1 {
  max-width: 680px;
  font-size: clamp(44px, 6.6vw, 82px);
}

.brand-copy p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.9);
}

.auth-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.34)),
    #f3f6f7;
}

.auth-card,
.questionnaire-card,
.panel,
.sidebar,
.metric-card,
.appointment-slot,
.plan-item,
.photo-card,
.admin-toolbar,
.admin-client-card {
  border-color: rgba(123, 142, 158, 0.22);
  box-shadow: var(--shadow-soft);
}

.auth-card {
  padding: 34px;
}

.tab-row,
.section-tabs {
  border: 0;
  background: #eef3f5;
}

.tab-row button.active,
.section-tabs button.active {
  box-shadow: 0 8px 22px rgba(23, 33, 43, 0.09);
}

.field label,
.field legend {
  color: #2c3947;
  letter-spacing: 0;
}

.field input,
.field textarea,
.field select {
  border-color: #d8e2ea;
  background: #fbfcfd;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.field input:hover,
.field textarea:hover,
.field select:hover {
  border-color: #bfd0dc;
  background: #ffffff;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: #5d8d7a;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(39, 116, 93, 0.12);
  outline: 0;
}

.choice,
.scale-choice {
  background: #fbfcfd;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.choice:hover,
.scale-choice:hover {
  border-color: #b9c9d5;
  background: #ffffff;
}

.choice:has(input:checked),
.scale-choice:has(input:checked) {
  border-color: rgba(39, 116, 93, 0.55);
  background: #eef8f3;
  box-shadow: 0 0 0 3px rgba(39, 116, 93, 0.08);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn {
  min-height: 46px;
  border-radius: 8px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.primary-btn {
  background: linear-gradient(135deg, #27745d, #2f647f);
  box-shadow: 0 12px 24px rgba(39, 116, 93, 0.2);
}

.primary-btn:hover {
  background: linear-gradient(135deg, #1f5e4b, #28556d);
  transform: translateY(-1px);
}

.secondary-btn {
  background: #e7f1ed;
  box-shadow: inset 0 0 0 1px rgba(39, 116, 93, 0.12);
}

.notice {
  border: 1px solid rgba(39, 116, 93, 0.16);
  background: #edf7f2;
}

.topbar {
  min-height: 76px;
  border-bottom-color: rgba(123, 142, 158, 0.18);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 28px rgba(23, 33, 43, 0.05);
}

.topbar .mark-icon {
  width: 38px;
  height: 38px;
}

.workspace {
  gap: 28px;
  padding: 30px;
}

.sidebar {
  padding: 18px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
}

.avatar {
  border-radius: 8px;
  background: linear-gradient(135deg, #3d5da9, #27745d);
}

.nav button {
  min-height: 46px;
  color: #536173;
}

.nav button.active,
.nav button:hover {
  color: #17212b;
  background: #edf4f2;
}

.content {
  gap: 24px;
}

.hero-strip {
  min-height: 178px;
  padding: 30px;
  background:
    linear-gradient(135deg, rgba(27, 85, 68, 0.94), rgba(46, 86, 128, 0.86)),
    url("https://images.unsplash.com/photo-1490645935967-10de6ba17061?auto=format&fit=crop&w=1600&q=85");
  box-shadow: var(--shadow);
}

.hero-strip h2 {
  font-size: 30px;
}

.stat-row {
  gap: 18px;
}

.metric-card {
  padding: 22px;
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
}

.metric-card h3 {
  font-size: 28px;
}

.panel {
  padding: 26px;
  background: rgba(255, 255, 255, 0.94);
}

.panel-header {
  padding-bottom: 4px;
}

.page-title h2,
.panel h3 {
  color: #17212b;
}

.questionnaire-shell {
  background:
    linear-gradient(180deg, rgba(61, 93, 169, 0.08), rgba(39, 116, 93, 0.04)),
    #f4f7f7;
}

.questionnaire-card {
  max-width: 1040px;
  padding: 32px;
}

.progress {
  height: 12px;
  background: #e1e8ee;
}

.progress div {
  background: linear-gradient(90deg, #27745d, #3d5da9);
}

.step-heading {
  margin: 26px 0;
}

.step-heading h1 {
  font-size: 34px;
}

.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table th,
.table td {
  border-bottom-color: #e8eef2;
  padding: 14px 10px;
  vertical-align: top;
}

.summary-section th {
  border-radius: 6px;
  background: #eef5f3;
}

.plan-item,
.appointment-slot,
.photo-card {
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
}

.badge {
  color: #1f5e4b;
  background: #e8f4ee;
}

.admin-heading {
  padding: 4px 2px 0;
}

.admin-heading h2 {
  font-size: 34px;
}

.admin-toolbar {
  gap: 14px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.94);
}

.view-toggle,
.admin-search,
.compact-select {
  border-color: #d8e2ea;
  background: #fbfcfd;
}

.view-toggle button.active {
  background: linear-gradient(135deg, #3d5da9, #2f647f);
}

.icon-btn {
  border: 1px solid #d8e2ea;
  border-radius: 8px;
  color: #3d5da9;
}

.admin-client-grid {
  gap: 22px;
}

.admin-client-card {
  min-height: 260px;
  border-color: rgba(123, 142, 158, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 253, 0.98));
}

.admin-client-card:hover,
.admin-client-card.selected {
  border-color: rgba(61, 93, 169, 0.34);
  box-shadow: 0 18px 42px rgba(46, 66, 96, 0.13);
}

.client-avatar-lg {
  background: linear-gradient(135deg, #edf2fb, #e9f5ef);
  color: #315196;
}

.phone-pill {
  background: #f0f4fb;
}

.client-card-stats {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #edf1f4;
}

.client-card-stats strong {
  color: #17212b;
}

.note {
  border-left-color: #c88442;
  background: #fff7ed;
}

@media (max-width: 620px) {
  .admin-heading h2,
  .step-heading h1 {
    font-size: 28px;
  }

  .admin-toolbar {
    padding: 16px;
  }

  .admin-client-card {
    min-height: 230px;
  }
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

.workspace,
.admin-workspace,
.content,
.panel,
.admin-client-detail,
.admin-client-detail > *,
.admin-toolbar,
.admin-client-grid,
.session-editor,
.table,
.admin-table {
  min-width: 0;
  max-width: 100%;
}

.workspace,
.app-shell {
  overflow-x: hidden;
}

.table {
  width: 100%;
}

@media (max-width: 900px) {
  .workspace {
    padding: 18px;
  }

  .admin-toolbar,
  .top-actions,
  .public-actions {
    width: 100%;
  }
}

.brand-panel .brand-name strong,
.brand-panel .brand-name small {
  color: #ffffff;
}

.app-shell .workspace {
  align-items: start;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  padding: 30px 24px;
}

.app-shell .sidebar {
  position: static;
  top: auto;
  align-self: start;
  height: fit-content;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: 0;
}

.app-shell .content {
  align-self: start;
}

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

  .app-shell .sidebar {
    position: static;
    max-height: none;
  }
}
