/* Light premium design system (built from scratch) */
:root{
  --bg:#eef4fb;
  --surface:#ffffff;
  --surface2:#fbfcff;
  --stroke:rgba(2,47,101,.14);
  --text:#0a1223;
  --muted:rgba(10,18,35,.62);
  --brand1:#022f65; /* primária */
  --brand2:#1f6ed4; /* secundária */
  --brand3:#008e9d; /* secundária */
  --shadow: 0 28px 80px rgba(2,47,101,.18);
  --shadow2: 0 18px 52px rgba(2,47,101,.14);
  --radius: 18px;
}
*{box-sizing:border-box}
html{
  overflow-x: hidden;
  max-width: 100%;
}
html,body{height:100%}
body{
  overflow-x: hidden;
  max-width: 100%;
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 420px at 10% -10%, rgba(31,110,212,.16), transparent 56%),
    radial-gradient(900px 420px at 100% 0%, rgba(2,47,101,.12), transparent 56%),
    radial-gradient(900px 420px at 40% 120%, rgba(0,142,157,.10), transparent 60%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
}
.shell{width:min(100%, 1100px); margin:0 auto; padding: 18px 16px 42px; max-width: 100%; min-width: 0;}
/* Mast */
.mast{
  position: relative;
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
  background:
    radial-gradient(800px 260px at 0% 0%, rgba(31,110,212,.24), transparent 58%),
    radial-gradient(900px 260px at 100% 30%, rgba(2,47,101,.20), transparent 62%),
    radial-gradient(680px 240px at 40% 120%, rgba(0,142,157,.16), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.72));
  border: 1px solid rgba(2,47,101,.14);
  box-shadow: var(--shadow);
  padding: 24px 22px;
}
.mast-inner{position: relative; z-index: 2;}
.mast-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap: wrap;
}
.brand-logo{
  height: 66px;
  width:auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(2,47,101,.14));
}
.mast-badge{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(10,18,35,.10);
  background: rgba(255,255,255,.78);
  color: rgba(10,18,35,.80);
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
  margin-left: auto;
}
.mast-title{
  margin: 12px 0 6px;
  font-size: 34px;
  letter-spacing: -.04em;
  line-height: 1.04;
  font-weight: 950;
  color: var(--brand1);
  overflow-wrap: break-word;
  word-break: normal;
}
.mast-subtitle{
  margin: 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}
.mast-glow{
  position:absolute; inset:-40px -40px auto auto;
  width: 220px; height: 220px;
  background: radial-gradient(circle at 30% 30%, rgba(6,182,212,.28), transparent 60%);
  filter: blur(2px);
  opacity: .9;
}

.panel{
  margin-top: 14px;
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid rgba(2,47,101,.14);
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow2);
  padding: 18px;
  backdrop-filter: blur(10px);
  max-width: 100%;
  min-width: 0;
}

/* Progress */
.progress{display:grid; gap:10px; margin: 4px 0 14px;}
.progress-track{
  height: 10px;
  border-radius: 999px;
  background: rgba(10,18,35,.08);
  overflow:hidden;
  border: 1px solid rgba(10,18,35,.10);
}
.progress-fill{
  display:block;
  height:100%;
  width: 12%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand1), var(--brand2));
  box-shadow: 0 12px 28px rgba(79,125,255,.25);
  transition: width .25s ease;
}
.progress-steps{display:flex; justify-content:space-between; gap:8px;}
.progress-step{
  width: 30px; height: 30px;
  border-radius: 999px;
  display:grid; place-items:center;
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(10,18,35,.10);
  color: rgba(10,18,35,.62);
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
}
.progress-step:focus{ outline:none; }
.progress-step:focus-visible{
  outline: 3px solid rgba(31,110,212,.24);
  outline-offset: 2px;
}
.progress-step.is-active{
  background: linear-gradient(135deg, rgba(37,99,235,.16), rgba(6,182,212,.14));
  border-color: rgba(37,99,235,.22);
  color: rgba(10,18,35,.90);
}

.step{display:none;}
.step.is-active{display:block;}

.section-top{margin: 10px 2px 12px;}
.section-kicker{color: rgba(242,245,255,.70); font-weight: 900; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;}
.section-kicker{color: rgba(2,47,101,.66); font-weight: 900; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;}
.section-title{margin: 8px 0 6px; font-size: 28px; letter-spacing: -.03em; font-weight: 950;}
.section-title{color: var(--brand1);}
.section-desc{margin: 0; color: var(--muted); font-size: 16px; line-height: 1.45;}

