
.login-overlay[data-v-6c4016d7] {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.profile-card[data-v-6c4016d7] {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  background: white;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.login-header[data-v-6c4016d7] {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e4e8ee;
}
.login-header h2[data-v-6c4016d7] { margin: 0; font-size: 18px;
}
.close-btn[data-v-6c4016d7] {
  border: none;
  background: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
}
.close-btn[data-v-6c4016d7]:hover { color: #000;
}
.profile-body[data-v-6c4016d7] {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.profile-image-section[data-v-6c4016d7] {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.profile-image[data-v-6c4016d7] {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  background: #e0e7ff;
  border: 1px solid #e4e8ee;
}
.file-label[data-v-6c4016d7] {
  display: inline-block;
  padding: 8px 14px;
  background: #f0f2f5;
  color: #1a1a2e;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}
.file-label[data-v-6c4016d7]:hover { background: #e4e8ee;
}
.file-label input[type="file"][data-v-6c4016d7] { display: none;
}
button[data-v-6c4016d7] {
  padding: 10px 14px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}
button[data-v-6c4016d7]:disabled {
  background: #c7c9d1;
  cursor: not-allowed;
}
.profile-info[data-v-6c4016d7] {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: #f7f8fa;
  border-radius: 8px;
}
.profile-row[data-v-6c4016d7] {
  display: flex;
  gap: 10px;
  font-size: 14px;
}
.profile-row .label[data-v-6c4016d7] {
  min-width: 120px;
  color: #5f6b7a;
  font-weight: 500;
}
.profile-row .value[data-v-6c4016d7] {
  color: #1a1a2e;
  word-break: break-all;
}
.profile-footer[data-v-6c4016d7] {
  padding: 12px 20px;
  border-top: 1px solid #e4e8ee;
  display: flex;
  justify-content: flex-end;
}
.secondary-btn[data-v-6c4016d7] {
  background: #f0f2f5;
  color: #1a1a2e;
}
.secondary-btn[data-v-6c4016d7]:hover { background: #e4e8ee;
}
.info-message[data-v-6c4016d7] {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
}
.error-message[data-v-6c4016d7] {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
}
.success-message[data-v-6c4016d7] {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.app {
  display: flex;
  height: 100vh;
  height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
  background: #f0f2f5;
  color: #1a1a2e;
}

/* OVERLAY MOBILE */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 5;
  backdrop-filter: blur(2px);
}

/* SIDEBAR */
.sidebar {
  width: 300px;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-right: 1px solid #e4e8ee;
  transition: all .25s ease;
  z-index: 10;
}
.sidebar.collapsed {
  width: 0;
  min-width: 0;
  overflow: hidden;
  border-right: none;
}
.sidebar.mobile {
  position: fixed;
  left: -300px;
  top: 0;
  bottom: 0;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}
.sidebar.mobile.open {
  left: 0;
}
.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 16px 12px;
  border-bottom: 1px solid #e4e8ee;
}
.sidebar-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
}
.header-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* SHARED BUTTONS */
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  color: #5f6b7a;
  transition: background .15s, color .15s;
}
.icon-btn:hover {
  background: #f0f2f5;
  color: #1a1a2e;
}
.logout-btn {
  border: none;
  background: #f0f2f5;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: #5f6b7a;
  transition: background .15s, color .15s;
}
.logout-btn:hover {
  background: #e4e8ee;
  color: #1a1a2e;
}
.login-btn {
  border: none;
  background: #4f46e5;
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: background .15s;
}
.login-btn:hover {
  background: #4338ca;
}
.settings-menu {
  position: relative;
}
.settings-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #ffffff;
  border: 1px solid #e4e8ee;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  min-width: 160px;
  padding: 4px;
  z-index: 20;
}
.settings-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  color: #1a1a2e;
  cursor: pointer;
}
.settings-dropdown button:hover {
  background: #f0f2f5;
}

