@import url('https://fonts.googleapis.com/css2?family=Marcellus&family=Nunito:wght@400;600;700&display=swap');

:root {
  --bg-cream: #f9f3ea;
  --bg-beige: #efe4d3;
  --bg-lavender: #e9e2f4;
  --bg-mist: #f6efe7;
  --panel: rgba(255, 251, 245, 0.95);
  --panel-soft: rgba(250, 242, 232, 0.9);
  --text-main: #2f2a26;
  --text-soft: #6c6258;
  --line: rgba(61, 52, 43, 0.14);
  --gold: #c69744;
  --forest: #46654a;
  --lavender: #8f76b7;
  --rose: #b06460;
  --ok: #32643a;
  --warn: #8e473f;
  --shadow: 0 22px 46px rgba(61, 46, 34, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  font-family: 'Nunito', sans-serif;
  background:
    radial-gradient(circle at 10% 6%, rgba(143, 118, 183, 0.24), transparent 35%),
    radial-gradient(circle at 88% 10%, rgba(198, 151, 68, 0.16), transparent 34%),
    linear-gradient(165deg, var(--bg-cream) 0%, var(--bg-beige) 56%, #e9dbc8 100%);
}

h1,
h2,
h3 {
  font-family: 'Marcellus', serif;
  margin: 0;
  letter-spacing: 0.01em;
}

h1 {
  font-size: 2.3rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.4rem;
  line-height: 1.3;
}

h3 {
  font-size: 1.08rem;
}

p {
  margin: 0;
  color: var(--text-soft);
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--text-soft);
  font-weight: 700;
}

a {
  color: var(--lavender);
}

input,
select,
textarea,
button {
  width: 100%;
  font-family: inherit;
  font-size: 0.96rem;
  border-radius: 12px;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-main);
  padding: 11px 12px;
}

textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.45;
}

button {
  border: none;
  padding: 11px 13px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.16s ease, filter 0.16s ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(115deg, #906cb8, #6b8e73 82%);
}

.btn-soft {
  color: #fff;
  background: linear-gradient(115deg, #c99745, #ac7f3d 82%);
}

.btn-ghost {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
}

.btn-danger {
  color: #fff;
  background: linear-gradient(115deg, #b75d5a, #9b4f4a 85%);
}

.tiny-link {
  width: auto;
  border: 0;
  background: transparent;
  color: var(--lavender);
  font-weight: 700;
  padding: 0;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
}

.sky-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 76% 82%, rgba(70, 101, 74, 0.14), transparent 35%),
    radial-gradient(circle at 22% 72%, rgba(143, 118, 183, 0.12), transparent 34%);
}

.client-shell,
.admin-shell {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 22px;
  display: grid;
  gap: 18px;
}

.client-shell {
  grid-template-columns: 330px 1fr;
}

.admin-shell {
  grid-template-columns: 330px 1fr;
}

.client-sidebar,
.admin-sidebar {
  background: var(--panel-soft);
  padding: 16px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.client-main,
.admin-main {
  display: grid;
  gap: 16px;
}

.hero-panel {
  padding: 18px;
  display: grid;
  gap: 16px;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: start;
}

.hero-panel.compact {
  grid-template-columns: 1fr;
}

.mini-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--forest);
  font-weight: 700;
  margin-bottom: 6px;
}

.hero-text {
  display: grid;
  gap: 10px;
}

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

.hero-tags span {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--text-main);
}

.hero-image {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  min-height: 220px;
  max-height: 300px;
  object-fit: cover;
}

.form-panel,
.chat-panel {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.stack-10 {
  display: grid;
  gap: 10px;
}

.row {
  display: grid;
  gap: 10px;
}

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

.row.three {
  grid-template-columns: repeat(3, 1fr);
}

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

.align-center {
  align-items: center;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.status {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 12px;
  padding: 9px 11px;
  font-size: 0.88rem;
  color: var(--text-soft);
}

.status.ok {
  color: var(--ok);
}

.status.warn {
  color: var(--warn);
}

.hint-box {
  border: 1px dashed rgba(143, 118, 183, 0.38);
  border-radius: 12px;
  padding: 11px;
  color: var(--text-soft);
  font-size: 0.88rem;
  background: rgba(143, 118, 183, 0.05);
  align-self: end;
}

.live-feedback {
  min-height: 40px;
  display: grid;
  align-items: center;
  border-radius: 12px;
  border: 1px dashed rgba(198, 151, 68, 0.42);
  background: rgba(198, 151, 68, 0.08);
  color: #6c552f;
  font-size: 0.88rem;
  padding: 8px 12px;
}

.action-row {
  margin-top: 2px;
}

.sessions {
  max-height: 260px;
  overflow: auto;
  display: grid;
  gap: 8px;
}

.session-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  text-align: left;
  font-size: 0.84rem;
  color: var(--text-main);
  padding: 8px 10px;
}

.session-btn.active {
  border-color: rgba(143, 118, 183, 0.46);
  background: rgba(143, 118, 183, 0.1);
}

.chat-log {
  max-height: 540px;
  overflow: auto;
  display: grid;
  gap: 10px;
  padding-right: 4px;
}

.bubble {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.88);
}

.bubble.user {
  background: rgba(70, 101, 74, 0.08);
  border-color: rgba(70, 101, 74, 0.32);
}

.bubble.assistant {
  background: rgba(143, 118, 183, 0.07);
  border-color: rgba(143, 118, 183, 0.25);
}

.bubble strong {
  display: block;
  margin-bottom: 4px;
}

.bubble-meta {
  margin-top: 6px;
  font-size: 0.78rem;
  color: #6d5b85;
}

.processing-wrap {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  align-items: start;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(143, 118, 183, 0.24);
  border-top-color: var(--lavender);
  animation: spin 1s linear infinite;
  margin-top: 3px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.response {
  line-height: 1.55;
}

.response p {
  margin: 0 0 8px;
  color: var(--text-main);
}

.response strong {
  color: #5c4780;
  font-size: 0.98rem;
}

.response ul,
.response ol {
  margin: 0 0 10px;
  padding-left: 20px;
}

.response li {
  margin-bottom: 5px;
  color: var(--text-main);
}

.response .hl {
  background: rgba(198, 151, 68, 0.18);
  border-radius: 6px;
  padding: 0 4px;
  color: #5b451f;
}

.cards {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  margin-top: 8px;
}

.card-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.84);
  font-size: 0.85rem;
}

.card-item b {
  display: block;
  color: var(--text-main);
  margin-bottom: 3px;
}

.card-item small {
  color: var(--text-soft);
  line-height: 1.35;
}

.footer-note {
  padding: 12px 14px;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.small-note {
  font-size: 0.82rem;
  color: var(--text-soft);
}

.table-wrap {
  overflow: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table th,
.admin-table td {
  border: 1px solid var(--line);
  padding: 8px;
  vertical-align: top;
  text-align: left;
  background: rgba(255, 255, 255, 0.7);
}

.admin-table th {
  background: rgba(198, 151, 68, 0.13);
}

.actions {
  display: grid;
  gap: 6px;
}

.actions button {
  padding: 7px 8px;
  font-size: 0.78rem;
}

@media (max-width: 1180px) {
  .client-shell,
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .chat-log {
    max-height: 420px;
  }
}

@media (max-width: 780px) {
  h1 {
    font-size: 1.9rem;
  }

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

  .client-shell,
  .admin-shell {
    padding: 14px;
    gap: 12px;
  }

  .card {
    border-radius: 16px;
  }
}
