@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600&family=Jost:wght@300;400;500;600&display=swap');

:root {
  --rose: #b0606f;
  --rose-dark: #8e4555;
  --rose-light: #d9a4ad;
  --rose-soft: #f6e8ea;
  --rose-grad: linear-gradient(135deg, #c77d8a 0%, #a14f60 55%, #8a3f50 100%);
  --ink: #3a2d30;
  --muted: #8b7b7e;
  --line: #eadfe0;
  --bg: #fbf8f7;
  --card: #ffffff;
  --ok: #3f8f6b;
  --ok-soft: #e5f3ec;
  --warn: #b7791f;
  --warn-soft: #fbf1df;
  --bad: #b23b3b;
  --bad-soft: #f9e5e5;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(142, 69, 85, .08);
  --serif: 'Cinzel', Georgia, serif;
  --sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(ellipse at 10% 0%, rgba(217, 164, 173, .18), transparent 55%),
    radial-gradient(ellipse at 100% 30%, rgba(217, 164, 173, .10), transparent 50%),
    var(--bg);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.45;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--rose-dark); }

.wrap { max-width: 520px; margin: 0 auto; padding: 16px 16px 110px; }
.wide { max-width: 980px; }

/* cabeçalho */
.brand { text-align: center; padding: 18px 0 8px; }
.brand img { width: 150px; height: 150px; border-radius: 50%; box-shadow: 0 10px 30px rgba(142, 69, 85, .18); background: #fff; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 0 14px; }
.topbar img { width: 46px; height: 46px; border-radius: 50%; box-shadow: var(--shadow); }
.topbar .t1 { font-family: var(--serif); font-size: 17px; color: var(--rose-dark); letter-spacing: .5px; line-height: 1.1; }
.topbar .t2 { font-size: 11px; letter-spacing: 3px; color: var(--muted); text-transform: uppercase; }
.topbar .spacer { flex: 1; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--rose-dark); letter-spacing: .4px; margin: 0 0 10px; }
h1 { font-size: 22px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
.hello { font-size: 15px; color: var(--muted); margin: 0 0 14px; }
.hello b { color: var(--ink); font-weight: 500; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px; }

/* formulários */
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 5px; letter-spacing: .3px; }
input, select, textarea {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff;
  font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--rose-light); box-shadow: 0 0 0 4px rgba(176, 96, 111, .12); }
