:root {
  --bg: #f2efe7;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: #ffffff;
  --ink: #182126;
  --muted: #5e6a71;
  --line: rgba(24, 33, 38, 0.12);
  --accent: #0d9488;
  --accent-dark: #0f766e;
  --shadow: 0 20px 60px rgba(30, 41, 59, 0.08);
  --radius: 22px;
  --font-sans: "Avenir Next", "Segoe UI Variable", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(13, 148, 136, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.12), transparent 24%),
    linear-gradient(180deg, #f4f1e8 0%, #ece7dc 100%);
  font-family: var(--font-sans);
}

a {
  color: inherit;
  text-decoration: none;
}

code,
pre {
  font-family: "SFMono-Regular", "Menlo", monospace;
}

.page-shell {
  min-height: 100vh;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.brand {
  display: inline-block;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-copy {
  margin: 4px 0 0;
  color: var(--muted);
}

.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
}

.sidebar,
.panel,
.stat-card {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sidebar {
  padding: 18px;
  position: sticky;
  top: 24px;
  align-self: start;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav a {
  padding: 11px 12px;
  border-radius: 14px;
  color: var(--muted);
  transition: 140ms ease;
}

.nav a.active,
.nav a:hover {
  background: rgba(13, 148, 136, 0.12);
  color: var(--ink);
}

.content {
  display: grid;
  gap: 20px;
}

.hero,
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
}

h1,
h2 {
  margin: 0 0 8px;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2.1rem, 4vw, 3.5rem);
}

h2 {
  font-size: 1.2rem;
}

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

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 18px;
}

.stat-card span {
  display: block;
  font-size: 0.92rem;
  color: var(--muted);
}

.stat-card strong {
  display: block;
  margin-top: 12px;
  font-size: 2rem;
}

.two-column {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.panel {
  padding: 22px;
}

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

.panel-heading h2 {
  margin-bottom: 0;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.92rem;
  color: var(--muted);
}

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

input,
select,
textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(24, 33, 38, 0.16);
  background: rgba(255, 255, 255, 0.9);
  padding: 13px 14px;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.primary-button,
.ghost-button,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: 140ms ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), #14b8a6);
  color: white;
}

.primary-button:hover {
  transform: translateY(-1px);
}

.ghost-button,
.ghost-link {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(24, 33, 38, 0.16);
  color: var(--ink);
}

.ghost-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.notice,
.error-box,
.dev-hint {
  border-radius: 16px;
  padding: 14px 16px;
}

.notice {
  background: rgba(13, 148, 136, 0.12);
  border: 1px solid rgba(13, 148, 136, 0.22);
}

.error-box {
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.dev-hint {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.2);
  display: grid;
  gap: 8px;
}

.list-stack {
  display: grid;
  gap: 12px;
}

.guest-row,
.journey-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(24, 33, 38, 0.08);
}

.journey-card {
  flex-direction: column;
}

.active-card {
  border-color: rgba(13, 148, 136, 0.3);
  box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.24);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.12);
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 700;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(24, 33, 38, 0.08);
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.thread {
  display: grid;
  gap: 12px;
}

.bubble {
  max-width: 82%;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(24, 33, 38, 0.08);
}

.bubble.outbound {
  margin-left: auto;
  background: rgba(13, 148, 136, 0.12);
}

.bubble.inbound {
  background: rgba(14, 165, 233, 0.1);
}

.bubble-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.roadmap-card {
  min-height: 180px;
}

.narrow-panel {
  max-width: 700px;
}

.code-panel pre {
  margin: 0;
  overflow: auto;
  padding: 16px;
  border-radius: 16px;
  background: #192127;
  color: #f8fafc;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(520px, 100%);
  padding: 30px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(24, 33, 38, 0.12);
  box-shadow: var(--shadow);
}

@media (max-width: 980px) {
  .layout,
  .two-column {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .hero,
  .section-header,
  .topbar {
    align-items: start;
    flex-direction: column;
  }

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