/* ─── App Shell ─────────────────────────────────────── */
.app-body { background: var(--bg); }

.app-nav {
  justify-content: space-between;
}

.nav-links { display: flex; align-items: center; gap: 1rem; }

.nav-link {
  font-size: 0.85rem;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover { color: var(--fg); }

/* ─── Layout ─────────────────────────────────────────── */
.app-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  height: calc(100vh - 65px);
  margin-top: 65px;
  overflow: hidden;
}

/* ─── Chat Panel ─────────────────────────────────────── */
.chat-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.chat-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.chat-header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.receptionist-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid rgba(200, 169, 110, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}

.receptionist-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.receptionist-status {
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-top: 2px;
}

/* ─── Chat Thread ─────────────────────────────────────── */
.chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-behavior: smooth;
}

.chat-thread::-webkit-scrollbar { width: 4px; }
.chat-thread::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.msg {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 85%;
  animation: msgIn 0.3s ease;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.msg-ai { align-self: flex-start; }
.msg-user { align-self: flex-end; }

.msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid rgba(200, 169, 110, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 0.7rem;
  flex-shrink: 0;
  margin-bottom: 0.25rem;
}

.msg-user .msg-avatar { display: none; }

.msg-bubble {
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  line-height: 1.6;
  font-size: 0.9rem;
}

.msg-ai .msg-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 0.25rem;
}

.msg-user .msg-bubble {
  background: var(--accent-dim);
  border: 1px solid rgba(200, 169, 110, 0.2);
  color: var(--fg);
  border-bottom-right-radius: 0.25rem;
}

.msg-meta {
  font-size: 0.7rem;
  color: var(--fg-muted);
  padding: 0 0.25rem;
}

.msg-ai .msg-meta { align-self: flex-start; }
.msg-user .msg-meta { align-self: flex-end; }

/* Typing indicator */
.typing-dots {
  display: flex;
  gap: 4px;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  border-bottom-left-radius: 0.25rem;
  width: fit-content;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fg-muted);
  animation: blink 1.4s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 80%, 100% { opacity: 0.3; }
  40% { opacity: 1; }
}

/* ─── Chat Input Area ─────────────────────────────────── */
.chat-input-area {
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
  background: var(--bg-elevated);
  flex-shrink: 0;
}

/* ─── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #0A0A0B;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: #d4b87a;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--fg);
}

/* ─── Service Cards ──────────────────────────────────── */
.service-cards {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.service-card:hover {
  border-color: rgba(200, 169, 110, 0.35);
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

.service-card.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.service-info { flex: 1; }

.service-name { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.2rem; }
.service-meta { font-size: 0.75rem; color: var(--fg-muted); }

.service-price {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

/* ─── Date Grid ────────────────────────────────────────── */
.date-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
}

.date-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  padding: 0.7rem 0.5rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.8rem;
}

.date-btn:hover {
  border-color: rgba(200, 169, 110, 0.35);
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

.date-btn .date-day {
  font-weight: 600;
  font-size: 1rem;
  display: block;
  margin-bottom: 0.15rem;
}

.date-btn .date-label {
  color: var(--fg-muted);
  font-size: 0.7rem;
}

.date-btn .slots-count {
  color: var(--accent);
  font-size: 0.7rem;
  margin-top: 0.2rem;
}

/* ─── Time Slots ────────────────────────────────────────── */
.time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
}

.time-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  padding: 0.6rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
}

.time-btn:hover {
  border-color: rgba(200, 169, 110, 0.35);
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

/* ─── Details Form ─────────────────────────────────────── */
.details-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-label {
  font-size: 0.75rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field-input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  padding: 0.65rem 0.85rem;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.field-input:focus {
  border-color: rgba(200, 169, 110, 0.4);
  background: var(--bg-elevated);
}

.field-input::placeholder { color: var(--fg-muted); }

/* ─── Summary Panel ────────────────────────────────────── */
.summary-panel {
  background: var(--bg-elevated);
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.summary-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  display: block;
  margin-bottom: 1rem;
}

.summary-empty {
  color: var(--fg-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 2rem 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.summary-row:last-child { border-bottom: none; }

.summary-key { color: var(--fg-muted); }
.summary-val { font-weight: 500; text-align: right; }
.summary-val.accent { color: var(--accent); font-family: var(--font-display); font-size: 1.1rem; }

.summary-divider {
  height: 1px;
  background: var(--border);
  margin: 1rem 0;
}

.summary-confirmed {
  background: var(--accent-dim);
  border: 1px solid rgba(200, 169, 110, 0.25);
  border-radius: 0.8rem;
  padding: 1rem;
  text-align: center;
}

.confirmed-check {
  font-size: 1.5rem;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}

.confirmed-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.confirmed-name {
  font-weight: 600;
  font-size: 0.95rem;
}

/* ─── Modal ────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  backdrop-filter: blur(4px);
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  padding: 2.5rem 2rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid rgba(200, 169, 110, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.5rem;
  margin: 0 auto 1.25rem;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.modal-body {
  color: var(--fg-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* ─── Back Button ───────────────────────────────────────── */
.back-btn {
  background: none;
  border: none;
  color: var(--fg-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.4rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s;
  margin-bottom: 0.75rem;
}

.back-btn:hover { color: var(--fg); }

/* ─── Step label ───────────────────────────────────────── */
.step-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  margin-bottom: 0.75rem;
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
  .app-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }

  .summary-panel {
    border-top: 1px solid var(--border);
    max-height: 200px;
  }

  .date-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .time-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
}

@media (max-width: 480px) {
  .chat-header, .chat-input-area { padding: 1rem; }
  .chat-thread { padding: 1rem; }
}