/* Layout principal - estilo Discourse */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
}

.logo-icon { color: var(--accent-teal); font-size: 0.7rem; }
.logo-lab { color: var(--accent-teal); }
.logo-sec { color: var(--text-primary); }

.header-search {
  flex: 1;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.5rem 1rem;
}

.header-search i { color: var(--text-muted); }
.header-search input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
}

.breadcrumbs-wrap { padding: 0.5rem 1.5rem; background: var(--bg-card); border-bottom: 1px solid var(--border-subtle); font-size: 0.85rem; }
.breadcrumbs { color: var(--text-muted); }
.breadcrumbs a { color: var(--accent-teal); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span { color: var(--text-muted); margin: 0 0.35rem; }
.header-right { display: flex; align-items: center; gap: 1rem; margin-left: auto; flex: 1; justify-content: flex-end; max-width: 600px; }
.header-right .header-search { flex: 1; min-width: 180px; max-width: 320px; }
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.post-author-link { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--text-primary); }
.post-author-link:hover { color: var(--accent-teal); }
.post-author-link span { white-space: nowrap; }
.post-author-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.post-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(100px); background: var(--bg-card); border: 1px solid var(--border-subtle); padding: 0.75rem 1.25rem; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.3); z-index: 9999; opacity: 0; transition: transform .3s, opacity .3s; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast-success { border-color: var(--accent-teal); }
.modal-confirm, .modal-share { max-width: 420px; }
.share-url-wrap { display: flex; gap: 0.5rem; margin: 1rem 0; }
.share-url-wrap input { flex: 1; padding: 0.5rem; background: var(--bg-dark); border: 1px solid var(--border-subtle); border-radius: 6px; color: var(--text-primary); }
.repost-original { background: var(--bg-dark); border: 1px solid var(--border-subtle); border-radius: 8px; padding: 0.75rem; margin-bottom: 1rem; font-size: 0.9rem; }
.repost-original .repost-source { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 0.25rem; }

.btn-logout {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-logout:hover { color: var(--accent-teal); }
.lang-toggle { display: flex; gap: 0.25rem; }
.lang-toggle button { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.85rem; padding: 0.25rem 0.5rem; }
.lang-toggle button:hover { color: var(--text-primary); }
.lang-toggle button.active { color: var(--accent-teal); font-weight: 600; }

/* Notifications */
.notifications-btn { position: relative; }
.notifications-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; font-size: 0.7rem; font-weight: 700; background: var(--accent-red); color: #fff; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.notifications-dropdown { position: absolute; top: 100%; right: 0; margin-top: 0.5rem; width: 320px; max-height: 400px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.3); z-index: 300; display: none; overflow: hidden; }
.notifications-dropdown.open { display: block; }
.notifications-header { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-subtle); font-weight: 600; }
.notifications-header button { background: none; border: none; color: var(--accent-teal); cursor: pointer; font-size: 0.85rem; }
#notifications-list { max-height: 320px; overflow-y: auto; }
.notification-item { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-subtle); cursor: pointer; transition: background 0.2s; }
.notification-item:hover { background: var(--bg-dark); }
.notification-item.unread { background: rgba(45,212,191,0.08); }
.notification-item p { font-size: 0.85rem; color: var(--text-muted); margin: 0.25rem 0 0; }
.notification-time { font-size: 0.75rem; color: var(--text-muted); }
.notification-empty { padding: 1.5rem; text-align: center; color: var(--text-muted); }

/* Skeleton */
.skeleton { background: linear-gradient(90deg, var(--bg-dark) 25%, var(--bg-card) 50%, var(--bg-dark) 75%); background-size: 200% 100%; animation: skeleton 1.2s ease-in-out infinite; border-radius: 6px; }
@keyframes skeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-card { display: flex; gap: 1rem; padding: 1rem; }
.skeleton-votes { width: 40px; height: 60px; }
.skeleton-body { flex: 1; }
.skeleton-meta { height: 14px; width: 60%; margin-bottom: 0.5rem; }
.skeleton-title { height: 18px; width: 90%; margin-bottom: 0.5rem; }
.skeleton-content { height: 14px; width: 100%; }

