* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #f7f7f5;
  color: #202725;
  font-family: Inter, "Google Sans", "Helvetica Neue", Arial, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  background: #f7f7f5;
}

.app-shell.is-collapsed {
  grid-template-columns: 84px 1fr;
}

.app-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  border-right: 1px solid #ebe9e1;
  background: #f5f4ed;
  padding: 18px 16px;
  overflow: hidden;
}

.app-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  margin-bottom: 18px;
}

.app-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
}

.app-brand img {
  width: 232px;
  max-width: 100%;
  height: 20px;
  object-fit: contain;
  object-position: left center;
}

.app-icon-btn {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #5e6663;
}

.app-icon-btn:hover,
.app-icon-btn.is-active {
  border-color: #e2dfd4;
  background: #fff;
  color: #202725;
}

.app-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-nav a {
  display: flex;
  height: 36px;
  align-items: center;
  gap: 12px;
  border-radius: 11px;
  padding: 0 12px;
  color: #5e6663;
  font-size: 14px;
  font-weight: 500;
}

.app-nav a:hover,
.app-nav a.is-active {
  background: #fff;
  color: #202725;
  box-shadow: 0 1px 6px rgba(31, 38, 35, 0.04);
}

.app-nav svg,
.app-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-nav span:last-child,
.app-label,
.app-referral,
.app-account-name,
.app-section-label {
  transition: opacity 160ms ease;
}

