:root {
  font-family: Tahoma, Arial, sans-serif;
  color: #233c39;
  background: #f6f6f2;
  font-synthesis: none;
  --teal: #136c62;
  --mint: #e7f4ef;
  --line: #e0e8e3;
  --muted: #74857e;
  --cream: #faf9f4;
  --danger: #a4373a;
  --shadow: 0 8px 36px #173b2910;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #74bbae;
  outline-offset: 3px;
}
a {
  color: var(--teal);
}
button {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 17px;
  background: white;
  color: #35564e;
  font-weight: bold;
  line-height: 1.5;
}
button:hover {
  background: #f1f6f3;
}
.primary {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}
.primary:hover {
  background: #105a51;
}
.danger {
  color: var(--danger);
}
.small {
  padding: 7px 11px;
  font-size: 12px;
}
.ghost {
  background: transparent;
  border-color: transparent;
}
.app-shell {
  display: grid;
  grid-template-columns: 236px 1fr;
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #fff;
  border-inline-end: 1px solid var(--line);
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.brand-mark {
  background: var(--teal);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 31px;
}
.brand-name {
  font-size: 23px;
  font-family: Georgia, serif;
  letter-spacing: 1px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nav-button {
  text-align: right;
  border: none;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  font-size: 14px;
  padding: 14px;
}
.nav-button.active {
  background: var(--mint);
  color: var(--teal);
}
.nav-icon {
  font-size: 18px;
  min-width: 22px;
  text-align: center;
}
.nav-label {
  flex: 1;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.identity-name {
  font-weight: bold;
  margin-bottom: 7px;
}
.main {
  min-width: 0;
}
.topbar {
  padding: 19px 32px;
  background: #ffffffc9;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.topbar-title {
  font-size: 13px;
  color: var(--muted);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.content {
  max-width: 1400px;
  margin: auto;
  padding: 30px 32px 50px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}
h1 {
  font-size: 27px;
  margin: 0 0 9px;
  line-height: 1.4;
  letter-spacing: -0.6px;
}
h2 {
  font-size: 18px;
  margin: 0 0 13px;
  line-height: 1.5;
}
h3 {
  font-size: 15px;
  margin: 0 0 10px;
}
p {
  line-height: 1.9;
  margin: 0 0 12px;
}
.muted,
.help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.card + .card {
  margin-top: 18px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 18px;
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
}
.stat-value {
  font-size: 28px;
  margin-top: 10px;
  font-weight: bold;
}
.stat:first-child {
  background: var(--mint);
  border-color: #c5e0d4;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f0f3f1;
  padding: 5px 10px;
  font-size: 11px;
  white-space: nowrap;
  color: #557368;
}
.badge.good {
  background: var(--mint);
  color: var(--teal);
}
.badge.warn {
  background: #fff1d5;
  color: #8d6424;
}
.badge.bad {
  background: #ffeded;
  color: var(--danger);
}
.badge.count {
  padding: 3px 8px;
  background: #136c62;
  color: white;
}
.notice {
  border: 1px solid #c4dfd5;
  background: var(--mint);
  color: #285e4b;
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 13px;
  line-height: 1.9;
}
.notice.error {
  border-color: #efcccc;
  background: #fff2f1;
  color: #92383c;
}
.notice.warning {
  background: #fff7e5;
  border-color: #f1dfb6;
  color: #806128;
}
.notice.info {
  background: #f0f5f6;
  border-color: #d6e3e7;
  color: #49656c;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  min-width: 0;
}
.field label {
  font-weight: bold;
  color: #486057;
}
.field input,
.field select,
.field textarea,
.search {
  border: 1px solid #d8e2db;
  border-radius: 11px;
  background: #fcfdfb;
  padding: 12px 14px;
  width: 100%;
  color: #234339;
  min-height: 46px;
}
.field textarea {
  resize: vertical;
  min-height: 118px;
  line-height: 1.9;
}
.field select[multiple] {
  min-height: 130px;
}
.check-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.9;
  font-size: 13px;
}
.check-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
  flex-shrink: 0;
  margin-top: 4px;
}
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 18px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
}
.form-section {
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
  margin-bottom: 22px;
}
.form-section:last-child {
  border: none;
}
.tabs {
  display: flex;
  gap: 6px;
  overflow: auto;
  padding-bottom: 12px;
}
.tabs button {
  white-space: nowrap;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.tabs button.active {
  background: var(--mint);
  color: var(--teal);
}
.inbox-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
  min-height: 560px;
}
.conversation-list {
  padding: 9px;
  box-shadow: none;
  max-height: 700px;
  overflow: auto;
}
.conversation-item {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  text-align: right;
  padding: 17px 12px;
  border-radius: 11px;
  font-weight: normal;
  border-bottom: 1px solid #edf1ed;
}
.conversation-item.selected {
  background: var(--mint);
}
.conversation-item strong {
  font-size: 13px;
}
.conversation-preview {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 9px;
}
.date {
  font-size: 10px;
  color: var(--muted);
  direction: ltr;
  unicode-bidi: plaintext;
}
.conversation-view {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 560px;
}
.conversation-header {
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.messages {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 260px;
  max-height: 520px;
  overflow: auto;
  background: #fbfcf9;
  flex: 1;
}
.bubble {
  padding: 12px 16px;
  border-radius: 15px;
  max-width: 85%;
  align-self: flex-start;
  background: #e6f3ed;
  border: 1px solid #d7e8df;
  line-height: 1.9;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
}
.bubble.customer {
  align-self: flex-end;
  background: #fff;
  border-color: var(--line);
}
.bubble.system {
  align-self: center;
  background: #f2f2ed;
  max-width: 95%;
  font-size: 12px;
  color: var(--muted);
}
.bubble-meta {
  font-size: 10px;
  color: #71867b;
  margin-top: 6px;
  white-space: normal;
}
.composer {
  padding: 16px;
  background: white;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.composer textarea {
  resize: vertical;
  min-height: 52px;
  max-height: 170px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px;
  flex: 1;
  font: inherit;
  line-height: 1.7;
  width: 100%;
  min-width: 0;
}
.empty {
  padding: 55px 25px;
  text-align: center;
  color: var(--muted);
  line-height: 2;
}
.empty-icon {
  font-size: 35px;
  opacity: 0.6;
  margin-bottom: 14px;
}
.empty strong {
  display: block;
  font-size: 16px;
  color: #48665c;
  margin-bottom: 5px;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.toolbar .search {
  flex: 1;
  min-width: 180px;
  max-width: 460px;
}
.service-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
.service-meta {
  color: var(--muted);
  font-size: 11px;
  margin-top: 7px;
  line-height: 1.9;
}
.service-price {
  color: var(--teal);
  font-weight: bold;
  white-space: nowrap;
  font-size: 14px;
}
.list-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.item-body {
  font-size: 13px;
  line-height: 1.9;
  color: #5d7268;
  white-space: pre-wrap;
  margin: 12px 0;
  overflow-wrap: anywhere;
}
.link-code {
  display: block;
  direction: ltr;
  text-align: left;
  font-family: monospace;
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 9px;
  background: #f5f7f3;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.7;
}
.step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.step-number {
  width: 25px;
  height: 25px;
  flex-shrink: 0;
  background: var(--mint);
  color: var(--teal);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.step p {
  font-size: 13px;
}
.history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.history-row:last-child {
  border: none;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-story {
  padding: 65px 8vw;
  background: #e5f1e9;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-story:before {
  content: "";
  position: absolute;
  width: 430px;
  height: 430px;
  border: 1px solid #b9d6c4;
  border-radius: 50%;
  left: -140px;
  bottom: -160px;
}
.login-story h1 {
  font-size: 43px;
  line-height: 1.65;
  max-width: 430px;
  margin: 45px 0 20px;
}
.login-story p {
  max-width: 390px;
  color: #527866;
  font-size: 15px;
}
.login-form-side {
  padding: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-form {
  width: 100%;
  max-width: 370px;
}
.login-form h2 {
  font-size: 24px;
  margin-bottom: 12px;
}
.login-form .brand {
  display: none;
  margin-bottom: 35px;
}
.login-form form {
  margin-top: 30px;
}
.login-form .primary {
  width: 100%;
  margin-top: 10px;
}
.startup {
  padding: 70px;
  text-align: center;
  color: var(--teal);
}
.footer-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 30px;
  line-height: 1.9;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}
.notification-button {
  position: relative;
}
.notification-button .count {
  margin-inline-start: 7px;
}
dialog {
  border: none;
  border-radius: 20px;
  padding: 0;
  max-width: 650px;
  width: calc(100% - 30px);
  max-height: 90vh;
  box-shadow: 0 30px 100px #173b2940;
}
dialog::backdrop {
  background: #10251d70;
  backdrop-filter: blur(3px);
}
.modal-head {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.modal-head h2 {
  margin: 0;
}
.modal-body {
  padding: 24px;
  overflow: auto;
  max-height: calc(90vh - 90px);
}
.loading {
  padding: 45px;
  text-align: center;
  color: var(--muted);
}
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e0e8e0;
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
@media (min-width: 1550px) {
  .content {
    padding-top: 40px;
  }
  .inbox-layout {
    grid-template-columns: 350px minmax(0, 1fr);
  }
}
@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: 200px 1fr;
  }
  .sidebar {
    padding: 22px 12px;
  }
  .content {
    padding: 24px 20px;
  }
  .topbar {
    padding: 17px 20px;
  }
  .inbox-layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 45px;
  }
  .login-story h1 {
    font-size: 33px;
  }
}
@media (max-width: 760px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    height: auto;
    position: static;
    padding: 14px 16px 0;
    border-inline-end: none;
    border-bottom: 1px solid var(--line);
    gap: 12px;
  }
  .sidebar .brand {
    justify-content: space-between;
  }
  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 26px;
    border-radius: 12px;
  }
  .brand-name {
    font-size: 21px;
  }
  .sidebar .eyebrow {
    display: none;
  }
  .nav {
    flex-direction: row;
    overflow: auto;
    margin: 0 -8px;
    padding-bottom: 8px;
    gap: 3px;
  }
  .nav-button {
    white-space: nowrap;
    padding: 10px;
    font-size: 12px;
    gap: 5px;
  }
  .nav-icon {
    font-size: 15px;
    min-width: 17px;
  }
  .sidebar-bottom {
    display: none;
  }
  .topbar {
    padding: 12px 16px;
    gap: 8px;
  }
  .topbar-title {
    font-size: 11px;
  }
  .topbar-actions {
    gap: 5px;
  }
  .topbar-actions button {
    font-size: 11px;
    padding: 8px;
  }
  .content {
    padding: 23px 15px 35px;
  }
  .page-heading {
    gap: 12px;
    flex-wrap: wrap;
  }
  h1 {
    font-size: 23px;
  }
  .card {
    padding: 18px;
    border-radius: 14px;
  }
  .grid {
    gap: 14px;
  }
  .stats {
    gap: 8px;
  }
  .stat {
    padding: 14px 10px;
  }
  .stat-label {
    font-size: 10px;
  }
  .stat-value {
    font-size: 23px;
  }
  .inbox-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .conversation-list {
    max-height: 240px;
    padding: 6px;
  }
  .conversation-view {
    padding: 0;
    min-height: 430px;
  }
  .messages {
    padding: 14px;
    max-height: 470px;
  }
  .bubble {
    max-width: 92%;
  }
  .composer {
    padding: 12px;
    gap: 7px;
  }
  .composer button {
    padding: 11px;
  }
  .conversation-header {
    padding: 16px;
  }
  .login-screen {
    display: block;
    background: var(--cream);
  }
  .login-story {
    display: none;
  }
  .login-form-side {
    padding: 35px 23px;
    min-height: 100vh;
  }
  .login-form .brand {
    display: flex;
  }
  .login-form {
    max-width: 420px;
  }
  .history-row {
    align-items: flex-start;
  }
  .modal-body {
    padding: 20px;
  }
  .service-card {
    padding: 16px;
  }
  .page-heading .primary {
    font-size: 12px;
  }
  .row-between {
    align-items: flex-start;
  }
  .toolbar .search {
    max-width: none;
  }
  .form-actions {
    flex-wrap: wrap;
  }
  .form-actions button {
    flex: 1;
  }
  .notification-button .label {
    display: none;
  }
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--mint);
  color: var(--teal);
  text-decoration: none;
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
}
.setup-steps {
  margin: 18px 0 24px;
  padding-inline-start: 23px;
  color: #526d62;
  font-size: 13px;
  line-height: 1.95;
}
.setup-steps li + li {
  margin-top: 10px;
}
.setup-readiness {
  margin: 16px 0;
}
.setup-copy-row {
  padding: 17px 0;
  border-top: 1px solid var(--line);
}
.setup-copy-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.setup-copy-heading h3 {
  margin: 0;
  font-size: 13px;
}
.setup-copy-heading .small {
  min-width: 62px;
}
.setup-copy-row .help {
  margin-bottom: 9px;
}
.setup-copy-row .link-code {
  white-space: pre-wrap;
}
.setup-private .link-code {
  background: #fff9eb;
  border-color: #eee0bd;
}
.setup-permissions {
  margin-top: 15px;
  padding: 18px;
  border-radius: 12px;
  background: #f4f7f3;
}
.setup-permissions .help:last-child {
  margin: 12px 0 0;
}
@media (max-width: 760px) {
  .meta-setup > .row-between {
    flex-direction: column;
  }
  .meta-setup .button-link {
    width: 100%;
  }
  .setup-steps {
    padding-inline-start: 21px;
  }
  .setup-permissions {
    padding: 14px;
  }
  .setup-permissions .badge {
    font-size: 10px;
  }
}
