:root {
  --maroon: #12343b;
  --maroon-2: #0f766e;
  --gold: #f2b84b;
  --paper: #f7f3e8;
  --line: #d8e3df;
  --ink: #172326;
  --muted: #657477;
  --green: #0f766e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #eef5f2;
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Noto Sans Devanagari", "Noto Sans", sans-serif;
}

.app-shell {
  width: min(430px, 100vw);
  min-height: 100vh;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 48px rgba(60, 30, 20, 0.16);
  position: relative;
}

.onboarding {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    linear-gradient(rgba(18, 52, 59, 0.94), rgba(18, 52, 59, 0.94)),
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.42), transparent 35%);
}

.onboarding.hidden {
  display: none;
}

.onboarding-card {
  display: grid;
  gap: 14px;
  width: 100%;
  padding: 18px;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.eyebrow.dark {
  color: var(--maroon);
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.role-card {
  display: grid;
  gap: 5px;
  text-align: start;
  min-height: 104px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

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

.role-card.active {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 2px rgba(184, 134, 11, 0.28);
}

.session-hint {
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  background: #eefaf6;
  color: var(--maroon);
  font-size: 12px;
  font-weight: 750;
}

.onboarding-card label,
.verification-panel label,
.offer label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.onboarding-card input,
.verification-panel input,
.verification-panel select,
.offer input,
.offer select,
.offer textarea {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: white;
}

.offer textarea {
  min-height: 76px;
  padding: 10px;
  resize: vertical;
  font: inherit;
}

#offer-status {
  padding: 10px;
  background: #eefaf6;
  border-radius: 8px;
  color: var(--maroon);
  font-weight: 750;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 12px;
  background: var(--maroon);
  color: white;
}

.eyebrow {
  margin: 0 0 3px;
  color: #a7f3d0;
  font-size: 11px;
  letter-spacing: 1.8px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: white;
  font-size: 26px;
}

.session-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-box span {
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #c7f9ee;
  font-size: 12px;
  font-weight: 850;
}

.tab.locked {
  opacity: 0.48;
}

.permission-banner {
  padding: 9px 14px;
  background: #fff7df;
  color: var(--maroon);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
}

.permission-banner.pulse {
  box-shadow: inset 0 0 0 2px rgba(123, 23, 23, 0.22);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  background: white;
  border-bottom: 1px solid var(--line);
}

.tab {
  border: 0;
  background: transparent;
  padding: 12px 3px 10px;
  color: var(--muted);
  font-weight: 700;
  font-size: 10px;
  border-bottom: 3px solid transparent;
}

.tab.active {
  color: var(--maroon);
  border-bottom-color: var(--gold);
}

.panel {
  display: none;
  flex: 1;
  overflow: auto;
}

.panel.active {
  display: block;
}

.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 14px 6px;
  background: #fffdf8;
}

.chip {
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  white-space: nowrap;
}

.chip.active {
  background: var(--maroon);
  border-color: var(--maroon);
  color: white;
}

.list {
  padding: 4px 0 0;
}

.chat-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #f0e2c5;
}

.chat-row.selected {
  background: #fff4d9;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--maroon);
  color: white;
  font-weight: 900;
}

.avatar.gold {
  background: var(--gold);
}

.avatar.green {
  background: var(--green);
}

.row-title {
  font-weight: 850;
}

.row-text {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

time {
  color: var(--gold);
  font-size: 12px;
  align-self: start;
}

.composer {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  gap: 8px;
  padding: 10px;
  background: white;
  border-top: 1px solid var(--line);
}

.composer input,
.composer button,
.business-card button,
.offer button,
.actions button {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  min-height: 42px;
}

.composer input {
  padding: 0 12px;
  min-width: 0;
}

.composer button,
.business-card button,
.offer button,
.actions button,
.full-button,
.small-button,
.quick-actions button {
  color: var(--maroon);
  font-weight: 800;
}

.chat-preview {
  margin: 12px 12px 86px;
  border: 1px solid var(--line);
  background: #fffdf8;
  border-radius: 8px;
  overflow: hidden;
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.realtime-status {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.small-button {
  min-width: 68px;
  min-height: 38px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
}

.message-stack {
  display: grid;
  gap: 8px;
  padding: 12px;
  background:
    linear-gradient(rgba(255, 250, 241, 0.86), rgba(255, 250, 241, 0.86)),
    radial-gradient(circle at 20% 20%, rgba(184, 134, 11, 0.12), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(123, 23, 23, 0.08), transparent 24%);
}

.chat-contact-card {
  display: grid;
  grid-template-columns: 1fr 48px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #eefaf6;
  border-bottom: 1px solid var(--line);
}

.chat-contact-card div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chat-contact-card strong {
  color: var(--maroon);
}

.chat-contact-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-contact-card b {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--maroon);
  color: white;
  font-size: 16px;
}

.bubble {
  max-width: 82%;
  margin: 0;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.35;
  display: grid;
  gap: 4px;
}

.receipt {
  justify-self: end;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.receipt.read {
  color: var(--green);
}

.receipt.failed {
  color: #b42318;
}

.incoming {
  justify-self: start;
  background: white;
  border: 1px solid var(--line);
}

.outgoing {
  justify-self: end;
  background: #fff1c2;
  border: 1px solid #eccb76;
}

.system {
  justify-self: center;
  background: rgba(123, 23, 23, 0.08);
  color: var(--maroon);
  font-size: 12px;
  font-weight: 800;
}

.chat-ai-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: white;
  border-top: 1px solid var(--line);
}

.chat-ai-panel p {
  margin: 0;
  padding: 10px;
  border: 1px dashed var(--gold);
  border-radius: 8px;
  background: #fffaf0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}

.chat-ai-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.chat-ai-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--maroon);
  font-weight: 850;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px;
  background: white;
}

.quick-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  font-size: 12px;
}

