3/* Wiadomość z bazy o temacie pokoju (user: topic) */
.topic-db-msg {
  background: linear-gradient(90deg, #e3f2fd 60%, #90caf9 100%);
  color: #0d47a1;
  border-left: 6px solid #1976d2;
  border-radius: 4px;
  font-weight: 500;
  font-size: 1.08em;
  margin: 8px 0;
  padding: 10px 18px;
  box-shadow: 0 2px 8px rgba(33,150,243,0.08);
  display: flex;
  align-items: center;
  gap: 8px;
}
/* Wiadomość systemowa o temacie pokoju */
.system-topic-msg {
  background: linear-gradient(90deg, #fffde7 60%, #ffe082 100%);
  color: #795548;
  border-left: 6px solid #ffb300;
  border-radius: 4px;
  font-weight: 500;
  font-size: 1.08em;
  margin: 8px 0;
  padding: 10px 18px;
  box-shadow: 0 2px 8px rgba(255,193,7,0.08);
  display: flex;
  align-items: center;
  gap: 8px;
}
.system-topic-icon {
  font-size: 1.3em;
  margin-right: 6px;
}
.system-topic-text {
  font-weight: 500;
}
/* Pasek tematu pokoju */
.room-topic-bar {
  background: linear-gradient(90deg, #e3f2fd 60%, #90caf9 100%);
  color: #0d47a1;
  font-weight: bold;
  font-size: 1.1rem;
  border-left: 6px solid #1976d2;
  border-radius: 4px;
  padding: 8px 16px;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(33,150,243,0.08);
  transition: background 0.3s;
  word-break: break-word;
}
/* Wyróżnienie wiadomości z @wzmianką */
.msg.mention {
  background: linear-gradient(90deg, #fffbe6 60%, #ffe082 100%);
  border: 2px solid #ffd600;
  animation: mentionFlash 1.2s 1;
}

@keyframes mentionFlash {
  0% { box-shadow: 0 0 0 0 #ffd600; }
  60% { box-shadow: 0 0 12px 6px #ffd600; }
  100% { box-shadow: 0 0 0 0 #ffd600; }
}
/* Prawa kolumna z listą użytkowników */
.col-lg-2 {
  min-width: 200px;
  max-width: 320px;
  overflow-y: auto;
}

#usersList {
  max-height: 60vh;
  overflow-y: auto;
}

#roomsList {
  max-height: 30vh;
  overflow-y: auto;
}

#controls .input-wrapper {
  position: relative;
  overflow: visible !important;
  display: flex;
  flex-direction: column-reverse;
}

#msgAutocomplete {
  position: absolute;
  left: 0;
  bottom: 100%;
  width: 100%;
  background: #fff;
  border: 1px solid #ddd;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  max-height: 180px;
  overflow-y: auto;
  z-index: 2147483647;
  display: none;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.18), 0 -1.5px 4px rgba(0,0,0,0.08);
  padding: 0;
  margin: 0;
  user-select: none;
}
#msgAutocomplete.show {
  display: block !important;
}

.autocomplete-item {
  padding: 6px 12px;
  cursor: pointer;
}
.autocomplete-item:hover,
.autocomplete-item.selected {
  background: #1976d2;
  color: #fff;
  font-weight: 600;
  width: 100%;
  box-sizing: border-box;
}

#msgAutocomplete .no-results {
  padding: 10px 12px;
  color: #888;
  font-size: 14px;
  background: #fafafa;
  border-radius: 0 0 4px 4px;
  text-align: center;
  cursor: default;
}

.autocomplete-item .role-badge {
  font-size: 12px;
  margin-left: 8px;
  opacity: 0.7;
}

.mention {
  color: #1976d2;
  font-weight: 600;
  cursor: default;
}
.mention-me {
  background: #fff3cd;
  color: #d63384;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
}

.emoji {
  min-width: 40px;
  min-height: 40px;
  vertical-align: middle;
}