textarea { resize: vertical; min-height: 70px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 14px 22px; cursor: pointer;
  background: var(--rose-grad); color: #fff; font-weight: 500; letter-spacing: .6px; font-size: 15px;
  box-shadow: 0 6px 18px rgba(142, 69, 85, .25); transition: transform .08s, opacity .15s; text-decoration: none;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.block { width: 100%; }
.btn.ghost { background: #fff; color: var(--rose-dark); border: 1px solid var(--rose-light); box-shadow: none; }
.btn.soft { background: var(--rose-soft); color: var(--rose-dark); box-shadow: none; }
.btn.danger { background: #fff; color: var(--bad); border: 1px solid #ecc5c5; box-shadow: none; }
.btn.wa { background: #25a35a; box-shadow: 0 6px 18px rgba(37, 163, 90, .25); }
.btn.sm { padding: 8px 14px; font-size: 13px; }
.link { background: none; border: 0; color: var(--rose-dark); cursor: pointer; padding: 6px; text-decoration: underline; font-size: 14px; }

.tabs { display: flex; background: var(--rose-soft); border-radius: 999px; padding: 4px; margin-bottom: 14px; }
.tabs button { flex: 1; border: 0; background: none; padding: 10px; border-radius: 999px; cursor: pointer; color: var(--rose-dark); font-weight: 500; }
.tabs button.on { background: #fff; box-shadow: 0 2px 8px rgba(142, 69, 85, .12); }

.msg { padding: 11px 14px; border-radius: 12px; font-size: 14px; margin: 10px 0; }
.msg.err { background: var(--bad-soft); color: var(--bad); }
.msg.ok { background: var(--ok-soft); color: var(--ok); }
.msg.info { background: var(--rose-soft); color: var(--rose-dark); }

/* passos do agendamento */
.steps { display: flex; gap: 6px; margin: 4px 0 16px; }
.steps span { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.steps span.on { background: var(--rose); }
.back { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px 0; margin-bottom: 6px; font-size: 14px; }

.svc { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer; padding: 15px 16px; }
.svc .ic { width: 42px; height: 42px; border-radius: 50%; background: var(--rose-soft); display: grid; place-items: center; flex: none; color: var(--rose); font-size: 20px; }
.svc .nm { font-weight: 500; }
.svc .meta { font-size: 13px; color: var(--muted); }
.svc .pr { margin-left: auto; font-weight: 600; color: var(--rose-dark); white-space: nowrap; }
.svc.sel { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(176, 96, 111, .15); }

.days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day {
  flex: none; width: 62px; scroll-snap-align: start; border: 1px solid var(--line); background: #fff; border-radius: 14px;
  padding: 9px 0; text-align: center; cursor: pointer; position: relative;
}
.day .w { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.day .d { font-size: 21px; font-weight: 500; font-family: var(--serif); }
.day .m { font-size: 11px; color: var(--muted); }
.day .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin: 4px auto 0; }
.day.off { opacity: .38; cursor: default; }
.day.off .dot { background: transparent; }
.day.sel { background: var(--rose-grad); border-color: transparent; color: #fff; }
.day.sel .w, .day.sel .m { color: rgba(255, 255, 255, .85); }
.day.sel .dot { background: #fff; }
.monthlbl { font-family: var(--serif); color: var(--rose-dark); font-size: 15px; margin: 4px 0 6px; text-transform: capitalize; }

.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.slot { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 0; text-align: center; cursor: pointer; font-weight: 500; }
.slot.sel { background: var(--rose-grad); border-color: transparent; color: #fff; }
.period { font-size: 12px; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); margin: 14px 0 8px; }

.summary .line { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); gap: 12px; }
.summary .line:last-child { border-bottom: 0; }
.summary .line span:first-child { color: var(--muted); }
.summary .line span:last-child { text-align: right; font-weight: 500; }

.appt { display: flex; gap: 14px; align-items: flex-start; }
.appt .date { flex: none; width: 58px; text-align: center; border-radius: 12px; background: var(--rose-soft); padding: 8px 0; }
.appt .date .d { font-family: var(--serif); font-size: 22px; color: var(--rose-dark); line-height: 1; }
.appt .date .m { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--rose); }
.appt .info { flex: 1; min-width: 0; }
.appt .info .nm { font-weight: 500; }
.badge { display: inline-block; font-size: 11px; padding: 3px 9px; border-radius: 999px; letter-spacing: .4px; font-weight: 500; }
.badge.confirmado { background: var(--rose-soft); color: var(--rose-dark); }
.badge.concluido { background: var(--ok-soft); color: var(--ok); }
.badge.cancelado { background: var(--bad-soft); color: var(--bad); }
.badge.faltou { background: var(--warn-soft); color: var(--warn); }

.empty { text-align: center; color: var(--muted); padding: 26px 10px; }
.empty .ic { font-size: 30px; color: var(--rose-light); }

.success { text-align: center; padding: 10px 0; }
.success .check { width: 74px; height: 74px; border-radius: 50%; background: var(--rose-grad); color: #fff; display: grid; place-items: center; font-size: 36px; margin: 10px auto 14px; box-shadow: 0 10px 26px rgba(142, 69, 85, .3); }

/* navegação inferior */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); display: flex; justify-content: center; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); z-index: 20;
}
.bottomnav .in { display: flex; width: 100%; max-width: 620px; }
.bottomnav button { flex: 1; background: none; border: 0; padding: 6px 2px; cursor: pointer; color: var(--muted); font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bottomnav button svg { width: 23px; height: 23px; }
.bottomnav button.on { color: var(--rose-dark); }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(58, 45, 48, .45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.modal { background: #fff; width: 100%; max-width: 520px; border-radius: 22px 22px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); max-height: 90vh; overflow-y: auto; animation: up .2s ease-out; }
@media (min-width: 700px) { .modal-bg { align-items: center; } .modal { border-radius: 22px; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; z-index: 80; box-shadow: var(--shadow); max-width: 90vw; text-align: center; }

.spinner { width: 26px; height: 26px; border: 3px solid var(--rose-soft); border-top-color: var(--rose); border-radius: 50%; animation: spin .7s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }
.gap { height: 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.footer { text-align: center; font-size: 12px; color: var(--muted); margin-top: 24px; letter-spacing: 1px; }
