:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111827;
  background: #f3f4f6;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
header {
  background: #111827; color: white; display: flex; justify-content: space-between;
  align-items: center; padding: 14px 18px; position: sticky; top: 0; z-index: 5;
}
header strong { font-size: 1.35rem; margin-right: 8px; }
header span { opacity: .8; }
main { width: min(760px, 100%); margin: auto; padding: 16px; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.link-button { border: 0; background: transparent; color: white; text-decoration: underline; }
.voice-card {
  background: white; border-radius: 18px; padding: 18px; text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,.08);
}
.record-button {
  width: 100%; min-height: 110px; border: 0; border-radius: 16px;
  background: #b91c1c; color: white; font-weight: 800; font-size: 1.2rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.record-button.recording { animation: pulse 1.2s infinite; background: #7f1d1d; }
#micIcon { font-size: 2.2rem; }
@keyframes pulse { 50% { transform: scale(.98); opacity: .8; } }
#voiceStatus { min-height: 24px; }
.primary, .secondary, .danger {
  border: 0; border-radius: 11px; padding: 12px 16px; font-weight: 750;
}
.primary { background: #166534; color: white; }
.secondary { background: #e5e7eb; color: #111827; }
.danger { background: #b91c1c; color: white; }
.wide { width: 100%; }
.day-nav { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 18px 0; }
.day-nav a {
  text-align: center; padding: 11px 5px; background: white; border-radius: 10px;
  color: #111827; text-decoration: none; font-weight: 700;
}
h1 { font-size: 1.45rem; }
.appointment-list { display: grid; gap: 10px; }
.appointment {
  display: grid; grid-template-columns: 74px 1fr auto; gap: 12px; align-items: start;
  background: white; padding: 15px; border-radius: 14px; box-shadow: 0 3px 12px rgba(0,0,0,.06);
}
.time { font-size: 1.05rem; font-weight: 850; }
.details h2 { margin: 0 0 4px; font-size: 1.12rem; }
.details p { margin: 7px 0 0; color: #4b5563; }
.details a { display: block; margin-top: 5px; color: #1d4ed8; }
.service { font-weight: 700; color: #166534; }
.edit-button { border: 0; border-radius: 8px; padding: 8px; background: #e5e7eb; }
.empty { background: white; padding: 28px; border-radius: 14px; text-align: center; color: #6b7280; }
dialog { width: min(600px, calc(100% - 20px)); border: 0; border-radius: 18px; padding: 0; }
dialog::backdrop { background: rgba(0,0,0,.55); }
#appointmentForm { padding: 18px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; }
.dialog-head h2 { margin: 0 0 12px; }
.close-button { border: 0; background: transparent; font-size: 2rem; }
label { display: block; font-weight: 750; margin: 11px 0; }
input, textarea {
  display: block; width: 100%; margin-top: 5px; padding: 12px; border: 1px solid #9ca3af;
  border-radius: 10px; background: white;
}
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.warning, .error { background: #fef3c7; color: #78350f; border-radius: 9px; padding: 10px; }
.hidden { display: none !important; }
.login-body { display: grid; place-items: center; padding: 20px; background: #111827; }
.login-card { width: min(380px, 100%); background: white; padding: 28px; border-radius: 20px; text-align: center; }
.brand-mark { font-size: 2rem; font-weight: 900; }
.pin { text-align: center; font-size: 1.5rem; letter-spacing: .3em; margin-bottom: 12px; }
@media (max-width: 520px) {
  .appointment { grid-template-columns: 68px 1fr; }
  .edit-button { grid-column: 2; justify-self: start; }
}
