:root {
  color-scheme: light;
  --ink: #17372b;
  --deep: #073323;
  --moss: #536b45;
  --sage: #eef2e5;
  --stone: #f8f5ed;
  --sand: #e6d7b4;
  --gold: #d9a43b;
  --rust: #a45d2d;
  --line: rgba(23, 55, 43, 0.14);
  --shadow: 0 26px 80px rgba(32, 45, 35, 0.16);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(248, 245, 237, 0.96), rgba(238, 242, 229, 0.9)),
    radial-gradient(circle at 16% 10%, rgba(217, 164, 59, 0.18), transparent 25rem),
    #f8f5ed;
}

body.dashboard-page {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: #f8f5ed;
}

body.dashboard-page::before {
  display: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background-image:
    linear-gradient(30deg, rgba(83, 107, 69, 0.06) 12%, transparent 12.5%, transparent 87%, rgba(83, 107, 69, 0.06) 87.5%),
    linear-gradient(150deg, rgba(83, 107, 69, 0.06) 12%, transparent 12.5%, transparent 87%, rgba(83, 107, 69, 0.06) 87.5%);
  background-size: 32px 56px;
}

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

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: rgba(248, 245, 237, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-mark {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 0.45rem;
  color: #fff;
  background: linear-gradient(145deg, var(--deep), #31543c);
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.98rem;
}

.brand small {
  margin-top: 0.1rem;
  color: rgba(23, 55, 43, 0.68);
  font-size: 0.78rem;
  font-weight: 700;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.25rem);
  color: rgba(23, 55, 43, 0.78);
  font-size: 0.9rem;
  font-weight: 800;
}

.header-action,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  border: 0;
  border-radius: 0.42rem;
  padding: 0.75rem 1.05rem;
  cursor: pointer;
  font-weight: 900;
}

.header-action,
.button.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--deep), #44643d);
  box-shadow: 0 14px 34px rgba(7, 51, 35, 0.22);
}

.button.secondary,
.button.compact {
  color: var(--deep);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.button.compact {
  min-height: 2.25rem;
  padding: 0.55rem 0.8rem;
  font-size: 0.78rem;
}

.button.compact.status-ok,
.button.compact.status-warning,
.button.compact.status-error,
.button.compact.status-checking {
  position: relative;
  padding-left: 1.85rem;
}

.button.compact.status-ok::before,
.button.compact.status-warning::before,
.button.compact.status-error::before,
.button.compact.status-checking::before {
  content: "";
  position: absolute;
  left: 0.72rem;
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 999px;
  background: currentColor;
}

.button.compact.status-ok {
  color: var(--deep);
  border-color: rgba(63, 111, 51, 0.36);
  background: rgba(238, 242, 229, 0.86);
}

.button.compact.status-warning {
  color: #6f420b;
  border-color: rgba(217, 164, 59, 0.46);
  background: rgba(255, 247, 222, 0.92);
}

.button.compact.status-error {
  color: #7a1f12;
  border-color: rgba(164, 93, 45, 0.42);
  background: rgba(255, 235, 229, 0.92);
}

.button.compact.status-checking::before {
  opacity: 0.55;
}

main {
  overflow: hidden;
}

.hero-section,
.section-grid,
.handoff-section,
.dashboard-shell,
.stack-section {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero-section {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  min-height: calc(100vh - 5rem);
  padding: 4.5rem 0 3rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--rust);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 1.2rem;
  color: var(--deep);
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: 0.93;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 1rem;
  color: var(--deep);
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.5rem;
}

.hero-text,
.section-copy p,
.handoff-card p,
.stack-section p {
  color: rgba(23, 55, 43, 0.76);
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.7rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-metrics span {
  min-height: 5rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.52);
  color: rgba(23, 55, 43, 0.72);
  font-size: 0.88rem;
  font-weight: 750;
}

.hero-metrics strong {
  display: block;
  color: var(--deep);
  font-size: 1.6rem;
}

.material-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  min-height: 620px;
}

.material-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 250px;
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 0.8rem;
  overflow: hidden;
  color: white;
  box-shadow: var(--shadow);
  background-size: cover;
  background-position: center;
}

.material-card span,
.material-card strong {
  position: relative;
  z-index: 1;
}

.material-card span {
  font-size: 0.84rem;
  font-weight: 900;
  text-transform: uppercase;
}

.material-card strong {
  margin-top: 0.2rem;
  font-size: 1.2rem;
}

.material-card.dg {
  background:
    linear-gradient(180deg, transparent 28%, rgba(34, 28, 17, 0.78)),
    linear-gradient(135deg, #c9a05d, #705b3d);
}

.material-card.river {
  margin-top: 3.5rem;
  background:
    linear-gradient(180deg, transparent 28%, rgba(15, 30, 31, 0.78)),
    linear-gradient(135deg, #9aa6a0, #435c60);
}

.material-card.paver {
  margin-top: -3.5rem;
  background:
    linear-gradient(180deg, transparent 28%, rgba(41, 31, 24, 0.8)),
    linear-gradient(135deg, #d7b28b, #89644f);
}

.material-card.glass {
  background:
    linear-gradient(180deg, transparent 28%, rgba(12, 42, 42, 0.82)),
    linear-gradient(135deg, #79aeb2, #1a4c46);
}

.section-grid {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 2rem;
  align-items: center;
  padding: 4rem 0;
}

.capability-list,
.status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.4rem;
}

.capability-list span,
.status-pills span,
.status-pills .button,
.sample-chip {
  border: 1px solid rgba(217, 164, 59, 0.38);
  border-radius: 999px;
  padding: 0.5rem 0.7rem;
  color: var(--deep);
  background: rgba(255, 255, 255, 0.64);
  font-size: 0.78rem;
  font-weight: 900;
}

.status-pills .button {
  min-height: 0;
  box-shadow: none;
}

.dashboard-tools-menu,
.conversation-actions-menu {
  position: relative;
}

.dashboard-tools-menu summary,
.conversation-actions-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  border: 1px solid var(--line);
  border-radius: 0.42rem;
  padding: 0.55rem 0.8rem;
  color: var(--deep);
  background: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
  list-style: none;
}

.dashboard-tools-menu summary::-webkit-details-marker,
.conversation-actions-menu summary::-webkit-details-marker {
  display: none;
}

.dashboard-tools-menu summary::after,
.conversation-actions-menu summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-left: 0.48rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.12rem) rotate(45deg);
}

