/* ============================================================
   Sala de Profes — Social Network Module
   Modern, professional design inspired by Facebook/LinkedIn
   ============================================================ */

/* Page Wrapper — forzar cyan #06EBF7 en todo el módulo Sala de Profes */
.sala-page-wrapper {
  --primary: #06EBF7;
  --accent: #06EBF7;
  width: 100%;
  min-width: 0;
  min-height: calc(100vh - 70px);
  background: var(--bg-primary);
  overflow-x: hidden;
}

/* Layout */
.sala-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 300px;
  gap: 20px;
  max-width: 1280px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 20px 16px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

@media (max-width: 1100px) {
  .sala-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .sala-sidebar { display: none; }
}

@media (max-width: 768px) {
  .sala-layout {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 8px;
  }
  .sala-sidebar,
  .sala-widgets { display: none; }
}

/* ============================================================
   Sidebar & Widgets (sticky columns)
   ============================================================ */
.sala-sidebar,
.sala-widgets {
  position: sticky;
  top: 80px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.sala-sidebar::-webkit-scrollbar,
.sala-widgets::-webkit-scrollbar { width: 4px; }
.sala-sidebar::-webkit-scrollbar-thumb,
.sala-widgets::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

/* ============================================================
   Profile Card
   ============================================================ */
.sala-profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 24px 16px 20px;
  box-shadow: var(--shadow-soft);
}

.sala-profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 70%, #06EBF7));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 32px;
  overflow: hidden;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 30%, transparent);
}
.sala-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.sala-profile-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 16px;
  margin: 4px 0 0;
}

.sala-profile-school {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0;
}

.sala-profile-stats {
  display: flex;
  gap: 24px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  width: 100%;
  justify-content: center;
}

.sala-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.sala-stat-value {
  font-weight: 800;
  font-size: 20px;
  color: var(--text-primary);
  line-height: 1;
}
.sala-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.sala-btn-my-posts {
  margin-top: 12px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  transition: all 0.2s;
  width: 100%;
  justify-content: center;
  font-weight: 500;
}
.sala-btn-my-posts:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}

/* ============================================================
   Widget Card (sidebar/right column)
   ============================================================ */
.sala-widget-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.sala-widget-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sala-widget-title i {
  color: var(--primary);
  font-size: 14px;
}

.sala-empty-state-small {
  text-align: center;
  padding: 16px 8px;
  color: var(--text-muted);
  font-size: 13px;
}

/* Trending Widget */
.sala-trending-widget {
  display: flex;
  flex-direction: column;
}

.sala-trending-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}
.sala-trending-item:last-child { border-bottom: none; }

.sala-trending-tag {
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
}
.sala-trending-tag:hover { text-decoration: underline; }
.sala-trending-count { font-size: 12px; color: var(--text-muted); }

/* Popular Posts Widget */
.sala-popular-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: 0.15s;
}
.sala-popular-item:last-child { border-bottom: none; }
.sala-popular-item:hover { opacity: 0.8; }
.sala-popular-excerpt {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sala-popular-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
}
.sala-popular-author { font-weight: 500; }
.sala-popular-stats {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sala-popular-stats i { font-size: 10px; }

/* Share Popup */
.sala-share-popup {
  position: absolute;
  bottom: 52px;
  right: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  padding: 4px;
  z-index: 200;
  min-width: 200px;
  animation: sala-dropdown-in 0.15s ease;
}

.sala-share-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
  transition: 0.15s;
  font-weight: 500;
}
.sala-share-item:hover { background: var(--bg-tertiary); }

/* My Posts button active state */
.sala-btn-my-posts.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.sala-btn-my-posts.active:hover {
  background: color-mix(in srgb, var(--primary) 85%, #000);
}

/* Notification Preferences */
.sala-notif-prefs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sala-pref-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}
.sala-pref-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  border-radius: 4px;
}

/* Feed Area */
.sala-feed-area {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

#salaFeed {
  min-width: 0;
  max-width: 100%;
}

/* ============================================================
   Search Bar
   ============================================================ */
.sala-search-bar {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 10px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.sala-search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent);
}

.sala-search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}
.sala-search-input-wrapper i { font-size: 14px; flex-shrink: 0; }

.sala-search-bar input[type="text"] {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--text-primary);
  font-family: inherit;
}
.sala-search-bar input[type="text"]::placeholder { color: var(--text-muted); }

.sala-search-filters { margin-top: 10px; }
.sala-filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }

.sala-filter-chip {
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  font-size: 12px;
  cursor: pointer;
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.15s;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}
.sala-filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.sala-filter-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============================================================
   Feed Sort Toggle
   ============================================================ */
.sala-feed-sort {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
}

