:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7f4;
  color: #17211b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: #1f6f4a;
  color: #ffffff;
  padding: 11px 14px;
  font-weight: 800;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

button.secondary {
  border: 1px solid #cbd4cc;
  background: #ffffff;
  color: #1f6f4a;
}

input,
textarea {
  width: 100%;
  border: 1px solid #cbd4cc;
  border-radius: 8px;
  background: #fbfcfb;
  color: #17211b;
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 31px;
  line-height: 1.1;
}

h2 {
  margin-bottom: 16px;
  font-size: 30px;
  line-height: 1.15;
}

h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

a {
  color: #1f6f4a;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(230px, 292px) 1fr;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px 20px;
  background: #ffffff;
  border-right: 1px solid #d9e0d8;
}

.brand {
  padding: 0 8px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #66746b;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-menu {
  display: grid;
  gap: 7px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
  background: transparent;
  color: #344239;
  padding: 10px 12px;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: #e8f1ec;
  color: #123b2a;
}

.nav-item span {
  font-weight: 800;
}

.sidebar-footer {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 0 8px;
}

.status,
.health,
.muted {
  margin-bottom: 0;
  color: #66746b;
  font-size: 14px;
  line-height: 1.45;
}

.workspace {
  min-width: 0;
  padding: 32px;
  overflow: auto;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.hero h2 {
  margin-bottom: 0;
  font-size: 42px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.summary-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  min-height: 132px;
  border: 1px solid #d9e0d8;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

.summary-card > span {
  font-size: 26px;
  line-height: 1;
}

.summary-card p {
  margin-bottom: 0;
  color: #66746b;
  font-size: 13px;
  line-height: 1.4;
}

.content-section {
  display: grid;
  gap: 14px;
  max-width: 980px;
  border: 1px solid #d9e0d8;
  border-radius: 8px;
  background: #ffffff;
  padding: 20px;
}

.content-section.narrow {
  max-width: 640px;
}

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

.section-heading h3 {
  margin-bottom: 0;
  font-size: 20px;
}

.memory-list {
  display: grid;
  gap: 10px;
}

.memory-item {
  display: grid;
  gap: 6px;
  border-radius: 8px;
  background: #f5f7f4;
  padding: 12px;
}

.memory-item p {
  margin-bottom: 0;
  line-height: 1.45;
}

.memory-item span,
.empty-state {
  margin-bottom: 0;
  color: #66746b;
  font-size: 13px;
}

.field,
.panel {
  display: grid;
  gap: 10px;
}

.field span {
  color: #48564d;
  font-size: 14px;
  font-weight: 700;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chat {
  display: grid;
  grid-template-rows: minmax(420px, calc(100vh - 170px)) auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d9e0d8;
  border-radius: 8px;
  background: #ffffff;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  overflow-y: auto;
}

.message {
  max-width: 780px;
  border-radius: 8px;
  padding: 14px 16px;
  line-height: 1.5;
}

.message span {
  display: block;
  margin-bottom: 6px;
  color: #536058;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.message p {
  margin-bottom: 0;
  white-space: pre-wrap;
}

.message.user {
  align-self: flex-end;
  background: #dceee3;
}

.message.assistant {
  align-self: flex-start;
  background: #f5f7f4;
  border: 1px solid #d9e0d8;
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 18px;
  background: #ffffff;
  border-top: 1px solid #d9e0d8;
}

.composer textarea {
  min-height: 52px;
  max-height: 160px;
}

.chat.locked .composer {
  display: none;
}

.chat.locked .messages {
  align-items: center;
  justify-content: center;
}

.chat.locked .message {
  max-width: 520px;
}

@media (max-width: 1120px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

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

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid #d9e0d8;
  }

  .nav-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace {
    padding: 22px;
  }

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

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

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

@media (max-width: 520px) {
  .nav-menu {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .button-row {
    align-items: stretch;
    flex-direction: column;
  }
}

