/* =============================================================
   CARIATTA · Portal design system
   Auth · Patient app · shared components
   Brand: teal #6abcb4 · Nyala display · Raleway UI
   ============================================================= */

:root {
  --teal: #6abcb4;
  --teal-dark: #4a9e96;
  --teal-deep: #3b948f;
  --teal-light: #a8d8d4;
  --teal-wash: #eaf6f5;
  --teal-wash-2: #f2faf9;
  --charcoal: #2c2c2c;
  --mid: #6b7b79;
  --muted: #93a19f;
  --line: #e6ecea;
  --bg: #f4f7f6;
  --warm: #f9f6f2;
  --white: #fff;
  --card: #ffffff;
  --shadow-sm: 0 1px 3px rgba(44,60,58,.06), 0 1px 2px rgba(44,60,58,.04);
  --shadow: 0 6px 24px rgba(59,148,143,.10);
  --shadow-lg: 0 18px 50px rgba(44,60,58,.16);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --font-display: 'Nyala', 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Raleway', system-ui, sans-serif;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  /* group colors (overridden inline per group) */
}

* { box-sizing: border-box; }

.portal, .auth-body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.6;
}
.portal img, .auth-body img { max-width: 100%; display: block; }
.portal a { color: inherit; text-decoration: none; }
.portal button { font-family: inherit; }

/* =========================================================
   AUTH PAGES
   ========================================================= */
.auth-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #eef8f7 0%, #f7f2ec 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
}
.auth-shell { width: 100%; max-width: 1040px; }
.auth-card {
  display: grid; grid-template-columns: 1.05fr 1fr;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  min-height: 620px;
}
.auth-brand {
  background: linear-gradient(150deg, var(--teal-deep) 0%, #2c4d4a 100%);
  color: #fff; padding: 54px 46px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.auth-brand.alt { background: linear-gradient(150deg, var(--teal) 0%, var(--teal-deep) 100%); }
.auth-brand::after {
  content: ''; position: absolute; right: -120px; bottom: -120px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.14), transparent 70%);
}
.auth-logo { width: 132px; filter: brightness(0) invert(1); margin-bottom: 18px; }
.auth-tag { font-size: 10px; letter-spacing: 3px; text-transform: uppercase; opacity: .8; margin: 0 0 26px; }
.auth-brand h1 { font-family: var(--font-display); font-weight: 300; font-size: 2.4rem; line-height: 1.1; margin: 0 0 14px; }
.auth-sub { font-size: 14.5px; line-height: 1.7; opacity: .9; margin: 0 0 26px; max-width: 360px; }
.auth-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.auth-points li { font-size: 14px; display: flex; align-items: center; gap: 12px; opacity: .95; }
.auth-points i { width: 34px; height: 34px; display: grid; place-items: center; background: rgba(255,255,255,.14); border-radius: 10px; font-size: 14px; }
.auth-quote { font-family: var(--font-display); font-style: italic; font-size: 1.3rem; line-height: 1.5; border-left: 3px solid rgba(255,255,255,.5); padding-left: 18px; margin: 8px 0 0; opacity: .95; }

.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 46px 40px; }
.auth-form-inner { width: 100%; max-width: 340px; }
.auth-form-inner h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.9rem; margin: 0 0 22px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.fld { display: block; }
.fld > span { display: block; font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--mid); margin-bottom: 7px; }
.fld > span em { font-style: normal; color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 400; }
.fld-icon { position: relative; display: flex; align-items: center; }
.fld-icon > i { position: absolute; left: 15px; color: var(--teal-dark); font-size: 14px; pointer-events: none; }
.fld-icon input {
  width: 100%; padding: 13px 15px 13px 42px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fbfcfc; font-size: 15px; color: var(--charcoal);
  transition: border-color .2s, background .2s, box-shadow .2s; outline: none;
}
.fld-icon input:focus { border-color: var(--teal); background: #fff; box-shadow: 0 0 0 4px rgba(106,188,180,.14); }
.pw-toggle { position: absolute; right: 8px; background: none; border: none; color: var(--muted); cursor: pointer; padding: 8px; }

.fld-group-label { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--mid); margin: 0 0 -4px; }
.type-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.type-opt {
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 6px; text-align: center; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  transition: all .2s var(--ease); background: #fbfcfc;
}
.type-opt input { display: none; }
.type-opt i { font-size: 18px; color: var(--teal-dark); transition: transform .2s var(--spring); }
.type-opt span { font-size: 11.5px; font-weight: 600; color: var(--mid); line-height: 1.2; }
.type-opt.active { border-color: var(--teal); background: var(--teal-wash); box-shadow: 0 0 0 3px rgba(106,188,180,.12); }
.type-opt.active i { transform: scale(1.15); }
.type-opt.active span { color: var(--teal-deep); }