.fab {
  position: fixed;
  right: max(16px, calc((100vw - 430px) / 2 + 18px));
  bottom: 72px;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  background: var(--gold);
  color: white;
  font-size: 28px;
  box-shadow: 0 12px 26px rgba(70, 40, 10, 0.25);
}

.business-card,
.offer,
.lead-card,
.ai-card,
.complaint-desk,
.verification-panel,
.trust-score {
  margin: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
}

.ai-hero {
  margin: 16px;
  padding: 16px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(123, 23, 23, 0.96), rgba(31, 122, 77, 0.86)),
    radial-gradient(circle at 80% 12%, rgba(246, 215, 133, 0.3), transparent 28%);
  color: white;
}

.ai-hero h2 {
  color: white;
}

.ai-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 0 16px 16px;
}

.ai-metrics div {
  min-height: 78px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  text-align: center;
}

.ai-metrics strong {
  color: var(--maroon);
  font-size: 25px;
  line-height: 1;
}

.ai-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.ai-card {
  display: grid;
  gap: 10px;
}

.ai-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.ai-card input,
.ai-card select,
.ai-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  font: inherit;
  background: #fffdf7;
  color: var(--ink);
}

.ai-card textarea {
  min-height: 88px;
  resize: vertical;
}

.ai-card button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff8e8;
  color: var(--maroon);
  font-weight: 850;
}

#ai-sales-status {
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  background: #fff7df;
  color: var(--maroon);
  font-weight: 800;
}

.ai-draft,
.recommendation,
.followup-item,
.score-box {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.ai-draft p,
.recommendation p,
.followup-item p,
.score-box p,
.helper-text {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.ai-draft textarea {
  min-height: 96px;
}

.score-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.score-signals span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff1c2;
  color: var(--maroon);
  font-size: 12px;
  font-weight: 850;
}

.csv-map-grid {
  display: grid;
  gap: 8px;
}

.draft-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.temperature {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff1c2;
  color: var(--maroon);
  font-size: 12px;
  font-weight: 900;
}

.lead-list {
  display: grid;
  gap: 8px;
  padding: 0 16px 12px;
}

.lead-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
  color: var(--ink);
  text-align: start;
}

.lead-item.active {
  border-color: var(--gold);
  background: #fff8e3;
}

.lead-item span,
#lead-summary,
#lead-next-action {
  color: var(--muted);
  font-size: 13px;
}

.lead-card label {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  color: var(--muted);
  font-weight: 800;
}

.lead-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  font: inherit;
}

.primary,
.wide {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--maroon);
  background: var(--maroon);
  color: white;
  font-weight: 900;
}

.wide {
  width: 100%;
}

.catalog-list {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.catalog-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

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

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

.catalog-item b {
  color: var(--maroon);
  white-space: nowrap;
}

.catalog-item button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff8e8;
  color: var(--maroon);
  font-weight: 850;
}

.growth-card {
  display: grid;
  gap: 12px;
}

.growth-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.growth-metrics div {
  display: grid;
  place-items: center;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  text-align: center;
}

.growth-metrics strong {
  color: var(--maroon);
  font-size: 22px;
}

.growth-metrics span,
.growth-benefit span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.growth-list {
  display: grid;
  gap: 8px;
}

.growth-benefit {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.growth-benefit strong {
  display: block;
}

#growth-status {
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  background: #fff7df;
  color: var(--maroon);
  font-weight: 800;
}

.badge {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff1c2;
  color: var(--maroon);
  font-size: 12px;
  font-weight: 800;
}

h2 {
  margin: 10px 0 6px;
  color: var(--maroon);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.kanban {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.kanban div {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
}

.kanban div.active-stage {
  border-color: var(--gold);
  box-shadow: inset 4px 0 0 var(--gold);
}

.kanban span,
.trust-score strong {
  color: var(--maroon);
  font-size: 28px;
  font-weight: 950;
}

.trust-score {
  text-align: center;
}

.trust-score span {
  color: var(--muted);
  font-weight: 800;
}

.trust-score strong {
  display: block;
  font-size: 58px;
  line-height: 1;
  margin: 12px 0;
}

.actions {
  display: grid;
  gap: 8px;
  padding: 0 16px 16px;
}

.complaint-desk label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.complaint-desk select {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  padding: 0 10px;
  color: var(--ink);
}

.full-button {
  width: 100%;
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
}

.secondary {
  color: var(--maroon);
  background: #fff7df;
}

#complaint-guidance {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #fff7df;
  color: var(--maroon);
  font-weight: 750;
}

#verify-status {
  padding: 10px;
  background: #fff7df;
  border-radius: 8px;
  color: var(--maroon);
  font-weight: 750;
}

