/* app.css — dr.olho agendamento
   Estilos de componente e telas.
   Tokens de cor/tipo/espaço vêm de colors_and_type.css.
   ============================================================ */

/* ============================================================
   1. RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  min-height: 100%;
  min-height: 100dvh;
  background: var(--color-gray-050);
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img { max-width: 100%; }
input, button { font-size: 16px; }

/* ============================================================
   2. APP SHELL
   ============================================================ */
#app {
  position: relative;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  background: var(--color-white);
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

#app.screen-enter { animation: screenIn 240ms var(--ease-out) forwards; }

@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes pulse   { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes popIn   {
  from { transform: scale(.5); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ============================================================
   3. SCREEN BASE
   ============================================================ */
.screen {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: env(safe-area-inset-top, 0) var(--sp-4) env(safe-area-inset-bottom, var(--sp-6));
}

/* ============================================================
   4. UTILITIES
   ============================================================ */
.hidden { display: none !important; }
.mt-sm  { margin-top: var(--sp-2); }
.mt-md  { margin-top: var(--sp-4); }
.mt-lg  { margin-top: var(--sp-5); }
.link   { color: var(--primary); font-weight: 700; }

/* ============================================================
   5. INPUTS
   ============================================================ */
.input-group { position: relative; }

.input {
  width: 100%;
  padding: 20px var(--sp-4) 8px;
  background: var(--color-white);
  border: 2px solid var(--color-purple-200);
  border-radius: var(--r-md);
  color: var(--color-purple-700);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  transition: border-color var(--dur-base) var(--ease-out),
              box-shadow   var(--dur-base) var(--ease-out);
  outline: none;
  min-height: 56px;
}

.input:focus {
  border-color: var(--color-purple-700);
  box-shadow: var(--shadow-glow);
}

.input-label {
  position: absolute;
  top: 50%;
  left: var(--sp-4);
  transform: translateY(-50%);
  font-size: var(--fs-14);
  color: var(--fg-subtle);
  pointer-events: none;
  transition: all var(--dur-base) var(--ease-out);
}

.input:focus ~ .input-label,
.input:not(:placeholder-shown) ~ .input-label {
  top: 10px;
  transform: none;
  font-size: var(--fs-12);
  color: var(--color-purple-500);
}

/* CPF / Telefone toggle */
.input-toggle {
  display: flex;
  background: var(--color-gray-100);
  border-radius: var(--r-pill);
  padding: 3px;
  gap: 3px;
}

.toggle-btn {
  flex: 1;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-pill);
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--fg-muted);
  transition: background var(--dur-base) var(--ease-out),
              color     var(--dur-base) var(--ease-out);
  min-height: 40px;
}

.toggle-btn--active {
  background: var(--color-white);
  color: var(--color-purple-700);
  box-shadow: var(--shadow-xs);
}

/* ============================================================
   6. BUTTONS
   ============================================================ */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--fs-18);
  letter-spacing: -0.01em;
  transition: all var(--dur-base) var(--ease-out);
  min-height: 60px;
  cursor: pointer;
}

.btn--full { width: 100%; }

.btn--primary {
  background: var(--color-purple-700);
  color: var(--color-white);
}
.btn--primary:hover:not(:disabled) {
  background: var(--color-purple-800);
  box-shadow: var(--shadow-md);
}
.btn--primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--outline {
  border: 2px solid var(--color-gray-200);
  color: var(--color-purple-700);
  background: transparent;
}
.btn--outline:hover { border-color: var(--color-purple-200); }

.btn--ghost { color: var(--color-purple-700); background: transparent; }
.btn--ghost:hover { color: var(--color-purple-900); }

.btn--danger { color: var(--color-pink-500); }

.btn--sm {
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-14);
  min-height: 40px;
  border-radius: var(--r-pill);
}

.btn__spinner { animation: spin 1s linear infinite; display: inline-block; }

/* ============================================================
   7. IDENTIFY SCREEN
   ============================================================ */
.screen--identify {
  padding-top: var(--sp-8);
  gap: var(--sp-5);
}

.logo { height: 32px; }

.identify__hero {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.identify__title {
  font-family: var(--font-display);
  font-size: var(--fs-32);
  font-weight: 700;
  color: var(--color-purple-900);
  line-height: 1.15;
  margin: 0;
}

.identify__sub {
  font-size: var(--fs-16);
  color: var(--color-gray-600);
  line-height: 1.55;
  margin: 0;
}

.identify__form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.identify__lgpd {
  font-size: var(--fs-12);
  color: var(--fg-subtle);
  text-align: center;
  line-height: 1.55;
}

.identify__lgpd-link {
  color: var(--color-purple-700);
  text-decoration: underline;
}

/* ============================================================
   8. HOME SCREEN
   ============================================================ */
.screen--home { padding-top: var(--sp-7); }

.home__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
}