.fld-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--mid); cursor: pointer; line-height: 1.5; }
.fld-check input { margin-top: 3px; accent-color: var(--teal); width: 16px; height: 16px; }

.btn-portal {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border: none; border-radius: 40px; cursor: pointer;
  background: var(--teal); color: #fff; font-size: 13px; font-weight: 600;
  letter-spacing: .6px; transition: all .22s var(--ease); box-shadow: 0 6px 18px rgba(106,188,180,.32);
}
.btn-portal:hover { background: var(--teal-dark); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(106,188,180,.4); }
.btn-portal:active { transform: translateY(0); }
.btn-portal.full { width: 100%; }
.btn-portal.ghost { background: transparent; color: var(--teal-deep); box-shadow: none; border: 1.5px solid var(--teal-light); }
.btn-portal.ghost:hover { background: var(--teal-wash); }
.btn-portal.sm { padding: 9px 18px; font-size: 12px; }
.btn-portal.dark { background: var(--charcoal); box-shadow: none; }
.btn-portal[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

.auth-alert { background: #fdecea; color: #b23b32; border-radius: 12px; padding: 11px 14px; font-size: 13px; display: flex; gap: 9px; align-items: center; }
.auth-alt { text-align: center; font-size: 13.5px; color: var(--mid); margin: 20px 0 0; }
.auth-alt a { color: var(--teal-deep); font-weight: 600; }
.auth-demo { margin-top: 22px; border-top: 1px dashed var(--line); padding-top: 18px; text-align: center; }
.auth-demo > p { font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.demo-btns { display: flex; gap: 10px; }
.demo-btns button {
  flex: 1; border: 1.5px solid var(--line); background: #fbfcfc; border-radius: 10px;
  padding: 10px; font-size: 12.5px; font-weight: 600; color: var(--mid); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: all .2s;
}
.demo-btns button:hover { border-color: var(--teal); color: var(--teal-deep); background: var(--teal-wash); }
.auth-back { display: inline-flex; align-items: center; gap: 6px; margin-top: 22px; font-size: 12.5px; color: var(--muted); }
.auth-back:hover { color: var(--teal-deep); }

@media (max-width: 800px) {
  .auth-card { grid-template-columns: 1fr; min-height: 0; }
  .auth-brand { padding: 40px 32px; }
  .auth-brand h1 { font-size: 2rem; }
  .auth-points, .auth-quote { display: none; }
  .auth-sub { margin-bottom: 0; }
  .auth-form-wrap { padding: 34px 26px 40px; }
}

/* =========================================================
   PATIENT APP SHELL (mobile-first, app-like)
   ========================================================= */
.app-body { background: linear-gradient(160deg,#eef7f6,#f6f1ec); min-height: 100vh; }
.app-frame {
  max-width: 540px; margin: 0 auto; min-height: 100vh;
  background: var(--bg); position: relative;
  box-shadow: 0 0 60px rgba(44,60,58,.10);
  display: flex; flex-direction: column;
}
.app-topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 12px 18px; display: flex; align-items: center; gap: 12px;
}
.app-topbar .greet { flex: 1; min-width: 0; }
.app-topbar .greet small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .3px; }
.app-topbar .greet b { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; color: var(--charcoal); }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: 0 0 auto;
  background: var(--teal-wash); display: grid; place-items: center; color: var(--teal-deep);
  font-weight: 700; border: 2px solid #fff; box-shadow: var(--shadow-sm);
}
.avatar.sm { width: 34px; height: 34px; font-size: 13px; }
.avatar.lg { width: 72px; height: 72px; font-size: 24px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--teal-deep); cursor: pointer; position: relative;
  display: grid; place-items: center; font-size: 16px; transition: all .2s; flex: 0 0 auto;
}
.icon-btn:hover { background: var(--teal-wash); border-color: var(--teal-light); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: #e8607d; border: 2px solid #fff; }

.app-frame { overflow-x: hidden; }
.app-main { flex: 1; padding: 18px 18px 108px; min-width: 0; }
/* Flex children with inline flex:1 must be allowed to shrink to avoid overflow */
.app-main [style*="flex:1"], .card [style*="flex:1"] { min-width: 0; }
.app-view { animation: viewIn .35s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Bottom navigation */
.app-nav {
  position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%);
  width: min(508px, calc(100% - 28px)); z-index: 50;
  background: rgba(255,255,255,.96); backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: 24px;
  box-shadow: 0 12px 34px rgba(44,60,58,.16);
  display: flex; justify-content: space-around; padding: 8px 6px;
}
.app-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 2px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .2px;
  border-radius: 16px; transition: all .2s var(--ease); position: relative;
}
.app-nav a i { font-size: 18px; transition: transform .25s var(--spring); }
.app-nav a.active { color: var(--teal-deep); }
.app-nav a.active i { transform: translateY(-2px) scale(1.08); }
.app-nav a.active::before { content: ''; position: absolute; top: 2px; width: 30px; height: 30px; border-radius: 50%; background: var(--teal-wash); z-index: -1; }

/* =========================================================
   CARDS & COMMON COMPONENTS
   ========================================================= */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card + .card { margin-top: 14px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 2px 12px; }
.section-head:first-child { margin-top: 4px; }
.section-head h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; color: var(--charcoal); margin: 0; }
.section-head a { font-size: 12px; font-weight: 600; color: var(--teal-deep); display: inline-flex; align-items: center; gap: 5px; }
.eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--teal); margin: 0 0 4px; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 30px; font-size: 11.5px; font-weight: 600; background: var(--teal-wash); color: var(--teal-deep); }
.pill.gray { background: #f0f2f1; color: var(--mid); }
.pill.gold { background: #fbf1dc; color: #b6892e; }
.pill.warn { background: #fdecea; color: #b23b32; }
.pill.solid { background: var(--teal); color: #fff; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 30px; font-size: 12.5px; font-weight: 600; border: 1.5px solid var(--line); background: #fff; color: var(--mid); cursor: pointer; transition: all .18s; white-space: nowrap; }
.chip.active { border-color: var(--teal); background: var(--teal-wash); color: var(--teal-deep); }
.chip:hover { border-color: var(--teal-light); }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px; background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); text-align: center; transition: transform .2s var(--spring); }
.quick:hover { transform: translateY(-3px); }
.quick i { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--teal-wash); color: var(--teal-deep); font-size: 17px; }
.quick span { font-size: 10.5px; font-weight: 600; color: var(--mid); line-height: 1.2; }

/* stat tiles */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: #fff; border-radius: var(--radius-sm); padding: 14px 10px; text-align: center; box-shadow: var(--shadow-sm); }
.stat .v { font-family: var(--font-display); font-size: 1.7rem; font-weight: 500; color: var(--teal-deep); line-height: 1; }
.stat .v small { font-size: .7rem; color: var(--muted); }
.stat .l { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-top: 5px; }
.stat .delta { font-size: 11px; font-weight: 700; margin-top: 4px; }
.delta.down { color: #3aa76d; } .delta.up { color: #d9694f; }

/* notice / aviso banner */
.notice { display: flex; gap: 13px; align-items: flex-start; background: linear-gradient(120deg,#fff, var(--teal-wash-2)); border: 1px solid var(--teal-light); border-radius: var(--radius); padding: 14px 16px; }
.notice .ni { width: 40px; height: 40px; border-radius: 12px; background: var(--teal); color: #fff; display: grid; place-items: center; flex: 0 0 auto; font-size: 16px; }
.notice .nb { flex: 1; min-width: 0; }
.notice .nb b { display: block; font-size: 14px; color: var(--charcoal); }
.notice .nb p { margin: 2px 0 0; font-size: 12.5px; color: var(--mid); }
.notice .nb a { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--teal-deep); }

/* list rows */
.row-item { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.row-item:last-child { border-bottom: none; }
.row-item .ri-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--teal-wash); color: var(--teal-deep); display: grid; place-items: center; flex: 0 0 auto; font-size: 15px; }
.row-item .ri-b { flex: 1; min-width: 0; }
.row-item .ri-b b { font-size: 14px; font-weight: 600; display: block; }
.row-item .ri-b p { margin: 1px 0 0; font-size: 12.5px; color: var(--muted); }

/* loyalty card */
.loyalty {
  border-radius: var(--radius-lg); padding: 22px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--teal-deep), #2c4d4a);
  box-shadow: 0 14px 34px rgba(59,148,143,.34);
}
.loyalty::after { content: ''; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.16), transparent 70%); }
.loyalty .lc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.loyalty .lc-tier { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; opacity: .85; }
.loyalty .lc-pts { font-family: var(--font-display); font-size: 2.6rem; font-weight: 500; line-height: 1; margin-top: 2px; }
.loyalty .lc-pts small { font-size: .9rem; opacity: .8; }
.loyalty .lc-logo { width: 46px; opacity: .9; filter: brightness(0) invert(1); }
.loyalty .lc-bar { height: 7px; background: rgba(255,255,255,.2); border-radius: 10px; margin: 16px 0 7px; overflow: hidden; }
.loyalty .lc-bar > i { display: block; height: 100%; background: #fff; border-radius: 10px; }
.loyalty .lc-next { font-size: 11.5px; opacity: .85; }

/* progress bar chart */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 10px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .bar > i { width: 100%; max-width: 26px; background: linear-gradient(var(--teal-light), var(--teal)); border-radius: 7px 7px 0 0; transition: height .6s var(--ease); position: relative; }
.bars .bar.hl > i { background: linear-gradient(var(--teal), var(--teal-deep)); }
.bars .bar small { font-size: 9.5px; color: var(--muted); }
.bars .bar b { font-size: 10px; color: var(--mid); font-weight: 700; }

/* badges */
.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 10.5px; font-weight: 700; letter-spacing: .3px; }
.badge.teal { background: var(--teal-wash); color: var(--teal-deep); }
.badge.green { background: #e5f5ec; color: #2f955f; }
.badge.amber { background: #fbf1dc; color: #b6892e; }
.badge.red { background: #fdecea; color: #b23b32; }
.badge.gray { background: #f0f2f1; color: var(--mid); }

/* achievement medallions */
.ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ach { text-align: center; padding: 16px 8px; border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s var(--spring); }
.ach.locked { opacity: .5; filter: grayscale(.6); }
.ach:hover { transform: translateY(-3px); }
.ach .medal { width: 54px; height: 54px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; color: #fff; background: linear-gradient(135deg, var(--teal), var(--teal-deep)); box-shadow: 0 6px 14px rgba(59,148,143,.3); }
.ach.locked .medal { background: #cdd6d4; box-shadow: none; }
.ach b { font-size: 12px; display: block; line-height: 1.25; }
.ach small { font-size: 10px; color: var(--muted); }

/* empty state */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty i { font-size: 34px; color: var(--teal-light); margin-bottom: 12px; }
.empty p { font-size: 13.5px; margin: 0; }

/* skeleton */
.sk { background: linear-gradient(90deg,#eef1f0 25%,#f6f8f7 50%,#eef1f0 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }

/* toast */
.toast-wrap { position: fixed; bottom: 92px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; width: min(460px, calc(100% - 32px)); }
.toast { background: var(--charcoal); color: #fff; border-radius: 14px; padding: 12px 16px; font-size: 13.5px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; animation: toastIn .3s var(--spring); }
.toast.ok { background: #2f7d5b; } .toast.err { background: #b23b32; }
.toast i { font-size: 15px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* bottom sheet / modal */
.sheet-back { position: fixed; inset: 0; background: rgba(30,42,40,.5); backdrop-filter: blur(3px); z-index: 200; opacity: 0; transition: opacity .28s; }
.sheet-back.show { opacity: 1; }
.sheet {
  position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 100%);
  width: min(540px, 100%); max-height: 92vh; overflow-y: auto; z-index: 201;
  background: #fff; border-radius: 26px 26px 0 0; padding: 8px 20px 28px;
  transition: transform .34s var(--ease); box-shadow: var(--shadow-lg);
}
.sheet.show { transform: translate(-50%, 0); }
.sheet .grip { width: 42px; height: 5px; border-radius: 10px; background: #dce3e1; margin: 8px auto 14px; }
.sheet h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; margin: 0 0 4px; }
.sheet .sheet-sub { color: var(--muted); font-size: 13px; margin: 0 0 16px; }

/* in-app form fields */
.f-field { margin-bottom: 14px; }
.f-field > label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--mid); margin-bottom: 6px; }
.f-field input, .f-field select, .f-field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  font-family: inherit; font-size: 14.5px; background: #fbfcfc; color: var(--charcoal); outline: none; transition: all .2s;
}
.f-field input:focus, .f-field select:focus, .f-field textarea:focus { border-color: var(--teal); background: #fff; box-shadow: 0 0 0 4px rgba(106,188,180,.12); }
.f-field textarea { resize: vertical; min-height: 84px; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* scroll reveal for app cards */
.rise { opacity: 0; transform: translateY(14px); animation: rise .5s var(--ease) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* =========================================================
   MI DIETA
   ========================================================= */
.meal-card { transition: box-shadow .2s; }
.meal-card.done { background: linear-gradient(135deg, var(--teal-wash-2), #fff); }
.meal-done-btn { background: none; border: none; font-size: 24px; color: #cfdad8; cursor: pointer; transition: transform .2s var(--spring), color .2s; padding: 2px; }
.meal-done-btn.on { color: var(--teal); }
.meal-done-btn:active { transform: scale(.85); }
.food-target { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px dashed var(--line); }
.food-target:first-of-type { border-top: none; }
.ft-dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 13px; flex: 0 0 auto; }
.ft-b { flex: 1; min-width: 0; cursor: pointer; }
.ft-food { font-size: 14px; font-weight: 600; color: var(--charcoal); }
.ft-meta { font-size: 11.5px; color: var(--muted); }
.ft-swap { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--teal-deep); cursor: pointer; flex: 0 0 auto; transition: all .18s; }
.ft-swap:hover { background: var(--teal-wash); border-color: var(--teal-light); transform: rotate(180deg); }
.bitacora { margin-top: 10px; }
.meal-comment { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-family: inherit; font-size: 13px; background: #fbfcfc; resize: vertical; min-height: 42px; color: var(--charcoal); outline: none; transition: all .2s; }
.meal-comment:focus { border-color: var(--teal-light); background: #fff; }
.picker-list { max-height: 60vh; overflow-y: auto; margin: 0 -4px; }
.picker-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: none; background: none; padding: 12px 8px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 10px; transition: background .15s; }
.picker-row:hover { background: var(--teal-wash-2); }
.picker-row.sel { background: var(--teal-wash); }
.picker-row .pr-b { flex: 1; }
.picker-row .pr-b b { font-size: 14px; }
.picker-row .pr-meta { font-size: 11.5px; color: var(--muted); }
.picker-row > i { font-size: 20px; color: #cfdad8; }
.picker-row.sel > i { color: var(--teal); }

/* =========================================================
   PROGRESO
   ========================================================= */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-cell { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 3/4; background: #eef2f1; }
.photo-cell img { width: 100%; height: 100%; object-fit: cover; }
.photo-cell span { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; font-size: 10px; padding: 12px 6px 5px; text-align: center; }

/* =========================================================
   CATALOGO
   ========================================================= */
.promo-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; margin: 0 -2px; }
.promo-scroll::-webkit-scrollbar { display: none; }
.promo-card { flex: 0 0 78%; scroll-snap-align: start; background: linear-gradient(135deg, var(--teal-deep), #2c4d4a); color: #fff; border-radius: var(--radius); padding: 18px; position: relative; overflow: hidden; }
.promo-card::after { content: ''; position: absolute; right: -40px; top: -40px; width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%); }
.promo-badge { display: inline-block; background: #fff; color: var(--teal-deep); font-weight: 800; font-size: 12px; padding: 3px 12px; border-radius: 20px; margin-bottom: 10px; }
.promo-card b { display: block; font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; line-height: 1.2; }
.promo-card p { font-size: 12.5px; opacity: .9; margin: 6px 0 8px; }
.promo-card small { font-size: 11px; opacity: .75; }
.cat-grid { display: flex; flex-direction: column; gap: 10px; }
.cat-item { display: flex; align-items: center; gap: 13px; background: #fff; border-radius: var(--radius-sm); padding: 13px; box-shadow: var(--shadow-sm); }
.cat-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; flex: 0 0 auto; }
.cat-ic.teal { background: var(--teal-wash); color: var(--teal-deep); }
.cat-ic.amber { background: #fbf1dc; color: #b6892e; }
.cat-ic.green { background: #e5f5ec; color: #2f955f; }
.cat-ic.gray { background: #f0f2f1; color: var(--mid); }
.cat-b { flex: 1; min-width: 0; }
.cat-b b { font-size: 14px; }
.cat-b p { font-size: 12px; color: var(--muted); margin: 1px 0 5px; }
.cat-foot { display: flex; align-items: center; gap: 8px; }
.cat-foot .price { font-family: var(--font-display); font-size: 1.15rem; color: var(--teal-deep); font-weight: 600; }
.cat-cta { width: 38px; height: 38px; border-radius: 11px; background: var(--teal-wash); color: var(--teal-deep); display: grid; place-items: center; flex: 0 0 auto; transition: all .18s; }
.cat-cta:hover { background: var(--teal); color: #fff; }

/* =========================================================
   CHAT
   ========================================================= */
.chat-view { display: flex; flex-direction: column; height: calc(100vh - 180px); }
.chat-head { display: flex; align-items: center; gap: 11px; padding: 4px 2px 14px; border-bottom: 1px solid var(--line); }
.chat-body { flex: 1; overflow-y: auto; padding: 16px 2px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 80%; padding: 10px 14px; border-radius: 16px; font-size: 14px; position: relative; }
.bubble small { display: block; font-size: 9.5px; opacity: .6; margin-top: 3px; text-align: right; }
.bubble.me { align-self: flex-end; background: var(--teal); color: #fff; border-bottom-right-radius: 5px; }
.bubble.them { align-self: flex-start; background: #fff; color: var(--charcoal); box-shadow: var(--shadow-sm); border-bottom-left-radius: 5px; }
.chat-input { display: flex; gap: 8px; padding: 10px 2px 2px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; border: 1.5px solid var(--line); border-radius: 30px; padding: 11px 16px; font-family: inherit; font-size: 14px; outline: none; background: #fbfcfc; }
.chat-input input:focus { border-color: var(--teal-light); background: #fff; }

/* =========================================================
   BOOKING SLOTS
   ========================================================= */
.slot-grid { display: flex; flex-direction: column; gap: 12px; max-height: 40vh; overflow-y: auto; }
.slot-day small { font-size: 11px; color: var(--mid); font-weight: 600; text-transform: capitalize; }
.slot-times { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; }
.slot-btn { border: 1.5px solid var(--line); background: #fff; border-radius: 9px; padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--mid); cursor: pointer; transition: all .16s; }
.slot-btn:hover { border-color: var(--teal-light); }
.slot-btn.active { background: var(--teal); color: #fff; border-color: var(--teal); }

@keyframes pop { 0% { transform: scale(0); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }

/* =========================================================
   INTAKE WIZARD
   ========================================================= */
.wz-head { text-align: center; margin-bottom: 14px; }
.wz-progress { height: 6px; background: #e8edec; border-radius: 10px; overflow: hidden; margin: 12px 0 4px; }
.wz-progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal-light), var(--teal-deep)); border-radius: 10px; transition: width .4s var(--ease); }
.wz-step-label { font-size: 11px; color: var(--muted); letter-spacing: .5px; text-transform: uppercase; }
.wz-card { animation: viewIn .3s var(--ease) both; }
.wz-q { margin-bottom: 18px; }
.wz-q > label { display: block; font-size: 14px; font-weight: 600; color: var(--charcoal); margin-bottom: 10px; }
.wz-q .hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.opt-tile { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 10px; font-size: 13px; font-weight: 600; color: var(--mid); cursor: pointer; text-align: center; display: flex; align-items: center; justify-content: center; gap: 7px; transition: all .18s; background: #fbfcfc; user-select: none; }
.opt-tile i { color: var(--teal-dark); }
.opt-tile.on { border-color: var(--teal); background: var(--teal-wash); color: var(--teal-deep); box-shadow: 0 0 0 3px rgba(106,188,180,.1); }
.wz-nav { display: flex; gap: 10px; margin-top: 18px; }
.chk-list { display: flex; flex-direction: column; gap: 4px; }
.chk-item { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; transition: all .16s; background: #fbfcfc; }
.chk-item.on { border-color: var(--teal); background: var(--teal-wash); }
.chk-item .box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid #cfdad8; display: grid; place-items: center; color: #fff; flex: 0 0 auto; transition: all .16s; }
.chk-item.on .box { background: var(--teal); border-color: var(--teal); }
.chk-item span { font-size: 13.5px; font-weight: 500; }
.wz-input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; font-family: inherit; font-size: 15px; background: #fbfcfc; color: var(--charcoal); outline: none; transition: all .2s; }
.wz-input:focus { border-color: var(--teal); background: #fff; box-shadow: 0 0 0 4px rgba(106,188,180,.12); }
textarea.wz-input { resize: vertical; min-height: 90px; }