.dashboard-tools-menu[open] summary,
.conversation-actions-menu[open] summary {
  border-color: rgba(7, 51, 35, 0.44);
  background: #fffdfa;
  box-shadow: 0 0 0 3px rgba(114, 130, 100, 0.12);
}

.dashboard-tools-menu > div,
.conversation-actions-menu > div {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 20;
  display: grid;
  gap: 0.4rem;
  min-width: 10.5rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: #fffdfa;
  box-shadow: 0 18px 50px rgba(32, 45, 35, 0.18);
}

.dashboard-tools-menu > div .button,
.conversation-actions-menu > div .button {
  justify-content: flex-start;
  width: 100%;
  box-shadow: none;
}

.phone-shell {
  margin-left: auto;
  width: min(100%, 540px);
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow);
}

.store-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.65rem;
  background:
    linear-gradient(90deg, rgba(7, 51, 35, 0.88), rgba(83, 107, 69, 0.68)),
    #17372b;
  color: #fff;
}

.store-card h3 {
  margin: 0.2rem 0 0.2rem;
}

.store-card p,
.store-kicker {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
}

.chat-widget {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fffdfa;
}

.chat-header,
.agent-header,
.dashboard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.chat-header {
  justify-content: flex-start;
  padding: 0.9rem;
  border-bottom: 1px solid var(--line);
  background: var(--sage);
}

.chat-header small,
.agent-header small {
  display: block;
  margin-top: 0.1rem;
  color: rgba(23, 55, 43, 0.62);
  font-size: 0.78rem;
  font-weight: 750;
}

.avatar {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border-radius: 0.45rem;
  color: #fff;
  background: var(--deep);
  font-weight: 950;
}

.chat-log {
  display: grid;
  gap: 0.7rem;
  min-height: 320px;
  max-height: 420px;
  overflow: auto;
  padding: 1rem;
}

.bubble {
  width: fit-content;
  max-width: 88%;
  padding: 0.75rem 0.85rem;
  border-radius: 0.65rem;
  font-size: 0.92rem;
  line-height: 1.45;
}

.bubble.ai {
  background: var(--sage);
}

.bubble.customer {
  justify-self: end;
  color: #fff;
  background: var(--deep);
}

.bubble.system {
  justify-self: center;
  color: rgba(23, 55, 43, 0.72);
  background: rgba(217, 164, 59, 0.18);
  font-size: 0.8rem;
  font-weight: 850;
}

.chat-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  padding: 0.8rem;
  border-top: 1px solid var(--line);
}

.chat-input-row input,
.staff-composer textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  color: var(--ink);
  background: #fff;
}

.chat-input-row input {
  min-height: 2.65rem;
  padding: 0 0.8rem;
}

.chat-input-row button {
  min-height: 2.65rem;
  border: 0;
  border-radius: 0.5rem;
  padding: 0 0.85rem;
  color: #fff;
  background: var(--deep);
  cursor: pointer;
  font-weight: 900;
}

.handoff-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 1rem;
  align-items: stretch;
  padding: 2.5rem 0 4rem;
}

.handoff-card,
.translation-flow,
.dashboard-shell,
.stack-grid article {
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
}

.handoff-card {
  padding: 1.4rem;
}

.translation-flow {
  display: grid;
  grid-template-columns: 1fr 2.5rem 1fr 2.5rem 1fr;
  align-items: center;
  padding: 1rem;
}

.flow-item {
  min-height: 13rem;
  padding: 1rem;
  border-radius: 0.65rem;
}

.flow-item.customer {
  color: #fff;
  background: var(--deep);
}

.flow-item.staff {
  border: 1px solid var(--line);
  background: var(--stone);
}

.flow-item small,
.flow-item span {
  display: block;
  font-size: 0.76rem;
  font-weight: 850;
  opacity: 0.72;
}

.flow-item strong {
  display: block;
  margin: 1.2rem 0;
  font-size: 1.05rem;
  line-height: 1.4;
}

.flow-line {
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--moss));
}

.dashboard-shell {
  padding: 1rem;
}

.employee-dashboard {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  padding: clamp(0.5rem, 1.5vw, 1rem);
}

.employee-dashboard .dashboard-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1280px, 100%);
  height: calc(100vh - clamp(1rem, 3vw, 2rem));
  min-height: 0;
  margin: 0 auto;
  padding: clamp(0.5rem, 1.2vw, 1rem);
}

.dashboard-page .inbox-metrics,
.dashboard-page .widget-status-panel,
.dashboard-page .review-digest-panel {
  display: none !important;
}

.dashboard-page[data-staff-state="locked"] .agent-actions,
.dashboard-page[data-staff-state="locked"] .staff-composer,
.staff-composer[hidden] {
  display: none;
}

.dashboard-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0.25rem 0.75rem;
}

.dashboard-top h1,
.dashboard-top h2 {
  margin-bottom: 0;
}

.dashboard-top h1 {
  color: var(--deep);
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  line-height: 1;
}

.dashboard-top p {
  margin: 0.35rem 0 0;
  color: rgba(23, 55, 43, 0.66);
  font-weight: 750;
}

.inbox-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(6.6rem, 0.75fr)) minmax(14rem, 1.55fr);
  gap: 0.65rem;
  padding: 0 0.25rem 0.75rem;
}

.metric-card {
  min-width: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: rgba(238, 242, 229, 0.68);
}

.metric-card small,
.metric-card strong {
  display: block;
  min-width: 0;
}

