:root {
  --ink: #101820;
  --muted: #667789;
  --line: #d9e3ec;
  --panel: #ffffff;
  --wash: #f3f7fb;
  --green: #008ccf;
  --green-dark: #005f96;
  --mint: #d9f0ff;
  --cyan: #e6f3ff;
  --coral: #ffb000;
  --magenta: #243447;
  --shadow: 0 18px 45px rgba(16, 24, 32, 0.14);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(var(--green) 0 118px, transparent 118px),
    #dfe7ef;
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

.app-shell {
  background: white;
  box-shadow: 0 16px 45px rgba(23, 32, 28, 0.18);
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  height: calc(100vh - 38px);
  margin: 0 auto;
  max-width: 1500px;
  position: relative;
  top: 19px;
  width: min(96vw, 1500px);
}

@media (max-width: 760px) {
  .import-task-card,
  .import-task-edit-grid {
    grid-template-columns: 1fr;
  }
}

.sidebar {
  background: white;
  border-color: var(--line);
  border-style: solid;
  overflow: hidden;
}

.sidebar {
  border-width: 0 1px 0 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.brand-row,
.chat-header,
.task-header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 22px;
}

.brand-row {
  background: #f0f2f5;
  color: var(--ink);
  min-height: 58px;
  padding: 10px 16px;
}

.brand-actions {
  display: inline-flex;
  gap: 8px;
}

.brand-row h1 {
  font-size: 1.28rem;
  font-weight: 800;
}

.role-switch {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 800;
  gap: 7px;
  margin-top: 5px;
}

.role-switch select {
  background: white;
  min-height: 30px;
  padding: 0 8px;
}

.brand-row .icon-button {
  background: var(--green);
}

.eyebrow {
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  font-size: 1.4rem;
  line-height: 1.2;
}

.icon-button,
.ghost-button,
.primary-button,
.send-button,
.task-compose-button {
  border: 0;
  border-radius: 8px;
  min-height: 40px;
}

.icon-button {
  align-items: center;
  background: var(--green);
  color: white;
  display: inline-flex;
  font-size: 1.1rem;
  font-weight: 700;
  height: 34px;
  justify-content: center;
  min-height: 34px;
  width: 34px;
}

.ghost-button {
  background: #ecf4f0;
  color: var(--green-dark);
  font-weight: 700;
  padding: 0 14px;
}

.primary-button,
.send-button {
  background: var(--green);
  color: white;
  font-weight: 800;
  padding: 0 18px;
}

.task-compose-button {
  background: var(--magenta);
  color: white;
  font-weight: 900;
  min-width: 58px;
  padding: 0 12px;
}

.text-button {
  background: transparent;
  border: 0;
  color: var(--green-dark);
  font-weight: 800;
  min-height: 36px;
  padding: 0;
  text-align: left;
}

.registration-screen {
  align-items: center;
  display: grid;
  min-height: 100vh;
  padding: 28px;
  place-items: center;
}

.registration-phone {
  background: #101820;
  border: 10px solid #101820;
  border-radius: 32px;
  box-shadow: 0 30px 70px rgba(16, 24, 32, 0.28);
  max-width: 430px;
  min-height: 720px;
  overflow: hidden;
  width: min(100%, 430px);
}

.phone-top {
  background: #101820;
  height: 22px;
  position: relative;
}

.phone-top::after {
  background: #33423b;
  border-radius: 999px;
  content: "";
  height: 5px;
  left: 50%;
  position: absolute;
  top: 7px;
  transform: translateX(-50%);
  width: 92px;
}

.phone-body {
  background:
    linear-gradient(rgba(255, 255, 255, 0.91), rgba(255, 255, 255, 0.91)),
    url("https://images.unsplash.com/photo-1516321497487-e288fb19713f?auto=format&fit=crop&w=900&q=80");
  background-position: center;
  background-size: cover;
  border-radius: 22px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-height: 678px;
  padding: 30px 24px;
}

.registration-header {
  display: grid;
  gap: 10px;
  padding: 22px 0 12px;
  text-align: center;
}

.registration-header h1 {
  font-size: 1.75rem;
}

.registration-header p:last-child {
  color: var(--muted);
  line-height: 1.48;
}

.registration-steps {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  margin: 10px 0 28px;
  padding: 0;
}

.registration-steps li {
  color: var(--muted);
  display: grid;
  font-size: 0.76rem;
  font-weight: 800;
  gap: 7px;
  justify-items: center;
}

.registration-steps li::before {
  background: #d8e2dd;
  border-radius: 999px;
  content: "";
  height: 9px;
  width: 100%;
}

.registration-steps li.active,
.registration-steps li.done {
  color: var(--green-dark);
}

.registration-steps li.active::before,
.registration-steps li.done::before {
  background: var(--green);
}

.registration-form {
  align-content: start;
  display: none;
  gap: 12px;
}

.registration-form.active {
  display: grid;
}

.registration-form label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.registration-form .primary-button {
  margin-top: 10px;
  min-height: 48px;
}

.dev-code-button {
  background: #eaf7ff;
  border: 1px solid rgba(0, 140, 207, 0.28);
  border-radius: 8px;
  color: var(--green-dark);
  cursor: pointer;
  font-weight: 900;
  min-height: 42px;
  padding: 0 12px;
}

.helper-text,
.verify-target {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.verify-target {
  background: #ecf4f0;
  border-radius: 8px;
  color: var(--green-dark);
  font-weight: 800;
  padding: 12px;
}

.search-box {
  display: grid;
  gap: 8px;
  padding: 0 22px 18px;
}

.app-tabs {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  padding: 14px 22px;
}

.tab-button {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-weight: 900;
  min-height: 38px;
}

.tab-button.active {
  border-bottom-color: var(--green);
  color: var(--green-dark);
}

.tab-view {
  display: none;
}

.tab-view.active {
  display: block;
}

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

.tasks-tab-view {
  max-height: calc(100vh - 210px);
  overflow: auto;
}

.search-box span,
.task-form label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

input,
select {
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 42px;
  outline: none;
  padding: 0 12px;
  width: 100%;
}

input:focus,
select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 140, 207, 0.16);
}