.home__greeting { flex: 1; }

.home__hello {
  font-size: var(--fs-24);
  font-weight: 700;
  color: var(--color-purple-900);
  letter-spacing: var(--tracking-tight);
}
.home__hello strong { color: var(--color-purple-700); }

.home__sub {
  font-size: var(--fs-16);
  color: var(--fg-muted);
  margin-top: var(--sp-1);
}

.home__logout {
  color: var(--fg-subtle);
  padding: var(--sp-2);
  border-radius: var(--r-sm);
  transition: color var(--dur-base);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}
.home__logout:hover { color: var(--color-purple-700); }

.home__menu { display: flex; flex-direction: column; gap: var(--sp-3); }

.menu-card {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: var(--color-white);
  border: 2px solid var(--color-gray-200);
  border-radius: var(--r-lg);
  text-align: left;
  transition: all var(--dur-base) var(--ease-out);
  min-height: 72px;
}
.menu-card:hover {
  border-color: var(--color-purple-200);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.menu-card:active { transform: translateY(0); }

.menu-card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--color-purple-050);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  color: var(--color-purple-700);
}

.menu-card__content { flex: 1; }
.menu-card__content h3 {
  font-size: var(--fs-16);
  font-weight: 700;
  color: var(--color-purple-900);
}
.menu-card__content p {
  font-size: var(--fs-14);
  color: var(--fg-muted);
  margin-top: 2px;
}

.menu-card__arrow {
  font-size: 1.25rem;
  color: var(--fg-subtle);
}

.home__footer {
  margin-top: auto;
  padding-top: var(--sp-6);
  text-align: center;
  font-size: var(--fs-14);
  color: var(--fg-subtle);
}

/* ============================================================
   9. TOPBAR (book / appointments)
   ============================================================ */
.book__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) 0 var(--sp-3);
}

.book__title {
  font-size: var(--fs-18);
  font-weight: 700;
  color: var(--color-purple-900);
  letter-spacing: -0.01em;
}

.back-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--color-purple-700);
  background: var(--color-gray-100);
  border-radius: 50%;
  transition: all var(--dur-base) var(--ease-out);
}
.back-btn:hover { background: var(--color-purple-050); }

/* ============================================================
   10. PROGRESS BAR (3 fases: especialidade → unidade → quando)
   ============================================================ */
.progress-bar {
  padding: var(--sp-3) 0 var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.progress-bar__phases {
  display: flex;
  gap: var(--sp-4);
}

.progress__phase {
  font-size: var(--fs-13);
  color: var(--color-gray-400);
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color var(--dur-base) var(--ease-out);
}

.progress__phase--active {
  color: var(--color-purple-700);
  font-weight: 700;
}

.progress__phase--done {
  color: var(--color-gray-400);
}

.progress-bar__track {
  height: 3px;
  background: var(--color-gray-100);
  border-radius: var(--r-pill);
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: var(--color-green-500);
  border-radius: var(--r-pill);
  transition: width 300ms var(--ease-out);
}

/* ============================================================
   11. BOOK MAIN / STEP CONTENT
   ============================================================ */
.book__main { flex: 1; overflow-y: auto; }

.step-content { padding-bottom: var(--sp-7); }

.step__heading {
  font-size: var(--fs-32);
  font-weight: 700;
  line-height: var(--lh-32);
  letter-spacing: var(--tracking-tight);
  color: var(--color-purple-900);
  margin-bottom: var(--sp-5);
}

.step__heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.step__heading-row .step__heading { margin-bottom: 0; }

.step__date {
  font-size: var(--fs-16);
  font-weight: 400;
  color: var(--fg-muted);
  margin-left: var(--sp-2);
}

/* ============================================================
   12. OPTION CARDS (especialidades — 2 colunas)
   ============================================================ */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

.option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-3);
  background: var(--color-white);
  border: 2px solid var(--color-gray-200);
  border-radius: var(--r-lg);
  text-align: center;
  transition: all var(--dur-base) var(--ease-out);
  min-height: 90px;
}
.option-card:hover {
  border-color: var(--color-purple-200);
  background: var(--color-purple-050);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.option-card:active { transform: translateY(0); }

.option-card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--color-purple-050);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-purple-700);
  font-size: 1.25rem;
}

.option-card__label {
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--color-purple-900);
  line-height: 1.3;
  text-transform: lowercase;
}