/* Feed filter & load more */
.feed-filter { display: flex; gap: 0.35rem; }
.feed-filter .filter-btn { padding: 0.4rem 0.8rem; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 6px; color: var(--text-muted); cursor: pointer; font-size: 0.9rem; }
.feed-filter .filter-btn.active { background: var(--accent-teal); color: #0d0d0d; border-color: var(--accent-teal); }
.feed-load-more { text-align: center; margin-top: 1rem; }
.feed-toolbar { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
/* Profile */
.profile-page { max-width: 640px; margin: 0 auto; }
.profile-header { display: flex; gap: 2rem; padding: 2rem; background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border-subtle); margin-bottom: 1.5rem; }
.profile-avatar-wrap { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.profile-avatar-img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }
.profile-avatar-upload { position: absolute; bottom: 0; right: 0; width: 36px; height: 36px; background: var(--accent-teal); color: #0d0d0d; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.9rem; }
.profile-avatar-upload:hover { opacity: 0.9; }
.profile-tabs { display: flex; gap: 0.5rem; margin: 1.5rem 0 1rem; }
.profile-tab { padding: 0.5rem 1rem; background: var(--bg-dark); border: 1px solid var(--border-subtle); border-radius: 8px; color: var(--text-muted); cursor: pointer; font-size: 0.9rem; }
.profile-tab.active { background: var(--accent-teal); color: #0d0d0d; border-color: var(--accent-teal); }
.nav-btn { background: none; border: none; cursor: pointer; text-align: left; width: 100%; font: inherit; color: inherit; }
.nav-btn:hover { color: var(--accent-teal); }
.nav-link.nav-btn { padding: 0.5rem 1rem; }
.profile-post-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 8px; padding: 1rem; margin-bottom: 0.75rem; }
.profile-post-card h4 { margin: 0 0 0.5rem; font-size: 1rem; }
.profile-post-meta { font-size: 0.8rem; color: var(--text-muted); }
.profile-empty { color: var(--text-muted); padding: 2rem; text-align: center; }
.profile-doc-card, .profile-gallery-item { margin-bottom: 0.5rem; }
.profile-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; }
.profile-gallery-item { position: relative; overflow: hidden; border-radius: 12px; background: var(--bg-dark); aspect-ratio: 1; }
.profile-gallery-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; transition: transform 0.2s; }
.profile-gallery-item:hover img { transform: scale(1.05); }
.comunidades-page { max-width: 720px; margin: 0 auto; }
.comunidades-page h2 { font-size: 1.1rem; margin: 1rem 0 0.5rem; }
.comunidades-loading { padding: 2rem; text-align: center; color: var(--text-muted); }
.comunidades-page .error { color: var(--accent-red, #ef4444); padding: 1rem; }
.comunidades-page .error a { color: var(--accent-teal); }
.post-community-badge { font-size: 0.9rem; color: var(--accent-teal); }
.comunidades-niches { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1rem 0; }
.niche-btn { padding: 0.4rem 0.8rem; background: var(--bg-dark); border: 1px solid var(--border-subtle); border-radius: 6px; color: var(--text-muted); cursor: pointer; font-size: 0.85rem; }
.niche-btn:hover { background: var(--bg-card); color: var(--text-primary); }
.niche-btn.active { background: var(--accent-teal); color: #0d0d0d; border-color: var(--accent-teal); }
.comunidade-card { display: flex; align-items: center; gap: 1rem; padding: 1rem; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 8px; margin-bottom: 0.75rem; cursor: pointer; }
.comunidade-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--accent-teal); color: #0d0d0d; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.comunidade-info { flex: 1; min-width: 0; }
.comunidade-info h3 { margin: 0 0 0.25rem; font-size: 1rem; }
.comunidade-meta { font-size: 0.8rem; color: var(--text-muted); }
.repost-original-inline { background: var(--bg-dark); border: 1px solid var(--border-subtle); border-radius: 8px; padding: 1rem; margin-top: 0.75rem; font-size: 0.9rem; }
.repost-original-inline h4 { margin: 0 0 0.5rem; font-size: 1rem; }
.repost-original-inline p { margin: 0; color: var(--text-muted); line-height: 1.4; }
.repost-original-inline .post-image-wrap { margin-top: 0.75rem; border-radius: 6px; overflow: hidden; max-height: 200px; }
.repost-original-inline .post-image-wrap img { width: 100%; height: auto; display: block; }
.repost-quote-text { padding: 0.5rem 0; font-style: italic; color: var(--text-muted); border-left: 3px solid var(--accent-teal); padding-left: 0.75rem; margin-bottom: 0.5rem; }
.profile-info h1 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.profile-email { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 0.5rem; }
.profile-bio { margin: 0.75rem 0; line-height: 1.5; }
.profile-stats { display: flex; gap: 1.5rem; margin: 1rem 0; }
.profile-edit-panel { padding: 2rem; background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border-subtle); margin-bottom: 1.5rem; }
.profile-edit-panel h3, .profile-edit-panel h4 { margin: 1rem 0 0.5rem; }
.profile-edit-panel .form-group { margin-bottom: 1rem; }
.profile-edit-panel label { display: block; margin-bottom: 0.35rem; font-size: 0.9rem; }
.profile-edit-panel input, .profile-edit-panel textarea { width: 100%; padding: 0.6rem; background: var(--bg-dark); border: 1px solid var(--border-subtle); border-radius: 8px; color: var(--text-primary); }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; margin: 0.5rem 0; cursor: pointer; }
.password-hint { font-size: 0.85rem; color: var(--text-muted); margin: 0.5rem 0 1rem; }
/* Arquivos full layout */
.arquivos-full-layout { width: 100%; max-width: none; }
.arquivos-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.arquivos-toolbar h1 { font-size: 1.25rem; margin: 0; }
.arquivos-toolbar-actions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.arquivos-count { font-size: 0.9rem; color: var(--text-muted); }
.arquivos-grid-full { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.search-list { list-style: none; margin: 0.5rem 0; }
.search-list li { margin-bottom: 0.35rem; }
.search-list a { color: var(--accent-teal); text-decoration: none; }
.search-list a:hover { text-decoration: underline; }
.search-loading, .search-empty { color: var(--text-muted); padding: 1rem; }
#search-results h4 { font-size: 0.9rem; margin: 1rem 0 0.5rem; color: var(--text-muted); }

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
}

