:root {
  color-scheme: light;
  --ink: #111012;
  --muted: #545056;
  --accent: #d85b45;
  --accent-strong: #b24636;
  --surface: rgba(255, 255, 255, 0.88);
  --panel: #ffffff;
  --border: rgba(20, 17, 25, 0.12);
  --shadow: 0 24px 80px rgba(18, 14, 12, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Space Grotesk", "Helvetica Neue", sans-serif;
  color: var(--ink);
  min-height: 100vh;
  background: radial-gradient(circle at top left, #f9dcc7, #f4f4f1 45%, #e4efe9);
}

.page {
  padding: 32px clamp(20px, 5vw, 60px) 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.top-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 14px 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 16px 40px rgba(18, 14, 12, 0.12);
  border: 1px solid rgba(17, 16, 18, 0.08);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
}

.nav-center {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
}

.nav-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.nav-link {
  background: transparent;
  border: none;
  color: #5f5b63;
  font-size: 15px;
  letter-spacing: 0.02em;
  cursor: pointer;
  padding: 6px 0;
  position: relative;
}

.nav-link.active,
.nav-link:hover {
  color: var(--ink);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 100%;
  background: var(--accent);
}

.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo img {
  height: 44px;
  width: auto;
  display: block;
}

.nav-cta {
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: #ffcc19;
  color: #1a1208;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(255, 204, 25, 0.3);
}

.badge {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.7);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel {
  background: var(--panel);
  border-radius: 22px;
  border: 1px solid var(--border);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}

.hidden {
  display: none;
}

.access-card {
  background: rgba(250, 244, 238, 0.9);
  border: 1px solid rgba(216, 91, 69, 0.2);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 20px;
}

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

.access-header h3 {
  font-size: 16px;
  margin-bottom: 2px;
}

.access-header p {
  font-size: 12px;
  color: var(--muted);
}

.access-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.access-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.access-form input,
.access-form select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 13px;
  background: white;
}

.access-form button {
  padding: 10px 14px;
  border-radius: 12px;
  border: none;
  background: var(--ink);
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.panel-header h2 {
  font-size: 20px;
  margin-bottom: 4px;
}

.panel-header p {
  color: var(--muted);
  font-size: 13px;
}

.account {
  border-color: rgba(17, 16, 18, 0.08);
}

.auth-form {
  display: grid;
  gap: 12px;
  max-width: 420px;
}

.auth-form input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 14px;
}

.auth-form button {
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  background: var(--ink);
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.auth-note {
  margin-top: 12px;
  color: var(--accent-strong);
  font-size: 13px;
}

.ghost {
  border: 1px solid var(--border);
  background: transparent;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 180px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 8px;
}

.message {
  display: flex;
}

.message.user {
  justify-content: flex-end;
}

.bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 16px;
  background: #f6efe9;
  line-height: 1.5;
}

.message.user .bubble {
  background: #fbe4d9;
  border: 1px solid rgba(216, 91, 69, 0.25);
}

.message.bot .bubble {
  background: #f2f4f2;
  border: 1px solid rgba(20, 17, 25, 0.1);
}

.quick-prompts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 12px;
}


.prompt-chip {
  border: 1px solid rgba(216, 91, 69, 0.35);
  background: rgba(216, 91, 69, 0.08);
  color: var(--accent-strong);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.prompt-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(216, 91, 69, 0.15);
}

.composer {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.composer input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 14px;
}

.composer button {
  padding: 12px 18px;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.composer button:hover {
  background: var(--accent-strong);
}

.cards {
  display: grid;
  gap: 16px;
}

.cards.five {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.charts {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.chart-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(20, 17, 25, 0.08);
}

.chart {
  margin-top: 12px;
  height: 140px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  align-items: end;
}

.chart span {
  display: block;
  width: 100%;
  background: linear-gradient(180deg, rgba(216, 91, 69, 0.85), rgba(216, 91, 69, 0.25));
  border-radius: 10px 10px 6px 6px;
}

.card {
  background: var(--surface);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(20, 17, 25, 0.08);
}

.card h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

.metric {
  font-size: 26px;
  font-weight: 600;
  font-family: "Newsreader", "Times New Roman", serif;
}

.sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
  display: block;
}

@media (max-width: 900px) {
  .top-bar {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
  }

  .nav-group,
  .nav-group.right {
    justify-content: center;
    flex-wrap: wrap;
  }

  .messages {
    max-height: 280px;
  }
}
