/* ProChat web shell — Telegram-style dark theme */
:root {
  --pc-bg: #0e1621;
  --pc-panel: #17212b;
  --pc-panel-hover: #1e2c3a;
  --pc-border: #0f1419;
  --pc-text: #e4ecf2;
  --pc-muted: #7a8b99;
  --pc-accent: #5288c1;
  --pc-accent-hover: #6ba3e0;
  --pc-unread: #5288c1;
  --pc-rail: #0e1621;
  --pc-font: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

.pc-app,
.pc-app * {
  box-sizing: border-box;
}

.pc-app {
  position: relative;
  font-family: var(--pc-font);
  background: var(--pc-bg);
  color: var(--pc-text);
  height: 100vh;
  width: 100%;
  display: flex;
  overflow: hidden;
  margin: 0;
}

.pc-rail {
  width: 96px;
  min-width: 96px;
  background: var(--pc-rail);
  border-right: 1px solid var(--pc-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
}

.pc-rail-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: none;
  background: var(--pc-panel);
  color: var(--pc-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: background 0.15s, color 0.15s;
}

.pc-rail-btn:hover {
  background: var(--pc-panel-hover);
  color: var(--pc-accent);
}

.pc-rail-btn.pc-active {
  background: var(--pc-accent);
  color: #fff;
}

.pc-rail-spacer {
  flex: 1;
}

.pc-rail-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 6px 4px;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pc-rail-tile {
  width: 100%;
  max-width: 86px;
  border: none;
  border-radius: 12px;
  background: var(--pc-panel);
  color: var(--pc-muted);
  cursor: pointer;
  padding: 8px 4px 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: background 0.15s, color 0.15s, transform 0.1s;
  font: inherit;
}

.pc-rail-tile:hover {
  background: var(--pc-panel-hover);
  color: var(--pc-accent);
}

.pc-rail-tile:active {
  transform: scale(0.97);
}

.pc-rail-tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

.pc-rail-tile-icon svg {
  display: block;
}

.pc-rail-tile-text {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-align: center;
  max-width: 100%;
  word-break: break-word;
}

.pc-rail-tile--logout {
  color: var(--pc-muted);
}

.pc-rail-tile--logout:hover {
  color: #ffcdd2;
  background: rgba(229, 57, 53, 0.14);
}

.pc-rail-tile--logout:hover .pc-rail-tile-icon {
  color: #ffcdd2;
}

.pc-col-chats {
  width: 400px;
  min-width: 300px;
  max-width: min(480px, 42vw);
  flex-shrink: 0;
  background: var(--pc-panel);
  border-right: 1px solid var(--pc-border);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.pc-search-wrap {
  padding: 10px 12px;
  border-bottom: 1px solid var(--pc-border);
}

.pc-search {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border-radius: 8px;
  border: none;
  background: #242f3d;
  color: var(--pc-text);
  font-size: 14px;
  outline: none;
}

.pc-search-wrap {
  position: relative;
}

.pc-search-wrap::before {
  content: "⌕";
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pc-muted);
  font-size: 14px;
  pointer-events: none;
}

.pc-chat-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.pc-chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  transition: background 0.12s;
}

.pc-chat-item:hover {
  background: var(--pc-panel-hover);
}

.pc-chat-item.pc-selected {
  background: #2b5278;
}

.pc-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6ba3e0, #3d6fa8);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 18px;
  color: #fff;
  overflow: hidden;
}

.pc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pc-chat-meta {
  flex: 1;
  min-width: 0;
}