.user-avatar { display: block; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; cursor: pointer; text-decoration: none; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.app-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

.app-sidebar {
  width: 260px;
  min-width: 260px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-subtle);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-nav { display: flex; flex-direction: column; flex: 1; min-height: 0; }

.sidebar-section { border-bottom: 1px solid var(--border-subtle); }
.sidebar-section.sidebar-main { padding: 0.75rem 0; }
.section-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 0.6rem 1.25rem;
  background: none; border: none;
  color: var(--text-muted); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.05em;
  cursor: pointer; text-align: left;
}
.section-toggle:hover { color: var(--text-primary); }
.section-toggle i { font-size: 0.6rem; transition: transform 0.2s; }
.section-content { padding: 0 0 0.5rem 0; }
.sidebar-section .nav-link { padding: 0.5rem 1.25rem; font-size: 0.9rem; }

.sidebar-footer {
  margin-top: auto; padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0,0,0,0.2);
}
.footer-links { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 1rem; }
.footer-link {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0; color: var(--text-muted); font-size: 0.8rem;
  text-decoration: none; transition: color 0.2s;
}
.footer-link:hover, .footer-link.active { color: var(--accent-teal); }
.footer-link i { width: 16px; text-align: center; opacity: 0.8; }

.sidebar-weather { margin-bottom: 0.75rem; }
.weather-mini {
  display: flex; align-items: center; gap: 0.5rem;
  width: 100%; padding: 0.6rem;
  background: var(--bg-dark); border: 1px solid var(--border-subtle);
  border-radius: 8px; color: var(--text-primary);
  font-size: 0.85rem; cursor: pointer; text-align: left;
}
.weather-mini:hover { border-color: var(--accent-teal); }
.weather-mini-icon { font-size: 1.1rem; color: var(--accent-teal); }
.weather-mini-temp { font-weight: 600; }
.weather-mini-desc { font-size: 0.75rem; color: var(--text-muted); }
.sidebar-copyright { font-size: 0.7rem; color: var(--text-muted); }

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.nav-link:hover {
  background: var(--bg-dark);
  color: var(--text-primary);
}

