﻿:root {
  color-scheme: dark;
  --bg: black;
  --card: #161b22;
  --panel: rgba(22, 27, 34, 0.78);
  --panel-strong: rgba(22, 27, 34, 0.94);
  --text: #f8fafc;
  --muted: white;
  --quiet: white;
  --border: #3A3A3A;
  --border-strong: #3A3A3A;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background: black;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
textarea:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--border);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  margin-bottom: 0;
  color: var(--text);
  letter-spacing: 0;
}

p {
  color: var(--text);
  line-height: 1.6;
}

.screen {
  display: grid;
  min-height: 100vh;
  padding: 1rem;
  place-items: center;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(20rem, 34rem) minmax(20rem, 28rem);
  gap: 1px;
  width: min(100%, 70rem);
  min-height: min(42rem, calc(100vh - 2rem));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.reset-layout {
  min-height: 32rem;
  margin: min(12vh, 5rem) auto;
}


.auth-art {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 34rem;
  overflow: hidden;
  padding: 2rem;
}

.auth-art.compact {
  min-height: 28rem;
}

.brand-lockup,
.profile-panel,
.section-heading,
.conversation-header,
.header-actions,
.composer,
.rail-actions,
.auth-tabs,
.conversation-row {
  display: flex;
  align-items: center;
}

.brand-lockup,
.profile-panel {
  gap: 0.875rem;
}

.brand-mark img {
  width: 50px;
}


.auth-copy {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
}

.auth-copy h2 {
  margin-bottom: 0.8rem;
  font-size: 2.75rem;
  line-height: 1.04;
}

.status-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 0;
}


.auth-card {
  display: grid;
  align-content: center;
  gap: 1.1rem;
  padding: 2rem;
}

.auth-tabs {
  min-height: 3rem;
  gap: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  padding: 0.25rem;
}

.auth-tabs button,
.rail-actions button {
  flex: 1;
  min-height: 2.35rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
}

.auth-tabs button.is-active,
.rail-actions button.is-active {
  background: #2F2F2F;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}

.auth-form {
  display: none;
  gap: 1rem;
}

.auth-form.is-active {
  display: grid;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.field-group {
  display: grid;
  gap: 0.45rem;
}

label {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--border);
  color: var(--text);
}

input {
  min-height: 3rem;
  border-radius: 14px;
  padding: 0 0.9rem;
}

textarea {
  resize: none;
}

.primary-action,
.secondary-action,
.text-action,
.text-link {
  min-height: 3rem;
  border-radius: 14px;
}

.primary-action {
  border: 1px solid #3A3A3A;
  background: var(--text);
  color: black;
}

.secondary-action {
  position: absolute;
  bottom: 20px;
  width: 100px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg);
  color: var(--text);
}

.pos-avatar{
  position: absolute;
  bottom: 20px;
  left: 265px;
}

.text-action,
.text-link {
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--text);
  text-decoration: none;
}

.notice {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
  color: #dbeafe;
  padding: 0.85rem;
  line-height: 1.5;
}

