/* ========================================
   FONTS (same as nuaskinhouse.com)
   ======================================== */
@font-face {
  font-family: 'TAN Pearl';
  src: url('/fonts/TAN-Pearl-Regular.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Tenor Sans';
  src: url('/fonts/TenorSans-Regular.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'The Seasons';
  src: url('/fonts/the-seasons-regular.ttf') format('truetype');
  font-display: swap;
}

/* ========================================
   TOKENS
   ======================================== */
:root {
  --cream: #f8f5f0;
  --sand: #e8ddd4;
  --sand-soft: #f1ebe4;
  --brown: #55281e;
  --brown-deep: #3a1810;
  --terracotta: #8f4d3b;
  --copper: #a76947;
  --gold: #c4956e;
  --white: #fff;
  --line: rgba(85, 40, 30, 0.12);
  --shadow: 0 8px 28px rgba(85, 40, 30, 0.08);
  --radius: 6px;
  --serif: 'The Seasons', 'TAN Pearl', Georgia, serif;
  --logo: 'TAN Pearl', Georgia, serif;
  --sans: 'Montserrat', system-ui, sans-serif;
  --tenor: 'Tenor Sans', system-ui, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--brown);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img { display: block; max-width: 100%; }

/* ========================================
   LAYOUT
   ======================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 40px;
  padding-top: calc(18px + env(safe-area-inset-top, 0px));
  background: rgba(248, 245, 240, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.logo { display: inline-flex; flex-direction: column; line-height: 1; }
.logo__main { font-family: var(--logo); font-size: 28px; letter-spacing: 2px; text-transform: lowercase; }
.logo__sub {
  font-size: 9px; font-weight: 500; letter-spacing: 3.5px; text-transform: uppercase;
  color: var(--terracotta); margin-top: 5px;
}

.topbar__actions { display: flex; align-items: center; gap: 8px; }

.container { max-width: 1040px; margin: 0 auto; padding: 36px 40px 120px; }
.container--narrow { max-width: 760px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.eyebrow {
  font-size: 11px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase;
  color: var(--copper); margin-bottom: 10px; display: block;
}
.title {
  font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1; letter-spacing: 1px; text-transform: uppercase;
}
.subtitle { font-size: 14px; color: var(--terracotta); letter-spacing: .5px; margin-top: 8px; line-height: 1.6; }

.back {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--terracotta); margin-bottom: 18px;
}
.back:hover { color: var(--brown); }

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--tenor); font-size: 13px; letter-spacing: 1px;
  padding: 14px 26px; border-radius: 4px; transition: all .3s ease; white-space: nowrap;
  min-height: 46px;
}
.btn--primary { background: var(--copper); color: var(--white); }
.btn--primary:hover { background: var(--terracotta); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(167, 105, 71, .3); }
.btn--primary:disabled { opacity: .6; transform: none; box-shadow: none; cursor: wait; }
.btn--ghost { border: 1px solid var(--line); background: var(--white); }
.btn--ghost:hover { border-color: var(--copper); color: var(--copper); }
.btn--text { padding: 10px 12px; min-height: 40px; color: var(--terracotta); }
.btn--text:hover { color: var(--brown); }
.btn--danger { color: #9b2c1f; }
.btn--danger:hover { color: #6e1d14; }
.btn--sm { padding: 9px 16px; min-height: 38px; font-size: 12px; }

.icon-btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background .2s ease;
}
.icon-btn:hover { background: var(--sand-soft); }
.icon { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* Floating action button (mobile) */
.fab {
  position: fixed; right: 20px; bottom: calc(22px + var(--safe-bottom)); z-index: 40;
  display: none; align-items: center; gap: 8px;
  background: var(--copper); color: var(--white); border-radius: 999px;
  padding: 16px 22px; font-family: var(--tenor); font-size: 13px; letter-spacing: 1px;
  box-shadow: 0 10px 30px rgba(85, 40, 30, .28);
}

/* ========================================
   SEARCH + LIST
   ======================================== */
.search {
  position: relative; margin-bottom: 22px;
}
.search .icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--copper); }
.search input {
  width: 100%; padding: 16px 18px 16px 48px; font-size: 16px; font-family: var(--sans);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--brown);
}
.search input:focus { outline: none; border-color: var(--copper); box-shadow: 0 0 0 3px rgba(167, 105, 71, .12); }