.nav-link.active {
  background: rgba(45, 212, 191, 0.15);
  color: var(--accent-teal);
  border-left: 3px solid var(--accent-teal);
}

.nav-link i { width: 20px; text-align: center; }

.app-main {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  min-width: 0;
}

.view-section {
  display: none;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.view-section.view-active {
  display: block;
}

/* Páginas comuns */
.page-header { margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.5rem; margin-bottom: 0.25rem; display: flex; align-items: center; gap: 0.5rem; }
.page-desc { color: var(--text-muted); font-size: 0.9rem; }
.btn-primary { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: var(--accent-teal); color: #0d0d0d; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; }
.btn-secondary { padding: 0.5rem 1rem; background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-subtle); border-radius: 8px; cursor: pointer; }
.btn-danger { padding: 0.5rem 1rem; background: var(--accent-red); color: white; border: none; border-radius: 8px; cursor: pointer; }
.btn-icon { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 0.35rem; }
.btn-icon:hover { color: var(--accent-teal); }

/* Admin */
.admin-add { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.admin-add input { flex: 1; padding: 0.6rem; background: var(--bg-dark); border: 1px solid var(--border-subtle); border-radius: 8px; color: var(--text-primary); }
.admin-list { list-style: none; }
.admin-list li { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem; border-bottom: 1px solid var(--border-subtle); }
.admin-list .empty { color: var(--text-muted); }
.btn-remove { color: var(--accent-red) !important; }

/* Email */
.email-tabs { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-top: 0.5rem; }
.tab-btn { padding: 0.4rem 0.8rem; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 6px; color: var(--text-muted); cursor: pointer; }
.tab-btn.active { background: var(--accent-teal); color: #0d0d0d; border-color: var(--accent-teal); }
.email-layout { display: grid; grid-template-columns: 320px 1fr; gap: 1rem; margin-top: 1rem; }
@media (max-width: 900px) { .email-layout { grid-template-columns: 1fr; } }
.email-list { background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border-subtle); overflow: hidden; }
.email-item { display: grid; grid-template-columns: 1fr 2fr auto; gap: 1rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-subtle); cursor: pointer; transition: background 0.2s; }
.email-item:hover { background: rgba(45,212,191,0.08); }
.email-item.selected { background: rgba(45,212,191,0.12); border-left: 3px solid var(--accent-teal); }
.email-item.unread { font-weight: 500; }
.email-date { font-size: 0.85rem; color: var(--text-muted); }
.email-read { background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border-subtle); padding: 1.25rem; min-height: 200px; }
.email-read-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; color: var(--text-muted); padding: 2rem; }
.email-read-placeholder i { font-size: 2rem; opacity: 0.5; }
.email-read-header { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-subtle); }
.email-read-body pre { white-space: pre-wrap; font-family: inherit; line-height: 1.5; }
.email-compose-panel, .cal-modal { background: var(--bg-card); padding: 1rem; border-radius: 12px; margin-top: 1rem; }
.email-compose-panel input, .email-compose-panel select, .email-compose-panel textarea,
.cal-modal input, .cal-modal textarea { width: 100%; padding: 0.6rem; margin-bottom: 0.75rem; background: var(--bg-dark); border: 1px solid var(--border-subtle); border-radius: 6px; color: var(--text-primary); }
.email-compose-panel label, .cal-modal label { display: block; margin-bottom: 0.25rem; font-size: 0.9rem; }

/* Calendar */
.calendar-nav { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.5rem; flex-wrap: wrap; }
.cal-month { font-weight: 600; min-width: 140px; }
.calendar-grid { margin-top: 1rem; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.25rem; margin-bottom: 0.5rem; text-align: center; font-size: 0.85rem; color: var(--text-muted); }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.25rem; }
.cal-day { min-height: 80px; padding: 0.5rem; background: var(--bg-card); border-radius: 8px; border: 1px solid var(--border-subtle); cursor: pointer; }
.cal-day:hover { border-color: var(--accent-teal); }
.cal-day.today { border-color: var(--accent-teal); background: rgba(45,212,191,0.1); }
.cal-day.other-month { opacity: 0.5; }
.day-events { font-size: 0.75rem; margin-top: 0.25rem; }
.cal-event { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--accent-teal); }

