:root {
  color-scheme: light;
  --ink: #17231f;
  --muted: #65736f;
  --line: #dce5e0;
  --soft: #f4f7f5;
  --panel: #ffffff;
  --green: #126451;
  --green-2: #e4f2ec;
  --amber: #b77720;
  --amber-2: #fff5df;
  --red: #a64232;
  --red-2: #fde9e5;
  --shadow: 0 18px 42px rgba(26, 45, 37, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #edf3f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
textarea {
  font: inherit;
}

.app-shell,
.client-page {
  min-height: 100vh;
}

.client-page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px;
}

.client-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 150px;
  margin-bottom: 14px;
  border: 1px solid #cfe0d8;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f5f4d 0%, #19715d 58%, #f7f2e7 58%, #fffaf0 100%);
  box-shadow: var(--shadow);
  color: #fff;
  padding: 24px;
}

.client-hero .eyebrow,
.client-hero h1,
.client-hero p {
  color: #fff;
}

.client-hero h1 {
  font-size: clamp(30px, 5vw, 46px);
}

.client-hero p {
  max-width: 620px;
  margin: 10px 0 0;
  line-height: 1.6;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 134px;
  border: 1px solid rgba(18, 100, 81, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  padding: 9px 12px;
}

.client-grid {
  display: grid;
  grid-template-columns: 300px minmax(420px, 1fr) 320px;
  gap: 16px;
  min-height: calc(100vh - 196px);
}

.consult-sidebar,
.chat-panel,
.insight-panel > section,
.stat-card,
.record-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.consult-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding: 20px;
}

.prompt-panel {
  border-color: #cfe0d8;
  background: linear-gradient(180deg, #f8fbf9, #edf6f1);
}

.brand-block p,
.sub {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.18;
}

h2 {
  font-size: 17px;
}

.side-section,
.profile-card,
.data-card,
.result-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: #fff;
}

.side-section {
  border-color: transparent;
  background: var(--soft);
}

.quick-grid {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.quick {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 10px 12px;
  text-align: left;
  font-weight: 750;
}

.quick:hover {
  border-color: var(--green);
  background: var(--green-2);
}

.section-title,
.chat-header,
.admin-header,
.record-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.section-title span,
.ready-label {
  border-radius: 999px;
  background: var(--amber-2);
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  white-space: nowrap;
}

.section-title .ready-label {
  background: var(--green-2);
  color: var(--green);
}

dl {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
}

dl div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
}

dt {
  color: var(--muted);
  font-size: 13px;
}

dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: var(--muted);
  font-size: 13px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
}

.dot.ready {
  background: var(--green);
}

.nav-link {
  color: var(--green);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover {
  text-decoration: underline;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  overflow: hidden;
}

.intro-card {
  border-color: #cfe0d8;
  background: #fbfdfb;
}

.chat-header {
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
}

.chat-header h2 {
  font-size: 22px;
}

.messages {
  overflow-y: auto;
  padding: 22px;
  background: linear-gradient(180deg, #fbfdfc 0%, #f2f6f4 100%);
}

.message {
  display: flex;
  margin: 0 0 16px;
}

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

.bubble {
  max-width: min(760px, 88%);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  line-height: 1.68;
  padding: 14px 16px;
  white-space: pre-wrap;
}

.diagnosis-bubble {
  max-width: min(820px, 96%);
  padding: 0;
  overflow: hidden;
  white-space: normal;
}

.message.user .bubble {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.bubble p {
  margin: 8px 0 0;
}

.meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.message.user .meta {
  color: rgba(255, 255, 255, 0.78);
}

.diagnosis-card {
  background: #fff;
}

.diagnosis-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--green-2);
  color: var(--green);
  padding: 14px 16px;
}

.diagnosis-card.caution .diagnosis-head {
  background: var(--amber-2);
  color: var(--amber);
}

.diagnosis-card.pending .diagnosis-head {
  background: var(--soft);
  color: var(--muted);
}

.diagnosis-kicker {
  font-size: 13px;
  font-weight: 800;
}

.diagnosis-head strong {
  font-size: 18px;
}

.conclusion-box {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.conclusion-box span,
.answer-section h3,
.confidence-card span,
.next-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 8px;
}

.conclusion-box p {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.55;
}

.profile-table,
.reason-table {
  width: calc(100% - 32px);
  margin: 16px;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.profile-table tr:last-child th,
.profile-table tr:last-child td,
.reason-table tr:last-child th,
.reason-table tr:last-child td {
  border-bottom: 0;
}

.profile-table th,
.reason-table th {
  width: 88px;
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
}

.profile-table td,
.reason-table td {
  color: var(--ink);
  line-height: 1.55;
}

.meter-card {
  margin: 0 16px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
}

.meter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 9px;
}

.meter-row strong {
  color: var(--ink);
  font-size: 18px;
}

.meter {
  height: 10px;
  border-radius: 999px;
  background: #e5ece8;
  overflow: hidden;
}

.meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--amber), var(--green));
}

