:root {
  --ink: #292d3a;
  --muted: #8a8c99;
  --purple: #7862cb;
  --line: #e9e9ef;
  --soft: #f7f6fb;
  --note: #fff8e8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    14px -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: #fff;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  transition: background 0.15s;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #a393df;
  outline-offset: 2px;
}
input,
select,
textarea {
  border: 1px solid #dedee8;
  border-radius: 8px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
}
button {
  border: 0;
  background: transparent;
  color: inherit;
}
p {
  line-height: 1.6;
}
.hidden {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.6px;
  color: var(--muted);
  font-weight: 650;
}
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--purple);
  color: white;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  font-size: 48px;
  font-weight: 750;
  letter-spacing: -5px;
  padding-right: 6px;
}
.brand-mark.small {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 31px;
  letter-spacing: -3px;
  padding-right: 4px;
}
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: #fcfbfe;
}
.login-brand {
  padding: 14vh 9vw;
  background:
    radial-gradient(ellipse at 15% 90%, #e5def5 0, transparent 60%), #f1edf9;
}
.login-brand .eyebrow {
  margin-top: 48px;
  color: #75658d;
}
.login-brand h1 {
  font-size: clamp(30px, 3.2vw, 48px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -1.4px;
}
.login-brand p {
  color: #777088;
  font-size: 15px;
}
.login-note {
  margin-top: 70px;
  color: #82768f;
  font-size: 10px;
  letter-spacing: 2px;
}
.login-card {
  align-self: center;
  justify-self: center;
  width: min(380px, 80%);
}
.login-card h2 {
  font-size: 30px;
  letter-spacing: -0.6px;
  margin: 25px 0 5px;
}
.login-card > p {
  color: #88818f;
}
.login-card label {
  display: block;
  margin-top: 22px;
  font-weight: 550;
  font-size: 12px;
}
.login-card input {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 13px;
}
.login-card small {
  display: block;
  text-align: center;
  margin-top: 22px;
  color: #97919e;
  font-size: 11px;
}
.primary {
  background: var(--purple);
  color: #fff;
  padding: 11px 17px;
  border-radius: 8px;
  font-weight: 550;
}
.primary:hover {
  background: #6550b5;
}
.login-card .primary {
  width: 100%;
  display: flex;
  justify-content: space-between;
}
.pill {
  border: 1px solid #ded6ef;
  border-radius: 20px;
  padding: 7px 12px;
  color: #827096;
  font-size: 11px;
}
#login-error {
  color: #b13c46;
  font-size: 12px;
  min-height: 18px;
}
.workspace {
  height: 100vh;
  display: flex;
  overflow: hidden;
}
.rail {
  width: 64px;
  background: #f1eef8;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 18px 0;
  gap: 20px;
  border-right: 1px solid #e9e5f1;
  flex-shrink: 0;
}
.rail-button {
  font-size: 26px;
  width: 42px;
  height: 42px;
  color: #92889f;
  border-radius: 10px;
}
.rail-button.selected {
  background: #e3ddf3;
  color: #7158bc;
}
.rail-bottom {
  margin-top: auto;
}
.avatar {
  border-radius: 50%;
  background: #e9e3f6;
  color: #7d67ad;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 650;
  flex-shrink: 0;
}
.sidebar {
  width: 230px;
  flex-shrink: 0;
  background: #fbfafc;
  border-right: 1px solid var(--line);
  padding: 24px 14px 18px;
  display: flex;
  flex-direction: column;
}
.workspace-name {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 7px;
  font-size: 13px;
}
.workspace-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8ecca6;
}
.compose {
  background: white;
  border: 1px solid #e1dfea;
  border-radius: 8px;
  margin: 25px 0;
  padding: 10px;
  text-align: left;
  box-shadow: 0 2px 3px #20103304;
  font-size: 12px;
  font-weight: 550;
}
nav {
  overflow: auto;
  flex: 1;
}
nav h3 {
  color: #a1a0ac;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 1.2px;
  margin: 25px 10px 10px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  width: 100%;
  padding: 10px;
  border-radius: 7px;
  font-size: 12px;
  color: #72717e;
  margin: 2px 0;
}
.nav-item:hover {
  background: #f0edf7;
}
.nav-item.active {
  background: #ebe6f7;
  color: #735bb3;
  font-weight: 600;
}
.nav-symbol {
  width: 18px;
  color: #9b93aa;
  font-size: 16px;
}
.sidebar-footer {
  font-size: 10px;
  color: #7d7a89;
  border-top: 1px solid var(--line);
  padding: 17px 8px 0;
  margin-top: 20px;
}
.sidebar-footer p {
  font-size: 10px;
  color: #aaa4b1;
  margin-bottom: 0;
}
.sidebar-footer .muted {
  float: right;
}
.status-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #bfaa6f;
  border-radius: 50%;
  margin-right: 5px;
}
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 93px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  flex-shrink: 0;
}
.topbar h1 {
  font-size: 20px;
  letter-spacing: -0.4px;
  font-weight: 600;
  margin: 7px 0 0;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pilot {
  font-size: 10px;
  color: #9a8550;
  background: #faf6e9;
  border-radius: 20px;
  padding: 6px 12px;
}
.icon-button {
  font-size: 20px;
  color: #9995a4;
  width: 30px;
  height: 30px;
  border-radius: 5px;
}
.icon-button:hover {
  background: #f1eef8;
}
.content {
  display: flex;
  flex: 1;
  min-height: 0;
}
.conversation-list {
  width: 340px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  background: #fdfdfd;
}
.search-wrap {
  position: relative;
  margin: 19px 18px 15px;
}
.search-wrap input {
  width: 100%;
  border: 1px solid #eeedf2;
  background: #f7f7f9;
  font-size: 11px;
  padding: 10px 30px 10px 12px;
}
.search-wrap span {
  position: absolute;
  right: 12px;
  top: 5px;
  font-size: 22px;
  color: #a6a0b2;
}
.tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  padding: 0 20px;
}
.tabs button {
  font-size: 11px;
  color: #9994a1;
  padding: 0 0 13px;
  border-bottom: 2px solid transparent;
}
.tabs button.active {
  color: #7a64b3;
  border-bottom-color: #8971ce;
  font-weight: 600;
}
.list-caption {
  display: flex;
  justify-content: space-between;
  padding: 15px 19px 10px;
  font-size: 9px;
  color: #aaa4b0;
}
.list {
  overflow: auto;
  flex: 1;
}
.conversation {
  width: 100%;
  text-align: left;
  display: block;
  padding: 19px 20px;
  border-bottom: 1px solid #f0eef3;
  border-left: 3px solid transparent;
  position: relative;
}
.conversation:hover {
  background: #f9f7fd;
}
.conversation.selected {
  background: #f3f0fa;
  border-left-color: #8c72cd;
}
.row-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #958d9f;
  font-size: 9px;
  margin-bottom: 8px;
}
.conversation h3 {
  font-size: 12px;
  font-weight: 550;
  margin: 0 0 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conversation.unread h3 {
  font-weight: 700;
}
.conversation.unread:after {
  content: "";
  position: absolute;
  right: 10px;
  top: 44px;
  width: 5px;
  height: 5px;
  background: #9475d9;
  border-radius: 50%;
}
.conversation p {
  font-size: 11px;
  color: #99929f;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.chips {
  display: flex;
  gap: 5px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.chip {
  font-size: 9px;
  color: #8b7ba8;
  background: #ece7f5;
  padding: 4px 7px;
  border-radius: 4px;
}
.load-more {
  font-size: 11px;
  padding: 12px;
  color: var(--purple);
  border-top: 1px solid var(--line);
}
.thread {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: white;
}
.empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  text-align: center;
  padding: 30px;
  color: #a5a0ae;
}
.empty h2 {
  color: #777080;
  font-size: 18px;
  font-weight: 500;
}
.empty p {
  font-size: 12px;
}
.empty-icon {
  font-size: 50px;
  color: #b4a1d5;
  background: #f7f4fc;
  width: 90px;
  height: 90px;
  border-radius: 28px;
  display: grid;
  place-items: center;
}
.thread-head {
  padding: 23px 27px 16px;
  border-bottom: 1px solid var(--line);
}
.thread-head h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 15px;
  letter-spacing: -0.3px;
}
.thread-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.thread-toolbar select,
.thread-toolbar button {
  font-size: 10px;
  padding: 7px 8px;
  border: 1px solid #e6e2ed;
  border-radius: 6px;
  background: #fff;
  color: #84798f;
  max-width: 180px;
}
.thread-toolbar button.archive {
  margin-left: auto;
  background: #f2edf9;
  border-color: #f2edf9;
  color: #8464bb;
}
.thread-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 10px;
  color: #9c95a5;
  margin-top: 14px;
}
.timeline {
  overflow: auto;
  flex: 1;
  padding: 24px 28px;
  min-height: 80px;
  background: linear-gradient(#fff, #fdfcfe);
}
.event {
  text-align: center;
  color: #aaa2b1;
  font-size: 9px;
  margin: 15px 0;
  line-height: 1.6;
}
.entry {
  margin: 0 0 20px;
  display: flex;
  gap: 12px;
}
.entry-card {
  flex: 1;
  min-width: 0;
}
.entry-top {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 11px;
  margin-bottom: 9px;
}
.entry-top strong {
  font-weight: 600;
}
.entry-top time {
  font-size: 9px;
  color: #aaa2b2;
  margin-left: auto;
}
.entry-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.75;
  margin: 0;
  padding: 15px 18px;
  border: 1px solid #ede5ce;
  border-radius: 0 10px 10px 10px;
  background: var(--note);
  color: #73694e;
}
.entry.message .entry-body {
  background: #fff;
  border-color: #e8e6ed;
  color: #655f6f;
}
.entry.message .avatar {
  background: #e9f0ed;
  color: #70947f;
}
.composer-area {
  padding: 16px 26px 22px;
  border-top: 1px solid var(--line);
}
.composer {
  border: 1px solid #e6dfcc;
  border-radius: 10px;
  background: #fffcf4;
  overflow: hidden;
}
.composer-top {
  font-size: 10px;
  color: #9c8a5e;
  padding: 11px 14px;
  border-bottom: 1px solid #f0e9d7;
  display: flex;
  justify-content: space-between;
}
.composer textarea {
  width: 100%;
  resize: vertical;
  min-height: 85px;
  max-height: 240px;
  border: 0;
  background: transparent;
  font-size: 12px;
  padding: 14px;
  outline: none;
}
.composer-bottom {
  padding: 0 12px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.composer-bottom small {
  font-size: 9px;
  color: #b0a68d;
}
.composer .primary {
  font-size: 11px;
  padding: 8px 12px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  padding: 13px 20px;
  background: #34303e;
  color: white;
  border-radius: 10px;
  box-shadow: 0 5px 25px #0002;
  max-width: 90vw;
  font-size: 12px;
}
dialog {
  border: 1px solid #e5dfef;
  border-radius: 16px;
  padding: 24px;
  width: min(520px, 92vw);
  max-height: 85vh;
  box-shadow: 0 20px 80px #21123625;
}
dialog::backdrop {
  background: #20182b55;
  backdrop-filter: blur(3px);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.modal-header h2 {
  font-size: 19px;
  margin: 0;
}
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-stack label {
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.form-stack textarea {
  min-height: 130px;
}
.form-stack .hint {
  font-size: 11px;
  color: #9b90a5;
  margin: 0;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  font-size: 12px;
}
.check-row input {
  accent-color: var(--purple);
}
.status-box {
  padding: 14px;
  background: #f7f5fb;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.8;
  margin-bottom: 15px;
}
.danger {
  color: #b2505b;
}
.back-list {
  display: none;
}
@media (min-width: 1550px) {
  .conversation-list {
    width: 390px;
  }
  .sidebar {
    width: 250px;
  }
  .timeline {
    padding-left: 45px;
    padding-right: 45px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 195px;
  }
  .conversation-list {
    width: 285px;
  }
  .topbar {
    padding: 0 20px;
  }
  .thread-head {
    padding: 20px;
  }
  .timeline {
    padding: 20px;
  }
  .composer-area {
    padding: 15px;
  }
}
@media (max-width: 900px) {
  .rail {
    width: 52px;
  }
  .sidebar {
    width: 175px;
  }
  .conversation-list {
    width: 265px;
  }
  .thread-head h2 {
    font-size: 15px;
  }
  .topbar h1 {
    font-size: 17px;
  }
  .thread-toolbar select {
    max-width: 130px;
  }
  .composer-bottom small {
    display: none;
  }
}
@media (max-width: 750px) {
  .sidebar {
    width: 165px;
  }
  .rail {
    display: none;
  }
  .conversation-list {
    width: 100%;
  }
  .thread {
    display: none;
  }
  .main.show-thread .conversation-list {
    display: none;
  }
  .main.show-thread .thread {
    display: flex;
  }
  .back-list {
    display: inline-block;
    font-size: 11px;
    color: var(--purple);
    margin-bottom: 12px;
  }
  .topbar {
    height: 75px;
    padding: 0 15px;
  }
  .topbar .eyebrow {
    display: none;
  }
  .topbar h1 {
    font-size: 15px;
  }
  .top-actions {
    gap: 3px;
  }
  .pilot {
    display: none;
  }
  .login-page {
    display: block;
    padding: 35px 0;
  }
  .login-brand {
    display: none;
  }
  .login-card {
    margin: 15vh auto;
    width: 80%;
  }
}
@media (max-width: 450px) {
  .sidebar {
    width: 125px;
    padding: 20px 7px;
  }
  .workspace-name {
    font-size: 11px;
  }
  .compose {
    font-size: 10px;
    padding: 8px;
  }
  .nav-item {
    font-size: 10px;
    gap: 3px;
    padding: 9px 5px;
  }
  .nav-symbol {
    font-size: 13px;
  }
  .sidebar-footer {
    font-size: 9px;
    padding: 12px 3px;
  }
  .sidebar-footer p {
    font-size: 9px;
  }
  .thread-head {
    padding: 15px;
  }
  .timeline {
    padding: 15px;
  }
  .entry {
    gap: 7px;
  }
  .entry .avatar {
    display: none;
  }
  .composer-area {
    padding: 10px;
  }
}

.mobile-account { display: none; }
@media(max-width:750px) { .mobile-account { display:inline-flex; } }
