/* ============================================================
   Turnos + Admin — reutiliza tokens de styles.css
   ============================================================ */

.app-main { padding-top: clamp(96px, 12vh, 130px); padding-bottom: clamp(60px, 9vw, 110px); min-height: 70vh; }
.app-head { max-width: 720px; margin: 0 auto clamp(32px, 5vw, 52px); text-align: center; }
.app-head .kicker { justify-content: center; margin-bottom: 18px; }
.app-head p { margin-top: 16px; color: var(--muted); font-size: 1.05rem; }

.app-shell { max-width: 760px; margin-inline: auto; }

/* Pasos */
.steps { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 34px; flex-wrap: wrap; }
.step { display: inline-flex; align-items: center; gap: 9px; font-size: .82rem; color: var(--muted); }
.step b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--blush-100); color: var(--rose-500); font-family: var(--sans); font-weight: 600; font-size: .82rem; }
.step.is-active { color: var(--ink); }
.step.is-active b { background: var(--rose-500); color: #fff; }
.step.is-done b { background: var(--ink); color: #fff; }
.step__sep { width: 24px; height: 1px; background: var(--line); }

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(22px, 4vw, 38px);
  box-shadow: var(--sh);
}
.panel__title { font-size: 1.5rem; margin-bottom: 6px; }
.panel__sub { color: var(--muted); font-size: .95rem; margin-bottom: 24px; }

.back-link { background: none; border: none; color: var(--rose-600); font-size: .9rem; cursor: pointer; padding: 0; margin-bottom: 18px; display: inline-flex; gap: 6px; align-items: center; }
.back-link:hover { text-decoration: underline; }

/* Grillas de fechas / slots */
.chip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.chip {
  border: 1px solid var(--line);
  background: var(--blush-50);
  border-radius: var(--r);
  padding: 16px 18px;
  cursor: pointer;
  text-align: left;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
  font-family: inherit;
}
.chip:hover { transform: translateY(-3px); border-color: var(--rose-400); box-shadow: var(--sh-sm); background: #fff; }
.chip.is-selected { border-color: var(--rose-500); background: #fff; box-shadow: 0 0 0 3px rgba(217,166,179,.28); }
.chip__day { display: block; font-family: var(--serif); font-size: 1.25rem; color: var(--ink); line-height: 1.15; }
.chip__meta { display: block; font-size: .8rem; color: var(--muted); margin-top: 6px; }

.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; }
.slot {
  border: 1px solid var(--line);
  background: var(--blush-50);
  border-radius: var(--r-sm);
  padding: 13px 8px;
  text-align: center;
  font-weight: 500;
  cursor: pointer;
  transition: transform .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.slot:hover { transform: translateY(-2px); border-color: var(--rose-400); background: #fff; }
.slot.is-selected { background: var(--rose-500); border-color: var(--rose-500); color: #fff; }

/* Estados */
.state { text-align: center; padding: 40px 20px; color: var(--muted); }
.state svg { width: 40px; height: 40px; color: var(--rose-400); margin-bottom: 14px; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--blush-200); border-top-color: var(--rose-500); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

.alert { border-radius: var(--r-sm); padding: 13px 16px; font-size: .9rem; margin-bottom: 16px; }
.alert--error { background: #fdecef; color: #9b2c3f; border: 1px solid #f4c9d2; }
.alert--info { background: var(--blush-100); color: var(--ink-soft); border: 1px solid var(--blush-200); }

/* Formulario */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.summary-line {
  display: flex; align-items: center; gap: 12px;
  background: var(--blush-50); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px 20px; margin-bottom: 22px;
}
.summary-line svg { width: 22px; height: 22px; color: var(--rose-500); flex: none; }
.summary-line b { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); }
.summary-line span { color: var(--muted); font-size: .9rem; display: block; }

/* Confirmación */
.confirm { text-align: center; }
.confirm__check { width: 72px; height: 72px; border-radius: 50%; background: var(--blush-100); color: var(--rose-500); display: grid; place-items: center; margin: 0 auto 22px; }
.confirm__check svg { width: 38px; height: 38px; }
.confirm h2 { margin-bottom: 10px; }
.confirm__detail { background: var(--blush-50); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; margin: 24px 0; text-align: left; }
.confirm__detail dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; }
.confirm__detail dt { color: var(--muted); font-size: .88rem; }
.confirm__detail dd { margin: 0; font-weight: 500; color: var(--ink); }
.confirm__wa {
  background: linear-gradient(135deg, var(--blush-100), var(--white));
  border: 1px solid var(--rose-400);
  border-radius: var(--r-lg);
  padding: 26px;
  margin-top: 8px;
}
.confirm__wa h3 { font-size: 1.4rem; margin-bottom: 8px; }
.confirm__wa p { color: var(--ink-soft); font-size: .95rem; margin-bottom: 18px; }

/* ---------- Admin ---------- */
.admin-wrap { max-width: 1120px; }
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.admin-bar h1 { font-size: 1.9rem; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 24px; flex-wrap: wrap; }
.tab { padding: 12px 18px; font-size: .92rem; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; font-family: inherit; }
.tab.is-active { color: var(--ink); border-bottom-color: var(--rose-500); font-weight: 500; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 720px; }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { background: var(--blush-50); font-weight: 600; color: var(--ink-soft); font-size: .8rem; letter-spacing: .03em; text-transform: uppercase; }
table.data tr:last-child td { border-bottom: none; }
table.data tr.is-cancelled td { opacity: .5; text-decoration: line-through; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.badge--consulta { background: var(--blush-100); color: var(--rose-600); }
.badge--cirugia { background: #e7edf6; color: #33557f; }
.badge--otro { background: #eee9f2; color: #6b5687; }
.row-actions button { font-size: .8rem; padding: 5px 10px; margin-right: 4px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.row-actions button:hover { border-color: var(--rose-400); color: var(--rose-600); }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(30,24,27,.5); backdrop-filter: blur(3px); display: none; place-items: center; z-index: 200; padding: 20px; }
.modal-backdrop.is-open { display: grid; }
.modal { background: #fff; border-radius: var(--r-lg); padding: clamp(22px,4vw,34px); width: min(560px, 100%); max-height: 90vh; overflow-y: auto; box-shadow: var(--sh-lg); }
.modal h3 { font-size: 1.5rem; margin-bottom: 18px; }

/* Login */
.login-card { max-width: 420px; margin: 8vh auto 0; }

@media (max-width: 620px) {
  .form-grid { grid-template-columns: 1fr; }
  .confirm__detail dl { grid-template-columns: 1fr; gap: 4px 0; }
  .confirm__detail dd { margin-bottom: 10px; }
}
