:root {
  color-scheme: light;
  --ink: #16211d;
  --muted: #5d6b65;
  --line: #d9e1dd;
  --paper: #f7f8f5;
  --panel: #ffffff;
  --mint: #dff1e8;
  --green: #23654c;
  --blue: #285e7a;
  --amber: #b76b25;
  --shadow: 0 18px 45px rgba(31, 47, 40, 0.12);
}

* {
  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(--paper);
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 28px;
  background: rgba(247, 248, 245, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  font-weight: 800;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

nav a {
  text-decoration: none;
}

.hero {
  min-height: 520px;
  display: grid;
  align-items: end;
  padding: 48px 28px;
  background:
    linear-gradient(90deg, rgba(20, 37, 31, 0.84), rgba(20, 37, 31, 0.34)),
    url("https://images.unsplash.com/photo-1494438639946-1ebd1d20bf85?auto=format&fit=crop&w=1800&q=80") center/cover;
  color: #fff;
}

.hero__content {
  width: min(760px, 100%);
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 800;
}

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

h1 {
  font-size: clamp(46px, 8vw, 86px);
  line-height: 0.95;
}

h2 {
  font-size: 22px;
}

.lead {
  max-width: 620px;
  font-size: 20px;
  line-height: 1.5;
}

.actions,
.quick,
.panel__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.button,
.icon-button,
.quick button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 15px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.primary {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.icon-button {
  width: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.band {
  padding: 26px 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.metrics {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.metrics div {
  padding: 10px 0;
}

.metrics span {
  color: var(--amber);
  font-weight: 800;
}

.metrics strong {
  display: block;
  margin: 6px 0;
  font-size: 18px;
}

.metrics p,
.panel p,
.side li {
  color: var(--muted);
  line-height: 1.5;
}

.workspace,
.admin,
.links {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  gap: 20px;
}

.panel,
.side {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 20px;
}

.side {
  padding: 20px;
}

.panel__head {
  justify-content: space-between;
  margin-bottom: 18px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.quick {
  margin-bottom: 14px;
}

.quick button {
  background: #f4f7f5;
  font-size: 14px;
}

.chat {
  height: 360px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.message {
  width: fit-content;
  max-width: min(620px, 92%);
  padding: 11px 13px;
  border-radius: 8px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.message.assistant {
  background: var(--mint);
}

.message.user {
  align-self: flex-end;
  background: var(--blue);
  color: #fff;
}

.composer,
.lead-form,
.token-form {
  display: grid;
  gap: 10px;
}

.composer {
  margin-top: 14px;
  grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1fr) auto;
  align-items: stretch;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.lead-form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.form-result {
  min-height: 22px;
  margin: 0;
}

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

.links a {
  min-height: 116px;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.links span {
  color: var(--muted);
}

.links strong {
  display: block;
  margin-top: 12px;
  font-size: 20px;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 20px;
}

.admin-head h1 {
  color: var(--ink);
  font-size: clamp(34px, 6vw, 64px);
}

.token-form {
  grid-template-columns: minmax(220px, 320px) auto;
}

.board {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 20px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
}

.events {
  display: grid;
  gap: 12px;
  max-height: 620px;
  overflow: auto;
}

.event {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.event time {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.event p {
  margin: 8px 0 0;
}

@media (max-width: 820px) {
  .topbar {
    padding: 0 16px;
  }

  nav {
    gap: 10px;
  }

  .hero {
    min-height: 460px;
    padding: 38px 18px;
  }

  .metrics,
  .workspace,
  .links,
  .board {
    grid-template-columns: 1fr;
  }

  .composer,
  .token-form {
    grid-template-columns: 1fr;
  }

  .admin-head {
    display: grid;
  }
}