.quick-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0 22px 14px;
}

.quick-stats div {
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.quick-stats strong {
  display: block;
  font-size: 1.25rem;
}

.quick-stats span {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  margin-top: 2px;
}

.notification-panel {
  align-items: center;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px 22px;
}

.notification-panel strong,
.notification-panel span {
  display: block;
  overflow-wrap: anywhere;
}

.notification-panel span {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 3px;
}

.workspace-tab-view {
  max-height: calc(100vh - 210px);
  overflow: auto;
  padding-bottom: 22px;
}

.workspace-badge {
  background: var(--cyan);
  border-radius: 999px;
  color: var(--green-dark);
  font-size: 0.76rem;
  font-weight: 900;
  padding: 6px 10px;
}

.workspace-card {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding: 16px 22px;
}

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

.workspace-card-header strong,
.workspace-card-header span {
  display: block;
  overflow-wrap: anywhere;
}

.workspace-card-header span {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 3px;
}

.workspace-form,
.employee-list,
.software-list {
  display: grid;
  gap: 10px;
}

.workspace-form label,
.workspace-card > label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

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

.employee-card {
  align-items: center;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 10px;
}

.employee-card:hover,
.employee-card:focus-within {
  border-color: rgba(0, 140, 207, 0.45);
}

.employee-avatar {
  align-items: center;
  background: var(--green-dark);
  border-radius: 8px;
  color: white;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.employee-card strong,
.employee-card span {
  display: block;
  overflow-wrap: anywhere;
}

.employee-card div span {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.employee-card > .pill,
.employee-card > .availability-toggle {
  grid-column: 2;
  justify-self: start;
}

.available-pill {
  color: #0f5132;
}

.unavailable-pill {
  color: #8a4b00;
}

.pending-pill {
  color: #005b99;
}

.availability-toggle {
  padding-inline: 0.75rem;
  white-space: nowrap;
}

.software-card {
  align-items: center;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px;
}

.software-card.connected {
  border-color: rgba(0, 140, 207, 0.45);
}

.software-card strong,
.software-card span {
  display: block;
  overflow-wrap: anywhere;
}

.software-card span {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.software-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.software-chip {
  background: var(--cyan);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 900;
  min-height: 34px;
  padding: 0 10px;
}

.conversation-list {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 0;
  overflow: auto;
  padding: 0 14px 18px;
}

.conversation-item {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 12px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  min-height: 72px;
  padding: 10px;
  text-align: left;
  width: 100%;
}

.conversation-item.active,
.conversation-item:hover {
  background: #eef7f2;
  border-color: #cde7dc;
}

.conversation-item img,
.chat-person img {
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  width: 48px;
}

.chat-person img {
  width: 54px;
}

.conversation-copy {
  min-width: 0;
}

.conversation-copy strong,
.conversation-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-copy span,
.chat-person p,
.meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.task-dot {
  background: var(--coral);
  border-radius: 999px;
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  min-width: 24px;
  padding: 4px 7px;
  text-align: center;
}

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

.chat-header {
  background: #f0f2f5;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 58px;
  padding: 8px 14px;
}

.chat-person {
  align-items: center;
  display: flex;
  gap: 14px;
  min-width: 0;
}

.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: flex-end;
}

.back-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--ink);
  display: none;
  font-size: 1.65rem;
  font-weight: 400;
  height: 36px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 30px;
}

.chat-header .ghost-button {
  background: rgba(255, 255, 255, 0.18);
  color: var(--ink);
  min-height: 34px;
  padding: 0 10px;
}

.chat-icon-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  display: inline-flex;
  font-size: 1.05rem;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  min-width: 34px;
  padding: 0;
}