/* CONFIG (Domain + Reload) */
.config {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #e4e8ee;
  align-items: center;
}
.domain-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #e4e8ee;
  border-radius: 8px;
  font-size: 16px;
  background: #f7f8fa;
  color: #5f6b7a;
  cursor: default;
  outline: none;
}
.reload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #e4e8ee;
  background: #ffffff;
  border-radius: 8px;
  cursor: pointer;
  color: #5f6b7a;
  transition: all .2s;
  flex-shrink: 0;
}
.reload-btn:hover:not(:disabled) {
  background: #4f46e5;
  border-color: #4f46e5;
  color: white;
}
.reload-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* CONNECTION LIST */
.connection-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.connection {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s;
}
.connection:hover {
  background: #f7f8fa;
}
.connection.active {
  background: #eef2ff;
}
.conn-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #e0e7ff;
}
.conn-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e0e7ff;
  color: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
  flex-shrink: 0;
}
.conn-info {
  flex: 1;
  min-width: 0;
}
.conn-name {
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge {
  background: #ef4444;
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  flex-shrink: 0;
}

/* CHAT MAIN */
.chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #f7f8fa;
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #ffffff;
  border-bottom: 1px solid #e4e8ee;
}
.header-conn-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #e0e7ff;
}
.chat-header h2 {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.folder-btn {
  margin-left: auto;
  text-decoration: none;
  flex-shrink: 0;
}
.placeholder-title {
  color: #b0b8c9;
}

/* MESSAGES */
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.msg-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  align-items: flex-end;
}
.msg-row.me {
  flex-direction: row-reverse;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e0e7ff;
  color: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}
.bubble {
  background: linear-gradient(135deg, #e8f0fe 0%, #d4e4fc 40%, #e0ecfa 100%);
  padding: 10px 14px;
  border-radius: 14px 14px 14px 4px;
  max-width: 65%;
  box-shadow: 0 1px 3px rgba(100, 140, 200, 0.12);
  word-break: break-word;
}
.msg-row.me .bubble {
  background: linear-gradient(135deg, #ede4f7 0%, #e2d6f3 40%, #e8dcf5 100%);
  color: #2d2440;
  border-radius: 14px 14px 4px 14px;
}

/* Only partner NEW messages are clickable (acknowledge) — own NEW messages
   just show the status but can't be acknowledged by the sender. */
.msg-row.them.unread {
  cursor: pointer;
}
.msg-row.unread .bubble {
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25), 0 2px 6px rgba(0, 0, 0, 0.12);
}
.msg-row.unread .time {
  color: #6b7280;
}
.msg-row.me.unread .time {
  color: #8a7ab0;
}
.sender {
  font-size: 12px;
  font-weight: 600;
  color: #4a7cc9;
  margin-bottom: 2px;
}
.msg-row.me .sender {
  color: #7c5caa;
}
.text {
  font-size: 14px;
  line-height: 1.45;
}
.markdown :first-child { margin-top: 0;
}
.markdown :last-child { margin-bottom: 0;
}
.markdown p { margin: 0.4em 0;
}
.markdown h1, .markdown h2, .markdown h3 { margin: 0.5em 0 0.3em; font-size: 1.1em;
}
.markdown ul, .markdown ol { margin: 0.3em 0; padding-left: 1.4em;
}
.markdown li { margin: 0.15em 0;
}
.markdown code {
  background: rgba(0, 0, 0, 0.07);
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 0.9em;
}
.msg-row.me .markdown code {
  background: rgba(0, 0, 0, 0.08);
}
.markdown pre {
  background: rgba(0, 0, 0, 0.07);
  padding: 8px 10px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0.4em 0;
}
.markdown pre code {
  background: none;
  padding: 0;
}
.markdown blockquote {
  border-left: 3px solid rgba(0, 0, 0, 0.15);
  margin: 0.4em 0;
  padding: 2px 10px;
  color: inherit;
  opacity: 0.85;
}
.markdown a {
  color: #4a7cc9;
  text-decoration: underline;
}
.msg-row.me .markdown a {
  color: #7c5caa;
}
.markdown img {
  max-width: 100%;
  border-radius: 6px;
}
.markdown table {
  border-collapse: collapse;
  margin: 0.4em 0;
  font-size: 0.9em;
}
.markdown th, .markdown td {
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 4px 8px;
}
.time {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
  text-align: right;
}
.msg-row.me .time {
  color: #9a85be;
}

/* UNREAD DIVIDER */
.unread-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
}
.unread-divider::before,
.unread-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #d1d5db;
}

