/* Agenda de la Dra. Lissett Camacho: pensada primero para el teléfono. */
:root {
  --paper: #fbf6f3;
  --card: #ffffff;
  --ink: #2c2530;
  --soft: #6f6570;
  --line: #eaded8;
  --plum: #7d3c5b;
  --plum-dark: #5f2b44;
  --blush: #f4e4e8;
  --leaf: #2f6b4f;
  --leaf-soft: #e3f0e8;
  --amber: #8a5a00;
  --amber-soft: #fbefd5;
  --red: #a12c2c;
  --red-soft: #f9e3e1;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main { max-width: 34rem; margin: 0 auto; padding: 1rem 1rem 3rem; }
body.admin main { max-width: 46rem; }

h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 600; line-height: 1.2; margin: 1rem 0 .5rem; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
h1.date::first-letter, .chosen::first-letter { text-transform: uppercase; }
a { color: var(--plum); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; border-bottom: 1px solid var(--line); background: var(--card); }
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.brand strong { font-family: Georgia, serif; font-size: 1.1rem; }
.brand span { color: var(--plum); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }

.tabs { display: flex; flex-wrap: wrap; gap: .25rem; padding: .4rem .75rem; background: var(--card); border-bottom: 1px solid var(--line); }
.tabs a { white-space: nowrap; text-decoration: none; padding: .5rem .8rem; border-radius: 999px; color: var(--soft); font-size: .92rem; }
.tabs a.on { background: var(--plum); color: #fff; }

.lead, .fine, .muted { color: var(--soft); }
.fine { font-size: .85rem; }
.alert, .notice { padding: .75rem .9rem; border-radius: .6rem; }
.alert { background: var(--red-soft); color: var(--red); }
.notice { background: var(--leaf-soft); color: var(--leaf); }
.empty { color: var(--soft); background: var(--card); border: 1px dashed var(--line); border-radius: .7rem; padding: 1rem; text-align: center; }
.back { text-decoration: none; }

/* Calendario público */
.month { display: flex; align-items: center; justify-content: space-between; }
.step { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); text-decoration: none; font-size: 1.4rem; }
.step.off { opacity: .3; color: var(--soft); }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .3rem; }
.calendar .head { text-align: center; font-size: .75rem; color: var(--soft); }
.cell { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 3.6rem; border-radius: .6rem; text-decoration: none; border: 1px solid transparent; }
.cell small { font-size: .62rem; line-height: 1.1; text-align: center; }
.cell.free { background: var(--card); border-color: var(--plum); color: var(--plum-dark); }
.cell.free:hover, .cell.free:focus-visible { background: var(--blush); }
.cell.full { background: var(--blush); color: var(--soft); }
.cell.off { color: #b4a8ac; }

/* Horarios */
.slots { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .6rem; }
.slot { display: flex; flex-direction: column; align-items: center; padding: .8rem; border-radius: .7rem; text-decoration: none; border: 1px solid var(--line); }
.slot.free { background: var(--card); border-color: var(--plum); color: var(--plum-dark); }
.slot.free:hover, .slot.free:focus-visible { background: var(--blush); }
.slot.full { background: var(--blush); color: var(--soft); }

/* Formularios */
.stack { display: flex; flex-direction: column; gap: .9rem; }
label { display: flex; flex-direction: column; gap: .25rem; font-weight: 600; font-size: .92rem; }
input, textarea, select { font: inherit; font-weight: 400; padding: .65rem .75rem; border: 1px solid #d6c8c2; border-radius: .55rem; background: var(--card); color: var(--ink); width: 100%; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #d79ab4; outline-offset: 1px; }
label.check { flex-direction: row; align-items: flex-start; gap: .6rem; font-weight: 400; }
label.check input { width: 1.2rem; height: 1.2rem; margin-top: .15rem; }
label.check small { display: block; color: var(--soft); }
fieldset { border: 1px solid var(--line); border-radius: .7rem; padding: .9rem; display: flex; flex-direction: column; gap: .9rem; }
legend { color: var(--soft); font-size: .85rem; padding: 0 .3rem; }
small.error { color: var(--red); font-weight: 400; }
small.hint { color: var(--soft); font-weight: 400; }
input:user-invalid { border-color: var(--red); }
.trap { position: absolute; left: -9999px; }
.chosen { display: inline-block; background: var(--blush); color: var(--plum-dark); border-radius: 999px; padding: .35rem .9rem; font-weight: 600; margin: 0 0 .5rem; }

.button, button { font: inherit; font-weight: 600; min-height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem 1.1rem; border-radius: .6rem; border: 1px solid var(--plum); background: var(--plum); color: #fff; text-decoration: none; cursor: pointer; }
.button:hover, button:hover { background: var(--plum-dark); }
.button.ghost, button.ghost { background: transparent; color: var(--plum); }
.button.ghost:hover, button.ghost:hover { background: var(--blush); }
button.send { background: var(--leaf); border-color: var(--leaf); }
button.send:hover { background: #24553e; }
button.link { background: none; border: 0; color: var(--plum); text-decoration: underline; min-height: 2rem; padding: .2rem; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: .85rem; padding: 1rem; margin-bottom: .75rem; }
.done { text-align: center; }
.contact { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); text-align: center; color: var(--soft); }
.contact p { margin: 0 0 .5rem; }
.button.whatsapp { background: var(--leaf); border-color: var(--leaf); }
.button.whatsapp:hover { background: #24553e; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.actions form { display: contents; }
.actions.center { display: flex; justify-content: center; }

/* Panel de administración */
.row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem; }
.who { font-size: 1.05rem; font-weight: 600; text-decoration: none; color: var(--ink); }
.when { color: var(--plum-dark); font-weight: 600; }
.when::first-letter { text-transform: uppercase; }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; border-radius: 999px; padding: .15rem .6rem; background: var(--blush); color: var(--plum-dark); }
.tag.confirmada { background: var(--leaf-soft); color: var(--leaf); }
.tag.cancelada { background: var(--red-soft); color: var(--red); }
.tag.warn { background: var(--amber-soft); color: var(--amber); }
.review { border-top: 1px dashed var(--line); margin-top: .7rem; padding-top: .5rem; }
.free-slot { display: flex; justify-content: space-between; align-items: center; }
.daynav { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.daynav form { display: flex; gap: .4rem; }
.close-day { margin: .9rem 0; }
.closed-day { margin: .9rem 0; }
.closed-day p { margin: 0 0 .5rem; }
.search { display: flex; gap: .5rem; }
.list { list-style: none; padding: 0; margin: .75rem 0; }
.list li { border-bottom: 1px solid var(--line); padding: .6rem 0; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0; }
dt { color: var(--soft); }
dd { margin: 0; overflow-wrap: anywhere; }