.grid{display:grid; grid-template-columns: 1fr; gap: 10px; min-width: 0;}
.tile{
  width:100%;
  max-width: 100%;
  min-width: 0;
  border-radius: var(--radius);
  border: 1px solid rgba(10,18,35,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.74));
  box-shadow: 0 20px 56px rgba(2,47,101,.16);
  padding: 18px;
  color: var(--text);
  text-align:left;
  cursor:pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.tile:hover{
  transform: translateY(-1px);
  border-color: rgba(37,99,235,.18);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.80));
}
.tile-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  min-width: 0;
  flex-wrap: wrap;
}
.tile-title{
  font-weight: 950;
  letter-spacing: -.02em;
  font-size: 21px;
  line-height: 1.2;
  margin: 0;
  color: var(--brand1);
  flex: 1 1 12rem;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}
.tile-sub{margin: 10px 0 0; color: rgba(10,18,35,.68); font-size: 16px; line-height: 1.4;}
.chip{
  flex: none;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(2,47,101,.16);
  background: rgba(255,255,255,.78);
  color: rgba(10,18,35,.78);
  font-weight: 850;
  font-size: 13px;
}
.chip.good{background: rgba(6,182,212,.10); border-color: rgba(6,182,212,.22); color: rgba(10,18,35,.78);}
.chip.mini{padding: 6px 9px; font-size: 11px;}

