:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-soft: #f8faf7;
  --text: #171c20;
  --muted: #7a8288;
  --line: #e4e8ea;
  --accent: #a0d11d;
  --accent-soft: #eef8cf;
  --blue: #3c78d8;
  --orange: #d96f22;
  --red: #d94b5b;
  --green: #2f8b71;
  --shadow: 0 18px 60px rgba(29, 37, 45, 0.08);
  --font-jp: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic", YuGothic, Meiryo, "Noto Sans JP", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-jp);
  font-feature-settings: "palt" 0;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

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

.topbar {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(244, 245, 247, 0.86);
  display: flex;
  gap: 24px;
  justify-content: center;
  min-height: 76px;
  padding: 16px 28px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
  position: absolute;
  left: 34px;
  text-decoration: none;
}

.nav {
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 2px;
  padding: 5px;
}

.nav a {
  border-radius: 999px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  min-width: 76px;
  padding: 8px 16px;
  text-align: center;
  text-decoration: none;
}

.nav a.active {
  background: var(--accent-soft);
  color: var(--text);
}

.hero,
.page {
  margin: 0 auto;
  max-width: 1220px;
  padding: 56px 32px 72px;
}

.page.narrow {
  max-width: 980px;
}

.hero-split {
  align-items: center;
  display: grid;
  gap: 56px;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  min-height: calc(100vh - 76px);
}

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

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

h1 {
  font-size: 54px;
  letter-spacing: 0;
  line-height: 1.1;
  margin-bottom: 18px;
}

h2 {
  font-size: 24px;
  letter-spacing: 0;
  margin-bottom: 6px;
}

h3 {
  font-size: 18px;
  letter-spacing: 0;
  margin-bottom: 4px;
}