.msg {
  padding: 5px 10px;
  margin: 5px 0;
  border-radius: 15px;
  max-width: 100%;
  width: fit-content;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.msg-avatar:hover {
  transform: scale(3);
  z-index: 100;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.msg.mine {
  background-color: #e8e8e8;
  margin-left: 15px;
  text-align: left;
}

.msg.other {
  background-color: #efefef;
  margin-right: 15px;
  text-align: left;
}

.msg .user {
  font-weight: bold;
}

.msg-time {
  font-size: 0.7em;
  color: #999;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 4px;
}

/* Wiadomości systemowe */
.msg-system {
  text-align: center;
  font-size: 0.82em;
  padding: 4px 12px;
  margin: 6px 0;
  color: #666;
  font-style: italic;
  border-radius: 8px;
}
.msg-system-join {
  color: #2e7d32;
  background: rgba(46,125,50,0.08);
}
.msg-system-leave {
  color: #757575;
  background: rgba(117,117,117,0.08);
}
.msg-system-kick {
  color: #e65100;
  background: rgba(230,81,0,0.08);
}
.msg-system-ban {
  color: #c62828;
  background: rgba(198,40,40,0.08);
}

/* Przyciski formatowania w oknie prywatnym */
.priv-fmt-btn {
  border: 1px solid #bbb;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
  transition: background 0.15s, color 0.15s;
}
.priv-fmt-btn:hover {
  background: #e3f2fd;
}

/* Aktywne przyciski formatowania */
#fmtBoldBtn.active,
#fmtItalicBtn.active,
#fmtUnderlineBtn.active {
  background: #1976d2 !important;
  color: #fff !important;
  border-color: #1565c0 !important;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

/* Popup overlay */

/* Link preview (podgląd URL) */
.link-preview {
  margin-top: 6px;
  max-width: 400px;
}
.link-preview-link {
  display: flex;
  text-decoration: none;
  color: inherit;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: #fafafa;
  transition: box-shadow 0.2s;
}
.link-preview-link:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.link-preview-img {
  width: 120px;
  min-height: 80px;
  object-fit: cover;
  flex-shrink: 0;
}
.link-preview-body {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.link-preview-title {
  font-weight: 600;
  font-size: 13px;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-preview-desc {
  font-size: 11px;
  color: #666;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.link-preview-domain {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.link-preview-favicon {
  width: 14px;
  height: 14px;
}
.popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.45);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popupFadeIn 0.2s ease;
}
@keyframes popupFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.popup-content {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  overflow: hidden;
  animation: popupSlideIn 0.25s ease;
}
@keyframes popupSlideIn {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #dee2e6;
  background: #f8f9fa;
}
.popup-header h5 {
  margin: 0;
  font-weight: 600;
}
.popup-body {
  padding: 20px;
}

/* Powiadomienia w aplikacji */
.app-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  max-width: 400px;
  word-wrap: break-word;
  animation: slideIn 0.3s ease-out;
  font-size: 14px;
}

.app-notification .title {
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 16px;
}

.app-notification .body {
  font-size: 13px;
  opacity: 0.95;
}

.app-notification.private {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.app-notification.mention {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.app-notification.user-joined {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

div.emoticons-list img 
{
  display: block;
  min-width: 50px;
  min-height: 50px;
  margin: 100px;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

/* Emotikony */
.emoji {
  width: 24px;
  height: 24px;
  margin: 0 2px;
  vertical-align: middle;
}

#emojiPanel {
  animation: slideIn 0.3s ease-in-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===================================
   HEADER NAV
   =================================== */
.navbar .nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.navbar .nav-link:hover {
  background: #e3f2fd;
  color: #1565c0;
}

/* ===================================
   PROFILE PAGE
   =================================== */

/* ---- nagłówek profilu ---- */
.profile-header-card {
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.profile-header-card .card-body {
  padding: 24px;
}
#profileAvatar {
  border: 3px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}
#profileAvatar:hover {
  transform: scale(1.08);
}
#profileUsername {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
#profileRole {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- bloki profilu (drag & drop) ---- */
.profile-block {
  border: none;
  border-radius: 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.25s ease, opacity 0.2s;
  overflow: hidden;
}
.profile-block:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.profile-block.dragging {
  opacity: 0.45;
  transform: scale(0.96) rotate(-1deg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 100;
}
.profile-block.drag-over {
  box-shadow: 0 0 0 3px #42a5f5, 0 4px 16px rgba(66,165,245,0.2);
  transform: scale(1.01);
}
.profile-block .card-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid #e9ecef;
  padding: 12px 16px;
}
.drag-handle {
  cursor: grab;
  user-select: none;
  opacity: 0.4;
  font-size: 1.1rem;
  transition: opacity 0.2s;
}
.profile-block:hover .drag-handle {
  opacity: 0.8;
}
.drag-handle:active {
  cursor: grabbing;
}

/* ---- informacje profilu ---- */
#blockInfo table {
  margin: 0;
}
#blockInfo table td {
  padding: 8px 12px;
  border-color: #f0f0f0;
  font-size: 0.9rem;
}
#blockInfo table td:first-child {
  font-weight: 600;
  color: #666;
  white-space: nowrap;
  width: 35%;
}

/* ---- galeria zdjęć ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}
.gallery-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid transparent;
}
.gallery-thumb:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-color: #42a5f5;
}
.gallery-add-btn {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #ccc;
  border-radius: 10px;
  font-size: 2rem;
  color: #aaa;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.gallery-add-btn:hover {
  border-color: #42a5f5;
  color: #42a5f5;
  background: #e3f2fd;
}
.gallery-photo-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popupFadeIn 0.2s ease;
  cursor: zoom-out;
}
.gallery-photo-overlay img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

/* ---- lista znajomych w profilu ---- */
.friend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  transition: background 0.15s;
}
.friend-item:hover {
  background: #f5f5f5;
}
.friend-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e0e0e0;
}
.friend-name {
  font-weight: 600;
  color: #333;
  text-decoration: none;
  font-size: 0.9rem;
}
.friend-name:hover {
  color: #1565c0;
}
.friends-pending-badge {
  background: #ff5722;
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}