.chat-icon-button:hover,
.chat-icon-button:focus-visible {
  background: rgba(0, 140, 207, 0.12);
  outline: none;
}

.more-menu {
  position: relative;
}

.more-menu-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  min-width: 190px;
  overflow: hidden;
  position: absolute;
  right: 0;
  top: 46px;
  z-index: 5;
}

.more-menu-panel button {
  background: white;
  border: 0;
  color: var(--ink);
  font-weight: 700;
  min-height: 44px;
  padding: 0 14px;
  text-align: left;
}

.more-menu-panel button:hover,
.more-menu-panel button:focus-visible {
  background: var(--wash);
  outline: none;
}

.chat-header .chat-person p,
.chat-header .meta {
  color: var(--muted);
}

.message-stream {
  background:
    linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1500&q=80");
  background-position: center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 24px;
}

.encryption-notice {
  align-self: center;
  background: #fff7d6;
  border: 1px solid #eadca0;
  border-radius: 8px;
  color: #6f5b16;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  max-width: 88%;
  padding: 8px 10px;
  text-align: center;
}

.message {
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(23, 32, 28, 0.08);
  max-width: min(620px, 78%);
  padding: 10px 12px;
}

.message.me {
  align-self: flex-end;
  background: var(--mint);
}

.message.them {
  align-self: flex-start;
  background: white;
}

