:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17211f;
  background: #eef2f0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(360px, 1.4fr);
  background: linear-gradient(135deg, rgba(33, 116, 100, 0.14), rgba(229, 86, 62, 0.08)), #eef2f0;
}

.brand {
  min-height: 100vh;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #f8fbf8;
  background:
    linear-gradient(rgba(11, 44, 38, 0.74), rgba(11, 44, 38, 0.6)),
    url("https://images.unsplash.com/photo-1558494949-ef010cbdcc31?auto=format&fit=crop&w=1400&q=80");
  background-size: cover;
  background-position: center;
}

.brand h1 {
  margin: 0;
  font-size: 48px;
  letter-spacing: 0;
}

.brand p:not(.eyebrow) {
  max-width: 420px;
  font-size: 18px;
  line-height: 1.55;
  color: rgba(248, 251, 248, 0.88);
}

.eyebrow {
  margin: 0 0 12px;
  color: #768581;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.brand .eyebrow {
  color: rgba(248, 251, 248, 0.7);
}

.workspace {
  width: min(820px, calc(100% - 48px));
  margin: 36px auto;
  align-self: start;
}

.card {
  border: 1px solid #d7dfdc;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  padding: 24px;
  box-shadow: 0 20px 60px rgba(38, 53, 48, 0.12);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  border: 1px solid #cfdad6;
  border-radius: 8px;
  background: #f8faf9;
}

.tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #52625e;
  font-weight: 800;
}

.tabs button.active {
  background: #163e36;
  color: #fff;
}

form,
.stack {
  display: grid;
  gap: 16px;
}

h2,
h3,
p {
  overflow-wrap: anywhere;
}

h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

label {
  display: grid;
  gap: 8px;
  color: #40504c;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid #c8d2ce;
  border-radius: 6px;
  background: #fff;
  color: #17211f;
  outline: 0;
}

input {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 92px;
  padding: 12px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: #217464;
  box-shadow: 0 0 0 3px rgba(33, 116, 100, 0.14);
}

.primary,
.ghost {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 6px;
  padding: 0 16px;
  font-weight: 800;
}

.primary {
  border: 0;
  background: #217464;
  color: #fff;
}

.primary:hover {
  background: #185b4f;
}

.ghost {
  border: 1px solid #cbd6d2;
  background: #fff;
  color: #20342f;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.panel {
  border: 1px solid #d7dfdc;
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  display: grid;
  gap: 14px;
}

.wide {
  grid-column: 1 / -1;
}

.row {
  display: grid;
  grid-template-columns: minmax(96px, 0.75fr) minmax(0, 1.25fr);
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #edf1ef;
}

.row span {
  color: #6d7b77;
  font-size: 13px;
  font-weight: 800;
}

.row strong {
  overflow-wrap: anywhere;
}

.ok {
  color: #1e755f;
}

.warn,
.error {
  color: #b2412d;
}

.muted {
  color: #667571;
}

code {
  display: block;
  border: 1px solid #d1dcd8;
  border-radius: 6px;
  padding: 10px 12px;
  background: #f2f6f4;
  color: #14231f;
  font-family: "SFMono-Regular", Consolas, monospace;
  overflow-wrap: anywhere;
}

.codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.messages {
  min-height: 180px;
  max-height: 320px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dce4e1;
  border-radius: 8px;
  background: #f8faf9;
}

.message {
  width: min(82%, 560px);
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #d9e2df;
}

.message.admin {
  justify-self: end;
  background: #173e36;
  color: #fff;
}

.message b {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: #71807c;
}

.message.admin b {
  color: rgba(255, 255, 255, 0.72);
}

.chat-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

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

  .brand {
    min-height: 300px;
    padding: 34px 24px;
  }

  .workspace {
    width: min(820px, calc(100% - 28px));
  }
}

@media (max-width: 640px) {
  .tabs,
  .grid,
  .codes,
  .chat-form {
    grid-template-columns: 1fr;
  }

  .row {
    grid-template-columns: 1fr;
  }
}