.lead {
  color: #3f474d;
  font-size: 19px;
  max-width: 760px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.actions.compact {
  margin-top: 14px;
}

.button,
.icon-button {
  align-items: center;
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  text-decoration: none;
}

.button.ghost {
  background: var(--surface);
  border: 1px solid var(--line);
}

.icon-button {
  border-radius: 50%;
  font-size: 22px;
  height: 52px;
  padding: 0;
  width: 52px;
}

.icon-button.loading {
  opacity: 0.55;
}

.hero-flow {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.flow-line {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 6px;
  padding: 18px;
}

.flow-line:last-child {
  border-bottom: 0;
}

.flow-line span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.flow-line strong {
  font-size: 20px;
}

.flow-line.accent {
  background: var(--accent-soft);
  border-radius: 18px;
}

.wide-section {
  border-top: 1px solid var(--line);
  margin: 0 auto;
  max-width: 1220px;
  padding: 52px 32px 80px;
}

.section-head {
  align-items: flex-end;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-head p {
  color: var(--muted);
  margin-bottom: 0;
  max-width: 520px;
}

.section-head.compact {
  align-items: flex-start;
  display: block;
  margin-bottom: 14px;
}

.feature-list,
.settings-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.feature-row {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 20px;
  grid-template-columns: 72px 1fr;
  padding: 24px;
}

.feature-row:last-child {
  border-bottom: 0;
}

.feature-row p {
  color: var(--muted);
  margin-bottom: 0;
}

.number {
  color: var(--accent);
  font-size: 28px;
  font-weight: 700;
}

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

.page-head h1 {
  font-size: 36px;
  margin-bottom: 0;
}

.head-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.status-strip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 22px;
  overflow: hidden;
}

.status-item {
  border-right: 1px solid var(--line);
  padding: 18px 20px;
}

.status-item:last-child {
  border-right: 0;
}

.status-item span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.status-item strong {
  display: block;
  font-size: 30px;
  line-height: 1.1;
  margin-top: 2px;
}

.workspace {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 390px;
}

.list-pane,
.detail-pane,
.report-main,
.report-side,
.two-tables > div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.filterbar {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 240px;
  padding: 16px;
}

.segmented {
  background: #e9ebef;
  border-radius: 999px;
  display: grid;
  gap: 2px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 4px;
}

.segment {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  min-height: 36px;
}

.segment.active {
  background: var(--surface);
}

.search {
  align-items: center;
  display: grid;
  gap: 6px;
}

.search span,
.settings-grid label,
.field-row label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  min-height: 40px;
  padding: 8px 12px;
  width: 100%;
}

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

.table-wrap {
  overflow: auto;
}

.table {
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 13px 16px;
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.table tr {
  cursor: pointer;
}

.table tbody tr:hover,
.table tr.selected {
  background: var(--surface-soft);
}

.table td strong,
.table td span {
  display: block;
}

.table td span {
  color: var(--muted);
  font-size: 12px;
}

.badge,
.result,
.topics span {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  white-space: nowrap;
}

.badge.sales {
  background: #feecef;
  color: var(--red);
}

.badge.reservation,
.badge.customer,
.badge.vendor {
  background: var(--accent-soft);
  color: var(--text);
}

.badge.complaint {
  background: #fff0df;
  color: var(--orange);
}

.badge.unknown {
  background: #eef0f2;
  color: var(--text);
}

.result {
  background: #eef0f2;
  color: var(--text);
}

.result.needs_review {
  background: #fff0df;
  color: var(--orange);
}

.result.email_notified,
.result.reviewed,
.result.transferred {
  background: var(--accent-soft);
}

.detail-pane {
  min-height: 560px;
  padding: 20px;
  position: sticky;
  top: 98px;
}

.empty-state {
  align-items: center;
  color: var(--muted);
  display: grid;
  min-height: 440px;
  place-content: center;
  text-align: center;
}

.empty-state strong {
  color: var(--text);
  display: block;
  font-size: 20px;
}

.detail-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding-bottom: 16px;
}

.detail-head h2 {
  margin: 10px 0 2px;
}

.detail-head p {
  color: var(--muted);
  margin-bottom: 0;
}

.confidence {
  align-items: center;
  background: var(--accent);
  border-radius: 50%;
  display: inline-flex;
  font-weight: 700;
  height: 58px;
  justify-content: center;
  min-width: 58px;
}

.detail-list {
  display: grid;
  margin: 16px 0;
}

.detail-list div {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 92px 1fr;
  padding: 10px 0;
}

.detail-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.detail-list dd {
  margin: 0;
}

.detail-section {
  border-top: 1px solid var(--line);
  padding: 16px 0 0;
}

.detail-section h3 {
  font-size: 15px;
}

.detail-section p {
  color: #3f474d;
}

.field-row,
.settings-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 340px;
  margin-bottom: 18px;
}

.report-main,
.report-side {
  padding: 22px;
}

.bars {
  display: grid;
  gap: 14px;
}

.bar-row {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 120px 1fr 54px;
}

.bar-bg {
  background: #e8ecef;
  border-radius: 999px;
  height: 13px;
  overflow: hidden;
}

.bar-fill {
  background: var(--accent);
  border-radius: inherit;
  height: 100%;
}

.bar-fill.sales {
  background: var(--red);
}

.bar-fill.unknown {
  background: var(--muted);
}

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

.topics span {
  background: var(--surface-soft);
}

.two-tables {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.two-tables > div {
  overflow: hidden;
  padding-top: 18px;
}

.two-tables .section-head {
  padding: 0 18px;
}

.settings-block {
  margin-bottom: 18px;
  padding: 22px;
}

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

.check-list label {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  font-weight: 600;
  gap: 10px;
  padding: 10px 0;
}

.check-list label:last-child {
  border-bottom: 0;
}

.check-list input {
  accent-color: var(--accent);
  min-height: auto;
  width: auto;
}

.todo-list {
  margin: 0;
  padding-left: 22px;
}

.todo-list li {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.todo-list li:last-child {
  border-bottom: 0;
}

.toast {
  background: var(--text);
  border-radius: 999px;
  bottom: 28px;
  box-shadow: var(--shadow);
  color: var(--surface);
  font-weight: 700;
  left: 50%;
  padding: 12px 18px;
  position: fixed;
  transform: translateX(-50%);
  z-index: 20;
}

.button.full {
  width: 100%;
}

.button:disabled {
  cursor: default;
  opacity: 0.6;
}

.auth-page {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 76px);
  padding: 42px 20px;
}

.auth-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  max-width: 520px;
  padding: 34px;
  width: 100%;
}