.message p,
.message-text {
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.message-text {
  display: grid;
  gap: 8px;
}

.message-text h3 {
  color: var(--green-dark);
  font-size: 0.82rem;
  letter-spacing: 0;
  margin: 4px 0 0;
  text-transform: uppercase;
}

.message-forwarded {
  color: var(--green-dark);
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 900;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.message-text p,
.message-text ul {
  margin: 0;
}

.message-text ul {
  display: grid;
  gap: 5px;
  padding-left: 18px;
}

.message-text li {
  line-height: 1.4;
  padding-left: 2px;
}

.message-text strong {
  font-weight: 900;
}

.attachment-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.attachment-list.sticker-list {
  display: flex;
  flex-wrap: wrap;
}

.agent-message {
  max-width: min(760px, 86%);
}

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

.agent-action-list {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.agent-action-card {
  align-items: center;
  background: var(--wash);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px;
}

.agent-action-card.approved {
  border-left-color: #16a34a;
  opacity: 0.82;
}

.agent-action-card.failed {
  border-left-color: #dc2626;
}

.agent-action-card strong,
.agent-action-card span {
  display: block;
  overflow-wrap: anywhere;
}

.agent-action-card > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.agent-action-type {
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.blu-task-suggestions {
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
}

.blu-task-suggestions .eyebrow {
  margin: 0;
}

.blu-task-suggestion {
  align-items: center;
  background: var(--wash);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px;
}

.blu-task-suggestion strong,
.blu-task-suggestion span {
  display: block;
  overflow-wrap: anywhere;
}

.blu-task-suggestion > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.blu-task-suggestion > div > span {
  color: var(--muted);
  font-size: 0.82rem;
}

.blu-policy-form,
.blu-action-list {
  display: grid;
  gap: 10px;
}

.toggle-row {
  align-items: center;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 10px;
}

.toggle-row input {
  height: 18px;
  width: 18px;
}

.blu-action-card {
  background: white;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}

.blu-action-card.completed {
  border-left-color: #16a34a;
}

.blu-action-card.rejected,
.blu-action-card.failed {
  border-left-color: #dc2626;
}

.blu-action-card > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.blu-action-card strong,
.blu-action-card span {
  display: block;
  overflow-wrap: anywhere;
}

.blu-action-card > div > span:not(.agent-action-type) {
  color: var(--muted);
  font-size: 0.82rem;
}

.blu-action-card menu {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.attachment-card {
  align-items: center;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 52px minmax(0, 1fr);
  padding: 8px;
}

.message.them .attachment-card {
  background: var(--wash);
}

.attachment-card img,
.attachment-file-icon {
  aspect-ratio: 1;
  border-radius: 8px;
  height: 52px;
  width: 52px;
}

.attachment-card img {
  object-fit: cover;
}

.attachment-card.gif-card {
  grid-template-columns: minmax(0, 1fr);
  padding: 6px;
}

.attachment-card.gif-card img {
  aspect-ratio: 16 / 10;
  height: auto;
  max-height: 220px;
  width: 100%;
}

.attachment-card.gif-card > div {
  padding: 0 4px 2px;
}

.attachment-card audio {
  width: 100%;
}

.attachment-card.sticker-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  padding: 0;
}

.attachment-card.sticker-card img {
  background: transparent;
  height: 110px;
  object-fit: contain;
  width: 110px;
}

.attachment-card.sticker-card > div {
  display: none;
}

.attachment-file-icon {
  align-items: center;
  background: var(--green-dark);
  color: white;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 900;
  justify-content: center;
}

.attachment-card strong,
.attachment-card span,
.attachment-card a {
  display: block;
  overflow-wrap: anywhere;
}

.attachment-card span {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.attachment-card a {
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 900;
  margin-top: 4px;
  text-decoration: none;
}

.message .meta {
  display: block;
  text-align: right;
}

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

.message-actions {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
}

.message-reply-button,
.message-task-button,
.message-react-button,
.message-forward-button {
  background: transparent;
  border: 0;
  color: var(--green-dark);
  font-size: 0.76rem;
  font-weight: 900;
  padding: 0;
}

.message-reaction-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.reaction-pill {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 4px;
  padding: 5px 8px;
}

.reaction-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.reaction-option {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  height: 34px;
  line-height: 1;
  min-width: 34px;
  padding: 0 8px;
}

.reaction-option:hover,
.reaction-option:focus-visible {
  background: white;
  outline: none;
}

.message-status {
  color: var(--muted);
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  margin-left: 8px;
}

.reply-quote {
  background: rgba(0, 137, 204, 0.08);
  border-left: 3px solid var(--green);
  border-radius: 8px;
  display: grid;
  gap: 2px;
  margin-bottom: 8px;
  padding: 7px 9px;
}

.reply-quote strong,
.reply-preview strong {
  color: var(--green-dark);
  font-size: 0.76rem;
}

.reply-quote span,
.reply-preview span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message.task-message {
  max-width: min(420px, 88%);
}

.inline-task-card {
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.inline-task-card.high {
  border-left-color: var(--coral);
}

.inline-task-card.low {
  border-left-color: #00a3e0;
}

.inline-task-card .eyebrow {
  margin: 0;
}

.inline-task-card strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.inline-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inline-task-meta span {
  background: var(--cyan);
  border-radius: 999px;
  color: #116068;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 5px 8px;
}

.composer {
  align-items: center;
  background: white;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: auto auto auto 1fr auto;
  padding: 14px 18px;
  position: relative;
  z-index: 2;
}

.media-tray {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  left: 18px;
  max-width: min(440px, calc(100vw - 56px));
  padding: 12px;
  position: absolute;
  right: auto;
  bottom: calc(100% + 10px);
}

.media-tray[hidden] {
  display: none;
}

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

.media-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.media-search-input {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 40px;
  padding: 0 12px;
  width: 100%;
}

.media-tab {
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  min-height: 36px;
  padding: 0 12px;
}

.media-tab.active {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.media-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: 280px;
  overflow: auto;
  padding-right: 4px;
}

.media-item {
  align-items: center;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 8px;
  justify-items: center;
  min-height: 84px;
  padding: 8px;
  text-align: center;
}

.media-item:hover,
.media-item:focus-visible {
  background: white;
  outline: none;
}

.media-item img {
  border-radius: 8px;
  height: 72px;
  object-fit: cover;
  width: 100%;
}

.media-item.sticker-item img {
  background: transparent;
  height: 78px;
  object-fit: contain;
}

.media-item span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.emoji-item {
  font-size: 1.6rem;
  font-weight: 700;
}

.voice-note-button.recording {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

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

.forward-conversation-button {
  align-items: center;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  padding: 10px;
  text-align: left;
}

.forward-conversation-button:hover,
.forward-conversation-button:focus-visible {
  background: white;
  outline: none;
}

.forward-conversation-button img {
  border-radius: 8px;
  height: 48px;
  object-fit: cover;
  width: 48px;
}

.forward-conversation-button strong,
.forward-conversation-button span {
  display: block;
  overflow-wrap: anywhere;
}

.forward-conversation-button span {
  color: var(--muted);
  font-size: 0.8rem;
}

.reply-preview {
  align-items: center;
  background: var(--wash);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 9px 10px;
}

.reply-preview[hidden] {
  display: none;
}

.reply-preview > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.attach-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 1.25rem;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.attach-button:hover,
.attach-button:focus-visible {
  background: var(--wash);
  color: var(--green-dark);
}

.task-header select {
  max-width: 135px;
}

.task-form {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding: 0 22px 18px;
}

.ai-task-box {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding: 16px 22px;
}

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

.suggestion-card {
  align-items: center;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}

.suggestion-card strong,
.suggestion-card span {
  display: block;
  overflow-wrap: anywhere;
}

.suggestion-card span {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 3px;
}

.import-ai-review {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  padding-top: 14px;
}

.import-ai-review h3 {
  margin: 0 0 6px;
}

.import-ai-review p {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.import-task-review {
  display: grid;
  gap: 10px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.import-task-card {
  background: var(--wash);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}

.import-task-card.confirmed {
  border-left-color: #2fbf71;
  opacity: 0.78;
}

.import-task-card strong,
.import-task-card span {
  display: block;
  overflow-wrap: anywhere;
}

.import-task-card span {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 3px;
}

.import-task-fields {
  display: grid;
  gap: 8px;
}

.import-task-fields label {
  display: grid;
  gap: 5px;
}

.import-task-fields label span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  margin: 0;
}

.import-task-fields textarea,
.import-task-fields input,
.import-task-fields select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 40px;
  padding: 8px 10px;
  width: 100%;
}

.import-task-fields textarea {
  font-weight: 800;
  line-height: 1.35;
  min-height: 64px;
  resize: vertical;
}

.import-task-edit-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1.2fr) minmax(130px, 0.8fr) minmax(120px, 0.7fr);
}

.import-task-card menu {
  align-items: stretch;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

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

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

.task-list {
  display: grid;
  gap: 10px;
  padding: 16px 22px 24px;
}

.task-card {
  background: white;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(23, 32, 28, 0.08);
  display: grid;
  gap: 10px;
  padding: 14px;
}

.task-card.high {
  border-left-color: var(--coral);
}

.task-card.low {
  border-left-color: #00a3e0;
}

.task-card.done {
  opacity: 0.62;
}

.task-card label {
  align-items: flex-start;
  color: var(--ink);
  display: grid;
  font-size: 0.98rem;
  gap: 10px;
  grid-template-columns: auto 1fr;
  line-height: 1.35;
}

.task-card input {
  height: 18px;
  margin-top: 2px;
  min-height: auto;
  padding: 0;
  width: 18px;
}

.task-card footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.assignment-fallback {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: 0.85rem;
  gap: 12px;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
}

.assignment-fallback button {
  flex: 0 0 auto;
}

.task-toast {
  background: #062f4f;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  bottom: 18px;
  box-shadow: 0 14px 38px rgba(6, 47, 79, 0.28);
  color: white;
  display: grid;
  gap: 4px;
  left: 50%;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  position: fixed;
  transform: translateX(-50%);
  width: max-content;
  z-index: 50;
}

.task-toast[hidden] {
  display: none;
}

.task-toast strong,
.task-toast span {
  display: block;
  overflow-wrap: anywhere;
}

.task-toast span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.84rem;
}

.pill {
  background: var(--cyan);
  border-radius: 999px;
  color: #116068;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 5px 8px;
}

.reminder-pill {
  background: #fff7d6;
  color: #6f5b16;
}

.delete-button {
  background: transparent;
  border: 0;
  color: var(--magenta);
  font-weight: 800;
  padding: 0;
}

dialog {
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 0;
  width: min(420px, calc(100vw - 32px));
}

#settingsDialog {
  max-height: calc(100vh - 24px);
  width: min(780px, calc(100vw - 24px));
}

#inviteDialog,
#mcpDialog,
#quickTaskDialog,
#shareImportDialog,
#contactSyncDialog,
#inviteContactsDialog {
  width: min(560px, calc(100vw - 32px));
}

#mcpDialog,
#shareImportDialog {
  width: min(820px, calc(100vw - 32px));
}

dialog::backdrop {
  background: rgba(23, 32, 28, 0.42);
}

.dialog-card {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.settings-card {
  gap: 0;
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 0;
  width: 100%;
}

.settings-card > header {
  background: white;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  justify-content: initial;
  padding: 18px 20px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.settings-card > .workspace-card:first-of-type {
  padding-top: 18px;
}

.settings-profile-shell {
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
}

.settings-back-button {
  background: transparent;
  color: var(--green-dark);
}

.settings-home-list {
  display: grid;
}

.settings-nav-item {
  align-items: center;
  background: white;
  border: 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 16px 22px;
  text-align: left;
}

.settings-nav-item:hover,
.settings-nav-item:focus-visible {
  background: var(--wash);
  outline: none;
}

.settings-nav-item strong,
.settings-nav-item span {
  display: block;
  overflow-wrap: anywhere;
}

.settings-nav-item div {
  display: grid;
  gap: 4px;
}

.settings-nav-item div span {
  color: var(--muted);
  font-size: 0.84rem;
}

.settings-nav-arrow {
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
}

.settings-panel[hidden] {
  display: none !important;
}

.settings-profile-copy {
  display: grid;
  gap: 4px;
}

.settings-profile-copy strong {
  font-size: 1.1rem;
}

.settings-profile-copy span {
  color: var(--muted);
  font-size: 0.88rem;
}

.settings-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.settings-upload-button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
}

.settings-section-card {
  gap: 14px;
}

.settings-section-header {
  align-items: flex-start;
}

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

.settings-detail-card {
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.settings-detail-card strong,
.settings-detail-card span {
  overflow-wrap: anywhere;
}

.settings-detail-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.settings-subsection-title {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 2px;
  padding: 18px 22px 8px;
}

.settings-subsection-title h3 {
  font-size: 1.08rem;
  margin: 0;
}

.settings-notification-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.wide-dialog {
  gap: 16px;
}

.dialog-card header,
.dialog-card menu {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 0;
  padding: 0;
}

.dialog-card h3 {
  font-size: 1rem;
  margin: 0 0 10px;
}

.contact-popup {
  justify-items: stretch;
  text-align: left;
}

.reminder-popup {
  justify-items: stretch;
  min-width: min(420px, calc(100vw - 36px));
}

.popup-hero {
  align-items: center;
  background: var(--cyan);
  border-radius: 8px;
  color: var(--green-dark);
  display: inline-flex;
  font-size: 2rem;
  font-weight: 900;
  height: 58px;
  justify-content: center;
  width: 58px;
}

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

.share-button {
  align-items: center;
  border-radius: 8px;
  color: white;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 42px;
  padding: 0 12px;
  text-decoration: none;
}

.share-button.whatsapp {
  background: #008ccf;
}

.share-button.instagram {
  background: #243447;
}

.share-button.sms {
  background: #00a3e0;
}

.share-button.email {
  background: #101820;
}

.mcp-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.82fr);
}

.connected-apps,
.mcp-form {
  display: grid;
  gap: 10px;
}

.mcp-card {
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.mcp-card.connected {
  border-color: rgba(0, 140, 207, 0.45);
  box-shadow: inset 4px 0 0 var(--green);
}

.mcp-card strong,
.mcp-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mcp-card span,
.mcp-card p {
  color: var(--muted);
  font-size: 0.82rem;
}

.mcp-card button {
  width: fit-content;
}

.settings-profile-row,
.settings-qr-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr);
}

.settings-profile-fields,
.connected-apps-settings {
  display: grid;
  gap: 10px;
}

.settings-profile-avatar {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 84px;
  object-fit: cover;
  width: 84px;
}

.qr-placeholder {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(0, 137, 204, 0.09) 50%, transparent 50%),
    linear-gradient(rgba(0, 137, 204, 0.09) 50%, transparent 50%);
  background-position: center;
  background-size: 18px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  height: 152px;
  justify-items: center;
  padding: 12px;
  width: 152px;
}