.pc-chat-title {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-chat-preview {
  font-size: 13px;
  color: var(--pc-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

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

.pc-chat-time {
  font-size: 12px;
  color: var(--pc-muted);
}

.pc-badge {
  margin-top: 4px;
  display: inline-block;
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 10px;
  background: #e53935;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(14, 22, 33, 0.45);
}

.pc-chat-item.pc-selected .pc-badge {
  background: #fff;
  color: #c62828;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.pc-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: var(--pc-bg);
  display: flex;
  flex-direction: column;
}

.pc-main-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--pc-muted);
  padding: 24px;
  text-align: center;
}

.pc-main-empty h2 {
  margin: 16px 0 8px;
  font-weight: 400;
  font-size: 20px;
  color: var(--pc-muted);
}

.pc-main-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--pc-border);
  background: var(--pc-panel);
  font-weight: 600;
}

.pc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pc-msg {
  max-width: 72%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.pc-msg.pc-me {
  align-self: flex-end;
  background: #2b5278;
  color: #e4ecf2;
}

.pc-msg:not(.pc-me) {
  align-self: flex-start;
  background: #182533;
  color: var(--pc-text);
}

.pc-msg-from {
  font-size: 11px;
  color: var(--pc-accent);
  margin-bottom: 4px;
}

.pc-msg-from--click {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pc-msg-from--click:hover {
  color: #8ec8ff;
}

.pc-msg-time {
  font-size: 11px;
  color: var(--pc-muted);
  margin-top: 4px;
}

.pc-error-banner {
  background: #5c2b2b;
  color: #ffc9c9;
  padding: 8px 12px;
  font-size: 13px;
}

.pc-hidden {
  display: none !important;
}

/* Papka ichki ro‘yxat — orqaga va nom */
.pc-folder-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--pc-border);
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.pc-folder-back {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--pc-accent);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}

.pc-folder-back:hover {
  text-decoration: underline;
}

.pc-folder-toolbar-title {
  min-width: 0;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pc-chat-footer {
  padding: 10px 12px;
  border-top: 1px solid var(--pc-border);
  font-size: 12px;
  color: var(--pc-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.pc-chat-footer a {
  color: var(--pc-accent);
  text-decoration: none;
}

.pc-chat-footer a:hover {
  text-decoration: underline;
}

.pc-footer-hint {
  color: var(--pc-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Sidebar rejimlari (inbox / global search / papkalar) */
.pc-sidebar-mode {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.pc-sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  border-bottom: 1px solid var(--pc-border);
}

.pc-sidebar-title-row .pc-sidebar-title {
  padding: 0;
  border-bottom: none;
  flex: 1;
  min-width: 0;
}

.pc-sidebar-title {
  padding: 12px 14px;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1px solid var(--pc-border);
  color: var(--pc-text);
}

.pc-folder-add-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--pc-border);
  background: var(--pc-panel-hover);
  color: var(--pc-accent);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pc-folder-add-btn:hover {
  background: var(--pc-accent);
  color: #fff;
  border-color: var(--pc-accent);
}

.pc-modal-scroll-list {
  max-height: min(52vh, 420px);
  overflow-y: auto;
  margin: 0 -4px 12px 0;
  padding-right: 4px;
}

.pc-modal-scroll-list .pc-chat-item {
  border-radius: 8px;
}

.pc-thread--folder-overview .pc-messages {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 20px 16px;
}

.pc-folder-overview {
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
}

.pc-folder-overview-bio {
  font-size: 14px;
  line-height: 1.45;
  color: var(--pc-text);
  margin: 0 0 16px;
}

.pc-thread-header--folder,
.pc-thread-header--entity,
.pc-thread-header.pc-thread-header--profile {
  cursor: pointer;
}

.pc-thread-header--folder:focus,
.pc-thread-header--entity:focus,
.pc-thread-header.pc-thread-header--profile:focus {
  outline: 2px solid var(--pc-accent);
  outline-offset: 2px;
}

.pc-global-actions {
  padding: 0 12px 10px;
}

.pc-btn-primary {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: var(--pc-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.pc-btn-primary:hover {
  background: var(--pc-accent-hover);
}

.pc-load-hint {
  padding: 16px 14px;
  font-size: 13px;
  color: var(--pc-muted);
  text-align: center;
}

.pc-result-section {
  padding: 10px 12px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pc-muted);
}

.pc-result-row {
  padding: 10px 14px;
  font-size: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  color: var(--pc-text);
  cursor: pointer;
}

.pc-result-row:hover {
  background: var(--pc-panel-hover);
}

.pc-global-browse-hint {
  font-size: 12px;
  color: var(--pc-muted);
  padding: 8px 12px 10px;
  line-height: 1.35;
  border-bottom: 1px solid var(--pc-border);
  margin-bottom: 4px;
}

/* Sozlamalar menyusi */
.pc-dropdown {
  position: fixed;
  z-index: 2000;
  min-width: 220px;
  background: var(--pc-panel);
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  padding: 6px 0;
}

.pc-dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: none;
  color: var(--pc-text);
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.pc-dropdown-item:hover {
  background: var(--pc-panel-hover);
}

.pc-dropdown-sep {
  height: 1px;
  margin: 6px 10px;
  background: var(--pc-border);
}

/* Modal oyna */
.pc-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pc-overlay.pc-hidden {
  display: none !important;
}

.pc-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--pc-panel);
  border: 1px solid var(--pc-border);
  border-radius: 12px;
  padding: 20px 20px 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.pc-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--pc-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.pc-modal-close:hover {
  background: var(--pc-panel-hover);
  color: var(--pc-text);
}

.pc-modal-title {
  margin: 0 36px 14px 0;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
}

.pc-modal-hint {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--pc-muted);
  line-height: 1.45;
}

.pc-modal-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--pc-muted);
  margin: 10px 0 6px;
}

.pc-modal-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 4px;
  font-size: 14px;
  color: var(--pc-text);
  cursor: pointer;
  user-select: none;
}

