:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #173f46;
  background: #fbf7ef;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { min-height: 100%; margin: 0; background: #fbf7ef; }

body {
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
}

.brand { width: min(100%, 42rem); margin: 0 auto 1rem; display: flex; align-items: center; gap: .7rem; font-weight: 800; }
.brand img { width: 2.75rem; height: 2.75rem; border-radius: .85rem; }
.access-message { width: min(100%, 42rem); min-height: 1.25rem; margin: 0 auto .5rem; color: #7d3030; }
.access-message:empty { display: none; }
.access-panel p { line-height: 1.55; }
.access-panel form { display: grid; gap: .8rem; margin-top: 1.25rem; }
.access-panel input:not([type="checkbox"]) { width: 100%; min-height: 48px; padding: .75rem; border: 1px solid #b9cbc5; border-radius: .8rem; font: inherit; }
.access-panel button { border: 0; border-radius: 999px; padding: .8rem 1.2rem; background: #176d73; color: white; font: inherit; font-weight: 800; cursor: pointer; }
.access-panel button:disabled { cursor: wait; opacity: .65; }
.password-rules { margin: .75rem 0 0; padding: .75rem .9rem; border-radius: .85rem; background: #fff8e7; color: #4f5d58; font-size: .92rem; }
.password-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: stretch; }
.access-panel .password-control .password-toggle { min-width: 6.25rem; padding: .65rem .85rem; border: 1px solid #b9cbc5; border-radius: .8rem; background: #eef7f4; color: #176d73; }
.access-links { display: grid; gap: .55rem; margin-top: 1rem; }
.access-links button, .access-panel .back-to-login { background: transparent; color: #176d73; border: 1px solid #b9cbc5; }
.check-row { display: flex; align-items: start; gap: .65rem; line-height: 1.4; }
.check-row input { width: 1.25rem; height: 1.25rem; margin-top: .05rem; flex: 0 0 auto; }
.consent-body { padding: 1rem; border-radius: 1rem; background: #f8f3ea; max-height: min(52vh, 34rem); overflow: auto; }
.consent-body h2, .consent-body h3 { margin: 1rem 0 .45rem; font-size: 1rem; }
.consent-body p { margin: 0 0 .8rem; line-height: 1.55; }
.consent-body ul, .consent-body ol { margin: 0 0 .8rem; padding-left: 1.35rem; }
.consent-body li { margin: .35rem 0; line-height: 1.45; }
.consent-actions { display: grid; gap: .65rem; margin-top: .85rem; }
.consent-actions .ghost { background: #fff; color: #7a3131; border: 1px solid #c99595; }

button, a { min-height: 44px; }

:focus-visible {
  outline: 3px solid #3d2f65;
  outline-offset: 3px;
}

.sec48-synthetic-banner {
  max-width: 42rem;
  margin: 0 auto 1rem;
  padding: .75rem 1rem;
  border: 1px solid #d7c9b4;
  border-radius: 1rem;
  background: #fff7e8;
  color: #604d35;
  text-align: center;
  font-size: .875rem;
}

.app-shell { width: auto; margin: 0; }
.access-shell { width: min(100%, 70rem); margin: 0 auto; }
body.approved-demo-active > .brand,
body.approved-demo-active > .access-shell > #access-message,
body.approved-demo-active #connected-panel > :not(#approved-demo-shell) { display: none !important; }

.panel {
  padding: clamp(1rem, 4vw, 2rem);
  border: 1px solid #d9e4df;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 1rem 2.5rem rgba(44, 75, 73, .1);
}

.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.panel-head button { min-height: 44px; padding: .55rem .9rem; }
.eyebrow { display: block; margin-bottom: .35rem; color: #4f7c73; font-size: .78rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(1.7rem, 7vw, 2.5rem); line-height: 1.05; }
#connected-panel-status { margin: 1rem 0; color: #52666a; }
#connected-panel-status:empty { display: none; }
.connected-app { position: relative; padding-bottom: 6.5rem; overflow: hidden; }
.connected-header { margin-bottom: 1.25rem; }
.connected-welcome { margin: .45rem 0 0; color: #657275; }
.connected-view h2 { margin: .2rem 0 1rem; font-size: clamp(1.45rem, 5vw, 2rem); }
.home-primary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; margin-top: 1rem; }
.feature-card { min-width: 0; min-height: 9.5rem; display: grid; align-content: space-between; gap: .9rem; padding: 1rem; border: 1px solid #d7e2df; border-radius: 1.25rem; color: #173f46; font: inherit; text-align: left; cursor: pointer; }
.feature-card > span:last-child { display: grid; gap: .2rem; }
.feature-card strong { font-size: 1.1rem; }
.feature-card small { color: #647579; line-height: 1.3; }
.feature-icon { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 50%; background: rgba(255,255,255,.72); font-size: 1.25rem; }
.feature-card--blue { background: #eef7fb; border-color: #c8dde7; }
.feature-card--cream { background: #fff8e7; border-color: #ead9aa; }
.feature-card--pink { background: #fff2f5; border-color: #ebcfd8; }
.feature-card--green { background: #eef8f2; border-color: #c9e0d2; }
.featured-appointment { display: grid; gap: .65rem; padding: .8rem; border: 1px solid #c6dfd8; border-radius: 1.25rem; background: #edf8f4; }
.appointment-space-heading { margin: 0; font-size: 1rem; }
.appointment-space-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin-top: .7rem; }
.appointment-space-card { min-width: 0; display: grid; align-content: space-between; gap: .45rem; padding: .7rem; border: 1px solid #d4e4df; border-radius: .85rem; background: rgba(255, 255, 255, .78); }
.appointment-space-card > span { display: grid; gap: .2rem; min-width: 0; }
.appointment-space-card strong { font-size: .85rem; line-height: 1.2; }
.appointment-space-card small { color: #657275; font-size: .75rem; line-height: 1.25; }
.appointment-space-card b { color: #245c59; font-size: .82rem; overflow-wrap: anywhere; }
.connected-appointment-kicker { color: #58716d; font-size: .85rem; }
.connected-appointment-date { font-size: 1.2rem; }
.connected-appointment-professional { color: #657275; }
.inline-notice { padding: .8rem 1rem; border-radius: 1rem; background: #f8f3ea; color: #5e615d; line-height: 1.45; }
.view-back, .secondary-action { border: 1px solid #bfd3ce; border-radius: 999px; padding: .55rem .85rem; background: white; color: #245c59; font: inherit; font-weight: 750; cursor: pointer; }
.view-back { margin-bottom: 1.25rem; }
.data-origin { color: #657275; line-height: 1.5; }
.summary-panel { display: grid; gap: .7rem; margin-top: 1rem; }
.summary-panel:empty::before { content: "Todavía no hay información disponible."; display: block; padding: 1rem; border-radius: 1rem; background: #f8f5ee; color: #68767a; }
.summary-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; border: 1px solid #dbe6e2; border-radius: 1rem; background: #f8fbfa; }
.summary-row > span { display: grid; gap: .2rem; min-width: 0; }
.summary-row strong { color: #173f46; }
.summary-row small { color: #68767a; line-height: 1.35; }
.summary-row b { flex: 0 0 auto; color: #245c59; text-align: right; }
.goal-history-panel { margin-top: 1.25rem; padding-top: .25rem; }
.goal-history-panel h3 { margin-bottom: .25rem; }
.goal-history-panel [role="status"] { min-height: 1.4rem; color: #52666a; }
.goal-history-list { display: grid; gap: .6rem; padding: 0; list-style: none; }
.goal-history-list li { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .8rem; border: 1px solid #eadce0; border-radius: .9rem; background: #fff7f9; }
.goal-history-list li > span { display: grid; gap: .15rem; min-width: 0; }
.goal-history-list small { color: #68767a; }
.goal-history-list b { flex: 0 0 auto; color: #6c4e5b; }
.guidance-list { display: grid; gap: .65rem; padding-left: 1.35rem; line-height: 1.45; }
.guidance-list li { padding: .7rem .85rem; border-radius: .9rem; background: #f4f9f6; }
.strategy-form { display: grid; gap: .65rem; margin-top: 1.25rem; }
.strategy-form textarea { width: 100%; resize: vertical; border: 1px solid #bfd3ce; border-radius: .9rem; padding: .8rem; color: #173f46; background: white; font: inherit; }
.strategy-list { display: grid; gap: .55rem; padding: 0; list-style: none; }
.strategy-list li, .resource-card { padding: .9rem 1rem; border: 1px solid #dbe6e2; border-radius: 1rem; background: #fffaf0; line-height: 1.45; }
.resource-card p { margin: .35rem 0; }
.resource-card small, .privacy-note { color: #68767a; }
.file-panel { margin-top: 1.25rem; padding: 1rem; border: 1px solid #d8e4df; border-radius: 1rem; background: #f8fbfa; }
.file-panel form { display: grid; gap: .65rem; }
.file-panel input[type="file"] { width: 100%; padding: .65rem; border: 1px solid #bfd3ce; border-radius: .8rem; background: white; }
.file-panel [role="status"] { min-height: 1.4rem; color: #52666a; }
.file-list { display: grid; gap: .6rem; }
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem; border-radius: .85rem; background: white; }
.file-row > span { display: grid; gap: .15rem; min-width: 0; }
.file-row strong { overflow-wrap: anywhere; }
.file-row small { color: #68767a; }
.bottom-nav { position: absolute; inset-inline: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); padding: .45rem max(.5rem, env(safe-area-inset-right)) max(.45rem, env(safe-area-inset-bottom)); border-top: 1px solid #dce5e2; background: rgba(255,255,255,.97); box-shadow: 0 -.5rem 1.5rem rgba(44,75,73,.06); }
.bottom-nav button { display: grid; justify-items: center; align-content: center; gap: .15rem; min-height: 3.8rem; border: 0; border-radius: 1rem; background: transparent; color: #53686b; font: inherit; font-size: .82rem; font-weight: 750; cursor: pointer; }
.bottom-nav button span { font-size: 1.25rem; }
.bottom-nav button[aria-current="page"] { background: #e8f7f2; color: #176d73; }

.profile-administrative-card,
#home-featured-appointment,
#turnos-appointment-cards > * {
  display: grid;
  gap: .35rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #dbe6e2;
  border-radius: 1rem;
  background: #f5faf7;
}

.profile-administrative-card strong { font-size: 1.15rem; }
.profile-administrative-card[data-status="red"] { background: #fff1f1; border-color: #edc6c6; }
.profile-administrative-card[data-status="violet"] { background: #f7f0fa; border-color: #dac6e2; }
.home-points-icon { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; flex: 0 0 auto; border-radius: 50%; background: #f7e6ac; color: #8a6720; font-size: 1.2rem; }
.home-points-copy { display: grid; gap: .1rem; min-width: 0; }
.home-points-copy small { color: #667267; }
.home-points-copy strong { font-size: 1.25rem; }
.home-points-detail { margin-top: .75rem; padding: 1rem; border: 1px solid #e5dcc4; border-radius: 1rem; background: #fffdf7; }
.home-points-detail-head { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.home-points-detail h2 { margin: 0; font-size: 1.3rem; }
.home-points-detail-head button { min-height: 44px; border: 0; border-radius: 999px; padding: .45rem .8rem; background: #edf5f1; color: #285b57; font: inherit; font-weight: 750; cursor: pointer; }
.home-points-movements, .home-points-activities { margin: 1rem 0 0; padding: 0; list-style: none; }
.home-points-movements li, .home-points-activities li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-top: 1px solid #eee7d7; }
.home-points-movements li > span { display: grid; gap: .15rem; }
.home-points-movements small { color: #68767a; }
.home-points-movements b[data-tone="positive"], .home-points-activities strong { color: #26715c; }
.home-points-movements b[data-tone="negative"] { color: #9b4a50; }
.home-points-empty { margin: 1rem 0 0; color: #68767a; line-height: 1.45; }
.home-points-activities-block { margin-top: 1.25rem; padding-top: .25rem; }
.home-points-activities-block h3 { margin: 0; font-size: 1rem; }
.mi-camino-entry { width: 100%; margin-top: 1rem; border: 1px solid #dacb9b; border-radius: 1rem; padding: 1rem; background: #fff7dc; color: #44502d; font: inherit; font-weight: 800; cursor: pointer; }
.mi-camino-layer { position: fixed; z-index: 100; inset: 0; background: #fbf7ef; }
.mi-camino-layer iframe { width: 100%; height: 100%; border: 0; background: #fbf7ef; }

@media (max-width: 390px) {
  body { padding-inline: .75rem; }
  .panel { border-radius: 1.15rem; }
  .feature-card { min-height: 8.75rem; padding: .85rem; }
  .appointment-space-grid { grid-template-columns: 1fr; }
  .appointment-space-card { grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-height: 44px; }
}

@media (min-width: 760px) {
  .connected-app { min-height: 42rem; padding-left: 13rem; padding-bottom: 2rem; }
  .bottom-nav { top: 0; right: auto; bottom: 0; width: 11rem; grid-template-columns: 1fr; align-content: start; gap: .5rem; padding: 2rem .75rem; border-top: 0; border-right: 1px solid #dce5e2; box-shadow: .5rem 0 1.5rem rgba(44,75,73,.05); }
  .bottom-nav button { grid-template-columns: 1.6rem 1fr; justify-items: start; align-items: center; text-align: left; padding-inline: .8rem; }
  .home-primary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