.notice.is-error {
  border-color: var(--border);
  background: var(--bg);
  color: var(--text);
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(18rem, 22rem) minmax(0, 1fr);
  gap: 1px;
  width: min(100%, 96rem);
  min-height: calc(100vh - 2rem);
  margin: 1rem auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.sidebar,
.conversation,
.details {
  min-width: 0;
  background: var(--bg);
}

.sidebar,
.details {
  padding: 1.25rem;
}

.profile-panel {
  min-height: 4.8rem;
  padding-bottom: 1rem;
}

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

.profile-copy h1,
.profile-copy p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.p-padd {
  padding-bottom: 10px;
}

.profile-copy p:not(.eyebrow) {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
}

.avatar {
  display: grid;
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-weight: 700;
}

.avatar.small {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 0.875rem;
}

.avatar.large {
  width: 4.75rem;
  height: 4.75rem;
  margin: 0 auto 1rem;
  font-size: 1.35rem;
}

.avatar.muted {
  background: var(--bg);
}

.search-field input {
  min-height: 2.75rem;
  border-radius: 999px;
  padding: 0 1rem;
}

.rail-actions {
  gap: 0.3rem;
  margin: 1rem 0 0;
}

.stack {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.section-heading {
  justify-content: space-between;
  gap: 1rem;
}

.f-list{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: start;
  margin-bottom: 20px;
}

.f-element{
  display: flex;
  justify-content: center;
  padding: 8px 0px;
  align-items: center;
  font-weight: normal;
}

.f-element span{
  padding-right: 10px;
}

.unread-badge {
  display: inline-grid;
  min-width: 2rem;
  min-height: 1.55rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
}

.conversation-row {
  width: 100%;
  gap: 0.75rem;
  min-height: 4.65rem;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  color: inherit;
  padding: 0.8rem;
  text-align: left;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.conversation-row:hover,
.conversation-row.is-active {
  border-color: var(--border);
  background: var(--bg);
}

.conversation-row:hover {
  transform: translateY(-1px);
}

.row-copy {
  display: grid;
  min-width: 0;
  gap: 0.22rem;
}

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

.row-copy span {
  color: var(--text);
  font-size: 0.85rem;
}

.conversation {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: inherit;
}

.conversation-header {
  justify-content: space-between;
  min-height: 5.5rem;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 1.25rem;
}

.conversation-title {
  min-width: 0;
  margin-right: auto;
}

.conversation-title h2,
.conversation-title p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-title p:not(.eyebrow) {
  margin: 0.2rem 0 0;
  font-size: 0.86rem;
}

.plus-icon span{
  color: var(--text);
  font-size: 30px;
}

.icon-button,
.composer button {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-weight: 700;
}

.mobile-menu,
.mobile-close {
  display: none;
}

.mobile-menu span:nth-child(1) {
  position: absolute;
  top: 10px;
  left: 8px;
  width: 25px;
  height: 3px;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-menu span:nth-child(2) {
  position: absolute;
  top: 23px;
  left: 8px;
  width: 18px;
  height: 3px;
  background: #ffffff;
  border-radius: 999px;
}

.message-list {
  display: grid;
  align-content: center;
  min-height: 0;
  overflow-y: auto;
  padding: 1.5rem;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 0.85rem;
  width: min(100%, 28rem);
  margin: auto;
  text-align: center;
}

.empty-state h3 {
  font-size: 1.35rem;
}


.composer {
  gap: 0.65rem;
  min-height: 5.5rem;
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem;
}

.composer textarea {
  flex: 1;
  min-height: 2.75rem;
  max-height: 8rem;
  border-radius: 22px;
  padding: 0.78rem 1rem;
}

.send-button {
  display: flex;
  align-items: center;
  justify-content: center;
  border-color: var(--border) !important;
  background: white !important;
  color: black !important;
}

.send-button span{
  font-size: 32px;
}


.notification-button {
  position: relative;
}

.unread-badge.mini {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  font-size: 0.68rem;
}

.notification-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.notification-item {
  display: grid;
  gap: 0.25rem;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--bg);
  color: var(--text);
  padding: 0.75rem;
  text-align: left;
  cursor: pointer;
}

.notification-item.is-unread {
  border-color: var(--border);
  background: var(--bg);
}

.notification-item strong,
.notification-item span,
.muted-copy {
  overflow-wrap: anywhere;
}

.notification-item span,
.muted-copy {
  color: var(--text);
  font-size: 0.82rem;
}

.attachment-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  border-top: 1px solid var(--border);
  padding: 0.8rem 1.25rem 0;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  max-width: min(100%, 22rem);
  gap: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  padding: 0.45rem 0.55rem 0.45rem 0.8rem;
  font-size: 0.82rem;
}

.attachment-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-chip button {
  display: grid;
  width: 1.45rem;
  height: 1.45rem;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

.attachment-chip.is-error {
  border-color: var(--border);
  color: var(--text);
}

.message-attachments {
  display: grid;
  gap: 0.55rem;
}

.message-attachment {
  display: grid;
  gap: 0.45rem;
  min-width: min(18rem, 100%);
}

.message-attachment img {
  display: block;
  width: min(24rem, 100%);
  max-height: 18rem;
  border-radius: 0.75rem;
  object-fit: cover;
}

.message-attachment audio {
  width: min(22rem, 100%);
}

.message-attachment a {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  padding: 0.45rem 0.7rem;
  font-size: 0.8rem;
  text-decoration: none;
}

.message-bubble.is-mine .message-attachment a {
  border-color: var(--border);
  background: var(--bg);
}


.error-page {
  display: grid;
  min-height: 100vh;
  place-content: center;
  padding: 2rem;
  text-align: center;
}

.error-page h1 {
  margin-bottom: 0.75rem;
  font-size: 4rem;
}

.error-page a {
  justify-self: center;
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  padding: 0.8rem 1rem;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.4rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 74rem) {
  .app-shell {
    grid-template-columns: minmax(16rem, 19rem) minmax(0, 1fr);
  }

  .details {
    position: fixed;
    top: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 4;
    width: min(22rem, calc(100vw - 2rem));
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
    transform: translateX(calc(100% + 2rem));
    transition: transform 180ms ease;
  }

  .details.is-open {
    transform: translateX(0);
  }
}

@media (max-width: 52rem) {
  body {
    background: var(--bg);
  }

  .screen {
    padding: 0;
  }

  .auth-layout,
  .reset-layout {
    grid-template-columns: 1fr;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .auth-art {
    min-height: 20rem;
    padding: 1.25rem;
  }

  .auth-copy h2 {
    font-size: 2rem;
  }

  .auth-card {
    align-content: start;
    padding: 1.25rem;
  }

  .status-strip,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
    min-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 5;
    width: min(21rem, 88vw);
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

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

  .mobile-menu,
  .mobile-close {
    display: grid;
  }

  .mobile-close {
    margin-left: auto;
  }

  .conversation-header,
  .composer {
    padding-inline: 1rem;
  }

  .message-list {
    padding: 1rem;
  }

  .composer {
    gap: 0.45rem;
  }

  .composer .icon-button:nth-child(3) {
    display: none;
  }
}

@media (max-width: 36rem) {
  .error-page h1 {
    font-size: 2.5rem;
  }
}


.message-stack {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 100%;
}

.message-bubble {
  display: grid;
  gap: 0.35rem;
  width: fit-content;
  max-width: min(38rem, 86%);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  padding: 0.85rem 0.95rem 0.65rem;
  animation: rise 180ms ease both;
}

.message-bubble.is-mine {
  align-self: flex-end;
  border-color: var(--border);
  background: var(--border);
}

.message-bubble p {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
}

.message-bubble:not(.is-mine) .message-meta {
  color: var(--text);
}

.message-reply {
  border-left: 2px solid var(--border);
  color: var(--text);
  font-size: 0.82rem;
  padding-left: 0.6rem;
}

.typing-line {
  align-self: end;
  margin: 0 1.5rem 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  min-height: 1.3rem;
}

.directory-row {
  cursor: default;
}

.row-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.35rem;
  margin-left: auto;
}

.mini-action {
  min-height: 1.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0 0.6rem;
}

.mini-action:hover {
  border-color: var(--border);
  background: var(--bg);
}