.pc-modal-check {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--pc-accent);
}

.pc-modal-input,
.pc-modal-textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--pc-border);
  background: #242f3d;
  color: var(--pc-text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.pc-modal-textarea {
  resize: vertical;
  min-height: 56px;
}

.pc-modal-btns {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.pc-modal-btns .pc-btn-primary {
  width: auto;
  min-width: 110px;
}

.pc-btn-secondary {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--pc-border);
  background: #242f3d;
  color: var(--pc-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.pc-btn-secondary:hover {
  background: var(--pc-panel-hover);
}

.pc-modal-err {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(180, 60, 60, 0.2);
  color: #ffb4b4;
  font-size: 13px;
}

.pc-modal-info-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--pc-text);
}

.pc-modal-confirm-q {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--pc-text);
  text-align: center;
}

.pc-modal-confirm-btns {
  justify-content: center;
  flex-wrap: wrap;
}

.pc-modal-leave-wrap {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--pc-border);
}

.pc-btn-leave-chat {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #c45c5c;
  background: transparent;
  color: #e88888;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.pc-btn-leave-chat:hover {
  background: rgba(196, 92, 92, 0.15);
}

.pc-modal-leave-note {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--pc-muted);
  line-height: 1.4;
  text-align: center;
}

/* Suhbat oynasi (Telegram uslubi) */
.pc-thread-wrap {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--pc-bg);
}

/* Profil — markazda, Telegram «Info» uslubi */
.pc-profile-wrap {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--pc-bg);
  overflow: hidden;
}

.pc-profile-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: block;
  padding: 24px 20px 32px;
}

.pc-profile-center {
  width: 100%;
  max-width: min(920px, 96vw);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
}

.pc-profile-loading {
  padding: 48px 16px;
  text-align: center;
  color: var(--pc-muted);
  font-size: 14px;
}

.pc-profile-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

#pc_pf_view {
  width: 100%;
}

.pc-profile-content > .pc-profile-actions {
  align-self: center;
}

.pc-profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 18px;
  width: 100%;
  margin-top: 6px;
}

.pc-profile-back-btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--pc-border);
  background: #242f3d;
  color: var(--pc-text);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.pc-profile-back-btn:hover {
  background: var(--pc-accent);
  color: #fff;
  border-color: var(--pc-accent);
}