.answer-section {
  padding: 0 16px 16px;
}

.answer-section h3 {
  margin-top: 0;
}

.answer-section .reason-table {
  width: 100%;
  margin: 0;
}

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

.step-card {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 10px;
}

.step-card span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.step-card p {
  margin: 0;
  line-height: 1.55;
}

.confidence-card,
.next-card {
  margin: 0 16px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.confidence-card {
  background: var(--green-2);
}

.confidence-card strong {
  color: var(--green);
}

.next-card {
  background: var(--amber-2);
}

.next-card p {
  margin: 0;
  line-height: 1.6;
}

.composer {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 14px;
}

textarea {
  width: 100%;
  min-height: 72px;
  max-height: 180px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  line-height: 1.5;
  padding: 12px;
}

textarea:focus {
  border-color: var(--green);
}

.composer button,
.copy-btn {
  border: 0;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.composer button {
  height: 72px;
}

.composer button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.insight-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.result-card,
.data-card {
  box-shadow: var(--shadow);
}

.review-summary {
  margin-top: 14px;
}

.review-summary p,
.operator-list,
.review-box p,
.record-top p {
  color: var(--muted);
  line-height: 1.55;
}

.score-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  background: var(--green-2);
  color: var(--green);
  padding: 10px 12px;
}

.score-line span {
  font-size: 13px;
  font-weight: 700;
}

.score-line strong {
  font-size: 22px;
}

.mini-stats,
.stats-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

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

.mini-stats div,
.stat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
}

.mini-stats span,
.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 7px;
}

.mini-stats strong,
.stat-card strong {
  font-size: 23px;
}

.operator-list {
  margin: 12px 0 0;
  padding-left: 18px;
}

.admin-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px;
}

.admin-header {
  margin-bottom: 18px;
}

.stats-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 18px;
}

.automation-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  margin-bottom: 18px;
}

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

.section-head h2 {
  margin: 0;
  font-size: 22px;
}

.sync-note {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.automation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.automation-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 14px;
  min-height: 138px;
}

.automation-card div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.automation-card span {
  color: var(--muted);
  font-size: 13px;
}

.automation-card strong {
  color: var(--green);
  font-size: 28px;
}

.automation-card p {
  margin: 10px 0;
  font-weight: 700;
}

