:root {
  --navy: #004080;
  --text: #0a2540;
  --muted: #4d5a68;
  --border: #d5e0ec;
  --bg: #f4f7fb;
  --white: #fff;
  --danger: #8a1f11;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
.wrap { max-width: 720px; margin: 0 auto; padding: 1rem 1.1rem 3rem; }
.top {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.1rem;
}
.top a { color: var(--navy); font-weight: 800; text-decoration: none; }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 1.1rem 1.15rem; margin: 0.9rem 0;
}
h1 { font-size: 1.7rem; margin: 0.4rem 0 0.5rem; color: var(--navy); }
label, .lbl { display: block; font-weight: 700; margin: 0.85rem 0 0.3rem; }
input, select, textarea {
  width: 100%; min-height: 3rem; font-size: 1.05rem; padding: 0.55rem 0.7rem;
  border: 1px solid #9aa8b8; border-radius: 8px; color: var(--text); background: #fff;
}
.hint { color: var(--muted); font-size: 0.98rem; }
.err {
  display: none; background: #fdecea; color: var(--danger); border: 1px solid #f5c2c0;
  padding: 0.75rem 0.9rem; border-radius: 8px; font-weight: 700;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.4rem 0 0.8rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: var(--navy); color: #fff; border-radius: 999px;
  padding: 0.3rem 0.7rem; font-weight: 700; font-size: 0.95rem;
}
.chip button { background: none; border: 0; color: #fff; font-size: 1.1rem; cursor: pointer; }
.results {
  border: 1px solid var(--border); border-radius: 8px; max-height: 260px;
  overflow: auto; background: #fff; margin-top: 0.4rem;
}
.result {
  display: flex; gap: 0.7rem; align-items: center; width: 100%; text-align: left;
  padding: 0.6rem 0.7rem; border: 0; border-bottom: 1px solid #eef3f8;
  background: #fff; color: var(--text); cursor: pointer; font-size: 1rem;
}
.result:disabled { cursor: not-allowed; background: #f4f7fb; color: var(--text); }
.result img { width: 48px; height: 48px; object-fit: contain; }
.result .why { color: var(--danger); font-size: 0.88rem; font-weight: 700; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.pay { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.pay button {
  min-height: 3.4rem; border: 2px solid var(--border); border-radius: 10px;
  background: #fff; color: var(--text); font-weight: 700; cursor: pointer;
}
.pay button.is-on { border-color: var(--navy); background: #e8f1fb; color: var(--navy); }
.primary {
  width: 100%; min-height: 3.3rem; margin-top: 1rem; border: 0; border-radius: 10px;
  background: var(--navy); color: #fff; font-size: 1.1rem; font-weight: 800; cursor: pointer;
}
.ok { background: #e8f7ee; color: #0a3d1f; border: 1px solid #b7e0c2; padding: 1rem; border-radius: 10px; }
.btn-wa {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 3.1rem; padding: 0 1.1rem; border-radius: 10px;
  background: #25d366; color: #fff; font-weight: 800; text-decoration: none;
}
.btn-wa:hover { background: #1fb855; color: #fff; }

.af-cal {
  border: 2px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.af-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem;
  background: #eef5ff;
  border-bottom: 1px solid var(--border);
}
.af-cal-head strong { color: var(--navy); font-size: 1.15rem; }
.af-cal-nav {
  min-width: 3rem;
  min-height: 3rem;
  border: 2px solid var(--navy);
  background: #fff;
  color: var(--navy);
  border-radius: 12px;
  font-size: 1.35rem;
  font-weight: 800;
  cursor: pointer;
}
.af-cal-nav:disabled { opacity: 0.35; cursor: not-allowed; }
.af-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  padding: 0.65rem;
}
.af-cal-dow {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--navy);
  padding: 0.35rem 0;
}
.af-cal-day {
  min-height: 3rem;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #f8fafc;
  color: var(--text);
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
}
.af-cal-day.is-muted { color: #94a3b8; background: transparent; cursor: default; }
.af-cal-day.is-disabled {
  color: #cbd5e1;
  background: #f1f5f9;
  cursor: not-allowed;
  text-decoration: line-through;
}
.af-cal-day.is-available { background: #e8f0ff; border-color: #c5d3e3; }
.af-cal-day.is-selected { background: var(--navy); color: #fff; border-color: var(--navy); }
.af-cal-hours { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 0.9rem; }
.af-cal-hour {
  min-height: 3rem;
  min-width: 5.5rem;
  padding: 0.55rem 0.9rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
}
.af-cal-hour.is-on { background: var(--navy); color: #fff; border-color: var(--navy); }
.af-cal-selected { margin-top: 0.75rem; font-weight: 700; color: var(--navy); font-size: 1.08rem; }
.af-hint { color: var(--muted); font-size: 0.98rem; }
.af-label { display: block; font-weight: 700; margin: 0.85rem 0 0.3rem; }

@media (max-width: 640px) { .row, .pay { grid-template-columns: 1fr; } }