.pc-profile-card {
  width: 100%;
  background: var(--pc-panel);
  border: 1px solid var(--pc-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
}

.pc-profile-hero {
  text-align: center;
  padding: 28px 28px 22px;
  border-bottom: 1px solid var(--pc-border);
}

.pc-profile-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.pc-profile-presence {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pc-presence-online {
  color: #5fd48c;
}

.pc-presence-offline {
  color: var(--pc-muted);
}

.pc-presence-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pc-presence-online .pc-presence-dot {
  background: #3dd174;
  box-shadow: 0 0 0 3px rgba(61, 209, 116, 0.25);
}

.pc-presence-offline .pc-presence-dot {
  background: #5a6672;
}

.pc-avatar-hero {
  width: 104px;
  height: 104px;
  font-size: 38px;
  margin: 0 auto 16px;
}

.pc-profile-avatar-col .pc-avatar-hero {
  margin-bottom: 0;
}

.pc-avatar-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.pc-profile-display-name {
  font-size: 21px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.02em;
}

.pc-profile-status {
  margin-top: 6px;
  font-size: 14px;
  color: var(--pc-accent);
  font-weight: 500;
}

.pc-profile-bio-wrap {
  padding: 14px 24px 16px;
  border-bottom: 1px solid var(--pc-border);
}

.pc-profile-bio-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pc-profile-bio-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--pc-muted);
}

.pc-profile-bio-text {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: #dce6ef;
}

.pc-profile-rows {
  padding: 0;
}

.pc-pf-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
}

.pc-pf-row:last-child {
  border-bottom: none;
}

.pc-pf-icon {
  width: 28px;
  flex-shrink: 0;
  text-align: center;
  font-size: 18px;
  line-height: 1.35;
  opacity: 0.9;
  padding-top: 2px;
}

.pc-pf-row-main {
  flex: 1;
  min-width: 0;
}

.pc-pf-label {
  font-size: 13px;
  color: var(--pc-muted);
  margin-bottom: 3px;
}

.pc-pf-value {
  font-size: 15px;
  color: #6ab3f0;
  font-weight: 500;
  word-break: break-word;
}

.pc-profile-edit-link {
  display: inline-block;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  color: var(--pc-accent);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.pc-profile-edit-link:hover {
  text-decoration: underline;
}

.pc-pf-value-empty {
  min-height: 1.25em;
}

.pc-profile-bio-text.pc-profile-bio-empty {
  color: transparent;
  min-height: 1.25em;
}

.pc-profile-edit-wrap {
  width: 100%;
  max-width: min(920px, 96vw);
  margin-left: auto;
  margin-right: auto;
}

.pc-profile-edit-wrap .pc-modal-label,
.pc-profile-edit-wrap .pc-modal-input,
.pc-profile-edit-wrap .pc-modal-textarea,
.pc-profile-edit-wrap select.pc-modal-input,
.pc-profile-edit-wrap .pc-modal-btns {
  box-sizing: border-box;
  width: calc(100% - 36px);
  margin-left: 18px;
  margin-right: 18px;
}

.pc-profile-edit-wrap .pc-modal-btns {
  padding-bottom: 4px;
}

.pc-profile-edit-title {
  margin: 0;
  padding: 18px 18px 0;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
}

.pc-profile-edit-note {
  margin: 0;
  padding: 8px 18px 14px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--pc-muted);
  border-bottom: 1px solid var(--pc-border);
}

.pc-profile-edit-wrap .pc-modal-label {
  margin-top: 12px;
}

.pc-profile-edit-wrap .pc-modal-label:first-of-type {
  margin-top: 14px;
}

.pc-pf-readonly-block {
  padding: 4px 18px 8px;
  border-top: 1px solid var(--pc-border);
  margin-top: 8px;
}