.automation-card small {
  color: var(--muted);
  display: -webkit-box;
  font-size: 12px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.queue-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.queue-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.queue-card article {
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.queue-card article:last-child {
  border-bottom: 0;
}

.queue-card article span {
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.queue-card article p {
  margin: 6px 0;
  line-height: 1.55;
}

.queue-card article small {
  color: var(--muted);
  line-height: 1.5;
}

.copy-btn.small {
  min-width: auto;
  padding: 7px 9px;
  font-size: 12px;
}

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

.record-card {
  padding: 16px;
}

.record-top p {
  margin: 8px 0 0;
}

.copy-btn {
  border: 1px solid var(--green);
  background: #fff;
  color: var(--green);
  min-width: 112px;
  padding: 9px 10px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pill {
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  padding: 5px 9px;
}

.pill.high {
  background: var(--green-2);
  color: var(--green);
}

.pill.medium {
  background: var(--amber-2);
  color: var(--amber);
}

.pill.warn {
  background: var(--red-2);
  color: var(--red);
}

.topic {
  margin: 12px 0 0;
  color: var(--ink);
}

.review-box {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}

.review-box strong {
  color: var(--green);
}

.review-box p {
  margin: 6px 0 0;
}

@media (max-width: 1120px) {
  .app-shell,
  .client-grid {
    grid-template-columns: 280px minmax(0, 1fr);
    height: auto;
    min-height: 100vh;
  }

  .insight-panel {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .queue-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .app-shell,
  .client-grid {
    display: block;
    padding: 0;
  }

  .client-page {
    padding: 0;
  }

  .client-hero {
    display: block;
    min-height: 0;
    margin: 0;
    border-width: 0 0 1px;
    border-radius: 0;
    background: var(--green);
    padding: 18px;
  }

  .client-hero h1 {
    font-size: 30px;
  }

  .hero-badge {
    margin-top: 14px;
  }

  .consult-sidebar,
  .chat-panel,
  .insight-panel > section {
    border-width: 0 0 1px;
    border-radius: 0;
    box-shadow: none;
  }

  .consult-sidebar {
    padding: 18px;
  }

  .chat-panel {
    min-height: 68vh;
  }

  .messages {
    padding: 16px;
  }

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

  .diagnosis-head,
  .conclusion-box,
  .answer-section {
    padding-left: 12px;
    padding-right: 12px;
  }

  .profile-table,
  .reason-table {
    width: calc(100% - 24px);
    margin: 12px;
  }

  .profile-table th,
  .profile-table td,
  .reason-table th,
  .reason-table td {
    display: block;
    width: 100%;
    border-bottom: 0;
    padding: 8px 10px;
  }

  .profile-table tr,
  .reason-table tr {
    display: block;
    border-bottom: 1px solid var(--line);
  }

  .profile-table tr:last-child,
  .reason-table tr:last-child {
    border-bottom: 0;
  }

  .meter-card,
  .confidence-card,
  .next-card {
    margin-left: 12px;
    margin-right: 12px;
  }

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

  .composer button {
    height: 46px;
  }

  .insight-panel {
    display: grid;
    gap: 0;
  }

  .admin-page {
    padding: 18px;
  }

  .section-head {
    display: block;
  }

  .sync-note {
    display: block;
    margin-top: 6px;
    text-align: left;
  }

  .admin-header,
  .record-top {
    display: block;
  }

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

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

  .queue-list {
    grid-template-columns: 1fr;
  }

  .copy-btn {
    margin-top: 12px;
    width: 100%;
  }
}

/* Client UI v3: mobile-first public consultation page */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  background: linear-gradient(90deg, #064936, #0d674f);
  color: #fff;
  padding: 0 28px;
  box-shadow: 0 6px 18px rgba(4, 45, 33, 0.18);
}

.topbar-brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.topbar-brand strong {
  font-size: 20px;
}

.topbar-brand span,
.topbar-nav a {
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.topbar-nav a {
  text-decoration: none;
  font-weight: 700;
}

.topbar-nav a:last-child {
  border-radius: 8px;
  background: #149768;
  color: #fff;
  padding: 10px 16px;
}

.product-page {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 18px 34px;
}

.ask-panel,
.report-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.ask-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 22px;
}

.assistant-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.bot-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 900;
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.18);
}

.assistant-card strong {
  font-size: 17px;
}

.assistant-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.quick-block h2,
.question-card h2 {
  font-size: 16px;
  margin: 0 0 12px;
}

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

.product-page .quick {
  display: grid;
  place-items: center;
  min-height: 46px;
  text-align: center;
  color: var(--green);
  border-color: #9ccdbd;
}

.question-card {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.product-page .composer {
  position: relative;
  display: block;
  border: 0;
  padding: 0;
}

.product-page textarea {
  min-height: 150px;
  border-radius: 10px;
  padding: 14px 56px 14px 14px;
  font-size: 15px;
}

.product-page .composer button {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--green);
}

.input-tools {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 10px;
  color: var(--green);
  font-size: 13px;
}

.compact-profile {
  box-shadow: none;
}

.powered {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.report-panel {
  overflow: hidden;
}

.report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 20px 24px 14px;
}

.report-header h1 {
  font-size: 20px;
}

.report-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.current-question {
  display: inline-block;
  max-width: 680px;
  margin-top: 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
}

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

.report-body {
  min-height: 620px;
  padding: 20px;
  background: #fffdfa;
}

.empty-banner {
  border: 1px solid #e4a33a;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff9ed, #fff);
  text-align: center;
  padding: 26px 18px;
}

.empty-banner strong {
  display: inline-block;
  border-radius: 0 0 14px 14px;
  background: #df8a00;
  color: #fff;
  font-size: 28px;
  padding: 10px 34px;
}

.empty-banner p {
  margin: 18px auto 0;
  max-width: 520px;
  color: var(--ink);
  line-height: 1.7;
}

.followup-card,
.knowledge-card {
  border-top: 1px solid var(--line);
  margin: 0 16px;
  padding: 14px 0;
}

.followup-card > span,
.knowledge-card > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 10px;
}

.followup-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.followup-chip {
  border: 1px solid #9ccdbd;
  border-radius: 999px;
  background: #f6faf8;
  color: var(--green);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 11px;
}

.knowledge-card p {
  border-left: 3px solid var(--green);
  margin: 8px 0 0;
  background: #f7faf8;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  padding: 9px 10px;
}

.knowledge-card b {
  color: var(--green);
  margin-right: 8px;
}

.mobile-nav {
  display: none;
}

.hidden {
  display: none !important;
}

.ghost {
  border: 1px solid #a7c8bb;
  background: #fff;
  color: var(--green);
}

.ghost.small {
  padding: 8px 12px;
  font-size: 13px;
}

.auth-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px auto 0;
  width: min(1180px, calc(100% - 32px));
  border: 1px solid #d3e4dc;
  border-radius: 16px;
  background: linear-gradient(135deg, #f5fbf8, #fffdf6);
  box-shadow: 0 14px 32px rgba(26, 45, 37, 0.06);
  padding: 16px 18px;
}

.auth-banner-copy {
  display: grid;
  gap: 4px;
}

.auth-banner-copy strong {
  color: var(--green);
  font-size: 16px;
}

.auth-banner-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-banner-actions {
  display: flex;
  gap: 10px;
}

.auth-banner-actions button,
.auth-actions button {
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 16px;
}

.auth-dialog {
  width: min(440px, calc(100% - 24px));
  border: 0;
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(26, 45, 37, 0.2);
  padding: 0;
}

.auth-dialog::backdrop {
  background: rgba(20, 34, 29, 0.45);
}

.auth-shell {
  display: grid;
  gap: 14px;
  background: #fffefb;
  padding: 20px;
}

.auth-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.auth-head strong {
  display: block;
  color: var(--green);
  font-size: 20px;
  margin-bottom: 6px;
}

.auth-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-shell label {
  display: grid;
  gap: 6px;
}

.auth-shell label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.auth-shell input {
  width: 100%;
  border: 1px solid #cfe0d7;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  padding: 12px 14px;
}

.auth-shell input:focus {
  border-color: #6aa58f;
  box-shadow: 0 0 0 4px rgba(54, 110, 87, 0.12);
  outline: none;
}

.auth-error {
  border-radius: 12px;
  background: #fff3ef;
  color: #b14d2f;
  font-size: 13px;
  line-height: 1.6;
  padding: 10px 12px;
}

.auth-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.product-page .diagnosis-bubble {
  max-width: 100%;
  width: 100%;
}

.product-page .message.user .bubble {
  max-width: 100%;
  width: 100%;
  border-color: #b7d7ca;
  background: #f6faf8;
  color: var(--green);
}

.product-page .message {
  margin-bottom: 14px;
}

@media (max-width: 860px) {
  body {
    background: #f7faf8;
  }

  .topbar {
    align-items: flex-start;
    min-height: 106px;
    padding: 18px 18px 14px;
  }

  .topbar-brand {
    display: block;
  }

  .topbar-brand strong {
    display: block;
    font-size: 22px;
    margin-bottom: 6px;
  }

  .topbar-nav {
    display: none;
  }

  .auth-banner {
    display: grid;
    gap: 12px;
    margin-top: 12px;
    width: calc(100% - 24px);
    padding: 14px;
  }

  .auth-banner-actions,
  .auth-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px 12px 74px;
  }

  .ask-panel,
  .report-panel {
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(26, 45, 37, 0.08);
  }

  .ask-panel {
    padding: 16px;
  }

  .assistant-card {
    grid-template-columns: 42px 1fr;
  }

  .bot-avatar {
    width: 42px;
    height: 42px;
  }

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

  .product-page .quick {
    min-height: 40px;
    padding: 8px;
    font-size: 13px;
  }

  .compact-profile,
  .input-tools {
    display: none;
  }

  .report-header {
    padding: 16px;
  }

  .report-body {
    min-height: 320px;
    padding: 12px;
  }

  .empty-banner strong {
    font-size: 24px;
  }

  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -8px 22px rgba(26, 45, 37, 0.08);
  }

  .mobile-nav a {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    padding: 10px 4px;
    text-align: center;
    text-decoration: none;
  }

  .mobile-nav a:first-child {
    color: var(--green);
  }
}