.public-page {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.public-hero,
.public-copy,
.public-inquiry {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.public-hero {
  background:
    linear-gradient(135deg, rgba(123, 23, 23, 0.96), rgba(152, 37, 37, 0.9)),
    radial-gradient(circle at 80% 15%, rgba(246, 215, 133, 0.35), transparent 28%);
  color: white;
}

.public-hero h2 {
  color: white;
}

.public-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.public-stats div {
  display: grid;
  place-items: center;
  min-height: 76px;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--line);
}

.public-stats strong {
  color: var(--maroon);
  font-size: 24px;
}

.public-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.public-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.public-actions button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--maroon);
  font-weight: 850;
}

.public-inquiry {
  display: grid;
  gap: 10px;
}

.public-inquiry label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.public-inquiry input,
.public-inquiry textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  font: inherit;
  color: var(--ink);
  background: #fffdf7;
}

.public-inquiry textarea {
  min-height: 82px;
  resize: vertical;
}

.check-row {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.check-row input {
  width: auto;
}

#public-inquiry-status {
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  background: #fff7df;
  color: var(--maroon);
  font-weight: 800;
}

.admin-hero {
  margin: 16px;
  padding: 16px;
  border-radius: 8px;
  background: var(--maroon);
  color: white;
}

.admin-hero h2 {
  color: white;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 0 16px 16px;
}

.admin-metrics div {
  min-height: 82px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.admin-metrics strong {
  color: var(--maroon);
  font-size: 28px;
  line-height: 1;
}

.admin-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.admin-section,
.admin-log {
  margin: 0 16px 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.admin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #f0e2c5;
}

.admin-row:first-of-type {
  border-top: 0;
}

.admin-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.admin-row button {
  min-width: 72px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff8e8;
  color: var(--maroon);
  font-weight: 850;
}

.admin-row.danger {
  box-shadow: inset 4px 0 0 var(--maroon);
  padding-inline-start: 10px;
}

.admin-log {
  background: #fff7df;
  color: var(--maroon);
}

.locked-panel {
  margin: 16px;
  padding: 16px;
  border: 1px dashed var(--gold);
  border-radius: 8px;
  background: #fff7df;
  color: var(--maroon);
}

.modal {
  width: min(420px, calc(100vw - 24px));
  border: 0;
  border-radius: 10px;
  padding: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgba(35, 22, 20, 0.5);
}

.modal-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.modal-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.modal-card header button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--maroon);
  font-size: 24px;
}

.modal-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.modal-card input,
.modal-card select,
.modal-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 10px;
  font: inherit;
}

.modal-card textarea {
  min-height: 86px;
  resize: vertical;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.modal-actions button {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  color: var(--maroon);
  font-weight: 850;
}

.modal-actions .primary {
  background: var(--maroon);
  border-color: var(--maroon);
  color: white;
}

.evidence-box {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px dashed var(--gold);
  border-radius: 8px;
  background: #fff7df;
  color: var(--maroon);
}

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

@media (min-width: 700px) {
  body {
    padding: 24px;
  }

  .app-shell {
    min-height: 860px;
    border-radius: 14px;
    overflow: hidden;
  }
}

@media (max-width: 360px) {
  .role-grid {
    grid-template-columns: 1fr;
  }
}


.business-card{border:1px solid #128c55;max-width:95%}.business-card pre{white-space:pre-wrap;overflow-wrap:anywhere}
/* Translation-safe controls: retain touch targets and allow longer words. */
button,.tab,.chip,.small-button,.primary,.icon-button{white-space:normal;overflow-wrap:anywhere;height:auto;min-height:44px;line-height:1.4;max-width:100%}
.tabs{overflow-x:auto;align-items:stretch}.tabs .tab{flex-shrink:0;min-width:5rem;max-width:14rem}.modal-actions,.chat-ai-actions,.quick-actions{flex-wrap:wrap}
#settings{padding:20px}#settings label{display:grid;gap:10px}#settings select{max-width:100%;padding:12px}
/* Desktop chat: conversation list beside the working conversation. */
@media(min-width:1000px){body{display:block;padding:0}.app-shell{width:min(1500px,100vw);margin:auto;min-height:100dvh;border-radius:0;overflow:visible}.onboarding-card{max-width:680px}.panel.active#chats{display:grid;grid-template-columns:360px minmax(0,1fr);gap:18px;align-items:start}#chats>.filters{grid-column:1/-1}#chats>.list{grid-column:1;max-height:calc(100dvh - 220px);overflow:auto}#chats>.chat-preview{grid-column:2;grid-row:2;min-height:640px;margin:0}.message-stack{max-height:46dvh;min-height:300px;overflow:auto}.fab{inset-inline-end:24px;right:auto}.tabs{justify-content:flex-start}.panel:not(#chats){max-width:1250px;width:100%;align-self:center}}