.pc-pf-readonly {
  font-size: 14px;
  color: #8a9aaa;
  word-break: break-word;
  min-height: 1.2em;
}

.pc-profile-err {
  padding: 16px 18px;
  color: #ffb4b4;
  font-size: 14px;
}

.pc-thread-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pc-chat-settings-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin-top: 2px;
  border-radius: 10px;
  border: 1px solid var(--pc-border);
  background: #242f3d;
  color: var(--pc-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.pc-chat-settings-btn:hover {
  background: var(--pc-panel-hover);
  color: var(--pc-accent);
  border-color: rgba(82, 136, 193, 0.35);
}

.pc-chat-settings-btn svg {
  display: block;
}

.pc-pinned-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--pc-border);
  background: rgba(82, 136, 193, 0.09);
  flex-shrink: 0;
}

.pc-pinned-ic {
  flex-shrink: 0;
  font-size: 15px;
  line-height: 1;
}

.pc-pinned-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font: inherit;
  padding: 3px 6px;
  margin: 0;
  border-radius: 8px;
}

.pc-pinned-main:hover {
  background: rgba(255, 255, 255, 0.06);
}

.pc-pinned-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pc-accent);
}

.pc-pinned-snippet {
  font-size: 13px;
  color: var(--pc-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.pc-pinned-unpin {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--pc-border);
  background: #252f3c;
  color: var(--pc-muted);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

.pc-pinned-unpin:hover {
  color: var(--pc-accent);
  border-color: rgba(82, 136, 193, 0.45);
}

.pc-pf-dm-actions {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 14px;
}

.pc-modal-en-readonly {
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 6px;
}

.pc-profile-delete-chat-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid rgba(130, 168, 220, 0.35);
  background: rgba(36, 47, 61, 0.85);
  color: var(--pc-text);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}

.pc-profile-delete-chat-btn:hover {
  border-color: var(--pc-accent);
  color: var(--pc-accent);
}

.pc-profile-block-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 140, 120, 0.45);
  background: rgba(120, 48, 40, 0.35);
  color: #ffb4a8;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}

.pc-profile-block-btn:hover:not(:disabled) {
  background: rgba(180, 64, 52, 0.45);
  border-color: rgba(255, 160, 140, 0.55);
}

.pc-profile-block-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.pc-cs-edit-profile {
  width: 100%;
  margin-bottom: 12px;
}

.pc-cs-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--pc-muted);
  margin: 4px 0 8px;
  letter-spacing: 0.02em;
}

.pc-cs-members-list .pc-cs-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--pc-border);
  background: rgba(0, 0, 0, 0.12);
  margin-bottom: 8px;
}

.pc-cs-members-list .pc-cs-row-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pc-cs-members-list .pc-cs-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--pc-text);
  word-break: break-word;
}

.pc-cs-members-list .pc-cs-meta {
  font-size: 12px;
  color: var(--pc-muted);
  margin-top: 2px;
}

.pc-cs-members-list .pc-cs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pc-cs-members-list .pc-cs-actions button {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--pc-border);
  background: #252f3c;
  color: var(--pc-text);
  cursor: pointer;
  font-family: inherit;
}

.pc-cs-members-list .pc-cs-actions button:hover {
  border-color: var(--pc-accent);
  color: var(--pc-accent);
}

.pc-thread-header {
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--pc-border);
  background: var(--pc-panel);
  flex-shrink: 0;
}

.pc-thread-header--profile {
  cursor: pointer;
}

.pc-thread-header--profile:hover {
  background: var(--pc-panel-hover);
}

.pc-thread-head-main {
  min-width: 0;
}

.pc-thread-title {
  font-weight: 600;
  font-size: 15px;
  color: #fff;
}

.pc-thread-sub {
  font-size: 13px;
  color: var(--pc-muted);
  margin-top: 2px;
}

.pc-profile-head-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pc-avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 22px;
}

.pc-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.pc-messages {
  background: var(--pc-bg);
}

.pc-msg-text {
  word-break: break-word;
}

