* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f7fb;
  color: #111827;
}

.app {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #0f172a;
  color: white;
  padding: 28px;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 36px;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.brand h1 {
  font-size: 20px;
  margin: 0;
}

.brand p {
  margin: 4px 0 0;
  color: #94a3b8;
  font-size: 13px;
}

nav {
  display: grid;
  gap: 10px;
}

nav a {
  color: #cbd5e1;
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 12px;
}

nav a.active,
nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.main {
  padding: 32px;
  display: grid;
  gap: 24px;
}

.hero,
.card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.eyebrow {
  margin: 0 0 8px;
  color: #2563eb;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h2,
h3 {
  margin: 0;
}

.hero h2 {
  font-size: 28px;
}

.hero p:last-child {
  margin-bottom: 0;
  color: #64748b;
}

button {
  border: 0;
  background: #2563eb;
  color: white;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
}

button:hover {
  background: #1d4ed8;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.card-header button {
  background: #e0e7ff;
  color: #3730a3;
}

.session-info {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 12px;
}

.chat-box {
  min-height: 260px;
  max-height: 420px;
  overflow-y: auto;
  background: #f8fafc;
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.message {
  max-width: 75%;
  padding: 12px 14px;
  border-radius: 16px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.message.user {
  justify-self: end;
  background: #2563eb;
  color: white;
}

.message.assistant {
  justify-self: start;
  background: white;
  border: 1px solid #e5e7eb;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

input {
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
}

.appointments-list {
  display: grid;
  gap: 12px;
}

.appointment {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f8fafc;
}

.appointment strong {
  font-size: 15px;
}

.appointment span {
  color: #64748b;
  font-size: 14px;
}

@media (max-width: 800px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 16px;
  }

  .hero {
    display: grid;
    gap: 16px;
  }

  .message {
    max-width: 90%;
  }
}

.conversations-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
}

.sessions-list,
.messages-list {
  background: #f8fafc;
  border-radius: 18px;
  padding: 14px;
  min-height: 280px;
  max-height: 520px;
  overflow-y: auto;
}

.session-item {
  padding: 12px;
  border-radius: 14px;
  background: white;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  margin-bottom: 10px;
}

.session-item:hover {
  border-color: #2563eb;
}

.session-item strong {
  display: block;
  font-size: 14px;
}

.session-item span {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-top: 4px;
}

.message-row {
  padding: 12px;
  border-radius: 14px;
  margin-bottom: 10px;
  background: white;
  border: 1px solid #e5e7eb;
}

.message-row.user {
  border-left: 4px solid #2563eb;
}

.message-row.assistant {
  border-left: 4px solid #10b981;
}

.message-row strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

@media (max-width: 900px) {
  .conversations-layout {
    grid-template-columns: 1fr;
  }
}

.agents-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
}

.agent-form {
  display: grid;
  gap: 14px;
}

.agent-form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: #334155;
}

textarea {
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

@media (max-width: 900px) {
  .agents-layout {
    grid-template-columns: 1fr;
  }
}

.voice-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.slot-form {
  display: grid;
  grid-template-columns: 1fr 240px auto;
  gap: 12px;
  margin-bottom: 18px;
}

.slot-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.slot-actions button {
  padding: 8px 10px;
  font-size: 13px;
}

.slot-booked {
  opacity: 0.55;
}

@media (max-width: 900px) {
  .slot-form {
    grid-template-columns: 1fr;
  }
}

.hidden {
  display: none !important;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f4f7fb;
}

.login-card {
  width: min(420px, 100%);
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 18px;
}

.login-brand {
  color: #111827;
  margin-bottom: 8px;
}

.login-card label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  color: #334155;
}

.hero-actions {
  display: flex;
  gap: 10px;
}

.secondary-button {
  background: #e5e7eb;
  color: #111827;
}

.secondary-button:hover {
  background: #d1d5db;
}