.app-shell.is-collapsed .app-brand img,
.app-shell.is-collapsed .app-nav span:last-child,
.app-shell.is-collapsed .app-label,
.app-shell.is-collapsed .app-referral,
.app-shell.is-collapsed .app-account-name,
.app-shell.is-collapsed .app-section-label {
  width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.app-shell.is-collapsed .app-sidebar {
  padding-inline: 14px;
}

.app-shell.is-collapsed .app-nav a {
  justify-content: center;
  padding: 0;
}

.app-spacer {
  flex: 1;
}

.app-section-label {
  margin: 20px 8px 8px;
  color: #9a9b96;
  font-size: 12px;
  font-weight: 600;
}

.app-referral {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  margin: 10px 0 14px;
  padding: 10px;
  border: 1px solid #ece7d6;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff8df, #fff);
}

.app-referral strong {
  display: block;
  font-size: 13px;
}

.app-referral span {
  display: block;
  margin-top: 2px;
  color: #8a8170;
  font-size: 12px;
}

.app-account {
  position: relative;
  border-top: 1px solid #ebe8df;
  padding-top: 10px;
}

.app-account-btn {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 4px;
  color: #202725;
  text-align: left;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.app-account-btn:hover,
.app-account-btn[aria-expanded="true"] {
  background: #eeede8;
}

.account-avatar {
  border: 1px solid #e3e1d8;
  background: #f8f7f2;
  color: #5e6663;
}

.app-avatar {
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #2d3432;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.app-account-name {
  min-width: 0;
  color: #434846;
  font-size: 13px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-account-chevron {
  display: inline-flex;
  margin-left: auto;
  color: #8a8f8b;
  opacity: 0;
  transition: opacity 140ms ease, transform 140ms ease;
}

.app-account-btn:hover .app-account-chevron,
.app-account-btn[aria-expanded="true"] .app-account-chevron {
  opacity: 1;
}

.app-account-btn[aria-expanded="true"] .app-account-chevron {
  transform: rotate(-90deg);
}

.app-account-chevron svg {
  width: 15px;
  height: 15px;
}

.app-account-menu {
  position: absolute;
  left: 0;
  bottom: 58px;
  z-index: 20;
  display: none;
  width: 248px;
  border: 1px solid rgba(173, 179, 176, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 253, 0.98);
  padding: 6px;
  box-shadow: 0 18px 46px rgba(31, 38, 35, 0.14), 0 2px 10px rgba(31, 38, 35, 0.06);
  backdrop-filter: blur(10px);
}

.app-account-menu.is-open {
  display: grid;
  gap: 2px;
}

.app-account-menu-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  width: 100%;
  min-height: 54px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 8px;
  color: #434846;
  text-align: left;
}

.app-account-menu-item:hover {
  background: #f6f5ef;
  color: #202725;
}

.app-account-menu-item.danger:hover {
  background: #fff1ee;
  color: #b43a28;
}

.app-account-menu-item strong,
.app-account-menu-item em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-account-menu-item strong {
  font-size: 13px;
  font-weight: 700;
}

.app-account-menu-item em {
  margin-top: 2px;
  color: #8a8f8b;
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.account-menu-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid #e8e5dc;
  border-radius: 10px;
  background: #fff;
  color: #2d3432;
}

.app-account-menu-item.danger .account-menu-icon {
  color: #b43a28;
}

.account-menu-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-main {
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

.app-page {
  height: 100vh;
  overflow-y: auto;
  padding: 18px 24px 48px;
}

.app-page > .chat-stage {
  margin: -18px -24px -48px;
}

.app-topbar {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.app-title {
  margin: 0;
  color: #202725;
  font-size: 24px;
  font-weight: 720;
  letter-spacing: 0;
}

.app-subtitle {
  margin: 6px 0 0;
  color: #7b7f7a;
  font-size: 14px;
}

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

.app-btn {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #dedbd2;
  border-radius: 10px;
  background: #fff;
  color: #2d3432;
  padding: 0 13px;
  font-size: 14px;
  font-weight: 650;
}

.app-btn:hover {
  background: #f8f7f2;
}

.app-btn.primary {
  border-color: #2d3432;
  background: #2d3432;
  color: #fff;
}

.app-btn.primary:hover {
  background: #202725;
}

.app-btn.danger {
  border-color: #efc8c2;
  background: #fff7f5;
  color: #c2412d;
}

.app-btn.danger:hover {
  background: #ffe8e3;
}

.app-pill-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.app-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid #e6e3da;
  border-radius: 999px;
  background: #fff;
  color: #5e6663;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.app-pill.is-active,
.app-pill:hover {
  border-color: #2d3432;
  background: #2d3432;
  color: #fff;
}

.chat-stage {
  display: flex;
  height: 100vh;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.chat-stage::-webkit-scrollbar {
  display: none;
}

.chat-snap {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 100vh;
  scroll-snap-align: start;
}

.chat-snap-task {
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.chat-task-inner {
  width: 100%;
  padding: 20vh 24px 24px;
}

.chat-hero {
  width: min(820px, 100%);
  margin: 0 auto;
  text-align: center;
}

.chat-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 25px;
  border-radius: 999px;
  background: #f1f2ee;
  padding: 0 12px;
  color: #8a8f8b;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.chat-kicker span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #22c55e;
  animation: app-pulse 2s ease-in-out infinite;
}

.chat-hero h1 {
  margin: 14px 0 10px;
  color: #202725;
  font-size: clamp(26px, 3.4vw, 32px);
  line-height: 1.12;
  letter-spacing: 0;
}

.chat-hero p {
  margin: 0 0 22px;
  color: #8a8f8b;
  font-size: 15px;
}

.chat-box {
  width: min(820px, 100%);
  min-height: 154px;
  margin: 0 auto;
  border: 1px solid rgba(173, 179, 176, 0.24);
  border-radius: 24px;
  background: #fff;
  padding: 12px 13px 11px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), 0 22px 72px rgba(31, 38, 35, 0.05);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.chat-box:focus-within {
  border-color: #2d3432;
  box-shadow: 0 0 0 1px #2d3432, 0 22px 72px rgba(31, 38, 35, 0.08);
}

.chat-box textarea {
  width: 100%;
  min-height: 82px;
  border: 0;
  resize: none;
  outline: none;
  background: transparent;
  color: #202725;
  font-size: 15px;
  line-height: 1.55;
}

.chat-box textarea::placeholder {
  color: #8a928e;
}

.chat-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chat-control-left,
.chat-control-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-tool-btn {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: #5d6c68;
}

.chat-tool-btn:hover {
  background: #f4f5f1;
}

.chat-submit {
  display: inline-flex;
  min-width: 88px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #2d3432;
  color: #fff;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  transition: background 140ms ease, color 140ms ease, opacity 140ms ease;
}

.chat-submit:disabled {
  border-color: #dce1dc;
  background: #eef2ee;
  color: #99a39f;
  cursor: not-allowed;
}

.chat-chips {
  width: min(820px, 100%);
  margin: 24px auto 0;
}

.chat-snap-jump {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 11px;
  border: 0;
  background: transparent;
  color: #7b837f;
  padding: 12px 16px;
  font-size: 12px;
  font-style: normal;
  transition: color 150ms ease, opacity 150ms ease;
}

.chat-snap-jump:hover {
  color: #202725;
}

.chat-snap-jump span {
  display: inline-flex;
  animation: app-spring 1.9s ease-in-out infinite;
}

.chat-snap-jump svg {
  width: 16px;
  height: 16px;
}

.chat-snap-jump em {
  position: relative;
  font-style: normal;
  white-space: nowrap;
}

.chat-snap-jump em::before,
.chat-snap-jump em::after {
  content: "";
  position: absolute;
  top: 50%;
  width: min(165px, 18vw);
  height: 1px;
  pointer-events: none;
}

.chat-snap-jump em::before {
  right: calc(100% + 15px);
  background: linear-gradient(to right, rgba(230, 230, 230, 0), rgba(210, 214, 210, 1));
}

.chat-snap-jump em::after {
  left: calc(100% + 15px);
  background: linear-gradient(to right, rgba(210, 214, 210, 1), rgba(230, 230, 230, 0));
}

.chat-snap-jump-down {
  margin-bottom: 20px;
}

.chat-snap-jump-up {
  margin: 18px auto 8px;
}

.chat-snap-playbooks {
  flex-direction: column;
  overflow: hidden;
}

.playbook-section {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 8px 24px 40px;
  overflow-y: auto;
  scrollbar-width: none;
}

.playbook-section::-webkit-scrollbar {
  display: none;
}

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

.playbook-card,
.app-card {
  position: relative;
  min-height: 244px;
  border: 1px solid #e8e5dc;
  border-radius: 16px;
  background: #fffefd;
  padding: 20px 18px 18px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.02);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 160ms ease;
}

.playbook-card:hover,
.app-card:hover {
  transform: translateY(-3px);
  border-color: #d8d4c9;
  box-shadow: 0 18px 42px rgba(31, 38, 35, 0.08);
}

.card-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: #f3f1e8;
  color: #c96442;
  font-weight: 800;
}

.playbook-card h3,
.app-card h3 {
  margin: 12px 0 8px;
  font-size: 15px;
  line-height: 1.35;
}

.playbook-card p,
.app-card p {
  margin: 0;
  color: #6f7671;
  font-size: 13px;
  line-height: 1.45;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.card-badge {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border-radius: 999px;
  background: #f6f4ec;
  color: #777264;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 650;
}

@keyframes app-pulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes app-spring {
  0%,
  100% {
    transform: translateY(0);
  }
  45% {
    transform: translateY(4px);
  }
}

.templates-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.template-card {
  min-height: 190px;
  border: 1px solid #e8e5dc;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff, #f8f6ee);
  padding: 18px;
}

.template-card h3 {
  margin: 8px 0;
}

.template-card p {
  color: #747a75;
  font-size: 13px;
}

.filter-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.search-box {
  display: flex;
  width: min(340px, 100%);
  align-items: center;
  gap: 8px;
  border: 1px solid #e2dfd4;
  border-radius: 11px;
  background: #fff;
  padding: 0 12px;
}

.search-box input {
  width: 100%;
  height: 34px;
  border: 0;
  outline: none;
  background: transparent;
}

.connector-grid,
.skill-grid,
.channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.integration-card {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 13px;
  align-items: start;
  min-height: 120px;
}

.integration-card .card-icon {
  width: 46px;
  height: 46px;
  background: #f5f4ed;
}

.integration-card h3 {
  margin: 1px 0 5px;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8a8f8b;
  font-size: 12px;
}

.status-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: #c4c7c3;
}

.status-dot.connected::before {
  background: #32a46a;
}

.empty-state {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed #ddd8cc;
  border-radius: 22px;
  background: #fffdf8;
  color: #858b86;
  text-align: center;
}

.empty-state strong {
  margin-bottom: 6px;
  color: #202725;
  font-size: 18px;
}

.project-card {
  min-height: 132px;
}

.modal-root,
.drawer-root,
.toast-root {
  position: fixed;
  z-index: 10000;
}

.modal-root,
.drawer-root {
  inset: 0;
  display: none;
}

.modal-root.is-open,
.drawer-root.is-open {
  display: block;
}

.modal-backdrop,
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 23, 21, 0.42);
}

.modal-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(520px, calc(100vw - 32px));
  transform: translate(-50%, -50%);
  border: 1px solid #e4e1d8;
  border-radius: 22px;
  background: #fff;
  padding: 22px;
  box-shadow: 0 28px 70px rgba(31, 38, 35, 0.22);
}