.option-card__price {
  font-size: var(--fs-12);
  color: var(--fg-subtle);
}

/* ============================================================
   13. OPTION ROWS (unidades, profissionais)
   ============================================================ */
.options-list { display: flex; flex-direction: column; gap: var(--sp-3); }

.option-row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: var(--color-white);
  border: 2px solid var(--color-gray-200);
  border-radius: var(--r-lg);
  text-align: left;
  transition: all var(--dur-base) var(--ease-out);
  min-height: 72px;
  cursor: pointer;
  width: 100%;
}
.option-row:hover {
  border-color: var(--color-purple-200);
  background: var(--color-purple-050);
}

.option-row--disabled {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: var(--color-white);
  border: 2px solid var(--color-gray-200);
  border-radius: var(--r-lg);
  min-height: 72px;
  opacity: 0.55;
  cursor: not-allowed;
}

.option-row__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-purple-050);
  border: 2px solid var(--color-purple-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--color-purple-700);
  flex-shrink: 0;
}

.option-row__info { flex: 1; min-width: 0; }
.option-row__info strong {
  display: block;
  font-size: var(--fs-16);
  font-weight: 700;
  color: var(--color-purple-900);
  line-height: 1.3;
}
.option-row__info span {
  font-size: var(--fs-14);
  color: var(--fg-muted);
}

.option-row__badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--color-green-100);
  color: var(--color-green-700);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}
.option-row__badge--empty {
  background: var(--color-gray-100);
  color: var(--fg-subtle);
}

.option-row__arrow {
  font-size: 1.2rem;
  color: var(--fg-subtle);
  flex-shrink: 0;
}

.choose-doctor-link {
  font-size: var(--fs-14);
  color: var(--color-purple-700);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  background: none;
  border: none;
  font-family: var(--font-sans);
}
.choose-doctor-link:hover { color: var(--color-purple-900); }

.unit-no-vacancy-note {
  font-size: var(--fs-14);
  color: var(--fg-subtle);
  text-align: center;
  margin-top: var(--sp-5);
  line-height: 1.55;
}
.unit-no-vacancy-link {
  color: var(--color-purple-700);
  font-weight: 700;
  text-decoration: underline;
}
.unit-no-vacancy-link:hover { text-decoration: none; }

.auto-doctor-note {
  font-size: var(--fs-12);
  color: var(--fg-subtle);
  text-align: center;
  margin-top: var(--sp-3);
}

/* ============================================================
   14. LOADING / EMPTY STATES
   ============================================================ */
.loading-text {
  color: var(--fg-subtle);
  font-size: var(--fs-16);
  text-align: center;
  padding: var(--sp-7) 0;
  animation: pulse 1.5s ease-in-out infinite;
}

.empty-text {
  color: var(--fg-subtle);
  font-size: var(--fs-16);
  text-align: center;
  padding: var(--sp-7) 0;
}

/* ============================================================
   15. CONFIRM STEP — resumo antes de confirmar (step 6 book.js)
   ============================================================ */
.confirm-card {
  background: var(--color-white);
  border: 2px solid var(--color-purple-200);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: var(--sp-4);
}

.confirm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--color-gray-100);
  gap: var(--sp-3);
}
.confirm-row:last-child { border-bottom: none; }

.confirm-row span {
  font-size: var(--fs-12);
  color: var(--fg-subtle);
  text-transform: lowercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.confirm-row strong {
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--color-purple-900);
  text-align: right;
  line-height: 1.3;
}

.confirm-row--highlight { background: var(--color-purple-050); }
.confirm-row--highlight strong {
  color: var(--color-purple-700);
  font-size: var(--fs-18);
}

.confirm-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--color-gray-100);
  color: var(--fg-subtle);
  margin-left: var(--sp-2);
  white-space: nowrap;
  vertical-align: middle;
}

/* ============================================================
   16. CONFIRM SUCCESS (tela pós-agendamento)
   ============================================================ */
.screen--confirm {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.confirm-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-6);
  width: 100%;
}

.confirm-success__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-green-500);
  color: var(--color-purple-900);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popIn 400ms cubic-bezier(.175,.885,.32,1.275) forwards;
}

.confirm-success__icon svg { display: block; }

.confirm-success__title {
  font-family: var(--font-display);
  font-size: var(--fs-32);
  font-weight: 700;
  line-height: var(--lh-32);
  letter-spacing: var(--tracking-tight);
  color: var(--color-purple-900);
}

.confirm-success__sub {
  font-size: var(--fs-16);
  color: var(--fg-muted);
  max-width: 280px;
  line-height: var(--lh-16);
}

