/* ═══════════════════════════════════════════════════════════
   GreenVolt Hub — componentes do portal (apps, avisos, feed)
═══════════════════════════════════════════════════════════ */

/* ── Grid de apps ─────────────────────────────────────────── */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.app-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
}
.app-card:hover { border-color: var(--verde); transform: translateY(-2px); }
.app-card-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(0,207,137,0.12);
  color: var(--verde);
  display: flex; align-items: center; justify-content: center;
}
.app-card-icon svg { width: 22px; height: 22px; }
.app-card-nome { font-size: 15px; font-weight: 700; }
.app-card-desc { font-size: 12px; color: var(--text-2); line-height: 1.4; }
.app-grid-empty { color: var(--text-2); font-size: 13px; }

/* ── Avisos ───────────────────────────────────────────────── */
.aviso-card { display: flex; flex-direction: column; gap: 6px; }
.aviso-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.aviso-titulo { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.aviso-titulo .pin-icon { width: 14px; height: 14px; color: var(--atencao); }
.aviso-corpo { font-size: 13px; color: var(--text-1); line-height: 1.5; white-space: pre-wrap; }
.aviso-meta { font-size: 11px; color: var(--text-2); }
.aviso-form textarea {
  width: 100%; min-height: 70px; resize: vertical;
  background: var(--bg-2, transparent); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; font: inherit; color: inherit;
}

/* ── Feed ─────────────────────────────────────────────────── */
.post-composer { display: flex; flex-direction: column; gap: 10px; }
.post-composer textarea {
  width: 100%; min-height: 64px; resize: vertical;
  background: var(--bg-2, transparent); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; font: inherit; color: inherit;
}
.post-composer-actions { display: flex; justify-content: flex-end; }

.post-card { display: flex; flex-direction: column; gap: 10px; }
.post-header { display: flex; align-items: center; gap: 10px; }
.post-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--gv-gray-300); }
.post-avatar-fallback {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--azul); color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.post-autor { font-size: 13px; font-weight: 700; }
.post-data { font-size: 11px; color: var(--text-2); }
.post-texto { font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.post-actions { display: flex; align-items: center; gap: 16px; border-top: 1px solid var(--border); padding-top: 10px; }
.reaction-btn {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  font-size: 12px; color: var(--text-2); padding: 4px 8px; border-radius: var(--radius-sm);
}
.reaction-btn svg { width: 16px; height: 16px; }
.reaction-btn:hover { background: rgba(0,207,137,0.1); color: var(--verde); }
.reaction-btn.active { color: var(--verde); }
.post-delete-btn { margin-left: auto; }

.comentarios-box { margin-top: 4px; border-top: 1px solid var(--border); padding-top: 10px; }
.comment-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.comment-item { display: flex; gap: 8px; font-size: 13px; }
.comment-autor { font-weight: 700; }
.comment-form { display: flex; gap: 8px; margin-top: 6px; }
.comment-form input {
  flex: 1; background: transparent; border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px; font: inherit; color: inherit;
}

/* ── Admin ────────────────────────────────────────────────── */
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; color: var(--text-2); font-size: 11px; text-transform: uppercase; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-form-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-form-row input, .admin-form-row select {
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 10px; font: inherit; color: inherit;
}