.sala-sort-btn,
.sala-feed-sort button {
  flex: 1;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 13px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.sala-sort-btn.active,
.sala-feed-sort button.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 30%, transparent);
}
.sala-sort-btn:hover:not(.active),
.sala-feed-sort button:hover:not(.active) {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* ============================================================
   Composer
   ============================================================ */
.sala-composer {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 16px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s;
}
.sala-composer:focus-within {
  box-shadow: 0 4px 16px color-mix(in srgb, var(--primary) 12%, transparent);
}

.sala-composer-header {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.sala-composer-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 70%, #06EBF7));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}
.sala-composer-avatar img { width: 100%; height: 100%; object-fit: cover; }

.sala-composer-prompt {
  flex: 1;
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border-radius: 24px;
  color: var(--text-muted);
  font-size: 15px;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.sala-composer-prompt:hover {
  background: var(--border-color);
  border-color: var(--border-color);
}

/* Quick Actions (always visible, Facebook-style) */
.sala-composer-quick-actions {
  display: flex;
  gap: 0;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}
.sala-quick-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.15s;
}
.sala-quick-action:hover {
  background: var(--bg-tertiary);
}
.sala-quick-action i { font-size: 18px; }
@media (max-width: 480px) {
  .sala-quick-action span { display: none; }
  .sala-quick-action { padding: 8px; }
}

.sala-composer-expanded { margin-top: 12px; }

/* Quill Editor Integration */
#salaEditorContainer {
  margin-top: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm, 8px);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--bg-primary);
}
#salaEditorContainer:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 8%, transparent);
}
#salaEditorContainer .ql-toolbar.ql-snow {
  border: none;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary, #f8f9fa);
  padding: 6px 8px;
  font-family: inherit;
}
#salaEditorContainer .ql-container.ql-snow {
  border: none;
  font-family: inherit;
  font-size: 15px;
}
#salaEditorContainer .ql-editor {
  min-height: 100px;
  max-height: 300px;
  overflow-y: auto;
  padding: 12px;
  line-height: 1.6;
  color: var(--text-primary);
}
#salaEditorContainer .ql-editor.ql-blank::before {
  color: var(--text-muted);
  font-style: italic;
}
#salaEditorContainer .ql-editor strong, #salaEditorContainer .ql-editor b { font-weight: 600; }
#salaEditorContainer .ql-editor a { color: var(--primary); }
#salaEditorContainer .ql-editor blockquote {
  border-left: 3px solid var(--primary, #06EBF7);
  padding-left: 12px;
  margin: 8px 0;
  color: var(--text-muted);
}
#salaEditorContainer .ql-editor h1 { font-size: 1.5em; font-weight: 700; }
#salaEditorContainer .ql-editor h2 { font-size: 1.3em; font-weight: 700; }
#salaEditorContainer .ql-editor h3 { font-size: 1.15em; font-weight: 700; }
#salaEditorContainer .ql-snow .ql-stroke { stroke: var(--text-secondary); }
#salaEditorContainer .ql-snow .ql-fill { fill: var(--text-secondary); }
#salaEditorContainer .ql-snow .ql-picker { color: var(--text-secondary); }
#salaEditorContainer .ql-snow button:hover .ql-stroke,
#salaEditorContainer .ql-snow .ql-picker-label:hover .ql-stroke { stroke: var(--primary); }
#salaEditorContainer .ql-snow button:hover .ql-fill,
#salaEditorContainer .ql-snow .ql-picker-label:hover .ql-fill { fill: var(--primary); }
#salaEditorContainer .ql-snow button.ql-active .ql-stroke { stroke: var(--primary); }
#salaEditorContainer .ql-snow button.ql-active .ql-fill { fill: var(--primary); }
#salaEditorContainer .ql-snow .ql-picker-options {
  background: var(--bg-primary, #fff);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
#salaEditorContainer .ql-tooltip {
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 1000;
}

/* Media Preview */
.sala-media-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.sala-media-preview-item {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 24px;
  border: 1px solid var(--border-color);
}
.sala-media-preview-item.uploading { opacity: 0.5; }
.sala-media-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.sala-media-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: 0.15s;
}
.sala-media-remove:hover { background: rgba(0,0,0,0.85); }
.sala-media-filename { font-size: 10px; text-align: center; word-break: break-all; padding: 2px; }

/* Hashtag Input */
.sala-hashtag-input {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: border-color 0.2s;
}
.sala-hashtag-input:focus-within { border-color: var(--primary); }
.sala-hashtag-input input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: var(--text-primary);
  font-family: inherit;
}
.sala-hashtag-input input::placeholder { color: var(--text-muted); }
.sala-hashtag-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
  z-index: 100;
}

/* Composer Actions */
.sala-composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  gap: 8px;
}

.sala-composer-media-btns {
  display: flex;
  gap: 2px;
}

.sala-media-btn {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.15s;
}
.sala-media-btn:hover {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  color: var(--primary);
}
.sala-media-btn:nth-child(1):hover { color: #22c55e; }
.sala-media-btn:nth-child(2):hover { color: #06EBF7; }
.sala-media-btn:nth-child(3):hover { color: #f59e0b; }
.sala-media-btn:nth-child(4):hover { color: #ef4444; }
.sala-media-btn:nth-child(5):hover { color: #3b82f6; }

.sala-composer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Visibility Selector */
.sala-visibility-selector { position: relative; }
.sala-visibility-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  font-family: inherit;
  transition: all 0.15s;
  font-weight: 500;
}
.sala-visibility-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.sala-visibility-dropdown {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
  z-index: 100;
  min-width: 170px;
  padding: 4px;
  animation: sala-dropdown-in 0.15s ease;
}
@keyframes sala-dropdown-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.sala-visibility-option {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: 0.15s;
  border-radius: 6px;
  font-weight: 500;
}
.sala-visibility-option:hover { background: var(--bg-tertiary); }
.sala-visibility-option i { width: 16px; text-align: center; color: var(--text-muted); }

/* Publish Button */
.sala-publish-btn {
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 80%, #06EBF7));
  color: #fff;
  padding: 8px 20px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  white-space: nowrap;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 30%, transparent);
}
.sala-publish-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 40%, transparent);
}
.sala-publish-btn:active:not(:disabled) { transform: translateY(0); }
.sala-publish-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

/* ============================================================
   Post Card
   ============================================================ */
.sala-post-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  margin-bottom: 16px;
  transition: box-shadow 0.2s;
  overflow: visible;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.sala-post-card:hover {
  box-shadow: var(--shadow-hover);
}

/* Post Header */
.sala-post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px 0 16px;
  position: relative;
}

.sala-post-header .sala-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.sala-post-header .sala-post-info {
  flex: 1;
  min-width: 0;
}

.sala-post-header .sala-post-author {
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 15px;
  text-decoration: none;
}
.sala-post-header .sala-post-author:hover { text-decoration: underline; }

.sala-post-header .sala-post-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sala-post-menu-btn {
  margin-left: auto;
  margin-right: 8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: 0.15s;
  flex-shrink: 0;
}
.sala-post-menu-btn:hover { background: var(--bg-tertiary); }