.count { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--terracotta); margin-bottom: 14px; }

.patient-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

.patient-card {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  transition: all .25s ease;
}
.patient-card:hover { border-color: rgba(167, 105, 71, .45); box-shadow: var(--shadow); transform: translateY(-1px); }

.avatar {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--sand); color: var(--brown); font-family: var(--serif); font-size: 18px; letter-spacing: 1px;
}
.avatar--lg { width: 72px; height: 72px; font-size: 26px; }

.patient-card__info { min-width: 0; flex: 1; }
.patient-card__name { font-family: var(--tenor); font-size: 16px; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.patient-card__meta { font-size: 12.5px; color: var(--terracotta); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.patient-card__badge {
  font-size: 11px; letter-spacing: 1px; color: var(--copper); background: var(--sand-soft);
  border-radius: 999px; padding: 5px 10px; white-space: nowrap;
}

.empty {
  text-align: center; padding: 70px 24px; border: 1px dashed rgba(167, 105, 71, .35); border-radius: var(--radius);
  background: rgba(255, 255, 255, .5);
}
.empty__title { font-family: var(--serif); font-size: 24px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.empty p { color: var(--terracotta); font-size: 14px; margin-bottom: 22px; line-height: 1.6; }

/* ========================================
   PATIENT DETAIL
   ======================================== */
.profile {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding-bottom: 26px; margin-bottom: 26px; border-bottom: 1px solid var(--line);
}
.profile__main { flex: 1; min-width: 220px; }
.profile__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 7px 12px;
  border-radius: 999px; background: var(--white); border: 1px solid var(--line); color: var(--brown);
}
a.chip:hover { border-color: var(--copper); color: var(--copper); }
.chip .icon { width: 14px; height: 14px; }
.profile__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.tab {
  padding: 12px 0; font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--terracotta);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab--active { color: var(--brown); border-bottom-color: var(--copper); }

.alert-health {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; margin-bottom: 22px;
  background: #fbf1ea; border: 1px solid rgba(167, 105, 71, .3); border-radius: var(--radius); font-size: 13.5px; line-height: 1.55;
}
.alert-health strong { font-weight: 600; letter-spacing: .3px; }
.alert-health .icon { color: var(--copper); margin-top: 1px; }

/* Timeline */
.timeline { position: relative; }
.timeline__item { position: relative; padding-left: 34px; padding-bottom: 22px; }
.timeline__item::before {
  content: ''; position: absolute; left: 7px; top: 8px; bottom: -8px; width: 1px; background: var(--sand);
}
.timeline__item:last-child::before { display: none; }
.timeline__dot {
  position: absolute; left: 0; top: 4px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--cream); border: 1.5px solid var(--copper);
}
.timeline__date { font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--copper); margin-bottom: 10px; }

.treatment-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px;
}
.treatment-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.treatment-card__name { font-family: var(--tenor); font-size: 18px; letter-spacing: .3px; line-height: 1.35; }
.treatment-card__zone { font-size: 12.5px; color: var(--terracotta); margin-top: 4px; letter-spacing: .3px; }
.treatment-card__desc { font-size: 14px; line-height: 1.7; margin-top: 14px; white-space: pre-wrap; color: var(--brown-deep); }
.kv { margin-top: 12px; font-size: 13px; line-height: 1.6; }
.kv span { font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--copper); display: block; margin-bottom: 2px; }

.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.ba__col-label { font-size: 10.5px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--terracotta); margin-bottom: 8px; }
.ba__thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.thumb {
  position: relative; aspect-ratio: 3 / 4; border-radius: 4px; overflow: hidden; background: var(--sand-soft);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.thumb:hover img { transform: scale(1.04); }
.thumb--empty {
  display: flex; align-items: center; justify-content: center; font-size: 11px; color: rgba(143, 77, 59, .6);
  border: 1px dashed rgba(167, 105, 71, .3); background: transparent; letter-spacing: 1px;
}
.compare-link { margin-top: 14px; }

/* Data sheet */
.sheet { display: grid; gap: 18px; }
.sheet__section { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.sheet__title { font-family: var(--serif); font-size: 18px; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 16px; }
.sheet__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px 24px; }
.sheet__item span { font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--copper); display: block; margin-bottom: 4px; }
.sheet__item p { font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.sheet__item--wide { grid-column: 1 / -1; }
.muted { color: rgba(143, 77, 59, .55); }

/* ========================================
   FORMS
   ======================================== */
.form { display: grid; gap: 20px; }
.fieldset { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.fieldset__title { font-family: var(--serif); font-size: 18px; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--terracotta); }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--sans); font-size: 16px; color: var(--brown);
  padding: 13px 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--cream);
  transition: border-color .2s ease, box-shadow .2s ease; -webkit-appearance: none; appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a76947' stroke-width='1.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 38px;
}
.field input[type="date"] { min-height: 48px; }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--copper); background: var(--white); box-shadow: 0 0 0 3px rgba(167, 105, 71, .12);
}
.field__hint { font-size: 12px; color: var(--terracotta); }