.qr-placeholder span {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-dark);
  font-size: 1.3rem;
  font-weight: 900;
  padding: 8px 12px;
}

.qr-placeholder small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

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

.settings-action-row {
  align-items: center;
  flex-wrap: wrap;
}

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

.settings-device-card,
.settings-audit-card {
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.settings-device-card {
  grid-template-columns: minmax(0, 1fr) auto;
}

.settings-device-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.settings-audit-header span {
  color: var(--muted);
  font-size: 0.82rem;
}

.settings-audit-target {
  background: #101923;
  border-radius: 8px;
  color: #d9e5f1;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.78rem;
  margin: 0;
  overflow: auto;
  padding: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}

textarea {
  background: #101820;
  border: 0;
  border-radius: 8px;
  color: #e5fff3;
  font: 0.82rem Consolas, "Liberation Mono", monospace;
  line-height: 1.45;
  min-height: 210px;
  padding: 12px;
  resize: vertical;
  width: 100%;
}

.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;
}

.empty-state {
  color: var(--muted);
  line-height: 1.45;
  padding: 20px 6px;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: minmax(290px, 340px) minmax(0, 1fr);
    height: 100vh;
    width: 100vw;
    min-height: 100vh;
    top: 0;
  }
}

@media (max-width: 760px) {
  body {
    background: white;
  }

  .registration-screen {
    padding: 0;
  }

  .registration-phone {
    border: 0;
    border-radius: 0;
    min-height: 100vh;
    width: 100%;
  }

  .phone-top {
    display: none;
  }

  .phone-body {
    border-radius: 0;
    min-height: 100vh;
  }

  .app-shell {
    box-shadow: none;
    display: block;
    height: 100vh;
    max-width: 560px;
    min-height: 100vh;
    top: 0;
    width: 100%;
    overflow: hidden;
  }

  .app-shell[data-view="home"] .chat-panel,
  .app-shell[data-view="chat"] .sidebar {
    display: none;
  }

  .app-shell[data-view="home"] .sidebar,
  .app-shell[data-view="chat"] .chat-panel {
    display: grid;
  }

  .sidebar {
    border-width: 0;
    height: 100vh;
    min-height: 0;
  }

  .conversation-list {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 14px;
  }

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

  .chat-header {
    background: var(--green);
    color: white;
    min-height: auto;
    padding: 7px 10px;
  }

  .back-button {
    color: white;
    display: inline-flex;
  }

  .chat-icon-button {
    color: white;
  }

  .chat-icon-button:hover,
  .chat-icon-button:focus-visible {
    background: rgba(255, 255, 255, 0.16);
  }

  .chat-header .chat-person p,
  .chat-header .meta {
    color: rgba(255, 255, 255, 0.78);
  }

  .task-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-stats,
  .notification-panel {
    grid-template-columns: 1fr;
  }

  .task-header select {
    width: 100%;
  }

  .ghost-button,
  .task-header select {
    min-height: 42px;
  }

  .employee-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .employee-card > .pill,
  .employee-card > .availability-toggle {
    grid-column: 2;
    justify-self: start;
  }

  .assignment-fallback {
    align-items: flex-start;
    flex-direction: column;
  }

  .message {
    max-width: 92%;
  }

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

  .media-tray {
    left: 12px;
    max-width: calc(100vw - 24px);
  }

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

  .send-button {
    grid-column: 1 / -1;
  }

  .share-grid,
  .mcp-layout,
  .workspace-actions {
    grid-template-columns: 1fr;
  }

  #settingsDialog {
    border-radius: 0;
    height: 100dvh;
    margin: 0;
    max-height: 100dvh;
    max-width: 100vw;
    width: 100vw;
  }

  .settings-card {
    border-radius: 0;
    max-height: 100dvh;
  }

  .settings-card > header {
    padding: 14px 16px;
  }

  .settings-nav-item {
    padding: 15px 16px;
  }

  .settings-subsection-title {
    padding: 16px 16px 8px;
  }

  .settings-profile-row,
  .settings-qr-layout {
    grid-template-columns: 1fr;
  }

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

  .settings-profile-avatar,
  .qr-placeholder {
    justify-self: start;
  }

  .tasks-tab-view,
  .workspace-tab-view {
    max-height: none;
  }
}