.metric-card small {
  margin-bottom: 0.2rem;
  color: rgba(23, 55, 43, 0.58);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.metric-card strong {
  overflow: hidden;
  color: var(--deep);
  font-size: clamp(1rem, 1.8vw, 1.28rem);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-card.wide {
  background: rgba(255, 253, 250, 0.78);
}

.widget-status-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0.25rem 0.75rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(255, 253, 250, 0.78);
}

.widget-status-panel small,
.widget-status-panel strong,
.widget-status-panel em {
  display: block;
}

.widget-status-panel small {
  margin-bottom: 0.18rem;
  color: rgba(23, 55, 43, 0.58);
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
}

.widget-status-panel strong {
  color: var(--deep);
  line-height: 1.2;
}

.widget-status-panel p {
  margin: 0.22rem 0 0;
  color: rgba(23, 55, 43, 0.68);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.35;
}

.widget-status-panel em {
  margin-top: 0.32rem;
  color: rgba(23, 55, 43, 0.5);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 800;
}

.manual-widget-install {
  display: grid;
  gap: 0.32rem;
  max-width: 46rem;
  margin-top: 0.58rem;
  padding: 0.58rem 0.65rem;
  border: 1px solid rgba(23, 55, 43, 0.13);
  border-radius: 0.5rem;
  background: rgba(255, 253, 250, 0.78);
}

.manual-widget-install code {
  overflow-x: auto;
  color: var(--deep);
  font-size: 0.76rem;
  font-weight: 850;
  white-space: pre-wrap;
  word-break: break-word;
}

.manual-widget-install span {
  color: rgba(23, 55, 43, 0.58);
  font-size: 0.74rem;
  font-weight: 800;
}

.theme-app-extension-install {
  display: grid;
  gap: 0.28rem;
  max-width: 46rem;
  margin-top: 0.58rem;
  padding: 0.58rem 0.65rem;
  border: 1px solid rgba(114, 130, 100, 0.24);
  border-radius: 0.5rem;
  background: rgba(236, 243, 229, 0.8);
}

.theme-app-extension-install strong {
  color: var(--deep);
  font-size: 0.86rem;
  line-height: 1.2;
}

.theme-app-extension-install code {
  overflow-x: auto;
  color: var(--deep);
  font-size: 0.76rem;
  font-weight: 850;
  white-space: pre-wrap;
  word-break: break-word;
}

.theme-app-extension-install span {
  color: rgba(23, 55, 43, 0.62);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.35;
}

.commerce-readiness {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.35rem;
  padding: 0.72rem;
  border: 1px solid rgba(23, 55, 43, 0.13);
  border-radius: 0.55rem;
  background: rgba(255, 253, 250, 0.82);
}

.commerce-readiness-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.commerce-readiness-head span {
  color: rgba(23, 55, 43, 0.56);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.commerce-readiness-head strong {
  color: var(--deep);
  font-size: 0.92rem;
}

.widget-setup-body .commerce-readiness ul {
  display: grid;
  gap: 0.42rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.commerce-readiness li {
  display: grid;
  grid-template-columns: 4.8rem minmax(0, 1fr);
  gap: 0.15rem 0.55rem;
  align-items: start;
  padding: 0.45rem 0.5rem;
  border: 1px solid rgba(23, 55, 43, 0.1);
  border-radius: 0.45rem;
  background: rgba(238, 242, 229, 0.45);
}

.commerce-readiness li.missing {
  border-color: rgba(180, 100, 42, 0.28);
  background: rgba(255, 242, 224, 0.62);
}

.commerce-readiness li > span {
  display: inline-flex;
  justify-content: center;
  padding: 0.18rem 0.4rem;
  border-radius: 999px;
  color: #1f5a2d;
  background: rgba(93, 141, 67, 0.14);
  font-size: 0.68rem;
  font-weight: 950;
}

.commerce-readiness li.missing > span {
  color: #8a430f;
  background: rgba(180, 100, 42, 0.14);
}

.commerce-readiness li > strong {
  color: var(--deep);
  font-size: 0.86rem;
}

.commerce-readiness li > p {
  grid-column: 2;
  margin: 0;
  color: rgba(23, 55, 43, 0.66);
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.35;
}

.review-digest-panel {
  display: grid;
  gap: 0.65rem;
  margin: 0 0.25rem 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(255, 253, 250, 0.84);
}

.review-digest-panel[hidden] {
  display: none;
}

.review-digest-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.review-digest-heading small,
.review-digest-heading strong {
  display: block;
}

.review-digest-heading small,
.review-digest-item span {
  color: rgba(23, 55, 43, 0.58);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.review-digest-heading strong {
  color: var(--deep);
  line-height: 1.2;
}

.review-digest-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.review-digest-item {
  min-width: 0;
  border: 1px solid rgba(23, 55, 43, 0.14);
  border-radius: 0.55rem;
  padding: 0.62rem;
  background: #fff;
  color: var(--deep);
  text-align: left;
  cursor: pointer;
}

.review-digest-item:hover,
.review-digest-item:focus-visible {
  border-color: var(--gold);
  outline: 0;
}

.review-digest-item strong,
.review-digest-item small,
.review-digest-item p {
  display: block;
  min-width: 0;
}

.review-digest-item strong {
  overflow: hidden;
  margin-top: 0.28rem;
  font-size: 0.86rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-digest-item small {
  margin-top: 0.22rem;
  color: rgba(23, 55, 43, 0.56);
  font-size: 0.72rem;
  font-weight: 800;
}

.review-digest-item p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0.42rem 0 0;
  color: rgba(23, 55, 43, 0.7);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.widget-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: end;
  align-items: center;
  flex: 0 0 auto;
}

.widget-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  border: 1px solid rgba(23, 55, 43, 0.16);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  color: var(--deep);
  background: #fff;
  font-size: 0.76rem;
  font-weight: 950;
  white-space: nowrap;
}

.widget-status-panel.ok {
  border-color: rgba(83, 107, 69, 0.28);
  background: rgba(238, 242, 229, 0.72);
}

.widget-status-panel.ok .widget-status-badge {
  border-color: rgba(83, 107, 69, 0.38);
  background: rgba(238, 242, 229, 0.9);
}

.widget-status-panel.warning {
  border-color: rgba(217, 164, 59, 0.38);
  background: rgba(255, 248, 231, 0.86);
}

.widget-status-panel.warning .widget-status-badge {
  border-color: rgba(217, 164, 59, 0.52);
  background: #fff8e7;
}

.widget-status-panel.error {
  border-color: rgba(143, 63, 47, 0.32);
  background: rgba(255, 243, 232, 0.88);
}

.widget-status-panel.error .widget-status-badge {
  border-color: rgba(143, 63, 47, 0.36);
  color: #8f3f2f;
  background: #fff3e8;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1rem;
  height: 100%;
  min-height: 0;
}

.conversation-list,
.agent-panel,
.tools-panel {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #fffdfa;
}

.conversation-list {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  padding: 0.7rem;
  min-height: 0;
  max-height: none;
  overflow: auto;
}

.notification-status-panel {
  position: absolute;
  z-index: 12;
  top: 4.9rem;
  right: clamp(0.5rem, 1.2vw, 1rem);
  width: min(25rem, calc(100% - 1rem));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border: 1px solid rgba(217, 164, 59, 0.34);
  border-radius: 0.65rem;
  padding: 0.62rem 0.72rem;
  background: rgba(255, 253, 250, 0.96);
  box-shadow: 0 12px 30px rgba(32, 45, 35, 0.06);
}

.notification-status-panel[hidden] {
  display: none;
}

.notification-status-panel small,
.notification-status-panel strong {
  display: block;
}

.notification-status-panel small {
  color: rgba(23, 55, 43, 0.58);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.notification-status-panel strong {
  margin-top: 0.12rem;
  color: var(--deep);
  font-size: 0.88rem;
}

.notification-status-panel p {
  margin: 0.18rem 0 0;
  color: rgba(23, 55, 43, 0.68);
  font-size: 0.76rem;
  line-height: 1.35;
}

.notification-status-panel.enabled {
  border-color: rgba(83, 107, 69, 0.26);
  background: rgba(238, 242, 229, 0.72);
}

.notification-status-panel.blocked {
  border-color: rgba(164, 93, 45, 0.36);
  background: rgba(248, 245, 237, 0.92);
}

.conversation-filters {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  padding-bottom: 0.45rem;
  background: #fffdfa;
}

.conversation-filters button {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.48rem 0.45rem;
  background: #f8f5ed;
  color: var(--deep);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1.1;
  cursor: pointer;
}

.conversation-filters button.active {
  border-color: rgba(7, 51, 35, 0.7);
  background: var(--deep);
  color: white;
}

.conversation-search {
  position: sticky;
  top: 3.15rem;
  z-index: 3;
  display: grid;
  gap: 0.28rem;
  padding-bottom: 0.45rem;
  background: #fffdfa;
}

.conversation-search span {
  color: rgba(23, 55, 43, 0.58);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.conversation-search input {
  width: 100%;
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0 0.7rem;
  background: #fff;
  color: var(--deep);
  font: inherit;
  font-size: 0.86rem;
  outline: none;
}

.conversation-search input:focus {
  border-color: rgba(7, 51, 35, 0.55);
  box-shadow: 0 0 0 3px rgba(114, 130, 100, 0.16);
}

.inbox-pulse {
  position: sticky;
  top: 6.35rem;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  padding-bottom: 0.45rem;
  background: #fffdfa;
}

.inbox-pulse button {
  min-width: 0;
  border: 1px solid rgba(23, 55, 43, 0.12);
  border-radius: 0.55rem;
  padding: 0.52rem 0.58rem;
  color: var(--deep);
  background: rgba(238, 242, 229, 0.58);
  text-align: left;
  cursor: pointer;
}

.inbox-pulse button:hover,
.inbox-pulse button:focus-visible {
  border-color: rgba(7, 51, 35, 0.38);
  background: #eef2e5;
  outline: 0;
}

.inbox-pulse small,
.inbox-pulse strong {
  display: block;
  min-width: 0;
}

.inbox-pulse small {
  overflow: hidden;
  color: rgba(23, 55, 43, 0.58);
  font-size: 0.64rem;
  font-weight: 950;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.inbox-pulse strong {
  overflow: hidden;
  margin-top: 0.16rem;
  color: var(--deep);
  font-size: 0.82rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-day {
  position: sticky;
  top: 11.1rem;
  z-index: 1;
  padding: 0.45rem 0.35rem 0.25rem;
  color: rgba(23, 55, 43, 0.58);
  background: #fffdfa;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.conversation {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  padding: 0.8rem;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.conversation.active {
  border-color: rgba(217, 164, 59, 0.42);
  background: rgba(217, 164, 59, 0.13);
}

.conversation.needs-attention {
  border-color: rgba(164, 93, 45, 0.42);
  background: rgba(164, 93, 45, 0.1);
}

.conversation.unread-attention {
  border-color: rgba(164, 93, 45, 0.62);
  background: rgba(164, 93, 45, 0.16);
}

.conversation small,
.conversation em {
  color: rgba(23, 55, 43, 0.62);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 750;
}

.conversation strong,
.conversation small {
  display: block;
}

.summary-badge {
  display: inline-grid;
  min-width: 1.15rem;
  height: 1.15rem;
  margin-left: 0.35rem;
  padding: 0 0.28rem;
  place-items: center;
  border: 1px solid rgba(217, 164, 59, 0.58);
  border-radius: 999px;
  color: var(--deep);
  background: rgba(217, 164, 59, 0.18);
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1;
  vertical-align: 0.08rem;
  white-space: nowrap;
}

.summary-badge.large {
  min-width: 0;
  height: auto;
  margin-left: 0.5rem;
  padding: 0.2rem 0.45rem;
  font-size: 0.68rem;
  vertical-align: 0.12rem;
}

.summary-badge.stale {
  border-color: rgba(164, 86, 43, 0.65);
  color: #6b2d13;
  background: rgba(164, 86, 43, 0.16);
}

.gap-badge {
  display: inline-grid;
  min-width: 1.15rem;
  height: 1.15rem;
  margin-left: 0.32rem;
  padding: 0 0.28rem;
  place-items: center;
  border: 1px solid rgba(109, 73, 44, 0.44);
  border-radius: 999px;
  color: #5d3b24;
  background: #fff2d4;
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1;
  vertical-align: 0.08rem;
  white-space: nowrap;
}

.gap-badge.feedback {
  border-color: rgba(174, 95, 42, 0.3);
  color: #8b4a1f;
  background: #fff3e8;
}

.opportunity-badge {
  display: inline-grid;
  min-width: 0;
  height: 1.15rem;
  margin-left: 0.32rem;
  padding: 0 0.4rem;
  place-items: center;
  border: 1px solid rgba(63, 111, 51, 0.28);
  border-radius: 999px;
  color: #17372b;
  background: #edf5e8;
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1;
  vertical-align: 0.08rem;
  white-space: nowrap;
}

.gap-badge.large {
  min-width: 0;
  height: auto;
  margin-left: 0.5rem;
  padding: 0.2rem 0.45rem;
  font-size: 0.68rem;
  vertical-align: 0.12rem;
}

.unread-badge {
  display: inline-grid;
  margin-left: 0.38rem;
  padding: 0.16rem 0.42rem;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--rust);
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1;
  vertical-align: 0.1rem;
  white-space: nowrap;
}

.typing-badge {
  display: inline-grid;
  margin-left: 0.5rem;
  padding: 0.2rem 0.48rem;
  place-items: center;
  border: 1px solid rgba(63, 111, 51, 0.28);
  border-radius: 999px;
  color: var(--deep);
  background: #eef2e5;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  vertical-align: 0.12rem;
  white-space: nowrap;
}

.dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  background: var(--moss);
}

.dot.warn {
  background: var(--gold);
}

.dot.resolved {
  background: rgba(23, 55, 43, 0.32);
}

.conversation.needs-attention .dot.warn {
  background: var(--rust);
  box-shadow: 0 0 0 4px rgba(164, 93, 45, 0.16);
}

.password-gate {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: rgba(238, 242, 229, 0.72);
}

.password-gate strong,
.password-gate small {
  display: block;
}

.password-gate small {
  color: rgba(23, 55, 43, 0.62);
  font-weight: 750;
  line-height: 1.4;
}

.password-gate input {
  width: 100%;
  min-height: 2.7rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0 0.75rem;
  color: var(--ink);
  background: #fffdfa;
}

.agent-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
}

.agent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--sage);
}

.agent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: end;
  align-items: center;
}

.button.danger {
  color: #fff;
  background: #8f3f2f;
}

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

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

.agent-messages {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding: 1rem;
}

.agent-message,
.context-box,
.visitor-context,
.commerce-summary,
.sales-opportunity,
.ai-decision-summary,
.translation-preview {
  border-radius: 0.5rem;
  padding: 0.85rem;
}

.agent-message.inbound {
  color: #fff;
  background: var(--deep);
}

.agent-message.translation,
.context-box,
.visitor-context,
.commerce-summary,
.sales-opportunity,
.ai-decision-summary,
.translation-preview {
  border: 1px solid var(--line);
  background: var(--stone);
}

.agent-message.feedback {
  border: 1px solid rgba(196, 148, 45, 0.42);
  background: #fff8e7;
}

.feedback-context-cards {
  display: grid;
  gap: 0.38rem;
  margin-top: 0.55rem;
}

.feedback-context-cards > strong {
  color: rgba(23, 55, 43, 0.7);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.feedback-context-cards a {
  display: grid;
  gap: 0.12rem;
  border: 1px solid rgba(23, 55, 43, 0.12);
  border-radius: 0.45rem;
  padding: 0.45rem 0.55rem;
  color: var(--deep);
  background: #fffdfa;
  font-weight: 900;
  text-decoration: none;
}

.feedback-context-cards a span {
  color: rgba(23, 55, 43, 0.6);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.agent-message.knowledge-gap {
  border: 1px solid rgba(109, 73, 44, 0.36);
  background: #fffaf0;
}

.agent-message.rich-context {
  border: 1px solid rgba(83, 107, 69, 0.24);
  background: rgba(238, 242, 229, 0.72);
}

.agent-message.card-click {
  border-style: dashed;
  background: rgba(255, 253, 250, 0.78);
}

.agent-message.cart-event {
  border-color: rgba(63, 111, 51, 0.34);
  background: rgba(236, 245, 229, 0.92);
}

.agent-message small,
.visitor-context small,
.commerce-summary > small,
.sales-opportunity > small,
.ai-decision-summary > small,
.translation-preview small {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.74rem;
  font-weight: 900;
  opacity: 0.7;
  text-transform: uppercase;
}

.agent-message p,
.context-box p,
.translation-preview p {
  margin: 0;
  line-height: 1.55;
}

.rich-context-list {
  display: grid;
  gap: 0.45rem;
}

.rich-context-list a {
  display: grid;
  gap: 0.14rem;
  border: 1px solid rgba(23, 55, 43, 0.12);
  border-radius: 0.48rem;
  padding: 0.55rem 0.6rem;
  background: rgba(255, 253, 250, 0.76);
}

.rich-context-list .cart-event-item {
  display: grid;
  gap: 0.14rem;
  border: 1px solid rgba(23, 55, 43, 0.12);
  border-radius: 0.48rem;
  padding: 0.55rem 0.6rem;
  background: rgba(255, 253, 250, 0.76);
  text-transform: none;
}

.rich-context-list a:hover,
.rich-context-list a:focus-visible {
  border-color: rgba(7, 51, 35, 0.34);
  outline: 0;
}

.rich-context-list span,
.rich-context-list em {
  color: rgba(23, 55, 43, 0.62);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
  line-height: 1.25;
}

.rich-context-list span {
  text-transform: uppercase;
}

.rich-context-list strong {
  color: var(--deep);
  font-size: 0.92rem;
  line-height: 1.24;
}

.context-box strong {
  display: block;
  margin-bottom: 0.35rem;
}

.visitor-context {
  display: grid;
  gap: 0.5rem;
}

.commerce-summary {
  background: rgba(255, 253, 250, 0.78);
}

.commerce-summary summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  list-style: none;
}

.commerce-summary summary::-webkit-details-marker {
  display: none;
}

.commerce-summary summary::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  border: 1px solid rgba(23, 55, 43, 0.16);
  color: var(--deep);
  background: rgba(238, 242, 229, 0.8);
  font-size: 0.9rem;
  font-weight: 950;
}

.commerce-summary[open] summary::before {
  content: "-";
}

.commerce-summary summary span {
  color: rgba(23, 55, 43, 0.62);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.commerce-summary summary strong {
  min-width: 0;
  color: var(--deep);
  font-size: 0.84rem;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commerce-summary-body {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.65rem;
}

.sales-opportunity {
  display: grid;
  gap: 0.62rem;
  border-color: rgba(196, 148, 45, 0.32);
  background: #fff8e7;
}

.sales-opportunity.score-high {
  border-color: rgba(164, 93, 45, 0.38);
  background: #fff1e6;
}

.sales-opportunity.score-warm {
  border-color: rgba(196, 148, 45, 0.38);
}

.opportunity-head,
.opportunity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.opportunity-head strong {
  color: var(--deep);
  font-size: 1rem;
}

.opportunity-head span,
.opportunity-row span {
  color: rgba(23, 55, 43, 0.62);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.sales-opportunity ul {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding-left: 1.1rem;
  color: rgba(23, 55, 43, 0.86);
  font-size: 0.86rem;
}

.sales-opportunity p {
  margin: 0;
  color: rgba(23, 55, 43, 0.86);
  font-size: 0.88rem;
  line-height: 1.45;
}

.sales-opportunity a,
.opportunity-row strong {
  color: var(--deep);
  font-size: 0.88rem;
  font-weight: 950;
}

.sales-opportunity a {
  text-align: right;
}

.commerce-summary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.commerce-summary-stats span {
  display: grid;
  gap: 0.15rem;
  border: 1px solid rgba(23, 55, 43, 0.12);
  border-radius: 0.45rem;
  padding: 0.5rem;
  background: rgba(238, 242, 229, 0.58);
}

.commerce-summary-stats small {
  color: rgba(23, 55, 43, 0.62);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.commerce-summary-stats strong {
  color: var(--deep);
  font-size: 1rem;
}

.commerce-summary-row,
.commerce-summary-list,
.commerce-summary-links {
  display: grid;
  gap: 0.3rem;
  color: rgba(23, 55, 43, 0.82);
  font-size: 0.86rem;
}

.commerce-summary-row {
  grid-template-columns: 5.3rem minmax(0, 1fr);
  align-items: baseline;
}

.commerce-summary-row span,
.commerce-summary-list > span,
.commerce-summary-links > span {
  color: rgba(23, 55, 43, 0.62);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.commerce-summary a,
.commerce-summary strong {
  color: var(--deep);
  font-weight: 900;
}

.commerce-summary a {
  text-decoration: underline;
  text-underline-offset: 0.18rem;
}

.commerce-summary ul {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding-left: 1rem;
}

.commerce-summary-links {
  grid-template-columns: 1fr;
}

.ai-decision-summary {
  display: grid;
  gap: 0.6rem;
  border-color: rgba(83, 107, 69, 0.3);
  background: rgba(238, 242, 229, 0.62);
}

.ai-decision-summary.needs-review {
  border-color: rgba(196, 148, 45, 0.5);
  background: #fff8e7;
}

.ai-decision-row,
.ai-decision-cards,
.ai-decision-review {
  display: grid;
  gap: 0.28rem;
  color: rgba(23, 55, 43, 0.84);
  font-size: 0.86rem;
}

.ai-decision-row {
  grid-template-columns: 4.4rem minmax(0, 1fr);
  align-items: baseline;
}

.ai-decision-row span,
.ai-decision-cards > span,
.ai-decision-review > span {
  color: rgba(23, 55, 43, 0.62);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.ai-decision-row p,
.ai-decision-review p {
  margin: 0;
  line-height: 1.45;
}

.ai-decision-cards a,
.ai-decision-cards strong,
.ai-decision-row strong,
.ai-decision-review strong {
  color: var(--deep);
  font-weight: 900;
}

.ai-decision-cards a {
  display: block;
  text-decoration: underline;
  text-underline-offset: 0.18rem;
}

.ai-decision-summary > p {
  margin: 0;
  color: rgba(23, 55, 43, 0.68);
  font-size: 0.84rem;
}

.review-note {
  border: 1px solid rgba(196, 148, 45, 0.34);
  border-radius: 0.72rem;
  padding: 0.72rem 0.82rem;
  background: #fff8e7;
}

.review-note summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  color: var(--deep);
  cursor: pointer;
}

.review-note summary span {
  border-radius: 999px;
  padding: 0.16rem 0.46rem;
  background: rgba(196, 148, 45, 0.14);
  color: #765315;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.review-note summary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--deep);
  font-size: 0.9rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-note-body {
  display: grid;
  gap: 0.3rem;
  padding-top: 0.62rem;
}

.review-note-body p,
.review-note-body small {
  margin: 0;
  color: rgba(23, 55, 43, 0.76);
  font-weight: 780;
  line-height: 1.42;
}

.review-note-body small {
  color: rgba(23, 55, 43, 0.58);
  font-size: 0.82rem;
}

.visitor-context .context-row {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: baseline;
  font-size: 0.9rem;
}

.visitor-context .context-row span {
  color: rgba(23, 55, 43, 0.62);
  font-weight: 900;
}

.visitor-context a,
.visitor-context strong {
  color: var(--deep);
  font-weight: 900;
}

.visitor-context a {
  text-decoration: underline;
  text-underline-offset: 0.18rem;
}

.visitor-context ul {
  display: grid;
  gap: 0.25rem;
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
  color: rgba(23, 55, 43, 0.78);
  font-size: 0.84rem;
  line-height: 1.4;
}

.context-journey {
  display: grid;
  gap: 0.35rem;
  padding-top: 0.15rem;
}

.context-journey > span {
  color: rgba(23, 55, 43, 0.62);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.visitor-context .context-journey ol {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding-left: 1.15rem;
}

.visitor-context .context-journey li {
  padding-left: 0.1rem;
}

.visitor-context .context-journey small {
  display: block;
  margin-top: 0.05rem;
  color: rgba(23, 55, 43, 0.58);
  font-size: 0.76rem;
  line-height: 1.25;
}

.staff-composer {
  display: grid;
  gap: 0.55rem;
  padding: 0.8rem 1rem 1rem;
  border-top: 1px solid var(--line);
}

.staff-composer label {
  font-weight: 900;
}

.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.quick-replies button {
  min-height: 2rem;
  border: 1px solid rgba(83, 107, 69, 0.28);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  color: var(--deep);
  background: rgba(238, 242, 229, 0.76);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
}

.quick-replies button:hover:not(:disabled),
.quick-replies button:focus-visible {
  border-color: rgba(217, 164, 59, 0.72);
  background: rgba(217, 164, 59, 0.16);
}

.quick-replies button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.suggested-card-replies {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
  min-height: 0;
}

.suggested-card-replies:empty {
  display: none;
}

.suggested-card-replies span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.suggested-card-replies button {
  min-height: 1.95rem;
  border: 1px solid rgba(217, 164, 59, 0.5);
  border-radius: 999px;
  padding: 0.32rem 0.62rem;
  color: var(--deep);
  background: rgba(255, 250, 235, 0.9);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 950;
}

.suggested-card-replies button:hover:not(:disabled),
.suggested-card-replies button:focus-visible {
  border-color: rgba(217, 164, 59, 0.86);
  background: rgba(217, 164, 59, 0.18);
}

.suggested-card-replies button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.staff-card-tools {
  display: grid;
  gap: 0.55rem;
  border: 1px solid rgba(83, 107, 69, 0.22);
  border-radius: 0.5rem;
  padding: 0.55rem 0.65rem;
  background: rgba(238, 242, 229, 0.44);
}

.staff-card-tools summary {
  cursor: pointer;
  color: var(--deep);
  font-size: 0.82rem;
  font-weight: 950;
}

.staff-card-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.staff-card-shortcuts .button {
  min-height: 2rem;
  padding-inline: 0.72rem;
}

.staff-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.25fr) minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
}

.staff-card-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.45rem;
}

.staff-card-grid input {
  min-width: 0;
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 0.42rem;
  padding: 0.55rem 0.65rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
}

.staff-card-search input {
  min-width: 0;
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 0.42rem;
  padding: 0.55rem 0.65rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
}

.staff-card-results {
  display: grid;
  gap: 0.35rem;
  max-height: 13.25rem;
  overflow-y: auto;
}

.staff-card-results > small {
  color: rgba(23, 55, 43, 0.62);
  font-size: 0.78rem;
  font-weight: 800;
}

.staff-card-result {
  display: grid;
  grid-template-columns: 2.45rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  border: 1px solid rgba(23, 55, 43, 0.12);
  border-radius: 0.55rem;
  padding: 0.45rem 0.55rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  text-align: left;
}

.staff-card-result:hover,
.staff-card-result:focus-visible {
  border-color: rgba(217, 164, 59, 0.72);
  outline: 0;
}

.staff-card-result img,
.staff-card-result-icon {
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 0.4rem;
  object-fit: cover;
  background: var(--sage);
}

.staff-card-result strong,
.staff-card-result small {
  display: block;
}

.staff-card-result strong {
  color: var(--deep);
  font-size: 0.82rem;
}

.staff-card-result small {
  margin-top: 0.12rem;
  color: rgba(23, 55, 43, 0.64);
  font-size: 0.74rem;
  line-height: 1.25;
}

.staff-card-result em {
  color: var(--moss);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 950;
}

.agent-message.staff-card {
  border-color: rgba(83, 107, 69, 0.24);
  background: rgba(238, 242, 229, 0.5);
}

.rich-context-meta {
  display: grid;
  gap: 0.2rem;
  margin: 0.45rem 0 0;
  color: rgba(23, 55, 43, 0.72);
  font-size: 0.78rem;
  line-height: 1.35;
}

.rich-context-meta strong {
  color: var(--deep);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.staff-card-preview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.45rem;
  border: 1px solid rgba(23, 55, 43, 0.14);
  border-radius: 0.55rem;
  padding: 0.7rem 0.75rem;
  color: var(--deep);
  background: #fffdfa;
  font-weight: 900;
}

.staff-card-preview img {
  width: 3rem;
  height: 3rem;
  border-radius: 0.42rem;
  object-fit: cover;
  background: var(--sage);
}

.staff-card-preview small {
  display: block;
  margin-top: 0.2rem;
  color: rgba(23, 55, 43, 0.66);
  font-size: 0.78rem;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
}

.staff-composer textarea {
  min-height: 4.25rem;
  max-height: 7rem;
  padding: 0.8rem;
  resize: none;
}

.summary-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(7, 51, 35, 0.34);
}

.summary-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 2rem));
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fffdfa;
  box-shadow: var(--shadow);
}

.summary-modal header,
.summary-modal footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--sage);
}

