/* ─────────────────────────────────────────────────────────────────────────────
   Consultorio Sofía Gallo — hoja única.
   Mismos tokens que el diseño: rosa claro #ffb5c0 como color principal,
   tinta cálida, reglas de 2px, cero decoración, Archivo en todo.
   ──────────────────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;600;800&display=swap');

:root {
  --bg: #fff8f9;
  --surface: #ffe6ea;
  --text: #2b2422;
  --accent: #ffb5c0;
  --accent-100: #fff2f4;
  --accent-200: #ffd8dd;
  --accent-300: #ffb5c0;
  --accent-400: #ff9dab;
  --accent-500: #f4808f;
  --accent-700: #a94447;
  --peach-200: #f9ddd2;
  --n-200: #f2e9e8;
  --n-300: #e2d6d5;
  --n-700: #6c5f5d;
  --n-800: #4b4240;
  --divider: rgba(43, 36, 34, .34);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-lg: 0 12px 32px rgba(45, 43, 43, .22);
  --max: 1180px;
}

* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: Archivo, system-ui, sans-serif; font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: Archivo, system-ui, sans-serif; font-weight: 800; line-height: 1.05; letter-spacing: -.025em; margin: 0 0 8px; }
h1 { font-size: 56px; }
h2 { font-size: 32px; }
h3 { font-size: 25px; }
h4 { font-size: 20px; }
p { margin: 0 0 12px; text-wrap: pretty; }
a { color: var(--accent-700); text-underline-offset: 3px; }
a:hover { color: var(--text); }
img { display: block; max-width: 100%; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent-500); outline-offset: 2px; }
::selection { background: var(--accent-200); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--n-700); }
.kicker { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-700); margin: 0 0 20px; }
.eyebrow { font-size: 14px; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 28px; }
.hr { height: 2px; background: var(--divider); border: 0; margin: 0; }
.center-empty { padding: 40px 0; color: var(--n-700); }

/* botones */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: inherit; font-weight: 800; font-size: 14px; line-height: 1.2;
  padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
  background: transparent; color: var(--text); text-decoration: none; transition: background .15s, border-color .15s;
}
.btn-primary { background: var(--accent); }
.btn-primary:hover { background: var(--accent-400); color: var(--text); }
.btn-primary:active { background: var(--accent-500); }
.btn-secondary { border-color: var(--divider); }
.btn-secondary:hover { background: rgba(43, 36, 34, .06); color: var(--text); }
.btn-ghost { color: var(--accent-700); padding: 8px 10px; }
.btn-ghost:hover { background: var(--accent-100); }
.btn-dark { background: var(--text); color: var(--bg); }
.btn-dark:hover { background: #4b4240; color: var(--bg); }
.btn-sm { font-size: 13px; padding: 8px 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* barra superior */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 2px solid var(--divider); }
.topbar-in { max-width: var(--max); margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; flex-direction: column; line-height: 1.05; text-decoration: none; color: var(--text); }
.brand b { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.brand span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-700); }
.mainnav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.mainnav a { font-weight: 800; font-size: 14px; text-decoration: none; color: var(--text); padding: 6px 12px 6px; border-bottom: 2px solid transparent; }
.mainnav a:hover { color: var(--accent-700); }
.mainnav a[aria-current="page"] { color: var(--accent-700); border-bottom-color: var(--accent); }

/* grilla de celdas con reglas */
.cells { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--divider); }
.cells > * { border-right: 2px solid var(--divider); padding: 32px 24px; }
.cells > *:last-child { border-right: 0; }
.cells-tint { background: var(--accent-300); border-radius: var(--radius-lg); overflow: hidden; border-top: 0; }
.cells-peach { background: var(--peach-200); border-radius: var(--radius-lg); overflow: hidden; }
.stat { font-size: 40px; font-weight: 800; line-height: 1; margin: 0 0 8px; }
.stat-label { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--n-700); margin: 0; }