.confirm-success__card {
  width: 100%;
  background: var(--color-white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  text-align: left;
}

.confirm-success__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-14);
}

.confirm-success__row:last-child { border-bottom: none; }

.confirm-success__row span {
  color: var(--fg-subtle);
  white-space: nowrap;
  flex-shrink: 0;
}

.confirm-success__row strong {
  color: var(--fg);
  font-weight: 700;
  text-align: right;
}

.confirm-success__actions { width: 100%; margin-top: var(--sp-3); }

/* ============================================================
   17. NEW PATIENT FORM
   ============================================================ */
.new-patient {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.new-patient__title {
  font-family: var(--font-display);
  font-size: var(--fs-28);
  font-weight: 700;
  color: var(--color-purple-900);
  line-height: 1.15;
}

.new-patient__sub {
  font-size: var(--fs-16);
  color: var(--fg-muted);
  margin-top: calc(var(--sp-4) * -0.5);
}

/* ============================================================
   18. APPOINTMENTS SCREEN
   ============================================================ */
.screen--appointments { padding-top: 0; }

.appts-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding-bottom: var(--sp-7);
}

/* ============================================================
   19. CONSULTA CARD
   ============================================================ */
.consulta-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--color-white);
  border: 2px solid var(--color-gray-200);
  border-radius: var(--r-lg);
  flex-wrap: wrap;
}

.card__date {
  width: 56px;
  background: var(--color-purple-700);
  border-radius: var(--r-sm);
  color: var(--color-white);
  text-align: center;
  padding: var(--sp-2) var(--sp-1);
  flex-shrink: 0;
}

.card__day {
  font-size: var(--fs-24);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1;
}

.card__month {
  font-size: 11px;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
  color: var(--color-green-500);
  font-family: var(--font-sans);
}

.card__info { flex: 1; min-width: 0; }

.card__especialidade {
  font-size: var(--fs-16);
  font-weight: 700;
  color: var(--color-purple-900);
  line-height: 1.2;
}

.card__profissional {
  font-size: var(--fs-14);
  color: var(--fg-muted);
  margin-top: 2px;
}

.card__unidade {
  font-size: var(--fs-12);
  color: var(--fg-subtle);
  margin-top: 2px;
}

.card__status {
  display: inline-block;
  margin-top: var(--sp-2);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.status--pending   { background: var(--color-purple-050); color: var(--color-purple-700); }
.status--confirmed { background: var(--color-green-100);  color: var(--color-green-700); }
.status--waiting   { background: var(--color-cyan-100);   color: #0c809e; }

.card__actions {
  width: 100%;
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--color-gray-100);
}

/* ============================================================
   20. CALENDAR — override de tokens (js gera as classes)
   ============================================================ */
.calendar {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
}

.cal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}

.cal__month {
  font-size: var(--fs-16);
  font-weight: 700;
  color: var(--color-purple-900);
  text-transform: lowercase;
}

.cal__nav {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.2rem;
  color: var(--color-purple-700);
  background: var(--color-gray-100);
  transition: background var(--dur-base) var(--ease-out);
  cursor: pointer;
}
.cal__nav:hover { background: var(--color-purple-050); }

.cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal__dow {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--fg-subtle);
  padding: var(--sp-2) 0;
  text-transform: lowercase;
  letter-spacing: 0.04em;
}

.cal__cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-14);
  border-radius: 50%;
  color: var(--color-gray-300);
  cursor: default;
}

.cal__cell--available {
  color: var(--color-purple-900);
  background: var(--color-purple-050);
  cursor: pointer;
  font-weight: 700;
  transition: background var(--dur-fast) var(--ease-out);
}
.cal__cell--available:hover {
  background: var(--color-green-300);
  color: var(--color-purple-900);
}

.cal__cell--selected {
  background: var(--color-green-500) !important;
  color: var(--color-purple-900) !important;
  font-weight: 700;
  box-shadow: 0 0 0 3px rgba(62, 250, 152, 0.25);
}

.cal__cell--disabled { opacity: 0.25; }

/* ============================================================
   21. SLOTS
   ============================================================ */
.slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
}

.slot {
  padding: var(--sp-3) 0;
  background: var(--color-white);
  border: 2px solid var(--color-gray-200);
  border-radius: var(--r-md);
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--color-purple-900);
  text-align: center;
  font-variant-numeric: tabular-nums;
  transition: all var(--dur-fast) var(--ease-out);
  cursor: pointer;
}
.slot:hover { border-color: var(--color-purple-200); }
.slot--selected {
  background: var(--color-purple-700);
  border-color: var(--color-purple-700);
  color: var(--color-white);
}