.pc-reply-snippet {
  font-size: 12px;
  color: var(--pc-accent);
  border-left: 2px solid var(--pc-accent);
  padding-left: 8px;
  margin-bottom: 6px;
  opacity: 0.95;
}

.pc-chat-blocked-bar {
  flex-shrink: 0;
  padding: 12px 14px;
  border-top: 1px solid var(--pc-border);
  background: rgba(0, 0, 0, 0.22);
  text-align: center;
  color: #ffb4b4;
  font-size: 14px;
  line-height: 1.4;
}

.pc-channel-join-bar {
  flex-shrink: 0;
  padding: 10px 8px 12px;
  text-align: center;
  width: 100%;
}

.pc-channel-join-bar .pc-btn-primary {
  min-width: min(280px, 92vw);
}

.pc-channel-footer-msg {
  flex-shrink: 0;
  width: 100%;
  text-align: center;
  font-size: 14px;
  color: var(--pc-muted);
  padding: 12px 10px;
  line-height: 1.4;
}

.pc-channel-join-hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--pc-muted);
  line-height: 1.35;
  text-align: center;
}

.pc-composer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--pc-border);
  background: var(--pc-panel);
  flex-shrink: 0;
}

.pc-composer-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.pc-composer-muted {
  justify-content: center;
}

.pc-composer-icon {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: #242f3d;
  color: var(--pc-muted);
  font-size: 18px;
  cursor: not-allowed;
  flex-shrink: 0;
}

.pc-attach-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pc-composer-attach {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: #242f3d;
  color: #9fb0c0;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.pc-composer-attach:hover:not(:disabled) {
  background: #2d3c50;
  color: var(--pc-accent);
}

.pc-composer-attach:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pc-composer-attach-svg {
  display: block;
}

.pc-msg-file-thumb {
  display: block;
  max-width: 220px;
  max-height: 160px;
  border-radius: 8px;
  object-fit: cover;
}

.pc-msg-caption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--pc-text);
  line-height: 1.35;
  word-break: break-word;
}

.pc-msg-audio {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: min(300px, 92vw);
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.pc-msg.pc-me .pc-msg-audio {
  background: rgba(255, 255, 255, 0.12);
}

.pc-msg-audio-el {
  width: 100%;
  min-width: 220px;
  height: 40px;
}

.pc-msg-audio-meta {
  font-size: 12px;
  color: var(--pc-muted);
  padding-left: 2px;
}

.pc-msg-file-row {
  margin-top: 2px;
}

.pc-msg-file-download {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--pc-accent);
  color: #fff !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.pc-msg-file-download:hover {
  background: var(--pc-accent-hover);
  color: #fff !important;
}

.pc-msg-video {
  display: block;
  max-width: min(280px, 88vw);
  max-height: 240px;
  border-radius: 10px;
  background: #000;
}

.pc-composer-input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 22px;
  border: none;
  background: #242f3d;
  color: var(--pc-text);
  font-size: 15px;
  outline: none;
}

.pc-composer-send {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--pc-accent);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.pc-composer-send:hover {
  background: var(--pc-accent-hover);
}

.pc-link-btn {
  color: var(--pc-accent);
  text-decoration: none;
  font-size: 14px;
}

.pc-link-btn:hover {
  text-decoration: underline;
}

.pc-empty-icon {
  font-size: 64px;
  opacity: 0.35;
}

/* Xabar qatori: pufak + tanlash belgisi */
.pc-msg-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  max-width: 100%;
}

.pc-msg-row--me {
  justify-content: flex-end;
  align-self: flex-end;
}

.pc-msg-row:not(.pc-msg-row--me) {
  justify-content: flex-start;
  align-self: flex-start;
}

.pc-msg-row .pc-msg {
  align-self: auto;
  max-width: min(72%, 560px);
}

.pc-msg-check {
  display: none;
  flex-shrink: 0;
  margin-top: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
}