.drawer-panel {
  position: absolute;
  right: 0;
  top: 0;
  width: min(760px, 100vw);
  height: 100%;
  overflow-y: auto;
  background: #fff;
  padding: 24px;
  box-shadow: -28px 0 70px rgba(31, 38, 35, 0.18);
}

.modal-head,
.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.modal-head h2,
.drawer-head h2 {
  margin: 0;
  font-size: 22px;
}

.close-btn {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: #f5f4ed;
}

.form-row {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.form-row label {
  color: #555d58;
  font-size: 13px;
  font-weight: 650;
}

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  border: 1px solid #e1ded4;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  color: #202725;
  outline: none;
}

.form-row textarea {
  min-height: 88px;
  resize: vertical;
}

.modal-copy {
  margin: 0 0 20px;
  color: #555d58;
  line-height: 1.5;
}

.modal-actions {
  justify-content: flex-end;
}

.account-settings {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
}

.account-settings-nav {
  display: grid;
  align-content: start;
  gap: 6px;
  border-right: 1px solid #ece9df;
  padding-right: 12px;
}

.account-settings-nav button,
.billing-tabs button {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #626a66;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
}

.account-settings-nav button:hover,
.account-settings-nav button.is-active,
.billing-tabs button:hover,
.billing-tabs button.is-active {
  background: #f5f4ed;
  color: #202725;
}