.form-actions {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.form-actions__right { display: flex; gap: 10px; margin-left: auto; }

/* Photo uploader */
.uploader { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.uploader__col-title { font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--terracotta); margin-bottom: 10px; }
.uploader__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.uploader__add {
  aspect-ratio: 3 / 4; border: 1px dashed rgba(167, 105, 71, .5); border-radius: 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: var(--copper); font-size: 11px; letter-spacing: 1px; text-align: center; padding: 6px;
  background: var(--cream); transition: all .2s ease; cursor: pointer;
}
.uploader__add:hover { background: var(--sand-soft); border-color: var(--copper); }
.uploader__add input { display: none; }
.thumb__remove {
  position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(58, 24, 16, .7); color: var(--white); display: flex; align-items: center; justify-content: center;
}
.thumb__remove .icon { width: 14px; height: 14px; }
.thumb__pending {
  position: absolute; left: 5px; bottom: 5px; font-size: 9.5px; letter-spacing: 1px; text-transform: uppercase;
  background: rgba(248, 245, 240, .92); padding: 3px 7px; border-radius: 999px; color: var(--copper);
}

/* ========================================
   AUTH
   ======================================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--cream); }
.auth__photo {
  background: url('/img/login.webp') center 30% / cover no-repeat var(--sand);
  position: relative;
}
.auth__photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(85, 40, 30, 0) 60%, rgba(248, 245, 240, .35) 100%);
}
.auth__panel {
  display: flex; align-items: center; justify-content: center; padding: 40px 28px;
  background: radial-gradient(ellipse at 30% 0%, #fff 0%, var(--cream) 60%, var(--sand-soft) 120%);
}
.auth__card { width: 100%; max-width: 380px; }
.auth__brand { display: flex; flex-direction: column; line-height: 1; margin-bottom: 52px; }
.auth__logo { font-family: var(--logo); font-size: 40px; letter-spacing: 3px; }
.auth__sub { font-size: 9.5px; font-weight: 500; letter-spacing: 4px; text-transform: uppercase; color: var(--terracotta); margin-top: 8px; }
.auth__hello {
  font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 4.4vw, 54px); line-height: 1.05;
  letter-spacing: .5px; color: var(--brown);
}
.auth__hello em { font-style: normal; color: var(--copper); }
.auth__tagline {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
  font-family: var(--tenor); font-size: 13px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--terracotta);
}
.auth__tagline .icon { width: 16px; height: 16px; color: var(--gold); }
.auth__lead { font-size: 14.5px; line-height: 1.7; color: var(--brown-deep); margin: 26px 0 22px; opacity: .85; }
.auth__card .field { margin-bottom: 16px; }
.auth__card .field input { background: var(--white); }
.auth__card .btn { width: 100%; margin-top: 4px; }
.auth__foot { margin-top: 40px; font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: rgba(143, 77, 59, .55); }
.pw { position: relative; }
.pw input { padding-right: 48px; }
.pw__toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center; color: var(--copper); border-radius: 50%;
}
.pw__toggle:hover { background: var(--sand-soft); }
.shake { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.error { color: #9b2c1f; font-size: 13px; margin-top: 12px; min-height: 18px; }

/* ========================================
   LIGHTBOX + COMPARE
   ======================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(30, 14, 9, .92);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px calc(30px + var(--safe-bottom)); animation: fade .2s ease;
}
.lightbox__close {
  position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; color: var(--white);
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.lightbox__close:hover { background: rgba(255, 255, 255, .1); }
.lightbox__close .icon { width: 22px; height: 22px; }
.lightbox__img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: 4px; }
.lightbox__caption { color: var(--sand); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; margin-top: 14px; }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%); color: var(--white);
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}
.lightbox__nav:hover { background: rgba(255, 255, 255, .16); }
.lightbox__nav--prev { left: 14px; }
.lightbox__nav--next { right: 14px; }

.compare {
  position: relative; width: min(560px, 100%); aspect-ratio: 3 / 4; max-height: calc(100vh - 170px);
  border-radius: 4px; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none;
  background: #000;
}
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare__before { clip-path: inset(0 50% 0 0); }
.compare__handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--white); transform: translateX(-1px);
  pointer-events: none;
}
.compare__handle::after {
  content: '‹ ›'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 42px; height: 42px; border-radius: 50%; background: var(--white); color: var(--brown);
  display: flex; align-items: center; justify-content: center; font-size: 18px; letter-spacing: 2px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
}
.compare__tag {
  position: absolute; top: 12px; font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  background: rgba(248, 245, 240, .9); color: var(--brown); padding: 5px 10px; border-radius: 999px;
}
.compare__tag--before { left: 12px; }
.compare__tag--after { right: 12px; }
.compare-hint { color: var(--sand); font-size: 12px; letter-spacing: 1px; margin-top: 14px; opacity: .8; }

/* ========================================
   EMAIL
   ======================================== */
.mail-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.mail-row .btn { margin-left: auto; }
.mail-sent { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #4f7a4a; }
.mail-sent .icon { width: 15px; height: 15px; }
.check { display: flex; align-items: flex-start; gap: 12px; font-size: 14.5px; line-height: 1.5; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--copper); flex-shrink: 0; }

/* ========================================
   IMPORT
   ======================================== */
.page-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.uncertain { margin: 8px 0 0 18px; }
.uncertain li { margin-top: 3px; }
.uploader__grid--pages { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.draft-treatment { padding: 18px 0; border-top: 1px solid var(--line); }
.draft-treatment:first-child { border-top: none; padding-top: 0; }
.draft-treatment__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.draft-treatment__head .eyebrow { margin-bottom: 0; }
.draft-treatment__photos { margin-top: 16px; }

/* ========================================
   MISC
   ======================================== */
.toast {
  position: fixed; left: 50%; bottom: calc(28px + var(--safe-bottom)); transform: translate(-50%, 20px);
  background: var(--brown); color: var(--cream); padding: 13px 22px; border-radius: 999px; font-size: 13px;
  letter-spacing: .5px; opacity: 0; pointer-events: none; transition: all .3s ease; z-index: 300; max-width: calc(100% - 32px);
  text-align: center;
}
.toast--show { opacity: 1; transform: translate(-50%, 0); }
.loading { text-align: center; padding: 80px 0; color: var(--terracotta); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.fade-in { animation: fadeUp .45s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ========================================
   MOBILE
   ======================================== */
@media (max-width: 720px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: 34vh auto; }
  .auth__photo::after { background: linear-gradient(180deg, rgba(248, 245, 240, 0) 55%, var(--cream) 100%); }
  .auth__panel { align-items: flex-start; padding: 8px 24px calc(32px + var(--safe-bottom)); background: var(--cream); }
  .auth__brand { margin-bottom: 30px; }
  .auth__lead { margin: 20px 0 18px; }
  .auth__foot { margin-top: 28px; }
  .topbar { padding: 14px 18px; padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
  .logo__main { font-size: 24px; }
  .container { padding: 22px 16px calc(110px + var(--safe-bottom)); }
  .hide-mobile { display: none !important; }
  .fab { display: inline-flex; }
  .page-head__actions { width: 100%; }
  .page-head__actions .btn { flex: 1; }
  .page-head { margin-bottom: 20px; }
  .patient-list { grid-template-columns: 1fr; gap: 10px; }
  .patient-card { padding: 14px 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .fieldset, .sheet__section { padding: 20px 16px; }
  .treatment-card { padding: 18px 16px; }
  .timeline__item { padding-left: 26px; }
  .profile { gap: 16px; }
  .profile__actions { width: 100%; }
  .profile__actions .btn { flex: 1; }
  .uploader { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .form-actions__right { margin-left: 0; flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
  .lightbox__nav { display: none; }
  .tabs { gap: 22px; }
}