#pc_messages.pc-msgs--select .pc-msg-check {
  display: flex;
}

.pc-msg-check--on {
  background: var(--pc-accent);
  border-color: var(--pc-accent);
}

.pc-msg-check--on::after {
  content: '✓';
  font-size: 13px;
  line-height: 1;
  color: #fff;
  font-weight: 700;
}

.pc-msg-row--selected .pc-msg {
  box-shadow: 0 0 0 2px var(--pc-accent);
}

/* Tanlash rejimi — tepa panel */
.pc-select-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 10px 14px;
  background: #1c2b3a;
  border-bottom: 1px solid var(--pc-border);
  gap: 12px;
}

.pc-select-bar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pc-select-bar-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: var(--pc-accent);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.pc-select-bar-btn:hover {
  background: var(--pc-accent-hover);
}

.pc-select-bar-btn--danger {
  background: #b94a4a;
}

.pc-select-bar-btn--danger:hover {
  background: #d06060;
}

.pc-select-bar-cancel {
  background: transparent;
  border: none;
  color: var(--pc-text);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 8px 4px;
}

.pc-select-bar-cancel:hover {
  color: var(--pc-accent);
}

/* Javob (reply) chizig‘i */
.pc-reply-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 8px 12px;
  background: rgba(43, 82, 120, 0.35);
  border-top: 1px solid var(--pc-border);
  gap: 10px;
}

.pc-reply-bar-main {
  flex: 1;
  min-width: 0;
}

.pc-reply-bar-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--pc-accent);
  margin-bottom: 2px;
}

.pc-reply-bar-preview {
  font-size: 13px;
  color: var(--pc-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-reply-bar-close {
  border: none;
  background: transparent;
  color: var(--pc-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

.pc-reply-bar-close:hover {
  color: var(--pc-text);
}

.pc-edit-bar {
  border-left: 3px solid rgba(230, 185, 95, 0.72);
  background: rgba(110, 75, 30, 0.18);
}

/* Xabar kontekst menyusi (ikki marta bosish) */
.pc-msg-ctx {
  position: fixed;
  z-index: 9999;
  min-width: 210px;
  padding: 6px 0;
  border-radius: 12px;
  background: #1c2732;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.pc-msg-ctx-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.pc-msg-ctx-item:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
}

.pc-msg-ctx-item:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pc-msg-ctx-ic {
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.9;
}

/* Mobil: inbox ro‘yxati to‘liq ekran; chat tanlansa faqat suhbat + «Orqaga» */
.pc-thread-mobile-back {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin: 0 6px 0 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--pc-accent);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}

.pc-thread-mobile-back:hover {
  background: var(--pc-panel-hover);
}

.pc-profile-close-mobile {
  display: none;
}

@media (max-width: 900px) {
  .pc-col-chats {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: 1 1 auto;
  }

  .pc-rail {
    width: 56px;
    min-width: 56px;
    padding: 8px 0;
    gap: 6px;
  }

  .pc-rail-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .pc-rail-tile-text {
    font-size: 9px;
  }

  #pc-app-root:not(.pc-shell--mobile-conversation) .pc-main {
    display: none !important;
  }

  #pc-app-root.pc-shell--mobile-conversation .pc-rail,
  #pc-app-root.pc-shell--mobile-conversation #pc_sidebar {
    display: none !important;
  }

  #pc-app-root.pc-shell--mobile-conversation .pc-main {
    display: flex !important;
    flex: 1;
    width: 100%;
    min-width: 0;
  }

  #pc-app-root.pc-shell--mobile-conversation #pc_thread:not(.pc-hidden) .pc-thread-mobile-back {
    display: flex;
  }

  .pc-thread-head-row {
    align-items: center;
  }

  .pc-profile-close-mobile:not(.pc-hidden) {
    display: inline-flex;
  }
}

@media (min-width: 901px) {
  .pc-profile-close-mobile {
    display: none !important;
  }
}