/* Notes */
.notes-toolbar { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.notes-toolbar input { flex: 1; max-width: 300px; padding: 0.5rem; background: var(--bg-dark); border: 1px solid var(--border-subtle); border-radius: 8px; color: var(--text-primary); }
.notes-layout { display: grid; grid-template-columns: 280px 1fr; gap: 1rem; margin-top: 1rem; }
.note-item { padding: 1rem; background: var(--bg-card); border-radius: 8px; border: 1px solid var(--border-subtle); cursor: pointer; margin-bottom: 0.5rem; }
.note-item:hover { border-color: var(--accent-teal); }
.note-item.favorite { border-left: 3px solid #f59e0b; }
.note-item h4 { font-size: 0.95rem; margin-bottom: 0.25rem; }
.note-item p { font-size: 0.85rem; color: var(--text-muted); }
.note-date { font-size: 0.75rem; color: var(--text-muted); }
.notes-editor textarea { width: 100%; padding: 0.75rem; background: var(--bg-dark); border: 1px solid var(--border-subtle); border-radius: 8px; color: var(--text-primary); resize: vertical; }
.editor-actions { display: flex; gap: 0.5rem; align-items: center; margin-top: 1rem; flex-wrap: wrap; }
.empty-msg { color: var(--text-muted); padding: 2rem; text-align: center; }

/* Feed comunidade (Reddit-like) */
.view-feed { max-width: 680px; }
.feed-header { margin-bottom: 1rem; }
.feed-header h1 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.feed-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.feed-toolbar .feed-sort { display: flex; gap: 0.35rem; }
.feed-toolbar .sort-btn { padding: 0.4rem 0.8rem; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 6px; color: var(--text-muted); cursor: pointer; font-size: 0.9rem; }
.feed-toolbar .sort-btn.active { background: var(--accent-teal); color: #0d0d0d; border-color: var(--accent-teal); }
.post-card { display: flex; gap: 1rem; padding: 1rem; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 12px; margin-bottom: 0.75rem; }
.post-votes { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; min-width: 40px; }
.post-votes .vote-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 0.2rem; }
.post-votes .vote-btn:hover { color: var(--accent-teal); }
.post-votes .vote-btn.voted-up { color: var(--accent-teal); }
.post-votes .vote-btn.voted-up i { transform: scale(1.1); }
.post-votes .vote-count { font-size: 0.9rem; font-weight: 600; }
.post-body { flex: 1; min-width: 0; }
.post-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.35rem; }
.post-meta .post-community { color: var(--accent-teal); font-weight: 600; }
.post-title { font-size: 1.05rem; margin-bottom: 0.35rem; }
.post-content { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 0.5rem; white-space: pre-wrap; }
.post-image-wrap { margin: 0.5rem 0; border-radius: 8px; overflow: hidden; max-width: 100%; }
.post-image-wrap img { max-width: 100%; height: auto; display: block; }
.post-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: 0.85rem; color: var(--text-muted); }
.post-actions .action-btn { background: none; border: none; color: inherit; cursor: pointer; display: flex; align-items: center; gap: 0.35rem; }
.post-actions .action-btn:hover, .post-actions .action-btn.saved { color: var(--accent-teal); }
.empty-feed { text-align: center; padding: 3rem; color: var(--text-muted); }

/* Novo post modal */
.post-image-label { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem; cursor: pointer; color: var(--text-muted); }
.post-image-label:hover { color: var(--accent-teal); }
.modal-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }
#new-post-modal .modal input, #new-post-modal .modal textarea { width: 100%; margin-bottom: 0.75rem; padding: 0.6rem; background: var(--bg-dark); border: 1px solid var(--border-subtle); border-radius: 8px; color: var(--text-primary); }