/* ---- modal edycji profilu ---- */
#editProfileModal .modal-content {
  border-radius: 16px;
  border: none;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}
#editProfileModal .modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-radius: 16px 16px 0 0;
}
#editProfileModal .btn-close {
  filter: brightness(0) invert(1);
}
#editProfileModal .modal-footer {
  border-top: 1px solid #eee;
}

/* ---- modal uploadu zdjęcia ---- */
#uploadPhotoModal .modal-content {
  border-radius: 16px;
  border: none;
}
#uploadPhotoModal .modal-header {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  color: #1a1a1a;
  border-radius: 16px 16px 0 0;
}

/* ===================================
   FORUM
   =================================== */

/* ---- lista kategorii ---- */
.forum-category {
  border: none;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  margin-bottom: 16px;
  transition: box-shadow 0.2s, transform 0.15s;
}
.forum-category:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}
.forum-category-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.forum-category-header h5 {
  margin: 0;
  font-weight: 700;
  font-size: 1.1rem;
}
.forum-category-header small {
  opacity: 0.85;
  font-size: 0.85rem;
}
.forum-category-header .badge {
  background: rgba(255,255,255,0.25);
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 10px;
}
.forum-category-delete {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
}
.forum-category-delete:hover {
  background: rgba(255,0,0,0.5);
}

/* ---- lista wątków ---- */
.forum-topics-list {
  border-radius: 0 0 14px 14px;
  overflow: hidden;
}
.forum-topic-row {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid #f0f0f0;
  gap: 12px;
  transition: background 0.15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.forum-topic-row:last-child {
  border-bottom: none;
}
.forum-topic-row:hover {
  background: #f5f7ff;
}
.forum-topic-row .topic-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.forum-topic-row .topic-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a1a1a;
  flex-grow: 1;
}
.forum-topic-row .topic-title:hover {
  color: #1565c0;
}
.forum-topic-pinned {
  color: #fb8c00;
  font-size: 0.85rem;
}
.forum-topic-locked {
  color: #e53935;
  font-size: 0.85rem;
}
.forum-topic-meta {
  font-size: 0.78rem;
  color: #999;
  white-space: nowrap;
}
.forum-empty-cat {
  text-align: center;
  color: #aaa;
  padding: 24px;
  font-size: 0.9rem;
}

/* ---- admin panel dodaj kategorię ---- */
#adminCatPanel .input-group {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
#adminCatPanel .form-control {
  border: none;
  padding: 10px 14px;
}
#adminCatPanel .btn-primary {
  border-radius: 0;
  font-weight: 600;
  white-space: nowrap;
}

/* ---- nowy wątek modal ---- */
#newTopicModal .modal-content {
  border-radius: 16px;
  border: none;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}
#newTopicModal .modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-radius: 16px 16px 0 0;
}
#newTopicModal .btn-close {
  filter: brightness(0) invert(1);
}
#newTopicModal textarea {
  min-height: 120px;
  resize: vertical;
}

/* ---- widok wątku (forum-topic) ---- */
#topicTitle {
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.3;
}
#moderatePanel .btn {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 8px;
}
#topicFirstPost {
  border: none;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  overflow: hidden;
}
#topicFirstPost .card-body {
  padding: 20px 24px;
  font-size: 0.95rem;
  line-height: 1.7;
  background: linear-gradient(180deg, #fafbff 0%, #fff 100%);
}
#postsList .card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: box-shadow 0.15s;
}
#postsList .card:hover {
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}
#postsList .card-body {
  padding: 16px 20px;
  line-height: 1.65;
}
#postsPagination .btn {
  min-width: 36px;
  border-radius: 8px;
  font-weight: 600;
}
#replyForm {
  border: none;
  border-radius: 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