.split { display: grid; grid-template-columns: 0.4fr 0.6fr; border-bottom: 2px solid var(--divider); }
.split > :last-child { border-left: 2px solid var(--divider); padding: 48px 0 48px 48px; }
.split > :first-child { padding: 48px 40px 48px 0; }
.list-ruled { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.list-ruled li { border-top: 1px solid var(--divider); padding-top: 10px; }

/* bloque rosa a sangre */
.poster { background: var(--accent); color: var(--text); }
.poster .wrap { padding: 80px 24px; }
.poster h2 { font-size: 48px; max-width: 22ch; margin-bottom: 24px; }

/* formularios */
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field label { font-size: 12px; letter-spacing: .04em; font-weight: 600; }
.input, select.input, textarea.input {
  font-family: inherit; font-size: 14px; color: var(--text); background: #fff;
  border: 2px solid var(--divider); border-radius: var(--radius); padding: 11px 14px; width: 100%;
}
.input:focus-visible { border-color: var(--accent-500); }
textarea.input { resize: vertical; min-height: 96px; }
.form-card { max-width: 460px; }
.form-narrow { max-width: 520px; }
.msg { border-radius: var(--radius); padding: 12px 16px; font-size: 14px; margin-bottom: 18px; border: 2px solid transparent; }
.msg-error { background: var(--accent-100); border-color: var(--accent-500); }
.msg-ok { background: var(--accent-200); border-color: var(--accent-700); }
.msg[hidden] { display: none; }

/* tarjetas y tablas */
.card { border: 2px solid var(--divider); border-radius: var(--radius-lg); padding: 22px; background: #fff; }
.card-tint { background: var(--accent-100); }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--n-700); padding: 10px 12px; border-bottom: 2px solid var(--divider); }
.table td { padding: 12px; border-bottom: 1px solid var(--divider); vertical-align: top; }
.tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--accent-200); }
.tag-ok { background: var(--accent-200); }
.tag-off { background: var(--n-200); color: var(--n-700); }
.tag-wait { background: var(--peach-200); }

/* selector de horarios */
.seg { display: inline-flex; border: 2px solid var(--divider); border-radius: 999px; overflow: hidden; }
.seg button { font-family: inherit; font-weight: 800; font-size: 13px; padding: 10px 18px; border: 0; background: transparent; cursor: pointer; color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--accent); }
.days { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; }
.day {
  flex: 0 0 auto; min-width: 92px; text-align: left; cursor: pointer; font-family: inherit;
  border: 2px solid var(--divider); border-radius: var(--radius); background: #fff; padding: 12px;
}
.day b { display: block; font-size: 20px; }
.day span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--n-700); }
.day[aria-pressed="true"] { background: var(--accent); border-color: var(--text); }
.day:disabled { opacity: .35; cursor: not-allowed; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.slot { font-family: inherit; font-weight: 800; font-size: 14px; padding: 10px 16px; border-radius: 999px; border: 2px solid var(--divider); background: #fff; cursor: pointer; }
.slot[aria-pressed="true"] { background: var(--accent); border-color: var(--text); }

/* chat */
.chat-launcher { position: fixed; right: 24px; bottom: 24px; z-index: 60; box-shadow: var(--shadow-lg); }
.chat-panel {
  position: fixed; right: 24px; bottom: 24px; z-index: 61; width: 380px; max-width: calc(100vw - 32px);
  height: min(560px, calc(100vh - 48px)); background: var(--bg); border: 2px solid var(--text);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); display: none; flex-direction: column;
}
.chat-panel.open { display: flex; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 2px solid var(--divider); }
.chat-head b { font-size: 15px; }
.chat-head span { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-700); }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.bubble { max-width: 88%; font-size: 14px; line-height: 1.5; padding: 11px 15px; white-space: pre-wrap; }
.bubble-bot { background: var(--surface); border-left: 2px solid var(--accent-500); border-radius: 4px 16px 16px 16px; }
.bubble-me { align-self: flex-end; background: var(--accent); border-radius: 16px 16px 4px 16px; }
.chat-form { border-top: 2px solid var(--divider); padding: 12px; display: flex; gap: 8px; }
.chat-note { margin: 0; padding: 0 14px 12px; font-size: 11px; color: var(--n-700); }
.chat-icon { width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 999px; border: 2px solid var(--divider); }

/* pie */
.footer { border-top: 2px solid var(--divider); margin-top: 72px; }
.footer .wrap { padding: 28px 24px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 13px; color: var(--n-700); }

@media (max-width: 900px) {
  h1 { font-size: 40px; }
  .cells { grid-template-columns: 1fr; }
  .cells > * { border-right: 0; border-bottom: 2px solid var(--divider); }
  .cells > *:last-child { border-bottom: 0; }
  .split { grid-template-columns: 1fr; }
  .split > :last-child { border-left: 0; padding: 0 0 40px; }
  .split > :first-child { padding: 40px 0 24px; }
  .poster h2 { font-size: 34px; }
  .topbar-in { flex-direction: column; align-items: flex-start; gap: 12px; }
}