/* Comments modal */
.modal-comments { max-width: 500px; }
.comments-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.comments-list { max-height: 300px; overflow-y: auto; margin-bottom: 1rem; }
.comment-item { padding: 0.75rem; border-bottom: 1px solid var(--border-subtle); }
.comment-item strong { font-size: 0.9rem; }
.comment-time { font-size: 0.75rem; color: var(--text-muted); margin-left: 0.5rem; }
.comments-form textarea { width: 100%; padding: 0.6rem; margin-bottom: 0.5rem; background: var(--bg-dark); border: 1px solid var(--border-subtle); border-radius: 8px; color: var(--text-primary); }

/* Admin Dashboard */
.admin-dashboard { max-width: 800px; }
.admin-hero { margin-bottom: 1.5rem; padding: 1rem; background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border-subtle); }
.admin-hero .greeting { font-size: 1.5rem; margin-bottom: 0.5rem; }
.admin-widgets { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.admin-widgets .widget { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1rem; background: var(--bg-dark); border: 1px solid var(--border-subtle); border-radius: 8px; color: var(--text-muted); cursor: default; }
.admin-widgets .widget-dnd { border-left: 3px solid var(--accent-red); }
.btn-sm { padding: 0.35rem 0.6rem; font-size: 0.8rem; margin-left: 0.5rem; }
.admin-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.admin-list li code { font-size: 0.85rem; background: var(--bg-dark); padding: 0.2rem 0.5rem; border-radius: 4px; }
.admin-tabs { display: flex; gap: 0.35rem; margin-bottom: 1rem; flex-wrap: wrap; }
.admin-tab { padding: 0.5rem 1rem; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 8px; color: var(--text-muted); cursor: pointer; font-size: 0.9rem; }
.admin-tab:hover { color: var(--text-primary); }
.admin-tab.active { background: var(--accent-teal); color: #0d0d0d; border-color: var(--accent-teal); }
.admin-tab-content { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 12px; padding: 1.5rem; }
.admin-overview p { margin-bottom: 0.5rem; color: var(--text-muted); }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 1rem; margin: 1rem 0; }
.stat-card { background: var(--bg-dark); border: 1px solid var(--border-subtle); border-radius: 8px; padding: 1rem; text-align: center; }
.stat-value { display: block; font-size: 1.5rem; font-weight: 700; color: var(--accent-teal); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }
.admin-users h3, .admin-colors h3, .admin-config h3 { font-size: 1rem; margin-bottom: 0.75rem; margin-top: 1rem; }
.admin-colors label, .admin-config label { display: block; margin-bottom: 0.5rem; }
.admin-colors input[type="color"] { width: 60px; height: 36px; margin-left: 0.5rem; cursor: pointer; }

/* Explorar */
.explore-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-top: 1rem; }
.explore-card {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 1.25rem; background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 12px; color: inherit; text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.explore-card:hover { border-color: var(--accent-teal); transform: translateY(-2px); }
.explore-card i { font-size: 2rem; color: var(--accent-teal); margin-bottom: 0.75rem; }
.explore-card h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.explore-card p { font-size: 0.85rem; color: var(--text-muted); }

/* Conteúdo estático */
.static-content { max-width: 640px; line-height: 1.6; }
.static-content ul, .static-content ol { margin: 0.75rem 0 0 1.5rem; }
.static-content li { margin-bottom: 0.35rem; }
.help-accordion .help-item { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-subtle); }
.help-item h4 { font-size: 0.95rem; margin-bottom: 0.35rem; display: flex; align-items: center; gap: 0.5rem; }
.help-item h4 i { color: var(--accent-teal); }

.btn-back { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0; color: var(--text-muted); background: none; border: none; cursor: pointer; margin-bottom: 1rem; }
.btn-back:hover { color: var(--accent-teal); }

@media (max-width: 768px) {
  .sidebar-toggle { display: block; }
  .header-search { display: none; }
  .app-sidebar { position: fixed; left: 0; top: 0; height: 100vh; z-index: 200; transform: translateX(-100%); transition: transform 0.3s; box-shadow: 4px 0 20px rgba(0,0,0,0.3); width: 280px; }
  .app-sidebar.open { transform: translateX(0); }
  .app-main { padding: 1rem; }
  .notes-layout { grid-template-columns: 1fr; }
  .email-item { grid-template-columns: 1fr auto; }
  .explore-grid { grid-template-columns: 1fr; }
}