#replyForm .card-body {
  padding: 20px;
}
#replyForm h6 {
  font-weight: 700;
  margin-bottom: 12px;
  color: #555;
}
#replyForm textarea {
  border-radius: 10px;
  resize: vertical;
  min-height: 80px;
}

/* ===================================
   WALL / FEED
   =================================== */

/* ---- formularz nowego posta ---- */
.wall-new-post {
  border: none;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  overflow: hidden;
}
.wall-new-post .card-body {
  padding: 20px;
}
.wall-new-post textarea {
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  resize: none;
  padding: 14px 16px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.wall-new-post textarea:focus {
  border-color: #90caf9;
  box-shadow: 0 0 0 3px rgba(66,165,245,0.15);
}
.wall-new-post .form-select {
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  font-size: 0.85rem;
  padding: 6px 12px;
}
.wall-new-post .btn-primary {
  border-radius: 10px;
  font-weight: 600;
  padding: 8px 20px;
}

/* ---- selected friends picker ---- */
#selectedFriendsBox {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 8px 10px;
}
#selectedFriendsList .badge {
  font-size: 0.82rem;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s;
}
#selectedFriendsList .badge:hover {
  background: #e3f2fd !important;
}
#selectedFriendsList input[type="checkbox"] {
  accent-color: #1976d2;
}

/* ---- posty w feedzie ---- */
#feedContainer .card {
  border: none;
  border-radius: 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s, transform 0.15s;
  overflow: hidden;
}
#feedContainer .card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}
#feedContainer .card-body {
  padding: 20px;
}
#feedContainer .card .rounded-circle {
  border: 2px solid #e0e0e0;
}
#feedContainer .card .fw-bold {
  color: #1a1a1a;
  transition: color 0.15s;
}
#feedContainer .card .fw-bold:hover {
  color: #1565c0;
}

/* ---- komentarze pod postem ---- */
[id^="comments-"] {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}
[id^="comments-"] .border-start {
  border-color: #e0e0e0 !important;
  border-width: 2px !important;
  padding: 8px 0 8px 12px;
  border-radius: 0;
  transition: background 0.15s;
}
[id^="comments-"] .border-start:hover {
  background: #fafafa;
}
[id^="comments-"] .rounded-circle {
  border: 1.5px solid #e0e0e0;
}
[id^="comments-"] .form-control {
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.85rem;
  border: 1px solid #e0e0e0;
}
[id^="comments-"] .btn-primary {
  border-radius: 20px;
  font-size: 0.82rem;
  padding: 6px 14px;
  white-space: nowrap;
}

/* ---- przycisk komentarzy ---- */
#feedContainer .btn-outline-secondary {
  border-radius: 20px;
  font-size: 0.82rem;
  padding: 4px 14px;
  border-color: #ddd;
  color: #666;
  transition: all 0.15s;
}
#feedContainer .btn-outline-secondary:hover {
  background: #f5f5f5;
  border-color: #bbb;
  color: #333;
}

/* ---- załaduj więcej ---- */
#loadMoreBtn {
  border-radius: 12px;
  margin-top: 16px;
  padding: 10px;
  font-weight: 600;
  border: 2px dashed #ccc;
  color: #888;
  transition: all 0.2s;
}
#loadMoreBtn:hover {
  border-color: #90caf9;
  color: #1565c0;
  background: #e3f2fd;
}

/* ---- visibility ikony w feedzie ---- */
.visibility-icon {
  font-size: 0.85rem;
}

/* ---- usuwanie postu/komentarza ---- */
#feedContainer .btn-outline-danger {
  border-radius: 50%;
  width: 24px;
  height: 24px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.2s;
}
#feedContainer .card:hover .btn-outline-danger {
  opacity: 1;
}

/* ===================================
   RESPONSIVE - SOCIAL PAGES
   =================================== */
@media (max-width: 768px) {
  /* profil */
  .profile-header-card .card-body {
    flex-direction: column;
    text-align: center;
    gap: 12px !important;
  }
  .profile-header-card .ms-auto {
    margin: 0 !important;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
  }
  #profileUsername { font-size: 1.2rem; }
  #profileAvatar { width: 64px !important; height: 64px !important; }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }
  .friend-item { padding: 6px 8px; }

  /* forum */
  .forum-category-header { padding: 12px 14px; }
  .forum-category-header h5 { font-size: 0.95rem; }
  .forum-topic-row { padding: 10px 14px; gap: 8px; }
  .forum-topic-row .topic-avatar { width: 28px; height: 28px; }
  #topicTitle { font-size: 1.1rem; }
  #topicFirstPost .card-body { padding: 14px 16px; }
  #postsList .card-body { padding: 12px 14px; }

  /* wall */
  .wall-new-post .card-body { padding: 14px; }
  #feedContainer .card-body { padding: 14px; }
  .navbar .nav-link { font-size: 0.8rem; padding: 4px 8px; }
}

