:root {
  color-scheme: light;
  --ink: #15201d;
  --muted: #5d6b66;
  --line: #d8e1dd;
  --bg: #f7faf8;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-2: #b42318;
  --soft: #edf7f4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.8fr);
  gap: 16px;
  height: 100vh;
  padding: 16px;
}

.chat-panel,
.side-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 0;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
}

header,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  background: #fff;
}

.switch input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
}

h2 {
  font-size: 15px;
}

header p,
.muted,
.status {
  color: var(--muted);
  font-size: 13px;
}

.chat-log {
  overflow: auto;
  padding: 18px;
}

.message {
  max-width: 78%;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 8px;
  white-space: pre-wrap;
  line-height: 1.45;
}

.message-body {
  display: inline;
}

.user {
  margin-left: auto;
  color: #fff;
  background: var(--accent);
}

.assistant {
  background: var(--soft);
  border: 1px solid #cce8e1;
}

.thinking {
  width: fit-content;
  margin: 0 0 12px;
  padding: 8px 11px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}

.citations {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.citation-badge {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin: 8px 0 0;
  padding: 0;
  color: var(--accent);
  background: #fff;
  border: 1px solid #b7d8d1;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.composer {
  display: grid;
  grid-template-columns: 42px 1fr 84px;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

input,
button,
select,
textarea {
  height: 40px;
  border-radius: 6px;
  border: 1px solid var(--line);
  font: inherit;
}

input,
select,
textarea {
  padding: 0 12px;
}

textarea {
  min-height: 72px;
  padding-top: 10px;
  resize: vertical;
}

button {
  cursor: pointer;
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

button.secondary {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

button.icon.recording {
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.status {
  height: 24px;
  padding: 0 16px;
}

.side-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0;
  overflow: hidden;
}

.side-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.side-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.side-tabs button {
  height: 44px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.side-tabs button:hover {
  background: rgba(0, 0, 0, 0.03);
  color: var(--ink);
}

.side-tabs button.active {
  color: var(--accent);
  background: #fff;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.tab-pane {
  display: none;
  flex-direction: column;
  min-height: 0;
}

.tab-pane.active {
  display: flex;
  flex: 1;
}

.side-panel section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 14px;
  overflow: auto;
}

.side-panel section[hidden] {
  display: none;
}

.list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.row,
.details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.row {
  cursor: pointer;
}

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

.row span,
.details li {
  color: var(--muted);
  font-size: 13px;
}

.stock {
	display: grid;
	grid-template-columns: 1fr auto;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.booking-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin: 12px 0;
}

.booking-form button {
	grid-column: span 2;
}

.support-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f1;
  font-size: 12px;
}

.pill.good {
  color: #075e54;
  background: #dcfce7;
}

.pill.bad {
  color: #8a1f11;
  background: #fee2e2;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
    height: auto;
  }

  .chat-panel {
    min-height: 70vh;
  }

  .side-panel {
    min-height: 80vh;
  }
}