.slots__empty {
  color: var(--fg-subtle);
  font-size: var(--fs-14);
  text-align: center;
  padding: var(--sp-6) 0;
}

/* ============================================================
   22. TOAST
   ============================================================ */
#toast-container {
  position: fixed;
  bottom: max(env(safe-area-inset-bottom), 24px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  z-index: 9999;
  pointer-events: none;
  width: min(calc(100vw - 32px), 480px);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-pill);
  font-size: var(--fs-14);
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  transition: all 300ms var(--ease-out);
  width: 100%;
  pointer-events: auto;
}

.toast--show { opacity: 1; transform: translateY(0); }

.toast--success { background: var(--color-green-500); color: var(--color-purple-900); }
.toast--error   { background: var(--color-pink-500);  color: var(--color-white); }
.toast--info    { background: var(--color-white); color: var(--color-purple-900); border: 1px solid var(--border); }

.toast__icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.toast__msg { flex: 1; }

/* ============================================================
   23. WELCOME SCREEN
   ============================================================ */

.screen--welcome {
  display: flex;
  flex-direction: column;
  padding-top: var(--sp-8);
  gap: var(--sp-6);
}

.welcome__lockup {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.welcome__lockup .logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.welcome__brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.wordmark {
  font-family: var(--font-display);
  font-size: var(--fs-28);
  font-weight: 700;
  color: var(--color-purple-700);
  letter-spacing: -0.5px;
}

.wordmark-suffix {
  font-family: var(--font-sans);
  font-size: var(--fs-13);
  color: var(--color-gray-500);
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.welcome__hero { display: flex; flex-direction: column; gap: var(--sp-2); }

.welcome__title {
  font-family: var(--font-display);
  font-size: var(--fs-32);
  font-weight: 700;
  color: var(--color-purple-900);
  line-height: 1.15;
  margin: 0;
}

.welcome__lead {
  font-size: var(--fs-16);
  color: var(--color-gray-600);
  line-height: 1.55;
  margin: 0;
}

.menu-card__icon--purple {
  background: var(--color-purple-700);
  color: var(--color-white);
}

.menu-card__icon--mint {
  background: var(--color-green-500);
  color: var(--color-purple-900);
}

.welcome__spacer { flex: 1; }

.welcome__whatsapp {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: var(--color-green-050, #f0fdf4);
  border-radius: var(--r-lg);
  color: var(--color-green-700, #15803d);
  font-size: var(--fs-14);
  text-decoration: none;
  margin-bottom: var(--sp-2);
}

.welcome__whatsapp strong { color: var(--color-purple-700); }

/* ============================================================
   24. RESPONSIVE — desktop: app como card flutuante
   ============================================================ */
@media (min-width: 520px) {
  body {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: var(--sp-6) var(--sp-4);
    background: var(--color-gray-050);
  }

  #app {
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    min-height: min(calc(100dvh - 64px), 820px);
    overflow: hidden;
  }

  .screen { padding-top: var(--sp-6); }
}

/* ============================================================
   25. MODAL BOTTOM-SHEET
   ============================================================ */
.modal-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  pointer-events: none;
}

.modal-overlay.modal--open { pointer-events: auto; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 6, 18, 0.55);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}

.modal--open .modal-backdrop { opacity: 1; }

.modal-sheet {
  position: relative;
  width: 100%;
  background: var(--color-white);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: var(--sp-3) var(--sp-5) calc(var(--sp-6) + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform var(--dur-slow) var(--ease-out);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal--open .modal-sheet { transform: translateY(0); }

.modal-handle {
  width: 40px;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--color-gray-300);
  margin-bottom: var(--sp-5);
}

.modal-title {
  font-family: var(--font-display);
  font-size: var(--fs-20);
  font-weight: 700;
  color: var(--color-purple-900);
  text-align: center;
  margin-bottom: var(--sp-2);
}

.modal-body {
  font-size: var(--fs-14);
  color: var(--fg-muted);
  text-align: center;
  line-height: var(--lh-16);
  margin-bottom: var(--sp-2);
}

.modal-actions { width: 100%; margin-top: var(--sp-4); }

.modal-btn--confirm {
  background: var(--color-pink-500);
  color: var(--color-white);
  border-radius: var(--r-pill);
  padding: var(--sp-3) var(--sp-5);
  font-weight: 700;
  font-size: var(--fs-16);
  transition: background var(--dur-fast) var(--ease-out);
}

.modal-btn--confirm:hover { background: #d95070; }