.avatar{
  width: 112px; height: 112px;
  border-radius: 24px;
  border: 0;
  background: rgba(10,18,35,.02);
  object-fit: cover;
  flex:none;
  box-shadow: 0 16px 36px rgba(2,47,101,.16);
}
.avatar-btn{
  border:0;
  padding:0;
  background:transparent;
  cursor:pointer;
}
.avatar-btn:focus{ outline: none; }
.avatar-btn:focus-visible{
  outline: 3px solid rgba(31,110,212,.25);
  border-radius: 28px;
}
.avatar-zoom{
  width: min(420px, 78vw) !important;
  height: auto !important;
  border-radius: 28px !important;
  max-height: 70vh;
}
.modal-photo-only{
  justify-content:center;
}
.avatar-fallback{
  display:flex;
  align-items:center;
  justify-content:center;
  line-height: 1;
}
.doctor-icon{
  width: 84px;
  height: 84px;
}
.person{display:flex; align-items:center; gap: 12px;}
.person-meta{min-width:0;}
.person-name{font-weight:950; letter-spacing:-.02em; margin:0; font-size: 15px;}
.person-name{font-weight:950; letter-spacing:-.02em; margin:0; font-size: 22px;}
.person-name{color: var(--brand1);}
.person-sub{margin: 6px 0 0; color: rgba(10,18,35,.62); font-size: 15px; line-height: 1.4;}
.person-sub-meta{
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}
.person-sub-conselho{
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  max-width: 100%;
}
.person-sub-conselho-token{
  display: inline-block;
  white-space: nowrap;
}
.person-sub-conselho-sep{
  display: inline-block;
  opacity: .7;
  white-space: nowrap;
}
.person-sub-conselho-wrap{
  margin-top: 4px;
  overflow: hidden;
}
.slot-preview{
  margin-top: 12px;
  display:grid;
  gap:8px;
}
.slot-day{
  display:grid;
  grid-template-columns: 110px 1fr;
  gap:8px;
  align-items:center;
}
.slot-day-date{
  font-size:14px;
  font-weight:800;
  color: rgba(10,18,35,.70);
}
.slot-day-times{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.slot-chip{
  padding:6px 8px;
  border-radius:999px;
  border:1px solid rgba(10,18,35,.10);
  background: rgba(31,110,212,.10);
  color: rgba(10,18,35,.86);
  font-size:13px;
  font-weight:800;
}
.slot-chip.slot-btn{
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.slot-chip.slot-btn:hover{
  background: rgba(31,110,212,.16);
  border-color: rgba(31,110,212,.26);
  box-shadow: 0 10px 20px rgba(2,47,101,.12);
  transform: translateY(-1px);
}
.slot-chip.slot-btn:active{
  transform: translateY(0px) scale(.98);
}
.slot-chip.slot-btn:focus{ outline:none; }
.slot-chip.slot-btn:focus-visible{
  outline: 3px solid rgba(31,110,212,.24);
  outline-offset: 2px;
}
.slot-chip.muted{
  background: rgba(10,18,35,.04);
  color: rgba(10,18,35,.55);
}
.tile-actions{
  margin-top: 12px;
}
.cta-whatsapp{
  display: inline-flex;
  width: auto;
  min-width: 220px;
  justify-content: center;
  align-items: center;
  margin: 4px auto 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 900;
  text-decoration: none;
}
.cta-ghost{
  width: 100%;
  border: 1px solid rgba(10,18,35,.12);
  background: rgba(255,255,255,.80);
  color: rgba(10,18,35,.90);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 850;
  cursor: pointer;
}
.cta-ghost:hover{
  background: rgba(37,99,235,.08);
}
.btn-indisponivel{
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 11px 12px;
  background: var(--brand1);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.35;
  cursor: not-allowed;
  opacity: .96;
}
.btn-indisponivel-main{
  display: inline;
}
.btn-indisponivel-next{
  display: inline-block;
  white-space: nowrap;
}

.agenda{display:grid; gap: 10px;}
.more{margin-top:12px;}
.hidden{display:none !important;}
.more-status{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 12px;
  border: 1px solid rgba(10,18,35,.10);
  background: rgba(255,255,255,.72);
}
.mini-spinner{
  width: 18.21px;
  height: 18.21px;
  border: 2.6px solid rgba(10,18,35,.16);
  border-top-color: var(--brand2);
  border-radius: 999px;
  animation: spin .8s linear infinite;
  flex: none;
}
.horarios-prof{
  border-radius: var(--radius);
  border: 1px solid rgba(10,18,35,.10);
  background: rgba(255,255,255,.78);
  padding: 12px;
  margin-bottom: 10px;
}
.person-share{
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.person-main{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.doctor-info-grid{
  margin-top: 10px;
  display: grid;
  gap: 8px;
}
.doctor-info-card{
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  align-items: flex-start;
  border: 1px solid rgba(2,47,101,.12);
  background: linear-gradient(180deg, rgba(31,110,212,.06), rgba(255,255,255,.72));
  border-radius: 12px;
  padding: 9px 10px;
}
.doctor-info-icon{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--brand1);
  background: rgba(31,110,212,.12);
  border: 1px solid rgba(31,110,212,.2);
}
.doctor-info-icon svg{
  width: 18px;
  height: 18px;
}
.doctor-info-icon--treatment{
  background: rgba(14,165,233,.14);
  border-color: rgba(14,165,233,.25);
}
.doctor-info-icon--done{
  background: rgba(16,185,129,.15);
  border-color: rgba(16,185,129,.28);
}
.doctor-info-icon--forward{
  background: rgba(245,158,11,.16);
  border-color: rgba(245,158,11,.3);
}
.doctor-info-body{
  min-width: 0;
}
.doctor-info-title{
  margin: 0;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: rgba(2,47,101,.72);
}
.doctor-info-text{
  margin: 3px 0 0;
  font-size: 14px;
  line-height: 1.35;
  color: rgba(10,18,35,.72);
}
.share-btn{
  border: 1px solid rgba(10,18,35,.12);
  background: rgba(255,255,255,.86);
  color: rgba(10,18,35,.62);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.share-btn svg{
  width: 16px;
  height: 16px;
}
.share-btn:hover{
  background: rgba(37,99,235,.08);
}
.day{
  border-radius: var(--radius);
  border: 1px solid rgba(10,18,35,.10);
  background: rgba(255,255,255,.78);
  padding: 14px;
}
.day-head{display:flex; align-items:flex-start; justify-content:space-between; gap: 12px;}
.day-head-left{display:flex; align-items:center; gap: 10px; flex-wrap:wrap;}
.day-title{margin:0; font-weight: 950; letter-spacing:-.02em; font-size: 14px;}
.day-title{margin:0; font-weight: 950; letter-spacing:-.02em; font-size: 20px;}
.day-title{color: var(--brand1);}
.chip.weekday{
  background: rgba(31,110,212,.10);
  border-color: rgba(31,110,212,.22);
  color: rgba(2,47,101,.92);
}
.times{display:flex; flex-wrap:wrap; gap: 8px; margin-top: 12px;}
.time{
  border-radius: 12px;
  border: 1px solid rgba(10,18,35,.10);
  background: rgba(31,110,212,.10);
  color: rgba(10,18,35,.92);
  padding: 10px 12px;
  font-weight: 900;
  font-size: 16px;
  cursor:pointer;
  transition: transform .14s ease, background .14s ease, border-color .14s ease;
}
.time:hover{transform: translateY(-1px); background: rgba(31,110,212,.16); border-color: rgba(31,110,212,.28);}

.form{display:grid; gap: 10px;}
.fields{display:grid; grid-template-columns: 1fr; gap: 10px;}
.input{
  display:grid;
  gap: 6px;
  padding: 12px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(10,18,35,.10);
  background: rgba(255,255,255,.78);
}
.input span{font-size: 12px; color: rgba(10,18,35,.62); font-weight: 850;}
.input span{font-size: 14px; color: rgba(10,18,35,.64); font-weight: 850;}
.input input:not([type="radio"]):not([type="checkbox"]), .input select{
  width:100%;
  padding: 13px 12px;
  border-radius: 14px;
  border: 1px solid rgba(10,18,35,.10);
  background: rgba(10,18,35,.03);
  color: rgba(10,18,35,.92);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  outline:none;
}
.native-hidden-select{
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.sex-picker-btn{
  width:100%;
  padding: 13px 12px;
  border-radius: 14px;
  border: 1px solid rgba(10,18,35,.10);
  background: rgba(10,18,35,.03);
  color: rgba(10,18,35,.78);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
}
.sex-picker-btn.is-selected{
  color: rgba(10,18,35,.92);
}
body.is-totem .sex-picker-btn{
  width: auto;
  min-width: min(100%, 260px);
  max-width: 100%;
  align-self: start;
}
.form-actions{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.cta.ghost.danger{
  border-color: rgba(185,28,28,.28);
  color: #991b1b;
  background: rgba(254,242,242,.9);
}
.cta.ghost.danger:hover{
  background: rgba(254,226,226,.95);
}
.input input::placeholder{color: rgba(10,18,35,.45);}

.cta{
  width:100%;
  border:0;
  padding: 13px 14px;
  border-radius: calc(var(--radius) + 2px);
  font-weight: 950;
  letter-spacing: -.01em;
  color:#ffffff;
  cursor:pointer;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  box-shadow: 0 24px 64px rgba(2,47,101,.28);
}
.cta.ghost{
  background: rgba(255,255,255,.72);
  color: rgba(10,18,35,.90);
  border: 1px solid rgba(10,18,35,.10);
  box-shadow: none;
  text-decoration: none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.hint{margin: 2px 2px 0; color: rgba(10,18,35,.58); font-size: 12px; line-height: 1.4;}

.fields-retorno{
  grid-template-columns: 1fr;
}
.retorno-options{
  display: flex;
  gap: 24px;
  margin-top: 8px;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}
.retorno-option{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  white-space: nowrap;
}
.retorno-option span{
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  color: rgba(10,18,35,.84);
}
.retorno-option input[type="radio"]{
  flex: none;
  margin: 0;
  width: 18px;
  height: 18px;
  transform: translateY(-1px);
  accent-color: #1f6ed4;
}

.back{
  border: 1px solid rgba(10,18,35,.10);
  background: rgba(255,255,255,.72);
  color: rgba(10,18,35,.90);
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 900;
  cursor:pointer;
}
.back:hover{background: rgba(37,99,235,.06);}

/* Overlay + Preloader */
.overlay{
  position:fixed; inset:0; z-index:60;
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display:grid;
  place-items:center;
  padding:15.61px;
}
.overlay.hidden{display:none;}
.overlay-card{
  display:flex; align-items:center; gap:10.4px;
  background: rgba(255,255,255,.86);
  border:1px solid rgba(10,18,35,.10);
  border-radius: calc(var(--radius) + 6px);
  padding: 15.61px 18.21px;
  box-shadow: var(--shadow2);
}
.overlay-card p{margin:0;}
#overlayText{
  color: rgba(10,18,35,.92);
  font-weight: 900;
  font-size: 18.21px;
}
/* Linha de tempo estimado: igual no overlay e no preloader */
.overlay-eta,
.preloader-eta{
  margin-top: 6px;
  font-size: 16.91px;
  line-height: 1.45;
  color: rgba(10,18,35,.55);
  font-weight: 500;
  font-family: inherit;
  letter-spacing: 0;
}

.page-preloader{
  position:fixed; inset:0; z-index:30;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display:grid; place-items:center; padding:15.61px;
}
.preloader-card{
  display:flex; align-items:center; gap:10.4px;
  box-sizing: border-box;
  background: rgba(255,255,255,.86);
  border:1px solid rgba(10,18,35,.10);
  border-radius: calc(var(--radius) + 6px);
  padding: 15.61px 24.2px;
  box-shadow: var(--shadow2);
}
.preloader-title{font-weight:950; letter-spacing:-.02em; color: rgba(10,18,35,.92); font-size: 18.21px;}
.preloader-subtitle{font-size:16.91px; color: rgba(10,18,35,.58); margin-top:3.47px;}
.spinner{
  width:28.61px; height:28.61px;
  border:3.47px solid rgba(10,18,35,.14);
  border-top-color: var(--brand2);
  border-radius:999px;
  animation: spin .8s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

@media (max-width: 759px){
  .mini-spinner{
    width: 15.48px;
    height: 15.48px;
    border-width: 2.21px;
  }
  .overlay{padding:13.27px;}
  .overlay-card{gap:8.84px; padding:13.27px 15.48px;}
  #overlayText{font-size:15.48px;}
  .overlay-eta,
  .preloader-eta{margin-top:5px; font-size:14.37px;}
  .page-preloader{padding:13.27px;}
  .preloader-card{gap:8.84px; padding:13.27px 19.8px;}
  .preloader-title{font-size:15.48px;}
  .preloader-subtitle{font-size:14.37px; margin-top:2.95px;}
  .spinner{
    width:24.32px;
    height:24.32px;
    border-width:2.95px;
  }
}

/* Toast (inline) */
.toast{
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 26;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px;
  border-radius: calc(var(--radius) + 6px);
  background: #ffffff;
  border: 1px solid rgba(10,18,35,.10);
  box-shadow: var(--shadow2);
}
.toast.hidden{ display:none; }
.toast-inner{ display:grid; gap:4px; }
.toast-title{ font-weight:900; letter-spacing:-.02em; }
.toast-title{ color: var(--brand1); }
.footer{
  margin-top: 18px;
  padding: 18px 0 6px;
}
.footer-inner{
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(2,47,101,.14);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow2);
  padding: 12px 14px;
  color: rgba(2,47,101,.78);
  font-weight: 650;
  line-height: 1.5;
  font-size: 12.5px;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

/* Modal */
.modal{
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display:grid;
  place-items:center;
  padding: 18px;
}
.modal.hidden{ display:none; }
.modal:not(.hidden) .modal-card{
  animation: modalCardIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes modalCardIn{
  from{
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to{
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.modal-card{
  width: min(560px, 92vw);
  background: #ffffff;
  border: 1px solid rgba(2,47,101,.14);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: var(--shadow);
  padding: 20px 20px 22px;
  position: relative;
}
.modal-close{
  position:absolute;
  right: 12px;
  top: 10px;
  border: 1px solid rgba(2,47,101,.14);
  background: #ffffff;
  color: var(--brand1);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 900;
  cursor:pointer;
  z-index: 2;
}
.modal-close:hover{ background: #eff6ff; }
.modal-h{
  font-size: 20px;
  font-weight: 950;
  letter-spacing: -.03em;
  color: var(--brand1);
  margin: 0 0 10px;
  padding-right: 0;
}
.confirm-booking-modal .modal-h{
  padding-right: 120px;
}

/* Camada de ociosidade sobre o modal atual (sem quebrar fluxo em andamento). */
.idle-overlay{
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(7, 18, 36, 0.22);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 18px;
}
.idle-overlay.hidden{ display:none; }
.idle-overlay-card{
  width: min(560px, 92vw);
  background: #ffffff;
  border: 1px solid rgba(2,47,101,.14);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: var(--shadow);
  padding: 28px 20px 22px;
}
.sex-modal{
  padding-top: 4px;
}
.sex-modal .modal-h{
  margin: 0 108px 18px 0;
  line-height: 1.25;
}
.sex-options{
  display:grid;
  gap: 14px;
  margin-top: 0;
}
.sex-option-btn{
  width:100%;
  border: 1px solid rgba(10,18,35,.10);
  background: #ffffff;
  color: rgba(10,18,35,.92);
  border-radius: 12px;
  padding: 14px 16px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.14s ease;
}
.sex-option-btn[data-sex="M"]{
  background: rgba(31,110,212,.10);
  border-color: rgba(31,110,212,.32);
  color: var(--brand1);
}
.sex-option-btn[data-sex="F"]{
  background: rgba(244,114,182,.12);
  border-color: rgba(219,39,119,.28);
  color: #9d174d;
}
.sex-option-btn[data-sex="M"]:hover{
  background: rgba(31,110,212,.16);
  border-color: rgba(31,110,212,.42);
}
.sex-option-btn[data-sex="F"]:hover{
  background: rgba(244,114,182,.2);
  border-color: rgba(219,39,119,.4);
}
.sex-option-btn:active{
  transform: scale(0.99);
}
.modal-p{
  margin: 0 0 10px;
  color: rgba(10,18,35,.66);
  font-size: 15px;
  line-height: 1.45;
}
.modal-prof-board{
  margin-top: -4px;
  margin-bottom: 0;
  font-size: 13px;
  color: rgba(10,18,35,.58);
}
.modal-row{ display:flex; gap:12px; align-items:center; }
.modal-row .avatar{ width: 140px; height:140px; border-radius: 28px; }
.modal-kv{ display:grid; gap: 6px; margin-top: 12px; }
.kv{
  display:flex;
  justify-content:space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(2,47,101,.14);
  background: #ffffff;
  font-size: 15px;
}
.kv strong{ color: var(--brand1); }
.kv-value strong{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.retorno-tag{
  margin-left: 2px;
}
.kv-horario strong{
  white-space: nowrap;
  font-size: 16px;
  letter-spacing: -.01em;
}
.note{
  margin-top: 10px;
  background: rgba(0,142,157,.10);
  border: 1px solid rgba(0,142,157,.20);
  color: rgba(2,47,101,.92);
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
}
.okmark{
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: radial-gradient(circle at 30% 30%, rgba(0,142,157,.28), rgba(31,110,212,.20));
  border: 1px solid rgba(2,47,101,.14);
  display:grid;
  place-items:center;
}
.okmark svg{ width: 26px; height:26px; }
.toast-message{ font-size:13px; color: rgba(10,18,35,.62); line-height:1.35; }
.toast-close{
  flex: none;
  border: 1px solid rgba(10,18,35,.10);
  background: #f1f5f9;
  color: rgba(10,18,35,.92);
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
}
.toast-close:hover{ background: #e2e8f0; }

@media (min-width: 760px){
  .mast-top{ flex-wrap: nowrap; }
  .brand-logo{ height: 86px; }
  .grid{grid-template-columns: repeat(2, 1fr);}
  .fields{grid-template-columns: repeat(2, 1fr);}
  .toast{ left:auto; right: 18px; bottom: 18px; width: min(560px, 92vw); }
  .mast{padding: 30px 30px;}
  body.is-totem .form-actions{
    grid-template-columns: 1fr 1fr;
  }
  body:not(.is-totem) .form-actions{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 759px){
  .brand-logo{ height: 52px; }
  .shell{ padding-left: 12px; padding-right: 12px; }
  .mast{
    padding: 20px 14px;
  }
  .panel{ padding: 14px 12px; }
  .mast-title{
    font-size: clamp(24px, 7.2vw, 34px);
  }
  .section-title{
    font-size: clamp(22px, 6.5vw, 28px);
    overflow-wrap: break-word;
  }
  .section-desc{ font-size: 15px; }
  .mast-subtitle{ font-size: 16px; }
  .tile{ padding: 14px 12px; }
  .tile-title{ font-size: clamp(17px, 5.2vw, 21px); }
  .progress-steps{ gap: 6px; }
  .progress-step{
    width: 28px;
    height: 28px;
    font-size: 11px;
  }
  .mast-badge{
    padding: 6px 9px;
    font-size: 11px;
  }
}

.done{
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid rgba(10,18,35,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.78));
  padding: 18px;
  box-shadow: var(--shadow2);
}
.done-mark{
  width: 44px; height: 44px;
  border-radius: 16px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  border: 1px solid rgba(22,163,74,.35);
  box-shadow: 0 16px 34px rgba(22,163,74,.28);
  display: grid;
  place-items: center;
}
.done-mark svg{
  width: 24px;
  height: 24px;
}
.done-title{margin: 12px 0 6px; font-weight: 950; letter-spacing: -.03em;}
.done-desc{margin: 0 0 14px; color: rgba(10,18,35,.62); line-height: 1.45;}
.done-actions{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 760px){
  .done-actions{
    grid-template-columns: 1fr 1fr;
  }
}

.day-availability-dot{
  display: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22,163,74,.56);
  border: 1px solid rgba(11,133,59,.62);
}

@keyframes pulse-availability{
  0%{ box-shadow: 0 0 0 0 rgba(22,163,74,.56); }
  70%{ box-shadow: 0 0 0 8px rgba(22,163,74,0); }
  100%{ box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}

@media (max-width: 759px){
  .person-sub{
    font-size: 13px;
    line-height: 1.35;
  }
  .person-sub-meta{
    overflow-wrap: break-word;
    word-break: normal;
  }
  .person-sub-conselho-wrap{
    margin-top: 2px;
  }
  .person-share{
    flex-direction: column;
    align-items: stretch;
  }
  .person-main{
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .person-main .avatar{
    width: 96px;
    height: 96px;
    border-radius: 18px;
    align-self: flex-start;
  }
  .person-meta{
    width: 100%;
  }
  .doctor-info-grid{
    gap: 7px;
  }
  .doctor-info-card{
    grid-template-columns: 30px 1fr;
    gap: 7px;
    padding: 8px 9px;
  }
  .doctor-info-icon{
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }
  .doctor-info-icon svg{
    width: 16px;
    height: 16px;
  }
  .doctor-info-title{
    font-size: 11px;
  }
  .doctor-info-text{
    font-size: 13px;
    line-height: 1.32;
  }
  .share-btn{
    width: 100%;
    justify-content: center;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 600;
    color: rgba(10,18,35,.62);
    padding: 8px 12px;
    gap: 6px;
  }
  .share-btn svg{
    width: 15px;
    height: 15px;
  }
  .retorno-options{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
  }
  .retorno-option{
    min-width: 0;
    width: 100%;
    justify-content: center;
    padding: 4px 0;
    gap: 10px;
  }
  .retorno-option input[type="radio"]{
    width: 22px;
    height: 22px;
  }
  .retorno-option span{
    font-size: 14px;
    line-height: 1.2;
  }
  .footer-inner{
    font-size: 11px;
    line-height: 1.42;
  }
  .day-head{
    align-items: center;
  }
  .day-head-left{
    flex: 1;
    min-width: 0;
    gap: 8px;
  }
  .day-availability-label{
    display: none;
  }
  .day-availability-dot{
    display: inline-block;
    animation: pulse-availability 1.8s infinite;
  }
  .modal-card{
    width: min(560px, 94vw);
    padding: 24px 14px 16px;
  }
  .modal-close{
    top: 12px;
    right: 12px;
    padding: 9px 11px;
    border-radius: 11px;
  }
  .sex-modal .modal-h{
    margin-right: 96px;
    margin-bottom: 16px;
  }
  .modal-h{
    font-size: 18px;
  }
  .confirm-booking-modal .modal-h{
    padding-right: 92px;
  }
  .modal-p{
    font-size: 13.5px;
    line-height: 1.36;
  }
  .modal-prof-board{
    font-size: 12px;
  }
  .modal-row{
    align-items: center;
    gap: 10px;
  }
  .modal-row .avatar{
    width: 110px;
    height: 110px;
    border-radius: 20px;
  }
  .modal-kv{
    gap: 8px;
  }
  .kv{
    padding: 9px 10px;
    font-size: 14px;
    gap: 8px;
  }
  .kv span{
    font-size: 13px;
  }
  .kv strong{
    font-size: 14px;
  }
  .kv-horario strong{
    white-space: nowrap;
    font-size: 14px;
  }
  .kv-horario{
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
  }
  .kv-value strong{
    gap: 8px;
  }
  .retorno-tag{
    padding: 5px 8px;
    font-size: 10.5px;
  }
  .note{
    font-size: 12.5px;
    line-height: 1.36;
    padding: 9px 10px;
  }
  .view-more{
    font-size: 14px;
    font-weight: 850;
    padding: 12px 14px;
  }
}

/* Totem: “Seus dados” + camadas fixas — só aqui (agendamento normal permanece grid simples). */
body.is-totem{
  overflow-x: hidden;
  background-image: none;
  background-attachment: scroll;
}
html:has(body.is-totem){
  overflow-x: hidden;
}
body.is-totem,
body.is-totem *{
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
body.is-totem input,
body.is-totem textarea,
body.is-totem select{
  -webkit-user-select: text;
  user-select: text;
}
body.is-totem a,
body.is-totem img{
  -webkit-user-drag: none;
}
body.is-totem .shell,
body.is-totem .panel,
body.is-totem .step,
body.is-totem .agenda{
  touch-action: pan-y;
  overscroll-behavior: contain;
}
body.is-totem .page-preloader{
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
}
body.is-totem .overlay{
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  padding: 15.61px;
}
body.is-totem .overlay-card{
  flex: 0 1 auto;
  max-width: min(100%, calc(100vw - 32px));
  max-height: min(90vh, calc(100dvh - 32px));
  margin-top: auto;
  margin-bottom: auto;
  overflow: auto;
}
body.is-totem .modal{
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
body.is-totem .modal-card{
  flex: 0 1 auto;
  width: min(560px, min(92vw, 100% - 32px));
  max-width: 100%;
  max-height: min(90dvh, calc(100dvh - 48px));
  margin-top: auto;
  margin-bottom: auto;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
body.is-totem .shell{
  width: 100%;
  max-width: 100%;
  padding-left: 12px;
  padding-right: 12px;
  overflow-x: hidden;
  box-sizing: border-box;
}
body.is-totem .panel{
  overflow-x: hidden;
  min-width: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.is-totem .fields{
  grid-template-columns: 1fr;
}
body.is-totem .form,
body.is-totem .input{
  min-width: 0;
}
body.is-totem .input input,
body.is-totem .input select{
  max-width: 100%;
}
body.is-totem .retorno-option{
  white-space: normal;
}
body.is-totem .retorno-options{
  gap: 12px 20px;
}
body.is-totem .person-sub{
  font-size: 13px;
  line-height: 1.35;
}
body.is-totem .person-sub-meta{
  overflow-wrap: break-word;
  word-break: normal;
}
body.is-totem .person-sub-conselho-wrap{
  margin-top: 2px;
}
body.is-totem .cta{
  box-shadow: none;
}
body.is-totem .mast,
body.is-totem .tile,
body.is-totem .overlay-card,
body.is-totem .modal-card{
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.is-totem .mast-glow{
  display: none;
}
body.is-totem .day-availability-dot{
  animation: none !important;
}
body.is-totem .tile,
body.is-totem .slot-chip.slot-btn,
body.is-totem .cta,
body.is-totem .totem-wizard-opt{
  transition: none !important;
}

/* Totem: assistente por etapas (campos do formulário ficam ocultos até concluir o fluxo). */
body.is-totem #dadosPacienteForm.totem-dados-wizard-mode .fields,
body.is-totem #dadosPacienteForm.totem-dados-wizard-mode .fields-retorno,
body.is-totem #dadosPacienteForm.totem-dados-wizard-mode .hint,
body.is-totem #dadosPacienteForm.totem-dados-wizard-mode .form-actions{
  display: none !important;
}
.totem-wizard-modal{
  padding-top: 2px;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.totem-wizard-modal .modal-h{
  font-size: clamp(15px, 2.8vw, 18px);
  line-height: 1.35;
  margin-bottom: 8px;
}
.totem-wizard-input{
  width: 100%;
  box-sizing: border-box;
  margin-top: 12px;
  font-size: clamp(18px, 3.6vw, 26px);
  padding: 18px 16px;
  border-radius: 14px;
  border: 2px solid rgba(2,47,101,.22);
  font-weight: 650;
  color: rgba(10,18,35,.95);
}
.totem-wizard-input::placeholder{
  color: rgba(10,18,35,.38);
  font-weight: 600;
}
.totem-wizard-input:focus{
  outline: none;
  border-color: rgba(31,110,212,.55);
  box-shadow: 0 0 0 4px rgba(31,110,212,.12);
}
.totem-wizard-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  align-items: stretch;
  padding-top: 8px;
}
.totem-wizard-actions .cta{
  flex: 1 1 140px;
  min-height: 47px;
  font-size: clamp(14px, 2.7vw, 17px);
}
.totem-wizard-choices{
  display: grid;
  gap: 14px;
  margin-top: 10px;
}
.totem-wizard-opt{
  width: 100%;
  border: 2px solid rgba(10,18,35,.12);
  background: #fff;
  border-radius: 14px;
  padding: 18px 16px;
  font-weight: 880;
  font-size: clamp(16px, 3.2vw, 20px);
  cursor: pointer;
  text-align: center;
  color: rgba(10,18,35,.92);
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}
.totem-wizard-opt:active{
  transform: scale(0.99);
}
.totem-wizard-opt--yes{
  border-color: rgba(31,110,212,.38);
  background: rgba(31,110,212,.1);
  color: var(--brand1);
}
.totem-wizard-opt--no{
  border-color: rgba(10,18,35,.16);
  background: rgba(10,18,35,.04);
}

.totem-wizard-topbar{
  position: relative;
  display: flex;
  justify-content: flex-end;
  margin: 0 0 8px 0;
}
.totem-wizard-fechar{
  border: 1px solid rgba(2,47,101,.2);
  background: rgba(255,255,255,.94);
  color: rgba(10,18,35,.76);
  font-weight: 700;
  font-size: clamp(24px, 3.4vw, 28px);
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
  box-shadow: 0 10px 28px rgba(2,47,101,.12);
}
.totem-wizard-fechar:hover{
  background: #eff6ff;
  border-color: rgba(2,47,101,.28);
}

/* Totem: o assistente ocupa mais a tela, sem “cara de outra janela”. */
body.is-totem .modal-card:has(.totem-wizard-modal){
  width: min(740px, min(96vw, 100% - 24px));
  padding: 34px 22px 20px;
}

/* No totem, aumenta a modal de sucesso em ~20% */
body.is-totem .modal-card:has(.totem-success-modal){
  width: min(672px, min(96vw, 100% - 24px));
  padding: 30px 24px 24px;
}

.totem-quit-confirm-modal .totem-quit-msg{
  font-size: clamp(15px, 3vw, 17px);
  color: rgba(10,18,35,.74);
}
.totem-quit-confirm-modal{
  min-height: min(280px, 42dvh);
  padding-bottom: 2px;
  justify-content: space-between;
}
.totem-quit-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}
.totem-quit-actions .cta{
  flex: 1 1 140px;
  min-height: 47px;
}