.auth-shell.wide {
  max-width: 760px;
}

.auth-shell h1 {
  font-size: 36px;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-form label,
.agent-form label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
}

.auth-form.two .form-message,
.auth-form.two .button {
  grid-column: 1 / -1;
}

.form-message {
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  min-height: 20px;
}

.auth-note {
  color: var(--muted);
  font-size: 14px;
  margin: 18px 0 0;
}

.auth-note a {
  color: var(--text);
  font-weight: 700;
}

.onboarding-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 390px;
}

.onboarding-main,
.issued-agent {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.agent-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.issued-agent {
  position: sticky;
  top: 98px;
}

.issued-agent dl {
  display: grid;
  gap: 0;
  margin: 18px 0 0;
}

.issued-agent div {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.issued-agent dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.issued-agent dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.hidden {
  display: none !important;
}

.app-page {
  max-width: 1320px;
}

.app-tabs {
  background: #e9ebef;
  border-radius: 999px;
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-bottom: 20px;
  padding: 4px;
}

.app-tabs button {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  min-height: 38px;
}

.app-tabs button.active {
  background: var(--surface);
}

.app-grid {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
}

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

.app-panel.span-2 {
  grid-column: 1 / -1;
}

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

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

.panel-head span {
  color: var(--muted);
  font-weight: 700;
}

.advanced-field {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.advanced-field summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

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

.line-item {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px 0;
}

.line-item:first-child {
  border-top: 0;
}

.line-item strong,
.line-item span {
  display: block;
}

.line-item span,
.empty-copy {
  color: var(--muted);
  font-size: 13px;
}

.line-item details {
  grid-column: 1 / -1;
}

.line-item summary {
  cursor: pointer;
  font-weight: 700;
}

.agent-edit {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.agent-edit label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
}

.agent-edit label:nth-child(3),
.agent-edit label:nth-child(4),
.agent-edit button {
  grid-column: 1 / -1;
}

.mini-dl {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-top: 12px;
}

.mini-dl div {
  display: grid;
  gap: 8px;
  grid-template-columns: 110px minmax(0, 1fr);
}

.mini-dl dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mini-dl dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.button.mini {
  font-size: 12px;
  min-height: 32px;
  padding: 6px 12px;
}

.qr-box {
  display: grid;
  gap: 16px;
  justify-items: start;
  margin-top: 18px;
}

.qr-box img {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  width: 250px;
}

.issued-agent.flat {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  position: static;
}

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

.settings-form label {
  align-items: center;
  display: flex;
  gap: 10px;
  font-weight: 700;
}

.settings-form label.wide,
.settings-form .form-message,
.settings-form .button {
  grid-column: 1 / -1;
}

.settings-form label.wide {
  align-items: stretch;
  color: var(--muted);
  display: grid;
  font-size: 12px;
}

.settings-form input[type="checkbox"] {
  accent-color: var(--accent);
  min-height: auto;
  width: auto;
}

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

.price-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px 0;
}

.price-row:first-child {
  border-top: 0;
}

.price-row.active {
  background: var(--accent-soft);
  margin-inline: -14px;
  padding-inline: 14px;
}

.price-row span {
  color: var(--muted);
  display: block;
  font-size: 13px;
}

@media (max-width: 980px) {
  .brand {
    position: static;
  }

  .topbar {
    justify-content: space-between;
  }

  .hero-split,
  .workspace,
  .report-grid,
  .two-tables,
  .onboarding-layout,
  .app-grid {
    grid-template-columns: 1fr;
  }

  .detail-pane,
  .issued-agent {
    position: static;
  }

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

  .app-tabs {
    border-radius: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 700px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    overflow-x: auto;
    width: 100%;
  }

  .nav a {
    min-width: 72px;
  }

  .hero,
  .page,
  .wide-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  h1 {
    font-size: 38px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-strip,
  .field-row,
  .settings-grid,
  .auth-form.two,
  .agent-edit,
  .settings-form {
    grid-template-columns: 1fr;
  }

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

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

.console-body {
  --console-bg: #111312;
  --console-panel: #242524;
  --console-line: rgba(255, 255, 255, 0.075);
  --console-text: #f4f5f2;
  --console-muted: #9b9f9a;
  --console-green: #a0d11d;
  --console-green-strong: #49c365;
  background: radial-gradient(circle at 70% 0%, rgba(160, 209, 29, 0.055), transparent 34%), linear-gradient(135deg, #141615 0%, #0f1110 44%, #171817 100%);
  color: var(--console-text);
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
}

.console-body input,
.console-body select,
.console-body textarea {
  background: #363736;
  border-color: rgba(255, 255, 255, 0.07);
  color: var(--console-text);
}

.console-body input::placeholder,
.console-body textarea::placeholder {
  color: #737771;
}

.console-sidebar {
  background: linear-gradient(180deg, rgba(20, 22, 21, 0.98), rgba(15, 17, 16, 0.98));
  border-right: 1px solid var(--console-line);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-y: auto;
  padding: 18px 16px;
}

.console-brand {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 22px;
  padding: 0 6px;
}

.console-brand a {
  color: var(--console-text);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.12);
}

.collapse-button {
  background: #181a19;
  border: 1px solid var(--console-line);
  border-radius: 50%;
  color: var(--console-muted);
  height: 28px;
  width: 28px;
}

.console-nav {
  display: grid;
  gap: 4px;
}

.console-nav.secondary {
  margin-top: 14px;
}

.console-nav button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 12px;
  color: #b8bbb6;
  cursor: pointer;
  display: grid;
  font-size: 15px;
  font-weight: 700;
  gap: 12px;
  grid-template-columns: 24px 1fr;
  min-height: 38px;
  padding: 0 14px;
  text-align: left;
}

.console-nav button span {
  color: #b7bbb6;
  text-align: center;
}

.console-nav button.active {
  background: #2a2c2a;
  color: var(--console-green-strong);
}

.console-nav button.active span {
  color: var(--console-green-strong);
}

.credit-block {
  background: linear-gradient(135deg, rgba(160, 209, 29, 0.18), rgba(47, 139, 113, 0.16));
  border: 1px solid rgba(160, 209, 29, 0.1);
  border-radius: 18px;
  margin: auto 0 12px;
  padding: 14px 18px;
}

.credit-block span,
.credit-block strong {
  color: var(--console-green-strong);
  display: block;
}

.credit-block span {
  font-size: 14px;
  font-weight: 700;
}

.credit-block strong {
  font-size: 28px;
  line-height: 1.2;
}

.console-user {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 42px 1fr auto;
  margin-top: 14px;
  min-width: 0;
  padding: 4px;
}

.console-user strong,
.console-user span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.console-user > div {
  min-width: 0;
}

.console-user strong {
  font-size: 14px;
}

.console-user span {
  color: var(--console-muted);
  font-size: 12px;
}

.avatar {
  align-items: center;
  background: #72b238;
  border: 3px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-weight: 700;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.avatar.large {
  font-size: 30px;
  height: 76px;
  width: 76px;
}

.logout-link {
  background: transparent;
  border: 0;
  color: var(--console-muted);
  cursor: pointer;
  font-size: 12px;
}

.console-shell {
  height: 100vh;
  overflow: auto;
  padding: 10px 10px 10px 0;
}

.console-view {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 38%), rgba(18, 20, 19, 0.92);
  border: 1px solid var(--console-line);
  border-radius: 28px;
  min-height: calc(100vh - 20px);
  padding: 32px;
}

.console-view.hidden,
[hidden] {
  display: none !important;
}

.console-head {
  align-items: flex-start;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 26px;
}

.console-head h1,
.welcome-panel h1,
.docs-main h1 {
  color: var(--console-text);
  font-size: 34px;
  letter-spacing: 0;
  line-height: 1.08;
  margin: 0 0 8px;
}

.console-head p,
.welcome-panel p,
.panel-title p,
.empty-state p,
.empty-mini p,
.docs-main p {
  color: var(--console-muted);
  font-size: 16px;
  margin: 0;
}

.console-primary,
.console-secondary {
  align-items: center;
  border: 0;
  border-radius: 10px;
  color: #101310;
  cursor: pointer;
  display: inline-flex;
  font-size: 16px;
  font-weight: 700;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  text-decoration: none;
}

.console-primary {
  background: var(--console-green);
}

.console-secondary {
  background: #343635;
  color: var(--console-text);
}

.console-primary.compact,
.console-secondary.compact {
  min-height: 40px;
  padding: 0 16px;
}

.welcome-panel {
  margin: 18vh auto 0;
  max-width: 430px;
  text-align: center;
}

.robot-mark,
.empty-icon {
  align-items: center;
  background: rgba(160, 209, 29, 0.12);
  border-radius: 22px;
  color: var(--console-green-strong);
  display: inline-flex;
  font-weight: 700;
  height: 72px;
  justify-content: center;
  margin-bottom: 20px;
  width: 72px;
}

.setup-form,
.webhook-form,
.feature-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
  text-align: left;
}

.setup-form label,
.webhook-form label,
.feature-form label,
.agent-edit label,
.compact-field,
.settings-form label {
  color: #aeb2ad;
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
}

.advanced-field {
  color: #aeb2ad;
}

.advanced-field summary {
  cursor: pointer;
  font-weight: 700;
}

.overview-grid,
.settings-stack {
  display: grid;
  gap: 22px;
}

.metric-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
}

.metric-tile {
  background: var(--console-panel);
  border: 1px solid var(--console-line);
  border-radius: 18px;
  color: var(--console-text);
  cursor: pointer;
  display: grid;
  min-height: 132px;
  padding: 22px;
  text-align: left;
}

button.metric-tile:hover {
  border-color: rgba(160, 209, 29, 0.28);
}

.metric-tile span,
.metric-tile small {
  color: var(--console-muted);
  font-size: 14px;
  font-weight: 700;
}

.metric-tile strong {
  font-size: 36px;
  line-height: 1.1;
}

.console-panel,
.empty-state,
.usage-chart {
  background: var(--console-panel);
  border: 1px solid var(--console-line);
  border-radius: 20px;
}

.console-panel {
  padding: 22px;
}

.console-panel.wide {
  width: 100%;
}

.console-split {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(360px, 0.72fr) minmax(440px, 1fr);
}

.panel-title {
  align-items: center;
  border-bottom: 1px solid var(--console-line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: -2px -2px 16px;
  padding-bottom: 16px;
}

.panel-title h1,
.panel-title h2 {
  color: var(--console-text);
  font-size: 22px;
  margin: 0;
}

.panel-title span {
  color: var(--console-muted);
  font-size: 13px;
  font-weight: 700;
}

.line-list,
.check-list {
  display: grid;
  gap: 8px;
}

.console-row,
.message-thread,
.check-row {
  align-items: center;
  background: #2e302f;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--console-text);
  display: grid;
  gap: 12px;
  grid-template-columns: 42px 1fr auto;
  min-height: 64px;
  padding: 10px 14px;
  text-align: left;
  width: 100%;
}

button.console-row,
.message-thread,
.check-row {
  cursor: pointer;
}

.console-row.active,
.message-thread.active,
.check-row.done {
  background: rgba(160, 209, 29, 0.09);
  border-color: rgba(160, 209, 29, 0.32);
}

.row-icon {
  align-items: center;
  background: rgba(160, 209, 29, 0.1);
  border-radius: 12px;
  color: var(--console-green-strong);
  display: inline-flex;
  font-weight: 700;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.console-row strong,
.message-thread strong,
.check-row strong {
  display: block;
  font-size: 15px;
}

.console-row small,
.message-thread small,
.check-row small,
.console-row em,
.message-thread time {
  color: var(--console-muted);
  font-size: 12px;
  font-style: normal;
}

.agent-edit {
  display: grid;
  gap: 14px;
}

.agent-links {
  display: flex;
  gap: 10px;
  margin: 18px 0;
}

.agent-links a {
  background: #343635;
  border-radius: 10px;
  color: var(--console-text);
  font-weight: 700;
  padding: 10px 14px;
  text-decoration: none;
}

.business-card {
  align-items: center;
  background: #1f211f;
  border: 1px solid var(--console-line);
  border-radius: 18px;
  display: flex;
  gap: 18px;
  padding: 18px;
}

.business-card img {
  background: #fff;
  border-radius: 10px;
  height: 112px;
  width: 112px;
}

.business-card strong,
.business-card span {
  display: block;
}

.business-card span {
  color: var(--console-muted);
}

.ai-card-preview {
  background: linear-gradient(135deg, #f6f8f1, #ffffff);
  border-radius: 22px;
  color: #171c20;
  display: grid;
  gap: 26px;
  grid-template-columns: 1fr 190px;
  min-height: 280px;
  padding: 32px;
}

.ai-card-preview p {
  color: #76806d;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.ai-card-preview h2 {
  color: #171c20;
  font-size: 34px;
  margin-bottom: 8px;
}

.ai-card-preview span,
.ai-card-preview small {
  color: #596255;
  display: block;
}

.ai-card-preview strong {
  color: #171c20;
  display: block;
  font-size: 24px;
  margin: 24px 0 8px;
}

.ai-card-preview img {
  align-self: center;
  background: #fff;
  border-radius: 16px;
  height: 190px;
  justify-self: end;
  width: 190px;
}

.empty-state {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 420px;
  padding: 42px;
  text-align: center;
}

.empty-state h2,
.empty-mini h2 {
  color: var(--console-text);
  margin: 0 0 8px;
}

.empty-state p {
  max-width: 520px;
}

.empty-state .console-primary,
.empty-state .console-secondary {
  margin-top: 22px;
}

.empty-icon.blue {
  background: rgba(60, 120, 216, 0.18);
  color: #5d94ff;
}

.empty-mini {
  color: var(--console-muted);
  padding: 34px 18px;
  text-align: center;
}

.empty-mini.large {
  align-items: center;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
}

.empty-inline {
  color: var(--console-muted);
  padding: 28px 10px;
  text-align: center;
}

.empty-inline code {
  background: #111312;
  border: 1px solid var(--console-line);
  border-radius: 10px;
  color: var(--console-green);
  display: block;
  margin-bottom: 10px;
  overflow: auto;
  padding: 12px;
  text-align: left;
}

.compact-field {
  margin-bottom: 14px;
}

.message-layout {
  background: var(--console-panel);
  border: 1px solid var(--console-line);
  border-radius: 22px;
  display: grid;
  grid-template-columns: 470px minmax(0, 1fr);
  min-height: calc(100vh - 92px);
  overflow: hidden;
}

.message-list {
  border-right: 1px solid var(--console-line);
  padding: 22px;
}

.message-detail {
  min-height: 100%;
  padding: 28px;
}

.message-head {
  align-items: start;
  border-bottom: 1px solid var(--console-line);
  display: flex;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 18px;
}

.message-head h2 {
  color: var(--console-text);
  margin-bottom: 4px;
}

.message-head p {
  color: var(--console-muted);
  margin: 0;
}

.message-bubble {
  background: #303230;
  border-radius: 18px;
  color: #e7e9e6;
  line-height: 1.8;
  min-height: 180px;
  padding: 22px;
  white-space: pre-wrap;
}

.message-actions {
  margin-top: 18px;
}

.notice-bar,
.routing-strip {
  align-items: center;
  background: #202220;
  border: 1px solid var(--console-line);
  border-radius: 14px;
  color: #c8cbc6;
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  min-height: 48px;
  padding: 0 18px;
}

.routing-strip {
  display: block;
  padding: 18px;
}

.routing-strip strong {
  color: #aeb2ad;
  display: block;
  font-size: 12px;
  letter-spacing: 0;
  margin-bottom: 10px;
}

.routing-strip span {
  background: rgba(160, 209, 29, 0.14);
  border: 1px solid rgba(160, 209, 29, 0.22);
  border-radius: 6px;
  color: var(--console-green-strong);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
}

.toolbar-line {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.toolbar-line input {
  max-width: 360px;
}

.usage-chart {
  margin-top: 18px;
  padding: 24px;
}

.chart-legend {
  display: flex;
  gap: 18px;
}

.chart-legend span {
  color: #c8cbc6;
  font-size: 13px;
}

.chart-grid {
  background: repeating-linear-gradient(to bottom, transparent, transparent 63px, rgba(255, 255, 255, 0.075) 64px), linear-gradient(to right, rgba(160, 209, 29, 0.9), rgba(160, 209, 29, 0.9));
  background-position: 0 0, 0 calc(100% - 2px);
  background-repeat: repeat, no-repeat;
  background-size: auto, 100% 2px;
  height: 300px;
  margin-top: 20px;
}

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

.settings-form label {
  align-items: center;
  background: #303230;
  border-radius: 12px;
  display: flex;
  grid-template-columns: none;
  min-height: 48px;
  padding: 0 14px;
}

.settings-form label.wide {
  align-items: start;
  display: grid;
  grid-column: 1 / -1;
  padding: 14px;
}

.settings-form input[type="checkbox"] {
  accent-color: var(--console-green);
  margin-right: 10px;
  min-height: auto;
  width: auto;
}

.profile-row {
  align-items: center;
  display: flex;
  gap: 18px;
}

.profile-row strong,
.profile-row span {
  display: block;
}

.profile-row strong {
  font-size: 21px;
}

.profile-row span {
  color: var(--console-muted);
}

.danger {
  border-color: rgba(217, 75, 91, 0.28);
}

.danger .panel-title h2,
.danger .panel-title p {
  color: #ff4f86;
}

.docs-layout {
  display: grid;
  gap: 46px;
  grid-template-columns: 260px minmax(0, 720px) 220px;
}

.docs-toc {
  border-right: 1px solid var(--console-line);
  display: grid;
  gap: 8px;
  padding-right: 24px;
}

.docs-toc strong {
  color: var(--console-muted);
  font-size: 12px;
  letter-spacing: 0;
  margin-top: 16px;
}

.docs-toc button {
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: #c8cbc6;
  font-weight: 700;
  min-height: 38px;
  padding: 0 10px;
  text-align: left;
}

.docs-toc button.active {
  background: rgba(160, 209, 29, 0.1);
  color: var(--console-green-strong);
}

.docs-main {
  padding-top: 34px;
}

.doc-green {
  color: var(--console-green-strong) !important;
  font-weight: 700;
}

.doc-callout {
  background: rgba(160, 209, 29, 0.09);
  border: 1px solid rgba(160, 209, 29, 0.2);
  border-radius: 14px;
  margin: 24px 0;
  padding: 20px;
}

.doc-callout strong {
  color: var(--console-green-strong);
  display: block;
  margin-bottom: 8px;
}

.price-row {
  align-items: center;
  background: #303230;
  border: 1px solid transparent;
  border-radius: 14px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px;
}

.price-row.active {
  border-color: rgba(160, 209, 29, 0.42);
}

.price-row strong,
.price-row span {
  display: block;
}

.price-row span {
  color: var(--console-muted);
  font-size: 13px;
}

.form-message {
  color: var(--console-green-strong);
  font-size: 13px;
  font-weight: 700;
  min-height: 18px;
}

@media (max-width: 980px) {
  .console-body {
    grid-template-columns: 1fr;
    height: auto;
    overflow: auto;
  }

  .console-sidebar {
    min-height: auto;
    position: static;
  }

  .console-shell {
    height: auto;
    padding: 0;
  }

  .console-view {
    border-radius: 0;
    min-height: auto;
    padding: 22px;
  }

  .console-split,
  .message-layout,
  .metric-grid,
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .message-list {
    border-bottom: 1px solid var(--console-line);
    border-right: 0;
  }
}

.console-body {
  --console-bg: #ffffff;
  --console-panel: #ffffff;
  --console-line: #e3e8df;
  --console-text: #171c20;
  --console-muted: #7a8277;
  --console-green: #a0d11d;
  --console-green-strong: #6ca000;
  background: #ffffff;
  color: var(--console-text);
}

.console-body input,
.console-body select,
.console-body textarea {
  background: #f8faf7;
  border-color: #dfe6db;
  color: var(--console-text);
}

.console-body input::placeholder,
.console-body textarea::placeholder {
  color: #9aa397;
}

.console-sidebar {
  background: #ffffff;
  border-right-color: var(--console-line);
}

.console-brand a {
  color: var(--console-text);
  text-shadow: none;
}

.collapse-button {
  background: #f4f6f2;
  border-color: var(--console-line);
  color: var(--console-muted);
}

.console-nav button {
  color: #333a32;
}

.console-nav button span {
  color: #6f776c;
}

.console-nav button.active {
  background: #eef8cf;
  color: #171c20;
}

.console-nav button.active span {
  color: var(--console-green-strong);
}

.credit-block {
  background: #eef8cf;
  border-color: #d7e9a3;
}

.credit-block span,
.credit-block strong {
  color: #4f7f00;
}

.console-user span,
.console-row small,
.message-thread small,
.check-row small,
.console-row em,
.message-thread time,
.panel-title span,
.metric-tile span,
.metric-tile small,
.profile-row span,
.business-card span,
.empty-inline,
.empty-mini {
  color: var(--console-muted);
}

.avatar {
  border-color: #dfe8d8;
}

.logout-link {
  color: var(--console-muted);
}

.console-view {
  background: #ffffff;
  border-color: transparent;
}

.console-head h1,
.welcome-panel h1,
.docs-main h1,
.panel-title h1,
.panel-title h2,
.empty-state h2,
.empty-mini h2,
.message-head h2,
.metric-tile strong,
.business-card strong {
  color: var(--console-text);
}

.console-head p,
.welcome-panel p,
.panel-title p,
.empty-state p,
.empty-mini p,
.docs-main p,
.message-head p {
  color: var(--console-muted);
}

.console-panel,
.empty-state,
.usage-chart,
.message-layout,
.notice-bar,
.routing-strip {
  background: #ffffff;
  border-color: var(--console-line);
}

.metric-tile,
.console-row,
.message-thread,
.check-row {
  background: #ffffff;
  border-color: var(--console-line);
}

button.metric-tile:hover,
.console-row.active,
.message-thread.active,
.check-row.done {
  background: #f5fbdf;
  border-color: #cfe892;
}

.row-icon,
.robot-mark,
.empty-icon {
  background: #eef8cf;
  color: #5f9300;
}

.console-secondary,
.agent-links a {
  background: #f2f5ef;
  color: var(--console-text);
}

.business-card,
.message-bubble,
.settings-form label,
.empty-inline code {
  background: #f8faf7;
  border-color: var(--console-line);
  color: var(--console-text);
}

.message-bubble {
  color: #333a32;
}

.routing-strip span,
.doc-callout {
  background: #eef8cf;
  border-color: #d7e9a3;
  color: #4f7f00;
}

.doc-callout strong,
.doc-green {
  color: #4f7f00 !important;
}

.docs-toc {
  border-right-color: var(--console-line);
}

.docs-toc strong {
  color: var(--console-muted);
}

.docs-toc button {
  color: #333a32;
}

.docs-toc button.active {
  background: #eef8cf;
  color: #171c20;
}

.chart-grid {
  background: repeating-linear-gradient(to bottom, transparent, transparent 63px, rgba(23, 28, 32, 0.08) 64px), linear-gradient(to right, rgba(160, 209, 29, 0.9), rgba(160, 209, 29, 0.9));
  background-position: 0 0, 0 calc(100% - 2px);
  background-repeat: repeat, no-repeat;
  background-size: auto, 100% 2px;
}

.price-row {
  background: #ffffff;
  border-color: var(--console-line);
}

.price-row.active {
  background: #f5fbdf;
  border-color: #cfe892;
}

.price-row span,
.chart-legend span {
  color: var(--console-muted);
}

.danger {
  border-color: #f2cbd1;
}

.webhook-url-list {
  margin-top: 18px;
}

.url-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--console-line);
}

.url-row span {
  color: var(--console-muted);
  font-weight: 700;
}

.url-row code,
.api-key-once code {
  display: block;
  overflow-wrap: anywhere;
  border: 1px solid var(--console-line);
  border-radius: 8px;
  background: #f8faf7;
  padding: 10px 12px;
  color: var(--console-text);
}

.api-key-once {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.api-key-once:empty {
  display: none;
}

.danger-text {
  color: #b4233a !important;
}
