:root {
  --bg: #f3efe8;
  --surface: rgba(255, 251, 245, 0.85);
  --surface-strong: #fffaf3;
  --text: #18231d;
  --muted: #657169;
  --line: rgba(24, 35, 29, 0.1);
  --brand: #c96f3b;
  --brand-deep: #7e3f1f;
  --accent: #21493b;
  --accent-soft: #dce8df;
  --shadow: 0 30px 80px rgba(47, 33, 19, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(201, 111, 59, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(33, 73, 59, 0.14), transparent 24%),
    linear-gradient(180deg, #201813 0%, #3f2a1f 18%, var(--bg) 18%, var(--bg) 100%);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 auto 24px;
  max-width: 1440px;
  color: #fff5eb;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), #f1bb7e);
  color: #24160f;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.brand-kicker,
.panel-kicker,
.eyebrow,
.content-card__category,
.result-card__eyebrow {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.topbar h1,
.panel-head h3,
.content-card__title,
.result-card h4 {
  margin: 0;
}

.dashboard {
  max-width: 1440px;
  margin: 0 auto;
}

.panel {
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel--hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
  gap: 24px;
  padding: 28px;
}

.hero-copy h2 {
  margin: 0;
  max-width: 14ch;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.2rem, 4vw, 4.4rem);
  line-height: 0.95;
}

.hero-text {
  max-width: 60ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.7;
}

.hero-stats {
  display: grid;
  gap: 14px;
}

.stat-card {
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fffaf4, #f5eee6);
  border: 1px solid var(--line);
}

.stat-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
}

.stat-card strong {
  display: block;
  font-size: 1.8rem;
  font-family: "Space Grotesk", sans-serif;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(360px, 1.15fr);
  gap: 24px;
  margin-top: 24px;
}

.panel--admin,
.panel--search {
  padding: 22px;
}

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

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

.content-form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.content-form__wide,
.content-form__actions {
  grid-column: 1 / -1;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 144px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(201, 111, 59, 0.8);
  box-shadow: 0 0 0 4px rgba(201, 111, 59, 0.12);
}

.content-form__actions,
.prompt-row,
.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.ghost-button,
.prompt-chip {
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--brand), #e39f6f);
  color: #1d140e;
  font-weight: 800;
}

.ghost-button,
.prompt-chip {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.primary-button:hover,
.ghost-button:hover,
.prompt-chip:hover {
  transform: translateY(-1px);
}

.content-list,
.conversation,
.search-results {
  margin-top: 18px;
}

.content-list,
.search-results {
  display: grid;
  gap: 12px;
}

.content-card,
.result-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.66);
}

.content-card__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.content-card__status {
  align-self: start;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.content-card__keywords,
.content-card__content,
.result-card p,
.message p {
  margin: 12px 0 0;
  line-height: 1.65;
}

.content-card__keywords,
.result-card__eyebrow,
.empty-state {
  color: var(--muted);
}

.conversation {
  min-height: 340px;
  max-height: 460px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px;
}

.message {
  max-width: 86%;
  padding: 16px 18px;
  border-radius: 24px;
}

.message--assistant {
  background: linear-gradient(180deg, #1e4336, #285845);
  color: #eff7f1;
  border-bottom-left-radius: 10px;
}

.message--user {
  align-self: flex-end;
  background: linear-gradient(180deg, #fff8ed, #f4e7d5);
  border: 1px solid rgba(126, 63, 31, 0.14);
  border-bottom-right-radius: 10px;
}

.search-form {
  margin-top: 16px;
  align-items: center;
}

.search-form input {
  flex: 1 1 280px;
}

.empty-state {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.45);
}

@media (max-width: 1080px) {
  .panel--hero,
  .workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 14px;
  }

  .topbar {
    align-items: flex-start;
  }

  .panel--hero,
  .panel--admin,
  .panel--search {
    padding: 18px;
  }

  .content-form {
    grid-template-columns: 1fr;
  }

  .hero-copy h2 {
    max-width: none;
    font-size: 2.4rem;
  }

  .content-card__head,
  .panel-head {
    flex-direction: column;
  }

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