/* ===== CMS / Dokumentacja ===== */
.cms-content { line-height: 1.7; word-break: break-word; }
.cms-content h1, .cms-content h2, .cms-content h3 { margin-top: 1.2em; margin-bottom: .5em; }
.cms-content pre { background: #1e1e2e; color: #cdd6f4; border-radius: 8px; padding: 14px 18px; overflow-x: auto; font-size: 13px; }
.cms-content code { background: #e9ecef; padding: 2px 5px; border-radius: 4px; font-size: 90%; }
.cms-content pre code { background: none; padding: 0; }
.cms-content blockquote { border-left: 4px solid #6c757d; padding: 8px 16px; color: #555; background: #f8f9fa; border-radius: 0 6px 6px 0; margin: 1em 0; }
.cms-content img { max-width: 100%; height: auto; border-radius: 6px; margin: .5em 0; }
.cms-content table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.cms-content th, .cms-content td { border: 1px solid #dee2e6; padding: 8px 12px; text-align: left; }
.cms-content th { background: #f1f3f5; }
.cms-content a { color: #0d6efd; text-decoration: underline; }
.cms-content hr { border: none; border-top: 2px solid #dee2e6; margin: 1.5em 0; }
.cms-content ul, .cms-content ol { padding-left: 1.5em; }
#pagesList .list-group-item.active { background: #0d6efd; border-color: #0d6efd; color: #fff; }
#pagesList .list-group-item { font-size: 14px; }

/* WYSIWYG Toolbar */
.cms-toolbar {
  display: flex; flex-wrap: wrap; gap: 2px; align-items: center;
  padding: 6px 8px; margin-bottom: 0;
  background: #f1f3f5; border: 1px solid #dee2e6;
  border-radius: 6px 6px 0 0;
}
.cms-toolbar .btn { font-size: 12px; padding: 3px 7px; }
.cms-toolbar select { cursor: pointer; }

/* WYSIWYG editable area */
.cms-wysiwyg-area {
  min-height: 380px; max-height: 65vh; overflow-y: auto;
  padding: 16px 20px;
  border: 1px solid #dee2e6; border-top: none;
  border-radius: 0 0 6px 6px;
  background: #fff; font-size: 15px; line-height: 1.7;
  outline: none;
}
.cms-wysiwyg-area:focus { box-shadow: 0 0 0 .2rem rgba(13,110,253,.15); }
.cms-wysiwyg-area img { max-width: 100%; height: auto; border-radius: 4px; }
.cms-wysiwyg-area table { width: 100%; border-collapse: collapse; margin: .8em 0; }
.cms-wysiwyg-area th, .cms-wysiwyg-area td { border: 1px solid #ccc; padding: 6px 10px; }
.cms-wysiwyg-area th { background: #f1f3f5; }
.cms-wysiwyg-area blockquote { border-left: 4px solid #6c757d; padding: 8px 16px; color: #555; background: #f8f9fa; margin: .8em 0; }
.cms-wysiwyg-area pre { background: #1e1e2e; color: #cdd6f4; border-radius: 6px; padding: 12px 16px; overflow-x: auto; font-size: 13px; }
.cms-wysiwyg-area code { background: #e9ecef; padding: 1px 4px; border-radius: 3px; font-size: 90%; }
.cms-wysiwyg-area pre code { background: none; padding: 0; color: inherit; }

/* ===== Blog ===== */
.blog-card { transition: box-shadow .15s; }
.blog-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.1); }
.blog-cover-thumb { width: 100%; height: 160px; object-fit: cover; }

/* ===== Menu drag & drop ===== */
#menuSortable tr.drag-over { background: #e3f2fd; box-shadow: inset 0 -2px 0 #2196F3; }
#menuSortable tr[draggable] { transition: opacity 0.15s, background 0.15s; }
#menuSortable .drag-handle { cursor: grab; user-select: none; }
#menuSortable .drag-handle:active { cursor: grabbing; }
.blog-cover-full { width: 100%; max-height: 400px; object-fit: cover; }