@font-face { font-family: "Urbanist"; src: url("fonts/Urbanist.ttf") format("truetype"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Urbanist"; src: url("fonts/Urbanist-Italic.ttf") format("truetype"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("fonts/Roboto.ttf") format("truetype"); font-weight: 100 900; font-stretch: 75% 100%; font-style: normal; font-display: swap; }
:root {
  --m: #972F71; --m-d: #76225A; --m-l: #E9D3E1; --m-xl: #F6ECF2;
  --b: #F3F1E9; --b-d: #E8E4D7; --ink: #1D1D1B; --soft: #5C5A55; --w: #FCFCFC;
  --ok: #2F6B4F; --ok-l: #DDEBE3; --warn: #8A5A00; --warn-l: #F6E9CC; --bad: #A32A2A; --bad-l: #F7DEDC;
  --title: "Urbanist", "Segoe UI", Arial, sans-serif;
  --text: "Roboto", "Segoe UI", Arial, sans-serif;
  --kern: -.02em; --lead: 30px;
  --r: 26px; --r-s: 18px; --gut: clamp(20px, 5vw, 64px); --edge: clamp(10px, 1.3vw, 24px);
  --press-m: inset 0 3px 0 rgba(255, 255, 255, .14), inset 0 -3px 0 rgba(60, 10, 45, .22), 0 7px 16px rgba(151, 47, 113, .24);
  --press-b: inset 0 -4px 0 #D8D5CA, 0 7px 16px rgba(29, 29, 27, .09);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--b); color: var(--ink); font-family: var(--text); font-size: 18px; line-height: var(--lead); letter-spacing: var(--kern); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--title); font-weight: 600; margin: 0; line-height: .98; letter-spacing: var(--kern); color: var(--ink); }
h3 { line-height: 1.12; }
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: var(--m); }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 3px solid var(--m); outline-offset: 3px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 60px; padding: 12px 34px; border: 0; border-radius: 999px; background: var(--m); color: var(--b); box-shadow: var(--press-m); font-family: var(--title); font-weight: 600; font-size: 21px; line-height: 1.1; letter-spacing: var(--kern); text-decoration: none; text-align: center; cursor: pointer; transition: background .2s, transform .2s, box-shadow .2s; }
.btn:hover { background: var(--m-d); transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { background: var(--b-d); color: var(--soft); box-shadow: none; transform: none; cursor: not-allowed; }
.btn.alt { background: var(--m-xl); color: var(--m); box-shadow: inset 0 -3px 0 var(--m-l); }
.btn.alt:hover { background: var(--m-l); }
.btn.plain { background: var(--b); color: var(--m); box-shadow: var(--press-b); }
.btn.plain:hover { background: #FBFAF5; }
.btn.wa { background: #1F7A4D; color: #fff; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .13), inset 0 -3px 0 rgba(0, 40, 20, .25), 0 7px 16px rgba(31, 122, 77, .22); }
.btn.wa:hover { background: #17603C; }
.btn.danger { background: var(--bad-l); color: var(--bad); box-shadow: inset 0 -3px 0 #EBC4C0; }
.btn.danger:hover { background: #F0CBC8; }
.btn.full { width: 100%; }
.btn svg { width: 24px; height: 24px; flex: none; }

.field { display: block; margin-bottom: 18px; }
.field > span { display: block; font-weight: 500; margin-bottom: 6px; line-height: 24px; }
.field small { display: block; color: var(--soft); font-size: 15px; line-height: 21px; margin-top: 5px; }
.input { width: 100%; min-height: 58px; padding: 13px 20px; background: var(--w); border: 2px solid var(--b-d); border-radius: var(--r-s); font-size: 18px; line-height: 26px; }
.input:focus { outline: 0; border-color: var(--m); }
textarea.input { min-height: 120px; resize: vertical; }

.cal { background: var(--w); border-radius: var(--r); padding: 18px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head strong { font-family: var(--title); font-weight: 600; font-size: 23px; }
.cal-nav { width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--b); color: var(--m); font-size: 28px; line-height: 1; cursor: pointer; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center; }
.cal-week { color: var(--soft); font-size: 15px; font-weight: 500; margin-bottom: 5px; }
.cal-day { aspect-ratio: 1; min-height: 40px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; font-weight: 500; font-size: 17px; padding: 0; }
button.cal-day { cursor: pointer; transition: background .15s; }
.cal-day.off { color: #B5B2A9; font-weight: 400; }
.cal-day.free { background: var(--m-xl); color: var(--m); }
.cal-day.free:hover { background: var(--m-l); }
.cal-day.sel { background: var(--m); color: var(--w); }
.cal-day.s-done { background: var(--m); color: var(--w); }
.cal-day.s-pend { background: var(--m-l); color: var(--m-d); }
.cal-day.s-miss { background: var(--ink); color: var(--w); }
.cal-day.s-rec { background: var(--warn-l); color: var(--warn); }
.cal-day.is-today { box-shadow: inset 0 0 0 2px var(--ink); }

.sheet-bg { position: fixed; inset: 0; background: rgba(29, 29, 27, .55); z-index: 80; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet { position: relative; background: var(--b); width: 100%; max-width: 620px; max-height: 92dvh; overflow-y: auto; border-radius: 32px 32px 0 0; padding: 30px clamp(20px, 5vw, 38px) calc(28px + env(safe-area-inset-bottom)); animation: rise .28s cubic-bezier(.2, .8, .2, 1); }
.sheet.wide { max-width: 860px; }
.sheet h2 { font-size: 32px; margin-bottom: 12px; padding-right: 54px; }
.sheet .lead { color: var(--soft); margin-bottom: 20px; }
.sheet-x { position: absolute; top: 18px; right: 18px; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--w); font-size: 24px; line-height: 1; cursor: pointer; }
.stack { display: grid; gap: 12px; }
@media (min-width: 720px) { .sheet-bg { align-items: center; padding: 24px; } .sheet { border-radius: 32px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(28px); opacity: 0; } }

#toast { position: fixed; left: 50%; bottom: 104px; transform: translate(-50%, 20px); background: var(--ink); color: var(--w); padding: 12px 24px; border-radius: 999px; font-weight: 500; opacity: 0; pointer-events: none; transition: .25s; z-index: 100; max-width: calc(100vw - 32px); width: max-content; text-align: center; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ITERACIÃ“N 6: carga, errores y estados */
.boot { display: grid; gap: 14px; width: min(100% - 40px, 960px); margin: 0 auto; padding: 130px 0 60px; }
.boot i { display: block; height: 88px; border-radius: 22px; background: linear-gradient(100deg, #E8E4D7 30%, #F7F5EE 50%, #E8E4D7 70%); background-size: 240% 100%; animation: bootPulse 1.2s linear infinite; }
.boot i:first-child { height: 150px; }
@keyframes bootPulse { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.boot-error { display: grid; justify-items: center; gap: 14px; max-width: 520px; margin: 0 auto; padding: 150px 24px 70px; text-align: center; }
.boot-error h1 { font-size: 34px; }
.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.is-busy > * { visibility: hidden; }
.is-busy::after { content: ''; position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border: 2px solid #972F71; border-right-color: transparent; border-radius: 50%; animation: busySpin .7s linear infinite; }
.btn.is-busy:not(.plain):not(.alt):not(.danger)::after { border-color: #F3F1E9; border-right-color: transparent; }
@keyframes busySpin { to { transform: rotate(360deg); } }
.input.bad { border-color: var(--bad); }