.account-settings-nav svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.account-settings-body {
  min-width: 0;
}

.account-panel,
.billing-panel {
  display: none;
}

.account-panel.is-active,
.billing-panel.is-active {
  display: block;
}

.account-panel h3 {
  margin: 0 0 16px;
  font-size: 20px;
}

.settings-profile-card,
.settings-card,
.settings-list > div,
.settings-toggle,
.billing-hero,
.plan-grid > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #e8e5dc;
  border-radius: 16px;
  background: #fffefa;
  padding: 14px;
  box-shadow: 0 2px 14px rgba(31, 38, 35, 0.035);
}

.app-avatar.large {
  width: 52px;
  height: 52px;
  font-size: 16px;
}

.settings-profile-card > div,
.settings-card,
.settings-list span,
.settings-toggle span,
.billing-hero div {
  min-width: 0;
}

.settings-profile-card strong,
.settings-card strong,
.settings-list strong,
.settings-toggle strong,
.plan-grid strong {
  display: block;
  color: #202725;
  font-size: 14px;
}

.settings-profile-card span,
.settings-card span,
.settings-list span span,
.settings-toggle em,
.billing-hero em,
.plan-grid span {
  display: block;
  color: #747b76;
  font-size: 12px;
  font-style: normal;
  line-height: 1.4;
}

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

.settings-grid label {
  display: grid;
  gap: 7px;
  color: #555d58;
  font-size: 12px;
  font-weight: 650;
}

.settings-grid input,
.settings-grid select {
  min-height: 36px;
  border: 1px solid #e1ded4;
  border-radius: 10px;
  background: #fff;
  padding: 0 10px;
  color: #202725;
}

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

.settings-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #2d3432;
}

.billing-page {
  display: grid;
  gap: 14px;
}

