/* MissedCall demo Mini App — mobile-first, system fonts, no external CDN. */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f4f6f8; color: #0f172a; line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
#app { max-width: 640px; margin: 0 auto; padding: 0 14px 32px; }
.app-header {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 18px 0 12px;
}
.app-header h1 { font-size: 24px; letter-spacing: -0.5px; }
.biz { color: #64748b; font-size: 13px; margin-top: 2px; }
.demo-badge {
  display: inline-block; background: #fef3c7; color: #92400e; border: 1px solid #fcd34d;
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em; border-radius: 4px;
  padding: 1px 6px; vertical-align: middle;
}
.header-stats { display: flex; gap: 10px; }
.hstat { text-align: center; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 6px 12px; }
.hstat b { display: block; font-size: 18px; }
.hstat span { font-size: 11px; color: #64748b; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; overflow-x: auto; }
.tab {
  flex: 1; white-space: nowrap; border: 1px solid #e2e8f0; background: #fff; color: #334155;
  font-size: 14px; font-weight: 600; padding: 10px 8px; border-radius: 10px; cursor: pointer;
}
.tab.active { background: #0ea5e9; border-color: #0ea5e9; color: #fff; }
.panel { display: none; }
.panel.active { display: block; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.panel-head h2 { font-size: 20px; }
.hint { color: #64748b; font-size: 13px; margin-bottom: 14px; }
.btn {
  display: inline-block; background: #0ea5e9; color: #fff; border: 0; border-radius: 9px;
  font-size: 14px; font-weight: 700; padding: 10px 16px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: #0369a1; }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn.secondary { background: #e2e8f0; color: #0f172a; }
.call-list, .booking-list { list-style: none; display: grid; gap: 10px; }
.call-card, .booking-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px;
}
.call-card .who { font-weight: 700; font-size: 16px; }
.call-card .meta { color: #64748b; font-size: 13px; margin: 2px 0 8px; }
.status { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 20px; padding: 2px 10px; }
.status.missed { background: #fee2e2; color: #b91c1c; }
.status.replied { background: #dbeafe; color: #1d4ed8; }
.status.booked { background: #dcfce7; color: #15803d; }
.call-card .actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.sim {
  margin-top: 18px; background: #fff; border: 1px solid #bae6fd; border-radius: 12px; padding: 16px;
}
.sim h3 { font-size: 17px; margin-bottom: 10px; }
.timeline { list-style: none; display: grid; gap: 8px; }
.timeline li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.timeline .dot {
  flex: 0 0 22px; height: 22px; border-radius: 50%; background: #e2e8f0; color: #475569;
  font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.timeline li.done .dot { background: #16a34a; color: #fff; }
.timeline li.active .dot { background: #0ea5e9; color: #fff; }
.timeline .t-time { color: #64748b; font-size: 12px; }
.sim-label { font-weight: 700; margin: 14px 0 8px; font-size: 14px; }
.reply-choices, .slot-choices { display: grid; gap: 8px; }
.reply-choices button, .slot-choices button {
  text-align: left; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 10px 12px; font-size: 14px; cursor: pointer; color: #0f172a;
}
.reply-choices button:hover, .slot-choices button:hover { border-color: #0ea5e9; }
.deposit-line { font-size: 14px; }
.deposit-done { color: #15803d; font-weight: 700; margin-top: 8px; }
.hidden { display: none !important; }
.chat-log { display: grid; gap: 10px; margin-bottom: 12px; }
.msg { max-width: 85%; padding: 10px 12px; border-radius: 12px; font-size: 14px; }
.msg .who { display: block; font-size: 11px; font-weight: 700; color: #64748b; margin-bottom: 2px; }
.msg.in { background: #fff; border: 1px solid #e2e8f0; justify-self: start; }
.msg.out { background: #dcfce7; justify-self: end; }
.msg .kind { display: block; font-size: 11px; color: #64748b; margin-top: 4px; }
.chat-form { display: flex; gap: 8px; position: sticky; bottom: 10px; }
.chat-form input {
  flex: 1; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; font-size: 15px; background: #fff;
}
#chat-picker { border: 1px solid #e2e8f0; border-radius: 9px; padding: 8px; font-size: 14px; background: #fff; max-width: 200px; }
.subhead { font-size: 16px; margin: 20px 0 10px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.slot {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px;
  font-size: 13px; text-align: center;
}
.slot.taken { background: #f1f5f9; color: #94a3b8; text-decoration: line-through; }
.plan {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; margin-bottom: 12px;
}
.plan.popular { border: 2px solid #0ea5e9; }
.plan h3 { font-size: 18px; }
.price { font-size: 32px; font-weight: 800; margin: 4px 0; }
.price small { font-size: 14px; color: #64748b; font-weight: 400; }
.plan p { color: #475569; font-size: 14px; margin-bottom: 12px; }
.subscribe-box { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 12px; padding: 18px; margin-top: 8px; }
.subscribe-box h3 { margin-bottom: 8px; }
.subscribe-box p { font-size: 14px; margin-bottom: 10px; }
.fine { font-size: 12px; color: #94a3b8; }
.subscribe-done { color: #15803d; font-weight: 700; }
.app-footer { margin-top: 24px; border-top: 1px solid #e2e8f0; padding-top: 14px; }
.app-footer p { font-size: 12px; color: #94a3b8; }
@media (max-width: 420px) {
  .app-header h1 { font-size: 20px; }
  .chat-form { flex-direction: column; }
  .chat-form .btn { width: 100%; }
}
