*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  background: #f7f6f2;
  color: #1a1a18;
  line-height: 1.65;
  font-size: 15px;
}

/* ── Layout ── */
.app-shell {
  display: flex;
  min-height: calc(100vh - 52px - 44px);
}

.page-content {
  flex: 1;
  padding: 2rem 2.5rem;
}

/* ── Navbar ── */
.navbar {
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  background: #fff;
  border-bottom: 1px solid #e8e7e3;
  gap: 1rem;
}

.navbar-brand {
  font-weight: 600;
  text-decoration: none;
  color: inherit;
  font-size: 1.05rem;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.navbar-link {
  text-decoration: none;
  color: #444;
  font-size: 0.9rem;
}

.navbar-user,
.notif-badge {
  font-size: 0.9rem;
  color: #666;
}

.btn-text {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: #444;
  padding: 0;
}

.inline-form {
  display: inline;
}

/* ── Sidebar ── */
.sidebar {
  width: 190px;
  padding: 1.25rem 0.75rem;
  border-right: 1px solid #e8e7e3;
  background: #fff;
  flex-shrink: 0;
}

.sidebar-link {
  display: block;
  padding: 0.45rem 0.75rem;
  border-radius: 7px;
  text-decoration: none;
  color: #555;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: #eeede8;
  color: #1a1a18;
  font-weight: 500;
}

/* ── Footer ── */
.footer {
  padding: 0.6rem 1.5rem;
  border-top: 1px solid #e8e7e3;
  font-size: 0.8rem;
  color: #999;
  background: #fff;
  text-align: center;
}

/* ── Auth layout ── */
.auth-body {
  background: #f0efe9;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.auth-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 1rem;
}

.auth-card {
  background: #fff;
  border-radius: 12px;
  padding: 2.25rem;
  border: 1px solid #e5e4df;
}

.auth-card h1 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.auth-switch {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  text-align: center;
  color: #666;
}

/* ── Forms ── */
.form-group {
  margin-bottom: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

.form-group label {
  display: block;
  font-size: 0.825rem;
  font-weight: 500;
  margin-bottom: 4px;
  color: #444;
}

.form-group input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 7px;
  font-size: 0.9rem;
  background: #fafaf8;
  transition: border-color 0.15s;
}

.form-group input:focus {
  outline: none;
  border-color: #534ab7;
  box-shadow: 0 0 0 3px rgba(83, 74, 183, 0.12);
}

.alert {
  border-radius: 7px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.alert-error {
  background: #fcebeb;
  color: #a32d2d;
  border: 1px solid #f7c1c1;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.1rem;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.4;
  transition:
    background 0.12s,
    border-color 0.12s;
}

.btn-primary {
  background: #534ab7;
  color: #fff;
  border-color: #534ab7;
}

.btn-green {
  background: #53d006;
  color: #fff;
  border-color: #53d006;
}

.btn-green:hover {
  background: #50c508;
  border-color: #50c508;
  transform: translateY(2px);
}

.btn-primary:hover {
  background: #2563EB;
  border-color: #2563EB;
}

.btn-outline {
  background: #fff;
  color: #333;
  border-color: #ccc;
}

.btn-outline:hover {
  border-color: #999;
}

.btn-liked {
  background: #eeedfe;
  color: #3c3489;
  border-color: #afa9ec;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.825rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-pending {
  background: #F59E0B;
  color: #fff;
  border-color: #F59E0B;
}

.btn-unfollow {
  background: #6B7280;
  color: #fff;
  border-color: #6B7280;
}

/* ── Hero ── */
.hero {
  padding: 4rem 0 3rem;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.hero-sub {
  color: #666;
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── Post list ── */
.feed-header h1 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.post-card {
  background: #fff;
  border: 1px solid #e8e7e3;
  border-radius: 10px;
  padding: 1.25rem;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.post-author {
  font-weight: 500;
  font-size: 0.875rem;
}

.post-time {
  color: #999;
  font-size: 0.8rem;
  margin-left: auto;
}

.post-excerpt {
  color: #444;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.post-card-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.post-stat {
  font-size: 0.825rem;
  color: #888;
}

/* ── Post detail ── */
.post-detail {
  background: #fff;
  border: 1px solid #e8e7e3;
  border-radius: 10px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.post-detail-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.post-body {
  font-size: 1rem;
  line-height: 1.8;
  white-space: pre-wrap;
}

.post-actions {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #f0efeb;
}

/* ── Comments ── */
.comments-preview,
.comments-section {
  margin-top: 1.5rem;
}

.comments-section h2,
.comments-preview h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.comment-form {
  margin-bottom: 1.5rem;
}

.comment-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 7px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 0.5rem;
  background: #fafaf8;
}

.comment-form textarea:focus {
  outline: none;
  border-color: #534ab7;
  box-shadow: 0 0 0 3px rgba(83, 74, 183, 0.12);
}

.comment {
  background: #fafaf8;
  border: 1px solid #eeecea;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.comment-author {
  font-weight: 500;
  font-size: 0.875rem;
}

.comment time {
  font-size: 0.8rem;
  color: #aaa;
}

.comment p {
  font-size: 0.9rem;
  color: #333;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.page-info {
  font-size: 0.875rem;
  color: #666;
}

/* ── Profile ── */

.profile-header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.profile-info h1 {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.profile-bio {
  color: #555;
  font-size: 0.9rem;
}

.profile-actions {
  margin-top: 1.25rem;
}

.profile-lock {
  display: flex;
  height: 50vh;
  width: 100%;
  justify-content: center;
  align-items: center;
  color: #999;
}

/* ── Avatars ── */
.avatar-sm,
.avatar-xl {
  border-radius: 50%;
  object-fit: cover;
}

.avatar-sm {
  width: 36px;
  height: 36px;
}

.avatar-xl {
  width: 80px;
  height: 80px;
}

.avatar-placeholder {
  background: #534ab7;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.avatar-placeholder.avatar-sm {
  font-size: 0.85rem;
}

.avatar-placeholder.avatar-xl {
  font-size: 1.75rem;
}

/* ── Empty state ── */
.empty {
  color: #999;
  padding: 2rem 0;
  font-size: 0.9rem;
}

/* ── Alerts ── */
.alert {
  border-radius: 8px;
  padding: 0.65rem 1rem;
  margin-bottom: 1.1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.alert-success {
  background: #eaf3de;
  color: #27500a;
  border: 1px solid #c0dd97;
}

.alert-error {
  background: #fcebeb;
  color: #791f1f;
  border: 1px solid #f7c1c1;
}

/* ── Feed header ── */
.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

/* ── Profile create card ── */
.profile-create-card {
  background: #fff;
  border: 1px dashed #ccc;
  border-radius: 12px;
  padding: 2rem;
  max-width: 480px;
}

.profile-create-card h2 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.profile-create-card p {
  color: #666;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

/* ── Profile section block ── */
.profile-section {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eeecea;
}

/* ── Inline comment edit active border ── */
.comment:has(form) {
  border-color: #afa9ec;
}

#post-content,
#bio {
  width: 100%;
  padding: 2px;
}

/* ── Search page ── */
.search-page h1 {
  margin-bottom: 1.25rem;
}

.search-form {
  margin-bottom: 1.5rem;
}

.search-input-wrap {
  display: flex;
  gap: 0.6rem;
  max-width: 520px;
}

.search-input {
  flex: 1;
  padding: 0.5rem 0.85rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
}

.search-input:focus {
  outline: none;
  border-color: #534ab7;
  box-shadow: 0 0 0 3px rgba(83, 74, 183, 0.12);
}

.search-count {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 1rem;
}

.search-empty {
  padding: 2.5rem 0;
  color: #888;
  font-size: 0.9rem;
}

.user-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 10px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: #fff;
  border: 1px solid #e8e7e3;
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.user-card:hover {
  border-color: #b0b0a8;
}

.user-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.user-card-name {
  font-weight: 500;
  font-size: 0.925rem;
}

.user-card-bio {
  font-size: 0.825rem;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
}

a {
  text-decoration: none;
  color: inherit;
}

.p-info {
  margin-top: 15px;
  font-size: large;
  width: fit-content;
  text-align: center;
}

.profile-page {
  padding: 0 20px;
}

.p-image {
  height: 125px;
  width: 125px;
}

.p-image img,
.p-image div {
  height: 100%;
  width: 100%;
}

.profile-posts {
  margin-top: 20px;
  display: flex;
  width: 100%;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-posts .post-card {
  width: 24%;
}

.stats {
  width: 70%;
  display: flex;
  justify-content: space-around;
}

.stats div {
  width: 45%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.profile-top {
  display: flex;
  justify-content: space-around;
}

.profile-top .count {
  font-size: 4rem;
  font-weight: 700;
}

.profile-top .count-text {
  font-size: 2rem;
}

.img-info {
  width: 25%;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
}

.img-info .btn {
  font-size: large;
  width: fit-content;
}

.btn-danger {
  background-color: #c92934;
  color: white;
}

.btn-danger:hover {
  background: #b81d27;
  border-color: #b81d27;
  transform: translateY(2px);
}

.stat-btn {
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  z-index: 9999;
}

.modal-card {
  width: min(520px, 92vw);
  max-height: 80vh;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e4df;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #eee;
}

.modal-close {
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-body {
  padding: 0.75rem 1rem 1rem;
}

.modal-list {
  display: grid;
  gap: 0.5rem;
}

.modal-user-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}

.modal-user-row:hover {
  background: #f7f7f7;
}

/* === Design Refresh Overrides === */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --text: #121826;
  --muted: #5b6475;
  --line: #dde1e7;
  --primary: #1f6feb;
  --primary-hover: #1259c3;
  --danger: #d13a49;
  --radius: 12px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
}

body {
  background:
    radial-gradient(1200px 400px at 0% -10%,
      rgba(31, 111, 235, 0.08),
      transparent),
    radial-gradient(800px 300px at 100% 0%,
      rgba(17, 191, 161, 0.06),
      transparent),
    var(--bg);
  color: var(--text);
  font-family: 'Segoe UI Variable', 'Avenir Next', 'Trebuchet MS', sans-serif;
}

.page-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.75rem 2rem;
}

.navbar,
.sidebar,
.footer {
  background: var(--surface);
  border-color: var(--line);
}

.navbar {
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.sidebar-link {
  border: 1px solid transparent;
}

.sidebar-link:hover,
.sidebar-link.active {
  border-color: var(--line);
  background: var(--surface-soft);
}

.btn {
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-outline {
  border-color: #c9ced8;
  background: #fff;
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
}

.post-card,
.post-detail,
.profile-create-card,
.auth-card,
.user-card,
.comment {
  border-radius: var(--radius);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.post-card,
.post-detail,
.auth-card,
.user-card {
  background: var(--surface);
}

.post-card {
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.post-author {
  font-weight: 700;
}

.post-time,
.post-stat,
.page-info,
.empty,
.search-count {
  color: var(--muted);
}

.form-group input,
.comment-form textarea,
.search-input,
#post-content,
#bio {
  border: 1px solid #cfd6e0;
  border-radius: 10px;
  background: #fff;
  padding: 0.6rem 0.75rem;
}

.form-group input:focus,
.comment-form textarea:focus,
.search-input:focus,
#post-content:focus,
#bio:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.12);
}

.avatar-placeholder {
  background: linear-gradient(135deg, #1959b8, #1f6feb 60%, #11bfa1);
}

.profile-top .count {
  font-size: 3rem;
  line-height: 1;
}

.profile-top .count-text {
  font-size: 1.2rem;
  color: var(--muted);
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-backdrop {
  backdrop-filter: blur(2px);
}

.modal-card {
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
}

.modal-user-row {
  border: 1px solid transparent;
}

.modal-user-row:hover {
  border-color: var(--line);
  background: var(--surface-soft);
}

.notification-page .user-card {
  align-items: center;
}

.notification-msg {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

@media (max-width: 1024px) {
  .profile-posts .post-card {
    width: 48%;
  }

  .profile-top {
    gap: 1rem;
  }

  .stats {
    width: 100%;
  }
}

@media (max-width: 820px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: 0;
    justify-content: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.8rem;
  }

  .sidebar-link {
    margin-bottom: 0;
  }

  .page-content {
    padding: 1rem;
  }

  .profile-top {
    flex-direction: column;
    align-items: stretch;
  }

  .img-info {
    width: 100%;
  }

  .profile-posts .post-card {
    width: 100%;
  }

  .search-input-wrap {
    flex-direction: column;
    max-width: 100%;
  }
}

.modal-backdrop[hidden] {
  display: none !important;
}

.notification-page .user-card {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.notification-page .user-card .users-data {
  width: 40%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-page .user-card .actions {
  width: 40%;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.notifications {
  margin-top: 40px;
}

.notification-page .user-list * {
  font-size: large;
}

.post-media {
  margin-top: 15px;
}

#editForm {
  width: 100%;
}

.edit-profile {
  width: 100%;
  display: flex;
  justify-content: center;
}

.notification-msg {
  display: flex;
  gap: 5px;
}

.admin-badge {
  background: #3a8ad1;
  color: white;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 15px;
}

.admin-footer {
  justify-content: space-between;
}

.admin {
  background: #99e8f8;
  color: #1a1a18;
  line-height: 1.65;
  font-size: 15px;
}

.mb-1 {
  margin-bottom: 1rem;
}

.mt-06 {
  margin-top: 0.6rem;
}

.w-full {
  width: 100%;
}

.text-left {
  text-align: left;
}

.text-strong {
  font-weight: 500;
}

.text-danger {
  color: #a32d2d;
}

.text-muted-sm {
  font-size: 0.825rem;
  color: #666;
}

.text-muted {
  color: #666;
}

.text-muted-wide {
  font-size: 0.82rem;
  color: #888;
}

.text-title-sm {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.optional-note {
  color: #aaa;
  font-weight: 400;
}

.d-flex {
  display: flex;
}

.align-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-sm {
  gap: 0.6rem;
}

.gap-md {
  gap: 1rem;
}

.file-input-hidden {
  display: none;
}

.cursor-pointer {
  cursor: pointer;
}

.btn-icon-plain {
  background: none;
  border: none;
  cursor: pointer;
}

.icon-alert {
  color: rgb(253, 5, 5);
}

.icon-gap-right {
  margin-right: 2px;
}

.icon-gap-left {
  margin-left: 5px;
}

.icon-white {
  color: #fff;
}

.post-card-spaced,
.chat-panel-intro {
  margin-bottom: 1rem;
}

.post-media-spaced {
  margin-bottom: 1rem;
}

.media-video {
  max-height: 420px;
  border-radius: 10px;
}

.media-image-contain {
  max-height: 420px;
  object-fit: contain;
  border-radius: 10px;
}

.media-video-full {
  width: 100%;
  max-height: 420px;
  border-radius: 10px;
}

.media-image-cover {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 10px;
}

.post-time-secondary {
  margin-left: 8px;
  color: #888;
  font-size: 0.82rem;
}

.post-form-panel {
  display: none;
  background: #fff;
  border: 1px solid #e5e4df;
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.post-form-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

.inline-error-text {
  color: #a32d2d;
  font-size: 0.82rem;
  margin-top: 0.4rem;
  display: none;
}

.notif-submit {
  all: unset;
  width: 100%;
  display: block;
  cursor: pointer;
}

.notif-row-full {
  width: 100%;
}

.notif-users-data-full {
  width: 100%;
}

.notif-message-row {
  flex-direction: row;
}

.profile-bio-emphasis {
  font-weight: 500;
}

.edit-link-block {
  display: block;
}

.edit-form-hidden {
  display: none;
}

.avatar-picker-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.avatar-picker-label {
  cursor: pointer;
}

.avatar-remove-btn {
  color: #a32d2d;
  border-color: #f09595;
}

.admin-disabled-meta {
  color: #888;
  font-size: 0.82rem;
}

.profile-faded {
  opacity: 0.55;
  filter: grayscale(1);
}

.follow-request-title {
  width: 100%;
}

.modal-pagination-spaced {
  margin-top: 1rem;
}

.chat-room {
  max-width: 960px;
  margin: 0 auto;
}

.chat-room-card {
  background: #fff;
  border: 1px solid #e5e4df;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(26, 26, 24, 0.08);
}

.chat-room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #eceae3;
  background: linear-gradient(135deg, #f8f7f2 0%, #88e0f5 100%);
}

.chat-room-ident {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.chat-room-ident-copy,
.chat-room-sidebar-copy,
.chat-room-user-copy {
  min-width: 0;
}

.chat-avatar-lg,
.chat-avatar-md,
.chat-avatar-sm {
  border-radius: 50%;
  object-fit: cover;
}

.chat-avatar-lg {
  width: 56px;
  height: 56px;
  border: 2px solid #fff;
}

.chat-avatar-md {
  width: 42px;
  height: 42px;
}

.chat-avatar-sm {
  width: 40px;
  height: 40px;
}

.chat-avatar-fallback {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
}

.chat-avatar-fallback-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #534ab7;
  font-size: 1.1rem;
}

.chat-avatar-fallback-md {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #1f2937;
}

.chat-avatar-fallback-md.chat-avatar-chat {
  background: #534ab7;
  font-size: 1.1rem;
}

.chat-avatar-fallback-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1f2937;
}

.chat-avatar-fallback-sm.chat-avatar-chat {
  background: #534ab7;
  font-size: 1.1rem;
}

.chat-room-title {
  font-size: 1.2rem;
  line-height: 1.2;
}

.chat-room-subtitle {
  margin-top: 0.2rem;
  color: #666;
  font-size: 0.9rem;
}

.chat-room-self {
  text-align: right;
  flex-shrink: 0;
}

.chat-room-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a867c;
}

.chat-room-self-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.chat-room-self-name,
.chat-message-author {
  font-weight: 600;
}

.chat-room-self-bio,
.chat-room-user-meta {
  font-size: 0.82rem;
  color: #666;
}

.chat-room-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 560px;
}

.chat-room-sidebar {
  border-right: 1px solid #eceae3;
  padding: 1.25rem;
  background: linear-gradient(214deg, #f8f7f2 0% 0%, #d9f8ff 100%);
}

.chat-room-participants {
  margin-top: 1rem;
  display: grid;
  gap: 0.85rem;
}

.chat-room-user-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #eceae3;
}

.chat-room-main {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fcfbf8 0%, #f6f4ee 100%);
}

.chat-room-main-head {
  padding: 1.2rem 1.25rem;
  border-bottom: 1px solid #eceae3;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
}

.chat-room-main-title {
  margin-top: 0.3rem;
  font-size: 1rem;
  color: #201d18;
}

.chat-thread {
  flex: 1;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: auto;
}

.chat-bubble {
  max-width: 72%;
  padding: 0.9rem 1rem;
}

.chat-bubble-me {
  align-self: flex-end;
  border-radius: 18px 18px 6px 18px;
  background: #534ab7;
  color: #fff;
  box-shadow: 0 10px 24px rgba(83, 74, 183, 0.18);
}

.chat-bubble-other {
  align-self: flex-start;
  border-radius: 18px 18px 18px 6px;
  background: #fff;
  color: #1a1a18;
  border: 1px solid #eceae3;
}

.chat-message-author {
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
}

.chat-message-content {
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-message-time {
  margin-top: 0.45rem;
  font-size: 0.74rem;
  text-align: right;
}

.chat-message-time-me {
  color: rgba(255, 255, 255, 0.78);
}

.chat-message-time-other {
  color: #7a766d;
}

.chat-empty {
  margin: auto;
  max-width: 420px;
  text-align: center;
  padding: 1.5rem;
  border: 1px dashed #d8d4cb;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.chat-empty-title {
  font-weight: 600;
  font-size: 1rem;
  color: #2a2722;
}

.chat-empty-copy {
  margin-top: 0.35rem;
  color: #6f6b63;
}

.chat-pagination {
  padding: 0 1.25rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.chat-pagination-status {
  font-size: 0.82rem;
  color: #666;
}

.chat-compose {
  padding: 1rem 1.25rem;
  border-top: 1px solid #eceae3;
  background: #fff;
  display: flex;
  gap: 0.85rem;
  align-items: flex-end;
  background: linear-gradient(188deg, #f8f7f2 0%, #caebf3 100%);
}

.chat-compose-main {
  flex: 1;
}

.chat-compose-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 0.45rem;
}

.chat-compose-input {
  width: 100%;
  resize: none;
  padding: 0.85rem 1rem;
  border: 1px solid #d9d6cf;
  border-radius: 16px;
  background: #faf9f5;
  font: inherit;
  line-height: 1.5;
}

.chat-compose-submit {
  height: fit-content;
  padding: 0.8rem 1.25rem;
}


@media (max-width: 768px) {
  .chat-room-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 560px;
  }
  .chat-room-sidebar{
    display: none;
  }
  .post-list{
    width: 90vw;
  }
  .media-image-contain{
    max-width: 100%;
  }
  .user-card-bio{
    width:65vw
  }
  .notification-page .user-card{
    width: 90vw;
  }
  .navbar-user{
    display: none;
  }
  .avatar-picker-row{
    justify-content: space-between;
  }
}