:root {
  --brand-green: #16733d;
  --green-900: #0f4f33;
  --green-600: #1e8f4b;
  --green-400: #4bb36b;
  --green-200: #a6d9b4;
  --green-100: #e7f4ea;
  --ink: #0f1111;
  --charcoal: #2b2f33;
  --grey-700: #4d555d;
  --grey-600: #636b73;
  --grey-400: #a0a7ae;
  --grey-300: #d9dee2;
  --grey-200: #e5e7ea;
  --grey-100: #f3f4f6;
  --white: #ffffff;
  --success: #22c55e;
  --info: #0ea5e9;
  --warning: #f59e0b;
  --error: #ef4444;
  --ai-accent: #7c3aed;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 8px 24px rgba(15, 17, 17, 0.06);
  --shadow-md: 0 20px 54px rgba(15, 17, 17, 0.12);
  --font: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #fbfcfb;
  color: var(--ink);
  font-family: var(--font);
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

.sr-only {
  clip: rect(0, 0, 0, 0);
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.site-shell {
  min-height: 100vh;
  background: linear-gradient(180deg, #fbfcfb 0%, #f5f8f5 100%);
}

.topbar {
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(251, 252, 251, 0.92);
  border-bottom: 1px solid rgba(15, 17, 17, 0.07);
  display: flex;
  gap: var(--space-4);
  justify-content: space-between;
  padding: 14px clamp(16px, 3vw, 34px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand,
.side-brand {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.brand img,
.side-brand img {
  height: 40px;
  object-fit: contain;
  width: 40px;
}

.brand span,
.side-brand span {
  display: grid;
}

.brand strong,
.side-brand strong {
  color: var(--green-900);
  font-size: 18px;
  line-height: 1;
}

.brand small,
.side-brand small,
.session-pill,
.operator-user small {
  color: var(--grey-600);
  font-size: 13px;
}

.screen-nav {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: 999px;
  display: flex;
  gap: 4px;
  padding: 4px;
}

.screen-nav a {
  border-radius: 999px;
  color: var(--grey-700);
  font-size: 14px;
  font-weight: 700;
  padding: 9px 13px;
  white-space: nowrap;
}

.screen-nav .active {
  background: var(--green-900);
  color: var(--white);
}

.topbar-actions {
  align-items: center;
  display: flex;
  gap: var(--space-3);
}

.session-pill,
.reset-button,
.secondary-action,
.primary-action,
.panel-toolbar button,
.action-grid button {
  align-items: center;
  border-radius: var(--radius-sm);
  display: inline-flex;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
}

.session-pill {
  background: var(--green-100);
  border: 1px solid rgba(22, 115, 61, 0.16);
  color: var(--green-900);
  padding: 9px 12px;
}

.session-pill span {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.session-pill a {
  background: var(--white);
  border: 1px solid rgba(22, 115, 61, 0.16);
  border-radius: 999px;
  color: var(--green-900);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.reset-button,
.secondary-action,
.panel-toolbar button,
.action-grid button {
  background: var(--white);
  border: 1px solid var(--grey-200);
  color: var(--green-900);
  padding: 10px 12px;
}

.primary-action {
  background: var(--green-900);
  border: 1px solid var(--green-900);
  color: var(--white);
  padding: 11px 15px;
}

.primary-action:disabled {
  background: var(--green-100);
  border-color: var(--green-100);
  color: var(--green-900);
  cursor: default;
}

.icon {
  align-items: center;
  border: 1px solid rgba(22, 115, 61, 0.16);
  border-radius: var(--radius-sm);
  color: var(--green-900);
  display: inline-grid;
  flex: 0 0 auto;
  height: 34px;
  place-items: center;
  width: 34px;
}

.icon svg {
  height: 20px;
  width: 20px;
}

.primary-action .icon,
.round-send .icon,
.ghost-button .icon,
.screen-nav .icon,
.backline .icon {
  border: 0;
  height: 22px;
  width: 22px;
}

.primary-action .icon svg,
.round-send .icon svg,
.reset-button .icon svg,
.secondary-action .icon svg,
.action-grid .icon svg {
  height: 16px;
  width: 16px;
}

.portal,
.gate-screen,
.resident-stage {
  display: grid;
  min-height: calc(100vh - 70px);
  place-items: start center;
  padding: clamp(18px, 4vw, 46px) 20px;
}

.portal-hero {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: var(--space-6);
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  max-width: 1120px;
  padding: clamp(22px, 4vw, 44px);
  width: 100%;
}

.portal-copy {
  align-content: center;
  display: grid;
  gap: var(--space-5);
  min-height: 420px;
}

.eyebrow {
  color: var(--green-600);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.portal-copy h1 {
  color: var(--green-900);
  font-size: clamp(48px, 8vw, 82px);
  line-height: 0.96;
}

.portal-copy p:not(.eyebrow) {
  color: var(--grey-700);
  font-size: 18px;
  line-height: 1.6;
  max-width: 620px;
}

.portal-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.portal-proof span {
  align-items: center;
  background: var(--green-100);
  border: 1px solid rgba(22, 115, 61, 0.14);
  border-radius: 999px;
  color: var(--green-900);
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  padding: 9px 13px;
}

.portal-proof .icon {
  background: var(--white);
  height: 24px;
  width: 24px;
}

.portal-proof .icon svg {
  height: 15px;
  width: 15px;
}

.portal-panel,
.module-card,
.gate-card,
.ask-panel,
.metric-card,
.privacy-card,
.activity-card,
.shortcut,
.embedded-card,
.kpi,
.inbox-panel,
.detail-panel,
.engine-card,
.operator-quote,
.ai-summary {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.portal-panel {
  align-content: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  display: grid;
  gap: 16px;
  padding: 0;
}

.portal-visual {
  aspect-ratio: 16 / 10;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  margin-bottom: 4px;
  overflow: hidden;
}

.portal-visual img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.portal-lockup {
  align-items: center;
  display: flex;
  gap: 10px;
}

.portal-lockup img {
  background: var(--green-100);
  border-radius: var(--radius-sm);
  height: 44px;
  padding: 8px;
  width: 44px;
}

.portal-lockup span {
  color: var(--green-900);
  font-weight: 900;
}

.portal-panel h2,
.module-card h2,
.gate-card h1 {
  color: var(--green-900);
  font-size: 28px;
  line-height: 1.15;
}

.portal-panel p,
.module-card p,
.gate-card p {
  color: var(--grey-700);
  line-height: 1.55;
}

.portal-points {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
}

.portal-points li {
  align-items: flex-start;
  background: var(--green-100);
  border: 1px solid rgba(22, 115, 61, 0.14);
  border-radius: var(--radius-sm);
  display: flex;
  gap: 12px;
  padding: 14px;
}

.portal-points .icon {
  background: var(--white);
  border-color: rgba(22, 115, 61, 0.18);
  color: var(--green-900);
}

.portal-points strong,
.portal-points small {
  display: block;
}

.portal-points small {
  color: var(--grey-600);
  line-height: 1.45;
  margin-top: 3px;
}

.enabled-actions {
  display: grid;
  gap: 10px;
}

.enabled-actions h2 {
  color: var(--green-900);
  font-size: 18px;
  line-height: 1.2;
  margin-top: 2px;
}

.service-access-card {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  color: var(--ink);
  display: flex;
  gap: 12px;
  min-height: 78px;
  padding: 14px;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.service-access-card:hover {
  border-color: rgba(22, 115, 61, 0.35);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.service-access-card strong,
.service-access-card small {
  display: block;
}

.service-access-card strong {
  color: var(--green-900);
  font-size: 16px;
}

.service-access-card small {
  color: var(--grey-700);
  line-height: 1.4;
  margin-top: 3px;
}

.operator-access {
  background: #f8fbf9;
}

.passive-action {
  cursor: default;
  opacity: 0.72;
}

.access-summary {
  align-items: center;
  background: var(--green-100);
  border: 1px solid rgba(22, 115, 61, 0.16);
  border-radius: var(--radius-sm);
  display: flex;
  gap: 12px;
  padding: 14px;
}

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

.access-summary small {
  color: var(--grey-700);
  line-height: 1.4;
  margin-top: 3px;
}

.module-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1120px;
  width: 100%;
}

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

.module-card {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.module-card.muted {
  background: linear-gradient(180deg, #ffffff, #f8faf8);
}

.module-card-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.admin-card {
  background: linear-gradient(180deg, #ffffff, #f6fbf7);
}

.code-map {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.code-map span {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  color: var(--green-900);
  display: grid;
  font-weight: 900;
  gap: 2px;
  padding: 10px;
}

.code-map small {
  color: var(--grey-600);
  font-weight: 700;
}

.service-info-card {
  align-content: start;
}

.service-note {
  color: var(--green-900);
  font-size: 13px;
  font-weight: 900;
}

.access-form {
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  display: grid;
  gap: var(--space-3);
  padding: 12px;
}

.vip-code-form {
  border: 0;
  padding: 0;
}

.access-form label {
  display: grid;
  gap: 7px;
}

.code-entry {
  align-items: stretch;
  display: flex;
  gap: 12px;
}

.code-slots {
  display: flex;
  gap: 12px;
}

.code-slots input {
  background: var(--white);
  border: 1px solid var(--grey-300);
  border-radius: var(--radius-sm);
  font-size: 24px;
  font-weight: 900;
  height: 62px;
  outline: 0;
  text-align: center;
  width: 56px;
}

.code-entry .primary-action {
  min-height: 62px;
  padding-inline: 22px;
}

.access-form small {
  color: var(--grey-600);
}

.access-form.invalid input {
  border-color: var(--error);
}

.gate-card {
  display: grid;
  gap: var(--space-4);
  margin-top: 48px;
  max-width: 520px;
  padding: var(--space-8);
  width: 100%;
}

.phone-frame {
  background: var(--white);
  border: 1px solid rgba(15, 17, 17, 0.08);
  border-radius: 34px;
  box-shadow: var(--shadow-md);
  max-width: 430px;
  min-height: 850px;
  overflow: hidden;
  padding: 18px 18px 88px;
  position: relative;
  width: min(100%, 430px);
}

.phone-status,
.mobile-header,
.chat-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.phone-status {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  padding: 2px 8px 12px;
}

.ghost-button {
  background: transparent;
  border: 0;
  color: var(--ink);
  display: inline-grid;
  height: 42px;
  place-items: center;
  width: 42px;
}

.hero-identity {
  display: grid;
  justify-items: center;
  padding: 4px 0 22px;
  text-align: center;
}

.hero-identity img {
  height: 58px;
  margin-bottom: 8px;
  object-fit: contain;
  width: 58px;
}

.hero-identity h1,
.chat-header h1,
.operator-header h1 {
  color: var(--green-900);
  font-size: 30px;
  line-height: 1.15;
}

.hero-identity p,
.chat-header p,
.operator-header p {
  color: var(--grey-600);
  line-height: 1.5;
}

.ask-panel {
  padding: var(--space-5);
}

.panel-title {
  align-items: flex-start;
  display: flex;
  gap: var(--space-3);
}

.panel-title h2 {
  font-size: 25px;
  line-height: 1.2;
}

.panel-title p,
.shortcut small,
.metric-card small,
.privacy-card small,
.activity-card small,
.inline-card small,
.status-line small {
  color: var(--grey-600);
  display: block;
  line-height: 1.4;
}

.prompt-box,
.chat-composer {
  align-items: center;
  border: 1px solid var(--grey-300);
  border-radius: var(--radius-md);
  display: flex;
  gap: 10px;
  margin-top: var(--space-4);
  padding: 10px;
}

.prompt-box input,
.chat-composer input,
.panel-toolbar input {
  background: transparent;
  border: 0;
  color: var(--ink);
  flex: 1;
  min-width: 0;
  outline: 0;
}

.round-send {
  background: var(--green-900);
  border: 0;
  border-radius: 50%;
  color: var(--white);
  display: inline-grid;
  flex: 0 0 auto;
  height: 46px;
  place-items: center;
  width: 46px;
}

.shortcut-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr 1fr;
  margin: var(--space-4) 0 var(--space-6);
}

.shortcut,
.privacy-card,
.activity-card {
  align-items: center;
  color: var(--ink);
  display: flex;
  gap: var(--space-3);
  padding: 13px;
  text-align: left;
  width: 100%;
}

.shortcut {
  align-items: flex-start;
  min-height: 108px;
}

.shortcut > .icon:first-child,
.activity-card > .icon:first-child {
  background: #f4f5f2;
}

.shortcut > .icon:last-child,
.privacy-card > .icon:last-child {
  border: 0;
  color: var(--grey-400);
  height: 24px;
  margin-left: auto;
  width: 24px;
}

.shortcut strong,
.privacy-card strong,
.activity-card strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.shortcut small {
  font-size: 13px;
}

.section-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 18px 2px 10px;
}

.section-row h2 {
  font-size: 17px;
}

.section-row a {
  color: var(--green-900);
  font-size: 14px;
  font-weight: 800;
}

.metric-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 14px;
  overflow: hidden;
}

.metric-card div {
  display: grid;
  gap: 3px;
  padding: 17px;
}

.metric-card div + div {
  border-left: 1px solid var(--grey-200);
}

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

.privacy-card {
  background: #fdfffd;
}

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

.activity-card {
  min-height: 78px;
}

.activity-card span {
  min-width: 0;
}

.activity-card .tag {
  margin-left: auto;
}

.mobile-tabs {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--grey-200);
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  left: 0;
  padding: 8px 14px 14px;
  position: absolute;
  right: 0;
}

.mobile-tabs a {
  align-items: center;
  color: var(--grey-600);
  display: grid;
  font-size: 12px;
  gap: 3px;
  justify-items: center;
}

.mobile-tabs a .icon {
  border: 0;
}

.mobile-tabs .active {
  color: var(--green-900);
  font-weight: 800;
}

.chat-header {
  padding: 6px 0 12px;
  text-align: center;
}

.chat-header h1 {
  font-size: 27px;
}

.scenario-strip {
  display: flex;
  gap: 8px;
  margin: 0 -2px 12px;
  overflow-x: auto;
  padding: 4px 2px 8px;
}

.scenario-strip button {
  background: var(--green-100);
  border: 1px solid rgba(22, 115, 61, 0.14);
  border-radius: 999px;
  color: var(--green-900);
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 11px;
}

.chat-feed {
  display: grid;
  gap: 12px;
  max-height: 610px;
  overflow: auto;
  padding: 4px 2px 112px;
}

.message {
  border-radius: var(--radius-md);
  max-width: 84%;
  padding: 13px 14px 9px;
}

.message.resident {
  background: #edf2ee;
  justify-self: end;
}

.message.ai {
  background: var(--white);
  border: 1px solid var(--grey-200);
  justify-self: start;
}

.message.blocked {
  border-color: #fecaca;
}

.message p {
  line-height: 1.45;
}

.message time {
  color: var(--grey-400);
  display: block;
  font-size: 12px;
  margin-top: 7px;
  text-align: right;
}

.inline-card,
.status-line {
  align-items: center;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  display: flex;
  gap: var(--space-3);
  margin: 12px 0;
  padding: 12px;
}

.inline-card span,
.status-line span {
  min-width: 0;
}

.inline-card .tag {
  margin-left: auto;
}

.live-dot,
.engine-card i,
.system-pill i {
  background: var(--success);
  border-radius: 50%;
  display: inline-block;
  height: 9px;
  margin-left: auto;
  width: 9px;
}

.embedded-card {
  display: grid;
  gap: var(--space-3);
  padding: 12px;
}

.request-brief {
  background: var(--grey-100);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 8px;
  padding: 13px;
}

.request-brief p {
  color: var(--charcoal);
  line-height: 1.45;
}

.request-brief small {
  align-items: center;
  color: var(--green-900);
  display: flex;
  gap: 8px;
  line-height: 1.45;
}

.request-brief .icon {
  border: 0;
  height: 20px;
  width: 20px;
}

.quote-card {
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 14px;
  grid-template-columns: 104px 1fr;
  padding: 14px;
}

.product-visual {
  align-items: center;
  aspect-ratio: 1;
  background: linear-gradient(145deg, #ffffff, #e9eeec);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  color: var(--green-900);
  display: grid;
  font-weight: 900;
  place-items: center;
}

.product-visual span {
  border: 2px solid currentColor;
  border-radius: var(--radius-sm);
  padding: 12px 8px;
}

.quote-copy {
  display: grid;
  gap: 8px;
}

.quote-title {
  align-items: start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.quote-copy h3 {
  font-size: 16px;
  line-height: 1.3;
}

.quote-copy p {
  align-items: center;
  color: var(--charcoal);
  display: flex;
  font-size: 13px;
  gap: 7px;
}

.quote-copy .icon {
  height: 20px;
  width: 20px;
}

.quote-copy .icon svg {
  height: 14px;
  width: 14px;
}

.quote-total {
  align-items: center;
  border-top: 1px solid var(--grey-200);
  display: flex;
  justify-content: space-between;
  padding-top: 8px;
}

.quote-total strong {
  color: var(--green-900);
  font-size: 20px;
}

.timeline.compact,
.activity-list {
  display: grid;
  gap: 8px;
}

.timeline.compact p,
.activity-list p {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  line-height: 1.4;
}

.timeline.compact .icon,
.activity-list .icon {
  height: 24px;
  width: 24px;
}

.timeline.compact .icon svg,
.activity-list .icon svg {
  height: 14px;
  width: 14px;
}

.timeline.compact small,
.activity-list small {
  color: var(--grey-600);
  display: block;
  margin-top: 3px;
}

.chat-composer {
  background: var(--white);
  bottom: 74px;
  left: 18px;
  margin: 0;
  position: absolute;
  right: 18px;
}

.operator-shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: calc(100vh - 69px);
}

.operator-sidebar {
  background: rgba(255, 255, 255, 0.78);
  border-right: 1px solid var(--grey-200);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 18px;
}

.operator-sidebar button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--charcoal);
  display: flex;
  gap: 10px;
  padding: 12px;
  text-align: left;
}

.operator-sidebar button.active {
  background: var(--green-100);
  color: var(--green-900);
  font-weight: 800;
}

.side-brand {
  margin-bottom: 22px;
}

.engine-card {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding: 16px;
}

.engine-card p,
.engine-card span,
.operator-quote span {
  color: var(--grey-600);
  font-size: 13px;
  line-height: 1.45;
}

.operator-main {
  display: grid;
  gap: var(--space-5);
  padding: 28px;
}

.operator-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.operator-user,
.system-pill {
  align-items: center;
  display: flex;
  gap: 12px;
}

.system-pill {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  color: var(--grey-700);
  padding: 10px 14px;
  white-space: nowrap;
}

.system-pill i {
  margin-left: 0;
}

.operator-user button {
  background: transparent;
  border: 0;
}

.operator-user button .icon {
  border: 0;
}

.operator-user b {
  align-items: center;
  background: var(--grey-200);
  border-radius: 50%;
  display: inline-grid;
  height: 46px;
  place-items: center;
  width: 46px;
}

.operator-user small {
  line-height: 1.35;
}

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

.kpi {
  align-items: center;
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
}

.kpi strong {
  color: var(--green-900);
  display: block;
  font-size: 28px;
}

.kpi span,
.kpi small {
  display: block;
}

.kpi small {
  color: var(--grey-600);
  margin-top: 4px;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(620px, 1.35fr) minmax(430px, 0.85fr);
}

.inbox-panel {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
  overflow: hidden;
}

.detail-panel {
  border-bottom-left-radius: 0;
  border-left: 0;
  border-top-left-radius: 0;
  display: grid;
  gap: var(--space-4);
  padding: 18px;
}

.panel-toolbar {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.panel-toolbar h2,
.detail-heading h2 {
  font-size: 18px;
}

.panel-toolbar div {
  display: grid;
  gap: 10px;
  grid-template-columns: 170px 110px 1fr;
}

.panel-toolbar label {
  align-items: center;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  display: flex;
  gap: 8px;
  padding: 10px 12px;
}

.panel-toolbar label .icon {
  border: 0;
  height: 22px;
  width: 22px;
}

table {
  border-collapse: collapse;
  font-size: 14px;
  width: 100%;
}

th,
td {
  border-top: 1px solid var(--grey-200);
  padding: 15px 16px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--grey-700);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

tr {
  cursor: pointer;
}

tr.selected {
  background: rgba(231, 244, 234, 0.72);
}

.row-dot {
  border: 1px solid var(--grey-400);
  border-radius: 50%;
  display: inline-block;
  height: 16px;
  width: 16px;
}

tr.selected .row-dot {
  background: var(--green-900);
  border-color: var(--green-900);
  box-shadow: inset 0 0 0 5px var(--white);
}

.tag {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 7px 9px;
  text-transform: capitalize;
  white-space: nowrap;
}

.status-new,
.status-completed,
.status-approved,
.status-ready-for-delivery,
.priority-normal,
.priority-low,
.quote-approved {
  background: var(--green-100);
  color: var(--green-900);
}

.quote-pending-approval,
.quote-draft,
.status-awaiting-resident-approval,
.priority-high,
.priority-medium {
  background: #fef3c7;
  color: #a16207;
}

.status-sourcing,
.status-ai-handling,
.status-at-hub,
.status-delivering,
.status-purchased {
  background: #e0f2fe;
  color: #0369a1;
}

.status-human-review {
  background: #ede9fe;
  color: #6d28d9;
}

.priority-urgent,
.status-cancelled,
.status-unsupported {
  background: #fee2e2;
  color: #b91c1c;
}

.detail-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.request-facts {
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  display: grid;
  grid-template-columns: 150px 1fr;
  margin: 0;
  overflow: hidden;
}

.request-facts dt,
.request-facts dd {
  border-bottom: 1px solid var(--grey-200);
  margin: 0;
  padding: 10px 12px;
}

.request-facts dt {
  background: var(--grey-100);
  color: var(--grey-700);
}

.request-facts dd {
  min-width: 0;
}

.copy-mark {
  border: 1px solid var(--grey-400);
  border-radius: 2px;
  display: inline-block;
  height: 13px;
  margin-left: 4px;
  position: relative;
  top: 2px;
  width: 10px;
}

.copy-mark::after {
  border: 1px solid var(--grey-400);
  border-radius: 2px;
  content: "";
  height: 13px;
  left: 3px;
  position: absolute;
  top: -4px;
  width: 10px;
}

.ai-summary,
.activity-list,
.operator-quote {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.ai-summary h3,
.activity-list h3,
.operator-quote h3 {
  align-items: center;
  display: flex;
  font-size: 16px;
  gap: 8px;
}

.ai-summary h3 .icon {
  height: 24px;
  width: 24px;
}

.ai-summary h3 .icon svg {
  height: 15px;
  width: 15px;
}

.ai-summary p,
.ai-summary small,
.activity-list p,
.operator-quote p {
  color: var(--charcoal);
  line-height: 1.45;
}

.ai-summary small {
  color: var(--grey-600);
}

.operator-quote strong {
  color: var(--green-900);
  font-size: 22px;
}

.action-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.action-grid button {
  color: var(--green-900);
}

.action-grid .primary-action,
.action-grid button:nth-child(5),
.action-grid button:nth-child(6) {
  grid-column: span 2;
}

@media (max-width: 1100px) {
  .portal-hero,
  .workbench,
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .operator-shell {
    grid-template-columns: 1fr;
  }

  .operator-sidebar {
    display: none;
  }

  .inbox-panel,
  .detail-panel {
    border-radius: var(--radius-md);
  }

  .detail-panel {
    border-left: 1px solid var(--grey-200);
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: stretch;
    display: grid;
  }

  .screen-nav {
    overflow-x: auto;
  }

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

  .phone-frame {
    border-radius: 0;
    box-shadow: none;
    max-width: none;
    min-height: calc(100vh - 156px);
    width: 100%;
  }

  .resident-stage {
    padding: 0;
  }

  .operator-main,
  .portal {
    padding: 18px;
  }

  .operator-header,
  .operator-user {
    align-items: flex-start;
    display: grid;
  }

  .panel-toolbar div {
    grid-template-columns: 1fr;
  }

  .inbox-panel {
    overflow-x: auto;
  }

  .request-facts {
    grid-template-columns: 118px 1fr;
  }
}

@media (max-width: 450px) {
  .shortcut-grid,
  .metric-card,
  .quote-card {
    grid-template-columns: 1fr;
  }

  .metric-card div + div {
    border-left: 0;
    border-top: 1px solid var(--grey-200);
  }

  .activity-card {
    align-items: flex-start;
  }

  .activity-card .tag {
    margin-left: 0;
  }
}