/* COMPOSER */
.composer {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  background: #ffffff;
  border-top: 1px solid #e4e8ee;
  align-items: flex-end;
}
.composer textarea {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #e4e8ee;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  resize: none;
  outline: none;
  background: #f7f8fa;
  transition: border-color .15s;
  line-height: 1.4;
}
.composer textarea:focus {
  border-color: #4f46e5;
  background: #ffffff;
}
.send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: #4f46e5;
  color: white;
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}
.send-btn:hover:not(:disabled) {
  background: #4338ca;
}
.send-btn:disabled {
  background: #c7c9d1;
  cursor: default;
}

/* EMPTY STATE */
.empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #b0b8c9;
}
.empty p {
  font-size: 15px;
  font-weight: 500;
}
.loading-indicator {
  text-align: center;
  padding: 16px;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 500;
}

/* MOBILE */
@media (max-width: 768px) {
.sidebar {
    width: min(300px, 85vw);
    min-width: auto;
}
.sidebar.mobile {
    left: calc(-1 * min(300px, 85vw));
}
.bubble {
    max-width: 85%;
}
.messages {
    padding: 12px;
}
.composer {
    padding: 8px 12px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
}
.chat-header {
    padding-top: max(12px, env(safe-area-inset-top));
}
}

.login-overlay[data-v-2468c53e] {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.login-header[data-v-2468c53e] {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.login-header h2[data-v-2468c53e] {
  margin: 0;
}
.close-btn[data-v-2468c53e] {
  border: none;
  background: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
}
.close-btn[data-v-2468c53e]:hover {
  color: #000;
}
.login-card[data-v-2468c53e] {
  width: min(420px, calc(100vw - 32px));
  background: white;
  padding: 24px;
  border-radius: 12px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.form[data-v-2468c53e] {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
input[data-v-2468c53e] {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  font-family: inherit;
  font-size: 16px;
}
textarea.chattext[data-v-2468c53e] {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  font-family: inherit;
  font-size: 16px;
  resize: vertical;
  line-height: 1.4;
}
.chattext-title[data-v-2468c53e] {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: -6px;
}
button[data-v-2468c53e] {
  padding: 12px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
}
button[data-v-2468c53e]:disabled {
  background: #c7c9d1;
  cursor: not-allowed;
}
.client-toggle[data-v-2468c53e] {
  display: flex;
  gap: 8px;
  align-items: center;
}
.domain-list[data-v-2468c53e] {
  max-height: 200px;
  overflow-y: auto;
  background: #f5f5f5;
  padding: 8px;
  border-radius: 6px;
}
.radio[data-v-2468c53e] {
  display: block;
  margin: 4px 0;
}
.error-message[data-v-2468c53e] {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
}
.success-message[data-v-2468c53e] {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
}
.forgot-link[data-v-2468c53e] {
  text-align: center;
  font-size: 13px;
  color: #6b7280;
  text-decoration: none;
}
.forgot-link[data-v-2468c53e]:hover {
  color: #2563eb;
  text-decoration: underline;
}

.login-overlay[data-v-2aba5150] {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.login-header[data-v-2aba5150] {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.login-header h2[data-v-2aba5150] { margin: 0;
}
.close-btn[data-v-2aba5150] {
  border: none;
  background: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
}
.close-btn[data-v-2aba5150]:hover { color: #000;
}
.login-card[data-v-2aba5150] {
  width: min(420px, calc(100vw - 32px));
  background: white;
  padding: 24px;
  border-radius: 12px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.form[data-v-2aba5150] {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
input[data-v-2aba5150] {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  font-family: inherit;
  font-size: 16px;
}
button[data-v-2aba5150] {
  padding: 12px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
}
button[data-v-2aba5150]:disabled {
  background: #c7c9d1;
  cursor: not-allowed;
}
.secondary-btn[data-v-2aba5150] {
  background: #f0f2f5;
  color: #1a1a2e;
}
.secondary-btn[data-v-2aba5150]:hover { background: #e4e8ee;
}
.info-message[data-v-2aba5150] {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
}
.error-message[data-v-2aba5150] {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
}
.success-message[data-v-2aba5150] {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
}