.summary-modal header {
  border-bottom: 1px solid var(--line);
}

.summary-modal footer {
  flex-wrap: wrap;
  justify-content: end;
  border-top: 1px solid var(--line);
}

.summary-modal strong,
.summary-modal small {
  display: block;
}

.summary-modal small {
  margin-top: 0.15rem;
  color: rgba(23, 55, 43, 0.62);
  font-weight: 750;
}

.widget-setup-modal {
  max-height: min(620px, calc(100vh - 2rem));
}

.employee-help-modal {
  max-height: min(760px, calc(100vh - 2rem));
}

.employee-help-body {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  min-height: 0;
  overflow: auto;
  padding: 1rem;
}

.help-priority-card {
  display: grid;
  gap: 0.22rem;
  border: 1px solid rgba(83, 107, 69, 0.24);
  border-radius: 0.58rem;
  padding: 0.85rem;
  background: rgba(238, 242, 229, 0.78);
}

.help-priority-card strong,
.employee-help-grid h3 {
  color: var(--deep);
}

.help-priority-card p {
  margin: 0;
  color: rgba(23, 55, 43, 0.74);
  font-weight: 800;
  line-height: 1.42;
}

.employee-help-search {
  display: grid;
  gap: 0.35rem;
}

.employee-help-search label {
  color: rgba(23, 55, 43, 0.66);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.employee-help-search input {
  width: 100%;
  min-height: 2.55rem;
  border: 1px solid rgba(23, 55, 43, 0.16);
  border-radius: 0.58rem;
  padding: 0 0.8rem;
  background: #fffdfa;
  color: var(--deep);
  font: inherit;
  font-weight: 800;
}

.employee-help-search input:focus {
  border-color: rgba(83, 107, 69, 0.55);
  box-shadow: 0 0 0 3px rgba(114, 130, 100, 0.16);
  outline: 0;
}

.employee-help-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.employee-help-topics button {
  border: 1px solid rgba(23, 55, 43, 0.13);
  border-radius: 999px;
  padding: 0.35rem 0.62rem;
  background: rgba(255, 253, 250, 0.92);
  color: var(--deep);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.employee-help-topics button:hover,
.employee-help-topics button:focus-visible {
  border-color: rgba(83, 107, 69, 0.42);
  background: rgba(238, 242, 229, 0.86);
  outline: 0;
}

.employee-help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.employee-help-grid details {
  border: 1px solid rgba(23, 55, 43, 0.1);
  border-radius: 0.58rem;
  padding: 0.85rem;
  background: rgba(255, 253, 250, 0.9);
}

.employee-help-grid summary {
  color: var(--deep);
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 950;
}

.employee-help-grid ul {
  display: grid;
  gap: 0.32rem;
  margin: 0.62rem 0 0;
  padding-left: 1rem;
  color: rgba(23, 55, 43, 0.74);
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.38;
}

.widget-setup-body {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  min-height: 0;
  overflow: auto;
  padding: 1rem;
}

.widget-setup-body strong {
  color: var(--deep);
  font-size: 1.08rem;
  line-height: 1.2;
}

.widget-setup-body p {
  margin: 0;
  color: rgba(23, 55, 43, 0.72);
  font-weight: 750;
  line-height: 1.42;
}

.widget-setup-body ul {
  display: grid;
  gap: 0.35rem;
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
  color: rgba(23, 55, 43, 0.68);
  font-size: 0.88rem;
  font-weight: 780;
}

.widget-setup-body .widget-status-badge {
  justify-self: start;
}

.summary-close {
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  color: var(--deep);
  background: #fffdfa;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.summary-text {
  min-height: 22rem;
  min-width: 0;
  border: 0;
  padding: 1rem;
  color: var(--ink);
  background: #fffdfa;
  font: 0.92rem/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  resize: none;
}

.summary-status {
  margin: 0;
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--line);
  color: rgba(23, 55, 43, 0.7);
  font-size: 0.86rem;
  font-weight: 750;
}

.summary-status.warning {
  color: #6b2d13;
  background: rgba(164, 86, 43, 0.08);
}

.tools-panel {
  display: grid;
  align-content: start;
  gap: 0.6rem;
  padding: 1rem;
}

.tools-panel h3 {
  margin-bottom: 0.2rem;
}

.tools-panel button {
  min-height: 2.7rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  color: var(--deep);
  background: var(--sage);
  cursor: pointer;
  font-weight: 900;
}

.tool-note {
  margin-top: 0.5rem;
  padding: 0.85rem;
  border-radius: 0.55rem;
  color: #fff;
  background: var(--deep);
}

.tool-note p {
  margin: 0.35rem 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
  line-height: 1.5;
}

.stack-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  padding: 4.5rem 0;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.stack-grid article {
  padding: 1.2rem;
}

.stack-grid strong {
  display: block;
  color: var(--deep);
  font-size: 1.05rem;
}

.stack-grid p {
  margin: 0.55rem 0 0;
  color: rgba(23, 55, 43, 0.72);
  line-height: 1.55;
}

@media (max-width: 980px) {
  body.dashboard-page {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  .employee-dashboard {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .employee-dashboard .dashboard-shell {
    height: auto;
  }

  .dashboard-top {
    align-items: start;
    flex-direction: column;
  }

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

  .widget-status-panel {
    align-items: start;
    flex-direction: column;
  }

  .widget-status-actions {
    justify-content: start;
  }

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

  .metric-card.wide {
    grid-column: 1 / -1;
  }

  nav,
  .header-action {
    display: none;
  }

  .hero-section,
  .section-grid,
  .handoff-section,
  .stack-section {
    grid-template-columns: 1fr;
  }

  .material-board {
    min-height: auto;
  }

  .material-card.river,
  .material-card.paver {
    margin-top: 0;
  }

  .translation-flow,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .staff-card-grid,
  .staff-card-search {
    grid-template-columns: 1fr;
  }

  .conversation-list,
  .agent-messages {
    max-height: none;
  }

  .flow-line {
    width: 2px;
    height: 2rem;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .hero-section,
  .section-grid,
  .handoff-section,
  .stack-section {
    width: min(100% - 1rem, 1180px);
  }

  .hero-section {
    padding-top: 2.5rem;
  }

  .hero-metrics,
  .material-board,
  .stack-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    padding-inline: 0.75rem;
  }

  .brand small {
    display: none;
  }

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

  .inbox-metrics {
    grid-template-columns: 1fr;
  }

  .review-digest-heading {
    align-items: stretch;
    flex-direction: column;
  }

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

  .metric-card.wide {
    grid-column: auto;
  }
}

.empty-state {
  padding: 1rem;
  border: 1px dashed var(--line);
  border-radius: 0.55rem;
  color: rgba(23, 55, 43, 0.66);
  background: rgba(238, 242, 229, 0.6);
  font-size: 0.9rem;
  font-weight: 800;
}

.employee-empty-guide {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  max-width: 38rem;
  margin: auto;
  border: 1px solid rgba(23, 55, 43, 0.1);
  border-radius: 0.75rem;
  padding: clamp(1rem, 2vw, 1.25rem);
  background: rgba(255, 253, 250, 0.88);
  box-shadow: 0 18px 50px rgba(23, 55, 43, 0.08);
}

.employee-empty-guide small {
  display: block;
  color: rgba(23, 55, 43, 0.58);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.employee-empty-guide strong {
  display: block;
  color: var(--deep);
}

.employee-empty-guide > div > strong {
  margin-top: 0.12rem;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.05;
}

.employee-empty-guide p {
  margin: 0.3rem 0 0;
  color: rgba(23, 55, 43, 0.68);
  font-weight: 800;
  line-height: 1.42;
}

.employee-empty-guide ol {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.employee-empty-guide li {
  display: grid;
  grid-template-columns: 0.45rem minmax(0, 1fr);
  gap: 0 0.62rem;
  align-items: start;
  border-top: 1px solid rgba(23, 55, 43, 0.08);
  padding-top: 0.55rem;
  color: rgba(23, 55, 43, 0.72);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
}

.employee-empty-guide li::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.42rem;
  border-radius: 999px;
  background: var(--moss);
}

.employee-empty-guide li strong,
.employee-empty-guide li span {
  grid-column: 2;
}

.employee-empty-guide li span {
  color: rgba(23, 55, 43, 0.62);
}

.employee-empty-guide .button {
  justify-self: start;
}

.message-note {
  margin-top: 0.6rem !important;
  color: rgba(23, 55, 43, 0.62);
  font-size: 0.82rem;
}

.message-feedback {
  margin-top: 0.65rem;
  border: 1px solid rgba(23, 55, 43, 0.18);
  border-radius: 999px;
  padding: 0.34rem 0.62rem;
  background: #fff;
  color: var(--deep);
  font-size: 0.75rem;
  font-weight: 900;
}

.message-feedback:hover,
.message-feedback:focus-visible {
  border-color: var(--gold);
  outline: 0;
}

.feedback-modal label {
  display: grid;
  gap: 0.35rem;
  color: rgba(23, 55, 43, 0.72);
  font-size: 0.8rem;
  font-weight: 900;
}

.feedback-modal textarea {
  min-height: 6.5rem;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0.75rem;
  color: var(--deep);
  background: #fff;
  font: inherit;
  font-weight: 700;
}

.chat-input-row button:disabled,
.staff-composer button:disabled {
  cursor: progress;
  opacity: 0.65;
}