/* Post Author (alternative structure) */
.sala-post-author-area {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.sala-post-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 70%, #06EBF7));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
}
.sala-post-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sala-post-meta-col { display: flex; flex-direction: column; min-width: 0; }
.sala-post-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.3;
}
.sala-post-name:hover { text-decoration: underline; cursor: pointer; }
.sala-post-time {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.sala-edited-tag { font-style: italic; color: var(--text-muted); font-size: 11px; }
.sala-post-menu-wrapper { position: relative; margin-left: auto; margin-right: 8px; }

/* Post Body */
.sala-post-body {
  padding: 12px 16px;
  line-height: 1.65;
  word-break: break-word;
  overflow-wrap: break-word;
  color: var(--text-primary);
  font-size: 15px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.sala-post-body a { color: var(--primary); text-decoration: none; }
.sala-post-body a:hover { text-decoration: underline; }
.sala-post-body img {
  max-width: 100%;
  height: auto;
}
.sala-post-body .sala-edited-indicator {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* Post Hashtags */
.sala-post-hashtags {
  padding: 0 16px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Post Footer */
.sala-post-footer {
  border-top: 1px solid var(--border-color);
  padding: 4px 8px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

/* Reaction Buttons */
.sala-reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: transparent;
  font-size: 14px;
  transition: all 0.15s;
  position: relative;
  font-family: inherit;
  font-weight: 500;
}
.sala-reaction-btn:hover { background: var(--bg-tertiary); }
.sala-reaction-btn .sala-reaction-count { font-weight: 600; }
.sala-reaction-btn.active.like { color: #3b82f6; background: color-mix(in srgb, #3b82f6 8%, transparent); }
.sala-reaction-btn.active.dislike { color: #ef4444; background: color-mix(in srgb, #ef4444 8%, transparent); }

@keyframes sala-reaction-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.sala-reaction-btn.pop { animation: sala-reaction-pop 0.25s ease; }

/* Post Actions */
.sala-post-reactions { display: flex; gap: 2px; }
.sala-post-actions { display: flex; gap: 2px; }
.sala-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: transparent;
  font-size: 14px;
  transition: all 0.15s;
  font-family: inherit;
  font-weight: 500;
}
.sala-action-btn:hover { background: var(--bg-tertiary); }

/* Reaction Tooltip */
.sala-reaction-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  max-width: 200px;
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
  margin-bottom: 8px;
  opacity: 0;
  transition: opacity 0.15s;
}
.sala-reaction-tooltip.long-list { white-space: normal; }
.sala-reaction-btn:hover .sala-reaction-tooltip { opacity: 1; }
.sala-reaction-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
}

/* ============================================================
   Media Gallery
   ============================================================ */
.sala-media-grid {
  padding: 0 16px 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: grid;
  gap: 3px;
  max-width: 100%;
  min-width: 0;
}
.sala-media-grid[data-count="1"] { grid-template-columns: 1fr; }
.sala-media-grid[data-count="1"] .sala-media-item { aspect-ratio: 16 / 9; max-height: 500px; }
.sala-media-grid[data-count="2"] { grid-template-columns: 1fr 1fr; }
.sala-media-grid[data-count="2"] .sala-media-item { aspect-ratio: 1 / 1; }
.sala-media-grid[data-count="3"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.sala-media-grid[data-count="3"] .sala-media-item:first-child { grid-row: 1 / 3; }
.sala-media-grid[data-count="4"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.sala-media-grid[data-count="5"],
.sala-media-grid[data-count="6"],
.sala-media-grid[data-count="7"],
.sala-media-grid[data-count="8"],
.sala-media-grid[data-count="9"],
.sala-media-grid[data-count="10"] { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr; }

.sala-media-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 6px;
  min-width: 0;
}
.sala-media-item img,
.sala-media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
  max-width: 100%;
}
.sala-media-item:hover img,
.sala-media-item:hover video { transform: scale(1.03); }

.sala-media-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}

/* YouTube/Vimeo Embed */
.sala-embed-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  margin: 0 16px 12px;
  max-width: calc(100% - 32px);
}
.sala-embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================================
   Share Menu
   ============================================================ */
.sala-share-menu {
  position: absolute;
  bottom: 100%;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
  padding: 4px;
  z-index: 100;
  min-width: 180px;
  margin-bottom: 4px;
  display: none;
  animation: sala-dropdown-in 0.15s ease;
}
.sala-share-menu.open { display: block; }

.sala-share-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: 0.15s;
  font-family: inherit;
  font-weight: 500;
}
.sala-share-menu-item:hover { background: var(--bg-tertiary); }
.sala-share-menu-item.whatsapp i { color: #25D366; }
.sala-share-menu-item.facebook i { color: #1877F2; }
.sala-share-menu-item.x i { color: #000; }
.sala-share-menu-item.linkedin i { color: #0A66C2; }
.sala-share-menu-item.instagram i { color: #E4405F; }
.sala-share-menu-item.copy-link i { color: var(--text-secondary); }
[data-theme="dark"] .sala-share-item [style*="color:#000"],
[data-theme="dark"] .sala-share-menu-item.x i { color: #fff; }

/* ============================================================
   Comments Section
   ============================================================ */
.sala-comments-section {
  padding: 0 16px 16px;
  border-top: 1px solid var(--border-color);
}

.sala-comment {
  padding: 10px 0;
  position: relative;
}
.sala-comment[data-depth="1"] { padding-left: 24px; }
.sala-comment[data-depth="2"] { padding-left: 48px; }
.sala-comment[data-depth="3"],
.sala-comment[data-depth="4"],
.sala-comment[data-depth="5"] { padding-left: 72px; }

.sala-comment-thread-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
  display: none;
  border-radius: 1px;
}
.sala-comment[data-depth="1"] .sala-comment-thread-line { left: 12px; display: block; }
.sala-comment[data-depth="2"] .sala-comment-thread-line { left: 36px; display: block; }
.sala-comment[data-depth="3"] .sala-comment-thread-line,
.sala-comment[data-depth="4"] .sala-comment-thread-line,
.sala-comment[data-depth="5"] .sala-comment-thread-line { left: 60px; display: block; }

/* Comment Inner */
.sala-comment-inner,
.sala-comment-body {
  display: flex;
  gap: 8px;
}

.sala-comment-avatar,
.sala-comment-body .sala-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
  object-fit: cover;
}
.sala-comment-avatar img { width: 100%; height: 100%; object-fit: cover; }

.sala-comment-content,
.sala-comment-content-wrapper {
  flex: 1;
  min-width: 0;
}

.sala-comment-author {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.sala-comment-bubble {
  background: var(--bg-tertiary);
  padding: 8px 12px;
  border-radius: 14px 14px 14px 4px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  word-break: break-word;
  display: inline-block;
}

.sala-comment-text {
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.sala-comment-actions {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  padding-left: 4px;
}
.sala-comment-actions button,
.sala-comment-action {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  transition: 0.15s;
  font-family: inherit;
  font-weight: 500;
}
.sala-comment-actions button:hover,
.sala-comment-action:hover { color: var(--primary); }
.sala-comment-actions .active.like,
.sala-comment-action.active.like { color: #3b82f6; }
.sala-comment-actions .active.dislike,
.sala-comment-action.active.dislike { color: #ef4444; }
.sala-comment-time { font-size: 12px; color: var(--text-muted); }

/* Comment Input */
.sala-comment-input {
  display: flex;
  gap: 8px;
  padding: 12px 0 4px;
  align-items: center;
}
.sala-comment-input .sala-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.sala-comment-input-field,
.sala-comment-field {
  flex: 1;
  background: var(--bg-tertiary);
  border-radius: 20px;
  padding: 8px 16px;
  border: 1px solid transparent;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  resize: none;
  min-height: 36px;
  transition: border-color 0.2s;
}
.sala-comment-input-field:focus,
.sala-comment-field:focus { border-color: var(--primary); }
.sala-comment-input-field::placeholder,
.sala-comment-field::placeholder { color: var(--text-muted); }

/* ============================================================
   Hashtag Badge
   ============================================================ */
.sala-hashtag {
  display: inline-flex;
  align-items: center;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.sala-hashtag:hover { background: color-mix(in srgb, var(--primary) 20%, transparent); }

/* ============================================================
   Visibility Badge
   ============================================================ */
.sala-visibility-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}
.sala-visibility-badge i { font-size: 11px; }

/* ============================================================
   Post Menu Dropdown
   ============================================================ */
.sala-post-menu {
  position: absolute;
  right: 16px;
  top: 48px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
  min-width: 180px;
  z-index: 100;
  padding: 4px;
  display: none;
  animation: sala-dropdown-in 0.15s ease;
}
.sala-post-menu.open { display: block; }

.sala-post-menu-item {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: 0.15s;
  font-family: inherit;
  border-radius: 6px;
  font-weight: 500;
}
.sala-post-menu-item:hover { background: var(--bg-tertiary); }
.sala-post-menu-item.danger { color: var(--danger, #ef4444); }
.sala-post-menu-item.danger:hover { background: color-mix(in srgb, #ef4444 8%, transparent); }
.sala-danger { color: var(--danger, #ef4444) !important; }

/* ============================================================
   Edit Post Inline
   ============================================================ */
.sala-edit-overlay {
  padding: 12px 24px 16px 16px;
}
.sala-edit-editor {
  min-height: 80px;
  padding: 12px;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-primary);
  outline: none;
  word-break: break-word;
  transition: box-shadow 0.2s;
  max-width: 100%;
  box-sizing: border-box;
}
.sala-edit-editor:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}
.sala-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}
.sala-edit-cancel,
.sala-edit-save {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  transition: all 0.15s;
}
.sala-edit-cancel {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}
.sala-edit-cancel:hover {
  background: var(--border-color);
}
.sala-edit-save {
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 80%, #06EBF7));
  color: #fff;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 30%, transparent);
}
.sala-edit-save:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 40%, transparent);
}
.sala-edit-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Suggested Teachers Widget */
.sala-suggested-teacher {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}
.sala-suggested-teacher:last-child { border-bottom: none; }
.sala-suggested-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 70%, #06EBF7));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  flex-shrink: 0;
  overflow: hidden;
}
.sala-suggested-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sala-suggested-info { flex: 1; min-width: 0; }
.sala-suggested-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sala-suggested-detail {
  font-size: 11px;
  color: var(--text-muted);
}
.sala-suggested-stats {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* "Ver todos" link */
.sala-suggested-view-all {
  display: block;
  text-align: center;
  padding: 8px 0 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
  transition: opacity .2s;
}
.sala-suggested-view-all:hover { opacity: .75; }
.sala-suggested-view-all i { margin-left: 4px; font-size: 11px; }

/* Suggested Teachers Modal */
.sala-suggested-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.sala-suggested-modal {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  height: 80vh;
  max-height: 700px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  animation: salaModalIn .2s ease;
}
@keyframes salaModalIn {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.sala-suggested-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}
.sala-suggested-modal-header h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sala-suggested-modal-header h4 i { color: var(--primary); }
.sala-suggested-modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.sala-suggested-modal-close:hover {
  background: var(--border-color);
  color: var(--text-primary);
}
.sala-suggested-modal-body {
  padding: 12px 20px 20px;
  overflow-y: auto;
  flex: 1;
}
.sala-suggested-modal-body .sala-suggested-teacher {
  padding: 10px 0;
}

/* ============================================================
   Lightbox
   ============================================================ */
.sala-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}
.sala-lightbox.open { opacity: 1; visibility: visible; }
.sala-lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 4px; }

.sala-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: 0.15s;
  backdrop-filter: blur(4px);
}
.sala-lightbox-close:hover { background: rgba(255, 255, 255, 0.2); }

.sala-lightbox-nav,
.sala-lightbox-prev,
.sala-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: 0.15s;
  backdrop-filter: blur(4px);
}
.sala-lightbox-nav:hover,
.sala-lightbox-prev:hover,
.sala-lightbox-next:hover { background: rgba(255, 255, 255, 0.2); }
.sala-lightbox-nav.prev,
.sala-lightbox-prev { left: 16px; }
.sala-lightbox-nav.next,
.sala-lightbox-next { right: 16px; }

.sala-lightbox-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.6);
  padding: 6px 16px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

/* ============================================================
   Search Banner
   ============================================================ */
.sala-search-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--primary) 8%, var(--bg-primary));
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  border-radius: var(--radius-sm, 8px);
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-primary);
  gap: 12px;
}
.sala-search-banner i { color: var(--primary); margin-right: 6px; }
.sala-search-clear {
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
  transition: background 0.15s;
}
.sala-search-clear:hover { background: var(--bg-hover, #e5e7eb); color: var(--text-primary); }

/* ============================================================
   Empty State
   ============================================================ */
.sala-empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.sala-empty-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--primary);
  opacity: 0.4;
}
.sala-empty-state i {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.3;
  display: block;
  color: var(--primary);
}
.sala-empty-state h3,
.sala-empty-state .sala-empty-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text-primary);
}
.sala-empty-state p,
.sala-empty-state .sala-empty-desc {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================================
   Loading Skeleton
   ============================================================ */
@keyframes sala-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.sala-loading-skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: sala-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.sala-post-skeleton {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-soft);
}
.sala-skeleton-header { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.sala-skeleton-avatar { width: 42px; height: 42px; border-radius: 50%; }
.sala-skeleton-line { height: 14px; margin-bottom: 8px; border-radius: 6px; }
.sala-skeleton-body { margin-bottom: 16px; }
.sala-skeleton-media { height: 200px; width: 100%; border-radius: var(--radius-sm); }

/* ============================================================
   Public View
   ============================================================ */
.sala-public-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.sala-public-banner {
  position: sticky;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 80%, #06EBF7));
  color: #fff;
  padding: 16px 24px;
  text-align: center;
  z-index: 100;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-weight: 500;
}

.sala-public-cta {
  background: #fff;
  color: var(--primary);
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.sala-public-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ============================================================
   Toast Notification
   ============================================================ */
.sala-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  z-index: 99999;
  animation: sala-toast-in 0.3s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.sala-toast.success { background: #22c55e; }
.sala-toast.error { background: #ef4444; }
.sala-toast.info { background: var(--primary); }

@keyframes sala-toast-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Responsive
   ============================================================ */
/* Asegurar que el contenedor principal no desborde en móvil */
.dashboard-main .sala-page-wrapper {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 1100px) {
  .sala-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    padding: 16px 12px;
  }
  .sala-sidebar { display: none; }
}

@media (max-width: 768px) {
  .sala-layout {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 8px;
  }
  .sala-sidebar,
  .sala-widgets { display: none; }
  .sala-post-header { padding: 12px 16px 0 12px; }
  .sala-post-body { padding: 10px 12px; }
  .sala-post-footer { padding: 6px 4px; }
  .sala-comments-section { padding: 0 12px 12px; }
  .sala-media-grid { padding: 0 12px 10px; }
  .sala-embed-container { margin: 0 12px 10px; max-width: calc(100% - 24px); }
  .sala-composer { padding: 12px; }
  .sala-composer-actions { flex-wrap: wrap; }
  .sala-composer-right { width: 100%; justify-content: flex-end; }
  .sala-reaction-btn,
  .sala-action-btn { padding: 6px 10px; font-size: 13px; }
  .sala-lightbox-nav,
  .sala-lightbox-prev,
  .sala-lightbox-next { width: 36px; height: 36px; font-size: 16px; }
  .sala-lightbox-prev { left: 8px; }
  .sala-lightbox-next { right: 8px; }
  .sala-search-bar { padding: 8px 12px; }
  .sala-feed-sort { padding: 4px; }
  .sala-sort-btn,
  .sala-feed-sort button { padding: 6px 12px; font-size: 12px; }
}

@media (max-width: 480px) {
  .sala-layout { padding: 10px 6px; }
  .sala-composer-media-btns { gap: 0; }
  .sala-media-btn { width: 34px; height: 34px; font-size: 14px; }
  .sala-publish-btn { padding: 7px 14px; font-size: 13px; }
  .sala-visibility-btn { padding: 5px 8px; font-size: 12px; }
  .sala-post-header { padding: 10px 14px 0 10px; }
  .sala-post-body { padding: 8px 10px; font-size: 14px; }
  .sala-post-hashtags { padding: 0 10px 8px; }
  .sala-media-grid { padding: 0 10px 8px; }
  .sala-embed-container { margin: 0 10px 8px; max-width: calc(100% - 20px); }
  .sala-comment[data-depth="1"] { padding-left: 16px; }
  .sala-comment[data-depth="2"] { padding-left: 32px; }
  .sala-comment[data-depth="3"],
  .sala-comment[data-depth="4"],
  .sala-comment[data-depth="5"] { padding-left: 48px; }
}

@media (max-width: 360px) {
  .sala-layout { padding: 8px 4px; }
  .sala-post-body { padding: 6px 8px; font-size: 13px; }
  .sala-post-header .sala-post-author,
  .sala-post-name { font-size: 14px; }
}

/* ── Quick Action Bar (Mensajes, Notificaciones, Amigos) ── */
.sala-quick-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.sala-quick-bar-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border-color, #e5e7eb);
  background: var(--card-bg, #fff);
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary, #555);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  box-shadow: var(--shadow-soft, 0 1px 4px rgba(0,0,0,0.04));
}
.sala-quick-bar-btn:hover {
  background: var(--primary, #06EBF7);
  color: #000;
  border-color: var(--primary, #06EBF7);
}
.sala-quick-bar-btn i { font-size: 1rem; }
.sala-quick-bar-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.sala-quick-bar-label { white-space: nowrap; }
@media (max-width: 600px) {
  .sala-quick-bar-label { display: none; }
  .sala-quick-bar-btn { padding: 10px 8px; }
}

/* ── Dropdown Panels (Notificaciones, Solicitudes) ── */
.sala-dropdown-panel {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  margin-bottom: 12px;
  overflow: hidden;
  animation: salaSlideDown 0.2s ease;
}
@keyframes salaSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.sala-dropdown-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}
.sala-dropdown-panel-header h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary, #111);
}
.sala-dropdown-panel-header button {
  background: none;
  border: none;
  color: var(--text-muted, #999);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
}
.sala-dropdown-panel-header button:hover { color: var(--text-primary, #111); }
.sala-dropdown-panel-body {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
}

/* Notification items */
.sala-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.sala-notif-item:hover { background: var(--bg-secondary, #f3f4f6); }
.sala-notif-item.unread { background: rgba(59,130,246,0.06); }
.sala-notif-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-tertiary, #e5e7eb);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
  color: var(--text-muted, #999);
}
.sala-notif-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.sala-notif-content { flex: 1; min-width: 0; }
.sala-notif-text { font-size: 0.85rem; color: var(--text-primary, #111); line-height: 1.4; }
.sala-notif-text strong { font-weight: 600; }
.sala-notif-time { font-size: 0.75rem; color: var(--text-muted, #999); margin-top: 2px; }

/* Friend request items */
.sala-friend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background 0.15s;
}
.sala-friend-item:hover { background: var(--bg-secondary, #f3f4f6); }
.sala-friend-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-tertiary, #e5e7eb);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
  color: var(--text-muted, #999);
}
.sala-friend-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.sala-friend-info { flex: 1; min-width: 0; }
.sala-friend-name { font-size: 0.88rem; font-weight: 600; color: var(--text-primary, #111); }
.sala-friend-meta { font-size: 0.75rem; color: var(--text-muted, #999); }
.sala-friend-actions { display: flex; gap: 6px; flex-shrink: 0; }
.sala-friend-accept,
.sala-friend-reject {
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.sala-friend-accept {
  background: var(--primary, #06EBF7);
  color: #000;
}
.sala-friend-accept:hover { filter: brightness(0.92); }
.sala-friend-reject {
  background: var(--bg-tertiary, #e5e7eb);
  color: var(--text-secondary, #555);
}
.sala-friend-reject:hover { background: #fecaca; color: #dc2626; }

/* ── Main Tabs (Feed / Grupos / Chat Público) ── */
.sala-main-tabs {
  display: flex;
  gap: 4px;
  background: var(--card-bg, #fff);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-soft, 0 2px 8px rgba(0,0,0,0.06));
}
.sala-main-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary, #555);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}
.sala-main-tab:hover { background: var(--bg-secondary, #f3f4f6); }
.sala-main-tab.active {
  background: var(--primary, #06EBF7);
  color: #000;
}
.sala-main-tab i { font-size: 0.85rem; }

/* ── Suggested Teacher Follow Button ── */
.sala-suggested-teacher {
  position: relative;
}
.sala-suggested-follow-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  background: var(--primary, #06EBF7);
  color: #000;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s;
}
.sala-suggested-follow-btn:hover { filter: brightness(0.9); }
.sala-suggested-follow-btn.pending {
  background: var(--bg-secondary, #e5e7eb);
  color: var(--text-muted, #888);
  cursor: default;
}

/* ── Groups Styles ── */
.sala-groups-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.sala-groups-subtabs {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary, #f3f4f6);
  border-radius: 8px;
  padding: 3px;
}
.sala-groups-subtab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary, #555);
  cursor: pointer;
  transition: all 0.2s;
}
.sala-groups-subtab.active {
  background: var(--card-bg, #fff);
  color: var(--text-primary, #111);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.sala-groups-create-btn {
  padding: 8px 18px;
  border: none;
  background: var(--primary, #06EBF7);
  color: #000;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: filter 0.2s;
}
.sala-groups-create-btn:hover { filter: brightness(0.9); }

.sala-groups-list { display: flex; flex-direction: column; gap: 10px; }
.sala-groups-loading, .sala-groups-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted, #888);
  font-size: 0.9rem;
}

.sala-group-card {
  background: var(--card-bg, #fff);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  transition: box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.sala-group-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.sala-group-card-cover {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.sala-group-card-info { flex: 1; min-width: 0; }
.sala-group-card-name { font-weight: 700; font-size: 0.95rem; color: var(--text-primary, #111); }
.sala-group-card-meta { font-size: 0.8rem; color: var(--text-muted, #888); margin-top: 2px; display: flex; gap: 12px; }
.sala-group-card-desc { font-size: 0.82rem; color: var(--text-secondary, #555); margin-top: 4px; }
.sala-group-card-action { flex-shrink: 0; }
.sala-group-join-btn {
  padding: 6px 14px;
  border: none;
  background: var(--primary, #06EBF7);
  color: #000;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.sala-group-join-btn:hover { filter: brightness(0.9); }
.sala-group-status { font-size: 0.8rem; color: var(--text-muted, #888); }
.sala-group-status.pending { color: #f59e0b; }
.sala-group-role { font-size: 0.8rem; color: var(--primary, #06EBF7); font-weight: 600; }

/* Group Detail */
.sala-group-detail-header { margin-bottom: 16px; position: relative; }
.sala-group-back-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.sala-group-back-btn:hover { background: rgba(0,0,0,0.7); }
.sala-group-detail-cover {
  height: 140px;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}
.sala-group-detail-info {
  background: var(--card-bg, #fff);
  border-radius: 0 0 12px 12px;
  padding: 16px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.sala-group-detail-info h2 { margin: 0; font-size: 1.2rem; color: var(--text-primary, #111); }

.sala-group-share-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color, #e2e8f0);
  flex-wrap: wrap;
}
.sala-group-share-btn {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.85rem; color: #fff; transition: transform 0.15s;
}
.sala-group-share-btn:hover { transform: scale(1.1); }
.sala-group-share-btn.whatsapp { background: #25D366; }
.sala-group-share-btn.facebook { background: #1877F2; }
.sala-group-share-btn.twitter { background: #1DA1F2; }
.sala-group-share-btn.linkedin { background: #0A66C2; }
.sala-group-share-btn.telegram { background: #0088cc; }
.sala-group-share-btn.copy { background: #6b7280; }

.sala-group-tabs {
  display: flex;
  gap: 4px;
  background: var(--card-bg, #fff);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.sala-group-tab {
  flex: 1;
  padding: 8px 14px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary, #555);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}
.sala-group-tab.active {
  background: var(--primary, #06EBF7);
  color: #000;
}

.sala-group-composer {
  background: var(--card-bg, #fff);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
}
.sala-group-composer textarea {
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
  resize: vertical;
  background: var(--input-bg, #fff);
  color: var(--text-primary, #111);
  font-family: inherit;
  outline: none;
}
.sala-group-composer textarea:focus { border-color: var(--primary); }

.sala-group-post {
  background: var(--card-bg, #fff);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.sala-group-post-header { margin-bottom: 10px; }
.sala-group-post-content {
  font-size: 0.9rem;
  color: var(--text-secondary, #444);
  line-height: 1.6;
  white-space: pre-wrap;
  margin-bottom: 10px;
}
.sala-group-post-actions {
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--border-color, #e5e7eb);
  padding-top: 10px;
}
.sala-group-post-actions button {
  background: none;
  border: none;
  color: var(--text-muted, #888);
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}
.sala-group-post-actions button:hover { background: var(--bg-secondary, #f3f4f6); }
.sala-group-post-actions button.active { color: #ef4444; }

.sala-group-comments {
  padding: 10px 0 0;
  border-top: 1px solid var(--border-color, #e5e7eb);
  margin-top: 10px;
}
.sala-group-comment {
  padding: 6px 0;
  font-size: 0.85rem;
}
.sala-group-comment-name {
  font-weight: 600;
  color: var(--text-primary, #111);
  cursor: pointer;
  margin-right: 6px;
}
.sala-group-comment-name:hover { color: var(--primary); }
.sala-group-comment-text { color: var(--text-secondary, #555); }
.sala-group-comment-input {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.sala-group-comment-input input {
  flex: 1;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.85rem;
  outline: none;
  background: var(--input-bg, #fff);
  color: var(--text-primary, #111);
}
.sala-group-comment-input input:focus { border-color: var(--primary); }
.sala-group-comment-input button {
  background: var(--primary);
  color: #000;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
}

.sala-group-member-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.sala-group-member-item:hover { background: var(--bg-secondary, #f3f4f6); }
.sala-group-member-action {
  background: none;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-muted, #888);
  transition: all 0.2s;
}
.sala-group-member-action.approve { color: #22c55e; border-color: #22c55e; }
.sala-group-member-action.approve:hover { background: #22c55e; color: #fff; }
.sala-group-member-action.reject { color: #ef4444; border-color: #ef4444; }
.sala-group-member-action.reject:hover { background: #ef4444; color: #fff; }

/* ── Modal (shared for groups/profile) ── */
.perfil-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.perfil-modal-overlay.active { display: flex; }
.perfil-modal {
  background: var(--card-bg, #fff);
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px;
}
.perfil-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary, #111);
}
.perfil-form-group { margin-bottom: 14px; }
.perfil-form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary, #555);
  margin-bottom: 4px;
}
.perfil-form-group input,
.perfil-form-group textarea,
.perfil-form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--input-bg, #fff);
  color: var(--text-primary, #111);
  font-family: inherit;
  box-sizing: border-box;
}
.perfil-form-group textarea { resize: vertical; min-height: 80px; }
.perfil-form-group input:focus,
.perfil-form-group textarea:focus,
.perfil-form-group select:focus {
  outline: none;
  border-color: var(--primary, #06EBF7);
}
.perfil-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.perfil-btn {
  padding: 8px 20px;
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.perfil-btn-primary {
  background: var(--primary, #06EBF7);
  color: #000;
  border-color: var(--primary, #06EBF7);
}
.perfil-btn-primary:hover { filter: brightness(0.9); }
.perfil-btn-secondary {
  background: transparent;
  color: var(--primary, #06EBF7);
  border-color: var(--primary, #06EBF7);
}
.perfil-btn-secondary:hover { background: rgba(6,235,247,0.1); }
.perfil-btn-pending {
  background: var(--bg-secondary, #e5e7eb);
  color: var(--text-secondary, #555);
  border-color: var(--bg-secondary, #e5e7eb);
  cursor: default;
}

/* ── Group Chat (real-time) ── */
.sala-group-chat-container {
  background: var(--card-bg, #fff);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  height: 450px;
  overflow: hidden;
}
.sala-group-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sala-group-chat-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.sala-group-chat-msg-avatar { flex-shrink: 0; }
.sala-group-chat-msg-body { flex: 1; min-width: 0; }
.sala-group-chat-msg-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.sala-group-chat-msg-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary, #111);
  cursor: pointer;
}
.sala-group-chat-msg-name:hover { color: var(--primary, #06EBF7); }
.sala-group-chat-msg-time {
  font-size: 0.7rem;
  color: var(--text-muted, #888);
}
.sala-group-chat-msg-text {
  font-size: 0.9rem;
  color: var(--text-secondary, #444);
  line-height: 1.5;
  margin-top: 2px;
  word-wrap: break-word;
}
.sala-group-chat-input-area {
  padding: 10px 14px;
  border-top: 1px solid var(--border-color, #e5e7eb);
  display: flex;
  gap: 8px;
  align-items: center;
}
.sala-group-chat-input-area input {
  flex: 1;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 0.9rem;
  background: var(--input-bg, #fff);
  color: var(--text-primary, #111);
  outline: none;
  font-family: inherit;
}
.sala-group-chat-input-area input:focus { border-color: var(--primary, #06EBF7); }
.sala-group-chat-send {
  background: var(--primary, #06EBF7);
  color: #000;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: filter 0.2s;
}
.sala-group-chat-send:hover { filter: brightness(0.9); }
.sala-group-chat-attach-btns { display: flex; gap: 2px; }
.sala-group-chat-attach {
  background: none;
  border: none;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-muted, #888);
  font-size: 0.9rem;
  transition: all 0.15s;
}
.sala-group-chat-attach:hover { background: var(--bg-secondary, #f3f4f6); color: var(--primary, #06EBF7); }
.sala-group-chat-media-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-top: 1px solid var(--border-color, #e5e7eb);
  background: var(--bg-secondary, #f9fafb);
}
.sala-group-chat-emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 12px;
  border-top: 1px solid var(--border-color, #e5e7eb);
  background: var(--bg-secondary, #f9fafb);
  max-height: 120px;
  overflow-y: auto;
}
.sala-emoji-item {
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.15s;
  line-height: 1;
}
.sala-emoji-item:hover { background: var(--border-color, #e5e7eb); }

/* ── Group Post Composer Toolbar ── */
.sala-group-composer { padding: 16px; }
.sala-group-composer textarea {
  width: 100%;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  min-height: 70px;
  background: var(--input-bg, #fff);
  color: var(--text-primary, #111);
  box-sizing: border-box;
}
.sala-group-composer textarea:focus { outline: none; border-color: var(--primary, #06EBF7); }
.sala-group-composer-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.sala-group-composer-btns { display: flex; gap: 4px; }
.sala-group-media-btn {
  background: none;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s;
}
.sala-group-media-btn:hover { background: var(--bg-secondary, #f3f4f6); }
.sala-group-media-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0;
}
.sala-group-media-thumb {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-secondary, #f3f4f6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sala-group-media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sala-group-media-thumb button {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.65rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Group Post Media ── */
.sala-group-post-media {
  display: grid;
  gap: 4px;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 10px;
}
.sala-group-post-media[data-count="1"] { grid-template-columns: 1fr; }
.sala-group-post-media[data-count="2"] { grid-template-columns: 1fr 1fr; }
.sala-group-post-media[data-count="3"] { grid-template-columns: 1fr 1fr; }
.sala-group-post-media[data-count="4"] { grid-template-columns: 1fr 1fr; }
.sala-group-post-media-item { position: relative; overflow: hidden; }
.sala-group-post-media-item img { width: 100%; height: 200px; object-fit: cover; display: block; }
.sala-group-post-media-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}
.sala-group-post-embed {
  margin-top: 10px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  padding-bottom: 56.25%;
}
.sala-group-post-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.sala-group-post-hashtags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sala-group-hashtag {
  color: var(--primary, #06EBF7);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}
.sala-group-hashtag:hover { text-decoration: underline; }

/* Video container in feed */
.sala-video-container {
  margin-top: 8px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

/* Suggested teachers filters */
.sala-suggested-filters {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sala-suggested-filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sala-suggested-filter-input {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 8px;
  font-size: 0.85rem;
  background: var(--input-bg, #fff);
  color: var(--text-primary, #111);
  outline: none;
}
.sala-suggested-filter-input:focus {
  border-color: var(--primary, #06EBF7);
  box-shadow: 0 0 0 2px rgba(6, 235, 247, 0.15);
}
.sala-suggested-filter-select {
  flex: 1;
  min-width: 120px;
  padding: 8px 10px;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 8px;
  font-size: 0.82rem;
  background: var(--input-bg, #fff);
  color: var(--text-primary, #111);
  outline: none;
  cursor: pointer;
}
.sala-suggested-filter-select:focus {
  border-color: var(--primary, #06EBF7);
}
.sala-suggested-meta {
  font-size: 0.75rem;
  color: var(--text-muted, #6b7280);
  margin-top: 1px;
  line-height: 1.3;
}
.sala-suggested-pagination {
  padding: 10px 16px;
  border-top: 1px solid var(--border-color, #e5e7eb);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}
.sala-suggested-pagination-info {
  font-size: 0.78rem;
  color: var(--text-muted, #6b7280);
  white-space: nowrap;
}
.sala-suggested-pagination-btns {
  display: flex;
  gap: 4px;
}
.sala-suggested-page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 6px;
  background: var(--input-bg, #fff);
  color: var(--text-primary, #111);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.sala-suggested-page-btn:hover:not(:disabled):not(.active) {
  background: var(--border-color, #e5e7eb);
}
.sala-suggested-page-btn.active {
  background: var(--primary, #06EBF7);
  color: #fff;
  border-color: var(--primary, #06EBF7);
  font-weight: 700;
}
.sala-suggested-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
@media (max-width: 500px) {
  .sala-suggested-filter-row { flex-direction: column; }
  .sala-suggested-filter-select { min-width: 100%; }
}

/* YouTube/Vimeo Embed Modal */
.yt-embed-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(4px);
}
.yt-embed-overlay.visible { opacity: 1; }
.yt-embed-overlay.closing { opacity: 0; }
.yt-embed-modal {
  background: var(--card-bg, #fff);
  border-radius: 16px;
  width: 92%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  overflow: hidden;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1);
}
.yt-embed-overlay.visible .yt-embed-modal {
  transform: translateY(0) scale(1);
}
.yt-embed-overlay.closing .yt-embed-modal {
  transform: translateY(20px) scale(0.96);
}
.yt-embed-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}
.yt-embed-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff0000, #cc0000);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.yt-embed-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary, #111);
  flex: 1;
}
.yt-embed-close {
  background: none;
  border: none;
  color: var(--text-muted, #888);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.yt-embed-close:hover {
  background: var(--bg-secondary, #f3f4f6);
  color: var(--text-primary, #111);
}
.yt-embed-body { padding: 20px; }
.yt-embed-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary, #333);
  margin-bottom: 8px;
}
.yt-embed-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-secondary, #f3f4f6);
  border: 2px solid var(--border-color, #e5e7eb);
  border-radius: 10px;
  padding: 0 12px;
  transition: border-color 0.2s;
}
.yt-embed-input-wrap:focus-within {
  border-color: var(--primary, #06EBF7);
}
.yt-embed-input-wrap i {
  color: var(--text-muted, #999);
  font-size: 0.9rem;
}
.yt-embed-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 0;
  font-size: 0.9rem;
  color: var(--text-primary, #111);
  outline: none;
  font-family: inherit;
}
.yt-embed-input::placeholder {
  color: var(--text-muted, #aaa);
}
.yt-embed-hint {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted, #888);
  display: flex;
  align-items: center;
  gap: 5px;
}
.yt-embed-hint i { font-size: 0.72rem; }
.yt-embed-error {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: #ef4444;
  font-weight: 500;
}
.yt-embed-preview {
  margin-top: 14px;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.yt-embed-thumb {
  position: relative;
  aspect-ratio: 16/9;
  cursor: default;
}
.yt-embed-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.yt-embed-thumb-placeholder {
  width: 100%;
  height: 100%;
  aspect-ratio: 16/9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #1ab7ea, #162d50);
  color: #fff;
  font-size: 2rem;
}
.yt-embed-thumb-placeholder span {
  font-size: 0.8rem;
  opacity: 0.8;
}
.yt-embed-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: #ff0000;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
  pointer-events: none;
}
.yt-embed-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color, #e5e7eb);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.yt-embed-btn {
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.15s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.yt-embed-btn.cancel {
  background: var(--bg-secondary, #f3f4f6);
  color: var(--text-primary, #333);
}
.yt-embed-btn.cancel:hover { background: #e5e7eb; }
.yt-embed-btn.confirm {
  background: linear-gradient(135deg, #ff0000, #cc0000);
  color: #fff;
}
.yt-embed-btn.confirm:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,0,0,0.3);
}
.yt-embed-btn.confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
@media (max-width: 500px) {
  .yt-embed-modal { width: 96%; }
  .yt-embed-body { padding: 16px; }
}