.billing-hero {
  background: linear-gradient(180deg, #fffefa, #f7f6ef);
}

.billing-hero span {
  display: block;
  color: #747b76;
  font-size: 12px;
}

.billing-hero strong {
  display: block;
  color: #202725;
  font-size: 42px;
  line-height: 1.1;
}

.billing-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.usage-bars {
  display: grid;
  gap: 10px;
}

.usage-bars span {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: #f0eee6;
  height: 28px;
}

.usage-bars span::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--value);
  border-radius: inherit;
  background: #2d3432;
}

.usage-bars em {
  position: relative;
  z-index: 1;
  display: inline-flex;
  height: 100%;
  align-items: center;
  padding-left: 10px;
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
}

.billing-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid #e8e5dc;
  border-radius: 14px;
  font-size: 13px;
}

.billing-table th,
.billing-table td {
  border-bottom: 1px solid #eeeae1;
  padding: 11px;
  text-align: left;
}

.billing-table th {
  background: #f6f5ef;
  color: #626a66;
  font-weight: 700;
}

.signout-page {
  display: flex;
  min-height: calc(100vh - 84px);
  align-items: center;
  justify-content: center;
}

.signout-card {
  width: min(460px, 100%);
  border: 1px solid #e8e5dc;
  border-radius: 22px;
  background: #fffefa;
  padding: 30px;
  text-align: center;
  box-shadow: 0 20px 58px rgba(31, 38, 35, 0.08);
}

.signout-card .app-avatar {
  margin: 0 auto 18px;
}

.signout-card h1 {
  margin: 0 0 10px;
  color: #202725;
  font-size: 24px;
  letter-spacing: 0;
}

.signout-card p {
  margin: 0 0 24px;
  color: #69716c;
  font-size: 14px;
  line-height: 1.6;
}

.signout-card strong {
  color: #202725;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.plan-grid > div {
  display: grid;
  align-items: start;
}

.plan-grid > div.is-popular {
  border-color: #2d3432;
}

.drawer-meta {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.drawer-meta li {
  color: #5e6663;
  line-height: 1.45;
}

.toast-root {
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 260px;
  border: 1px solid #ddd8cc;
  border-radius: 14px;
  background: #202725;
  color: #fff;
  padding: 12px 14px;
  box-shadow: 0 16px 34px rgba(31, 38, 35, 0.16);
  font-size: 13px;
}

.chat-thread {
  width: min(820px, 100%);
  margin: 18px auto 0;
}

.message {
  width: fit-content;
  max-width: 78%;
  margin-bottom: 12px;
  border-radius: 16px;
  padding: 12px 14px;
  line-height: 1.45;
}

.message.user {
  margin-left: auto;
  background: #2d3432;
  color: #fff;
}

.message.agent {
  background: #fff;
  color: #202725;
  border: 1px solid #e7e4db;
}

@media (max-width: 980px) {
  .app-shell,
  .app-shell.is-collapsed {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: fixed;
    z-index: 1000;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .app-sidebar.is-mobile-open {
    transform: translateX(0);
  }

  .app-main,
  .app-page {
    height: auto;
    min-height: 100vh;
  }

  .card-grid,
  .templates-strip,
  .connector-grid,
  .skill-grid,
  .channel-grid {
    grid-template-columns: 1fr;
  }

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

  .chat-stage {
    height: 100vh;
  }

  .chat-task-inner {
    padding: 16vh 16px 16px;
  }

  .chat-snap-jump em::before,
  .chat-snap-jump em::after {
    width: 72px;
  }

  .drawer-panel {
    width: min(640px, 100vw);
  }

  .account-settings {
    grid-template-columns: 1fr;
  }

  .account-settings-nav {
    display: flex;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid #ece9df;
    padding: 0 0 10px;
  }

  .account-settings-nav button {
    flex: 0 0 auto;
  }

  .settings-grid,
  .plan-grid {
    grid-template-columns: 1fr;
  }
}

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

  .chat-hero h1 {
    font-size: 24px;
  }

  .chat-box {
    min-height: 142px;
  }

  .chat-snap-jump em::before,
  .chat-snap-jump em::after {
    display: none;
  }
}
